code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from landoui.forms import UserSettingsForm from landoui.usersettings import manage_phab_api_token_cookie def test_setti...
[ "landoui.forms.UserSettingsForm" ]
[((346, 421), 'landoui.forms.UserSettingsForm', 'UserSettingsForm', ([], {'phab_api_token': '"""ph<PASSWORD>"""', 'reset_phab_api_token': '(False)'}), "(phab_api_token='ph<PASSWORD>', reset_phab_api_token=False)\n", (362, 421), False, 'from landoui.forms import UserSettingsForm\n'), ((707, 769), 'landoui.forms.UserSett...
"""Test that Coin class methods are abstract, and test module loading coin fixture is the abstract coin class tested """ import pytest pytestmark = pytest.mark.asyncio async def test_help(coin): with pytest.raises(NotImplementedError): await coin.help() async def test_get_tx(coin): with pytest.raise...
[ "pytest.raises" ]
[((207, 241), 'pytest.raises', 'pytest.raises', (['NotImplementedError'], {}), '(NotImplementedError)\n', (220, 241), False, 'import pytest\n'), ((308, 342), 'pytest.raises', 'pytest.raises', (['NotImplementedError'], {}), '(NotImplementedError)\n', (321, 342), False, 'import pytest\n'), ((418, 452), 'pytest.raises', '...
import time import joyanalog """ available button arguments: ["a", "b", "x", "y", "rs", "zr", "+", "h", "rsl", "rsr", "syncr", "sbr"] ["du", "dd", "dl", "dr", "ls", "zl", "-", "cap", "lsl", "lsr", "syncl", "sbl"] """ # serial port of two joyanalogs switch = joyanalog.joyanalog("COM8", "COM4") switch.connec...
[ "joyanalog.joyanalog", "time.sleep" ]
[((270, 305), 'joyanalog.joyanalog', 'joyanalog.joyanalog', (['"""COM8"""', '"""COM4"""'], {}), "('COM8', 'COM4')\n", (289, 305), False, 'import joyanalog\n'), ((385, 400), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (395, 400), False, 'import time\n')]
#!/usr/bin/env python3 import argparse import logging import os import math import random import requests import time from datetime import datetime from collections import defaultdict import concurrent.futures # mostly copypaste from prometheus exporter def choose_data(): data_dir = "opentsdb_data" possibilit...
[ "argparse.ArgumentParser", "logging.basicConfig", "random.randint", "math.ceil", "random.choice", "time.sleep", "collections.defaultdict", "requests.post", "datetime.datetime.now", "os.listdir", "logging.getLogger" ]
[((326, 346), 'os.listdir', 'os.listdir', (['data_dir'], {}), '(data_dir)\n', (336, 346), False, 'import os\n'), ((360, 388), 'random.choice', 'random.choice', (['possibilities'], {}), '(possibilities)\n', (373, 388), False, 'import random\n'), ((649, 665), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int...
from sys import argv from shutil import rmtree from os import system git_mode = False if "git" in argv: git_mode = True print("Cloning in git mode...") projects = open("projects").readlines() print(projects) for project in projects: project = project.strip("\n") try: rmtree(project) excep...
[ "shutil.rmtree", "os.system" ]
[((552, 588), 'os.system', 'system', (["('git clone %s' % project_uri)"], {}), "('git clone %s' % project_uri)\n", (558, 588), False, 'from os import system\n'), ((295, 310), 'shutil.rmtree', 'rmtree', (['project'], {}), '(project)\n', (301, 310), False, 'from shutil import rmtree\n')]
import numpy as np import pandas as pd import biclust_comp.analysis.accuracy as acc import biclust_comp.analysis.accuracy_utils as acc_utils import biclust_comp.analysis.enrichment as enrich def get_results_with_num_unique(error_df_file): error_df = pd.read_csv(error_df_file) unique_factors_df = get_unique_fa...
[ "pandas.DataFrame", "numpy.fill_diagonal", "pandas.read_csv", "numpy.ix_", "biclust_comp.analysis.enrichment.get_number_unique_pathways", "biclust_comp.analysis.accuracy.calc_overlaps", "biclust_comp.analysis.accuracy_utils.read_result_binary_best_threshold", "numpy.arange", "numpy.delete" ]
[((256, 282), 'pandas.read_csv', 'pd.read_csv', (['error_df_file'], {}), '(error_df_file)\n', (267, 282), True, 'import pandas as pd\n'), ((364, 412), 'biclust_comp.analysis.enrichment.get_number_unique_pathways', 'enrich.get_number_unique_pathways', (['error_df_file'], {}), '(error_df_file)\n', (397, 412), True, 'impo...
from typing import Optional from genie_client_cpp.context import Context from clavier import CFG, log as logging, io from genie_client_cpp.remote import Remote LOG = logging.getLogger(__name__) def add_to(subparsers): parser = subparsers.add_parser( "get", target=run, help="Get WiFi co...
[ "clavier.io.header", "clavier.log.getLogger", "genie_client_cpp.remote.Remote.create" ]
[((170, 197), 'clavier.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (187, 197), True, 'from clavier import CFG, log as logging, io\n'), ((1045, 1066), 'genie_client_cpp.remote.Remote.create', 'Remote.create', (['target'], {}), '(target)\n', (1058, 1066), False, 'from genie_client_cpp.remote ...
# -*- coding: utf-8 -*- """ Created on 2012-06-11 5:48 PM @author: lundberg """ from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404 from django.http import Http404 from apps.noclook.forms import get_node_type_tuples, SearchIdForm from apps.noclook.forms.re...
[ "apps.noclook.helpers.dicts_to_xls_response", "apps.noclook.models.NordunetUniqueId.objects.all", "apps.noclook.forms.reports.HostReportForm", "apps.noclook.forms.SearchIdForm", "django.shortcuts.get_object_or_404", "apps.noclook.helpers.dicts_to_csv_response", "django.http.Http404", "django.shortcuts...
[((525, 581), 'django.shortcuts.render', 'render', (['request', '"""noclook/reports/host_reports.html"""', '{}'], {}), "(request, 'noclook/reports/host_reports.html', {})\n", (531, 581), False, 'from django.shortcuts import render, get_object_or_404\n'), ((814, 861), 'apps.noclook.forms.reports.HostReportForm', 'HostRe...
import sys import os import snap import statistics # statistics packages uses Bessel's correction # (https://en.wikipedia.org/wiki/Bessel%27s_correction) # Thus variance calculated uses the term (n - 1) in denominator instead of (n) # Seed the rng Rnd = snap.TRnd(42) Rnd.Randomize() # Get the absolute file path def ...
[ "os.remove", "snap.GetMxSccSz", "snap.TIntPrV", "snap.TRnd", "snap.GetTriadEdges", "statistics.variance", "snap.GetArtPoints", "snap.TIntV", "os.path.join", "snap.GetTriads", "snap.GetBfsFullDiam", "snap.GetNodeClustCf", "os.path.exists", "snap.GetNodeTriads", "snap.LoadEdgeList", "sna...
[((256, 269), 'snap.TRnd', 'snap.TRnd', (['(42)'], {}), '(42)\n', (265, 269), False, 'import snap\n'), ((362, 398), 'os.path.join', 'os.path.join', (['"""subgraphs"""', 'file_name'], {}), "('subgraphs', file_name)\n", (374, 398), False, 'import os\n'), ((534, 559), 'os.path.exists', 'os.path.exists', (['file_name'], {}...
# -*- coding: utf-8 -*- import httplib as http from flask import request from framework.exceptions import HTTPError from framework.auth.decorators import must_be_logged_in from website.project import decorators from website.util.sanitize import assert_clean from website.util import api_url_for, web_url_for from web...
[ "website.addons.dataverse.client.get_datasets", "website.addons.dataverse.client.connect_or_401", "website.addons.dataverse.client.connect_from_settings", "website.util.api_url_for", "website.addons.dataverse.client.get_dataset", "framework.exceptions.HTTPError", "website.util.web_url_for", "website.u...
[((463, 510), 'website.project.decorators.must_have_addon', 'decorators.must_have_addon', (['"""dataverse"""', '"""node"""'], {}), "('dataverse', 'node')\n", (489, 510), False, 'from website.project import decorators\n'), ((714, 754), 'website.project.decorators.must_have_permission', 'decorators.must_have_permission',...
import csv import json import os import pickle import random def write_schema(graph, filename): s = NX2SylvaSchemaConverter(graph) s.build_schemas(filename) def write_csvs(graph, node_dir, edge_dir, dest_dir, node_type_attr="type"): nodefiles = os.listdir(node_dir) edgefiles = os.listdir(edge_dir) ...
[ "os.listdir", "csv.reader", "csv.writer", "json.dumps", "random.random", "json.JSONEncoder.default", "pickle.dumps" ]
[((261, 281), 'os.listdir', 'os.listdir', (['node_dir'], {}), '(node_dir)\n', (271, 281), False, 'import os\n'), ((298, 318), 'os.listdir', 'os.listdir', (['edge_dir'], {}), '(edge_dir)\n', (308, 318), False, 'import os\n'), ((4911, 4960), 'json.dumps', 'json.dumps', (['self.schemas'], {'cls': 'PythonObjectEncoder'}), ...
from rrutil import * import re restart_replay() send_gdb('c') # A stop fires when we hit an exec expect_rr([ re.compile(r'exited normally'), re.compile(r'stopped') ]) ok()
[ "re.compile" ]
[((110, 139), 're.compile', 're.compile', (['"""exited normally"""'], {}), "('exited normally')\n", (120, 139), False, 'import re\n'), ((154, 175), 're.compile', 're.compile', (['"""stopped"""'], {}), "('stopped')\n", (164, 175), False, 'import re\n')]
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Execute Meerschaum Actions via the API """ from __future__ import annotations from meerschaum.utils.typing import SuccessTuple from meerschaum.api import fastapi, app, endpoints, get_api_connector, debug, manager from meerschaum.actions import actio...
[ "meerschaum.api.fastapi.Body", "meerschaum.api.fastapi.Depends", "meerschaum.api.app.post", "meerschaum.config.get_config", "meerschaum.api.app.get", "meerschaum.api.get_api_connector" ]
[((398, 441), 'meerschaum.api.app.get', 'app.get', (['actions_endpoint'], {'tags': "['Actions']"}), "(actions_endpoint, tags=['Actions'])\n", (405, 441), False, 'from meerschaum.api import fastapi, app, endpoints, get_api_connector, debug, manager\n'), ((551, 609), 'meerschaum.api.app.post', 'app.post', (["(actions_end...
import prata import time import timeit import numpy as np import sys import random import string B = 1 KB = 1000 MB = 1000000 END = [] def getString(s): #''.join(random.choice(string.ascii_letters) for x in range(int(real))) real = 1 if (s-49) < 1 else s-49 return "1"*real TIMES = 5 SLEEP = 2 NUMBER = ...
[ "numpy.average", "random.randint", "numpy.median", "timeit.Timer", "time.sleep", "numpy.max", "numpy.min", "sys.getsizeof", "prata.connect" ]
[((1454, 1487), 'prata.connect', 'prata.connect', (['"""127.0.0.1"""', '(25565)'], {}), "('127.0.0.1', 25565)\n", (1467, 1487), False, 'import prata\n'), ((1955, 1973), 'sys.getsizeof', 'sys.getsizeof', (['obj'], {}), '(obj)\n', (1968, 1973), False, 'import sys\n'), ((2396, 2414), 'sys.getsizeof', 'sys.getsizeof', (['o...
import numpy as np """ these are altitudes hard-coded into the old version of NCAR GLOW. """ def glowalt() -> np.ndarray: # z = range(80,110+1,1) z = np.arange(30.0, 110 + 1.0, 1.0) z = np.append(z, [111.5, 113.0, 114.5, 116.0]) z = np.append(z, np.arange(118, 150 + 2, 2.0)) z = np.append(z, np.a...
[ "numpy.append", "numpy.arange" ]
[((161, 192), 'numpy.arange', 'np.arange', (['(30.0)', '(110 + 1.0)', '(1.0)'], {}), '(30.0, 110 + 1.0, 1.0)\n', (170, 192), True, 'import numpy as np\n'), ((201, 243), 'numpy.append', 'np.append', (['z', '[111.5, 113.0, 114.5, 116.0]'], {}), '(z, [111.5, 113.0, 114.5, 116.0])\n', (210, 243), True, 'import numpy as np\...
import yaml import sys from jinja2 import Template def build_template(template, output_file): with open(template) as file: template_config = yaml.safe_load(file) with open(f"roles/fabric/python/{template_config['target_template']}") as file: j2_template = file.read() with open(output_fil...
[ "jinja2.Template", "yaml.safe_load" ]
[((154, 174), 'yaml.safe_load', 'yaml.safe_load', (['file'], {}), '(file)\n', (168, 174), False, 'import yaml\n'), ((356, 377), 'jinja2.Template', 'Template', (['j2_template'], {}), '(j2_template)\n', (364, 377), False, 'from jinja2 import Template\n')]
import json import tqdm import gc import logging import gensim def load_history_data(data_path): print(f"Loading history data - {data_path}") with open(data_path) as f: file_data = f.read().split("\n") out = [] for l in tqdm.tqdm(file_data): l = json.loads(l) out.append(l) ...
[ "tqdm.tqdm", "json.loads", "logging.basicConfig", "gensim.models.Word2Vec", "gc.collect" ]
[((249, 269), 'tqdm.tqdm', 'tqdm.tqdm', (['file_data'], {}), '(file_data)\n', (258, 269), False, 'import tqdm\n'), ((324, 336), 'gc.collect', 'gc.collect', ([], {}), '()\n', (334, 336), False, 'import gc\n'), ((691, 715), 'tqdm.tqdm', 'tqdm.tqdm', (['train_dataset'], {}), '(train_dataset)\n', (700, 715), False, 'import...
from typing import Union, Tuple import multiaug import numpy as np import scipy.ndimage from multiaug.augmenters import meta def _generate_bool_sequence(num: int, random_state: int) -> list: return [random_state.choice([True, False], 1)[0] for _ in range(num)] def _merge_bool_sequences(proposed: list, mask: lis...
[ "numpy.array" ]
[((2833, 2857), 'numpy.array', 'np.array', (['rotated_images'], {}), '(rotated_images)\n', (2841, 2857), True, 'import numpy as np\n')]
"""Took all this from https://github.com/MadryLab/implementation-matters""" import gym import numpy as np class RunningStat: def __init__(self): self.n = 0 self.m = 0 self.s = 0 def add(self, v): self.n += 1 if self.n == 1: self.m = v else: ...
[ "numpy.sqrt" ]
[((655, 672), 'numpy.sqrt', 'np.sqrt', (['self.var'], {}), '(self.var)\n', (662, 672), True, 'import numpy as np\n')]
"""Testing file for lambdata functions""" import unittest from df_utils import Dataframe_funcs, Stats_funcs import pandas as pd import numpy as np df1 = pd.DataFrame({'ones': [1] * 10, 'twos': [2] * 10}) list1 = [3] * 10 df2 = pd.DataFrame({'ones': [1] * 10, 'twos': [2] * 10, 'threes': [3] * 10}) ...
[ "pandas.DataFrame", "df_utils.Dataframe_funcs", "unittest.main", "df_utils.Stats_funcs" ]
[((155, 205), 'pandas.DataFrame', 'pd.DataFrame', (["{'ones': [1] * 10, 'twos': [2] * 10}"], {}), "({'ones': [1] * 10, 'twos': [2] * 10})\n", (167, 205), True, 'import pandas as pd\n'), ((229, 299), 'pandas.DataFrame', 'pd.DataFrame', (["{'ones': [1] * 10, 'twos': [2] * 10, 'threes': [3] * 10}"], {}), "({'ones': [1] * ...
# -*- coding: utf-8 -*- """ @author: ruess """ import pytest from masci_tools.io.parsers.voroparser_functions import parse_voronoi_output from pathlib import Path import os DIR = Path(__file__).parent.resolve() class Test_voronoi_parser_functions: """ Tests for the voronoi parser functions """ grou...
[ "os.fspath", "masci_tools.io.parsers.voroparser_functions.parse_voronoi_output", "pathlib.Path" ]
[((488, 520), 'os.fspath', 'os.fspath', (["(path0 / 'out_voronoi')"], {}), "(path0 / 'out_voronoi')\n", (497, 520), False, 'import os\n'), ((535, 566), 'os.fspath', 'os.fspath', (["(path0 / 'output.pot')"], {}), "(path0 / 'output.pot')\n", (544, 566), False, 'import os\n'), ((582, 615), 'os.fspath', 'os.fspath', (["(pa...
from time import time from SimpleAES import encrypt from SimpleAES import decrypt enc_test = input("enc_test=").encode(encoding="utf-8") t = time() e = encrypt(data=enc_test) print("\n".join([ "=" * 60, f"* Encrypt Result : {e.data}", f"* IV : {e.iv[:8]}...", f"* KEY : {e.key[:...
[ "SimpleAES.decrypt", "SimpleAES.encrypt", "time.time" ]
[((144, 150), 'time.time', 'time', ([], {}), '()\n', (148, 150), False, 'from time import time\n'), ((155, 177), 'SimpleAES.encrypt', 'encrypt', ([], {'data': 'enc_test'}), '(data=enc_test)\n', (162, 177), False, 'from SimpleAES import encrypt\n'), ((378, 384), 'time.time', 'time', ([], {}), '()\n', (382, 384), False, ...
#!/usr/bin/env python33 # -*- coding: utf-8 -*- import os import sys import pysub try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.md').read() history = open...
[ "os.system", "sys.exit", "distutils.core.setup" ]
[((345, 1377), 'distutils.core.setup', 'setup', ([], {'name': '"""pysub"""', 'version': 'pysub.__version__', 'description': '"""Subtitle downloader written in python, using opensubtitles.org API"""', 'long_description': "(readme + '\\n\\n' + history)", 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '...
# Generated by Django 3.0.7 on 2020-08-30 11:37 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
[ "django.db.migrations.swappable_dependency", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateField" ]
[((256, 313), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (287, 313), False, 'from django.db import migrations, models\n'), ((501, 594), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
import copy from django.core.exceptions import ValidationError from django.db import models from lazychoices.forms.fields import LazyChoiceField from .base import IsolatedModelsTestCase class LazyChoiceFieldTests(IsolatedModelsTestCase): def test_deepcopy(self): class Model(models.Model): p...
[ "copy.deepcopy", "lazychoices.forms.fields.LazyChoiceField" ]
[((338, 396), 'lazychoices.forms.fields.LazyChoiceField', 'LazyChoiceField', ([], {'choices_name': '"""FIELD_CHOICES"""', 'model': 'Model'}), "(choices_name='FIELD_CHOICES', model=Model)\n", (353, 396), False, 'from lazychoices.forms.fields import LazyChoiceField\n'), ((410, 427), 'copy.deepcopy', 'copy.deepcopy', (['f...
from flask import Flask from twitoff.routes.home_routes import home_routes from twitoff.routes.book_routes import book_routes def create_app(): app = Flask(__name__) app.register_blueprint(home_routes) app.register_blueprint(book_routes) return app if __name__ == "__main__": my_app = create_app(...
[ "flask.Flask" ]
[((157, 172), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (162, 172), False, 'from flask import Flask\n')]
# -------------- import numpy as np import pandas as pd import matplotlib.pyplot as plt # code starts here df = pd.read_csv(path) #probability of fico score greater than 700 p_a = df[df['fico'].astype(float)>700].shape[0]/df.shape[0] print(p_a) # probability of purpose == debt_consolidation p_b = df[df['purpose'] =...
[ "pandas.read_csv" ]
[((113, 130), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (124, 130), True, 'import pandas as pd\n')]
from bindings import NativeMapSpace, Dimension, ID from .config import Config from .model import ArchSpecs from .problem import Workload from io import StringIO import logging import sys class MapSpace(NativeMapSpace): @staticmethod def parse_and_construct(config: Config, arch_constraints: Config, ...
[ "bindings.NativeMapSpace.parse_and_construct", "io.StringIO", "logging.getLogger" ]
[((570, 623), 'logging.getLogger', 'logging.getLogger', (["(__name__ + '.' + MapSpace.__name__)"], {}), "(__name__ + '.' + MapSpace.__name__)\n", (587, 623), False, 'import logging\n'), ((780, 790), 'io.StringIO', 'StringIO', ([], {}), '()\n', (788, 790), False, 'from io import StringIO\n'), ((834, 844), 'io.StringIO',...
import os import random import numpy as np import torch from torch import nn import torch.nn.functional as F import torchvision.transforms as T import torchvision from torchvision import datasets, transforms # from stylegan_model import Generator, Encoder # from view_generator import VGGLoss from functools import pa...
[ "pickle.dump", "argparse.ArgumentParser", "torch.cat", "pathlib.Path", "pickle.load", "torchvision.transforms.Normalize", "torch.no_grad", "torch.utils.data.DataLoader", "utils_html.save_grid", "torch.load", "os.path.exists", "resnet.resnet18", "torchvision.transforms.CenterCrop", "utils.f...
[((1837, 1927), 'einops.rearrange', 'rearrange', (['zq', '"""(b h w) c -> b c h w"""'], {'b': 'z_q.shape[0]', 'h': 'z_q.shape[2]', 'w': 'z_q.shape[3]'}), "(zq, '(b h w) c -> b c h w', b=z_q.shape[0], h=z_q.shape[2], w=z_q\n .shape[3])\n", (1846, 1927), False, 'from einops import rearrange\n'), ((2176, 2201), 'argpar...
import blynklib import time time.sleep(1) # delay BLYNK_AUTH = '' # Enter your auth token here in between ' ' # initialize Blynk blynk = blynklib.Blynk(BLYNK_AUTH) # appropriately create buttons/ readers/ sliders to input/ output values @blynk.handle_event('write V2') # to read values from Virtual pin 2 def write_...
[ "blynklib.Blynk", "time.sleep" ]
[((29, 42), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (39, 42), False, 'import time\n'), ((140, 166), 'blynklib.Blynk', 'blynklib.Blynk', (['BLYNK_AUTH'], {}), '(BLYNK_AUTH)\n', (154, 166), False, 'import blynklib\n')]
#coding:utf-8 from caty.core.casm.cursor.base import * from caty.core.casm.cursor.dump import TreeDumper class TypeVarApplier(SchemaBuilder): def __init__(self, module): SchemaBuilder.__init__(self, module) self.type_args = None self.attr_args = OverlayedDict({}) self.scope_stack = ...
[ "caty.core.casm.cursor.dump.TreeDumper" ]
[((1296, 1312), 'caty.core.casm.cursor.dump.TreeDumper', 'TreeDumper', (['(True)'], {}), '(True)\n', (1306, 1312), False, 'from caty.core.casm.cursor.dump import TreeDumper\n'), ((564, 576), 'caty.core.casm.cursor.dump.TreeDumper', 'TreeDumper', ([], {}), '()\n', (574, 576), False, 'from caty.core.casm.cursor.dump impo...
import os.path as osp import logging import time import argparse from collections import OrderedDict import torch import numpy as np import options.options as option import utils.util as util from data.util import bgr2ycbcr from data import create_dataset, create_dataloader from models import create_model import matplo...
[ "utils.util.crop_border", "argparse.ArgumentParser", "models.create_model", "utils.util.mkdir", "os.path.join", "utils.util.calculate_psnr", "numpy.std", "utils.util.save_img", "numpy.max", "utils.util.setup_logger", "data.create_dataloader", "os.path.basename", "cv2.addWeighted", "numpy.m...
[((3130, 3155), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3153, 3155), False, 'import argparse\n'), ((3310, 3338), 'options.options.dict_to_nonedict', 'option.dict_to_nonedict', (['opt'], {}), '(opt)\n', (3333, 3338), True, 'import options.options as option\n'), ((3496, 3615), 'utils.util...
#!/usr/bin/env python """Translate the Last.fm data files to JSON. This script takes the various Last.fm data files and write them out as JSON. It removes the Last.fm artist URLs. Attributes: ARTISTS (dict): A dictionary that stores information about the artists. The variables are as follows: ...
[ "copy.deepcopy", "csv.reader", "argparse.ArgumentParser" ]
[((2711, 2748), 'csv.reader', 'csv.reader', (['open_file'], {'delimiter': '"""\t"""'}), "(open_file, delimiter='\\t')\n", (2721, 2748), False, 'import csv\n'), ((3301, 3318), 'copy.deepcopy', 'deepcopy', (['ARTISTS'], {}), '(ARTISTS)\n', (3309, 3318), False, 'from copy import deepcopy\n'), ((3859, 3876), 'copy.deepcopy...
''' 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 use this ...
[ "mock.mock.MagicMock", "mock.mock.patch.object", "resource_management.core.Environment", "mock.mock.call", "resource_management.core.resources.Package" ]
[((1086, 1113), 'mock.mock.patch.object', 'patch.object', (['shell', '"""call"""'], {}), "(shell, 'call')\n", (1098, 1113), False, 'from mock.mock import patch, MagicMock, call\n'), ((1117, 1152), 'mock.mock.patch.object', 'patch.object', (['shell', '"""checked_call"""'], {}), "(shell, 'checked_call')\n", (1129, 1152),...
# -*- coding: utf-8 -*- """ Created on Tue Jan 31 11:47:22 2017 An example of using the cython version of the hillshade algorithm from LSDTopoTools/LSDRaster, compared to the pure python module in LSDMappingTools. (This test version dos on-the-fly-compilation to C and then a C-lib but you could bundle a compiled c-ob...
[ "LSDPlottingTools.LSDMap_GDALIO.ReadRasterArrayBlocks", "LSDPlottingTools.fast_hillshade.Hillshade", "LSDPlottingTools.LSDMap_GDALIO.GetGeoInfo", "LSDPlottingTools.LSDMap_GDALIO.getNoDataValue", "pyximport.install" ]
[((696, 715), 'pyximport.install', 'pyximport.install', ([], {}), '()\n', (713, 715), False, 'import pyximport\n'), ((1008, 1073), 'LSDPlottingTools.LSDMap_GDALIO.ReadRasterArrayBlocks', 'LSDMap_IO.ReadRasterArrayBlocks', (['(Directory + BackgroundRasterName)'], {}), '(Directory + BackgroundRasterName)\n', (1039, 1073)...
""" Copyright (c) 2018 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ "numpy.array" ]
[((1451, 1473), 'numpy.array', 'np.array', (['output_shape'], {}), '(output_shape)\n', (1459, 1473), True, 'import numpy as np\n'), ((2334, 2356), 'numpy.array', 'np.array', (['output_shape'], {}), '(output_shape)\n', (2342, 2356), True, 'import numpy as np\n'), ((1037, 1063), 'numpy.array', 'np.array', (['block_size.s...
# Generated by Django 3.2 on 2021-11-17 23:57 from django.db import migrations, models import django.db.models.deletion import news.models class Migration(migrations.Migration): dependencies = [ ('events', '0011_auto_20211117_2214'), ('news', '0006_auto_20211117_2219'), ] operations = [...
[ "django.db.models.BigAutoField", "django.db.models.ManyToManyField", "django.db.models.FileField", "django.db.models.ForeignKey" ]
[((432, 524), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'blank': '(True)', 'help_text': '"""Show logos/links"""', 'to': '"""events.Supporter"""'}), "(blank=True, help_text='Show logos/links', to=\n 'events.Supporter')\n", (454, 524), False, 'from django.db import migrations, models\n'), ((6...
# 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 t...
[ "tools.testing.cross_language.util.keyset_builder.from_keyset_handle", "absl.testing.absltest.main", "tink.aead.register", "tink.new_keyset_handle", "tink.proto.tink_pb2.KeyTemplate", "tools.testing.cross_language.util.keyset_builder.new_keyset_handle", "tools.testing.cross_language.util.keyset_builder....
[((844, 859), 'tink.aead.register', 'aead.register', ([], {}), '()\n', (857, 859), False, 'from tink import aead\n'), ((5527, 5542), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (5540, 5542), False, 'from absl.testing import absltest\n'), ((963, 1031), 'tools.testing.cross_language.util.keyset_build...
from datetime import datetime from typing import ForwardRef, List from sqlalchemy import Column, String, DateTime, BigInteger, Integer, ForeignKey from sqlalchemy.orm import relationship from app.comments.models import Comment from app.db import Base, ModelMixin Category = ForwardRef('Category') User = ForwardRef('U...
[ "typing.ForwardRef", "sqlalchemy.ForeignKey", "sqlalchemy.orm.relationship", "sqlalchemy.Column", "sqlalchemy.String" ]
[((277, 299), 'typing.ForwardRef', 'ForwardRef', (['"""Category"""'], {}), "('Category')\n", (287, 299), False, 'from typing import ForwardRef, List\n'), ((307, 325), 'typing.ForwardRef', 'ForwardRef', (['"""User"""'], {}), "('User')\n", (317, 325), False, 'from typing import ForwardRef, List\n'), ((337, 356), 'typing....
from Bio import Entrez def search(query, topK): Entrez.email = '<EMAIL>' handle = Entrez.esearch(db='pubmed', sort='relevance', retmax=str(topK), retmode='xml', term=query) results = Entrez.re...
[ "Bio.Entrez.read", "Bio.Entrez.efetch" ]
[((311, 330), 'Bio.Entrez.read', 'Entrez.read', (['handle'], {}), '(handle)\n', (322, 330), False, 'from Bio import Entrez\n'), ((449, 498), 'Bio.Entrez.efetch', 'Entrez.efetch', ([], {'db': '"""pubmed"""', 'retmode': '"""xml"""', 'id': 'ids'}), "(db='pubmed', retmode='xml', id=ids)\n", (462, 498), False, 'from Bio imp...
import matplotlib.pyplot as plt import numpy as np import pandas as pd from wordcloud import WordCloud, STOPWORDS # Lists, dicts, and sorting l = [3, 5, 6, 1, -6] d = {'a': 9, 'b': 2, 'c': 5, 'd': 3} sl = sorted(l) sorted(d) sorted(d.values()) sorted(d.items()) print(l[:2]) # Capturing standard output # Call this pr...
[ "pandas.DataFrame", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylim", "matplotlib.pyplot.clf", "pandas.read_csv", "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "wordcloud.WordCloud", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure", "matplotlib.pyplot....
[((760, 782), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""Integers"""'], {}), "('Integers')\n", (770, 782), True, 'import matplotlib.pyplot as plt\n'), ((783, 801), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""f(x)"""'], {}), "('f(x)')\n", (793, 801), True, 'import matplotlib.pyplot as plt\n'), ((836, 853), 'mat...
# -*- coding: utf-8 -*- '''The app module, containing the app factory function.''' from flask import Flask from application.settings import ProdConfig from application.extensions import ( cache, db, migrate, api_scaffold, auth, cors, commit_handlers, mail, pushrod, asset_locator...
[ "application.extensions.api_scaffold.init_app", "application.extensions.db.init_app", "flask.Flask", "application.extensions.cors.init_app", "application.extensions.cache.init_app", "application.extensions.pushrod.init_app", "application.extensions.mail.init_app", "application.extensions.asset_locator...
[((622, 637), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (627, 637), False, 'from flask import Flask\n'), ((788, 807), 'application.extensions.cache.init_app', 'cache.init_app', (['app'], {}), '(app)\n', (802, 807), False, 'from application.extensions import cache, db, migrate, api_scaffold, auth, cors...
import datetime from flvlib3.helpers import * class TestUTCTimezone: utc = UTC() now = datetime.datetime.now() def test_utcoffset(self): assert self.utc.utcoffset(self.now) == datetime.timedelta(0) def test_tzname(self): assert self.utc.tzname(self.now) == 'UTC' def test_dst(s...
[ "datetime.datetime.now", "datetime.timedelta" ]
[((99, 122), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (120, 122), False, 'import datetime\n'), ((201, 222), 'datetime.timedelta', 'datetime.timedelta', (['(0)'], {}), '(0)\n', (219, 222), False, 'import datetime\n'), ((367, 388), 'datetime.timedelta', 'datetime.timedelta', (['(0)'], {}), '(0)...
import random from typing import Dict, Any from mage.graph_coloring_module.graph import Graph from mage.graph_coloring_module.components.individual import Individual from mage.graph_coloring_module.algorithms.algorithm import Algorithm from mage.graph_coloring_module.utils.parameters_utils import param_value from mage....
[ "random.randint", "mage.graph_coloring_module.utils.parameters_utils.param_value", "random.choice", "mage.graph_coloring_module.utils.validation.validate", "mage.graph_coloring_module.utils.available_colors.available_colors", "mage.graph_coloring_module.components.individual.Individual" ]
[((933, 965), 'mage.graph_coloring_module.utils.validation.validate', 'validate', (['Parameter.NO_OF_COLORS'], {}), '(Parameter.NO_OF_COLORS)\n', (941, 965), False, 'from mage.graph_coloring_module.utils.validation import validate\n'), ((1158, 1212), 'mage.graph_coloring_module.utils.parameters_utils.param_value', 'par...
# -*- coding: utf-8 -*- import gurobipy import torch import numpy as np import queue import collections import neural_network_lyapunov.relu_to_optimization as relu_to_optimization import neural_network_lyapunov.gurobi_torch_mip as gurobi_torch_mip import neural_network_lyapunov.utils as utils import neural_network_ly...
[ "torch.eye", "neural_network_lyapunov.relu_to_optimization.set_activation_warmstart", "torch.autograd.grad", "neural_network_lyapunov.utils.replace_binary_continuous_product", "torch.empty", "torch.cat", "torch.ones", "torch.sign", "torch.zeros", "neural_network_lyapunov.lyapunov._get_R", "torch...
[((3374, 3433), 'neural_network_lyapunov.lyapunov._get_R', 'lyapunov._get_R', (['R', 'self.system.x_dim', 'x_equilibrium.device'], {}), '(R, self.system.x_dim, x_equilibrium.device)\n', (3389, 3433), True, 'import neural_network_lyapunov.lyapunov as lyapunov\n'), ((3449, 3500), 'neural_network_lyapunov.gurobi_torch_mip...
import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.ObjMonitor_cfi import hltobjmonitoring # HLT_ HMesonGammamonitoring = hltobjmonitoring.clone() #HMesonGammamonitoring.FolderName = cms.string('HLT/Higgs/HMesonGamma/') HMesonGammamonitoring.FolderName = cms.string('HLT/HIG/HMesonGamma/') HMesonGammamoni...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.Sequence", "FWCore.ParameterSet.Config.vstring", "FWCore.ParameterSet.Config.int32", "FWCore.ParameterSet.Config.bool", "FWCore.ParameterSet.Config.InputTag", "DQMOffline.Trigger.ObjMonitor_cfi.hltobjmonitoring.clone" ]
[((137, 161), 'DQMOffline.Trigger.ObjMonitor_cfi.hltobjmonitoring.clone', 'hltobjmonitoring.clone', ([], {}), '()\n', (159, 161), False, 'from DQMOffline.Trigger.ObjMonitor_cfi import hltobjmonitoring\n'), ((270, 304), 'FWCore.ParameterSet.Config.string', 'cms.string', (['"""HLT/HIG/HMesonGamma/"""'], {}), "('HLT/HIG/H...
#! /usr/bin/python """This script runs the 'Comprehend' portion of the lambda function. It processes transcript.json files in transcribe.rightcall s3 bucket into comprehend.rightcall bucket and stores results in comprehend.rightcall s3 bucket. Without having to actually re-run the transcribe job which take...
[ "sys.path.append", "logging.basicConfig", "boto3.client", "lambda_functions.rightcall.lambda_function.Comprehend", "logging.getLogger" ]
[((414, 436), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (429, 436), False, 'import sys\n'), ((504, 525), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (523, 525), False, 'import logging\n'), ((535, 571), 'logging.getLogger', 'logging.getLogger', (['"""Comprehend_Only"""']...
from easydict import EasyDict conv1d_config = dict( feature_embedding=dict( player=dict( input_dim=36, output_dim=64, ), ball=dict( input_dim=18, output_dim=64, ), left_team=dict( input_dim=7, output_dim...
[ "easydict.EasyDict" ]
[((991, 1014), 'easydict.EasyDict', 'EasyDict', (['conv1d_config'], {}), '(conv1d_config)\n', (999, 1014), False, 'from easydict import EasyDict\n')]
#Ex018 Faça um programa que leia um ângulo qualquer e mostre na tela o valor do seno, cosseno e tangente desse ângulo. from math import sin, radians, cos, tan a = float(input('Digite o ângulo que você deseja: ')) seno = sin(radians(a)) cos = cos(radians(a)) tan = tan(radians(a)) print(f'O angulo {a} tem o SENO de {sen...
[ "math.radians" ]
[((225, 235), 'math.radians', 'radians', (['a'], {}), '(a)\n', (232, 235), False, 'from math import sin, radians, cos, tan\n'), ((247, 257), 'math.radians', 'radians', (['a'], {}), '(a)\n', (254, 257), False, 'from math import sin, radians, cos, tan\n'), ((269, 279), 'math.radians', 'radians', (['a'], {}), '(a)\n', (27...
import os import subprocess import sys import tempfile from pathlib import Path from shutil import rmtree from typing import Union import ruamel.yaml from fabric.connection import Connection from ..extract import BoardInfoExtractor, ClockInfoExtractor from ..model import ( ByteSize, ExpressionInt, HexInt,...
[ "os.unlink", "pathlib.Path", "tempfile.mkdtemp", "shutil.rmtree", "pathlib.Path.cwd", "sys.exit" ]
[((3075, 3092), 'pathlib.Path', 'Path', (['base_folder'], {}), '(base_folder)\n', (3079, 3092), False, 'from pathlib import Path\n'), ((5040, 5082), 'os.unlink', 'os.unlink', (['f"""{base_folder}/extract.tar.gz"""'], {}), "(f'{base_folder}/extract.tar.gz')\n", (5049, 5082), False, 'import os\n'), ((1210, 1222), 'sys.ex...
# Copyright 2021 Adobe # All Rights Reserved. # NOTICE: Adobe permits you to use, modify, and distribute this file in # accordance with the terms of the Adobe license agreement accompanying # it. ''' >> python -m unittest unit_test.TestSingle_operator ''' from skimage import io import time import beacon_aug as BA # ...
[ "unittest.main", "beacon_aug.Rotate", "numpy.array_equal", "skimage.io.imread" ]
[((1719, 1734), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1732, 1734), False, 'import unittest\n'), ((838, 870), 'skimage.io.imread', 'io.imread', (['"""../data/example.png"""'], {}), "('../data/example.png')\n", (847, 870), False, 'from skimage import io\n'), ((1014, 1025), 'beacon_aug.Rotate', 'BA.Rotate',...
import os path = input("Indiquez le chemin du dossier: ") for file in os.listdir(path): os.rename(path + "/" + file, path + "/" + file[0:5] + ".jpg")
[ "os.rename", "os.listdir" ]
[((71, 87), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (81, 87), False, 'import os\n'), ((90, 151), 'os.rename', 'os.rename', (["(path + '/' + file)", "(path + '/' + file[0:5] + '.jpg')"], {}), "(path + '/' + file, path + '/' + file[0:5] + '.jpg')\n", (99, 151), False, 'import os\n')]
""" Copyright 2017 Neural Networks and Deep Learning lab, MIPT Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
[ "numpy.zeros", "deeppavlov.core.common.registry.register" ]
[((723, 739), 'deeppavlov.core.common.registry.register', 'register', (['"""mask"""'], {}), "('mask')\n", (731, 739), False, 'from deeppavlov.core.common.registry import register\n'), ((1070, 1119), 'numpy.zeros', 'np.zeros', (['[batch_size, max_len]'], {'dtype': 'np.float32'}), '([batch_size, max_len], dtype=np.float3...
#importing import pandas as pd import os import numpy as np import seaborn as sns import matplotlib.pyplot as plt import argparse import csv ## parsing arguments parser = argparse.ArgumentParser() parser.add_argument("-n", "--nbins", type=int, help="The number of bins to divide each gene into") parser.add_argument("-i...
[ "matplotlib.pyplot.title", "os.mkdir", "argparse.ArgumentParser", "pandas.read_csv", "matplotlib.pyplot.style.use", "matplotlib.pyplot.figure", "numpy.histogram", "os.path.join", "numpy.unique", "csv.DictWriter", "numpy.std", "matplotlib.pyplot.close", "matplotlib.pyplot.semilogy", "matplo...
[((172, 197), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (195, 197), False, 'import argparse\n'), ((5090, 5120), 'os.path.join', 'os.path.join', (['OUT_DIR', 'TMP_DIR'], {}), '(OUT_DIR, TMP_DIR)\n', (5102, 5120), False, 'import os\n'), ((6074, 6105), 'numpy.average', 'np.average', (['total_...
#! /usr/bin/python2 from __future__ import print_function import collections import glob import os import pylint.lint import pylint.reporters import pylint.reporters.ureports.nodes import tcfl.tc @tcfl.tc.tags(report_always = True) class _run(tcfl.tc.tc_c, pylint.reporters.BaseReporter): # pylint: disable = too-...
[ "os.path.abspath", "os.path.dirname", "collections.defaultdict", "os.environ.get", "glob.glob", "os.path.join" ]
[((1427, 1455), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (1450, 1455), False, 'import collections\n'), ((1476, 1504), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (1499, 1504), False, 'import collections\n'), ((1532, 1560), 'collections.defaultdi...
# Copyright (c) Nanjing University, Vision Lab. # Last update: 2019.09.17 import numpy as np import h5py import os import glob import random from dataprocess.inout_points import load_points def generate_dataset(INPUT_DIR, OUTPUT_DIR, DATA_NUM, cube_size=64): # read file plydirs = glob.glob(INPUT_DIR + '*.ply'...
[ "h5py.File", "os.makedirs", "dataprocess.inout_points.load_points", "random.shuffle", "os.path.exists", "glob.glob" ]
[((291, 321), 'glob.glob', 'glob.glob', (["(INPUT_DIR + '*.ply')"], {}), "(INPUT_DIR + '*.ply')\n", (300, 321), False, 'import glob\n'), ((326, 349), 'random.shuffle', 'random.shuffle', (['plydirs'], {}), '(plydirs)\n', (340, 349), False, 'import random\n'), ((354, 377), 'random.shuffle', 'random.shuffle', (['plydirs']...
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # or in the "license" file ...
[ "athena_glue_service_logs.partitioners.grouped_date_partitioner.GroupedDatePartitioner" ]
[((1065, 1139), 'athena_glue_service_logs.partitioners.grouped_date_partitioner.GroupedDatePartitioner', 'GroupedDatePartitioner', ([], {'s3_location': 'self.s3_location', 'hive_compatible': '(True)'}), '(s3_location=self.s3_location, hive_compatible=True)\n', (1087, 1139), False, 'from athena_glue_service_logs.partiti...
from precise.skatertools.data.skaterresiduals import random_multivariate_residual, random_noncollinear_residual from precise.skatervaluation.battledata.sourceconventions import verify_source_outputs import numpy as np DEFAULT_TM_PARAMS = {'n_dim': 25, 'n_obs': 356, 'n_burn'...
[ "precise.skatertools.data.skaterresiduals.random_multivariate_residual", "precise.skatervaluation.battledata.sourceconventions.verify_source_outputs", "precise.skatertools.data.skaterresiduals.random_noncollinear_residual" ]
[((1295, 1349), 'precise.skatervaluation.battledata.sourceconventions.verify_source_outputs', 'verify_source_outputs', (['(combined_params, category, xs)'], {}), '((combined_params, category, xs))\n', (1316, 1349), False, 'from precise.skatervaluation.battledata.sourceconventions import verify_source_outputs\n'), ((108...
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'aboutdialog.ui' ## ## Created by: Qt User Interface Compiler version 6.2.3 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! #######...
[ "PySide6.QtCore.QCoreApplication.translate", "PySide6.QtCore.QMetaObject.connectSlotsByName", "PySide6.QtWidgets.QTabWidget", "PySide6.QtWidgets.QTextBrowser", "PySide6.QtWidgets.QVBoxLayout", "PySide6.QtWidgets.QWidget", "PySide6.QtWidgets.QLabel", "PySide6.QtWidgets.QDialogButtonBox" ]
[((1169, 1193), 'PySide6.QtWidgets.QVBoxLayout', 'QVBoxLayout', (['AboutDialog'], {}), '(AboutDialog)\n', (1180, 1193), False, 'from PySide6.QtWidgets import QAbstractButton, QApplication, QDialog, QDialogButtonBox, QLabel, QSizePolicy, QTabWidget, QTextBrowser, QVBoxLayout, QWidget\n'), ((1282, 1305), 'PySide6.QtWidge...
""" This script will create the prototype application. """ from abaqusGui import * import sys from prototypeMainWindow import PrototypeMainWindow # Initialize the application object. # app = AFXApp('ABAQUS/CAE', 'ABAQUS, Inc.') app.init(sys.argv) # Construct the main window. # PrototypeMainWindow(app) # Create the ...
[ "prototypeMainWindow.PrototypeMainWindow" ]
[((281, 305), 'prototypeMainWindow.PrototypeMainWindow', 'PrototypeMainWindow', (['app'], {}), '(app)\n', (300, 305), False, 'from prototypeMainWindow import PrototypeMainWindow\n')]
import unittest from groupy.api import attachments class TestAttachmentsFromData(unittest.TestCase): def test_known_attachment_type(self): data = {'type': 'split', 'token': 'foo'} attachment = attachments.Attachment.from_data(**data) self.assertIsInstance(attachment, attachments.Split) ...
[ "groupy.api.attachments.Attachment.from_data" ]
[((216, 256), 'groupy.api.attachments.Attachment.from_data', 'attachments.Attachment.from_data', ([], {}), '(**data)\n', (248, 256), False, 'from groupy.api import attachments\n'), ((429, 469), 'groupy.api.attachments.Attachment.from_data', 'attachments.Attachment.from_data', ([], {}), '(**data)\n', (461, 469), False, ...
import os from Jumpscale import j JSConfigClient = j.baseclasses.object_config class CorexServer(JSConfigClient): _SCHEMATEXT = """ @url = jumpscale.servers.corex.1 name** = "default" (S) port = 1500 (I) user = "" (S) password = "" (S) chroot = f...
[ "Jumpscale.j.clients.corex.get", "Jumpscale.j.servers.startupcmd.get", "Jumpscale.j.core.tools.cmd_installed", "Jumpscale.j.exceptions.Base" ]
[((821, 851), 'Jumpscale.j.clients.corex.get', 'j.clients.corex.get', (['"""default"""'], {}), "('default')\n", (840, 851), False, 'from Jumpscale import j\n'), ((608, 643), 'Jumpscale.j.core.tools.cmd_installed', 'j.core.tools.cmd_installed', (['"""corex"""'], {}), "('corex')\n", (634, 643), False, 'from Jumpscale imp...
# Generated by Django 2.2.4 on 2019-08-28 16:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user_auth', '0003_auto_20190828_1330'), ] operations = [ migrations.AddField( model_name='city', name='city_code', ...
[ "django.db.models.IntegerField" ]
[((337, 367), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (356, 367), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python import torch x = torch.rand(5,3) print("Randon 5 by 3 \"tensor\":") print(x) if torch.cuda.is_available(): print("\nCUDA is available.\n") else: print("\nCUDA is not available.\n")
[ "torch.cuda.is_available", "torch.rand" ]
[((41, 57), 'torch.rand', 'torch.rand', (['(5)', '(3)'], {}), '(5, 3)\n', (51, 57), False, 'import torch\n'), ((105, 130), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (128, 130), False, 'import torch\n')]
from unittest import TestCase from network_filters import BandwidthFilter, BandwidthHint, HostBandwidthService class MockBandwidthService(HostBandwidthService): bandwidths = [] was_called_with_host = None def get_bandwidth_from_host(self, host): self.was_called_with_host = host return se...
[ "network_filters.BandwidthHint", "network_filters.BandwidthFilter" ]
[((516, 550), 'network_filters.BandwidthFilter', 'BandwidthFilter', (['self.measurements'], {}), '(self.measurements)\n', (531, 550), False, 'from network_filters import BandwidthFilter, BandwidthHint, HostBandwidthService\n'), ((826, 855), 'network_filters.BandwidthHint', 'BandwidthHint', (['(1000)', '"""remote"""'], ...
from __future__ import division import yaml import os import argparse import numpy as np import logging from utils.std_capturing import * from model_pose.monodepth2_learner import MonoDepth2Learner os.environ["CUDA_VISIBLE_DEVICES"]="-1" def _cli_train(config, output_dir, args): with open(os.path.join(output_di...
[ "os.mkdir", "yaml.load", "argparse.ArgumentParser", "yaml.dump", "os.path.exists", "model_pose.monodepth2_learner.MonoDepth2Learner", "os.path.join" ]
[((430, 457), 'model_pose.monodepth2_learner.MonoDepth2Learner', 'MonoDepth2Learner', ([], {}), '(**config)\n', (447, 457), False, 'from model_pose.monodepth2_learner import MonoDepth2Learner\n'), ((609, 636), 'model_pose.monodepth2_learner.MonoDepth2Learner', 'MonoDepth2Learner', ([], {}), '(**config)\n', (626, 636), ...
#!/usr/bin/env python3.7 import argparse import grapheme # type: ignore import logging import sys from typing import Dict, List, Callable, Tuple, Set, Mapping, Iterable, Iterator import unicodedata """Extracts an alphabet of characters from a corpus. This file was developed as part of the Neural Polysynthetic Langu...
[ "grapheme.length", "argparse.ArgumentParser", "logging.debug", "unicodedata.category", "logging.info", "unicodedata.name" ]
[((2186, 2256), 'logging.info', 'logging.info', (['f"""Reading alphabet from input file {input_file.name}..."""'], {}), "(f'Reading alphabet from input file {input_file.name}...')\n", (2198, 2256), False, 'import logging\n'), ((5013, 5115), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""...
import json from profiler.domain.feature_metric import ( parse_metric, ) from typing import List, Dict, Any from profiler.ports.metrics_repository import MetricsRepository from profiler.domain.model import Model from profiler.db.sqlite_context_manager import SqliteContextManager class SqliteMetricsRepository(Met...
[ "profiler.db.sqlite_context_manager.SqliteContextManager", "json.loads", "json.dumps" ]
[((369, 391), 'profiler.db.sqlite_context_manager.SqliteContextManager', 'SqliteContextManager', ([], {}), '()\n', (389, 391), False, 'from profiler.db.sqlite_context_manager import SqliteContextManager\n'), ((518, 540), 'profiler.db.sqlite_context_manager.SqliteContextManager', 'SqliteContextManager', ([], {}), '()\n'...
# -*- coding: utf-8 -*- __author__ = '<NAME> <<EMAIL>>' from sqlalchemy import create_engine from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from flask.ext.sqlalchemy import SQLAlchemy from karsender import Config db = SQLAlchemy() engine = create_engine('mysql+pymysql://{user}:{p...
[ "flask.ext.sqlalchemy.SQLAlchemy", "sqlalchemy.ext.automap.automap_base", "sqlalchemy.orm.Session" ]
[((258, 270), 'flask.ext.sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (268, 270), False, 'from flask.ext.sqlalchemy import SQLAlchemy\n'), ((539, 553), 'sqlalchemy.ext.automap.automap_base', 'automap_base', ([], {}), '()\n', (551, 553), False, 'from sqlalchemy.ext.automap import automap_base\n'), ((722, 737)...
from __future__ import unicode_literals from decimal import Decimal from uuid import uuid4 from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.core.validators import MaxValueValidator, MinValueValidator from django.db...
[ "django.db.models.CharField", "django.db.models.DateTimeField", "django.db.models.TextField", "django.db.models.DecimalField" ]
[((690, 739), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default': 'now', 'editable': '(False)'}), '(default=now, editable=False)\n', (710, 739), False, 'from django.db import models\n'), ((757, 812), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'null': '(True)', ...
from .exceptions import UnknownResponseException, ResourceException, ResourceUnchangedException, UnauthorizedException, \ LoginRequiredException from bbdata.response import Response def handle_response(status_code, return_value): """ Takes care of the error handling of a BBData's API response Arg...
[ "bbdata.response.Response" ]
[((526, 548), 'bbdata.response.Response', 'Response', (['return_value'], {}), '(return_value)\n', (534, 548), False, 'from bbdata.response import Response\n')]
# -*- coding: utf-8 -*- """ This overrides the Category with the class loaded from the PUBLICATION_BACKBONE_BASE_CATEGORY_MODEL setting if it exists. """ from django.conf import settings from publication_backbone.utils.loader import load_class #=========================================================================...
[ "publication_backbone.utils.loader.load_class" ]
[((601, 676), 'publication_backbone.utils.loader.load_class', 'load_class', (['BASE_CATEGORY_MODEL', '"""PUBLICATION_BACKBONE_BASE_CATEGORY_MODEL"""'], {}), "(BASE_CATEGORY_MODEL, 'PUBLICATION_BACKBONE_BASE_CATEGORY_MODEL')\n", (611, 676), False, 'from publication_backbone.utils.loader import load_class\n')]
from pysmt.shortcuts import GE, GT, Symbol, FunctionType, REAL, INT, Equals, Ite from kipro2.characteristic_functional import CharacteristicFunctional from kipro2.utils.utils import * from kipro2.pysmt_extensions.euf_substituter import EUFMGSubstituter from kipro2.pysmt_extensions.simplifier import Simplifier import lo...
[ "pysmt.shortcuts.FunctionType", "logging.getLogger" ]
[((336, 363), 'logging.getLogger', 'logging.getLogger', (['"""kipro2"""'], {}), "('kipro2')\n", (353, 363), False, 'import logging\n'), ((1942, 1971), 'pysmt.shortcuts.FunctionType', 'FunctionType', (['*self._euf_type'], {}), '(*self._euf_type)\n', (1954, 1971), False, 'from pysmt.shortcuts import GE, GT, Symbol, Funct...
from datetime import datetime, timedelta import logging from homeassistant.const import CONF_EVENT, CONF_ID from homeassistant.helpers.event import async_track_time_interval from ..pyextalife import DEVICE_ARR_ALL_TRANSMITTER from .const import ( CONF_EXTALIFE_EVENT_BASE, CONF_EXTALIFE_EVENT_TRANSMITTER, ...
[ "datetime.datetime.now", "datetime.timedelta", "logging.getLogger" ]
[((795, 822), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (812, 822), False, 'import logging\n'), ((1868, 1882), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1880, 1882), False, 'from datetime import datetime, timedelta\n'), ((4290, 4317), 'datetime.timedelta', 'timedelt...
from flask_restful import Resource from flask_jwt_extended import jwt_required, get_jwt_identity from src.libs.strings import gettext class Dashboard(Resource): @classmethod @jwt_required(optional=True) def get(cls): user_id = get_jwt_identity() if user_id: return {'message': ...
[ "flask_jwt_extended.jwt_required", "flask_jwt_extended.get_jwt_identity", "src.libs.strings.gettext" ]
[((186, 213), 'flask_jwt_extended.jwt_required', 'jwt_required', ([], {'optional': '(True)'}), '(optional=True)\n', (198, 213), False, 'from flask_jwt_extended import jwt_required, get_jwt_identity\n'), ((250, 268), 'flask_jwt_extended.get_jwt_identity', 'get_jwt_identity', ([], {}), '()\n', (266, 268), False, 'from fl...
# Copyright (c) 2016 Noviflow # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, copy, # modify, merge, publish, distribu...
[ "ryu.controller.handler.set_ev_cls" ]
[((1868, 1931), 'ryu.controller.handler.set_ev_cls', 'set_ev_cls', (['ofp_event.EventOFPSwitchFeatures', 'CONFIG_DISPATCHER'], {}), '(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)\n', (1878, 1931), False, 'from ryu.controller.handler import set_ev_cls\n')]
import sys import numpy as np import torch import torch.nn as nn class Net(nn.Module): def __init__(self, state, event): super().__init__() self.event = event self.state = state self.fc = nn.Linear(1, 1) self.welford = self.event.Welford() self.state["net"] = self ...
[ "torch.set_printoptions", "numpy.prod", "sys.exit", "torch.nn.Linear" ]
[((772, 822), 'torch.set_printoptions', 'torch.set_printoptions', ([], {'precision': '(8)', 'linewidth': '(120)'}), '(precision=8, linewidth=120)\n', (794, 822), False, 'import torch\n'), ((985, 996), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (993, 996), False, 'import sys\n'), ((226, 241), 'torch.nn.Linear', 'nn...
import cv2 import rclpy from rclpy.node import Node from sensor_msgs.msg import Image from cv_bridge import CvBridge class VideoPublisher(Node): def __init__(self): super().__init__('video_publisher_node') self.declare_parameter('frame_rate', 15.0) self.declare_parameter('video_file', '/...
[ "cv_bridge.CvBridge", "rclpy.spin", "rclpy.init", "cv2.VideoCapture", "rclpy.shutdown", "cv2.resize" ]
[((2595, 2616), 'rclpy.init', 'rclpy.init', ([], {'args': 'args'}), '(args=args)\n', (2605, 2616), False, 'import rclpy\n'), ((2717, 2744), 'rclpy.spin', 'rclpy.spin', (['video_pub_class'], {}), '(video_pub_class)\n', (2727, 2744), False, 'import rclpy\n'), ((2784, 2800), 'rclpy.shutdown', 'rclpy.shutdown', ([], {}), '...
from django.urls import path from . import views urlpatterns = [ path('', views.lobby), path('room/', views.room), path('get_token/', views.getToken), path('create_member/', views.createMember), path('get_member/', views.getMember), path('delete_member/', views.deleteMember), ]
[ "django.urls.path" ]
[((76, 97), 'django.urls.path', 'path', (['""""""', 'views.lobby'], {}), "('', views.lobby)\n", (80, 97), False, 'from django.urls import path\n'), ((103, 128), 'django.urls.path', 'path', (['"""room/"""', 'views.room'], {}), "('room/', views.room)\n", (107, 128), False, 'from django.urls import path\n'), ((135, 169), ...
import sys def TotalDistance(dist_dict, i): return sum(dist_dict[i].values()) def ConstructNJMatrix(dist_dict): D_NJ = {} for key1, val1 in dist_dict.items(): for key2, val in dist_dict[key1].items(): if not key1 in D_NJ: D_NJ[key1] = {} if key1 == key2: ...
[ "sys.stdin.read" ]
[((2000, 2016), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (2014, 2016), False, 'import sys\n')]
# Liikuta kilpikonna esteiden ohi ##### INFO ##### import turtle import random # Alussa on koodia, joka alustaa esteradan. Skrollaa alas tehtäviin # Luodaan kilpikonna ja annetaan sille nopeus ja väri t = turtle.Turtle() t.speed("fastest") t.color("black") # Lasketaan piirtoalueen koko screen = turtle.Screen() levey...
[ "turtle.Screen", "random.randint", "turtle.Turtle" ]
[((207, 222), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (220, 222), False, 'import turtle\n'), ((299, 314), 'turtle.Screen', 'turtle.Screen', ([], {}), '()\n', (312, 314), False, 'import turtle\n'), ((743, 758), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (756, 758), False, 'import turtle\n'), ((849, ...
import cool_ast_hierarchy as ast import cil_hierarchy as cil import visitor from context import VariableInfo, MethodInfo from copy import copy class COOLToCILVisitor: def __init__(self, programnode:cil.CILProgramNode): self.programnode = programnode # La sección .TYPES del CIL self.dottyp...
[ "cil_hierarchy.CILPrintStrNode", "cil_hierarchy.CILGotoIfNode", "cil_hierarchy.CILGetAttribNode", "cil_hierarchy.CILSaveState", "cil_hierarchy.CILDynamicCallNode", "cil_hierarchy.CILSetAttribNode", "cil_hierarchy.CILGetIndexNode", "cil_hierarchy.CILLengthNode", "visitor.when", "cil_hierarchy.CILGo...
[((3716, 3734), 'visitor.on', 'visitor.on', (['"""node"""'], {}), "('node')\n", (3726, 3734), False, 'import visitor\n'), ((3781, 3810), 'visitor.when', 'visitor.when', (['ast.ProgramNode'], {}), '(ast.ProgramNode)\n', (3793, 3810), False, 'import visitor\n'), ((4171, 4198), 'visitor.when', 'visitor.when', (['ast.CoolC...
import tensorflow as tf from config import * from networks import vgg16, FormResNet from ops import sobel import os,csv from PIL import Image import numpy as np from skimage.measure import compare_psnr as psnr from skimage.measure import compare_ssim as ssim from skimage import util class Main: def __init__(self)...
[ "numpy.uint8", "networks.vgg16", "csv.writer", "tensorflow.train.Saver", "numpy.random.shuffle", "ops.sobel", "tensorflow.Session", "numpy.zeros", "numpy.clip", "PIL.Image.open", "tensorflow.placeholder", "networks.FormResNet", "tensorflow.square", "numpy.random.normal", "tensorflow.trai...
[((347, 400), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, None, None, IMG_C]'], {}), '(tf.float32, [None, None, None, IMG_C])\n', (361, 400), True, 'import tensorflow as tf\n'), ((427, 480), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, None, None, IMG_C]'], {}), '(tf.float...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime class GetSecretVersionResult(object): """ A collection of values returned by getSecretVers...
[ "pulumi.runtime.invoke" ]
[((1941, 2032), 'pulumi.runtime.invoke', 'pulumi.runtime.invoke', (['"""aws:secretsmanager/getSecretVersion:getSecretVersion"""', '__args__'], {}), "('aws:secretsmanager/getSecretVersion:getSecretVersion',\n __args__)\n", (1962, 2032), False, 'import pulumi\n')]
import pyodbc from infrastructor.Cryptography.CryptoService import CryptoService from infrastructor.data.ConnectionStrategy import ConnectionStrategy from infrastructor.data.DatabaseManager import DatabaseManager from infrastructor.data.MssqlConnector import MssqlDbConnector from infrastructor.logging.ConsoleLogger im...
[ "infrastructor.data.DatabaseManager.DatabaseManager", "infrastructor.data.MssqlConnector.MssqlDbConnector" ]
[((1428, 1478), 'infrastructor.data.MssqlConnector.MssqlDbConnector', 'MssqlDbConnector', (['server', 'database', 'user', 'password'], {}), '(server, database, user, password)\n', (1444, 1478), False, 'from infrastructor.data.MssqlConnector import MssqlDbConnector\n'), ((1528, 1565), 'infrastructor.data.DatabaseManager...
import logging from datagateway_api.src.common.config import Config from datagateway_api.src.datagateway_api.icat.filters import ( PythonICATIncludeFilter, PythonICATLimitFilter, PythonICATOrderFilter, PythonICATSkipFilter, ) if Config.config.search_api: from datagateway_api.src.search_api.filters...
[ "datagateway_api.src.datagateway_api.icat.filters.PythonICATIncludeFilter", "datagateway_api.src.search_api.panosc_mappings.mappings.get_icat_relations_for_panosc_non_related_fields", "datagateway_api.src.search_api.panosc_mappings.mappings.get_icat_relations_for_non_related_fields_of_panosc_relation", "loggi...
[((499, 518), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (516, 518), False, 'import logging\n'), ((4951, 5028), 'datagateway_api.src.search_api.panosc_mappings.mappings.get_icat_relations_for_panosc_non_related_fields', 'mappings.get_icat_relations_for_panosc_non_related_fields', (['panosc_entity_name'...
""" This module provides the core object-oriented framework for generating synthetic data sets with clusters. The classes contained here are mainly abstract superclasses. They require subclasses to concretely implement much of the specified functionality. CLASSES AND METHODS ClusterData : top-level object for gen...
[ "numpy.random.seed", "scipy.spatial.distance.mahalanobis", "numpy.mean", "numpy.random.randint", "numpy.arange", "numpy.random.normal", "matplotlib.pyplot.gca", "numpy.sin", "numpy.full", "numpy.std", "numpy.savetxt", "numpy.transpose", "numpy.max", "scipy.stats.ortho_group.rvs", "numpy....
[((11365, 11385), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (11379, 11385), True, 'import numpy as np\n'), ((14294, 14341), 'scipy.stats.ortho_group.rvs', 'stats.ortho_group.rvs', (['n_dim'], {'random_state': 'seed'}), '(n_dim, random_state=seed)\n', (14315, 14341), True, 'import scipy.stats as...
"""The main entry point for all ec2 operations.""" import argparse import sys from typing import Any, List from fzfaws.ec2.ls_instance import ls_instance from fzfaws.ec2.reboot_instance import reboot_instance from fzfaws.ec2.ssh_instance import ssh_instance from fzfaws.ec2.start_instance import start_instance from fzf...
[ "argparse.ArgumentParser", "fzfaws.ec2.ls_instance.ls_instance", "fzfaws.ec2.ssh_instance.ssh_instance", "fzfaws.ec2.terminate_instance.terminate_instance", "fzfaws.utils.pyfzf.Pyfzf", "fzfaws.ec2.stop_instance.stop_instance", "fzfaws.ec2.start_instance.start_instance", "fzfaws.ec2.reboot_instance.reb...
[((1009, 1117), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Perform operations and interact with aws EC2."""', 'prog': '"""fzfaws ec2"""'}), "(description=\n 'Perform operations and interact with aws EC2.', prog='fzfaws ec2')\n", (1032, 1117), False, 'import argparse\n'), ((8796, 8...
import pytest import repo.main def test_help_cmd(capfd): with pytest.raises(SystemExit): repo.main._Main(["--help"]) out, err = capfd.readouterr() assert "Usage: repo" in out assert err == ""
[ "pytest.raises" ]
[((66, 91), 'pytest.raises', 'pytest.raises', (['SystemExit'], {}), '(SystemExit)\n', (79, 91), False, 'import pytest\n')]
#!/usr/bin/python2 import cv2 from urllib2 import Request, urlopen import base64 import json import camera import objectpath encoded_string = base64.b64encode(open("Gallery/test.jpg", 'r').read()) payload_dict = { "image":encoded_string, "gallery_name": "MyGallery" } payload = json.dumps(payload_dict) headers...
[ "urllib2.Request", "urllib2.urlopen", "json.dumps" ]
[((287, 311), 'json.dumps', 'json.dumps', (['payload_dict'], {}), '(payload_dict)\n', (297, 311), False, 'import json\n'), ((448, 522), 'urllib2.Request', 'Request', (['"""https://api.kairos.com/recognize"""'], {'data': 'payload', 'headers': 'headers'}), "('https://api.kairos.com/recognize', data=payload, headers=heade...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ "oci.util.formatted_flat_dict" ]
[((5629, 5654), 'oci.util.formatted_flat_dict', 'formatted_flat_dict', (['self'], {}), '(self)\n', (5648, 5654), False, 'from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel\n')]
# coding=utf-8 import datetime from pocounit.result.emitter import PocoTestResultEmitter class MetaInfo(PocoTestResultEmitter): TAG = 'MetaInfo' def __init__(self, collector): super(MetaInfo, self).__init__(collector) def test_started(self, name): self.emit(self.TAG, { 'typ...
[ "datetime.datetime.now" ]
[((423, 446), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (444, 446), False, 'import datetime\n'), ((654, 677), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (675, 677), False, 'import datetime\n')]
import os from tqdm import tqdm from datetime import datetime import pandas as pd import numpy as np from scipy.io import wavfile import tensorflow as tf from tensorflow.keras.layers import Conv2D, MaxPool2D, Flatten from tensorflow.keras.layers import LSTM, TimeDistributed from tensorflow.keras.layers import Dropout, ...
[ "numpy.argmax", "pandas.read_csv", "sklearn.model_selection.train_test_split", "tensorflow.keras.layers.Dense", "datetime.datetime.datetime.now", "tensorflow.keras.callbacks.ModelCheckpoint", "scipy.io.wavfile.read", "tensorflow.keras.layers.MaxPool2D", "tensorflow.keras.models.Sequential", "numpy...
[((2472, 2491), 'cfg.Config', 'Config', ([], {'mode': '"""conv"""'}), "(mode='conv')\n", (2478, 2491), False, 'from cfg import Config\n'), ((2502, 2561), 'pandas.read_csv', 'pd.read_csv', (['"""data/train/roadsound_labels.csv"""'], {'index_col': '(0)'}), "('data/train/roadsound_labels.csv', index_col=0)\n", (2513, 2561...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "InnerEye.ML.reports.notebook_report.print_header", "pandas.option_context", "pandas.pivot_table", "pandas.read_csv", "matplotlib.pyplot.boxplot", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib....
[((887, 908), 'pandas.read_csv', 'pd.read_csv', (['path_csv'], {}), '(path_csv)\n', (898, 908), True, 'import pandas as pd\n'), ((1732, 1766), 'InnerEye.ML.reports.notebook_report.print_header', 'print_header', (['metric_name'], {'level': '(2)'}), '(metric_name, level=2)\n', (1744, 1766), False, 'from InnerEye.ML.repor...
import esri2gpd import geopandas as gpd from . import EPSG from .core import * from .regions import * __all__ = ["StreetDefectRepairRating", "LitterIndex", "PavedMiles"] class StreetDefectRepairRating(Dataset): """ Street Defect Repair Rating Notes ----- Rates streets from 0 to 100 based on the...
[ "esri2gpd.get" ]
[((931, 948), 'esri2gpd.get', 'esri2gpd.get', (['url'], {}), '(url)\n', (943, 948), False, 'import esri2gpd\n'), ((1584, 1601), 'esri2gpd.get', 'esri2gpd.get', (['url'], {}), '(url)\n', (1596, 1601), False, 'import esri2gpd\n')]
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '.')) import hashlib import binascii from florijncoin_utils import * def double_sha256(data): return hashlib.sha256(hashlib.sha256(data).digest()).digest() def Hash160(msg): return hashlib.new('ripemd160', hashlib.sha256(msg).dig...
[ "hashlib.sha256", "os.path.dirname" ]
[((50, 75), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (65, 75), False, 'import os\n'), ((473, 500), 'hashlib.sha256', 'hashlib.sha256', (['binary_data'], {}), '(binary_data)\n', (487, 500), False, 'import hashlib\n'), ((201, 221), 'hashlib.sha256', 'hashlib.sha256', (['data'], {}), '(dat...
from common import * # NOQA import json @pytest.mark.nonparallel def test_ha_config(admin_user_client): ha_config = find_one(admin_user_client.list_ha_config) admin_user_client.update(ha_config, enabled=False) ha_config = find_one(admin_user_client.list_ha_config) assert not ha_config.enabled a...
[ "json.dumps" ]
[((893, 1223), 'json.dumps', 'json.dumps', (["{'clusterSize': 5, 'httpPort': 1234, 'httpsPort': 1235, 'redisPort': 6375,\n 'zookeeperQuorumPort': 6375, 'zookeeperLeaderPort': 6375,\n 'zookeeperClientPort': 6375, 'cert': 'cert', 'certChain': 'certChain',\n 'key': 'key', 'hostRegistrationUrl': 'https://....', 's...
from typing import Optional, List, Type from scrapy import signals, Spider from scrapy.crawler import CrawlerProcess from scrapy.signalmanager import dispatcher from proxy_parse.proxy.abc import ABCProxyParser from proxy_parse.spiders import ( FreeProxyListSpider, BlogSpotSpider, ProxySearcherSpider, ...
[ "scrapy.signalmanager.dispatcher.connect", "scrapy.crawler.CrawlerProcess" ]
[((2380, 2450), 'scrapy.signalmanager.dispatcher.connect', 'dispatcher.connect', (['self._crawler_results'], {'signal': 'signals.item_scraped'}), '(self._crawler_results, signal=signals.item_scraped)\n', (2398, 2450), False, 'from scrapy.signalmanager import dispatcher\n'), ((2469, 2507), 'scrapy.crawler.CrawlerProcess...
# Py3 compatibility from __future__ import print_function from __future__ import unicode_literals import hashlib import shutil import os import sys import subprocess import signal import contextlib from tempfile import NamedTemporaryFile from passlib.apache import HtpasswdFile import termcolor import pipes def red(t...
[ "os.listdir", "tempfile.NamedTemporaryFile", "subprocess.Popen", "hashlib.md5", "os.remove", "passlib.apache.HtpasswdFile", "shutil.copy2", "os.path.dirname", "termcolor.colored", "os.environ.get", "os.kill", "os.path.isfile", "subprocess.call", "os.path.normpath", "os.path.join", "os....
[((337, 367), 'termcolor.colored', 'termcolor.colored', (['text', '"""red"""'], {}), "(text, 'red')\n", (354, 367), False, 'import termcolor\n'), ((398, 430), 'termcolor.colored', 'termcolor.colored', (['text', '"""green"""'], {}), "(text, 'green')\n", (415, 430), False, 'import termcolor\n'), ((462, 495), 'termcolor.c...
from asyncio import get_event_loop from concurrent.futures import as_completed, ThreadPoolExecutor from pprint import pprint from sys import argv from requests import request max_workers = int(argv[1]) iterations = int(argv[2]) def worker(number): try: response = request("GET", "https://bitbucket.org", ...
[ "asyncio.get_event_loop", "pprint.pprint", "concurrent.futures.ThreadPoolExecutor", "requests.request", "concurrent.futures.as_completed" ]
[((1030, 1046), 'asyncio.get_event_loop', 'get_event_loop', ([], {}), '()\n', (1044, 1046), False, 'from asyncio import get_event_loop\n'), ((280, 330), 'requests.request', 'request', (['"""GET"""', '"""https://bitbucket.org"""'], {'timeout': '(5)'}), "('GET', 'https://bitbucket.org', timeout=5)\n", (287, 330), False, ...