code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
### TAP/FLAP Project ### Python script for checking if all textgrids have been adjusted ### instructions: In command line/terminal, run python checkadjusting.py TG_DIR, ### where TG_DIR is the directory containing the textgrids. ## Packages that need to be downloaded: audiolabel ##<NAME>, July 2019 import aud...
[ "argparse.ArgumentParser", "audiolabel.LabelManager", "numpy.arange", "os.path.join", "os.listdir" ]
[((450, 475), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (473, 475), False, 'import argparse\n'), ((914, 932), 'os.listdir', 'os.listdir', (['tg_dir'], {}), '(tg_dir)\n', (924, 932), False, 'import os, glob, re\n'), ((996, 1026), 'os.path.join', 'os.path.join', (['tg_dir', 'textgrid'], {}),...
import torch from torch import nn import torch.nn.functional as F from torch_scatter import scatter_add import math class SETLayer(nn.Module): r"""Impliments an evolutionary sparse layer. Args: in_features (int): size of each input sample out_features (int): size of each output sample ...
[ "torch.ones_like", "torch.mean", "torch.topk", "math.sqrt", "torch.zeros_like", "torch.nonzero", "torch.cat", "torch.randn", "torch.Tensor", "torch_scatter.scatter_add", "torch.sum", "torch.tensor" ]
[((6167, 6193), 'torch.cat', 'torch.cat', (['new_locs'], {'dim': '(0)'}), '(new_locs, dim=0)\n', (6176, 6193), False, 'import torch\n'), ((7017, 7056), 'torch.topk', 'torch.topk', (['tens'], {'k': 'neg_k', 'largest': '(True)'}), '(tens, k=neg_k, largest=True)\n', (7027, 7056), False, 'import torch\n'), ((7191, 7231), '...
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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, ...
[ "ixnetwork_restpy.testplatform.sessions.ixnetwork.topology.pcepmetricsubobjectslist_b1398d82dd25e8e98d50662ebf5ba3d1.PcepMetricSubObjectsList", "ixnetwork_restpy.testplatform.sessions.ixnetwork.topology.pceperosubobjectslist_7ea27079d1a1d53cebc6e1e83b2ca0b4.PcepEroSubObjectsList", "ixnetwork_restpy.testplatform...
[((4272, 4298), 'ixnetwork_restpy.testplatform.sessions.ixnetwork.topology.pcexrosubobjectslist_497bc286ebfb51b8813947a23cd5817a.PceXroSubObjectsList', 'PceXroSubObjectsList', (['self'], {}), '(self)\n', (4292, 4298), False, 'from ixnetwork_restpy.testplatform.sessions.ixnetwork.topology.pcexrosubobjectslist_497bc286eb...
# Generated by Django 3.2.4 on 2021-06-26 20:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pdn', '0003_auto_20210626_2044'), ] operations = [ migrations.AddField( model_name='alert', name='ignore', ...
[ "django.db.models.BooleanField" ]
[((329, 362), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)'}), '(default=True)\n', (348, 362), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python3 # # embed_kernel_predictions.py: embeds the individual kernels into 2D by # using their actual predictions on all data sets. import argparse from sklearn.manifold import MDS from scipy.spatial.distance import pdist from scipy.spatial.distance import squareform import numpy as np import pandas...
[ "pandas.DataFrame", "argparse.ArgumentParser", "pandas.read_csv", "scipy.spatial.distance.pdist", "sklearn.manifold.MDS" ]
[((709, 771), 'sklearn.manifold.MDS', 'MDS', ([], {'metric': '(True)', 'dissimilarity': '"""precomputed"""', 'random_state': '(42)'}), "(metric=True, dissimilarity='precomputed', random_state=42)\n", (712, 771), False, 'from sklearn.manifold import MDS\n'), ((883, 908), 'argparse.ArgumentParser', 'argparse.ArgumentPars...
"""Init sqlalchemy.""" from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy( session_options={ "autoflush": False, "autocommit": False, } )
[ "flask_sqlalchemy.SQLAlchemy" ]
[((69, 138), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {'session_options': "{'autoflush': False, 'autocommit': False}"}), "(session_options={'autoflush': False, 'autocommit': False})\n", (79, 138), False, 'from flask_sqlalchemy import SQLAlchemy\n')]
from unittest import mock from mitmproxy.addons import browser from mitmproxy.test import taddons def test_browser(): with mock.patch("subprocess.Popen") as po, mock.patch("shutil.which") as which: which.return_value = "chrome" b = browser.Browser() with taddons.context() as tctx: ...
[ "unittest.mock.patch", "mitmproxy.test.taddons.context", "mitmproxy.addons.browser.Browser" ]
[((130, 160), 'unittest.mock.patch', 'mock.patch', (['"""subprocess.Popen"""'], {}), "('subprocess.Popen')\n", (140, 160), False, 'from unittest import mock\n'), ((168, 194), 'unittest.mock.patch', 'mock.patch', (['"""shutil.which"""'], {}), "('shutil.which')\n", (178, 194), False, 'from unittest import mock\n'), ((255...
# coding=utf-8 # """ Copyright (c) 2021, <NAME>. All rights reserved. license: BSD 3-Clause License, see LICENSE for more details. """ from zm.utils import hashOrdObj def _genSchemeWithFilter(confscheme, fromTaskParam, sugarParam): byfilterDictVars = confscheme['byfilter']['dict-vars'] origSchemeFunc = co...
[ "zm.utils.hashOrdObj" ]
[((1334, 1361), 'zm.utils.hashOrdObj', 'hashOrdObj', (['[_for, _notfor]'], {}), '([_for, _notfor])\n', (1344, 1361), False, 'from zm.utils import hashOrdObj\n')]
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.12.0 # kernelspec: # display_name: Python [conda env:moire-figures] # language: python...
[ "numpy.abs", "scipy.ndimage.gaussian_filter1d", "numpy.clip", "numpy.isnan", "matplotlib.pyplot.figure", "mpl_toolkits.axes_grid1.inset_locator.inset_axes", "matplotlib.pyplot.gca", "pyGPA.imagetools.to_KovesiRGB", "os.path.join", "matplotlib.pyplot.imshow", "latticegen.hexlattice_gen_fast", "...
[((1369, 1468), 'numpy.array', 'np.array', (['[[962, 999], [834, 247], [650, 600], [597, 615], [617, 1109], [501, 190], [\n 377, 236]]'], {}), '([[962, 999], [834, 247], [650, 600], [597, 615], [617, 1109], [501,\n 190], [377, 236]])\n', (1377, 1468), True, 'import numpy as np\n'), ((1630, 1702), 'numpy.array', '...
# Generated by Django 2.0.5 on 2018-08-04 15:59 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('restapi', '0007_auto_201...
[ "django.db.migrations.swappable_dependency", "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((7040, 7220), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', ...
# Copyright (C) 2006-2016, <NAME> <<EMAIL>> # and ftputil contributors (see `doc/contributors.txt`) # See the file LICENSE for licensing terms. from __future__ import unicode_literals import time import pytest import ftputil.error import ftputil.stat_cache from test import test_base class TestStatCache(object): ...
[ "pytest.raises", "test.test_base.ftp_host_factory", "time.sleep" ]
[((1781, 1796), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (1791, 1796), False, 'import time\n'), ((1886, 1901), 'time.sleep', 'time.sleep', (['(0.6)'], {}), '(0.6)\n', (1896, 1901), False, 'import time\n'), ((2264, 2279), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (2274, 2279), False, 'import...
# Copyright 2014 # The Cloudscaling Group, Inc. # # 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...
[ "oslo_db.options.set_defaults", "oslo_log.log.register_options", "oslo_log.log.set_defaults", "ec2api.paths.state_path_def", "ec2api.version.version_info.version_string" ]
[((783, 820), 'ec2api.paths.state_path_def', 'paths.state_path_def', (['"""ec2api.sqlite"""'], {}), "('ec2api.sqlite')\n", (803, 820), False, 'from ec2api import paths\n'), ((1625, 1695), 'oslo_log.log.set_defaults', 'log.set_defaults', (['_DEFAULT_LOGGING_CONTEXT_FORMAT', '_DEFAULT_LOG_LEVELS'], {}), '(_DEFAULT_LOGGIN...
import pytest from conda_forge_tick.hashing import hash_url, _hash_url def test_hashing_smoke(): url = "https://github.com/LSSTDESC/CLMM/archive/0.1.0.tar.gz" hsh = hash_url(url) assert hsh == "902cd1b15783a770a23b0950287f42e798f3b8aadb5bbf07b864ca37499a29e9" def test_hashing_progress(): url = "htt...
[ "pytest.raises", "conda_forge_tick.hashing._hash_url", "conda_forge_tick.hashing.hash_url" ]
[((176, 189), 'conda_forge_tick.hashing.hash_url', 'hash_url', (['url'], {}), '(url)\n', (184, 189), False, 'from conda_forge_tick.hashing import hash_url, _hash_url\n'), ((382, 410), 'conda_forge_tick.hashing.hash_url', 'hash_url', (['url'], {'progress': '(True)'}), '(url, progress=True)\n', (390, 410), False, 'from c...
# -*- coding: utf-8 -*- # Import Python Libs from __future__ import absolute_import # Import Salt Testing libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase # Import Salt libs import salt.renderers.yaml as yaml class YAMLRendererTestCase(TestCase, LoaderModuleMockMi...
[ "salt.renderers.yaml.render" ]
[((470, 487), 'salt.renderers.yaml.render', 'yaml.render', (['data'], {}), '(data)\n', (481, 487), True, 'import salt.renderers.yaml as yaml\n'), ((642, 659), 'salt.renderers.yaml.render', 'yaml.render', (['data'], {}), '(data)\n', (653, 659), True, 'import salt.renderers.yaml as yaml\n')]
from stock_prediction import create_model, load_data from tensorflow.keras.layers import LSTM from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard import os import pandas as pd from parameters import * # create these folders if they does not exist if not os.path.isdir("results"): os.mkdir("results"...
[ "os.mkdir", "os.path.isdir", "pandas.read_csv", "stock_prediction.load_data", "os.path.isfile", "os.path.join", "stock_prediction.create_model" ]
[((513, 549), 'os.path.isfile', 'os.path.isfile', (['ticker_data_filename'], {}), '(ticker_data_filename)\n', (527, 549), False, 'import os\n'), ((622, 731), 'stock_prediction.load_data', 'load_data', (['ticker', 'N_STEPS'], {'lookup_step': 'LOOKUP_STEP', 'test_size': 'TEST_SIZE', 'feature_columns': 'FEATURE_COLUMNS'})...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology. # SPDX-FileCopyrightText: © 2021 <NAME> <<EMAIL>> # NOTICE: authors should document their contributions in concisely in NOTICE # with details inline in source files...
[ "logging.debug", "signal.getsignal", "threading.main_thread", "signal.signal", "threading.current_thread" ]
[((437, 463), 'threading.current_thread', 'threading.current_thread', ([], {}), '()\n', (461, 463), False, 'import threading\n'), ((467, 490), 'threading.main_thread', 'threading.main_thread', ([], {}), '()\n', (488, 490), False, 'import threading\n'), ((622, 653), 'signal.getsignal', 'signal.getsignal', (['signal.SIGI...
from flask import Flask, request, jsonify from mongo_driver import MongoDriver from enumerations import School import json app = Flask(__name__) mongo_driver = MongoDriver() school_options = [School.ANY, School.COLLEGE_OF_ARTS_AND_SCIENCES, School.ENGINEERING, School.NURSING, School.WHARTON] @app.route("/search") def...
[ "mongo_driver.MongoDriver", "flask.Flask", "flask.request.args.get" ]
[((130, 145), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (135, 145), False, 'from flask import Flask, request, jsonify\n'), ((161, 174), 'mongo_driver.MongoDriver', 'MongoDriver', ([], {}), '()\n', (172, 174), False, 'from mongo_driver import MongoDriver\n'), ((386, 410), 'flask.request.args.get', 'req...
# Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "google.appengine.ext.db.DateTimeProperty", "google.appengine.ext.db.UserProperty", "google.appengine.ext.db.StringProperty", "google.appengine.ext.db.BooleanProperty", "google.appengine.ext.db.TextProperty", "google.appengine.ext.db.run_in_transaction" ]
[((938, 970), 'google.appengine.ext.db.StringProperty', 'db.StringProperty', ([], {'required': '(True)'}), '(required=True)\n', (955, 970), False, 'from google.appengine.ext import db\n'), ((987, 1020), 'google.appengine.ext.db.StringProperty', 'db.StringProperty', ([], {'required': '(False)'}), '(required=False)\n', (...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import builtins import logging import os import platform import shutil import sys import traceback from pathlib import Path import IPython from IPython.core.release import version_info from IPython.terminal.prompts import ClassicPrompts from traitlets.config.application i...
[ "logging.error", "logging.exception", "pathlib.Path.home", "logging.basicConfig", "traitlets.config.application.get_config", "os.environ.copy", "shutil.which", "os.environ.get", "platform.system", "os.path.join" ]
[((585, 677), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': 'default_log_format', 'datefmt': 'log_datefmt'}), '(level=logging.INFO, format=default_log_format, datefmt=\n log_datefmt)\n', (604, 677), False, 'import logging\n'), ((1292, 1304), 'traitlets.config.application.get_...
# Diel dilution experiment data analysis # Use this notebook to analyze diel dilution experiment data # Author: <NAME>, <NAME>, <NAME> # Other information # Model 2 regression from https://github.com/OceanOptics/pylr2 # T-test info found at https://towardsdatascience.com/inferential-statistics-series-t-test-using-...
[ "pandas.DataFrame", "math.isnan", "numpy.log", "scipy.stats.ttest_rel", "statistics.stdev", "pandas.read_excel", "numpy.mean", "numpy.array", "statistics.mean" ]
[((25681, 25733), 'pandas.read_excel', 'pd.read_excel', (['file_to_read'], {'sheet_name': 'sheet_to_use'}), '(file_to_read, sheet_name=sheet_to_use)\n', (25694, 25733), True, 'import pandas as pd\n'), ((26193, 26211), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (26205, 26211), True, 'import pandas a...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # <NAME> (<EMAIL>) from ddynamic_reconfigure_python.ddynamic_reconfigure import DDynamicReconfigure import py_trees as pt import bb_enums import rospy class ReconfigServer(object): def __init__(self, config): """ Read the defaults f...
[ "py_trees.blackboard.Blackboard", "ddynamic_reconfigure_python.ddynamic_reconfigure.DDynamicReconfigure" ]
[((557, 583), 'py_trees.blackboard.Blackboard', 'pt.blackboard.Blackboard', ([], {}), '()\n', (581, 583), True, 'import py_trees as pt\n'), ((691, 731), 'ddynamic_reconfigure_python.ddynamic_reconfigure.DDynamicReconfigure', 'DDynamicReconfigure', (['"""smarc_bt_reconfig"""'], {}), "('smarc_bt_reconfig')\n", (710, 731)...
import unittest from app.models import News class NewsTest(unittest.TestCase): ''' Test Class to test the behaviour of the News class ''' def setUp(self): ''' Set up method that will run before every Test ''' self.new_news = News(1234,'Kanye West Used Cars From Wyoming...
[ "app.models.News" ]
[((276, 544), 'app.models.News', 'News', (['(1234)', '"""Kanye West Used Cars From Wyoming Going Up for Auction - TMZ"""', '"""Kanye West former fleet from his Wyoming ranch is on the auction block"""', '""""https://imagez.tmz.com/image/5a/16by9/2021/10/28/5af2e450cbf44b55af7195506259d84d_xl.jpg\\""""', '(8.5)', '(1299...
from django.db import models from django.contrib.auth.models import AbstractUser from django.contrib.auth import get_user_model # from PIL import Image from pathlib import Path # Create your models here. class User(AbstractUser): """ Subclasses the AbstractUser to change the username max_length argument. ...
[ "django.db.models.CharField", "pathlib.Path", "django.contrib.auth.get_user_model", "django.db.models.ImageField" ]
[((340, 548), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(12)', 'unique': '(True)', 'help_text': '"""Required. 12 characters or fewer. Letters, digits and @/./+/-/_ only."""', 'error_messages': "{'unique': 'A user with that username already exists.'}"}), "(max_length=12, unique=True, help_te...
''' Fuzz tests combining use of the pandas engine and expression simplification methods to validate: * Pandas engine handles whatever is thrown at it. * Query after simplification gives the same result. TODO * Operates on 3D numeric data at the moment: needs to be extended. * Use this to check that expand_dnf gives Fa...
[ "split_query.core.Attribute", "split_query.core.to_dnf_simplified", "hypothesis.event", "split_query.core.logic.get_variables", "split_query.engine.query_df" ]
[((1095, 1111), 'split_query.core.Attribute', 'Attribute', (['"""dtx"""'], {}), "('dtx')\n", (1104, 1111), False, 'from split_query.core import Attribute, to_dnf_simplified\n'), ((1120, 1138), 'split_query.core.Attribute', 'Attribute', (['"""point"""'], {}), "('point')\n", (1129, 1138), False, 'from split_query.core im...
import cv2 import pafy #import tensorflow as tf import numpy as np import time from openvino.inference_engine import IENetwork, IEPlugin import sys class VideoStream(object): sModelPath = "app/static/model/" #sModelName = "ssd_mobilenet_v1_coco_2018_01_28" sModelName = "ssd_mobilenet_v2_coco_2018_03_...
[ "cv2.resize", "openvino.inference_engine.IENetwork", "pafy.new", "cv2.VideoCapture", "cv2.rectangle", "openvino.inference_engine.IEPlugin", "cv2.meanStdDev", "cv2.imencode", "sys.exit" ]
[((1741, 1754), 'pafy.new', 'pafy.new', (['url'], {}), '(url)\n', (1749, 1754), False, 'import pafy\n'), ((1860, 1911), 'openvino.inference_engine.IEPlugin', 'IEPlugin', ([], {'device': '"""CPU"""', 'plugin_dirs': 'self.sPluginDir'}), "(device='CPU', plugin_dirs=self.sPluginDir)\n", (1868, 1911), False, 'from openvino....
# -*- coding: utf-8 -*- #from .context import sample import os import pathlib import collections import datetime import time from ExifUtils.core import (get_exiftool_commands, run_exiftool, write_exif_gps_data, write_exif_comment, write_exif_date_original, write_exif_date_modified, write_author, process_image, verify...
[ "unittest.main", "os.path.abspath", "datetime.datetime.now", "datetime.timedelta" ]
[((5575, 5590), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5588, 5590), False, 'import unittest\n'), ((639, 664), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (654, 664), False, 'import os\n'), ((3371, 3394), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (339...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging import os from pathlib import Path import pylightxl as xl from urllib.parse import urlencode, quote from pprint import pprint from datetime import date from .domains import Domains from .services import Services from .api import API from .links import Lin...
[ "os.path.abspath", "datetime.date.today", "os.path.isfile", "pathlib.Path", "pylightxl.readxl", "pylightxl.Database", "os.path.join" ]
[((1877, 1889), 'datetime.date.today', 'date.today', ([], {}), '()\n', (1887, 1889), False, 'from datetime import date\n'), ((4172, 4197), 'os.path.abspath', 'os.path.abspath', (['pathname'], {}), '(pathname)\n', (4187, 4197), False, 'import os\n'), ((4679, 4701), 'pylightxl.readxl', 'xl.readxl', ([], {'fn': 'filename'...
import unittest from meu_grafo import * from bibgrafo.grafo_exceptions import * class TestGrafo(unittest.TestCase): def setUp(self): # Grafo da Paraíba self.g_p = MeuGrafo(['J', 'C', 'E', 'P', 'M', 'T', 'Z']) self.g_p.adicionaAresta('a1', 'J', 'C') self.g_p.adicionaAresta('a2', 'C', 'E') self.g_...
[ "unittest.main" ]
[((11406, 11421), 'unittest.main', 'unittest.main', ([], {}), '()\n', (11419, 11421), False, 'import unittest\n')]
from io import BytesIO import json import logging import math import os import re from tempfile import TemporaryFile import boto3 import botocore from pyspark.sql.types import StructType from warcio.archiveiterator import ArchiveIterator from warcio.recordloader import ArchiveLoadFailed from seldonite.spark.spark_too...
[ "os.path.abspath", "boto3.client", "logging.basicConfig", "math.ceil", "os.path.dirname", "tempfile.TemporaryFile", "warcio.archiveiterator.ArchiveIterator", "logging.getLogger", "re.compile" ]
[((1051, 1115), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'self.log_level', 'format': 'LOGGING_FORMAT'}), '(level=self.log_level, format=LOGGING_FORMAT)\n', (1070, 1115), False, 'import logging\n'), ((1439, 1494), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'level', 'format': 'LOGGIN...
from uselect import poll from usys import stdin from pybricks.pupdevices import Motor from pybricks.parameters import Port, Direction, Button from pybricks.tools import wait from pybricks.hubs import TechnicHub input_buffer = "" loop_poll = poll() loop_poll.register(stdin) left = Motor(Port.A) right = Motor(Port.B, ...
[ "pybricks.hubs.TechnicHub", "pybricks.pupdevices.Motor", "usys.stdin.read", "pybricks.tools.wait", "uselect.poll" ]
[((243, 249), 'uselect.poll', 'poll', ([], {}), '()\n', (247, 249), False, 'from uselect import poll\n'), ((284, 297), 'pybricks.pupdevices.Motor', 'Motor', (['Port.A'], {}), '(Port.A)\n', (289, 297), False, 'from pybricks.pupdevices import Motor\n'), ((306, 366), 'pybricks.pupdevices.Motor', 'Motor', (['Port.B'], {'po...
import pygame import constants import utils from graphics_environment import Environment, Triggers import os, sys import time from graphics_fauna import Player, Npcs from dialogs import DialogFight, TextDialog, DialogPlayerInventory, DialogInput # ----------------------------------------------------------- # ...
[ "utils.get_previous_map_name", "utils.read_file", "graphics_fauna.Npcs", "pygame.event.get", "pygame.font.Font", "utils.get_user_data", "dialogs.DialogPlayerInventory", "os.path.join", "utils.set_user_data", "pygame.display.set_mode", "utils.copy_original_player_files", "dialogs.TextDialog", ...
[((716, 737), 'pygame.sprite.Group', 'pygame.sprite.Group', ([], {}), '()\n', (735, 737), False, 'import pygame\n'), ((901, 922), 'utils.get_user_data', 'utils.get_user_data', ([], {}), '()\n', (920, 922), False, 'import utils\n'), ((1086, 1128), 'graphics_environment.Environment', 'Environment', (['self.zone_name', 's...
#Imports import pandas as pd import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import classification_report, confusion_matrix from sklearn.model_selection import train_test_split import pickle import operator class EggWaver: def __init__(self): self.model = None...
[ "sklearn.ensemble.RandomForestClassifier", "pickle.dump", "sklearn.model_selection.train_test_split", "sklearn.metrics.classification_report", "pickle.load", "sklearn.metrics.confusion_matrix", "operator.itemgetter" ]
[((663, 695), 'sklearn.model_selection.train_test_split', 'train_test_split', (['data_x', 'data_y'], {}), '(data_x, data_y)\n', (679, 695), False, 'from sklearn.model_selection import train_test_split\n'), ((2732, 2768), 'pickle.dump', 'pickle.dump', (['self.model', 'file_object'], {}), '(self.model, file_object)\n', (...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
[ "autobahn.wamp.types.SubscribeOptions", "re.compile" ]
[((1803, 1840), 're.compile', 're.compile', (['"""^[a-z0-9][a-z0-9_\\\\-]*$"""'], {}), "('^[a-z0-9][a-z0-9_\\\\-]*$')\n", (1813, 1840), False, 'import re\n'), ((1941, 1976), 're.compile', 're.compile', (['"""^<([a-z][a-z0-9_]*)>$"""'], {}), "('^<([a-z][a-z0-9_]*)>$')\n", (1951, 1976), False, 'import re\n'), ((2218, 226...
import glob import re def check_file_names(path: str): file_names = [f for f in glob.glob(path + "\\*")] allowed = ['speed', 'size', 'both'] for name in file_names: # Check year if not name.startswith(path + "\\Year "): print(name, "| file name must start with 'Year '") ...
[ "re.search", "glob.glob" ]
[((1054, 1083), 're.search', 're.search', (['"""\\\\((.*)\\\\)"""', 'name'], {}), "('\\\\((.*)\\\\)', name)\n", (1063, 1083), False, 'import re\n'), ((86, 109), 'glob.glob', 'glob.glob', (["(path + '\\\\*')"], {}), "(path + '\\\\*')\n", (95, 109), False, 'import glob\n'), ((349, 380), 're.search', 're.search', (['"""Ye...
# Copyright 2020 The MuLT 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 applicable la...
[ "pandas.get_dummies", "os.path.dirname", "pandas.concat" ]
[((936, 961), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (951, 961), False, 'import os\n'), ((2043, 2068), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (2058, 2068), False, 'import os\n'), ((3867, 3894), 'pandas.get_dummies', 'pd.get_dummies', (['clinical[c]']...
"""The point of this module is to provide quick complexconversion using degrees rather than radians to speed up calculations. a recommendation would be do import the functions like so: >>> from complex_bot import rect_form as rf >>> from complex_bot import polar_form as pf thus, making the functions faster to use ex:...
[ "math.radians", "cmath.polar", "math.degrees" ]
[((1722, 1730), 'cmath.polar', 'polar', (['x'], {}), '(x)\n', (1727, 1730), False, 'from cmath import polar, rect\n'), ((1171, 1181), 'math.radians', 'radians', (['y'], {}), '(y)\n', (1178, 1181), False, 'from math import degrees, radians\n'), ((1762, 1775), 'math.degrees', 'degrees', (['z[1]'], {}), '(z[1])\n', (1769,...
import tensorflow as tf from tensorflow.keras import layers, Model def denseNet( trainFeatures, trainLabels, validationFeatures, validationLabels, intermediateDimensions=[], activation='selu', batchSize=64, dropoutRate=0.5, epochs=5000, learningRate=0.0002, lossFunction='ms...
[ "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Dense", "tensorflow.keras.Input", "tensorflow.keras.Model", "tensorflow.optimizers.Nadam", "tensorflow.keras.regularizers.l2" ]
[((519, 558), 'tensorflow.keras.Input', 'tf.keras.Input', ([], {'shape': '(inputDimension,)'}), '(shape=(inputDimension,))\n', (533, 558), True, 'import tensorflow as tf\n'), ((897, 913), 'tensorflow.keras.Model', 'Model', (['inputs', 'x'], {}), '(inputs, x)\n', (902, 913), False, 'from tensorflow.keras import layers, ...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-29 20:54 from __future__ import unicode_literals from django.db import migrations, models import taggit.managers class Migration(migrations.Migration): initial = True dependencies = [ ('taggit', '0002_auto_20150616_2121'), ] ope...
[ "django.db.models.TextField", "django.db.models.URLField", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField" ]
[((437, 530), '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", (453, 530), False, 'from django.db import migrations, models\...
import unittest from pyvcloud.vcd.system import System from pyvcloud.vcd.test import TestCase class TestSystem(TestCase): def test_create_org(self): sys_admin = self.client.get_admin() system = System(self.client, admin_resource=sys_admin) org = system.create_org(self.config['vcd']['org_n...
[ "unittest.main", "pyvcloud.vcd.system.System" ]
[((633, 648), 'unittest.main', 'unittest.main', ([], {}), '()\n', (646, 648), False, 'import unittest\n'), ((217, 262), 'pyvcloud.vcd.system.System', 'System', (['self.client'], {'admin_resource': 'sys_admin'}), '(self.client, admin_resource=sys_admin)\n', (223, 262), False, 'from pyvcloud.vcd.system import System\n'),...
import os import time from .constraint import DenialConstraint class Parser: """ This class creates interface for parsing denial constraints """ def __init__(self, env, dataset): """ Constructing parser interface object :param session: session object """ self.en...
[ "os.path.join", "time.clock" ]
[((768, 780), 'time.clock', 'time.clock', ([], {}), '()\n', (778, 780), False, 'import time\n'), ((1588, 1600), 'time.clock', 'time.clock', ([], {}), '()\n', (1598, 1600), False, 'import time\n'), ((876, 888), 'time.clock', 'time.clock', ([], {}), '()\n', (886, 888), False, 'import time\n'), ((1016, 1044), 'os.path.joi...
# Copyright (c) 2022, <NAME>. # All rights reserved. # # Use as you want, modify as you want but please include the author's name. import concurrent.futures from concurrent.futures import ThreadPoolExecutor import time import requests class Scraper(object): _BASE_SITE = 'http://vsco.co/' USER_INFO_HEADER =...
[ "concurrent.futures.ThreadPoolExecutor", "requests.Session", "time.time" ]
[((1275, 1293), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1291, 1293), False, 'import requests\n'), ((3039, 3072), 'concurrent.futures.ThreadPoolExecutor', 'ThreadPoolExecutor', ([], {'max_workers': '(5)'}), '(max_workers=5)\n', (3057, 3072), False, 'from concurrent.futures import ThreadPoolExecutor\n'...
from flask import Flask, request import simple_websocket, random, logging, pdb logging.basicConfig(level=logging.DEBUG) app = Flask(__name__) class Database: def __init__(self): self.database = ['....'] def include(self, data): self.database.append(data) def remove(self, data): ...
[ "simple_websocket.Server", "flask.Flask", "logging.basicConfig" ]
[((80, 120), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (99, 120), False, 'import simple_websocket, random, logging, pdb\n'), ((128, 143), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (133, 143), False, 'from flask import Flask, request\n'),...
import os import unittest from monitor.writer import DBConnection from monitor.writer import MetricsWriter def test_db_connection(): with DBConnection() as db_connection: db_connection.cursor.execute("SELECT 1 = 1;") assert db_connection.cursor.fetchone() == (True,) @unittest.skipIf(os.environ...
[ "os.environ.get", "monitor.writer.MetricsWriter.create_schema", "monitor.writer.DBConnection" ]
[((413, 442), 'monitor.writer.MetricsWriter.create_schema', 'MetricsWriter.create_schema', ([], {}), '()\n', (440, 442), False, 'from monitor.writer import MetricsWriter\n'), ((146, 160), 'monitor.writer.DBConnection', 'DBConnection', ([], {}), '()\n', (158, 160), False, 'from monitor.writer import DBConnection\n'), ((...
# global import ivy import time import torch import pytest ivy.set_framework('torch') # local from tests.helpers import get_perceiver_io def test_perceiver_io_classification_training(compile_graph): # params input_dim = 3 num_input_axes = 2 output_dim = 10 num_output_axes = 1 batch_size = 1 ...
[ "torch.mean", "tests.helpers.get_perceiver_io", "ivy.SGD", "ivy.reduce_mean", "time.perf_counter", "torch.randn", "ivy.set_framework", "ivy.execute_with_gradients", "pytest.mark.parametrize" ]
[((59, 85), 'ivy.set_framework', 'ivy.set_framework', (['"""torch"""'], {}), "('torch')\n", (76, 85), False, 'import ivy\n'), ((1344, 1392), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""compile_graph"""', '[True]'], {}), "('compile_graph', [True])\n", (1367, 1392), False, 'import pytest\n'), ((990, 1009)...
#!/usr/bin/python # # offwaketime Summarize blocked time by kernel off-CPU stack + waker stack # For Linux, uses BCC, eBPF. # # USAGE: offwaketime [-h] [-p PID | -u | -k] [-U | -K] [-f] [duration] # # Copyright 2016 Netflix, Inc. # Licensed under the Apache License, Version 2.0 (the "License") # # 20-Ja...
[ "argparse.ArgumentParser", "bcc.BPF", "time.sleep", "signal.signal", "argparse.ArgumentTypeError" ]
[((1723, 1900), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Summarize blocked time by kernel stack trace + waker stack"""', 'formatter_class': 'argparse.RawDescriptionHelpFormatter', 'epilog': 'examples'}), "(description=\n 'Summarize blocked time by kernel stack trace + waker stac...
import os from datetime import datetime from hashlib import sha512 from threading import RLock from typing import Any from typing import Dict from typing import List from decouple import config as get_config from errbot import arg_botcmd from errbot import botcmd from errbot import BotPlugin from errbot.templating imp...
[ "errbot.arg_botcmd", "threading.RLock", "decouple.config", "datetime.datetime.now", "wrapt.synchronized", "errbot.templating.tenv", "errbot.botcmd", "os.path.join" ]
[((374, 381), 'threading.RLock', 'RLock', ([], {}), '()\n', (379, 381), False, 'from threading import RLock\n'), ((398, 405), 'threading.RLock', 'RLock', ([], {}), '()\n', (403, 405), False, 'from threading import RLock\n'), ((426, 433), 'threading.RLock', 'RLock', ([], {}), '()\n', (431, 433), False, 'from threading i...
import mxnet as mx eps = 1e-10 + 1e-5 bn_mom = 0.9 fix_gamma = False attr = {} def conv_1x1(data,nnum_filter,name): data = mx.sym.Convolution(data=data, num_filter=nnum_filter, kernel=(1, 1), stride=(1, 1), pad=(0, 0), no_bias=True, name=name+'_conv_1', workspace=256) data = mx...
[ "mxnet.sym.Pooling", "mxnet.sym.Activation", "mxnet.sym.concat", "mxnet.sym.Convolution", "mxnet.sym.SoftmaxOutput", "mxnet.sym.FullyConnected", "mxnet.sym.var", "mxnet.sym.Dropout", "mxnet.sym.BatchNorm" ]
[((127, 279), 'mxnet.sym.Convolution', 'mx.sym.Convolution', ([], {'data': 'data', 'num_filter': 'nnum_filter', 'kernel': '(1, 1)', 'stride': '(1, 1)', 'pad': '(0, 0)', 'no_bias': '(True)', 'name': "(name + '_conv_1')", 'workspace': '(256)'}), "(data=data, num_filter=nnum_filter, kernel=(1, 1), stride\n =(1, 1), pad...
import platform # used to determine operating system import sys import threading import serial.tools.list_ports # used to list open ports from datetime import datetime from eventCreationTool.EventCreationTool import EventCreationTool, EventFactory from logMerge.Event import Event from logMerge.LogMerge import LogM...
[ "sys.path.append", "threading.Thread.__init__", "eventCreationTool.EventCreationTool.EventFactory", "logMerge.PCAP.PCAP.write_pcap", "logMerge.PCAP.PCAP.read_pcap", "logMerge.LogMerge.LogMerge", "platform.platform", "eventCreationTool.EventCreationTool.EventFactory.get_feed_id", "logMerge.Event.Even...
[((357, 392), 'sys.path.append', 'sys.path.append', (['""".BACnet/demo/lib"""'], {}), "('.BACnet/demo/lib')\n", (372, 392), False, 'import sys\n'), ((2297, 2307), 'logMerge.LogMerge.LogMerge', 'LogMerge', ([], {}), '()\n', (2305, 2307), False, 'from logMerge.LogMerge import LogMerge\n'), ((2314, 2328), 'eventCreationTo...
# -*- coding: utf-8 -*- # Copyright (C) 2017 by <NAME>, Virginia Tech Intellectual # Properties, Inc., University of Heidelberg, and University of # of Connecticut School of Medicine. # All rights reserved. # Copyright (C) 2010 - 2016 by <NAME>, Virginia Tech Intellectual # Properties, Inc., University of Heidelb...
[ "unittest.TextTestRunner", "COPASI.CRootContainer.addDatamodel" ]
[((867, 903), 'COPASI.CRootContainer.addDatamodel', 'COPASI.CRootContainer.addDatamodel', ([], {}), '()\n', (901, 903), False, 'import COPASI\n'), ((2020, 2056), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (2043, 2056), False, 'import unittest\n')]
from typing import List import collections import string class Solution: def findLadders(self, beginWord: str, endWord: str, wordList: List[str]) -> List[List[str]]: wordList = set(wordList) # faster checks against a set res = [] # result layer = {} # dic...
[ "collections.defaultdict" ]
[((443, 472), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (466, 472), False, 'import collections\n')]
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) from aaf2 import cfb, mobid from uuid import UUID from io import BytesIO from struct import unpack import pprint from aaf2.utils import ( read_u8, read_u16le, read_u32le, decode_utf16le, ma...
[ "io.BytesIO", "aaf2.utils.read_u16le", "aaf2.cfb.CompoundFileBinary", "aaf2.model.classdefs.classdefs.items", "struct.unpack", "aaf2.utils.mangle_name", "aaf2.utils.read_u8", "uuid.UUID", "aaf2.cfb.open", "aaf2.utils.decode_utf16le", "aaf2.utils.read_u32le" ]
[((354, 398), 'uuid.UUID', 'UUID', (['"""0d010101-0225-0000-060e-2b3402060101"""'], {}), "('0d010101-0225-0000-060e-2b3402060101')\n", (358, 398), False, 'from uuid import UUID\n'), ((571, 615), 'uuid.UUID', 'UUID', (['"""0d010101-0204-0000-060e-2b3402060101"""'], {}), "('0d010101-0204-0000-060e-2b3402060101')\n", (575...
import os from flask import Flask from instance.config import SECRET_KEY import spacy def create_app(test_config=None): app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile('config.py', silent=True) app.secret_key = SECRET_KEY from processor import nlp # makes spacy load processed during ...
[ "os.environ.get", "flask.Flask", "os.makedirs" ]
[((129, 175), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (134, 175), False, 'from flask import Flask\n'), ((334, 364), 'os.makedirs', 'os.makedirs', (['app.instance_path'], {}), '(app.instance_path)\n', (345, 364), False, 'import os\n')...
from __future__ import print_function import pointbreak def print_boo(debugger): print("Boo!") return True db = pointbreak.create_debugger('ghost') db.add_breakpoint('there_is_a_ghost', print_boo) db.continue_to_last_event()
[ "pointbreak.create_debugger" ]
[((122, 157), 'pointbreak.create_debugger', 'pointbreak.create_debugger', (['"""ghost"""'], {}), "('ghost')\n", (148, 157), False, 'import pointbreak\n')]
from random import randint numeros = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10)) print('Os valores sorteados foram: ', end='') for n in numeros: print(f'{n}', end=' ') print(f'\nO maior valor sorteado foi {max(numeros)}') print(f'E o menor valor sorteado foi {min(numeros)...
[ "random.randint" ]
[((40, 54), 'random.randint', 'randint', (['(1)', '(10)'], {}), '(1, 10)\n', (47, 54), False, 'from random import randint\n'), ((56, 70), 'random.randint', 'randint', (['(1)', '(10)'], {}), '(1, 10)\n', (63, 70), False, 'from random import randint\n'), ((72, 86), 'random.randint', 'randint', (['(1)', '(10)'], {}), '(1,...
import django_filters from django.conf import settings from django.db.models import Q from taggit.models import Tag class NumericInFilter(django_filters.BaseInFilter, django_filters.NumberFilter): """ Filters for a set of numeric values. Example: id__in=100,200,300 """ pass class NullableCharFieldFi...
[ "taggit.models.Tag.objects.all", "django_filters.CharFilter", "django.db.models.Q" ]
[((1439, 1497), 'django_filters.CharFilter', 'django_filters.CharFilter', ([], {'method': '"""search"""', 'label': '"""Search"""'}), "(method='search', label='Search')\n", (1464, 1497), False, 'import django_filters\n'), ((1191, 1208), 'taggit.models.Tag.objects.all', 'Tag.objects.all', ([], {}), '()\n', (1206, 1208), ...
from datetime import datetime from typing import Sequence, Tuple from .BaseSystem import BaseSystem import pygame as pg import pygame.freetype as pgft def blit_text( surface: pg.Surface, text: str, pos: Tuple[int, int], font: pgft.Font ) -> pg.Rect: words = [ word.split(" ") for word in text.splitline...
[ "pygame.freetype.get_default_font", "pygame.Rect" ]
[((1277, 1314), 'pygame.Rect', 'pg.Rect', (['pos', '(text_surface_width, y)'], {}), '(pos, (text_surface_width, y))\n', (1284, 1314), True, 'import pygame as pg\n'), ((2073, 2096), 'pygame.freetype.get_default_font', 'pgft.get_default_font', ([], {}), '()\n', (2094, 2096), True, 'import pygame.freetype as pgft\n'), ((2...
from django.db import models from django.urls import reverse from django.contrib.auth.models import User import uuid # Create your models here. from module.models import Module from assignment.models import Submission from question.models import Question #3rd apps field from ckeditor.fields import RichTextField STAT...
[ "django.db.models.ManyToManyField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.SlugField", "django.db.models.ImageField", "django.db.models.IntegerField", "django.urls.reverse", "ckeditor.fields.RichTextField", "django.db...
[((605, 659), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'verbose_name': '"""Title"""'}), "(max_length=100, verbose_name='Title')\n", (621, 659), False, 'from django.db import models\n'), ((668, 697), 'django.db.models.SlugField', 'models.SlugField', ([], {'unique': '(True)'}), '(uni...
#Quaternion Class in Python. import math import sys class Vector3: def __init__(self,x_comp=0,y_comp=0,z_comp=0) -> None: """[Initialize Vector Components]""" self._x=x_comp;self._y=y_comp;self._z=z_comp def Magnitude(self): """[Returns the magnitude of the vector]""" mag=math.s...
[ "sys.exit", "math.sqrt" ]
[((314, 367), 'math.sqrt', 'math.sqrt', (['(self._x ** 2 + self._y ** 2 + self._z ** 2)'], {}), '(self._x ** 2 + self._y ** 2 + self._z ** 2)\n', (323, 367), False, 'import math\n'), ((3357, 3454), 'math.sqrt', 'math.sqrt', (['(self._a ** 2 + self._vector._x ** 2 + self._vector._y ** 2 + self._vector.\n _z ** 2)'], ...
import numpy as np import Layer.FC as FC import Layer.ReLU as ReLU import Layer.Tanh as Tanh import Layer.Sigmoid as Sigmoid import Layer.Softmax as Softmax import matplotlib.pyplot as plt def isEqual(num1, num2): if num1+1e-4<=num2 and num1-1e-4>=num2: return True return False class Net(object): def __init__(s...
[ "Layer.Tanh.TanhLayer", "Layer.Softmax.SoftmaxWithLossLayer", "numpy.argmax", "Layer.ReLU.LeakyReLULayer", "Layer.FC.FullyConnectionLayer", "Layer.ReLU.ReLULayer", "numpy.array", "numpy.linspace", "Layer.Sigmoid.SigmoidLayer" ]
[((5863, 5902), 'numpy.linspace', 'np.linspace', (['(-10)', '(-1e-05)'], {'num': '(num_ // 2)'}), '(-10, -1e-05, num=num_ // 2)\n', (5874, 5902), True, 'import numpy as np\n'), ((5906, 5943), 'numpy.linspace', 'np.linspace', (['(1e-05)', '(10)'], {'num': '(num_ // 2)'}), '(1e-05, 10, num=num_ // 2)\n', (5917, 5943), Tr...
import sqlite3 as s def user(path: str): conn = s.connect(path) cur = conn.cursor() tbl = "CREATE TABLE IF NOT EXISTS user(User_Name TEXT,Email TEXT UNIQUE, Mob_No TEXT UNIQUE, Password TEXT)" cur.execute(tbl) conn.commit() def add_user(path: str, data: tuple): conn = s.connect(path) c...
[ "sqlite3.connect" ]
[((54, 69), 'sqlite3.connect', 's.connect', (['path'], {}), '(path)\n', (63, 69), True, 'import sqlite3 as s\n'), ((299, 314), 'sqlite3.connect', 's.connect', (['path'], {}), '(path)\n', (308, 314), True, 'import sqlite3 as s\n'), ((494, 509), 'sqlite3.connect', 's.connect', (['path'], {}), '(path)\n', (503, 509), True...
from django.contrib.auth import get_user_model from main.tasks import send_information_email from main.decorators import except_shell User = get_user_model() class CeleryService: @staticmethod def send_email_like(user, user2,): subject = 'User like' html_email_template_name = 'emails/email_...
[ "main.tasks.send_information_email.delay", "django.contrib.auth.get_user_model", "main.decorators.except_shell" ]
[((143, 159), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (157, 159), False, 'from django.contrib.auth import get_user_model\n'), ((838, 872), 'main.decorators.except_shell', 'except_shell', (['(User.DoesNotExist,)'], {}), '((User.DoesNotExist,))\n', (850, 872), False, 'from main.decorator...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.ShopRec import ShopRec from alipay.aop.api.domain.VoucherRec import VoucherRec class AlipayDataDataserviceShoppingmallrecShopandvoucherQueryResponse(Ali...
[ "alipay.aop.api.domain.ShopRec.ShopRec.from_alipay_dict", "alipay.aop.api.domain.VoucherRec.VoucherRec.from_alipay_dict" ]
[((1391, 1418), 'alipay.aop.api.domain.ShopRec.ShopRec.from_alipay_dict', 'ShopRec.from_alipay_dict', (['i'], {}), '(i)\n', (1415, 1418), False, 'from alipay.aop.api.domain.ShopRec import ShopRec\n'), ((1894, 1924), 'alipay.aop.api.domain.VoucherRec.VoucherRec.from_alipay_dict', 'VoucherRec.from_alipay_dict', (['i'], {...
""" Markdown template tag """ from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from ..markdownprocessing import content_markdown register = template.Library() @register.filter @stringfilter def markdown(value, option=""): """Templat...
[ "django.template.Library" ]
[((222, 240), 'django.template.Library', 'template.Library', ([], {}), '()\n', (238, 240), False, 'from django import template\n')]
import logging import sys logging.basicConfig(level=logging.DEBUG, format='X %(asctime)s: %(levelname)s %(process)d:%(threadName)s [%(name)s] - %(message)s', stream=sys.stdout) logging.info('Started logging system') logging.getLogger('botocore').setLevel(logging.WARN) logging.ge...
[ "logging.info", "logging.getLogger", "logging.basicConfig" ]
[((26, 186), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG', 'format': '"""X %(asctime)s: %(levelname)s %(process)d:%(threadName)s [%(name)s] - %(message)s"""', 'stream': 'sys.stdout'}), "(level=logging.DEBUG, format=\n 'X %(asctime)s: %(levelname)s %(process)d:%(threadName)s [%(name)s]...
from horizons.parse_table import parse_table import logging import re import requests from typing import NamedTuple, Tuple logger = logging.getLogger(__name__) class HorizonsException(Exception): pass class VectorsResult(NamedTuple): """Class for storing the result of a vectors query.""" epoch_jd_tdb:...
[ "horizons.parse_table.parse_table", "requests.Session", "re.search", "logging.getLogger" ]
[((134, 161), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (151, 161), False, 'import logging\n'), ((9596, 9682), 're.search', 're.search', (['"""^~?([\\\\d+|\\\\.]\\\\.?\\\\d*)\\\\s*(\\\\+\\\\-)?\\\\s*(\\\\d*\\\\.?\\\\d*)?(.+)?$"""', 'number'], {}), "('^~?([\\\\d+|\\\\.]\\\\.?\\\\d*)\\...
# -*- coding: utf-8 -*- import functools import pandas as pd import numpy as np from .process import start_profile from .process import end_profile from .simple import simple_features from .domain import domain_features from .extension import extension_features """ url2features.featurize: Core functions to apply...
[ "functools.partial" ]
[((1477, 1525), 'functools.partial', 'functools.partial', (['process_df'], {'params': 'parameters'}), '(process_df, params=parameters)\n', (1494, 1525), False, 'import functools\n')]
import sys import time import os import string import nltk import numpy as np import tensorflow as tf from tensorflow.keras.layers.experimental import preprocessing from tensorflow.keras.preprocessing import sequence from tensorflow.keras.preprocessing import text from tensorflow.keras import layers import scipy as sp ...
[ "numpy.set_printoptions", "warnings.filterwarnings", "pandas.read_csv", "tensorflow.keras.Input", "tensorflow.reshape", "tensorflow.data.Dataset.from_tensor_slices", "time.time", "numpy.shape", "tensorflow.cast", "tensorflow.keras.models.Sequential", "tensorflow.keras.layers.TextVectorization", ...
[((476, 523), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(3)', 'suppress': '(True)'}), '(precision=3, suppress=True)\n', (495, 523), True, 'import numpy as np\n'), ((524, 557), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (547, 557), False, 'imp...
import tensorflow as tf import numpy as np import os from glob import glob from object_detection_utilities import label_map_util from object_detection_utilities import visualization_utils NUM_DETECTIONS_ = 'num_detections:0' DETECTION_CLASSES_ = 'detection_classes:0' DETECTION_SCORES_ = 'detection_scores:0' DETECTION_...
[ "object_detection_utilities.label_map_util.load_labelmap", "tensorflow.Session", "numpy.expand_dims", "object_detection_utilities.visualization_utils.visualize_boxes_and_labels_on_image_array", "tensorflow.GraphDef", "os.path.exists", "tensorflow.ConfigProto", "object_detection_utilities.label_map_uti...
[((825, 866), 'object_detection_utilities.label_map_util.load_labelmap', 'label_map_util.load_labelmap', (['labels_path'], {}), '(labels_path)\n', (853, 866), False, 'from object_detection_utilities import label_map_util\n'), ((893, 1011), 'object_detection_utilities.label_map_util.convert_label_map_to_categories', 'la...
# Copyright (c) 2006-2009 <NAME> http://garnaat.org/ # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 re...
[ "boto.log.warning", "boto.config.get", "boto.regioninfo.RegionInfo", "boto.compat.json.loads", "boto.log.error" ]
[((2678, 2730), 'boto.config.get', 'boto.config.get', (['"""Boto"""', '"""cfn_version"""', '"""2010-05-15"""'], {}), "('Boto', 'cfn_version', '2010-05-15')\n", (2693, 2730), False, 'import boto\n'), ((2755, 2810), 'boto.config.get', 'boto.config.get', (['"""Boto"""', '"""cfn_region_name"""', '"""us-east-1"""'], {}), "(...
from osdu_commons.model.swps_manifest import manifest_from_camel_dict def test_simple_manifest(example_manifest): manifest_from_camel_dict(example_manifest)
[ "osdu_commons.model.swps_manifest.manifest_from_camel_dict" ]
[((120, 162), 'osdu_commons.model.swps_manifest.manifest_from_camel_dict', 'manifest_from_camel_dict', (['example_manifest'], {}), '(example_manifest)\n', (144, 162), False, 'from osdu_commons.model.swps_manifest import manifest_from_camel_dict\n')]
#!/usr/bin/env python3 # # (C) Copyright 2020 Hewlett Packard Enterprise Development LP. # Licensed under the Apache v2.0 license. # import re import os import sys import json import time import copy import datetime from km.fm.log import Log from enum import Enum from km.fm.routeset import LPRT from km...
[ "km.fm.log.Log.debug", "km.fm.log.Log.error", "time.sleep", "km.fm.routeset.MPRT", "km.fm.vcat.VCAT", "km.fm.metrics.Metrics", "datetime.datetime.now", "km.fm.routeset.LPRT" ]
[((4776, 4895), 'km.fm.log.Log.debug', 'Log.debug', (['"""{}[{}].train : S={}/{} LS={} IF={}"""', 'self.node.name', 'self.index', 'state', 'health', 'link_state', 'if_state'], {}), "('{}[{}].train : S={}/{} LS={} IF={}', self.node.name, self.\n index, state, health, link_state, if_state)\n", (4785, 4895), False,...
# -*- coding: utf-8 -*- # Created by restran on 2016/11/1 from __future__ import unicode_literals, absolute_import import time from datetime import datetime """ date string, datetime, time and timestamp converter """ def str2datetime(date_str, format='%Y-%m-%d %H:%M:%S'): try: return datetime.strptime(d...
[ "time.strftime", "datetime.datetime", "datetime.datetime.strptime", "time.mktime", "datetime.datetime.fromtimestamp", "time.strptime", "time.localtime" ]
[((301, 336), 'datetime.datetime.strptime', 'datetime.strptime', (['date_str', 'format'], {}), '(date_str, format)\n', (318, 336), False, 'from datetime import datetime\n'), ((447, 478), 'time.strptime', 'time.strptime', (['date_str', 'format'], {}), '(date_str, format)\n', (460, 478), False, 'import time\n'), ((1271, ...
from datetime import timedelta from export import as_rows from pipeline import Pipeline from test_pipeline import passing_stage, failing_stage, second_passing_stage, now, commit1 def test_as_rows(passing_stage, failing_stage, second_passing_stage): stages = [passing_stage, failing_stage, second_passing_stage] ...
[ "pipeline.Pipeline", "datetime.timedelta", "export.as_rows" ]
[((335, 370), 'pipeline.Pipeline', 'Pipeline', (['stages'], {'trigger': '"""commits"""'}), "(stages, trigger='commits')\n", (343, 370), False, 'from pipeline import Pipeline\n'), ((452, 473), 'export.as_rows', 'as_rows', (['stages', 'runs'], {}), '(stages, runs)\n', (459, 473), False, 'from export import as_rows\n'), (...
import json import os import watchdog from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class SetupWorker: """Uses cconfig to prep filesystem structure and support potential future mods.""" def __init__(self, conf_dict): if conf_dict is None: rai...
[ "os.path.isdir", "os.mkdir" ]
[((957, 985), 'os.path.isdir', 'os.path.isdir', (['self.dest_dir'], {}), '(self.dest_dir)\n', (970, 985), False, 'import os\n'), ((1580, 1593), 'os.mkdir', 'os.mkdir', (['dir'], {}), '(dir)\n', (1588, 1593), False, 'import os\n')]
from bingads.v12.internal.bulk.mappings import _SimpleBulkMapping from bingads.v12.internal.bulk.string_table import _StringTable from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V12 from .common import _BulkAdExtensionBase from .common import _BulkAdGroupAdExtensionAssociation from .common import _BulkCamp...
[ "bingads.service_client._CAMPAIGN_OBJECT_FACTORY_V12.create" ]
[((487, 554), 'bingads.service_client._CAMPAIGN_OBJECT_FACTORY_V12.create', '_CAMPAIGN_OBJECT_FACTORY_V12.create', (['"""StructuredSnippetAdExtension"""'], {}), "('StructuredSnippetAdExtension')\n", (522, 554), False, 'from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V12\n'), ((2724, 2791), 'bingads.service_...
# Generated by Django 3.2.5 on 2021-07-28 00:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('requests', '0003_alter_request_file'), ] operations = [ migrations.AddField( model_name='request', name='status', ...
[ "django.db.models.CharField" ]
[((336, 379), 'django.db.models.CharField', 'models.CharField', ([], {'default': '""""""', 'max_length': '(15)'}), "(default='', max_length=15)\n", (352, 379), False, 'from django.db import migrations, models\n')]
"""Business Logic for Rate Limiter Status API""" from core.common.constants import RateLimitLevel as Level, RateLimitPer as Per from core.common.utils import data_not_found from http import HTTPStatus class RateLimitStatus: """Business Logic for Rate Limit Status API""" def __init__(self, limiter=None, name...
[ "core.common.utils.data_not_found" ]
[((1112, 1147), 'core.common.utils.data_not_found', 'data_not_found', (['key', 'self.namespace'], {}), '(key, self.namespace)\n', (1126, 1147), False, 'from core.common.utils import data_not_found\n')]
#!/usr/bin/env python3 import os import sys import setuptools.command.egg_info as egg_info_cmd from setuptools import setup SETUP_DIR = os.path.dirname(__file__) README = os.path.join(SETUP_DIR, "README.md") try: import gittaggers tagger = gittaggers.EggInfoFromGit except ImportError: tagger = egg_info_...
[ "os.path.dirname", "os.path.join" ]
[((138, 163), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (153, 163), False, 'import os\n'), ((173, 209), 'os.path.join', 'os.path.join', (['SETUP_DIR', '"""README.md"""'], {}), "(SETUP_DIR, 'README.md')\n", (185, 209), False, 'import os\n')]
#!/usr/bin/env python3 """ audio.py: Utilities for loading and modifying Audio objects **Note: Out-of-place operations** Functions that modify Audio (and Spectrogram) objects are "out of place", meaning that they return a new Audio object instead of modifying the original object. This means that running a line ``` a...
[ "soundfile.read", "numpy.abs", "opensoundscape.audio_tools.bandpass_filter", "warnings.filterwarnings", "numpy.resize", "warnings.resetwarnings", "scipy.fftpack.fft", "librosa.resample", "scipy.fft.fftfreq", "librosa.load", "numpy.arange", "numpy.tile", "soundfile.write", "warnings.warn", ...
[((3906, 3939), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (3929, 3939), False, 'import warnings\n'), ((3962, 4031), 'librosa.load', 'librosa.load', (['path'], {'sr': 'sample_rate', 'res_type': 'resample_type', 'mono': '(True)'}), '(path, sr=sample_rate, res_type=resam...
import unittest import sin_testing as st class TestErtsVsn(st.SmokeTest): def test_erts_vsn(self): self.do_run(st.AppDesc(user_name = "Smoke Test User", email = "<EMAIL>", copyright_holder = "Smoke Test Copy, LLC.", ...
[ "unittest.main", "sin_testing.AppDesc" ]
[((515, 530), 'unittest.main', 'unittest.main', ([], {}), '()\n', (528, 530), False, 'import unittest\n'), ((125, 324), 'sin_testing.AppDesc', 'st.AppDesc', ([], {'user_name': '"""Smoke Test User"""', 'email': '"""<EMAIL>"""', 'copyright_holder': '"""Smoke Test Copy, LLC."""', 'project_name': '"""smprj_version2"""', 'p...
#!/usr/bin/env python2.7 # Copyright 2019 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ generate hash signature of a directory and optionally compare it to an existing one This script reads all files under DIR to gene...
[ "argparse.ArgumentParser", "hashlib.sha1", "os.walk", "os.path.exists", "json.dumps", "os.path.relpath", "os.path.join", "sys.exit" ]
[((998, 1042), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (1021, 1042), False, 'import argparse\n'), ((2742, 2762), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (2756, 2762), False, 'import os\n'), ((2772, 2814), 'sys.exit', 'sys...
#SPDX-License-Identifier: MIT import subprocess import psycopg2 from subprocess import PIPE import json import re import os import requests def scan(dbname, user, password, host, port, dsfile, ipath): connection = psycopg2.connect( user = user, password = password, database = dbname, ...
[ "psycopg2.connect" ]
[((219, 308), 'psycopg2.connect', 'psycopg2.connect', ([], {'user': 'user', 'password': 'password', 'database': 'dbname', 'host': 'host', 'port': 'port'}), '(user=user, password=password, database=dbname, host=host,\n port=port)\n', (235, 308), False, 'import psycopg2\n')]
import PyPDF2, os, minecart def get_1pagePDF(reader, pageNum): pdfWriter = PyPDF2.PdfFileWriter() singlepagePDF = open('pdfpage' + str(pageNum)+ '.pdf', 'wb') pageObj = reader.getPage(pageNum) pdfWriter.addPage(pageObj) pdfWriter.write(singlepagePDF) singlepagePDF.close() return s...
[ "PyPDF2.PdfFileReader", "os.listdir", "PyPDF2.PdfFileWriter" ]
[((694, 709), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (704, 709), False, 'import PyPDF2, os, minecart\n'), ((83, 105), 'PyPDF2.PdfFileWriter', 'PyPDF2.PdfFileWriter', ([], {}), '()\n', (103, 105), False, 'import PyPDF2, os, minecart\n'), ((1033, 1065), 'PyPDF2.PdfFileReader', 'PyPDF2.PdfFileReader', (...
""" Customize ReportLab components for pdf creation """ from pdfrw import PdfReader from pdfrw.buildxobj import pagexobj from pdfrw.toreportlab import makerl from reportlab.platypus import Flowable, KeepInFrame, Image from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT __all__ = [ "PdfImage", "Dynami...
[ "reportlab.platypus.KeepInFrame.wrap", "pdfrw.buildxobj.pagexobj", "reportlab.platypus.KeepInFrame.__init__", "pdfrw.PdfReader", "PIL.Image.open", "reportlab.platypus.Image.wrap", "pdfrw.toreportlab.makerl", "reportlab.platypus.Image.__init__" ]
[((918, 932), 'pdfrw.buildxobj.pagexobj', 'pagexobj', (['page'], {}), '(page)\n', (926, 932), False, 'from pdfrw.buildxobj import pagexobj\n'), ((2384, 2407), 'pdfrw.toreportlab.makerl', 'makerl', (['canv._doc', 'xobj'], {}), '(canv._doc, xobj)\n', (2390, 2407), False, 'from pdfrw.toreportlab import makerl\n'), ((3125,...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/6/17 08:15 # @Author : youqingkui # @File : lambda_notify.py # @Desc : import json import urllib.parse import boto3 import http.client print('Loading function') s3 = boto3.client('s3') def send_notify(payload): conn = http.client.HTTPConne...
[ "boto3.client", "json.dumps" ]
[((242, 260), 'boto3.client', 'boto3.client', (['"""s3"""'], {}), "('s3')\n", (254, 260), False, 'import boto3\n'), ((1418, 1437), 'json.dumps', 'json.dumps', (['payload'], {}), '(payload)\n', (1428, 1437), False, 'import json\n')]
from django.core.exceptions import PermissionDenied from django.http import HttpResponseRedirect from django.shortcuts import render import requests # Create your views here. from django.urls import reverse from commercial_page.models import getAllPages, CommercialPage, getAllPosts, CommercialPagePosts, getAllPagesGl...
[ "commercial_page.models.CommercialPage.objects.get", "commercial_page.models.CommercialPage.objects.create", "commercial_page.models.getAllPosts", "django.urls.reverse", "commercial_page.models.getAllPages", "commercial_page.models.CommercialPagePosts.objects.create", "django.shortcuts.render", "main_...
[((597, 622), 'commercial_page.models.getAllPages', 'getAllPages', (['request.user'], {}), '(request.user)\n', (608, 622), False, 'from commercial_page.models import getAllPages, CommercialPage, getAllPosts, CommercialPagePosts, getAllPagesGlobal, isPageAdmin\n'), ((666, 716), 'django.shortcuts.render', 'render', (['re...
import matplotlib.pyplot as plt from kmeans import KMeans def plot(points, centroids): """Takes the list of means (Point) and plots them along with the self.points""" points_x = [p[0] for p in points] points_y = [p[1] for p in points] centroids_x = [c[0] for c in centroids] centroids_y = [c[1] for...
[ "kmeans.KMeans", "matplotlib.pyplot.show", "matplotlib.pyplot.plot" ]
[((342, 376), 'matplotlib.pyplot.plot', 'plt.plot', (['points_x', 'points_y', '"""ro"""'], {}), "(points_x, points_y, 'ro')\n", (350, 376), True, 'import matplotlib.pyplot as plt\n'), ((381, 421), 'matplotlib.pyplot.plot', 'plt.plot', (['centroids_x', 'centroids_y', '"""bo"""'], {}), "(centroids_x, centroids_y, 'bo')\n...
import os import os.path import sys import ntpath from os import listdir from os.path import isfile, join from tree_sitter import Language, Parser Language.build_library( # Store the library in the `build` directory 'build/my-languages.so', # Include one or more languages [ 'tree-sitter-python', 'tr...
[ "os.mkdir", "tree_sitter.Language", "ntpath.basename", "os.path.isdir", "os.path.dirname", "tree_sitter.Parser", "ntpath.split", "tree_sitter.Language.build_library", "os.path.isfile", "os.path.join", "os.listdir" ]
[((150, 290), 'tree_sitter.Language.build_library', 'Language.build_library', (['"""build/my-languages.so"""', "['tree-sitter-python', 'tree-sitter-java', 'tree-sitter-javascript',\n 'tree-sitter-cpp']"], {}), "('build/my-languages.so', ['tree-sitter-python',\n 'tree-sitter-java', 'tree-sitter-javascript', 'tree-...
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from opsgenie_swagger.models.alert_filter import AlertFilter #...
[ "six.iteritems" ]
[((3727, 3760), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (3740, 3760), False, 'import six\n')]
# -*- coding: utf-8 -*- """ Created on Tue Apr 14 16:14:54 2020 @author: JP """ import pandas as pd m_data = { 430: {'Struct': 'Plusses', 'Angle': 45, 'Voltage': 2.5, 'Frequency': 17, 'Temp': 30, 'Preamp': False, 'Rate': 8, 'Time': 600, ...
[ "pandas.DataFrame" ]
[((24397, 24417), 'pandas.DataFrame', 'pd.DataFrame', (['m_data'], {}), '(m_data)\n', (24409, 24417), True, 'import pandas as pd\n')]
# coding=utf-8 from unittest import TestCase from webspider.exceptions import DowngradeException from webspider.web.formatter.base import Field, Downgrade, Formatter """ 准备测试数据 """ class TestFormatter(Formatter): FIELDS = [ Field('name', converter=lambda name: 'Mr.' + name), Fi...
[ "webspider.web.formatter.base.Formatter.register_formatter", "webspider.web.formatter.base.Downgrade", "webspider.web.formatter.base.Formatter.format", "webspider.web.formatter.base.Field", "webspider.web.formatter.base.Formatter.get_formatter" ]
[((257, 307), 'webspider.web.formatter.base.Field', 'Field', (['"""name"""'], {'converter': "(lambda name: 'Mr.' + name)"}), "('name', converter=lambda name: 'Mr.' + name)\n", (262, 307), False, 'from webspider.web.formatter.base import Field, Downgrade, Formatter\n'), ((403, 417), 'webspider.web.formatter.base.Field',...
import json import re from os import path import pytest from tools import utils, paths, constants from tools.utils import assert_run_failure from . import contract_paths from . import protocol PROTO = "009_PsFLoren" CONTRACT_PATH = path.join( paths.TEZOS_HOME, 'src', f'proto_{PROTO}', 'lib_protocol', 'test' ) TX_A...
[ "json.load", "tools.utils.assert_run_failure", "tools.utils.check_block_contains_operations", "pytest.fixture", "pytest.mark.parametrize", "os.path.join" ]
[((233, 309), 'os.path.join', 'path.join', (['paths.TEZOS_HOME', '"""src"""', 'f"""proto_{PROTO}"""', '"""lib_protocol"""', '"""test"""'], {}), "(paths.TEZOS_HOME, 'src', f'proto_{PROTO}', 'lib_protocol', 'test')\n", (242, 309), False, 'from os import path\n'), ((466, 495), 'pytest.fixture', 'pytest.fixture', ([], {'sc...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "<NAME>" __email__ = "<EMAIL>" from typing import List import tensorflow as tf from ..layers.pooling import AvgPool, MaxAndAvgPool, MaxPool, WeightedAvgPool from ..layers.sample_and_group import SampleAndGroup, SampleAndGroupAll class SetAbstractionModu...
[ "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.BatchNormalization", "tensorflow.keras.layers.LayerNormalization", "tensorflow.keras.layers.LeakyReLU", "tensorflow.keras.Sequential", "tensorflow.keras.layers.Lambda" ]
[((4291, 4338), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {'name': '"""point_feature_embed"""'}), "(name='point_feature_embed')\n", (4310, 4338), True, 'import tensorflow as tf\n'), ((5534, 5582), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {'name': '"""region_feature_embed"""'}), "(name...
from sam import SAM import copy import os import numpy as np from sklearn.preprocessing import LabelEncoder import matplotlib.pyplot as plt import cv2 import os import torch import torchvision import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from sklearn.model_selection import tra...
[ "tqdm.tqdm", "os.makedirs", "utils.evaluate", "model.Double_Net", "os.path.exists", "torch.nn.CrossEntropyLoss", "dataloader.DataLoader", "torch.save", "torch.cuda.is_available", "torch.no_grad" ]
[((5372, 5384), 'dataloader.DataLoader', 'DataLoader', ([], {}), '()\n', (5382, 5384), False, 'from dataloader import DataLoader\n'), ((5729, 5750), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (5748, 5750), True, 'import torch.nn as nn\n'), ((5827, 5858), 'model.Double_Net', 'Double_Net', ([],...
#!/usr/bin/env python3 import http.server as server port = 8000 server.SimpleHTTPRequestHandler.extensions_map['.wasm'] = 'application/wasm' s = server.HTTPServer(('localhost', port), server.SimpleHTTPRequestHandler) s.serve_forever()
[ "http.server.HTTPServer" ]
[((145, 216), 'http.server.HTTPServer', 'server.HTTPServer', (["('localhost', port)", 'server.SimpleHTTPRequestHandler'], {}), "(('localhost', port), server.SimpleHTTPRequestHandler)\n", (162, 216), True, 'import http.server as server\n')]
# Fixes import errors import sys sys.path.append("../") import synapse as sn from synapse import Tensor from synapse.nn.layers import Linear from synapse.nn.activations import ReLU, Tanh from synapse.nn.optimizers import SGD, GDM from synapse.nn.loss import MSE from synapse.nn.data import BatchIterator from synapse.d...
[ "sys.path.append", "synapse.nn.loss.MSE", "synapse.nn.activations.Tanh", "pandas.read_csv", "pandas.get_dummies", "synapse.nn.optimizers.SGD", "synapse.nn.data.BatchIterator", "numpy.array", "synapse.nn.layers.Linear" ]
[((33, 55), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (48, 55), False, 'import sys\n'), ((403, 440), 'pandas.read_csv', 'pd.read_csv', (['"""./mnist/data/train.csv"""'], {}), "('./mnist/data/train.csv')\n", (414, 440), True, 'import pandas as pd\n'), ((453, 489), 'pandas.read_csv', 'pd.rea...
import tensorflow as tf import numpy as np import time from capslayer import layers from capslayer import losses from capslayer import ops class CapsLayerTest(tf.test.TestCase): def test1(self): b_IJ = tf.constant(np.zeros([10, 10, 1, 1], dtype=np.float32)) b_ij = tf.zeros(shape=[10, 10, 1, 1],...
[ "tensorflow.test.main", "tensorflow.zeros", "numpy.zeros" ]
[((536, 550), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (548, 550), True, 'import tensorflow as tf\n'), ((290, 338), 'tensorflow.zeros', 'tf.zeros', ([], {'shape': '[10, 10, 1, 1]', 'dtype': 'np.float32'}), '(shape=[10, 10, 1, 1], dtype=np.float32)\n', (298, 338), True, 'import tensorflow as tf\n'), ((2...
from unittest import mock import pytest import temple.clean import temple.exceptions @pytest.mark.parametrize('update_branch_exists, temp_update_branch_exists, expected_shell_cmds', [ (False, False, []), (True, False, [mock.call('git branch -D _temple_update')]), (False, True, [mock.call('git branch -D ...
[ "pytest.raises", "unittest.mock.call" ]
[((1936, 1994), 'pytest.raises', 'pytest.raises', (['temple.exceptions.InvalidCurrentBranchError'], {}), '(temple.exceptions.InvalidCurrentBranchError)\n', (1949, 1994), False, 'import pytest\n'), ((231, 272), 'unittest.mock.call', 'mock.call', (['"""git branch -D _temple_update"""'], {}), "('git branch -D _temple_upda...
# Copyright 2019 DeepMind Technologies Limited. 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 ...
[ "jax.tree_flatten", "functools.partial", "jax.tree_util.tree_unflatten", "rlax._src.base.replace_masked", "jax.lax.select", "numpy.split", "jax.tree_leaves", "jax.tree_unflatten", "jax.tree_util.tree_flatten", "jax.tree_map" ]
[((2502, 2539), 'jax.tree_util.tree_flatten', 'jax.tree_util.tree_flatten', (['tree_like'], {}), '(tree_like)\n', (2528, 2539), False, 'import jax\n'), ((3328, 3355), 'jax.tree_flatten', 'jax.tree_flatten', (['tree_like'], {}), '(tree_like)\n', (3344, 3355), False, 'import jax\n'), ((4892, 4932), 'functools.partial', '...
from pathlib import Path MAP_COORDS_DIR = Path(__file__).parent.absolute()
[ "pathlib.Path" ]
[((44, 58), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (48, 58), False, 'from pathlib import Path\n')]