code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python # Copyright 2015 Coursera # # 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 ag...
[ "logging.getLogger", "courseraprogramming.utils.set_logging_level", "courseraprogramming.main.build_parser" ]
[((993, 1012), 'courseraprogramming.main.build_parser', 'main.build_parser', ([], {}), '()\n', (1010, 1012), False, 'from courseraprogramming import main\n'), ((1146, 1165), 'courseraprogramming.main.build_parser', 'main.build_parser', ([], {}), '()\n', (1163, 1165), False, 'from courseraprogramming import main\n'), ((...
# Copyright: (c) 2018, Pluribus Networks # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_coll...
[ "ansible_collections.community.general.tests.unit.compat.mock.patch", "ansible_collections.community.general.tests.unit.modules.utils.set_module_args" ]
[((690, 812), 'ansible_collections.community.general.tests.unit.compat.mock.patch', 'patch', (['"""ansible_collections.community.general.plugins.modules.network.netvisor.pn_admin_session_timeout.run_cli"""'], {}), "(\n 'ansible_collections.community.general.plugins.modules.network.netvisor.pn_admin_session_timeout.r...
# Generated by Django 3.2 on 2021-08-30 08:35 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('service', '0002_alter_service_address'), ('address', '0002_auto_20210830_1305'), ('accounts', '0001_initial'),...
[ "django.db.migrations.DeleteModel", "django.db.models.ForeignKey" ]
[((406, 444), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""Address"""'}), "(name='Address')\n", (428, 444), False, 'from django.db import migrations, models\n'), ((582, 717), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'r...
from luts import kana_to_romaji, romaji_to_kana, simple_kana_to_romaji import random import os import time ## Term info ## term = os.popen('stty size', 'r').read().split() term_height, term_width = int(term[0]), int(term[1]) - 5 # term_width = 30 # i have issues gap = 3 count = 50 max_count = 50 kana_set = simple_k...
[ "os.popen", "random.choice", "time.time" ]
[((2335, 2346), 'time.time', 'time.time', ([], {}), '()\n', (2344, 2346), False, 'import time\n'), ((1800, 1819), 'random.choice', 'random.choice', (['keys'], {}), '(keys)\n', (1813, 1819), False, 'import random\n'), ((132, 158), 'os.popen', 'os.popen', (['"""stty size"""', '"""r"""'], {}), "('stty size', 'r')\n", (140...
######################################################################## # written by : <NAME>, <NAME>, CS, # # Im<NAME> AlFaisal University # #----------------------------------------------------------------------# # # # This interface is the user main menu where the users can ...
[ "ChooseDestination.ChooseDes", "login.loginClass", "sqlite3.connect", "gi.repository.Gtk.Builder", "gi.require_version", "changePass.change_password", "ScanTape.ScanTape" ]
[((560, 592), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (578, 592), False, 'import gi\n'), ((900, 913), 'gi.repository.Gtk.Builder', 'Gtk.Builder', ([], {}), '()\n', (911, 913), False, 'from gi.repository import Gtk\n'), ((1751, 1807), 'changePass.change_password'...
#!/usr/bin/env python import rospy, sys from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import cv2, os, struct from sensor_msgs.msg import CompressedImage import numpy as np class PngWriter: def __init__(self): self.save_root = "" if rospy.has_param("save_root")...
[ "cv2.imwrite", "rospy.init_node", "rospy.get_param", "rospy.has_param", "os.path.join", "numpy.fromstring", "cv_bridge.CvBridge", "struct.unpack", "rospy.spin", "rospy.Subscriber", "rospy.loginfo" ]
[((3950, 3991), 'rospy.init_node', 'rospy.init_node', (['"""writer"""'], {'anonymous': '(True)'}), "('writer', anonymous=True)\n", (3965, 3991), False, 'import rospy, sys\n'), ((292, 320), 'rospy.has_param', 'rospy.has_param', (['"""save_root"""'], {}), "('save_root')\n", (307, 320), False, 'import rospy, sys\n'), ((53...
__author__ = 'max' from overrides import overrides from typing import Tuple, Dict import torch from wolf.flows.couplings.blocks import NICEConvBlock, MCFBlock, NICEMLPBlock from wolf.flows.couplings.blocks import LocalLinearCondNet, GlobalLinearCondNet, GlobalAttnCondNet from wolf.flows.flow import Flow from wolf.flo...
[ "wolf.flows.couplings.blocks.GlobalAttnCondNet", "wolf.flows.couplings.blocks.MCFBlock", "wolf.flows.couplings.transform.Affine", "torch.abs", "wolf.flows.couplings.transform.SymmELU", "wolf.flows.couplings.transform.Additive", "wolf.flows.couplings.transform.ReLU", "wolf.flows.couplings.blocks.NICECo...
[((17147, 17235), 'wolf.flows.couplings.blocks.MCFBlock', 'MCFBlock', (['in_channels', 'out_channels', 'kernel_size', 'hidden_channels', 'order', 'activation'], {}), '(in_channels, out_channels, kernel_size, hidden_channels, order,\n activation)\n', (17155, 17235), False, 'from wolf.flows.couplings.blocks import NIC...
import datetime from django_scopes import scopes_disabled from tests.base import SoupTest, extract_form_fields from pretix.base.models import Event, Organizer, Team, User class OrganizerTest(SoupTest): @scopes_disabled() def setUp(self): super().setUp() self.user = User.objects.create_user('...
[ "datetime.datetime", "pretix.base.models.Team.objects.create", "pretix.base.models.Organizer.objects.create", "django_scopes.scopes_disabled", "pretix.base.models.User.objects.create_user" ]
[((211, 228), 'django_scopes.scopes_disabled', 'scopes_disabled', ([], {}), '()\n', (226, 228), False, 'from django_scopes import scopes_disabled\n'), ((294, 338), 'pretix.base.models.User.objects.create_user', 'User.objects.create_user', (['"""<EMAIL>"""', '"""dummy"""'], {}), "('<EMAIL>', 'dummy')\n", (318, 338), Fal...
import datetime import logging from bs4 import BeautifulSoup import requests URL_PAGE = 'http://gspns.co.rs/red-voznje/prigradski' logger = logging.getLogger() def get_all_bus_lines(): r = requests.get(URL_PAGE) soup = BeautifulSoup(r.content, 'html.parser') vazi_od = soup.find('select', {'id': 'vaziod'}...
[ "logging.getLogger", "bs4.BeautifulSoup", "datetime.datetime.strptime", "requests.get" ]
[((141, 160), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (158, 160), False, 'import logging\n'), ((196, 218), 'requests.get', 'requests.get', (['URL_PAGE'], {}), '(URL_PAGE)\n', (208, 218), False, 'import requests\n'), ((230, 269), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.content', '"""html.parser"""...
from celery import Celery from celery import bootsteps from kombu import Consumer from lablog import config from lablog import db from lablog import messages from lablog.models.client import Admin from lablog.models.location import Location from lablog.hooks import post_slack from lablog.triggers import Trigger import ...
[ "lablog.db.init_influxdb", "celery.Celery", "lablog.models.location.Location.find", "logging.exception", "lablog.triggers.Trigger.find", "kombu.Consumer", "logging.error", "lablog.db.init_mq" ]
[((338, 356), 'lablog.db.init_influxdb', 'db.init_influxdb', ([], {}), '()\n', (354, 356), False, 'from lablog import db\n'), ((362, 374), 'lablog.db.init_mq', 'db.init_mq', ([], {}), '()\n', (372, 374), False, 'from lablog import db\n'), ((382, 398), 'celery.Celery', 'Celery', (['__name__'], {}), '(__name__)\n', (388,...
import os import json def write_data_json_file(output_directory, file_name, writePath): # Load in existing file record if os.path.isfile('./' + output_directory + file_name): with open(output_directory + file_name) as json_file: f_data = json.load(json_file) if len(f_data) != 0:...
[ "os.path.isfile", "json.load", "json.dump" ]
[((131, 182), 'os.path.isfile', 'os.path.isfile', (["('./' + output_directory + file_name)"], {}), "('./' + output_directory + file_name)\n", (145, 182), False, 'import os\n'), ((442, 466), 'json.dump', 'json.dump', (['data', 'outfile'], {}), '(data, outfile)\n', (451, 466), False, 'import json\n'), ((267, 287), 'json....
import torch import os from models import Stereo from utils import myUtils from submission.Submission import Submission as Base import collections # Submission for any stereo model including SR-Stereo class Submission(Base): def __init__(self, subImgLoader): super(Submission, self).__init__(subImgLoader) ...
[ "collections.OrderedDict", "utils.myUtils.depth", "os.path.join", "utils.myUtils.getBasicParser", "utils.myUtils.getLastNotList", "utils.myUtils.savePreprocessDisp", "dataloader.getDataLoader", "torch.cuda.is_available", "os.path.basename" ]
[((1332, 1554), 'utils.myUtils.getBasicParser', 'myUtils.getBasicParser', (["['outputFolder', 'maxdisp', 'dispscale', 'model', 'datapath', 'loadmodel',\n 'no_cuda', 'dataset', 'subtype', 'load_scale', 'half']"], {'description': '"""generate png image for kitti final submission"""'}), "(['outputFolder', 'maxdisp', 'd...
"""CLI for optimal subgroups based on individual preferences""" from argparse import ArgumentParser import pandas as pd import numpy as np from pulp import LpProblem, LpMinimize, LpVariable, lpSum NAN_VALUE = 10000 # Arbitrarily high value to force optimization away from empty choices def optimize(): """Run the ...
[ "pulp.LpProblem", "argparse.ArgumentParser", "numpy.array", "numpy.isnan", "numpy.nanmax", "pandas.read_excel", "pulp.LpVariable" ]
[((369, 442), 'pandas.read_excel', 'pd.read_excel', (['args.file_path', '"""Sheet1"""'], {'index_col': 'None', 'na_values': "['NA']"}), "(args.file_path, 'Sheet1', index_col=None, na_values=['NA'])\n", (382, 442), True, 'import pandas as pd\n'), ((454, 499), 'pulp.LpProblem', 'LpProblem', (['"""Optimal 10x Grouping"""'...
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
[ "azext_iot.common.utility.calculate_millisec_since_unix_epoch_utc", "azext_iot.common.utility.validate_key_value_pairs", "azext_iot.tests.settings.DynamoSettings", "uuid.uuid4" ]
[((771, 812), 'azext_iot.tests.settings.DynamoSettings', 'DynamoSettings', (['ENV_SET_TEST_IOTHUB_BASIC'], {}), '(ENV_SET_TEST_IOTHUB_BASIC)\n', (785, 812), False, 'from azext_iot.tests.settings import DynamoSettings, ENV_SET_TEST_IOTHUB_BASIC\n'), ((1751, 1796), 'azext_iot.common.utility.calculate_millisec_since_unix_...
"""open-discussions api client""" import requests from open_discussions_api.users.client import UsersApi from open_discussions_api.utils import get_token from open_discussions_api.channels.client import ChannelsApi class OpenDiscussionsApi: """ A client for speaking with open-discussions Args: s...
[ "requests.session", "open_discussions_api.utils.get_token" ]
[((1263, 1281), 'requests.session', 'requests.session', ([], {}), '()\n', (1279, 1281), False, 'import requests\n'), ((1528, 1577), 'open_discussions_api.utils.get_token', 'get_token', (['self.secret', 'self.username', 'self.roles'], {}), '(self.secret, self.username, self.roles)\n', (1537, 1577), False, 'from open_dis...
# Generated by Django 3.2.6 on 2021-09-22 17:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('spyfall', '0003_players_refresh_room'), ] operations = [ migrations.AlterField( model_name='players', name='refresh_...
[ "django.db.models.BooleanField" ]
[((345, 379), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (364, 379), False, 'from django.db import migrations, models\n')]
import os import numpy as np import xarray as xr import pytest import intake_io from .fixtures import * def test_round_trip_uncompressed(tmp_path): fpath = os.path.join(tmp_path, "uncompressed.klb") if os.path.exists(fpath): os.remove(fpath) for img0, shape, axes, spacing, units in random_images(...
[ "os.path.exists", "numpy.mean", "os.path.getsize", "intake_io.source.KlbSource", "os.path.join", "intake_io.get_spacing", "intake_io.get_axes", "intake_io.imload", "intake_io.imsave", "os.remove" ]
[((162, 204), 'os.path.join', 'os.path.join', (['tmp_path', '"""uncompressed.klb"""'], {}), "(tmp_path, 'uncompressed.klb')\n", (174, 204), False, 'import os\n'), ((212, 233), 'os.path.exists', 'os.path.exists', (['fpath'], {}), '(fpath)\n', (226, 233), False, 'import os\n'), ((243, 259), 'os.remove', 'os.remove', (['f...
import websocket import pandas as pd import numpy as np import json import hmac import time import matplotlib.pyplot as plt from datetime import datetime, timedelta import threading import dateutil.parser import sqlite3 # class MaxSizeList(list): # def __init__(self, maxlen): # self._maxlen = maxlen ...
[ "json.loads", "datetime.datetime.fromtimestamp", "sqlite3.connect", "json.dumps", "websocket.WebSocketApp", "time.time" ]
[((695, 721), 'sqlite3.connect', 'sqlite3.connect', (['"""ohlc.db"""'], {}), "('ohlc.db')\n", (710, 721), False, 'import sqlite3\n'), ((4330, 4442), 'websocket.WebSocketApp', 'websocket.WebSocketApp', (['socket'], {'on_open': 'on_open', 'on_close': 'on_close', 'on_message': 'on_message', 'on_error': 'on_error'}), '(soc...
from flask import Flask, request from twilio import twiml from twilio.rest import TwilioRestClient app = Flask(__name__) # Instantiate a Twilio REST API client client = TwilioRestClient() FIRST_TIME = 0 ASK_NAME = 1 ASK_COORGANIZERS = 2 meetup_config = { 'status': FIRST_TIME, 'phone_number': None, 'meet...
[ "twilio.twiml.Response", "twilio.rest.TwilioRestClient", "flask.Flask" ]
[((106, 121), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (111, 121), False, 'from flask import Flask, request\n'), ((171, 189), 'twilio.rest.TwilioRestClient', 'TwilioRestClient', ([], {}), '()\n', (187, 189), False, 'from twilio.rest import TwilioRestClient\n'), ((1616, 1632), 'twilio.twiml.Response',...
from flask import render_template, url_for from . import main # from app import app from ..request import get_source, get_source_articles # Views @main.route('/') def index(): ''' View root page function that returns the index page and its data ''' # Getting news headlines news_source = get_source...
[ "flask.render_template" ]
[((364, 427), 'flask.render_template', 'render_template', (['"""index.html"""'], {'title': 'title', 'sources': 'news_source'}), "('index.html', title=title, sources=news_source)\n", (379, 427), False, 'from flask import render_template, url_for\n'), ((634, 685), 'flask.render_template', 'render_template', (['"""article...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : memory.py # @Author: zixiao # @Date : 2019-04-01 # @Desc : import numpy as np class SumTree(object): data_index = 0 def __init__(self, size, frame_len, w, h): self.data_size = size self.tree_size = 2 * size - 1 self.tree = np....
[ "numpy.minimum", "numpy.power", "numpy.max", "numpy.zeros", "numpy.random.uniform", "numpy.concatenate", "numpy.min" ]
[((317, 359), 'numpy.zeros', 'np.zeros', (['self.tree_size'], {'dtype': 'np.float32'}), '(self.tree_size, dtype=np.float32)\n', (325, 359), True, 'import numpy as np\n'), ((383, 421), 'numpy.zeros', 'np.zeros', (['(size, w, h)'], {'dtype': 'np.uint8'}), '((size, w, h), dtype=np.uint8)\n', (391, 421), True, 'import nump...
# Copyright (C) 2016-2021 Alibaba Group Holding Limited # # 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 l...
[ "efl.data.FederalDataIO", "tensorflow.compat.v1.feature_column.numeric_column", "efl.FederalSample", "tensorflow.compat.v1.truncated_normal_initializer", "tensorflow.compat.v1.train.GradientDescentOptimizer", "efl.procedure_fn.train", "efl.FederalModel" ]
[((2118, 2136), 'efl.FederalModel', 'efl.FederalModel', ([], {}), '()\n', (2134, 2136), False, 'import efl\n'), ((2298, 2322), 'efl.procedure_fn.train', 'efl.procedure_fn.train', ([], {}), '()\n', (2320, 2322), False, 'import efl\n'), ((829, 946), 'efl.data.FederalDataIO', 'efl.data.FederalDataIO', (['"""./follower_tra...
from ferris import BasicModel, ndb import logging class Main(BasicModel): criteria = ndb.StringProperty() data = ndb.JsonProperty() permissions = ndb.JsonProperty() resolved = ndb.BooleanProperty() @classmethod def create(cls, params): entity = cls.get(params['criteria']) if ...
[ "ferris.ndb.JsonProperty", "ferris.ndb.BooleanProperty", "ferris.ndb.StringProperty", "ferris.ndb.Key" ]
[((92, 112), 'ferris.ndb.StringProperty', 'ndb.StringProperty', ([], {}), '()\n', (110, 112), False, 'from ferris import BasicModel, ndb\n'), ((124, 142), 'ferris.ndb.JsonProperty', 'ndb.JsonProperty', ([], {}), '()\n', (140, 142), False, 'from ferris import BasicModel, ndb\n'), ((161, 179), 'ferris.ndb.JsonProperty', ...
from django.db import transaction from rest_framework import serializers from dj_rest_auth.registration.serializers import RegisterSerializer from django_countries.serializer_fields import CountryField from .models import GENDER_CHOICES,CustomUser class CustomUserRegistrationSerializer(RegisterSerializer): name=s...
[ "django_countries.serializer_fields.CountryField", "rest_framework.serializers.CharField", "rest_framework.serializers.ChoiceField" ]
[((319, 356), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (340, 356), False, 'from rest_framework import serializers\n'), ((368, 415), 'rest_framework.serializers.ChoiceField', 'serializers.ChoiceField', ([], {'choices': 'GENDER_CHOICES'}), '(cho...
#!/usr/bin/env python """ Score the predictions with gold labels, using precision, recall and F1 metrics. """ import argparse import sys, os from collections import Counter import numpy as np from pathlib import Path NO_RELATION = "no_relation" def parse_arguments(): parser = argparse.ArgumentP...
[ "numpy.mean", "argparse.ArgumentParser", "pathlib.Path", "collections.Counter", "numpy.std", "sys.stdout.write" ]
[((302, 392), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Score a prediction file using the gold labels."""'}), "(description=\n 'Score a prediction file using the gold labels.')\n", (325, 392), False, 'import argparse\n'), ((772, 781), 'collections.Counter', 'Counter', ([], {}), '...
import numpy as np import pickle import os from PIL import Image import time from tqdm import tqdm, trange import shutil from random import randint import argparse import glob import pdb import random import math import time import argparse import matplotlib.pyplot as plt from copy import deepcopy import sys sys.path.a...
[ "torch.nn.CrossEntropyLoss", "utils.adjust_learning_rate", "utils.calculate_accuracy", "dataset_class.dataset_video_class", "os.path.exists", "opts.parse_opts", "torchsummary.summary", "utils.load_checkpoint", "model.generate_model", "tqdm.trange", "warnings.filterwarnings", "torch.cat", "to...
[((939, 972), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (962, 972), False, 'import warnings\n'), ((1071, 1083), 'opts.parse_opts', 'parse_opts', ([], {}), '()\n', (1081, 1083), False, 'from opts import parse_opts\n'), ((1286, 1310), 'os.path.exists', 'os.path.exists',...
# Generated by Django 3.2.5 on 2021-08-29 11:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("test_app", "0003_alter_testbroker_options"), ] operations = [ migrations.AlterModelOptions( name="testbroker", options={ ...
[ "django.db.migrations.AlterModelOptions" ]
[((234, 413), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""testbroker"""', 'options': "{'permissions': [('unique_permission', 'Unique permission'), (\n 'not_unique_permission', 'Not unique permission')]}"}), "(name='testbroker', options={'permissions': [(\n 'unique_p...
import yaml _config = None def load_config(config_file: str): with open(config_file) as file: # The FullLoader parameter handles the conversion from YAML # scalar values to Python the dictionary format global _config _config = yaml.load(file, Loader=yaml.FullLoader) def get(path...
[ "yaml.load" ]
[((266, 305), 'yaml.load', 'yaml.load', (['file'], {'Loader': 'yaml.FullLoader'}), '(file, Loader=yaml.FullLoader)\n', (275, 305), False, 'import yaml\n')]
import numpy as np from skimage.morphology import white_tophat as skimage_white_tophat from skimage.exposure import rescale_intensity from skimage.restoration import richardson_lucy def white_tophat(image, radius): """ """ selem = np.ones((radius,)*image.ndim) return skimage_white_tophat(image, selem...
[ "numpy.abs", "skimage.morphology.white_tophat", "numpy.ones", "numpy.conj", "numpy.fft.fftn", "skimage.restoration.richardson_lucy", "numpy.fft.ifftn" ]
[((246, 277), 'numpy.ones', 'np.ones', (['((radius,) * image.ndim)'], {}), '((radius,) * image.ndim)\n', (253, 277), True, 'import numpy as np\n'), ((287, 327), 'skimage.morphology.white_tophat', 'skimage_white_tophat', (['image'], {'selem': 'selem'}), '(image, selem=selem)\n', (307, 327), True, 'from skimage.morpholog...
from setuptools import find_packages, setup __version__ = '0.1' url = 'https://github.com/ntt123/haiku_trainer' download_url = '{}/archive/{}.tar.gz'.format(url, __version__) install_requires = [] setup_requires = [] tests_require = [] setup( name='haiku_trainer', version=__version__, description='A help...
[ "setuptools.find_packages" ]
[((652, 667), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (665, 667), False, 'from setuptools import find_packages, setup\n')]
import warnings import os warnings.filterwarnings('ignore', category=FutureWarning) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' ################################################################### import numpy as np import tensorflow as tf import random as rn #np.random.seed(42) #rn.seed(12345) #from keras import...
[ "twilbert.utils.generator.SingleFinetuningGenerator", "twilbert.optimization.lr_annealing.Noam", "twilbert.utils.utils.Utils.get_best_params", "itertools.product", "twilbert.utils.utils.Utils.load_dataset", "twilbert.utils.finetuning_monitor.FinetuningMonitor", "keras.backend.clear_session", "twilbert...
[((28, 85), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'FutureWarning'}), "('ignore', category=FutureWarning)\n", (51, 85), False, 'import warnings\n'), ((2273, 2298), 'twilbert.preprocessing.tokenizer.FullTokenizer', 'FullTokenizer', (['vocab_file'], {}), '(vocab_file)\n', (2...
""" Grains for junos. NOTE this is a little complicated--junos can only be accessed via salt-proxy-minion. Thus, some grains make sense to get them from the minion (PYTHONPATH), but others don't (ip_interfaces) """ import logging import salt.utils.platform __proxyenabled__ = ["junos"] __virtualname__ = "junos" # G...
[ "logging.getLogger" ]
[((345, 372), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (362, 372), False, 'import logging\n')]
import pandas as pd import sys job_df = pd.read_csv(sys.argv[1]) my_index = pd.MultiIndex(levels = [[],[]], codes=[[],[]], names=[u'labels', u'path_idx']) df_upd = pd.DataFrame(index=my_index) #print(df) for idx in job_df.index: print(idx) reactant_idx = job_df.loc[idx, 'reactant'] r_idx = job_df.loc[id...
[ "pandas.read_pickle", "pandas.MultiIndex", "pandas.read_csv", "pandas.DataFrame", "pandas.concat" ]
[((42, 66), 'pandas.read_csv', 'pd.read_csv', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (53, 66), True, 'import pandas as pd\n'), ((79, 157), 'pandas.MultiIndex', 'pd.MultiIndex', ([], {'levels': '[[], []]', 'codes': '[[], []]', 'names': "[u'labels', u'path_idx']"}), "(levels=[[], []], codes=[[], []], names=[u'labels',...
""" Base Message types to be used to construct ace messages. """ from edx_ace.message import MessageType from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers class BaseMessageType(MessageType): # lint-amnesty, pylint: disable=missing-class-docstring def __init__(self, *args,...
[ "openedx.core.djangoapps.site_configuration.helpers.get_value" ]
[((397, 450), 'openedx.core.djangoapps.site_configuration.helpers.get_value', 'configuration_helpers.get_value', (['"""email_from_address"""'], {}), "('email_from_address')\n", (428, 450), True, 'from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers\n')]
import os import shutil from textops import cut, grep, echo from anadroid.Types import TESTING_FRAMEWORK from anadroid.application.AbstractApplication import AbstractApplication from anadroid.build.versionUpgrader import DefaultSemanticVersion from anadroid.instrument.Types import INSTRUMENTATION_TYPE from anadroid.u...
[ "textops.grep", "os.path.exists", "textops.cut", "shutil.move", "os.scandir", "os.path.join", "anadroid.utils.Utils.logi", "shutil.copyfile", "os.mkdir", "anadroid.utils.Utils.logw", "anadroid.utils.Utils.get_date_str", "anadroid.build.versionUpgrader.DefaultSemanticVersion" ]
[((960, 974), 'anadroid.utils.Utils.get_date_str', 'get_date_str', ([], {}), '()\n', (972, 974), False, 'from anadroid.utils.Utils import get_date_str, logw, logi\n'), ((2002, 2037), 'os.path.join', 'os.path.join', (['self.local_res', '"""all"""'], {}), "(self.local_res, 'all')\n", (2014, 2037), False, 'import os\n'), ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'UI_v1\AddTransaction.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_window_addTransaction(object): def setupUi(s...
[ "PyQt5.QtWidgets.QDateEdit", "PyQt5.QtWidgets.QComboBox", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QRadioButton", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QButtonGroup", "PyQt5.QtWidgets.QLineEdit", "PyQt5.QtWidgets.QCommandLinkButton" ]
[((623, 665), 'PyQt5.QtWidgets.QComboBox', 'QtWidgets.QComboBox', (['window_addTransaction'], {}), '(window_addTransaction)\n', (642, 665), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((928, 973), 'PyQt5.QtWidgets.QRadioButton', 'QtWidgets.QRadioButton', (['window_addTransaction'], {}), '(window_addTransact...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020 Alibaba Group Holding 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...
[ "graphscope.framework.graph.Graph", "os.path.join" ]
[((1302, 1332), 'graphscope.framework.graph.Graph', 'Graph', (['sess'], {'directed': 'directed'}), '(sess, directed=directed)\n', (1307, 1332), False, 'from graphscope.framework.graph import Graph\n'), ((2024, 2059), 'os.path.join', 'os.path.join', (['prefix', '"""created.csv"""'], {}), "(prefix, 'created.csv')\n", (20...
import datetime import random from nonebot import CommandGroup, logger from nonebot.plugin.export import export from nonebot.typing import T_State from nonebot.adapters.cqhttp.bot import Bot from nonebot.adapters.cqhttp.event import GroupMessageEvent from nonebot.adapters.cqhttp.permission import GROUP from nonebot.ada...
[ "omega_miya.utils.omega_plugin_utils.init_processor_state", "nonebot.plugin.export.export", "datetime.date.today", "nonebot.adapters.cqhttp.message.MessageSegment.at", "nonebot.logger.info" ]
[((830, 838), 'nonebot.plugin.export.export', 'export', ([], {}), '()\n', (836, 838), False, 'from nonebot.plugin.export import export\n'), ((2383, 2439), 'nonebot.logger.info', 'logger.info', (['f"""{event.group_id}/{event.user_id} 进行了一次求签"""'], {}), "(f'{event.group_id}/{event.user_id} 进行了一次求签')\n", (2394, 2439), Fal...
import pandas as pd import math from pandas import read_csv, to_numeric import numpy from numpy import nan import statistics as sta #df = pd.read_csv('/Users/king/Documents/python/control2/athlete_events.csv') fields = ['Height', 'Year', "Sport"] df = pd.read_csv('/Users/king/Documents/python/control2/athlete_even...
[ "statistics.mean", "pandas.read_csv", "numpy.sort", "math.sqrt", "pandas.to_numeric" ]
[((257, 371), 'pandas.read_csv', 'pd.read_csv', (['"""/Users/king/Documents/python/control2/athlete_events.csv"""'], {'skipinitialspace': '(True)', 'usecols': 'fields'}), "('/Users/king/Documents/python/control2/athlete_events.csv',\n skipinitialspace=True, usecols=fields)\n", (268, 371), True, 'import pandas as pd\...
import numpy as np from py_pol import degrees from py_pol.stokes import Stokes from py_pol.mueller import Mueller import random V=Stokes('V') V.from_elements(1, -1, 0, 0) H=Stokes('H') H.linear_light(angle=0, intensity=1) random.randomint()
[ "py_pol.stokes.Stokes", "random.randomint" ]
[((131, 142), 'py_pol.stokes.Stokes', 'Stokes', (['"""V"""'], {}), "('V')\n", (137, 142), False, 'from py_pol.stokes import Stokes\n'), ((175, 186), 'py_pol.stokes.Stokes', 'Stokes', (['"""H"""'], {}), "('H')\n", (181, 186), False, 'from py_pol.stokes import Stokes\n'), ((225, 243), 'random.randomint', 'random.randomin...
"""Unit test for Switch objects.""" import asyncio import unittest from unittest.mock import MagicMock, Mock, patch from xknx import XKNX from xknx.devices import Switch from xknx.dpt import DPTBinary from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueRead, GroupValueResponse, Gr...
[ "unittest.mock.Mock", "xknx.XKNX", "asyncio.new_event_loop", "xknx.telegram.apci.GroupValueRead", "xknx.telegram.GroupAddress", "xknx.dpt.DPTBinary", "asyncio.sleep", "xknx.devices.Switch", "asyncio.set_event_loop", "unittest.mock.patch" ]
[((685, 709), 'asyncio.new_event_loop', 'asyncio.new_event_loop', ([], {}), '()\n', (707, 709), False, 'import asyncio\n'), ((718, 751), 'asyncio.set_event_loop', 'asyncio.set_event_loop', (['self.loop'], {}), '(self.loop)\n', (740, 751), False, 'import asyncio\n'), ((970, 976), 'xknx.XKNX', 'XKNX', ([], {}), '()\n', (...
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ "oci.util.formatted_flat_dict" ]
[((6296, 6321), 'oci.util.formatted_flat_dict', 'formatted_flat_dict', (['self'], {}), '(self)\n', (6315, 6321), False, 'from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel\n')]
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import json import unittest import mock from django import test from django.conf import settings from django.contrib.auth import get_user_model from django.core import serializers from django.core.urlresolvers import reverse from django.ht...
[ "django.contrib.auth.get_user_model", "mock.patch", "django.http.QueryDict", "django.core.urlresolvers.reverse", "mock.patch.object", "django.core.serializers.serialize", "mock.MagicMock" ]
[((5838, 5931), 'mock.patch.object', 'mock.patch.object', (['SQRLCompleteRegistrationView', '"""check_session_for_sqrl_identity_or_404"""'], {}), "(SQRLCompleteRegistrationView,\n 'check_session_for_sqrl_identity_or_404')\n", (5855, 5931), False, 'import mock\n'), ((5933, 5967), 'mock.patch.object', 'mock.patch.obje...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import glob import re import sys import numpy as np if 'linux' in sys.platform: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt else: import matplotlib.pyplot as plt def get_args(): parser = argparse.ArgumentP...
[ "matplotlib.pyplot.savefig", "argparse.ArgumentParser", "matplotlib.pyplot.ylabel", "matplotlib.use", "matplotlib.pyplot.xlabel", "numpy.argmin", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend" ]
[((171, 192), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (185, 192), False, 'import matplotlib\n'), ((302, 327), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (325, 327), False, 'import argparse\n'), ((558, 605), 'numpy.argmin', 'np.argmin', (['((pre_rec[:, 0] - pre_...
# -*- coding: utf-8 -*- """ Bottom up emissions From AFEAS data of cumulative sales of CFC-11 products, compute bank sizes and emissions at all levels from production to installation to banks Created on Thu Oct 24 15:00:20 2019 @author: <NAME> """ import numpy as np import pandas as pd import matplotlib.pyplot as pl...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.tick_params", "matplotlib.pyplot.figure", "matplotlib.pyplot.axes", "pandas.read_excel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.sho...
[((382, 429), 'pandas.read_excel', 'pd.read_excel', (['"""Data/Cummulative_emissions.xls"""'], {}), "('Data/Cummulative_emissions.xls')\n", (395, 429), True, 'import pandas as pd\n'), ((2755, 2786), 'matplotlib.pyplot.figure', 'plt.figure', (['(1)'], {'figsize': '[15, 10]'}), '(1, figsize=[15, 10])\n', (2765, 2786), Tr...
from typing import Dict from pyspark.sql import SparkSession, Column, DataFrame # noinspection PyUnresolvedReferences from spark_auto_mapper.automappers.automapper import AutoMapper from spark_auto_mapper.data_types.if_column_exists import AutoMapperIfColumnExistsType from spark_auto_mapper.helpers.automapper_helper...
[ "spark_auto_mapper.helpers.automapper_helpers.AutoMapperHelpers.text", "spark_auto_mapper.automappers.automapper.AutoMapper", "spark_auto_mapper.helpers.automapper_helpers.AutoMapperHelpers.column" ]
[((854, 952), 'spark_auto_mapper.automappers.automapper.AutoMapper', 'AutoMapper', ([], {'view': '"""members"""', 'source_view': '"""patients"""', 'keys': "['member_id']", 'drop_key_columns': '(False)'}), "(view='members', source_view='patients', keys=['member_id'],\n drop_key_columns=False)\n", (864, 952), False, '...
import pathlib import pandas as pd import pytest root_directory = pathlib.Path(__file__).parent.resolve() @pytest.fixture(scope="session") def shared_data_folder() -> pathlib.Path: return root_directory / "_shared_data" @pytest.fixture(scope="function") def battery_wl(shared_data_folder) -> pd.Series: ret...
[ "pandas.to_timedelta", "pandas.read_csv", "pathlib.Path", "pytest.fixture", "pandas.to_datetime" ]
[((111, 142), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (125, 142), False, 'import pytest\n'), ((231, 263), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (245, 263), False, 'import pytest\n'), ((552, 584), 'pytest.fixtur...
from typing import Optional from django.utils import timezone from request_logging.base import append_to_list, retrieve from request_logging.models import RequestLog import logging logger = logging.getLogger("ablator.functionality") LOK_KEY = "list-of-timestamp-keys" def save_new_timestamp_key(new_key): append...
[ "logging.getLogger", "request_logging.base.retrieve", "request_logging.models.RequestLog", "django.utils.timezone.now", "request_logging.base.append_to_list" ]
[((193, 235), 'logging.getLogger', 'logging.getLogger', (['"""ablator.functionality"""'], {}), "('ablator.functionality')\n", (210, 235), False, 'import logging\n'), ((314, 346), 'request_logging.base.append_to_list', 'append_to_list', (['LOK_KEY', 'new_key'], {}), '(LOK_KEY, new_key)\n', (328, 346), False, 'from reque...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and rel...
[ "torch.is_nonzero", "torch.jit.trace", "dnnlib.EasyDict", "pickle.dump", "dnnlib.make_cache_dir_path", "torch.as_tensor", "dnnlib.util.open_url", "torch.jit.load", "pickle.load", "os.replace", "torch.numel", "torch.tensor", "os.path.isfile", "os.path.dirname", "uuid.uuid4", "torch.oute...
[((824, 849), 'dnnlib.EasyDict', 'dnnlib.EasyDict', (['G_kwargs'], {}), '(G_kwargs)\n', (839, 849), False, 'import dnnlib\n'), ((880, 911), 'dnnlib.EasyDict', 'dnnlib.EasyDict', (['dataset_kwargs'], {}), '(dataset_kwargs)\n', (895, 911), False, 'import dnnlib\n'), ((5178, 5208), 'torch.cat', 'torch.cat', (['all_feature...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ts=2 sw=2 et ai ############################################################################### # Copyright (c) 2012,2013 <NAME> <EMAIL> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation...
[ "inspect.ismethod", "inspect.isclass", "imp.load_source", "json.dumps", "inspect.getfile", "layouthandler.AVNLayoutHandler.getConfigName", "avnav_config.AVNConfig.getDirWithDefault", "usb.AVNUsbSerialReader.getConfigName", "charthandler.AVNChartHandler.getConfigName", "avnav_handlerList.registerHa...
[((15277, 15328), 'avnav_handlerList.registerHandler', 'avnav_handlerList.registerHandler', (['AVNPluginHandler'], {}), '(AVNPluginHandler)\n', (15310, 15328), False, 'import avnav_handlerList\n'), ((8675, 8736), 'avnav_config.AVNConfig.getDirWithDefault', 'AVNConfig.getDirWithDefault', (['self.param', '"""userDir"""',...
from tkinter import * from tkinter import ttk from tkinter import filedialog from tkinter import messagebox import tkinter import pandas as pd import Web_Scraping class Tela: def __init__(self, janela): #Configurando Janela janela.geometry("650x400+100+100") janela['...
[ "pandas.DataFrame", "Web_Scraping.Buscar_game", "tkinter.ttk.Treeview" ]
[((2824, 2883), 'tkinter.ttk.Treeview', 'ttk.Treeview', (['janela'], {'columns': 'self.columns', 'show': '"""headings"""'}), "(janela, columns=self.columns, show='headings')\n", (2836, 2883), False, 'from tkinter import ttk\n'), ((5794, 5835), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'lista', 'columns': 'colun...
# processhandler.py # # Copyright (c) 2018, <NAME> <<EMAIL>> # # 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, mod...
[ "PyQt5.QtCore.QByteArray", "PyQt5.QtCore.pyqtSignal", "PyQt5.QtCore.QProcess", "PyQt5.QtCore.QObject.__init__" ]
[((1295, 1310), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['str'], {}), '(str)\n', (1305, 1310), False, 'from PyQt5.QtCore import QCoreApplication, QByteArray, QObject, QProcess, QThread, pyqtSignal\n'), ((1329, 1344), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['str'], {}), '(str)\n', (1339, 1344), False, 'from PyQt5.Q...
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR PGDump driver. # Author: <NAME> <even dot rouault at mines dash paris dot org> # #################################################...
[ "osgeo.ogr.GetDriverByName", "osgeo.osr.SpatialReference", "osgeo.ogr.CreateGeometryFromWkt", "gdaltest.post_reason", "osgeo.gdal.SetConfigOption", "gdaltest.run_tests", "gdaltest.summarize", "osgeo.ogr.Open", "gdaltest.setup_run", "osgeo.ogr.GeomFieldDefn", "gdaltest.poly_feat.append", "sys.p...
[((1603, 1630), 'sys.path.append', 'sys.path.append', (['"""../pymod"""'], {}), "('../pymod')\n", (1618, 1630), False, 'import sys\n'), ((2233, 2387), 'ogrtest.quick_create_layer_def', 'ogrtest.quick_create_layer_def', (['lyr', "[('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.\n OFTString), ('SHO...
import boto3 def get_client(): return boto3.client('s3') def upload_s3(bucket, file, body): s3_client = get_client() res = s3_client.put_object( Bucket=bucket, Key=file, Body=body ) return res
[ "boto3.client" ]
[((44, 62), 'boto3.client', 'boto3.client', (['"""s3"""'], {}), "('s3')\n", (56, 62), False, 'import boto3\n')]
import tensorflow.keras from tensorflow.keras import layers import os import matplotlib.pyplot as plt from PIL import Image #from numpy import asarray import numpy as np from tensorflow.keras import backend as K from tensorflow.keras.applications.vgg16 import preprocess_input from tensorflow.keras.preproc...
[ "tensorflow.config.run_functions_eagerly", "tensorflow.multiply", "tensorflow.GradientTape", "numpy.array", "tensorflow.keras.models.load_model", "tensorflow.compat.v1.Session", "numpy.mean", "os.listdir", "tensorflow.keras.backend.mean", "numpy.max", "tensorflow.convert_to_tensor", "numpy.max...
[((625, 662), 'tensorflow.config.run_functions_eagerly', 'tf.config.run_functions_eagerly', (['(True)'], {}), '(True)\n', (656, 662), True, 'import tensorflow as tf\n'), ((883, 918), 'tensorflow.compat.v1.Session', 'tf.compat.v1.Session', ([], {'config': 'config'}), '(config=config)\n', (903, 918), True, 'import tensor...
from utils_pos import get_word_tag, preprocess import pandas as pd from collections import defaultdict import math import numpy as np import pickle def test_create_dictionaries(target, training_corpus, vocab): successful_cases = 0 failed_cases = [] test_cases = [ { "name": "default_cas...
[ "numpy.array", "numpy.all", "numpy.allclose", "numpy.isclose" ]
[((16263, 16322), 'numpy.allclose', 'np.allclose', (['result[0:5, 0:5]', "test_case['expected']['0:5']"], {}), "(result[0:5, 0:5], test_case['expected']['0:5'])\n", (16274, 16322), True, 'import numpy as np\n'), ((16799, 16864), 'numpy.allclose', 'np.allclose', (['result[30:35, 30:35]', "test_case['expected']['30:35']"...
# Copyright (c) 2018 <EMAIL> # Description: # implementation of layer normalization # paper: https://arxiv.org/abs/1607.06450v1 import torch import torch.nn as nn class LayerNorm(nn.Module): """ """ def __init__(self, size, eps = 1e-6): super(LayerNorm, self).__init__() self.size = size sel...
[ "torch.zeros", "torch.ones" ]
[((357, 373), 'torch.ones', 'torch.ones', (['size'], {}), '(size)\n', (367, 373), False, 'import torch\n'), ((400, 417), 'torch.zeros', 'torch.zeros', (['size'], {}), '(size)\n', (411, 417), False, 'import torch\n')]
import json import boto3 from elasticsearch import Elasticsearch, RequestsHttpConnection from requests_aws4auth import AWS4Auth from boto3.dynamodb.conditions import Key region = 'us-east-1' service = 'es' host = 'search-ccfinalsearcht-jdyfz3ale3zufejmvivdts3lea.us-east-1.es.amazonaws.com' credentials = boto3.Session...
[ "boto3.client", "requests_aws4auth.AWS4Auth", "elasticsearch.Elasticsearch", "boto3.Session", "json.dumps", "boto3.resource" ]
[((351, 461), 'requests_aws4auth.AWS4Auth', 'AWS4Auth', (['credentials.access_key', 'credentials.secret_key', 'region', 'service'], {'session_token': 'credentials.token'}), '(credentials.access_key, credentials.secret_key, region, service,\n session_token=credentials.token)\n', (359, 461), False, 'from requests_aws4...
""" The program SUMS all of the NUMBERS entered by the USER, while ignoring any input that is not a VALID NUMBER. """ # Import MATH module import math # Acquisition and Control of the DATA entered by the USER number = input("Enter the NUMBER to add: ") numbers = [] while number != "": try: # Storing the ...
[ "math.trunc" ]
[((558, 581), 'math.trunc', 'math.trunc', (['current_sum'], {}), '(current_sum)\n', (568, 581), False, 'import math\n')]
""" ESDL Drive extension - A CDO based ESDL storage solution Connects to the ESDL Drive API for file sharing """ # This work is based on original code developed and copyrighted by TNO 2020. # Subsequent contributions are licensed to you by the developers of such code and are # made available to the Project u...
[ "flask_socketio.emit", "src.log.get_logger", "extensions.session_manager.get_session", "io.BytesIO", "requests.get", "extensions.session_manager.set_session", "extensions.session_manager.get_handler" ]
[((1521, 1545), 'src.log.get_logger', 'log.get_logger', (['__name__'], {}), '(__name__)\n', (1535, 1545), True, 'import src.log as log\n'), ((11855, 11879), 'extensions.session_manager.get_session', 'get_session', (['"""jwt-token"""'], {}), "('jwt-token')\n", (11866, 11879), False, 'from extensions.session_manager impo...
# # Copyright 2020, <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "logging.getLogger", "uuid.uuid5", "re.compile" ]
[((641, 660), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (658, 660), False, 'import logging\n'), ((1482, 1518), 'uuid.uuid5', 'uuid.uuid5', (['uuid.NAMESPACE_URL', 'name'], {}), '(uuid.NAMESPACE_URL, name)\n', (1492, 1518), False, 'import uuid\n'), ((2400, 2422), 're.compile', 're.compile', (['"""^[0-9...
import csv import os import time from SignalModel import TrainingModel from SignalModel import SignalsClassifier import re import pandas as pd import SymSpell from utils.utils import read_glove_vecs from Spec import Specification #0019_DTC, 0027_NET, 0054_HBA, 0057_HRB, 0058_HFC, 0061_HHC, 0062_AVH, 0068_AEB, 0069_CDP...
[ "os.linesep.join", "Spec.Specification", "SymSpell.checker", "SignalModel.SignalsClassifier", "os.getcwd", "utils.utils.read_glove_vecs", "pandas.read_excel", "re.sub" ]
[((875, 886), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (884, 886), False, 'import os\n'), ((1125, 1168), 'utils.utils.read_glove_vecs', 'read_glove_vecs', (['embeddedPath', 'newWordsPath'], {}), '(embeddedPath, newWordsPath)\n', (1140, 1168), False, 'from utils.utils import read_glove_vecs\n'), ((1383, 1445), 'panda...
import discord # noqa: F401 import requests from bs4 import BeautifulSoup from core.classes import Cog_Extension from discord.ext import commands def kktix_count(web): r = requests.get(web) soup = BeautifulSoup(r.text, "html.parser") ticket_count = soup.find("span", class_="info-count") return ticket...
[ "bs4.BeautifulSoup", "discord.ext.commands.command", "requests.get" ]
[((179, 196), 'requests.get', 'requests.get', (['web'], {}), '(web)\n', (191, 196), False, 'import requests\n'), ((208, 244), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.text', '"""html.parser"""'], {}), "(r.text, 'html.parser')\n", (221, 244), False, 'from bs4 import BeautifulSoup\n'), ((363, 380), 'requests.get', 'req...
import cv2 as cv import numpy as np img = cv.imread('Photos/cats.jpg') cv.imshow('Cats', img) blank = np.zeros(img.shape[:2], dtype= 'uint8') cv.imshow("Blank Image", blank) mask = cv.circle(blank.copy(), (img.shape[1]//2, img.shape[0]//2), 100, 255, -1) cv.imshow("mask", mask) mask2 = cv.rectangle(blank.copy(), (i...
[ "cv2.bitwise_and", "cv2.imshow", "numpy.zeros", "cv2.waitKey", "cv2.imread" ]
[((43, 71), 'cv2.imread', 'cv.imread', (['"""Photos/cats.jpg"""'], {}), "('Photos/cats.jpg')\n", (52, 71), True, 'import cv2 as cv\n'), ((72, 94), 'cv2.imshow', 'cv.imshow', (['"""Cats"""', 'img'], {}), "('Cats', img)\n", (81, 94), True, 'import cv2 as cv\n'), ((104, 142), 'numpy.zeros', 'np.zeros', (['img.shape[:2]'],...
## @file # Subclass of UefiDriverWizard, which is generated by wxFormBuilder. # # Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # dis...
[ "UefiDriverWizard.UefiDriverWizard.__init__", "UefiDriverWizardNewProtocol.UefiDriverWizardNewProtocol", "UefiDriverWizardNewGuid.UefiDriverWizardNewGuid", "wx.AboutBox", "wx.DirDialog", "os.path.join", "UefiDriverWizardNewLibraryClass.UefiDriverWizardNewLibraryClass", "UefiDriverWizardNewPackage.Uefi...
[((1361, 1417), 'UefiDriverWizard.UefiDriverWizard.__init__', 'UefiDriverWizard.UefiDriverWizard.__init__', (['self', 'parent'], {}), '(self, parent)\n', (1403, 1417), False, 'import UefiDriverWizard\n'), ((2192, 2255), 'wx.MessageDialog', 'wx.MessageDialog', (['self', 'Message', '"""ERROR"""', '(wx.OK | wx.ICON_ERROR)...
#! /usr/bin/env python from __future__ import print_function import argparse import collections import json import os import shlex import subprocess import sys import boto3 import botocore.exceptions import requests MAILGUN = 'https://api.mailgun.net/v3' AWS_DEFAULT_REGION = boto3.Session().region_name or 'us-east-1...
[ "requests.session", "requests.auth.HTTPBasicAuth", "boto3.client", "argparse.ArgumentParser", "os.getenv", "shlex.split", "boto3.Session", "json.dumps", "boto3.resource", "sys.exit", "json.dump" ]
[((483, 501), 'requests.session', 'requests.session', ([], {}), '()\n', (499, 501), False, 'import requests\n'), ((521, 559), 'requests.auth.HTTPBasicAuth', 'requests.auth.HTTPBasicAuth', (['user', 'key'], {}), '(user, key)\n', (548, 559), False, 'import requests\n'), ((4662, 4680), 'boto3.client', 'boto3.client', (['"...
#!/usr/bin/env python3 import sys import struct # The first magic number MAGIC_0 = 0x0A324655 # The second magic number MAGIC_1 = 0x9E5D5157 # The final magic number MAGIC_2 = 0x0AB16F30 # The block size BLOCK_SIZE = 256 # The UF2 block size UF2_BLOCK_SIZE = 512 # The coda flash address CODA_ADDR = 0x000FFF00 #...
[ "struct.pack_into", "struct.pack", "sys.exit" ]
[((1117, 1303), 'struct.pack_into', 'struct.pack_into', (['"""<IIIIIIII476sI"""', 'buf', '(index * UF2_BLOCK_SIZE)', 'MAGIC_0', 'MAGIC_1', 'FLAGS', '(BASE_ADDR + addr)', 'BLOCK_SIZE', 'index', 'total_count', 'RP2040_FAMILY_ID', 'padded_data', 'MAGIC_2'], {}), "('<IIIIIIII476sI', buf, index * UF2_BLOCK_SIZE, MAGIC_0,\n ...
import numpy as np from randomcsv.CategoryColumn import CategoryColumn def test_should_pick_class_at_random(): column = CategoryColumn('Class', ['A', 'B', 'C'], random_state=42) series = column.generate_entries(5) assert series.at[0] == 'C' assert series.at[1] == 'A' assert series.at[2] == 'C' ...
[ "randomcsv.CategoryColumn.CategoryColumn", "numpy.isnan" ]
[((126, 183), 'randomcsv.CategoryColumn.CategoryColumn', 'CategoryColumn', (['"""Class"""', "['A', 'B', 'C']"], {'random_state': '(42)'}), "('Class', ['A', 'B', 'C'], random_state=42)\n", (140, 183), False, 'from randomcsv.CategoryColumn import CategoryColumn\n'), ((430, 484), 'randomcsv.CategoryColumn.CategoryColumn',...
import ast import csv import os import re def writeCsv(path,data): #把文件当做参数传进去 """01写入数据""" global i with open(path,"w",newline='', encoding='utf-8') as f: writer = csv.writer(f) # print(type(writer),writer,sep="\n") for rowdata in data: row_data_dic = eva...
[ "os.path.exists", "re.compile", "csv.writer", "os.path.join", "os.mkdir" ]
[((778, 797), 're.compile', 're.compile', (['"""{.*?}"""'], {}), "('{.*?}')\n", (788, 797), False, 'import re\n'), ((859, 896), 'os.path.join', 'os.path.join', (['dirname', '"""work-txt.csv"""'], {}), "(dirname, 'work-txt.csv')\n", (871, 896), False, 'import os\n'), ((628, 651), 'os.path.exists', 'os.path.exists', (['d...
""" WSGI config for syllabDash project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from whitenoise import WhiteNoise from django.core.wsgi import get_wsgi_application...
[ "os.environ.setdefault", "whitenoise.WhiteNoise", "django.core.wsgi.get_wsgi_application" ]
[((322, 392), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""syllabDash.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'syllabDash.settings')\n", (343, 392), False, 'import os\n'), ((408, 430), 'django.core.wsgi.get_wsgi_application', 'get_wsgi_application', ([], {}), '()\n', (...
from __future__ import print_function, division import sys, os sys.path.append(os.path.abspath(".")) from utils.lib import * from algorithms.serial.algorithm import Algorithm __author__ = 'george' def default_settings(): """ Default Settings for DE :return: default settings """ return O( gens = 100, ...
[ "os.path.abspath", "algorithms.serial.algorithm.Algorithm.__init__" ]
[((79, 99), 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), "('.')\n", (94, 99), False, 'import sys, os\n'), ((551, 597), 'algorithms.serial.algorithm.Algorithm.__init__', 'Algorithm.__init__', (['self', 'DE.__name__', 'problem'], {}), '(self, DE.__name__, problem)\n', (569, 597), False, 'from algorithms.seria...
import numpy as np import trimesh import spherical_parameterization as sp import pyshtools from pyshtools.shclasses.shcoeffsgrid import SHGrid #mesh = trimesh.load("../suzanne.obj") mesh = trimesh.load("../fuze.obj") #mesh = trimesh.load("../cube.obj") #mesh = trimesh.load("../armadillo.obj") #mesh = trimesh.load(".....
[ "spherical_parameterization.FastSphericalParameterization", "trimesh.load", "pyshtools.shclasses.shcoeffsgrid.SHGrid.from_array", "trimesh.Trimesh" ]
[((191, 218), 'trimesh.load', 'trimesh.load', (['"""../fuze.obj"""'], {}), "('../fuze.obj')\n", (203, 218), False, 'import trimesh\n'), ((338, 376), 'spherical_parameterization.FastSphericalParameterization', 'sp.FastSphericalParameterization', (['mesh'], {}), '(mesh)\n', (370, 376), True, 'import spherical_parameteriz...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 19 16:00:21 2019 @author: lucas """ import pandas as pd import numpy as np from sklearn.impute import SimpleImputer from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from sklearn.naive_bayes impor...
[ "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.StandardScaler", "sklearn.impute.SimpleImputer", "sklearn.naive_bayes.GaussianNB", "sklearn.metrics.accuracy_score", "sklearn.metrics.confusion_matrix" ]
[((402, 432), 'pandas.read_csv', 'pd.read_csv', (['"""credit-data.csv"""'], {}), "('credit-data.csv')\n", (413, 432), True, 'import pandas as pd\n'), ((553, 606), 'sklearn.impute.SimpleImputer', 'SimpleImputer', ([], {'missing_values': 'np.nan', 'strategy': '"""mean"""'}), "(missing_values=np.nan, strategy='mean')\n", ...
import os import re import discord import logging import mimetypes import datetime from time import time from glob import glob from utils.dataIO import dataIO from discord.ext import commands from TextToOwO import owo config = dataIO.load_json("config/settings.json") token = config["TOKEN"] globprefix = config["PREF...
[ "logging.getLogger", "TextToOwO.owo.text_to_owo", "re.search", "re.compile", "os.path.splitext", "os.path.basename", "mimetypes.guess_type", "datetime.timedelta", "time.time", "glob.glob", "utils.dataIO.dataIO.load_json" ]
[((229, 269), 'utils.dataIO.dataIO.load_json', 'dataIO.load_json', (['"""config/settings.json"""'], {}), "('config/settings.json')\n", (245, 269), False, 'from utils.dataIO import dataIO\n'), ((547, 576), 'logging.getLogger', 'logging.getLogger', (['"""launcher"""'], {}), "('launcher')\n", (564, 576), False, 'import lo...
from django import forms from .models import Resident from crispy_forms.helper import FormHelper GENDER_CHOICES = [ ('Male', 'Male'), ('Female', 'Female'), ] CIVIL_STATUS_CHOICES = [ ('Married', 'Married'), ('Single', 'Single'), ('Widow', 'Widow'), ('Widower', 'Widower'), ('Separated', 'Se...
[ "django.forms.ChoiceField", "crispy_forms.helper.FormHelper", "django.forms.TextInput" ]
[((386, 427), 'django.forms.ChoiceField', 'forms.ChoiceField', ([], {'choices': 'GENDER_CHOICES'}), '(choices=GENDER_CHOICES)\n', (403, 427), False, 'from django import forms\n'), ((449, 496), 'django.forms.ChoiceField', 'forms.ChoiceField', ([], {'choices': 'CIVIL_STATUS_CHOICES'}), '(choices=CIVIL_STATUS_CHOICES)\n',...
"""Models for the block functionality""" from django.db import models from django.dispatch import receiver from django.db.models.signals import post_save from accounts.models import User from everyvoter_common.utils.models import TimestampModel, UUIDModel class NotificationSettingManager(models.Manager): """Mana...
[ "django.dispatch.receiver", "django.db.models.OneToOneField", "django.db.models.BooleanField" ]
[((1121, 1153), 'django.dispatch.receiver', 'receiver', (['post_save'], {'sender': 'User'}), '(post_save, sender=User)\n', (1129, 1153), False, 'from django.dispatch import receiver\n'), ((716, 753), 'django.db.models.OneToOneField', 'models.OneToOneField', (['"""accounts.User"""'], {}), "('accounts.User')\n", (736, 75...
''' collection of functions that convert times to different formats ''' import time def current_time() -> str: ''' Returns the current time in HHMM format ''' return str(time.gmtime().tm_hour) + ":" + str(time.gmtime().tm_min) def minutes_to_seconds(minutes: int) -> int: '''Converts minutes to seconds'...
[ "time.gmtime" ]
[((216, 229), 'time.gmtime', 'time.gmtime', ([], {}), '()\n', (227, 229), False, 'import time\n'), ((181, 194), 'time.gmtime', 'time.gmtime', ([], {}), '()\n', (192, 194), False, 'import time\n')]
from kratos import * from math import log from lake.attributes.sram_port_attr import SRAMPortAttr class SRAMStubGenerator(Generator): ########################## # Generation # ########################## def __init__(self, sram_name, data_width, ...
[ "lake.attributes.sram_port_attr.SRAMPortAttr" ]
[((762, 786), 'lake.attributes.sram_port_attr.SRAMPortAttr', 'SRAMPortAttr', (['"""sram clk"""'], {}), "('sram clk')\n", (774, 786), False, 'from lake.attributes.sram_port_attr import SRAMPortAttr\n'), ((1104, 1128), 'lake.attributes.sram_port_attr.SRAMPortAttr', 'SRAMPortAttr', (['"""sram wen"""'], {}), "('sram wen')\...
import argparse import logging import os import pickle import shutil import settings import torch import numpy as np from IPython.core.debugger import Pdb LOG_FILE = 'log.txt' _LOG_LEVEL_STRINGS = ['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'] EPSILON = 0.0000001 def clean_label_list(ylist): #remove duplicate...
[ "os.path.exists", "torch.max", "argparse.ArgumentTypeError", "torch.exp", "shutil.copyfile", "torch.save", "numpy.loadtxt", "numpy.arange" ]
[((1395, 1416), 'numpy.loadtxt', 'np.loadtxt', (['pred_file'], {}), '(pred_file)\n', (1405, 1416), True, 'import numpy as np\n'), ((2644, 2675), 'os.path.exists', 'os.path.exists', (['base_model_file'], {}), '(base_model_file)\n', (2658, 2675), False, 'import os\n'), ((3317, 3351), 'torch.save', 'torch.save', (['state'...
# Copyright 2021 ETH Zurich and the NPBench authors. All rights reserved. import numpy as np def initialize(M, N, datatype=np.float64): alpha = datatype(1.5) beta = datatype(1.2) C = np.fromfunction(lambda i, j: ((i + j) % 100) / M, (M, N), dtype=datatype) B = np.fromfunction(...
[ "numpy.fromfunction", "numpy.empty" ]
[((198, 269), 'numpy.fromfunction', 'np.fromfunction', (['(lambda i, j: (i + j) % 100 / M)', '(M, N)'], {'dtype': 'datatype'}), '(lambda i, j: (i + j) % 100 / M, (M, N), dtype=datatype)\n', (213, 269), True, 'import numpy as np\n'), ((304, 379), 'numpy.fromfunction', 'np.fromfunction', (['(lambda i, j: (N + i - j) % 10...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division import re import datetime from splash.utils import to_bytes, to_unicode from twisted.python import log try: import lupa except ImportError: lupa = None import six from splash.exceptions import ScriptError _supported = None _lua = None ...
[ "splash.exceptions.ScriptError", "re.compile", "twisted.python.log.msg", "lupa.LuaError", "splash.utils.to_unicode", "splash.utils.to_bytes", "lupa.lua_type", "six.iteritems", "lupa.LuaRuntime" ]
[((8194, 8266), 're.compile', 're.compile', (['"""^error loading code: (\\\\[string ".*?"\\\\]):(\\\\d+):\\\\s+(.+)$"""'], {}), '(\'^error loading code: (\\\\[string ".*?"\\\\]):(\\\\d+):\\\\s+(.+)$\')\n', (8204, 8266), False, 'import re\n'), ((8280, 8335), 're.compile', 're.compile', (['"""^(\\\\[string\\\\s+".*?"\\\\...
# -*- coding: utf-8 -*- # actions_email.py - <NAME> (<EMAIL>) - Aug 2018 # License: MIT - see the LICENSE file for the full text. """This contains functions to drive email-related auth actions. """ ############# ## LOGGING ## ############# import logging # get a logger LOGGER = logging.getLogger(__name__) ######...
[ "logging.getLogger", "smtplib.SMTP", "datetime.datetime.utcnow", "re.findall", "textwrap.wrap", "sqlalchemy.select", "email.utils.make_msgid", "datetime.timedelta", "time.time", "multiprocessing.current_process", "email.mime.text.MIMEText" ]
[((284, 311), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (301, 311), False, 'import logging\n'), ((5248, 5262), 'email.mime.text.MIMEText', 'MIMEText', (['text'], {}), '(text)\n', (5256, 5262), False, 'from email.mime.text import MIMEText\n'), ((5358, 5370), 'email.utils.make_msgid', ...
from abc import ABC, abstractmethod import json class CachedWeatherRequester(ABC): @staticmethod @abstractmethod def _weather_to_desktop_bg_image_name(): pass def __init__(self, api_key, cache_path, stale_time): self._api_key = api_key self._cache_path = cache_path self...
[ "json.load", "json.dump" ]
[((509, 525), 'json.load', 'json.load', (['cache'], {}), '(cache)\n', (518, 525), False, 'import json\n'), ((636, 672), 'json.dump', 'json.dump', (['weather', 'self._cache_path'], {}), '(weather, self._cache_path)\n', (645, 672), False, 'import json\n'), ((2066, 2083), 'json.load', 'json.load', (['infile'], {}), '(infi...
import subprocess def execute_cmd(cmd, shell=True): #print(cmd) proc = subprocess.Popen(cmd, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout_value, stderr_value = proc.communicate() print(stdout_v...
[ "subprocess.Popen" ]
[((83, 170), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'shell': 'shell', 'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE'}), '(cmd, shell=shell, stdout=subprocess.PIPE, stderr=\n subprocess.PIPE)\n', (99, 170), False, 'import subprocess\n'), ((463, 521), 'subprocess.Popen', 'subprocess.Popen', (['cm...
import numpy as np class BinomialModel(object): def __init__(self, *args): # black == False. args: S0, u, d, R # or # black == True. args: S0, u, d, R, q self.S0 = args[0] self.u = args[1] self.d = args[2] self.R = args[3] self.euro = args[5] ...
[ "numpy.array", "numpy.linalg.solve", "numpy.round" ]
[((2880, 2900), 'numpy.array', 'np.array', (['self.S[-1]'], {}), '(self.S[-1])\n', (2888, 2900), True, 'import numpy as np\n'), ((4704, 4776), 'numpy.array', 'np.array', (['[[self.S[i][j], self.R ** i], [self.S[i][j + 1], self.R ** i]]'], {}), '([[self.S[i][j], self.R ** i], [self.S[i][j + 1], self.R ** i]])\n', (4712,...
# # Copyright 2018-2019 IBM Corp. 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...
[ "maxfw.core.MAX_API.expect", "maxfw.core.MAX_API.marshal_with", "maxfw.core.MAX_API.doc", "maxfw.core.MAX_API.parser", "core.model.read_image", "flask_restplus.fields.Integer", "flask_restplus.fields.String", "flask_restplus.fields.Float", "core.model.ModelWrapper", "flask_restplus.fields.Nested" ...
[((810, 824), 'core.model.ModelWrapper', 'ModelWrapper', ([], {}), '()\n', (822, 824), False, 'from core.model import ModelWrapper, read_image\n'), ((2457, 2473), 'maxfw.core.MAX_API.parser', 'MAX_API.parser', ([], {}), '()\n', (2471, 2473), False, 'from maxfw.core import MAX_API, PredictAPI, MetadataAPI\n'), ((1470, 1...
try: from setuptools import setup except ImportError : raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools") setup( version='0.5.4', url='https://github.com/datamade/probablepeople', description='...
[ "setuptools.setup" ]
[((221, 2151), 'setuptools.setup', 'setup', ([], {'version': '"""0.5.4"""', 'url': '"""https://github.com/datamade/probablepeople"""', 'description': '"""Parse romanized names & companies using advanced NLP methods"""', 'name': '"""probablepeople"""', 'packages': "['probablepeople']", 'package_data': "{'probablepeople'...
import fructe2 as f b = f.Fructe2() b.mar()
[ "fructe2.Fructe2" ]
[((26, 37), 'fructe2.Fructe2', 'f.Fructe2', ([], {}), '()\n', (35, 37), True, 'import fructe2 as f\n')]
from dataset.voc import VOC from torch.utils.data import DataLoader import torch import torch.nn as nn from tqdm import tqdm from models.yolo import YOLO voc = VOC() loader = DataLoader(voc, 64, True) yolo = YOLO() # yolo =nn.DataParallel(yolo,device_ids=[0]) print(yolo) yolo.cuda() yolo.train() optimizer = torch.o...
[ "dataset.voc.VOC", "tqdm.tqdm", "models.yolo.YOLO", "torch.utils.data.DataLoader" ]
[((162, 167), 'dataset.voc.VOC', 'VOC', ([], {}), '()\n', (165, 167), False, 'from dataset.voc import VOC\n'), ((177, 202), 'torch.utils.data.DataLoader', 'DataLoader', (['voc', '(64)', '(True)'], {}), '(voc, 64, True)\n', (187, 202), False, 'from torch.utils.data import DataLoader\n'), ((211, 217), 'models.yolo.YOLO',...
import requests import json from snapshottest.file import FileSnapshot import time from enum import Enum #API_BASE_URL = "https://api.consensys.space:8080" API_BASE_URL = "http://127.0.0.1:8080" TEST_OBJECT_IDENTIFIER = {'norad_number': 40538} class RequestMethod(Enum): GET = 1 POST = 2 def api_request(endpo...
[ "json.loads", "requests.post", "json.dumps", "requests.get", "time.time" ]
[((776, 787), 'time.time', 'time.time', ([], {}), '()\n', (785, 787), False, 'import time\n'), ((996, 1007), 'time.time', 'time.time', ([], {}), '()\n', (1005, 1007), False, 'import time\n'), ((816, 870), 'requests.post', 'requests.post', (['(API_BASE_URL + endpoint)'], {'json': 'post_data'}), '(API_BASE_URL + endpoint...
# Copyright (c) 2017-present, Facebook, 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...
[ "logging.getLogger", "numpy.fromfile", "detectron.utils.blob.prep_im_for_blob", "numpy.array", "copy.deepcopy", "numpy.where", "detectron.roi_data.retinanet.add_retinanet_blobs", "detectron.utils.blob.im_list_to_blob_andPose", "detectron.roi_data.fast_rcnn.get_fast_rcnn_blob_names", "cv2.resize", ...
[((1449, 1476), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1466, 1476), False, 'import logging\n'), ((3464, 3497), 'numpy.array', 'np.array', (['[100]'], {'dtype': 'np.float32'}), '([100], dtype=np.float32)\n', (3472, 3497), True, 'import numpy as np\n'), ((6020, 6061), 'detectron.ut...
import torch import torch.nn.functional as F from torch import nn from collections import OrderedDict from torch.nn import BatchNorm2d as bn Model_CFG = { 'dropout0': 0.1, 'dropout1': 0.1, 'd_feature0': 128, 'd_feature1': 64, } class DenseASPP(nn.Module): """ * output_scale can only set as 8 ...
[ "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Dropout2d", "torch.nn.Conv2d", "torch.nn.init.kaiming_uniform", "torch.nn.Upsample", "torch.nn.functional.dropout2d", "torch.cat" ]
[((2319, 2353), 'torch.cat', 'torch.cat', (['(aspp3, feature)'], {'dim': '(1)'}), '((aspp3, feature), dim=1)\n', (2328, 2353), False, 'import torch\n'), ((2410, 2444), 'torch.cat', 'torch.cat', (['(aspp6, feature)'], {'dim': '(1)'}), '((aspp6, feature), dim=1)\n', (2419, 2444), False, 'import torch\n'), ((2503, 2538), ...
# -------------------------------------------------------- # OpenVQA # Written by <NAME> https://github.com/cuiyuhao1996 # -------------------------------------------------------- import torch # Masking the sequence mask def make_mask(feature): return (torch.sum( torch.abs(feature), dim=-1 ) ...
[ "torch.abs" ]
[((279, 297), 'torch.abs', 'torch.abs', (['feature'], {}), '(feature)\n', (288, 297), False, 'import torch\n')]
import datetime import requests from django.conf import settings from django.utils import timezone import braintree braintree.Configuration.configure(braintree.Environment.Sandbox, merchant_id=settings.BRAINTREE_MERCHANT_ID, public_key=setti...
[ "requests.post", "datetime.time", "braintree.Configuration.configure", "django.utils.timezone.get_current_timezone", "django.utils.timezone.now", "braintree.Subscription.find", "datetime.datetime.combine" ]
[((125, 328), 'braintree.Configuration.configure', 'braintree.Configuration.configure', (['braintree.Environment.Sandbox'], {'merchant_id': 'settings.BRAINTREE_MERCHANT_ID', 'public_key': 'settings.BRAINTREE_PUBLIC_KEY', 'private_key': 'settings.BRAINTREE_PRIVATE_KEY'}), '(braintree.Environment.Sandbox,\n merchant_i...
"""Module to test approval requests and actions""" import json import pytest from pinakes.main.tests.factories import default_tenant from pinakes.main.approval.tests.factories import ( RequestFactory, RequestContextFactory, ActionFactory, ) from pinakes.main.approval.services.send_event import ( SendEve...
[ "json.loads", "pinakes.main.approval.tests.factories.RequestFactory", "pinakes.main.approval.tests.factories.RequestContextFactory", "pinakes.main.approval.tests.factories.ActionFactory", "pinakes.main.tests.factories.default_tenant" ]
[((563, 579), 'pinakes.main.approval.tests.factories.RequestFactory', 'RequestFactory', ([], {}), '()\n', (577, 579), False, 'from pinakes.main.approval.tests.factories import RequestFactory, RequestContextFactory, ActionFactory\n'), ((584, 600), 'pinakes.main.approval.tests.factories.RequestFactory', 'RequestFactory',...
from sklearn.ensemble import RandomForestRegressor from sklearn.utils.validation import check_is_fitted from joblib import Parallel, delayed from sklearn.ensemble._base import _partition_estimators import threading import numpy as np class RandomForestRegressor2(RandomForestRegressor): def __init__(self, ...
[ "sklearn.utils.validation.check_is_fitted", "numpy.mean", "numpy.max", "joblib.Parallel", "sklearn.ensemble._base._partition_estimators", "numpy.std", "joblib.delayed" ]
[((1453, 1489), 'sklearn.utils.validation.check_is_fitted', 'check_is_fitted', (['self', '"""estimators_"""'], {}), "(self, 'estimators_')\n", (1468, 1489), False, 'from sklearn.utils.validation import check_is_fitted\n'), ((1632, 1685), 'sklearn.ensemble._base._partition_estimators', '_partition_estimators', (['self.n...
import asyncio import getpass import json import os import websockets from threading import Thread from mapa import Map from tree_search import * import mapa from sokoban_domain import BoxDomain from consts import Tiles, TILES class Client: def __init__(self): self.plan = None async def agent_loop(sel...
[ "mapa.Map", "json.dumps", "os.environ.get", "websockets.connect", "mapa.filter_tiles", "sokoban_domain.BoxDomain", "getpass.getuser", "threading.Thread", "asyncio.get_event_loop" ]
[((2430, 2454), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (2452, 2454), False, 'import asyncio\n'), ((2468, 2505), 'os.environ.get', 'os.environ.get', (['"""SERVER"""', '"""localhost"""'], {}), "('SERVER', 'localhost')\n", (2482, 2505), False, 'import os\n'), ((2517, 2547), 'os.environ.get',...
from sklearn.datasets import load_iris from sklearn.model_selection import GridSearchCV from sklearn.svm import SVC from sklearn.linear_model import LogisticRegression from sklearn.model_selection import ShuffleSplit from sklearn.model_selection import cross_val_score iris = load_iris() param_grid = [ { 'k...
[ "sklearn.datasets.load_iris", "sklearn.svm.SVC" ]
[((277, 288), 'sklearn.datasets.load_iris', 'load_iris', ([], {}), '()\n', (286, 288), False, 'from sklearn.datasets import load_iris\n'), ((565, 570), 'sklearn.svm.SVC', 'SVC', ([], {}), '()\n', (568, 570), False, 'from sklearn.svm import SVC\n')]
#!/usr/bin/python3 from time import ctime, mktime, strptime, time from string import Template import json import logging import logging.handlers as LogHandlers_ from smb.SMBConnection import SMBConnection import png import configowen as c_ #####=====----- Классы -----=====##### class SensorDataBlock: ''' Созд...
[ "logging.getLogger", "logging.NullHandler", "time.ctime", "string.Template", "logging.Formatter", "json.dump", "time.time", "json.load", "smb.SMBConnection.SMBConnection", "logging.handlers.SysLogHandler" ]
[((1789, 1847), 'logging.Formatter', 'logging.Formatter', (['"""%(name)s %(levelname)s: "%(message)s\\""""'], {}), '(\'%(name)s %(levelname)s: "%(message)s"\')\n', (1806, 1847), False, 'import logging\n'), ((1858, 1926), 'logging.handlers.SysLogHandler', 'LogHandlers_.SysLogHandler', ([], {'address': '(c_.SYSLOG_ADDR, ...
import hashlib import bson class SHABuilder(object): def __init__(self, value=None): self.md = hashlib.sha1() if value: self.md.update(value) def __iadd__(self, item): if isinstance(item, (set, list, tuple)): for elem in sorted(item): self.md.u...
[ "hashlib.sha1", "bson.Binary" ]
[((110, 124), 'hashlib.sha1', 'hashlib.sha1', ([], {}), '()\n', (122, 124), False, 'import hashlib\n'), ((819, 836), 'bson.Binary', 'bson.Binary', (['self'], {}), '(self)\n', (830, 836), False, 'import bson\n')]