code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python # vim:set et sw=4 ts=4 foldmethod=manual foldlevel=99: # ===============================================================================# # MIT License # # ...
[ "mpvcontrol.MPVControl", "curses.wrapper", "curses.start_color", "curses.init_pair", "curses.initscr", "curses.echo" ]
[((2810, 2830), 'curses.start_color', 'curses.start_color', ([], {}), '()\n', (2828, 2830), False, 'import curses\n'), ((2835, 2893), 'curses.init_pair', 'curses.init_pair', (['(1)', 'curses.COLOR_CYAN', 'curses.COLOR_BLACK'], {}), '(1, curses.COLOR_CYAN, curses.COLOR_BLACK)\n', (2851, 2893), False, 'import curses\n'),...
import numpy.testing as npt from cvdm.score import hkdr_chd, HkdrCHD from cvdm.score import hkdr_hf, HkdrHF def test_hkdr_chd(): tmp = hkdr_chd(59, True, False, 5, 105, 2.3, 3.87) npt.assert_almost_equal(tmp, 0.082, decimal=3) def test_hkdr_chd_json(): chd = HkdrCHD() tmp = chd.score({"index_age": ...
[ "cvdm.score.hkdr_hf", "cvdm.score.hkdr_chd", "cvdm.score.HkdrHF", "numpy.testing.assert_almost_equal", "cvdm.score.HkdrCHD" ]
[((142, 186), 'cvdm.score.hkdr_chd', 'hkdr_chd', (['(59)', '(True)', '(False)', '(5)', '(105)', '(2.3)', '(3.87)'], {}), '(59, True, False, 5, 105, 2.3, 3.87)\n', (150, 186), False, 'from cvdm.score import hkdr_chd, HkdrCHD\n'), ((191, 237), 'numpy.testing.assert_almost_equal', 'npt.assert_almost_equal', (['tmp', '(0.0...
import numpy as np import pandas as pd from sklearn.decomposition import PCA from numpy.linalg import norm import matplotlib.pyplot as plt from sklearn import preprocessing import seaborn as sns; sns.set_theme() seed = 0 np.random.seed(seed) """We test without normalization""" def normalize(data, shift = 'z-score'):...
[ "seaborn.set", "sklearn.preprocessing.LabelEncoder", "matplotlib.pyplot.savefig", "numpy.median", "pandas.read_csv", "matplotlib.pyplot.xticks", "seaborn.set_theme", "sklearn.decomposition.PCA", "matplotlib.pyplot.style.use", "numpy.argsort", "matplotlib.pyplot.yticks", "numpy.random.seed", ...
[((196, 211), 'seaborn.set_theme', 'sns.set_theme', ([], {}), '()\n', (209, 211), True, 'import seaborn as sns\n'), ((221, 241), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (235, 241), True, 'import numpy as np\n'), ((1770, 1793), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""ggplot"""'],...
from meta_policy_search.utils import logger import numpy as np import tensorflow as tf from collections import OrderedDict from meta_policy_search.optimizers.base import Optimizer class FiniteDifferenceHvp(Optimizer): def __init__(self, base_eps=1e-5, symmetric=True, grad_clip=None): self.base_eps = np.ca...
[ "meta_policy_search.utils.logger.log", "numpy.prod", "collections.OrderedDict", "numpy.reshape", "tensorflow.get_default_session", "numpy.linalg.norm", "tensorflow.gradients", "numpy.isnan", "tensorflow.reshape", "tensorflow.zeros_like", "numpy.zeros_like", "numpy.arange" ]
[((12987, 13013), 'collections.OrderedDict', 'OrderedDict', (['unflat_params'], {}), '(unflat_params)\n', (12998, 13013), False, 'from collections import OrderedDict\n'), ((13280, 13314), 'numpy.zeros_like', 'np.zeros_like', (['b'], {'dtype': 'np.float32'}), '(b, dtype=np.float32)\n', (13293, 13314), True, 'import nump...
from setuptools import setup, find_packages from annotator.main import __version__ requirements = [ 'docopt', 'flask', 'gevent', 'numpy', 'scikit-image', 'opencv-python', 'h5py', 'pandas', 'dataclasses', 'av', 'tqdm', ] setup( name='annotator', version=__version__, ...
[ "setuptools.find_packages" ]
[((646, 661), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (659, 661), False, 'from setuptools import setup, find_packages\n')]
""" Plotting convenience functions. """ from math import ceil import ipywidgets as widgets import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np from model_base import get_ext_input # define basics prop_cycle = plt.rcParams["axes.prop_cycle"] colors = prop_cycle.by_key()["color"]...
[ "model_base.get_ext_input", "ipywidgets.IntSlider", "math.ceil", "matplotlib.pyplot.style.use", "numpy.zeros", "matplotlib.pyplot.figure", "matplotlib.gridspec.GridSpec", "ipywidgets.Layout", "ipywidgets.FloatSlider", "matplotlib.pyplot.suptitle" ]
[((321, 351), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""seaborn-muted"""'], {}), "('seaborn-muted')\n", (334, 351), True, 'import matplotlib.pyplot as plt\n'), ((745, 823), 'ipywidgets.FloatSlider', 'widgets.FloatSlider', ([], {'min': '(-5)', 'max': '(20)', 'step': '(0.5)', 'value': '(10.0)', 'description':...
#!/usr/bin/env python3 # Copyright 2020 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "logging.getLogger", "re.compile", "argparse.ArgumentParser", "pathlib.Path", "pw_presubmit.color_green", "pw_presubmit.git_repo_path", "pw_presubmit.describe_files_in_repo", "pw_presubmit.color_bold_white", "pw_presubmit.add_path_arguments", "pw_presubmit.color_red", "pw_presubmit.color_aqua", ...
[((1478, 1505), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1495, 1505), False, 'import logging\n'), ((5065, 5127), 're.compile', 're.compile', (['"""^--- (.*)\\\\s+\\\\(original\\\\)$"""'], {'flags': 're.MULTILINE'}), "('^--- (.*)\\\\s+\\\\(original\\\\)$', flags=re.MULTILINE)\n", (5...
import re from six import text_type from sacremoses import MosesTokenizer, MosesDetokenizer class MosesTokenizerExtended(MosesTokenizer): """ Extended Moses tokenizer with Catalan support """ CA_MIDDLE_DOT = r"([^{}\s\.'\`\,\-·])".format(MosesTokenizer.IsAlnum), r" \1 " CA_MIDDLE_DOT_NO_LOWER_F...
[ "re.sub", "six.text_type", "re.finditer" ]
[((903, 918), 'six.text_type', 'text_type', (['text'], {}), '(text)\n', (912, 918), False, 'from six import text_type\n'), ((4726, 4761), 're.sub', 're.sub', (['regexp', 'substituition', 'text'], {}), '(regexp, substituition, text)\n', (4732, 4761), False, 'import re\n'), ((1068, 1102), 're.sub', 're.sub', (['regexp', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author : <NAME> # E-mail : <EMAIL> # Description: # Date : 21/10/2020 14:20 # File Name : generate-dataset-Dexterous_vacuum.py import numpy as np import sys import pickle import datetime from vstsim.grasping.quality import PointGraspMetrics3D from vstsim....
[ "os.path.exists", "pickle.dump", "vstsim.grasping.DexterousVacuumGrasp", "meshpy.obj_file.ObjFile", "multiprocessing.Process", "os.walk", "logging.warning", "multiprocessing.cpu_count", "vstsim.grasping.RobotGripper.load_dex_vacuum", "vstsim.grasping.VacuumGraspSampler", "datetime.datetime.now",...
[((1255, 1273), 'os.walk', 'os.walk', (['file_dir_'], {}), '(file_dir_)\n', (1262, 1273), False, 'import os\n'), ((1918, 1968), 'autolab_core.YamlConfig', 'YamlConfig', (["(work_dir + '/vst_sim/test/config.yaml')"], {}), "(work_dir + '/vst_sim/test/config.yaml')\n", (1928, 1968), False, 'from autolab_core import YamlCo...
import logging import time log = logging.getLogger(__name__) TEST_DIR = { "v2": { "script": "/ceph-qe-scripts/rgw/v2/tests/s3_swift/", "lib": "/ceph-qe-scripts/rgw/v2/lib/", "config": "/ceph-qe-scripts/rgw/v2/tests/s3_swift/multisite_configs/", } } def run(**kw): log.info("Runnin...
[ "logging.getLogger", "time.sleep" ]
[((34, 61), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (51, 61), False, 'import logging\n'), ((491, 505), 'time.sleep', 'time.sleep', (['(60)'], {}), '(60)\n', (501, 505), False, 'import time\n')]
# %% [markdown] # # import matplotlib as mpl from matplotlib.cm import ScalarMappable import networkx as nx import numpy as np from src.hierarchy import signal_flow from graspy.models import SBMEstimator node_signal_flow = signal_flow(adj) mean_sf = np.zeros(k) for i in np.unique(pred_labels): inds = np.where(pred...
[ "numpy.mean", "numpy.unique", "numpy.where", "networkx.get_edge_attributes", "networkx.draw_networkx", "numpy.zeros", "matplotlib.cm.ScalarMappable", "graspy.models.SBMEstimator", "matplotlib.colors.LogNorm", "src.hierarchy.signal_flow", "networkx.from_pandas_adjacency" ]
[((224, 240), 'src.hierarchy.signal_flow', 'signal_flow', (['adj'], {}), '(adj)\n', (235, 240), False, 'from src.hierarchy import signal_flow\n'), ((251, 262), 'numpy.zeros', 'np.zeros', (['k'], {}), '(k)\n', (259, 262), True, 'import numpy as np\n'), ((272, 294), 'numpy.unique', 'np.unique', (['pred_labels'], {}), '(p...
from __future__ import division import numpy as np from scipy.interpolate import Akima1DInterpolator def cubic_spline_3pts(x, y, T): """ Apperently scipy.interpolate.interp1d does not support cubic spline for less than 4 points. """ x0, x1, x2 = x y0, y1, y2 = y x1x0, x2x1 = ...
[ "numpy.append", "numpy.matrix", "scipy.interpolate.Akima1DInterpolator", "numpy.linalg.inv" ]
[((620, 682), 'numpy.matrix', 'np.matrix', (['[[m11, m12, m13], [m21, m22, m23], [m31, m32, m33]]'], {}), '([[m11, m12, m13], [m21, m22, m23], [m31, m32, m33]])\n', (629, 682), True, 'import numpy as np\n'), ((1142, 1159), 'numpy.append', 'np.append', (['q1', 'q2'], {}), '(q1, q2)\n', (1151, 1159), True, 'import numpy ...
import argparse import logging import json import sys sys.path.insert(0, '.') from tools.constants import JSON_FORMAT_KWARGS from tools.utils import get_json_files def reserialize(file_): """Reformat json file""" with open(file_) as fp: try: data = json.load(fp) except ValueError...
[ "logging.basicConfig", "sys.path.insert", "argparse.ArgumentParser", "tools.utils.get_json_files", "json.load", "json.dump" ]
[((55, 78), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""."""'], {}), "(0, '.')\n", (70, 78), False, 'import sys\n'), ((600, 642), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.WARNING'}), '(level=logging.WARNING)\n', (619, 642), False, 'import logging\n'), ((656, 681), 'argparse.ArgumentP...
"""Zookeeper admin interface. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import socket import logging _LOGGER = logging.getLogger(__name__) def netcat(hostname, port, command): """Send 4letter netcat t...
[ "logging.getLogger", "socket.socket" ]
[((225, 252), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (242, 252), False, 'import logging\n'), ((365, 414), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (378, 414), False, 'import socket\n')]
from bot.bot import Friendo from discord import errors from discord.ext.commands import Cog, Context, group from bot.settings import AOC_JOIN_CODE, AOC_LEADERBOARD_LINK, AOC_SESSION_COOKIE class AdventOfCode(Cog): """Cog for AOC 2021 for small features.""" def __init__(self, bot: Friendo): self.bot =...
[ "discord.ext.commands.group" ]
[((904, 1024), 'discord.ext.commands.group', 'group', ([], {'name': '"""AdventofCode"""', 'aliases': "('aoc', 'aoc2021')", 'brief': '"""Small commands for AoC 2021"""', 'usage': '""".aoc [command]"""'}), "(name='AdventofCode', aliases=('aoc', 'aoc2021'), brief=\n 'Small commands for AoC 2021', usage='.aoc [command]'...
from scipy.misc import imsave import cv2 def blur(ai, output_file=None): """ Create simple FDM. Apply Gaussian blur params=(11,11). """ fdm = cv2.GaussianBlur(ai, (11,11), 0) if output_file is not None: imsave(output_file, fdm) return fdm
[ "scipy.misc.imsave", "cv2.GaussianBlur" ]
[((159, 192), 'cv2.GaussianBlur', 'cv2.GaussianBlur', (['ai', '(11, 11)', '(0)'], {}), '(ai, (11, 11), 0)\n', (175, 192), False, 'import cv2\n'), ((233, 257), 'scipy.misc.imsave', 'imsave', (['output_file', 'fdm'], {}), '(output_file, fdm)\n', (239, 257), False, 'from scipy.misc import imsave\n')]
import json import urllib from unittest import mock from unittest.case import TestCase import pytest from django.test import override_settings from django.urls import reverse from rest_framework import status from rest_framework.request import Request from rest_framework.test import APIClient, APITestCase from enviro...
[ "segments.models.Condition.objects.create", "features.models.FeatureSegment.objects.create", "environments.models.Environment.objects.create", "rest_framework.test.APIClient", "environments.identities.traits.models.Trait.objects.create", "django.urls.reverse", "urllib.parse.urlencode", "features.model...
[((10881, 10969), 'unittest.mock.patch', 'mock.patch', (['"""integrations.amplitude.amplitude.AmplitudeWrapper.identify_user_async"""'], {}), "(\n 'integrations.amplitude.amplitude.AmplitudeWrapper.identify_user_async')\n", (10891, 10969), False, 'from unittest import mock\n'), ((11687, 11775), 'unittest.mock.patch'...
# ====================================================================== # The Sum of Its Parts # Advent of Code 2018 Day 07 -- <NAME> -- https://adventofcode.com # # Python implementation by Dr. <NAME> III # ====================================================================== # ===================================...
[ "step.Step" ]
[((1445, 1456), 'step.Step', 'step.Step', ([], {}), '()\n', (1454, 1456), False, 'import step\n'), ((1744, 1765), 'step.Step', 'step.Step', ([], {'letter': '"""A"""'}), "(letter='A')\n", (1753, 1765), False, 'import step\n')]
# -*- encoding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2014-2015 <NAME>, http://haltu.fi # # 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 withou...
[ "logging.getLogger", "django.conf.settings.AUTH_EXTERNAL_MUNICIPALITY_BINDING.keys", "authdata.models.Municipality.objects.all", "importlib.import_module", "authdata.models.Attendance.objects.all", "authdata.models.User.objects.get", "authdata.models.Role.objects.all", "authdata.models.School.objects....
[((1824, 1851), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1841, 1851), False, 'import logging\n'), ((2182, 2216), 'importlib.import_module', 'importlib.import_module', (['source[0]'], {}), '(source[0])\n', (2205, 2216), False, 'import importlib\n'), ((2996, 3014), 'authdata.models.U...
from django.db import models from ..models import RatedItemBase, Ratings class Food(models.Model): name = models.CharField(max_length=50) ratings = Ratings() def __str__(self): return self.name class BeverageRating(RatedItemBase): content_object = models.ForeignKey('Beverage') class Bev...
[ "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((113, 144), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)'}), '(max_length=50)\n', (129, 144), False, 'from django.db import models\n'), ((279, 308), 'django.db.models.ForeignKey', 'models.ForeignKey', (['"""Beverage"""'], {}), "('Beverage')\n", (296, 308), False, 'from django.db import ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "WeightUnconventional", "description": "Estimate weights of unconventional aircraft", "exec": "pwd\npython weightuncmain.py",...
[ "ceasiompy.utils.moduleinterfaces.CPACSInOut" ]
[((444, 456), 'ceasiompy.utils.moduleinterfaces.CPACSInOut', 'CPACSInOut', ([], {}), '()\n', (454, 456), False, 'from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH\n')]
import os import sys import json from pathlib import Path import warnings import pandas as pd import numpy as np from skimage.io import imsave from skimage import img_as_ubyte import torch from xarray.core.dataset import Dataset from xarray.core.dataarray import DataArray import xarray from typing import Tuple, List im...
[ "GIS_utils.bbox_from_point", "model.Model", "pandas.read_csv", "torch.from_numpy", "torch.cuda.is_available", "xcube_sh.cube.open_cube", "matplotlib.pyplot.imshow", "pathlib.Path", "numpy.stack", "matplotlib.pyplot.yticks", "warnings.simplefilter", "pandas.DataFrame", "skimage.img_as_ubyte",...
[((3085, 3104), 'torch.from_numpy', 'torch.from_numpy', (['x'], {}), '(x)\n', (3101, 3104), False, 'import torch\n'), ((3503, 3588), 'model.Model', 'Model', ([], {'input_dim': '(2)', 'hidden_dim': '(16)', 'kernel_size': '(3)', 'device': 'device', 'version': '"""0.1.1"""'}), "(input_dim=2, hidden_dim=16, kernel_size=3, ...
import os import sys import random import itertools import colorsys import numpy as np from skimage.measure import find_contours import matplotlib.pyplot as plt from matplotlib import patches, lines from matplotlib.patches import Polygon # import IPython.display def random_colors(N, bright=True): ''' Generat...
[ "matplotlib.patches.Rectangle", "random.randint", "random.shuffle", "numpy.any", "colorsys.hsv_to_rgb", "matplotlib.lines.Line2D", "matplotlib.pyplot.subplots" ]
[((594, 616), 'random.shuffle', 'random.shuffle', (['colors'], {}), '(colors)\n', (608, 616), False, 'import random\n'), ((1301, 1333), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)'], {'figsize': 'figsize'}), '(1, figsize=figsize)\n', (1313, 1333), True, 'import matplotlib.pyplot as plt\n'), ((1945, 2073), 'mat...
"""Validator Module""" import re from bson.objectid import ObjectId def validate(data, regex): """Custom Validator""" return True if re.match(regex, data) else False def validate_password(password: str): """Password Validator""" reg = r"\b^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!#%*?...
[ "re.match" ]
[((142, 163), 're.match', 're.match', (['regex', 'data'], {}), '(regex, data)\n', (150, 163), False, 'import re\n')]
#!/usr/local/bin/python3 # solver2021.py : 2021 Sliding tile puzzle solver # # Code by: <EMAIL> # # Based on skeleton code by <NAME>, January 2021 # import sys from queue import PriorityQueue ROWS=4 COLS=5 def printable_board(board): return "\n".join([ ('%3d ')*COLS % board[j:(j+COLS)] for j in range(0, ROWS*CO...
[ "queue.PriorityQueue" ]
[((7001, 7016), 'queue.PriorityQueue', 'PriorityQueue', ([], {}), '()\n', (7014, 7016), False, 'from queue import PriorityQueue\n')]
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
[ "testcase.utils.Logger.Logger", "testcase.utils.Constant.Constant", "os.path.dirname", "os.popen", "yat.test.Node", "testcase.utils.CommonSH.CommonSH" ]
[((1038, 1046), 'testcase.utils.Logger.Logger', 'Logger', ([], {}), '()\n', (1044, 1046), False, 'from testcase.utils.Logger import Logger\n'), ((1151, 1165), 'yat.test.Node', 'Node', (['"""dbuser"""'], {}), "('dbuser')\n", (1155, 1165), False, 'from yat.test import Node\n'), ((1191, 1206), 'yat.test.Node', 'Node', (['...
import numpy as np import matplotlib.pyplot as plt # numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None) # # 在指定的间隔内返回均匀间隔的数字。 # # 返回num均匀分布的样本,在[start, stop]。 # # 这个区间的端点可以任意的被排除在外。 X = np.linspace(-np.pi, np.pi, 256, endpoint=True) print(X) C, S = np.cos(X), np.sin(X) plt.plot(X, C) plt.p...
[ "matplotlib.pyplot.plot", "numpy.linspace", "numpy.cos", "numpy.sin", "matplotlib.pyplot.show" ]
[((215, 261), 'numpy.linspace', 'np.linspace', (['(-np.pi)', 'np.pi', '(256)'], {'endpoint': '(True)'}), '(-np.pi, np.pi, 256, endpoint=True)\n', (226, 261), True, 'import numpy as np\n'), ((300, 314), 'matplotlib.pyplot.plot', 'plt.plot', (['X', 'C'], {}), '(X, C)\n', (308, 314), True, 'import matplotlib.pyplot as plt...
from pysb.testing import * from pysb import * from pysb.core import as_complex_pattern from pysb.bng import * import os import unittest from nose.tools import assert_raises_regexp from pysb.generator.bng import BngPrinter import sympy import math @with_model def test_generate_network(): Monomer('A') assert_ra...
[ "sympy.cos", "sympy.sqrt", "nose.tools.assert_raises_regexp", "math.floor", "unittest.skipIf", "sympy.asinh", "sympy.Piecewise", "sympy.Min", "sympy.And", "sympy.Eq", "sympy.acos", "sympy.atanh", "sympy.sympify", "sympy.tan", "sympy.Pow", "sympy.Or", "sympy.asin", "sympy.sin", "s...
[((607, 679), 'unittest.skipIf', 'unittest.skipIf', (["(os.name == 'nt')", '"""BNG Console does not work on Windows"""'], {}), "(os.name == 'nt', 'BNG Console does not work on Windows')\n", (622, 679), False, 'import unittest\n'), ((5930, 6092), 'nose.tools.assert_raises_regexp', 'assert_raises_regexp', (['BngInterface...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from page_sets.system_health import system_health_story from telemetry import decorators @decorators.Disabled('win') # crbug.com/656040 class BlankAboutBla...
[ "telemetry.decorators.Disabled" ]
[((255, 281), 'telemetry.decorators.Disabled', 'decorators.Disabled', (['"""win"""'], {}), "('win')\n", (274, 281), False, 'from telemetry import decorators\n')]
from io import BytesIO import pytest @pytest.fixture def db_table(request, con): con.run("START TRANSACTION") con.run( "CREATE TEMPORARY TABLE t1 " "(f1 int primary key, f2 int not null, f3 varchar(50) null) " "on commit drop") return con def test_copy_to_with_table(db_table): ...
[ "io.BytesIO", "pytest.raises" ]
[((552, 561), 'io.BytesIO', 'BytesIO', ([], {}), '()\n', (559, 561), False, 'from io import BytesIO\n'), ((767, 776), 'io.BytesIO', 'BytesIO', ([], {}), '()\n', (774, 776), False, 'from io import BytesIO\n'), ((1077, 1116), 'io.BytesIO', 'BytesIO', (["b'1\\t1\\t1\\n2\\t2\\t2\\n3\\t3\\t3\\n'"], {}), "(b'1\\t1\\t1\\n2\\t...
"""Conversion between physical units""" import math import re import uuid from functools import wraps DEFAULT_UNITS = r''' # ------------------------------------------------------------------------------ # ATOMIC UNITS # -------------------------------------------------------------------...
[ "math.ceil", "math.floor", "re.compile", "functools.wraps", "uuid.uuid4" ]
[((15392, 15454), 're.compile', 're.compile', (['"""^\\\\s*(?P<val>[\\\\d.Ee+-]+)(_(?P<unit>\\\\w+))?\\\\s*$"""'], {}), "('^\\\\s*(?P<val>[\\\\d.Ee+-]+)(_(?P<unit>\\\\w+))?\\\\s*$')\n", (15402, 15454), False, 'import re\n'), ((12732, 12752), 're.compile', 're.compile', (['"""^#\\\\s*"""'], {}), "('^#\\\\s*')\n", (12742...
#!/usr/bin/env python3 # Copyright 2017 Brocade Communications Systems LLC. 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 also obtain a copy of the License at # http://www.apache.org/licenses/LICENS...
[ "pyfos.pyfos_auth.logout", "pyfos.utils.brcd_util.getsession", "pyfos.utils.brcd_util.parse", "sys.exit", "pyfos.pyfos_util.response_print" ]
[((1879, 1921), 'pyfos.utils.brcd_util.parse', 'brcd_util.parse', (['argv', 'trunk_area', 'filters'], {}), '(argv, trunk_area, filters)\n', (1894, 1921), False, 'from pyfos.utils import brcd_util\n'), ((2179, 2207), 'pyfos.utils.brcd_util.getsession', 'brcd_util.getsession', (['inputs'], {}), '(inputs)\n', (2199, 2207)...
# coding: utf-8 """ ELEMENTS API The version of the OpenAPI document: 2 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from elements_sdk.configuration import Configuration class CPUStat(object): """NOTE: This class is auto generated by OpenAPI G...
[ "six.iteritems", "elements_sdk.configuration.Configuration" ]
[((5815, 5848), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (5828, 5848), False, 'import six\n'), ((1380, 1395), 'elements_sdk.configuration.Configuration', 'Configuration', ([], {}), '()\n', (1393, 1395), False, 'from elements_sdk.configuration import Configuration\n')]
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ "paddle_layers.FCLayer", "paddle.fluid.dygraph.Linear", "paddle_layers.CosSimLayer", "paddle.fluid.layers.reduce_sum", "paddle_layers.EmbeddingLayer", "paddle_layers.ConcatLayer", "paddle_layers.SoftsignLayer", "paddle.fluid.layers.reshape" ]
[((1338, 1372), 'paddle.fluid.dygraph.Linear', 'Linear', (['self.bow_dim', 'self.bow_dim'], {}), '(self.bow_dim, self.bow_dim)\n', (1344, 1372), False, 'from paddle.fluid.dygraph import Layer, Linear\n'), ((1749, 1819), 'paddle.fluid.layers.reshape', 'fluid.layers.reshape', (['left_emb'], {'shape': '[-1, self.seq_len, ...
import time import os.path import subprocess import bakebit_128_64_oled as oled import sys from modules.pages.simpletable import SimpleTable class App(object): def __init__(self, g_vars): # create simple table self.simple_table_obj = SimpleTable(g_vars) def profiler_ctl_file_upda...
[ "subprocess.check_output", "subprocess.run", "modules.pages.simpletable.SimpleTable" ]
[((265, 284), 'modules.pages.simpletable.SimpleTable', 'SimpleTable', (['g_vars'], {}), '(g_vars)\n', (276, 284), False, 'from modules.pages.simpletable import SimpleTable\n'), ((1145, 1185), 'subprocess.check_output', 'subprocess.check_output', (['cmd'], {'shell': '(True)'}), '(cmd, shell=True)\n', (1168, 1185), False...
import unittest from approvaltests.approvals import verify_file from scripts.code_generation import CppGeneration from scripts.release_details import ReleaseDetails from scripts.version import Version from tests.helpers import set_home_directory class TestForLocking(unittest.TestCase): def test_create_single_h...
[ "scripts.code_generation.CppGeneration", "scripts.release_details.ReleaseDetails", "tests.helpers.set_home_directory", "approvaltests.approvals.verify_file", "scripts.version.Version" ]
[((630, 649), 'approvaltests.approvals.verify_file', 'verify_file', (['output'], {}), '(output)\n', (641, 649), False, 'from approvaltests.approvals import verify_file\n'), ((999, 1018), 'approvaltests.approvals.verify_file', 'verify_file', (['output'], {}), '(output)\n', (1010, 1018), False, 'from approvaltests.approv...
""" Example: Shows how to load a pre-trained FAQ model from the store. """ import urllib3 import feersum_nlu from feersum_nlu.rest import ApiException from examples import feersumnlu_host, feersum_nlu_auth_token # Configure API key authorization: APIKeyHeader configuration = feersum_nlu.Configuration() #...
[ "feersum_nlu.ApiClient", "feersum_nlu.FaqMatcherCreateDetails", "feersum_nlu.Configuration", "feersum_nlu.ClassLabelPair", "feersum_nlu.TextInput" ]
[((288, 315), 'feersum_nlu.Configuration', 'feersum_nlu.Configuration', ([], {}), '()\n', (313, 315), False, 'import feersum_nlu\n'), ((657, 734), 'feersum_nlu.FaqMatcherCreateDetails', 'feersum_nlu.FaqMatcherCreateDetails', ([], {'name': 'instance_name', 'load_from_store': '(True)'}), '(name=instance_name, load_from_s...
from machine import I2C import utime import math class MinIMU_v5: """ Init function Valid values for aFullScale are 2, 4, 8, and 16 [g] gFullScale are 125, 245, 500, 1000, and 2000 [dps] mFullScale are 4, 8, 12, and 16 [guass] gOdr...
[ "utime.sleep_us", "math.sqrt", "utime.ticks_ms", "math.atan2", "machine.I2C" ]
[((4772, 4800), 'machine.I2C', 'I2C', (['i2cBusNum'], {'freq': 'i2cFreq'}), '(i2cBusNum, freq=i2cFreq)\n', (4775, 4800), False, 'from machine import I2C\n'), ((15760, 15776), 'utime.ticks_ms', 'utime.ticks_ms', ([], {}), '()\n', (15774, 15776), False, 'import utime\n'), ((17356, 17372), 'utime.ticks_ms', 'utime.ticks_m...
#!/usr/bin/python # -*- coding: utf-8 -*- from gt.core import * from gt.extended import * from gt.annotationsketch import * from gt.annotationsketch.custom_track import CustomTrack from gt.core.gtrange import Range import sys if __name__ == "__main__": if len(sys.argv) != 3: sys.stderr.write("Usage: " + (...
[ "sys.stderr.write", "gt.core.gtrange.Range", "sys.exit" ]
[((290, 358), 'sys.stderr.write', 'sys.stderr.write', (["('Usage: ' + sys.argv[0] + ' style_file PNG_file\\n')"], {}), "('Usage: ' + sys.argv[0] + ' style_file PNG_file\\n')\n", (306, 358), False, 'import sys\n'), ((394, 405), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (402, 405), False, 'import sys\n'), ((1281, 1...
import pytest from bot.dialogs import DEFAULT_MESSAGE from bot.dialogs import HELP_MESSAGE @pytest.mark.parametrize('message_text, expected_response', [ ('Help', HELP_MESSAGE), ('gvrwiusuhdfoger', DEFAULT_MESSAGE) ]) def test(bot, message, expected_response): bot.handle_new_message(message) bot.send...
[ "pytest.mark.parametrize" ]
[((95, 221), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""message_text, expected_response"""', "[('Help', HELP_MESSAGE), ('gvrwiusuhdfoger', DEFAULT_MESSAGE)]"], {}), "('message_text, expected_response', [('Help',\n HELP_MESSAGE), ('gvrwiusuhdfoger', DEFAULT_MESSAGE)])\n", (118, 221), False, 'import p...
# # KTH Royal Institute of Technology # import imageio import argparse import os from os.path import join from timeit import default_timer as timer from PIL import Image import scipy.misc def extract_frames(video_path, handler): def convert_frame(arg): iarray = arg[:,:,:3] iarray = scipy.misc.im...
[ "os.path.exists", "PIL.Image.fromarray", "argparse.ArgumentParser", "os.makedirs", "timeit.default_timer", "os.path.join", "imageio.get_reader" ]
[((492, 522), 'imageio.get_reader', 'imageio.get_reader', (['video_path'], {}), '(video_path)\n', (510, 522), False, 'import imageio\n'), ((767, 828), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Video Frame Extraction"""'}), "(description='Video Frame Extraction')\n", (790, 828), Fals...
from utils.eom import * from sympy import symbols, factor from sympy import simplify from sympy.physics.mechanics import * from sympy import sin, cos, symbols, Matrix, solve from sympy.physics.vector import init_vprinting import pylab as pl import control import numpy as np from scipy.integrate import odeint from matp...
[ "sympy.sin", "sympy.cos", "control.ss2tf", "control.lqr", "sympy.simplify", "sympy.Matrix", "pickle.load", "sympy.symbols", "numpy.array", "numpy.linspace", "numpy.vstack", "pylab.linspace", "time.time" ]
[((600, 611), 'time.time', 'time.time', ([], {}), '()\n', (609, 611), False, 'import time\n'), ((757, 777), 'sympy.symbols', 'symbols', (['"""r,h_c,h_t"""'], {}), "('r,h_c,h_t')\n", (764, 777), False, 'from sympy import sin, cos, symbols, Matrix, solve\n'), ((792, 814), 'sympy.symbols', 'symbols', (['"""I_w,I_c,I_t"""'...
#!/usr/bin/env python """ Export a history to an archive file using attribute files. usage: %prog history_attrs dataset_attrs job_attrs out_file -G, --gzip: gzip archive file """ from __future__ import print_function import optparse import os import shutil import sys from galaxy.model.store import tar_export_dir...
[ "os.path.exists", "shutil.move", "os.path.join", "optparse.OptionParser", "os.path.dirname", "galaxy.model.store.tar_export_directory" ]
[((812, 835), 'optparse.OptionParser', 'optparse.OptionParser', ([], {}), '()\n', (833, 835), False, 'import optparse\n'), ((496, 550), 'galaxy.model.store.tar_export_directory', 'tar_export_directory', (['export_directory', 'out_file', 'gzip'], {}), '(export_directory, out_file, gzip)\n', (516, 550), False, 'from gala...
from typing import List, Dict, Iterator, Type import json import re from importlib import import_module from sys import argv from wipi.util import cc2sc from .interface import Controller _controllers: List[Controller] = [] def add(controller: Controller) -> None: """ Add another controller instance :p...
[ "wipi.util.cc2sc" ]
[((1067, 1084), 'wipi.util.cc2sc', 'cc2sc', (['class_name'], {}), '(class_name)\n', (1072, 1084), False, 'from wipi.util import cc2sc\n')]
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django.forms import ModelForm from django.forms.models import inlineformset_factory from djangobmf.forms import BMFForm from .models import Team from .models import TeamMember class TeamUpdateForm(ModelForm): class Met...
[ "django.forms.models.inlineformset_factory" ]
[((479, 539), 'django.forms.models.inlineformset_factory', 'inlineformset_factory', (['Team', 'TeamMember'], {'extra': '(2)', 'exclude': '[]'}), '(Team, TeamMember, extra=2, exclude=[])\n', (500, 539), False, 'from django.forms.models import inlineformset_factory\n')]
from numpy import interp from os import listdir from PIL import Image, ImageStat # Directory for block textures extracted from version jar textures = 'assets/minecraft/textures/block' # Special case: animated blocks like crimson_stem are # taller than 64px: crop when compositing later? # List of blocks to allow load...
[ "PIL.ImageStat.Stat", "os.listdir", "PIL.Image.open", "numpy.interp" ]
[((1346, 1386), 'PIL.Image.open', 'Image.open', (['f"""{textures}/{block_id}.png"""'], {}), "(f'{textures}/{block_id}.png')\n", (1356, 1386), False, 'from PIL import Image, ImageStat\n'), ((746, 763), 'os.listdir', 'listdir', (['textures'], {}), '(textures)\n', (753, 763), False, 'from os import listdir\n'), ((1674, 17...
from __future__ import annotations from typing import Set from dataclasses import dataclass, field @dataclass class CellBasic: fixed: bool = False number: int = 0 memo: Set[int] = field(default_factory=set) def __str__(self): if self.fixed: return f'{self.number}' else: ...
[ "dataclasses.field" ]
[((194, 220), 'dataclasses.field', 'field', ([], {'default_factory': 'set'}), '(default_factory=set)\n', (199, 220), False, 'from dataclasses import dataclass, field\n')]
#!/usr/bin/python3 import ChordPicker import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, Pango numbertoggle = False class Handler: def quit(self, *args): Gtk.main_quit() def random(self): if number.get_active(): if MmSwitch.get_active(): buf...
[ "gi.repository.Gtk.main_quit", "ChordPicker.PickChord", "gi.repository.Gtk.Builder", "gi.require_version", "gi.repository.Pango.FontDescription", "ChordPicker.NumberPkr", "gi.repository.Gtk.main" ]
[((49, 81), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (67, 81), False, 'import gi\n'), ((580, 593), 'gi.repository.Gtk.Builder', 'Gtk.Builder', ([], {}), '()\n', (591, 593), False, 'from gi.repository import Gtk, Pango\n'), ((1067, 1077), 'gi.repository.Gtk.main',...
from django.views.generic import View from django.views.decorators.cache import never_cache from django.contrib import messages from django.http import HttpResponseRedirect from django.urls import reverse from scheduler.data_transfer import Person from scheduler.idd import ( get_occurrence, get_bookings, re...
[ "django.http.HttpResponseRedirect", "scheduler.data_transfer.Person", "scheduler.idd.remove_booking", "django.contrib.messages.error", "scheduler.idd.get_occurrence", "gbe.functions.validate_perms", "django.contrib.messages.success", "gbe.email.functions.send_volunteer_update_to_staff", "gbe.functio...
[((1065, 1173), 'django.urls.reverse', 'reverse', (['"""set_volunteer"""'], {'args': "[kwargs['occurrence_id'], kwargs['state']]", 'urlconf': '"""gbe.scheduling.urls"""'}), "('set_volunteer', args=[kwargs['occurrence_id'], kwargs['state']],\n urlconf='gbe.scheduling.urls')\n", (1072, 1173), False, 'from django.urls ...
#!/usr/bin/env python # coding: utf8 import asyncio import datetime import json import os import subprocess import time from sys import platform from requests import get from colorama import Fore, init with open('settings.json', 'r') as settings: settings = json.load(settings) async def clear(): ...
[ "subprocess.Popen", "os.geteuid", "time.sleep", "requests.get", "datetime.datetime.now", "os.path.isdir", "os.popen", "asyncio.sleep", "json.load", "os.system", "asyncio.get_event_loop", "time.time", "colorama.init" ]
[((278, 297), 'json.load', 'json.load', (['settings'], {}), '(settings)\n', (287, 297), False, 'import json\n'), ((325, 343), 'os.system', 'os.system', (['"""clear"""'], {}), "('clear')\n", (334, 343), False, 'import os\n'), ((2077, 2113), 'os.path.isdir', 'os.path.isdir', (["settings['directory']"], {}), "(settings['d...
import argparse import numpy as np from tqdm import tqdm from os.path import join, isfile from data import Labels from joblib import Parallel, delayed labels = Labels() def job(text_path, numpy_path): with open(text_path, 'r', encoding='utf8') as file: text = file.read() if not labels.is_accepted(t...
[ "argparse.ArgumentParser", "data.Labels", "joblib.Parallel", "os.path.isfile", "joblib.delayed", "numpy.load" ]
[((161, 169), 'data.Labels', 'Labels', ([], {}), '()\n', (167, 169), False, 'from data import Labels\n'), ((574, 631), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Collect utterances"""'}), "(description='Collect utterances')\n", (597, 631), False, 'import argparse\n'), ((1388, 1452), ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import time import urllib from os import system from subprocess import call from tkinter import * from tkinter import messagebox import pyttsx3 from urllib.request import urlopen from pkg_resources import DistributionNotFound, get_distribution from colour impo...
[ "tkinter.messagebox.showwarning", "time.strftime", "subprocess.call", "pyttsx3.speak", "os.system", "pkg_resources.get_distribution", "urllib.request.urlopen" ]
[((338, 367), 'os.system', 'system', (['"""dos2unix install.py"""'], {}), "('dos2unix install.py')\n", (344, 367), False, 'from os import system\n'), ((5245, 5260), 'os.system', 'system', (['"""clear"""'], {}), "('clear')\n", (5251, 5260), False, 'from os import system\n'), ((6484, 6499), 'os.system', 'system', (['"""c...
# -*- coding: utf-8 -*- """ Created on Thu Apr 14 11:11:55 2022 @author: Hatlab-RRK Purpose: create a neat, almost-executable file that can quickly plot a 3-state pulse file, and have the option to do just histograms, or additionally try to fit using majority vote and give classification accuracy """ from data_proce...
[ "data_processing.AWG_and_Alazar.Pulse_Processing_utils.plot_custom_stats_from_filepath", "data_processing.AWG_and_Alazar.Pulse_Processing_utils.plot_stats_from_filepath", "matplotlib.pyplot.plot", "matplotlib.pyplot.style.use", "numpy.array", "data_processing.AWG_and_Alazar.Pulse_Processing_utils.extract_...
[((547, 570), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""hatlab"""'], {}), "('hatlab')\n", (560, 570), True, 'import matplotlib.pyplot as plt\n'), ((9008, 9395), 'data_processing.AWG_and_Alazar.Pulse_Processing_utils.extract_3pulse_histogram_from_filepath', 'extract_3pulse_histogram_from_filepath', (['datapa...
from __future__ import absolute_import, division, print_function """ Author : Lyubimov, A.Y. Created : 03/31/2020 Last Changed: 04/20/2020 Description : ZMQ Connector launched with MPI. For example: To run on 10 cores at host 'bl121proc00', receiving from port 8121, running only spotfinding, text output to s...
[ "interceptor.connector.connector.Connector", "interceptor.connector.connector.Reader", "mpi4py.MPI.Get_processor_name", "interceptor.connector.connector.Collector", "interceptor.packagefinder" ]
[((1404, 1463), 'interceptor.packagefinder', 'packagefinder', (['self.filename', '"""connector"""'], {'read_config': '(True)'}), "(self.filename, 'connector', read_config=True)\n", (1417, 1463), False, 'from interceptor import packagefinder\n'), ((5713, 5754), 'interceptor.connector.connector.Collector', 'Collector', (...
import requests import urllib3 from datetime import datetime, timedelta from requests.auth import HTTPDigestAuth import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, ENTITY_ID_FORMAT from homeassistant.const import CONF_ID, CONF_NAME import homeassistant.helpers.config_validation as c...
[ "voluptuous.Required", "datetime.datetime.strptime", "datetime.timedelta", "datetime.datetime.now", "urllib3.disable_warnings", "requests.auth.HTTPDigestAuth", "homeassistant.helpers.entity.async_generate_entity_id", "voluptuous.Optional" ]
[((580, 625), 'voluptuous.Optional', 'vol.Optional', (['CONF_NAME'], {'default': 'DEFAULT_NAME'}), '(CONF_NAME, default=DEFAULT_NAME)\n', (592, 625), True, 'import voluptuous as vol\n'), ((642, 666), 'voluptuous.Required', 'vol.Required', (['CONF_STOPS'], {}), '(CONF_STOPS)\n', (654, 666), True, 'import voluptuous as v...
## test_attack.py -- sample code to test attack procedure ## ## Copyright (C) 2016, <NAME> <<EMAIL>>. ## ## This program is licenced under the BSD 2-Clause licence, ## contained in the LICENCE file in this directory. import tensorflow as tf import numpy as np import time import random import argparse from cv2 import i...
[ "cv2.imwrite", "numpy.eye", "argparse.ArgumentParser", "setup_mnets.NodeLookup", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.train.start_queue_runners", "numpy.argmax", "numpy.squeeze", "numpy.array", "numpy.sum", "tensorflow.convert_to_tensor", "time.time", "setup_mnets.Im...
[((2230, 2253), 'numpy.array', 'np.array', (['inputs_scaled'], {}), '(inputs_scaled)\n', (2238, 2253), True, 'import numpy as np\n'), ((2375, 2392), 'numpy.array', 'np.array', (['targets'], {}), '(targets)\n', (2383, 2392), True, 'import numpy as np\n'), ((2469, 2523), 'argparse.ArgumentParser', 'argparse.ArgumentParse...
#!/usr/bin/python3 import serial import time import glob import os import json # Not an immediate thing to read SLEEP_TIME=.3 def setup(): # Sets up the serial interface # Usually USB0 but sometimes not so grab newest serials = glob.glob('/dev/ttyUSB*') if len(serials) > 0: serialfile = seri...
[ "json.dumps", "time.sleep", "serial.Serial", "time.time", "glob.glob" ]
[((244, 269), 'glob.glob', 'glob.glob', (['"""/dev/ttyUSB*"""'], {}), "('/dev/ttyUSB*')\n", (253, 269), False, 'import glob\n'), ((486, 529), 'serial.Serial', 'serial.Serial', (['serialfile', '(38400)'], {'timeout': '(1)'}), '(serialfile, 38400, timeout=1)\n', (499, 529), False, 'import serial\n'), ((2789, 2802), 'time...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2017/03/21 @author: <NAME> ''' import sys from cafysis.torsion import torsion from cafysis.file_io.psf import PsfFile from cafysis.file_io.dcd import DcdFile if len(sys.argv) != 4: print ('\n Usage: SCRIPT [input DCD] [input PSF] [output]\n') sys.ex...
[ "cafysis.file_io.dcd.DcdFile", "cafysis.file_io.psf.PsfFile", "cafysis.torsion.torsion", "sys.exit" ]
[((337, 357), 'cafysis.file_io.psf.PsfFile', 'PsfFile', (['sys.argv[2]'], {}), '(sys.argv[2])\n', (344, 357), False, 'from cafysis.file_io.psf import PsfFile\n'), ((413, 433), 'cafysis.file_io.dcd.DcdFile', 'DcdFile', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (420, 433), False, 'from cafysis.file_io.dcd import DcdFile\...
"""converts data to tf_record file """ import tensorflow as tf import pathlib import random import preprocessing import matplotlib.pyplot as plt BATCH_SIZE = 32 AUTOTUNE = tf.data.experimental.AUTOTUNE #retrieve the images data_root_orig = "../datasetSearch/images/" data_root = pathlib.Path(data_root_orig) print(dat...
[ "tensorflow.data.TFRecordDataset", "tensorflow.data.Dataset.zip", "random.shuffle", "tensorflow.data.experimental.TFRecordWriter", "tensorflow.data.Dataset.from_tensor_slices", "pathlib.Path", "tensorflow.data.experimental.shuffle_and_repeat", "tensorflow.saved_model.save", "tensorflow.keras.models....
[((282, 310), 'pathlib.Path', 'pathlib.Path', (['data_root_orig'], {}), '(data_root_orig)\n', (294, 310), False, 'import pathlib\n'), ((517, 548), 'random.shuffle', 'random.shuffle', (['all_image_paths'], {}), '(all_image_paths)\n', (531, 548), False, 'import random\n'), ((1738, 1789), 'tensorflow.data.Dataset.from_ten...
import fileinput from util import importGraph def bfsTree(ng, startingNode, debug=False): # bfsTree = NodeGraph(directed=True, size=ng.edgeCount()) visited = [] stack = [] stack.append(startingNode) while len(stack) > 0: v = stack.pop() if v not in visited: if debug...
[ "util.importGraph", "fileinput.input" ]
[((454, 471), 'fileinput.input', 'fileinput.input', ([], {}), '()\n', (469, 471), False, 'import fileinput\n'), ((481, 498), 'util.importGraph', 'importGraph', (['data'], {}), '(data)\n', (492, 498), False, 'from util import importGraph\n')]
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # """ Package upgrade plugin. """ import datetime import gettext import os from otopi import constants as otopicons from otopi import plugin from otopi import transaction from otopi import util from ovi...
[ "os.path.exists", "ovirt_engine_setup.util.is_ovirt_packaging_supported_distro", "ovirt_engine_setup.util.getPackageManager", "os.rename", "datetime.datetime.now", "gettext.dgettext", "otopi.plugin.event" ]
[((539, 595), 'gettext.dgettext', 'gettext.dgettext', ([], {'message': 'm', 'domain': '"""ovirt-engine-setup"""'}), "(message=m, domain='ovirt-engine-setup')\n", (555, 595), False, 'import gettext\n'), ((8360, 8404), 'otopi.plugin.event', 'plugin.event', ([], {'stage': 'plugin.Stages.STAGE_INIT'}), '(stage=plugin.Stage...
import json import joblib import numpy as np import pandas as pd import plotly from flask import Flask, jsonify, render_template, request from plotly.graph_objs import Bar from sqlalchemy import create_engine from disaster.models.train_classifier import tokenize app = Flask(__name__, static_url_path='/static') # loa...
[ "flask.render_template", "flask.request.args.get", "pandas.read_csv", "flask.Flask", "sqlalchemy.create_engine", "json.dumps", "plotly.graph_objs.Bar", "joblib.load", "pandas.read_sql_table" ]
[((271, 313), 'flask.Flask', 'Flask', (['__name__'], {'static_url_path': '"""/static"""'}), "(__name__, static_url_path='/static')\n", (276, 313), False, 'from flask import Flask, jsonify, render_template, request\n'), ((336, 388), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite:///disaster/data/disaster.db""...
from sklearn.metrics import classification_report import matplotlib.pyplot as plt import random def print_classification_reports(test_Accuracies , test_Losses , hidden_units , epochs , batches , learning_rates , test_set , test_labels , predictions ): for i in range(0,len(test_Accuracies)): #ektypwsh olwn twn classi...
[ "matplotlib.pyplot.subplots_adjust", "sklearn.metrics.classification_report", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((2111, 2174), 'matplotlib.pyplot.plot', 'plt.plot', (['param_array', 'train_Losses', '"""-"""'], {'label': '"""training_loss"""'}), "(param_array, train_Losses, '-', label='training_loss')\n", (2119, 2174), True, 'import matplotlib.pyplot as plt\n'), ((2173, 2231), 'matplotlib.pyplot.plot', 'plt.plot', (['param_array...
"""Common imports for generated source client library.""" # pylint:disable=wildcard-import import pkgutil from googlecloudapis.apitools.base.py import * from googlecloudapis.source.v0.source_v0_client import * from googlecloudapis.source.v0.source_v0_messages import * __path__ = pkgutil.extend_path(__path__, __name_...
[ "pkgutil.extend_path" ]
[((283, 322), 'pkgutil.extend_path', 'pkgutil.extend_path', (['__path__', '__name__'], {}), '(__path__, __name__)\n', (302, 322), False, 'import pkgutil\n')]
#coding=utf-8 #created by SamLee 2018/10/14 import os import sys import json import shlex import apk_util import walle_reader as reader def writeSignIdValues(apkFile,idValues): if idValues is None: return #24 = 8(size of block in bytes—same as the very first field (uint64)) + 16 (magic “APK Sig Block 4...
[ "os.path.exists", "apk_util.APK_SIG_BLOCK_MAGIC_HI.to_bytes", "apk_util.getCommentLength", "apk_util.findApkSigningBlock", "shlex.split", "json.dumps", "apk_util.isPossibleApkFile", "apk_util.findCentralDirStartOffset", "apk_util.findSigningBlockValues", "sys.exit", "apk_util.APK_SIG_BLOCK_MAGIC...
[((3826, 3859), 'json.dumps', 'json.dumps', (['infoDict'], {'default': 'str'}), '(infoDict, default=str)\n', (3836, 3859), False, 'import json\n'), ((4028, 4062), 'walle_reader.getChannelInfo', 'reader.getChannelInfo', (['apkFilePath'], {}), '(apkFilePath)\n', (4049, 4062), True, 'import walle_reader as reader\n'), ((9...
import numpy as np import pylab as plt import pandas as pd data = pd.read_csv('data/data.csv') for feature in ['nikkei', 'nasdaq', 'currency']: dataset = data[feature] print("[{}] Mean: {}".format(feature, np.mean(dataset))) print("[{}] Standard deviation: {}".format(feature, np.std(dataset))) plt.xlab...
[ "numpy.mean", "pylab.hist", "pandas.read_csv", "pylab.xlabel", "numpy.std", "pylab.show" ]
[((67, 95), 'pandas.read_csv', 'pd.read_csv', (['"""data/data.csv"""'], {}), "('data/data.csv')\n", (78, 95), True, 'import pandas as pd\n'), ((312, 344), 'pylab.xlabel', 'plt.xlabel', (['feature'], {'fontsize': '(18)'}), '(feature, fontsize=18)\n', (322, 344), True, 'import pylab as plt\n'), ((349, 388), 'pylab.hist',...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from . import DEFAULT_APP_NAMESPACE class SearchApp(CMSApp): name = _('Search') app_name = DEFAULT_APP_NAMESPACE...
[ "cms.apphook_pool.apphook_pool.register", "django.utils.translation.ugettext_lazy" ]
[((419, 451), 'cms.apphook_pool.apphook_pool.register', 'apphook_pool.register', (['SearchApp'], {}), '(SearchApp)\n', (440, 451), False, 'from cms.apphook_pool import apphook_pool\n'), ((272, 283), 'django.utils.translation.ugettext_lazy', '_', (['"""Search"""'], {}), "('Search')\n", (273, 283), True, 'from django.uti...
from __future__ import print_function, division import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm n = 10 s = 1.0 x = np.linspace(0, n - 1, n + (n - 1) * 20) def rho(r, k): if k == 0: y = np.exp(-(r/s)**2) else: e = np.exp(1) y = (e/k**2)**(k**2) * (r/s)**...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.ylabel", "numpy.arange", "matplotlib.pyplot.xlabel", "numpy.exp", "numpy.linspace", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim", "matplotlib.pyplot.legend" ]
[((148, 187), 'numpy.linspace', 'np.linspace', (['(0)', '(n - 1)', '(n + (n - 1) * 20)'], {}), '(0, n - 1, n + (n - 1) * 20)\n', (159, 187), True, 'import numpy as np\n'), ((364, 390), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(6, 3)'}), '(figsize=(6, 3))\n', (374, 390), True, 'import matplotlib.pyplo...
import cv2 import numpy as np import urllib.request from django.conf import settings from keras.models import load_model from lfr.models import FacialExpressionModel facec = cv2.CascadeClassifier( './lfr/static/lfr/weights/haarcascade_frontalface_default.xml') model = FacialExpressionModel( "./lfr/static/lfr/weig...
[ "cv2.rectangle", "cv2.imencode", "cv2.putText", "lfr.models.FacialExpressionModel", "cv2.VideoCapture", "cv2.cvtColor", "cv2.CascadeClassifier", "cv2.resize" ]
[((175, 265), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""./lfr/static/lfr/weights/haarcascade_frontalface_default.xml"""'], {}), "(\n './lfr/static/lfr/weights/haarcascade_frontalface_default.xml')\n", (196, 265), False, 'import cv2\n'), ((271, 380), 'lfr.models.FacialExpressionModel', 'FacialExpression...
from types import SimpleNamespace from hwtypes.adt import Enum, Product, TaggedUnion, Sum from hwtypes.adt_util import rebind_type from peak import family_closure from . import family from ..riscv import isa @family_closure(family) def ISA_fc(family): ns = isa.ISA_fc(family) class E(Product): rd =...
[ "peak.family_closure", "hwtypes.adt.Enum.Auto" ]
[((214, 236), 'peak.family_closure', 'family_closure', (['family'], {}), '(family)\n', (228, 236), False, 'from peak import family_closure\n'), ((391, 402), 'hwtypes.adt.Enum.Auto', 'Enum.Auto', ([], {}), '()\n', (400, 402), False, 'from hwtypes.adt import Enum, Product, TaggedUnion, Sum\n'), ((419, 430), 'hwtypes.adt....
# AUTOGENERATED! DO NOT EDIT! File to edit: TrainLoop.ipynb (unless otherwise specified). __all__ = ['UNET_UNIT', 'GANModule', 'GANLoss', 'GANTrainer', 'FixedGANSwitcher'] # Cell #export from fastai import * from fastai.vision import * from fastai.callbacks import * from fastai.utils.mem import * from fastai.vision.g...
[ "torch.unbind", "torch.split" ]
[((2552, 2581), 'torch.split', 'torch.split', (['output', '(3)'], {'dim': '(0)'}), '(output, 3, dim=0)\n', (2563, 2581), False, 'import torch\n'), ((2666, 2698), 'torch.split', 'torch.split', (['output[0]', '(1)'], {'dim': '(0)'}), '(output[0], 1, dim=0)\n', (2677, 2698), False, 'import torch\n'), ((2720, 2752), 'torch...
from py_pdf_term._common.data import Term from py_pdf_term.tokenizer import Token from py_pdf_term.tokenizer.langs import JapaneseTokenClassifier from ..base import BaseJapaneseCandidateTermFilter class JapaneseProperNounFilter(BaseJapaneseCandidateTermFilter): def __init__(self) -> None: self._classifie...
[ "py_pdf_term.tokenizer.langs.JapaneseTokenClassifier" ]
[((324, 349), 'py_pdf_term.tokenizer.langs.JapaneseTokenClassifier', 'JapaneseTokenClassifier', ([], {}), '()\n', (347, 349), False, 'from py_pdf_term.tokenizer.langs import JapaneseTokenClassifier\n')]
import subprocess import os import json import pyautogui os.chdir("/home/milind/wallpapers/") image = subprocess.run( 'find "/home/milind/wallpapers" -iname \'*.png\' -type f | fzf --preview "(kitty icat --place 60x60@66x7 --transfer-mode file {} )"', shell=True, stdout=subprocess.PIPE, ) image = image.s...
[ "pyautogui.press", "subprocess.run", "os.getcwd", "os.chdir", "json.load", "os.system" ]
[((58, 94), 'os.chdir', 'os.chdir', (['"""/home/milind/wallpapers/"""'], {}), "('/home/milind/wallpapers/')\n", (66, 94), False, 'import os\n'), ((104, 298), 'subprocess.run', 'subprocess.run', (['"""find "/home/milind/wallpapers" -iname \'*.png\' -type f | fzf --preview "(kitty icat --place 60x60@66x7 --transfer-mode ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- from setuptools import setup, find_packages from setup_utils import read, read_markdown PACKAGE_NAME = "django-rest-framework-expandable" PACKAGE_ROOT_NAME = "rest_framework_expandable" GITHUB_URL = "https://github.com/alexseitsinger/{}".format(PACKAGE_NAME) HOMEPAGE_URL...
[ "setup_utils.read_markdown", "setuptools.find_packages", "setup_utils.read" ]
[((1009, 1071), 'setup_utils.read', 'read', (["('src', PACKAGE_ROOT_NAME, '__init__.py')", '"""__version__"""'], {}), "(('src', PACKAGE_ROOT_NAME, '__init__.py'), '__version__')\n", (1013, 1071), False, 'from setup_utils import read, read_markdown\n'), ((1089, 1139), 'setup_utils.read_markdown', 'read_markdown', (['(RE...
''' Author: <NAME> Date: 2021-08-16 10:53:39 LastEditTime: 2021-08-16 11:18:19 LastEditors: Please set LastEditors Description: In User Settings Edit FilePath: /lanenet-lane-detection-pytorch/local_utils/init_logger.py ''' #!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2019/11/14 下午9:04 # @Author : MaybeS...
[ "model.utils.cli_helper.parse_args", "os.path.join", "time.time" ]
[((560, 583), 'model.utils.cli_helper.parse_args', 'cli_helper.parse_args', ([], {}), '()\n', (581, 583), False, 'from model.utils import cli_helper\n'), ((905, 938), 'os.path.join', 'ops.join', (['CFG.save', 'log_file_name'], {}), '(CFG.save, log_file_name)\n', (913, 938), True, 'import os.path as ops\n'), ((794, 805)...
""" Functionality for reading Capella SAR data into a SICD model. """ __classification__ = "UNCLASSIFIED" __author__ = ("<NAME>", "<NAME>") import logging import json from typing import Dict, Any, Tuple from datetime import datetime from collections import OrderedDict from scipy.constants import speed_of_light impo...
[ "logging.getLogger", "sarpy.io.complex.sicd_elements.CollectionInfo.RadarModeType", "sarpy.io.complex.sicd_elements.ImageFormation.RcvChanProcType", "sarpy.io.complex.sicd_elements.RadarCollection.WaveformParametersType", "numpy.linalg.norm", "sarpy.io.complex.sicd_elements.ImageData.ImageDataType", "sa...
[((1591, 1618), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1608, 1618), False, 'import logging\n'), ((2053, 2076), 'sarpy.io.general.utils.is_file_like', 'is_file_like', (['file_name'], {}), '(file_name)\n', (2065, 2076), False, 'from sarpy.io.general.utils import parse_timestring, g...
import debug_toolbar from django.conf.urls import url, include from django.contrib import admin from django.contrib.auth.decorators import login_required from django.contrib.auth.views import login, logout from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import DetailView, \...
[ "django.conf.urls.url", "cobl.lexicon.views.CognateClassCitationCreateView.as_view", "cobl.lexicon.views.CognateClassCitationUpdateView.as_view", "cobl.lexicon.views.NexusExportView.as_view", "cobl.lexicon.models.LanguageList.objects.all", "cobl.views.source_import.as_view", "django.views.generic.Detail...
[((3873, 3893), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (3891, 3893), False, 'from django.contrib import admin\n'), ((18450, 18475), 'django.contrib.staticfiles.urls.staticfiles_urlpatterns', 'staticfiles_urlpatterns', ([], {}), '()\n', (18473, 18475), False, 'from django.contrib.st...
#!/usr/bin/env python from pike.manager import PikeManager import sys,argparse import string plugins=[] def syntax(): print("Syntax: pwdecode -m hashtype hash"); def listplugins(): for plugin in plugins: print("Name: " + plugin['name']) print("Author: " + plugin['author']) print("Hashes supported:") for h...
[ "pike.manager.PikeManager", "argparse.ArgumentParser" ]
[((853, 914), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Decode encoded hashes."""'}), "(description='Decode encoded hashes.')\n", (876, 914), False, 'import sys, argparse\n'), ((504, 530), 'pike.manager.PikeManager', 'PikeManager', (['[plugin_path]'], {}), '([plugin_path])\n', (515,...
from decimal import Decimal from unittest.mock import Mock, patch import pytest from braintree import Environment, ErrorResult, SuccessfulResult, Transaction from braintree.errors import Errors from braintree.validation_error import ValidationError from django.core.exceptions import ImproperlyConfigured from ....inte...
[ "unittest.mock.Mock", "pytest.raises", "pytest.mark.vcr", "unittest.mock.patch", "decimal.Decimal" ]
[((5952, 6016), 'unittest.mock.patch', 'patch', (['"""saleor.payment.gateways.braintree.get_braintree_gateway"""'], {}), "('saleor.payment.gateways.braintree.get_braintree_gateway')\n", (5957, 6016), False, 'from unittest.mock import Mock, patch\n'), ((6586, 6650), 'unittest.mock.patch', 'patch', (['"""saleor.payment.g...
#!/usr/bin/env python3 from PIL import Image from collections import deque # Use intmachine from ../common import sys sys.path.insert(0,'../common') from intmachine import Intmachine # up, right, down, left dirs = ((0, -1), (1, 0), (0, 1), (-1, 0)) dirchange = (-1, 1) curdir = 0 rx = 0 ry = 0 # (x, y) paintcoords = [...
[ "PIL.Image.new", "intmachine.Intmachine", "sys.path.insert", "collections.deque" ]
[((119, 150), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../common"""'], {}), "(0, '../common')\n", (134, 150), False, 'import sys\n'), ((1473, 1518), 'intmachine.Intmachine', 'Intmachine', (['"""d11"""', 'prog', 'queues[0]', 'queues[1]'], {}), "('d11', prog, queues[0], queues[1])\n", (1483, 1518), False, 'from...
"""Example client using some of the most common API patterns """ import models import azure.core.pipeline.transport as transports class Thing(object): """A simple model type representing a Thing. :ivar name: The name of the thing. :vartype name: str :ivar size: The size of the thing. :vartype s...
[ "azure.core.pipeline.transport.RequestsTransport" ]
[((2008, 2046), 'azure.core.pipeline.transport.RequestsTransport', 'transports.RequestsTransport', ([], {}), '(**kwargs)\n', (2036, 2046), True, 'import azure.core.pipeline.transport as transports\n')]
"""Common fixtures and objects for the Switcher integration tests.""" from asyncio import Queue from datetime import datetime from typing import Any, Generator, Optional from asynctest import CoroutineMock, patch from pytest import fixture from .consts import ( DUMMY_AUTO_OFF_SET, DUMMY_DEVICE_ID, DUMMY_...
[ "asyncio.Queue", "asynctest.patch", "datetime.datetime.now", "pytest.fixture", "asynctest.CoroutineMock" ]
[((510, 555), 'asynctest.patch', 'patch', (['"""aioswitcher.devices.SwitcherV2Device"""'], {}), "('aioswitcher.devices.SwitcherV2Device')\n", (515, 555), False, 'from asynctest import CoroutineMock, patch\n'), ((2345, 2372), 'pytest.fixture', 'fixture', ([], {'name': '"""mock_bridge"""'}), "(name='mock_bridge')\n", (23...
import torch from vedacore.misc import registry from vedadet.bridge import build_converter, build_meshgrid from vedadet.misc.bbox import bbox2result, multiclass_nms from .base_engine import BaseEngine @registry.register_module('engine') class InferEngine(BaseEngine): def __init__(self, model, meshgrid, converte...
[ "vedacore.misc.registry.register_module", "vedadet.bridge.build_meshgrid", "vedadet.misc.bbox.bbox2result", "vedadet.bridge.build_converter", "torch.cat", "vedadet.misc.bbox.multiclass_nms" ]
[((205, 239), 'vedacore.misc.registry.register_module', 'registry.register_module', (['"""engine"""'], {}), "('engine')\n", (229, 239), False, 'from vedacore.misc import registry\n'), ((433, 457), 'vedadet.bridge.build_meshgrid', 'build_meshgrid', (['meshgrid'], {}), '(meshgrid)\n', (447, 457), False, 'from vedadet.bri...
from datetime import datetime import unittest from pypushwoosh import constants from pypushwoosh.exceptions import PushwooshFilterInvalidOperatorException, PushwooshFilterInvalidOperandException from pypushwoosh.filter import ApplicationFilter, ApplicationGroupFilter, IntegerTagFilter, StringTagFilter, \ ListTagFil...
[ "pypushwoosh.filter.StringTagFilterByApplication", "pypushwoosh.filter.ApplicationFilter", "pypushwoosh.filter.BooleanTagFilterByApplication", "datetime.datetime.strptime", "pypushwoosh.filter.DaysTagFilterByApplication", "pypushwoosh.filter.DateTagFilterByApplication", "pypushwoosh.filter.StringTagFilt...
[((11389, 11450), 'datetime.datetime.strptime', 'datetime.strptime', (['"""2013-06-22 00:00:00"""', '"""%Y-%m-%d %H:%M:%S"""'], {}), "('2013-06-22 00:00:00', '%Y-%m-%d %H:%M:%S')\n", (11406, 11450), False, 'from datetime import datetime\n'), ((14095, 14165), 'pypushwoosh.filter.StringTagFilter', 'StringTagFilter', (['t...
import argparse import csv from itertools import combinations from pathlib import Path from dcctools.config import Configuration parser = argparse.ArgumentParser( description="Tool for scoring household linkage results" ) parser.add_argument( "--dotools", nargs=1, required=True, help="data-owner-tools project...
[ "argparse.ArgumentParser", "pathlib.Path", "dcctools.config.Configuration", "itertools.combinations", "csv.reader" ]
[((140, 226), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Tool for scoring household linkage results"""'}), "(description=\n 'Tool for scoring household linkage results')\n", (163, 226), False, 'import argparse\n'), ((381, 402), 'pathlib.Path', 'Path', (['args.dotools[0]'], {}), '(...
# -*- coding: utf-8 -*- # # Copyright (c) 2021 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause """ Common functions that are useful for both JSON and Tag-value document creation """ import datetime import hashlib import logging import re import uuid from tern.utils import constants from ter...
[ "logging.getLogger", "datetime.datetime.utcnow", "uuid.uuid4", "re.sub", "tern.formats.spdx.spdxtagvalue.formats.package_id.format" ]
[((405, 445), 'logging.getLogger', 'logging.getLogger', (['constants.logger_name'], {}), '(constants.logger_name)\n', (422, 445), False, 'import logging\n'), ((3944, 4022), 'tern.formats.spdx.spdxtagvalue.formats.package_id.format', 'spdx_formats.package_id.format', ([], {'name': 'package_obj.name', 'ver': 'package_obj...
""" Common routines for models in Chainer. """ __all__ = ['round_channels', 'BreakBlock', 'ReLU6', 'HSwish', 'get_activation_layer', 'GlobalAvgPool2D', 'SelectableDense', 'DenseBlock', 'ConvBlock1d', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x3_block', 'co...
[ "chainer.functions.max", "chainer.functions.concat", "chainer.functions.argmax", "chainer.links.Convolution2D", "chainer.functions.clip", "chainer.functions.batch_matmul", "chainer.functions.average_pooling_2d", "chainer.links.Linear", "chainer.functions.resize_images", "chainer.initializers._get_...
[((3294, 3316), 'inspect.isfunction', 'isfunction', (['activation'], {}), '(activation)\n', (3304, 3316), False, 'from inspect import isfunction\n'), ((10640, 10771), 'chainer.links.Convolution2D', 'L.Convolution2D', ([], {'in_channels': 'in_channels', 'out_channels': 'out_channels', 'ksize': '(1)', 'stride': 'stride',...
"""InfluxDBClient is client for API defined in https://github.com/influxdata/influxdb/blob/master/http/swagger.yml.""" from __future__ import absolute_import import configparser import os from influxdb_client import Configuration, ApiClient, HealthCheck, HealthService, Ready, ReadyService from influxdb_client.client...
[ "configparser.ConfigParser", "influxdb_client.Configuration.__init__", "influxdb_client.client.authorizations_api.AuthorizationsApi", "influxdb_client.client.organizations_api.OrganizationsApi", "influxdb_client.client.write_api.PointSettings", "influxdb_client.client.write_api.WriteOptions", "influxdb_...
[((2899, 3012), 'influxdb_client.ApiClient', 'ApiClient', ([], {'configuration': 'conf', 'header_name': 'auth_header_name', 'header_value': 'auth_header_value', 'retries': 'retries'}), '(configuration=conf, header_name=auth_header_name, header_value=\n auth_header_value, retries=retries)\n', (2908, 3012), False, 'fr...
#!/usr/bin/env python3 # Copyright 2019 Brocade Communications Systems LLC. 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 also obtain a copy of the License at # http://www.apache.org/licenses/LICENS...
[ "pyfos.pyfos_auth.logout", "pyfos.utils.brcd_util.getsession", "pyfos.pyfos_util.response_print", "pyfos.utils.brcd_util.parse" ]
[((3884, 3933), 'pyfos.utils.brcd_util.parse', 'brcd_util.parse', (['argv', 'zonecfg', 'filters', 'validate'], {}), '(argv, zonecfg, filters, validate)\n', (3899, 3933), False, 'from pyfos.utils import brcd_util\n'), ((3948, 3976), 'pyfos.utils.brcd_util.getsession', 'brcd_util.getsession', (['inputs'], {}), '(inputs)\...
import io from setuptools import setup, find_packages from paperswithcode import __version__ name = "paperswithcode-client" author = "<NAME>" author_email = "<EMAIL>" url = "https://github.com/paperswithcode/paperswithcode-client" setup( name=name, version=__version__, author=author, author_email=aut...
[ "setuptools.find_packages", "io.open" ]
[((672, 687), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (685, 687), False, 'from setuptools import setup, find_packages\n'), ((471, 514), 'io.open', 'io.open', (['"""README.md"""', '"""r"""'], {'encoding': '"""utf-8"""'}), "('README.md', 'r', encoding='utf-8')\n", (478, 514), False, 'import io\n'),...
# -*- coding: utf-8 -*- """ replacing new strings with old translations """ import polib #old (translated) string #new renamed string pairs=""" An initiative by web designers to inform users about browser-updates An initiative by websites to inform users to update their web browser If you are on a computer that is ma...
[ "polib.pofile", "glob.glob" ]
[((635, 683), 'polib.pofile', 'polib.pofile', (['"""lang/de_DE/LC_MESSAGES/update.po"""'], {}), "('lang/de_DE/LC_MESSAGES/update.po')\n", (647, 683), False, 'import polib\n'), ((1187, 1233), 'polib.pofile', 'polib.pofile', (['"""lang/de_DE/LC_MESSAGES/site.po"""'], {}), "('lang/de_DE/LC_MESSAGES/site.po')\n", (1199, 12...
from django.db import models import uuid from .search import PostIndex from django.contrib.auth.models import User class BaseModel(models.Model): created_at = models.DateTimeField(auto_now=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True class Post(BaseModel): ...
[ "django.db.models.Index", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "uuid.uuid4", "django.db.models.DateTimeField" ]
[((165, 200), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), '(auto_now=True)\n', (185, 200), False, 'from django.db import models\n'), ((218, 253), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), '(auto_now=True)\n', (238, 253), False, 'f...
# Copyright (C) 2015-2019 by Vd. # This file is part of RocketGram, the modern Telegram bot framework. # RocketGram is released under the MIT License (see LICENSE). import logging from dataclasses import dataclass from typing import Callable, Coroutine, AsyncGenerator, Union, List, TYPE_CHECKING from .filters import ...
[ "logging.getLogger" ]
[((609, 651), 'logging.getLogger', 'logging.getLogger', (['"""rocketgram.dispatcher"""'], {}), "('rocketgram.dispatcher')\n", (626, 651), False, 'import logging\n')]
# 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 ...
[ "numpy.where" ]
[((1284, 1315), 'numpy.where', 'np.where', (['(preds == -1)', '(0)', 'preds'], {}), '(preds == -1, 0, preds)\n', (1292, 1315), True, 'import numpy as np\n')]
"""Click customizations for Celery.""" import json from collections import OrderedDict from functools import update_wrapper from pprint import pformat import click from click import ParamType from kombu.utils.objects import cached_property from celery._state import get_current_app from celery.signals import user_prel...
[ "pygments.formatters.Terminal256Formatter", "collections.OrderedDict", "json.loads", "pygments.lexers.PythonLexer", "click.secho", "celery.utils.text.str_to_list", "celery.utils.log.mlevel", "click.style", "celery.utils.time.maybe_iso8601", "json.dumps", "pprint.pformat", "pygments.highlight",...
[((781, 794), 'pygments.lexers.PythonLexer', 'PythonLexer', ([], {}), '()\n', (792, 794), False, 'from pygments.lexers import PythonLexer\n'), ((811, 833), 'pygments.formatters.Terminal256Formatter', 'Terminal256Formatter', ([], {}), '()\n', (831, 833), False, 'from pygments.formatters import Terminal256Formatter\n'), ...
from setuptools import setup, find_packages from xstatic.pkg import angular_material as xs # The README.txt file should be written in reST so that PyPI can use # it to generate your project's PyPI page. long_description = open('README.rst').read() setup( name=xs.PACKAGE_NAME, version=xs.PACKAGE_VERSION, d...
[ "setuptools.find_packages" ]
[((602, 617), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (615, 617), False, 'from setuptools import setup, find_packages\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-09-26 15:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0013_auto_20170915_1717'), ] operations = [ migrations.CreateModel( ...
[ "django.db.models.DateTimeField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((398, 491), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (414, 491), False, 'from django.db import migrations, models\...
import numpy from .eval_splines import eval_cubic ## the functions in this file provide backward compatibility calls ## ## they can optionnally allocate memory for the result ## they work for any dimension, except the functions which compute the gradient ####################### # Compatibility calls # ##############...
[ "numpy.array", "numpy.empty" ]
[((4810, 4837), 'numpy.array', 'numpy.array', (['a'], {'dtype': 'float'}), '(a, dtype=float)\n', (4821, 4837), False, 'import numpy\n'), ((4846, 4873), 'numpy.array', 'numpy.array', (['b'], {'dtype': 'float'}), '(b, dtype=float)\n', (4857, 4873), False, 'import numpy\n'), ((4887, 4917), 'numpy.array', 'numpy.array', ([...
#!/usr/bin/python #-*- coding: UTF-8 -*- import os import sys import shutil import json import utils from . import gen_prebuilt_mk import adxe from MultiLanguage import MultiLanguage from adxe import CCPluginError from adxe import Logging from argparse import ArgumentParser class LibsCompiler(adxe.CCPlugin): CF...
[ "adxe.copy_files_with_config", "adxe.os_is_32bit_windows", "os.path.exists", "os.listdir", "MultiLanguage.MultiLanguage.get_string", "os.path.normpath", "adxe.os_is_win32", "os.path.isdir", "os.path.expanduser", "os.path.isabs", "utils.rmdir", "os.path.splitext", "os.path.isfile", "os.path...
[((946, 988), 'MultiLanguage.MultiLanguage.get_string', 'MultiLanguage.get_string', (['"""GEN_LIBS_BRIEF"""'], {}), "('GEN_LIBS_BRIEF')\n", (970, 988), False, 'from MultiLanguage import MultiLanguage\n'), ((3549, 3591), 'os.path.normpath', 'os.path.normpath', (['self.default_engine_path'], {}), '(self.default_engine_pa...
#!/usr/bin/env python # # Copyright 2018 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-only # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FO...
[ "ansible.module_utils.basic.AnsibleModule", "inspect.isclass", "time.sleep", "ansible.module_utils._text.to_native", "ansible.module_utils.policy_communicator.PolicyCommunicator.get_instance", "ansible.module_utils.policy_communicator.PolicyCommunicator.get_vmware_argument_spec" ]
[((3058, 3206), 'ansible.module_utils.policy_communicator.PolicyCommunicator.get_instance', 'PolicyCommunicator.get_instance', (['mgr_hostname', 'mgr_username', 'mgr_password', 'nsx_cert_path', 'nsx_key_path', 'request_headers', 'ca_path', 'validate_certs'], {}), '(mgr_hostname, mgr_username, mgr_password,\n nsx_cer...