code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
''' 실행 방법 : 아나콘다 프롬프트에서 main.py가 있는 폴더 경로에 아래 명령어 입력 python glowpick.py 데이터 목록 1. Category 2. Brand_Name 3. Product_Name 4. volume 5. price 6. Sales Rank 7. rate 8. nb_reviews 7. product_number ''' from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdrive...
[ "pandas.read_csv", "selenium.webdriver.Chrome", "time.sleep", "os.path.isfile", "selenium.webdriver.common.action_chains.ActionChains", "pandas.DataFrame", "pandas.concat" ]
[((577, 595), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {}), '()\n', (593, 595), False, 'from selenium import webdriver\n'), ((698, 712), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (710, 712), True, 'import pandas as pd\n'), ((781, 831), 'os.path.isfile', 'os.path.isfile', (['"""../dataset/glowpi...
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. T...
[ "salts_lib.scraper_utils.urljoin", "salts_lib.scraper_utils.blog_get_quality", "dom_parser2.parse_dom", "re.compile", "salts_lib.scraper_utils.disable_sub_check", "re.finditer", "urlparse.urlsplit", "re.search" ]
[((1565, 1613), 'salts_lib.scraper_utils.urljoin', 'scraper_utils.urljoin', (['self.base_url', 'source_url'], {}), '(self.base_url, source_url)\n', (1586, 1613), False, 'from salts_lib import scraper_utils\n'), ((1731, 1777), 're.search', 're.search', (['"""class="entry-title">([^<]+)"""', 'html'], {}), '(\'class="entr...
#!/usr/bin/env python # from google.cloud import speech from google.cloud import speech_v1p1beta1 as speech from google.cloud.speech_v1p1beta1 import enums from google.cloud.speech_v1p1beta1 import types from google.api_core.exceptions import InvalidArgument, OutOfRange import pyaudio import Queue import rospy import ...
[ "google.cloud.speech_v1p1beta1.types.StreamingRecognitionConfig", "signal.signal", "rospy.Publisher", "rospy.signal_shutdown", "google.cloud.speech_v1p1beta1.types.SpeechContext", "rospy.is_shutdown", "rospy.init_node", "google.cloud.speech_v1p1beta1.types.RecognitionMetadata", "yaml.load", "googl...
[((7413, 7455), 'rospy.signal_shutdown', 'rospy.signal_shutdown', (['"""Order 66 Received"""'], {}), "('Order 66 Received')\n", (7434, 7455), False, 'import rospy\n'), ((7586, 7618), 'rospy.init_node', 'rospy.init_node', (['"""google_client"""'], {}), "('google_client')\n", (7601, 7618), False, 'import rospy\n'), ((762...
# coding: utf-8 import pprint import re import six class CallbackLifeCycleHookOption: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and ...
[ "six.iteritems" ]
[((4775, 4808), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (4788, 4808), False, 'import six\n')]
from collections import OrderedDict from vp_suite.model_blocks import ConvLSTM from vp_suite.models.precipitation_nowcasting.ef_blocks import Encoder_Forecaster class EF_ConvLSTM(Encoder_Forecaster): r""" This is a reimplementation of the Encoder-Forecaster model based on ConvLSTMs, as introduced in "Con...
[ "collections.OrderedDict", "vp_suite.model_blocks.ConvLSTM" ]
[((3836, 3965), 'collections.OrderedDict', 'OrderedDict', (['{self.enc_conv_names[n]: [layer_in_c, layer_mid_c, self.enc_conv_k[n], self\n .enc_conv_s[n], self.enc_conv_p[n]]}'], {}), '({self.enc_conv_names[n]: [layer_in_c, layer_mid_c, self.\n enc_conv_k[n], self.enc_conv_s[n], self.enc_conv_p[n]]})\n', (3847, 3...
from openpyxl import load_workbook import mysql.connector # Excel workbook = load_workbook('imported.xlsx') sheet = workbook.active values = [] for row in sheet.iter_rows(min_row=2, values_only=True): print(row) values.append(row) # Database db = mysql.connector.connect( host='localhost', port=3306,...
[ "openpyxl.load_workbook" ]
[((78, 108), 'openpyxl.load_workbook', 'load_workbook', (['"""imported.xlsx"""'], {}), "('imported.xlsx')\n", (91, 108), False, 'from openpyxl import load_workbook\n')]
# mypy: ignore-errors import inspect from typing import Tuple import warnings import torch class LazyInitializationMixin: """A mixin for modules that lazily initialize buffers and parameters. Unlike regular modules, subclasses of this module can initialize buffers and parameters outside of the constru...
[ "warnings.warn", "inspect.currentframe", "torch.empty", "torch.Tensor" ]
[((6194, 6216), 'inspect.currentframe', 'inspect.currentframe', ([], {}), '()\n', (6214, 6216), False, 'import inspect\n'), ((7401, 7447), 'torch.empty', 'torch.empty', (['shape'], {'device': 'device', 'dtype': 'dtype'}), '(shape, device=device, dtype=dtype)\n', (7412, 7447), False, 'import torch\n'), ((6305, 6499), 'w...
#!/usr/bin/python # -*- coding: utf-8 -*- from copy import deepcopy from functools import wraps from flask import request from src.misc.render import json_detail_render from config.settings import YML_JSON, logger import datetime,json def transfer(column): def dec(func): @wraps(func) ...
[ "flask.request.json.get", "json.loads", "functools.wraps", "copy.deepcopy" ]
[((299, 310), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (304, 310), False, 'from functools import wraps\n'), ((2046, 2057), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (2051, 2057), False, 'from functools import wraps\n'), ((5740, 5751), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', ...
#!/usr/bin/env python3 ############################################################################### # Copyright 2018 The Apollo 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...
[ "matplotlib.pyplot.gca", "matplotlib.pyplot.figure", "matplotlib.pyplot.show" ]
[((2983, 2995), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (2993, 2995), True, 'import matplotlib.pyplot as plt\n'), ((3292, 3302), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (3300, 3302), True, 'import matplotlib.pyplot as plt\n'), ((3244, 3253), 'matplotlib.pyplot.gca', 'plt.gca', ([], {...
import sys sys.path.append('./train_model') import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms import numpy as np import os import argparse parser = argparse.ArgumentParser(description='Adaptive Network Slimming') parser.add_argument('-n...
[ "numpy.ones", "argparse.ArgumentParser", "torch.load", "numpy.sort", "torch.max", "numpy.floor", "torch.from_numpy", "numpy.count_nonzero", "torchvision.datasets.CIFAR10", "numpy.zeros", "torchvision.transforms.Normalize", "torch.utils.data.DataLoader", "torch.no_grad", "torchvision.transf...
[((12, 44), 'sys.path.append', 'sys.path.append', (['"""./train_model"""'], {}), "('./train_model')\n", (27, 44), False, 'import sys\n'), ((232, 296), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Adaptive Network Slimming"""'}), "(description='Adaptive Network Slimming')\n", (255, 296)...
from flask import request from ..utils.mcexceptions import AccessNotAllowedException from . import apikeydb from ..database.DB import DbConnection _user_access_matrix = {} _admins = [] def check(user, owner, project_id="Unknown"): if not allowed(user, owner, project_id): raise AccessNotAllowedException(p...
[ "flask.request.args.get" ]
[((2056, 2082), 'flask.request.args.get', 'request.args.get', (['"""apikey"""'], {}), "('apikey')\n", (2072, 2082), False, 'from flask import request\n')]
"""Represent AWS config settings""" import json from typing import Iterable, Mapping import boto3 from datetime import datetime, timedelta from data_model import OriginAndCallingPointNames from .config import ConfigSettings class AwsAppConfigSettings(ConfigSettings): """Represent a collection of config settings...
[ "boto3.client", "boto3.session.Session", "datetime.datetime.utcnow", "datetime.timedelta", "data_model.OriginAndCallingPointNames" ]
[((4863, 4886), 'boto3.session.Session', 'boto3.session.Session', ([], {}), '()\n', (4884, 4886), False, 'import boto3\n'), ((3528, 3557), 'boto3.client', 'boto3.client', (['"""appconfigdata"""'], {}), "('appconfigdata')\n", (3540, 3557), False, 'import boto3\n'), ((4309, 4326), 'datetime.datetime.utcnow', 'datetime.ut...
import logging logging.basicConfig(level=logging.DEBUG) def log(*a): logging.info(' '.join(map(str, a))) warn = logging.warn
[ "logging.basicConfig" ]
[((20, 60), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (39, 60), False, 'import logging\n')]
#!/usr/bin/env python3 """Named tuple example.""" from collections import namedtuple Car = namedtuple('Car', 'color mileage') # Our new "Car" class works as expected: MY_CAR = Car('red', 3812.4) print(MY_CAR.color) print(MY_CAR.mileage) # We get a nice string repr for free: print(MY_CAR) try: MY_CAR.color = 'bl...
[ "collections.namedtuple" ]
[((92, 126), 'collections.namedtuple', 'namedtuple', (['"""Car"""', '"""color mileage"""'], {}), "('Car', 'color mileage')\n", (102, 126), False, 'from collections import namedtuple\n')]
"""Test Open Peer Power config flow for BleBox devices.""" from unittest.mock import DEFAULT, AsyncMock, PropertyMock, patch import blebox_uniapi import pytest from openpeerpower import config_entries, data_entry_flow from openpeerpower.components.blebox import config_flow from openpeerpower.setup import async_setup...
[ "openpeerpower.setup.async_setup_component", "unittest.mock.AsyncMock", "unittest.mock.PropertyMock", "pytest.fixture", "unittest.mock.patch" ]
[((1316, 1357), 'pytest.fixture', 'pytest.fixture', ([], {'name': '"""valid_feature_mock"""'}), "(name='valid_feature_mock')\n", (1330, 1357), False, 'import pytest\n'), ((1490, 1530), 'pytest.fixture', 'pytest.fixture', ([], {'name': '"""flow_feature_mock"""'}), "(name='flow_feature_mock')\n", (1504, 1530), False, 'im...
## @class IntraCodec # Module designed for encoding and decoding YUV videos using the intra-frame method # That is considering adjacent pixels in the same frame and encoding their errors # @author <NAME> 89005 # @author <NAME> 89262 import numpy as np import math from Golomb import * from Bitstream import * class In...
[ "math.floor", "math.log", "numpy.zeros", "numpy.array_equal", "numpy.frombuffer", "numpy.seterr" ]
[((1042, 1066), 'numpy.seterr', 'np.seterr', ([], {'over': '"""ignore"""'}), "(over='ignore')\n", (1051, 1066), True, 'import numpy as np\n'), ((3174, 3203), 'math.log', 'math.log', (['self.golombParam', '(2)'], {}), '(self.golombParam, 2)\n', (3182, 3203), False, 'import math\n'), ((3503, 3545), 'numpy.zeros', 'np.zer...
# -*- coding: utf-8 -*- # Copyright 2019 The GraphicsFuzz Project Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ "gfauto.util.file_read_text", "gfauto.proto_util.message_to_json", "gfauto.test_pb2.Test", "gfauto.util.file_write_text", "gfauto.proto_util.json_to_message" ]
[((1926, 1965), 'gfauto.util.file_read_text', 'util.file_read_text', (['test_metadata_path'], {}), '(test_metadata_path)\n', (1945, 1965), False, 'from gfauto import proto_util, util\n'), ((1979, 1985), 'gfauto.test_pb2.Test', 'Test', ([], {}), '()\n', (1983, 1985), False, 'from gfauto.test_pb2 import Test\n'), ((1990,...
import socket class DNSQuery: def __init__(self, data): self.data=data self.dominio='' tipo = (ord(data[2]) >> 3) & 15 # Opcode bits if tipo == 0: # Standard query ini=12 lon=ord(data[ini]) while lon != 0: self.dominio+=data[ini+1:ini+lon+1]+'.' ...
[ "socket.socket" ]
[((1095, 1143), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_DGRAM'], {}), '(socket.AF_INET, socket.SOCK_DGRAM)\n', (1108, 1143), False, 'import socket\n')]
from math import ceil from numpy_financial import nper, pmt, rate from typing import List, Tuple from .calculator import Calculator # noinspection PyTypeChecker class LoanCalculator(Calculator): def __init__(self, **kwargs): super(LoanCalculator, self).__init__(**kwargs) self.loan = ...
[ "numpy_financial.pmt", "numpy_financial.nper", "numpy_financial.rate" ]
[((3114, 3200), 'numpy_financial.nper', 'nper', (['(self.rate / (100 * self.freq))', '(-self.reg_pmt)', 'self.loan'], {'when': 'self.pmt_when'}), '(self.rate / (100 * self.freq), -self.reg_pmt, self.loan, when=self.\n pmt_when)\n', (3118, 3200), False, 'from numpy_financial import nper, pmt, rate\n'), ((4686, 4765),...
import unittest from pydundas import Api class TestProject(unittest.TestCase): def test_no_syntax_error(self): self.assertIsNotNone(Api(None).project())
[ "pydundas.Api" ]
[((147, 156), 'pydundas.Api', 'Api', (['None'], {}), '(None)\n', (150, 156), False, 'from pydundas import Api\n')]
import time from bs4 import BeautifulSoup from base import * from db_info import * # 构建映射url->article _url2atc = dict() month = dict({'Jan':1, 'Feb':2, 'Mar':3, 'Apr':4, 'May':5, 'Jun':6, 'Jul':7, 'Aug':8, 'Sep':9, 'Oct':10, 'Nov':11, 'Dec':12}) class REUTERURLManager(BaseURLManager): ...
[ "bs4.BeautifulSoup", "time.localtime" ]
[((747, 790), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html'], {'features': '"""html.parser"""'}), "(html, features='html.parser')\n", (760, 790), False, 'from bs4 import BeautifulSoup\n'), ((3079, 3122), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html'], {'features': '"""html.parser"""'}), "(html, features='html.parser'...
import djclick as click from django.conf import settings from django.utils.translation import gettext_lazy as _ from .forms import AddOrganizerForm from .slack_client import slack # "Get organizers info" functions used in 'new_event' and 'copy_event' management commands. def get_main_organizer(): """ We're ...
[ "djclick.style", "django.utils.translation.gettext_lazy", "djclick.echo" ]
[((446, 503), 'django.utils.translation.gettext_lazy', '_', (['"""Let\'s talk about the team. First the main organizer:"""'], {}), '("Let\'s talk about the team. First the main organizer:")\n', (447, 503), True, 'from django.utils.translation import gettext_lazy as _\n'), ((534, 592), 'djclick.style', 'click.style', ([...
import datetime import json import os import secrets from importlib import import_module # PATH = 'C:\\Users\\Zadigo\\Documents\\Apps\\zemailer\\app\\core\\settings.json' PATH = os.path.join(os.getcwd(), 'app', 'core', 'conf', 'settings.json') def deserialize(func): """A decorator that deserializes objects store...
[ "secrets.token_hex", "importlib.import_module", "os.path.join", "os.getcwd", "datetime.datetime.now", "datetime.date.fromtimestamp", "json.load", "json.dump" ]
[((193, 204), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (202, 204), False, 'import os\n'), ((1954, 1978), 'json.load', 'json.load', (['settings_file'], {}), '(settings_file)\n', (1963, 1978), False, 'import json\n'), ((4415, 4454), 'json.dump', 'json.dump', (['self.cache', 'handle'], {'indent': '(4)'}), '(self.cache,...
# Copyright 2019 The TensorFlow 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 applica...
[ "setuptools.find_packages", "sys.argv.remove", "os.path.dirname", "datetime.datetime.now", "sys.path.append" ]
[((1129, 1158), 'sys.path.append', 'sys.path.append', (['version_path'], {}), '(version_path)\n', (1144, 1158), False, 'import sys\n'), ((1054, 1079), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1069, 1079), False, 'import os\n'), ((1761, 1789), 'sys.argv.remove', 'sys.argv.remove', (['""...
from collections import deque class RecentCounter: def __init__(self): self.buffer = deque() def ping(self, t: int) -> int: while self.buffer and self.buffer[-1]<t-3000: self.buffer.pop() self.buffer.appendleft(t) return len(self.buffer) #Your RecentCounter object wi...
[ "collections.deque" ]
[((97, 104), 'collections.deque', 'deque', ([], {}), '()\n', (102, 104), False, 'from collections import deque\n')]
from unittest import TestCase from necrypt import Necrypt import os class TestNecrypt(TestCase): def test_unique_encryption(self): n = Necrypt(1024) plain = 'Text' self.assertNotEqual(n.encrypt(plain), n.encrypt(plain)) def test_encrypt_decrypt(self): n = Necrypt(1024) ...
[ "os.path.isfile", "necrypt.Necrypt", "os.remove" ]
[((150, 163), 'necrypt.Necrypt', 'Necrypt', (['(1024)'], {}), '(1024)\n', (157, 163), False, 'from necrypt import Necrypt\n'), ((300, 313), 'necrypt.Necrypt', 'Necrypt', (['(1024)'], {}), '(1024)\n', (307, 313), False, 'from necrypt import Necrypt\n'), ((443, 456), 'necrypt.Necrypt', 'Necrypt', (['(1024)'], {}), '(1024...
import os import numpy as np import pytest from spectrum_overload import Spectrum from mingle.utilities.spectrum_utils import load_spectrum, select_observation @pytest.mark.parametrize("fname", ["HD30501-1-mixavg-tellcorr_1.fits", "HD30501-1-mixavg-h2otellcorr_1.fits"]) def test_load_spectrum(fname): fname = os...
[ "pytest.mark.xfail", "mingle.utilities.spectrum_utils.select_observation", "os.path.join", "mingle.utilities.spectrum_utils.load_spectrum", "pytest.mark.parametrize", "pytest.raises", "numpy.all" ]
[((165, 278), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""fname"""', "['HD30501-1-mixavg-tellcorr_1.fits', 'HD30501-1-mixavg-h2otellcorr_1.fits']"], {}), "('fname', ['HD30501-1-mixavg-tellcorr_1.fits',\n 'HD30501-1-mixavg-h2otellcorr_1.fits'])\n", (188, 278), False, 'import pytest\n'), ((803, 852), '...
# 开源项目 https://github.com/jones2000/HQChart import sys import codecs import webbrowser from umychart_complier_jscomplier import JSComplier, SymbolOption, HQ_DATA_TYPE from umychart_complier_jscomplier import ScriptIndexConsole, ScriptIndexItem, SymbolOption, RequestOption, HQ_DATA_TYPE, ArgumentItem from umycha...
[ "umychart_complier_jscomplier.JSComplier.Tokenize", "umychart_complier_jscomplier.ScriptIndexConsole", "webbrowser.open", "umychart_complier_jscomplier.ArgumentItem", "umychart_complier_jscomplier.JSComplier.Parse", "umychart_complier_pandas_help.JSComplierPandasHelper.ToDateTimeSeries", "umychart_compl...
[((999, 1033), 'umychart_complier_jscomplier.JSComplier.Tokenize', 'JSComplier.Tokenize', (['(code1 + code2)'], {}), '(code1 + code2)\n', (1018, 1033), False, 'from umychart_complier_jscomplier import JSComplier, SymbolOption, HQ_DATA_TYPE\n'), ((1285, 1316), 'umychart_complier_jscomplier.JSComplier.Parse', 'JSComplier...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ some helper funcs """ import json import logging import os import site import subprocess import sys import tempfile import exifread from PIL import Image PACKAGE_NAME = "einguteswerkzeug" # --- configure logging log = logging.getLogger(__name__) log.setLevel(logging...
[ "logging.getLogger", "logging.StreamHandler", "logging.Formatter", "os.environ.get", "os.path.isfile", "os.path.realpath", "subprocess.call", "os.unlink", "sys.exit", "os.fdopen", "site.getsitepackages", "tempfile.mkstemp" ]
[((272, 299), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (289, 299), False, 'import logging\n'), ((383, 406), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (404, 406), False, 'import logging\n'), ((437, 510), 'logging.Formatter', 'logging.Formatter', (['"""%(asct...
__author__ = 'User' from pytest_bdd import given, when, then from model.contact import Contact import random @given('a contact list') def contact_list(db): return db.get_contact_list() @given('a contact with <firstname>, <lastname>, <address> and <mobilephone>') def new_contact(firstname, lastname, address, mobi...
[ "random.choice", "pytest_bdd.then", "pytest_bdd.when", "pytest_bdd.given", "model.contact.Contact" ]
[((112, 135), 'pytest_bdd.given', 'given', (['"""a contact list"""'], {}), "('a contact list')\n", (117, 135), False, 'from pytest_bdd import given, when, then\n'), ((193, 269), 'pytest_bdd.given', 'given', (['"""a contact with <firstname>, <lastname>, <address> and <mobilephone>"""'], {}), "('a contact with <firstname...
from dumpshmamp.collectors.files import try_copyfile, file_path, mkdir from shminspector.util.cmd import try_capture_output, is_command def collect_docker_files(user_home_dir_path, target_dir_path, ctx): if is_command("docker"): ctx.logger.info("Collecting Docker information...") mkdir(target_dir...
[ "dumpshmamp.collectors.files.try_copyfile", "shminspector.util.cmd.is_command", "dumpshmamp.collectors.files.file_path", "shminspector.util.cmd.try_capture_output", "dumpshmamp.collectors.files.mkdir" ]
[((213, 233), 'shminspector.util.cmd.is_command', 'is_command', (['"""docker"""'], {}), "('docker')\n", (223, 233), False, 'from shminspector.util.cmd import try_capture_output, is_command\n'), ((824, 916), 'dumpshmamp.collectors.files.file_path', 'file_path', (['user_home_dir_path', '"""Library/Group Containers/group....
import cv2 import numpy as np # Normal routines img = cv2.imread('image3.png') scale_percent = 30 # percent of original size width = int(img.shape[1] * scale_percent / 100) height = int(img.shape[0] * scale_percent / 100) dim = (width, height) # resize image img = cv2.resize(img, dim, interpolation = cv2.INTER_AREA...
[ "cv2.rectangle", "cv2.resize", "cv2.threshold", "cv2.erode", "cv2.imshow", "cv2.contourArea", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.cvtColor", "cv2.findContours", "cv2.dilate", "cv2.imread", "cv2.boundingRect" ]
[((55, 79), 'cv2.imread', 'cv2.imread', (['"""image3.png"""'], {}), "('image3.png')\n", (65, 79), False, 'import cv2\n'), ((269, 319), 'cv2.resize', 'cv2.resize', (['img', 'dim'], {'interpolation': 'cv2.INTER_AREA'}), '(img, dim, interpolation=cv2.INTER_AREA)\n', (279, 319), False, 'import cv2\n'), ((331, 368), 'cv2.cv...
import os import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration from scpca_portal.config.common import Common class Production(Common): INSTALLED_APPS = Common.INSTALLED_APPS SECRET_KEY = os.getenv("DJANGO_SECRET_KEY") # Site # https://docs.djangoproject.com/en/2.0/ref/setti...
[ "sentry_sdk.integrations.django.DjangoIntegration", "os.getenv" ]
[((225, 255), 'os.getenv', 'os.getenv', (['"""DJANGO_SECRET_KEY"""'], {}), "('DJANGO_SECRET_KEY')\n", (234, 255), False, 'import os\n'), ((462, 485), 'os.getenv', 'os.getenv', (['"""AWS_REGION"""'], {}), "('AWS_REGION')\n", (471, 485), False, 'import os\n'), ((525, 556), 'os.getenv', 'os.getenv', (['"""AWS_S3_BUCKET_NA...
import gc import math import numpy as np import torch import torch.nn.functional as F import timeit import time from gck_layer import GCK3x3Layer kernel_dim = 3 def tensors_equal(a,b): b = torch.allclose(a, b, atol=0.01) if (b): print('same: True') else: print('Same: False (diff:', ((a-b)....
[ "torch.nn.functional.conv2d", "torch.randint", "gck_layer.GCK3x3Layer", "torch.allclose", "torch.ones" ]
[((195, 226), 'torch.allclose', 'torch.allclose', (['a', 'b'], {'atol': '(0.01)'}), '(a, b, atol=0.01)\n', (209, 226), False, 'import torch\n'), ((436, 531), 'torch.randint', 'torch.randint', (['(0)', '(100)', '(batch_size, in_channels, input_dim, input_dim)'], {'dtype': 'torch.float32'}), '(0, 100, (batch_size, in_cha...
""" Prepare some stats from timelines """ # https://docs.python.org/3.7/library/collections.html#collections.Counter from collections import Counter def get_timeline_stats(timeline): """ :type timeline list[now_playing_graph.timeline.TimelineEntry] :rtype: dict """ top_artists = Counter() top_...
[ "collections.Counter" ]
[((302, 311), 'collections.Counter', 'Counter', ([], {}), '()\n', (309, 311), False, 'from collections import Counter\n'), ((328, 337), 'collections.Counter', 'Counter', ([], {}), '()\n', (335, 337), False, 'from collections import Counter\n'), ((387, 396), 'collections.Counter', 'Counter', ([], {}), '()\n', (394, 396)...
import functools from django.contrib import messages from django.urls import reverse from django.shortcuts import redirect def full_profile_required(func): @functools.wraps(func) def wrapper(request, *args, **kwargs): if (request.user and request.user.id # FIXME test mocks mess with ...
[ "django.contrib.messages.warning", "functools.wraps", "django.urls.reverse" ]
[((164, 185), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (179, 185), False, 'import functools\n'), ((477, 578), 'django.contrib.messages.warning', 'messages.warning', (['request', '"""Please update your profile to continue using the EuroPython website."""'], {}), "(request,\n 'Please update yo...
import numpy as np from mldftdat.pyscf_utils import * from mldftdat.workflow_utils import safe_mem_cap_mb from pyscf.dft.numint import eval_ao, make_mask from mldftdat.density import LDA_FACTOR,\ contract21_deriv, contract21, GG_AMIN def dtauw(rho_data): return - get_gradient_magnitud...
[ "numpy.sqrt", "mldftdat.density.contract21_deriv", "numpy.exp", "numpy.zeros", "numpy.einsum", "mldftdat.density.contract21" ]
[((1313, 1345), 'numpy.zeros', 'np.zeros', (['(4, rho_data.shape[1])'], {}), '((4, rho_data.shape[1]))\n', (1321, 1345), True, 'import numpy as np\n'), ((2617, 2642), 'numpy.zeros', 'np.zeros', (['v_npalpha.shape'], {}), '(v_npalpha.shape)\n', (2625, 2642), True, 'import numpy as np\n'), ((3994, 4023), 'numpy.exp', 'np...
import webbrowser class Movie(): """ This class provides a way to store movie related information """ # Class Variable: These are the Movies Ratings # G: General Audiences. All ages admitted. # PG: Parental Guidance Suggested. Some material may not be suitable for children. # PG-13: Parents Strongly Cautioned....
[ "webbrowser.open" ]
[((786, 819), 'webbrowser.open', 'webbrowser.open', (['self.trailer_url'], {}), '(self.trailer_url)\n', (801, 819), False, 'import webbrowser\n')]
import os from geofeather import to_geofeather, from_geofeather from pandas.testing import assert_frame_equal import pytest def test_points_geofeather(tmpdir, points_wgs84): """Confirm that we can round-trip points to / from feather file""" filename = tmpdir / "points_wgs84.feather" to_geofeather(points...
[ "os.path.exists", "geofeather.to_geofeather", "geofeather.from_geofeather", "pandas.testing.assert_frame_equal", "pytest.warns" ]
[((300, 337), 'geofeather.to_geofeather', 'to_geofeather', (['points_wgs84', 'filename'], {}), '(points_wgs84, filename)\n', (313, 337), False, 'from geofeather import to_geofeather, from_geofeather\n'), ((350, 374), 'os.path.exists', 'os.path.exists', (['filename'], {}), '(filename)\n', (364, 374), False, 'import os\n...
# Copyright (c) 2013 OpenStack Foundation # # 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 ...
[ "networking_arista.common.db_lib.forget_network_segment", "networking_arista.ml2.rpc.get_rpc_wrapper", "networking_arista.common.db_lib.forget_port", "networking_arista._i18n._", "eventlet.greenpool.GreenPool", "eventlet.monkey_patch", "networking_arista.common.db_lib.remember_vm", "networking_arista....
[((1789, 1816), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1806, 1816), True, 'from oslo_log import log as logging\n'), ((1817, 1887), 'oslo_config.cfg.CONF.import_group', 'cfg.CONF.import_group', (['"""ml2_arista"""', '"""networking_arista.common.config"""'], {}), "('ml2_arista...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import os.path import uuid from yamlfred.utils import remove_default, merge_dicts from yamlfred.utils import Include defaults = { 'alfred.workflow.output.notification': { 'config': {'removeextension': False, 'output': 0, 'las...
[ "yamlfred.utils.remove_default", "yamlfred.utils.merge_dicts", "yamlfred.utils.Include", "uuid.uuid4" ]
[((3571, 3596), 'yamlfred.utils.merge_dicts', 'merge_dicts', (['default', 'dic'], {}), '(default, dic)\n', (3582, 3596), False, 'from yamlfred.utils import remove_default, merge_dicts\n'), ((4179, 4213), 'yamlfred.utils.remove_default', 'remove_default', (['self.prop', 'default'], {}), '(self.prop, default)\n', (4193, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import deepnlpf.log as log from deepnlpf.core.util import Util class PluginManager: def __init__(self): self.HOME = os.environ["HOME"] self.PLUGIN_SERVER = "https://github.com/deepnlpf/" self.PLUGIN_PATH = self.HOME + "/d...
[ "os.path.exists", "homura.download", "os.listdir", "sys.path.insert", "os.makedirs", "zipfile.ZipFile", "os.rename", "os.path.splitext", "os.path.join", "os.path.split", "os.path.isfile", "deepnlpf.core.util.Util", "os.path.isdir", "sys.exit", "deepnlpf.log.logger.error", "os.remove" ]
[((449, 475), 'os.path.split', 'os.path.split', (['plugin_name'], {}), '(plugin_name)\n', (462, 475), False, 'import os\n'), ((570, 620), 'sys.path.insert', 'sys.path.insert', (['(0)', '(self.PLUGIN_PATH + plugin_name)'], {}), '(0, self.PLUGIN_PATH + plugin_name)\n', (585, 620), False, 'import sys\n'), ((885, 913), 'os...
# # Copyright 2017 Wooga 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 without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute...
[ "datetime.datetime.now" ]
[((1783, 1797), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1795, 1797), False, 'from datetime import datetime\n')]
from django import test from hexa.user_management.models import Membership, Team, User from ..models import Database, DatabasePermission, Table class PermissionTest(test.TestCase): @classmethod def setUpTestData(cls): cls.DB1 = Database.objects.create( hostname="host", username="user", p...
[ "hexa.user_management.models.Team.objects.create", "hexa.user_management.models.Membership.objects.create", "hexa.user_management.models.User.objects.create_user" ]
[((524, 562), 'hexa.user_management.models.Team.objects.create', 'Team.objects.create', ([], {'name': '"""Test Team1"""'}), "(name='Test Team1')\n", (543, 562), False, 'from hexa.user_management.models import Membership, Team, User\n'), ((583, 621), 'hexa.user_management.models.Team.objects.create', 'Team.objects.creat...
from django.urls import path from . import views urlpatterns = [ path('', views.index), path('hello', views.hello), path('world', views.world), path('users', views.users), path('user/<int:user_id>', views.user), ]
[ "django.urls.path" ]
[((71, 92), 'django.urls.path', 'path', (['""""""', 'views.index'], {}), "('', views.index)\n", (75, 92), False, 'from django.urls import path\n'), ((98, 124), 'django.urls.path', 'path', (['"""hello"""', 'views.hello'], {}), "('hello', views.hello)\n", (102, 124), False, 'from django.urls import path\n'), ((130, 156),...
import unittest from pinq.transforms import identity class predicate_true_tests(unittest.TestCase): def test_identity_int(self): self.assertEqual(identity(123), 123) def test_identity_str(self): self.assertEqual(identity("apple"), "apple") def test_identity_list(self): self.asse...
[ "pinq.transforms.identity" ]
[((161, 174), 'pinq.transforms.identity', 'identity', (['(123)'], {}), '(123)\n', (169, 174), False, 'from pinq.transforms import identity\n'), ((240, 257), 'pinq.transforms.identity', 'identity', (['"""apple"""'], {}), "('apple')\n", (248, 257), False, 'from pinq.transforms import identity\n'), ((328, 355), 'pinq.tran...
import slog slog.quiet("debbug") slog.debbug("Hi!") slog.warning("Debbug?") slog.unquiet() slog.debbug("Aaaaaaaaa") with slog.quiet("debbug"): slog.debbug("Hello!") slog.info("Hi!") slog.info("Debbug?") slog.debbug("Hey.")
[ "slog.quiet", "slog.unquiet", "slog.warning", "slog.info", "slog.debbug" ]
[((13, 33), 'slog.quiet', 'slog.quiet', (['"""debbug"""'], {}), "('debbug')\n", (23, 33), False, 'import slog\n'), ((35, 53), 'slog.debbug', 'slog.debbug', (['"""Hi!"""'], {}), "('Hi!')\n", (46, 53), False, 'import slog\n'), ((54, 77), 'slog.warning', 'slog.warning', (['"""Debbug?"""'], {}), "('Debbug?')\n", (66, 77), ...
import setuptools import os with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="supportr", version="0.1", author="<NAME> and <NAME>", author_email="<EMAIL>", description="Supportr", long_description=long_description, long_description_content_type="te...
[ "setuptools.find_packages" ]
[((577, 603), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (601, 603), False, 'import setuptools\n')]
import logging import os from zipfile import ZipFile import yaml from pathlib import Path logging.basicConfig( filename=os.path.join("Logs", "running.log"), format="[%(asctime)s: %(module)s: %(levelname)s]: %(message)s", level=logging.INFO, filemode="a" ) def read_yaml(config_path): with open(conf...
[ "os.makedirs", "zipfile.ZipFile", "os.path.join", "logging.exception", "yaml.safe_load", "logging.info" ]
[((379, 428), 'logging.info', 'logging.info', (['f"""config file {config_path} loaded"""'], {}), "(f'config file {config_path} loaded')\n", (391, 428), False, 'import logging\n'), ((125, 160), 'os.path.join', 'os.path.join', (['"""Logs"""', '"""running.log"""'], {}), "('Logs', 'running.log')\n", (137, 160), False, 'imp...
#!/usr/bin/env python ##### convert values to ranks, tie breaker as average ##### from __future__ import division from sys import argv, stdin, stdout from signal import signal, SIGPIPE, SIG_DFL import argparse signal(SIGPIPE, SIG_DFL) # parse args parser = argparse.ArgumentParser() parser.add_argument("-i", "--inVal...
[ "sys.stdin.readlines", "signal.signal", "argparse.ArgumentParser" ]
[((212, 236), 'signal.signal', 'signal', (['SIGPIPE', 'SIG_DFL'], {}), '(SIGPIPE, SIG_DFL)\n', (218, 236), False, 'from signal import signal, SIGPIPE, SIG_DFL\n'), ((260, 285), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (283, 285), False, 'import argparse\n'), ((1606, 1623), 'sys.stdin.read...
# Generated by Django 2.0.6 on 2019-05-29 14:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('SAcore', '0008_user_avator'), ] operations = [ migrations.AlterField( model_name='user', name='avator', ...
[ "django.db.models.CharField" ]
[((326, 395), 'django.db.models.CharField', 'models.CharField', ([], {'default': '"""author_avator/default.jpg"""', 'max_length': '(255)'}), "(default='author_avator/default.jpg', max_length=255)\n", (342, 395), False, 'from django.db import migrations, models\n')]
"""test_CLI_system_stats.py: tests expected behavior for CLI application""" from os import path import pytest from plumbum import local import pandas as pd import navitron_crons.exceptions as exceptions import navitron_crons._version as _version import navitron_crons.navitron_system_stats as navitron_system_stats im...
[ "navitron_crons.navitron_system_stats.get_system_jumps", "navitron_crons.navitron_system_stats.get_system_kills", "helpers.find_uniques" ]
[((457, 551), 'navitron_crons.navitron_system_stats.get_system_jumps', 'navitron_system_stats.get_system_jumps', ([], {'config': 'helpers.TEST_CONFIG', 'logger': 'helpers.LOGGER'}), '(config=helpers.TEST_CONFIG, logger=\n helpers.LOGGER)\n', (495, 551), True, 'import navitron_crons.navitron_system_stats as navitron_...
import numpy as np import WDRT.ESSC as ESSC import copy import matplotlib.pyplot as plt # Create buoy object, in this case for Station #46022 buoy46022 = ESSC.Buoy('46022', 'NDBC') # Read data from ndbc.noaa.gov #buoy46022.fetchFromWeb() #buoy46022.saveAsTxt(savePath = "./Data") #buoy46022.saveAsH5('NDBC46022.h5') #...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.ylabel", "WDRT.ESSC.ClaytonCopula", "numpy.array", "WDRT.ESSC.BivariateKDE", "copy.deepcopy", "WDRT.ESSC.NonParaGumbelCopula", "numpy.arange", "numpy.where", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "WDRT.ESSC.Buoy", "WDRT.ESSC.Gumbel...
[((155, 181), 'WDRT.ESSC.Buoy', 'ESSC.Buoy', (['"""46022"""', '"""NDBC"""'], {}), "('46022', 'NDBC')\n", (164, 181), True, 'import WDRT.ESSC as ESSC\n'), ((686, 705), 'WDRT.ESSC.PCA', 'ESSC.PCA', (['buoy46022'], {}), '(buoy46022)\n', (694, 705), True, 'import WDRT.ESSC as ESSC\n'), ((993, 1051), 'numpy.array', 'np.arra...
import pickle import struct from contextlib import ExitStack from tempfile import NamedTemporaryFile from .forking import fork, get_id def skip(iterable, skip, shift): for idx, item in enumerate(iterable): if idx % skip != shift: continue yield item _HEADER_FORMAT = '>Q' _HEADER_SIZE...
[ "struct.calcsize", "pickle.load", "struct.pack", "contextlib.ExitStack", "tempfile.NamedTemporaryFile" ]
[((323, 354), 'struct.calcsize', 'struct.calcsize', (['_HEADER_FORMAT'], {}), '(_HEADER_FORMAT)\n', (338, 354), False, 'import struct\n'), ((643, 677), 'struct.pack', 'struct.pack', (['_HEADER_FORMAT', 'count'], {}), '(_HEADER_FORMAT, count)\n', (654, 677), False, 'import struct\n'), ((753, 764), 'contextlib.ExitStack'...
#!/usr/bin/env python """ move-virtualenv ~~~~~~~~~~~~~~~ A helper script that moves virtualenvs to a new location. It only supports POSIX based virtualenvs and at the moment. :copyright: (c) 2012 by Fireteam Ltd. :license: BSD, see LICENSE for more details. """ from __future__ import print_f...
[ "collections.namedtuple", "sys.getfilesystemencoding", "argparse.ArgumentParser", "re.compile", "marshal.dump", "marshal.load", "shutil.rmtree" ]
[((575, 608), 're.compile', 're.compile', (['"""^python\\\\d+\\\\.\\\\d+$"""'], {}), "('^python\\\\d+\\\\.\\\\d+$')\n", (585, 608), False, 'import re\n'), ((621, 646), 're.compile', 're.compile', (['"""^\\\\d+.\\\\d+$"""'], {}), "('^\\\\d+.\\\\d+$')\n", (631, 646), False, 'import re\n'), ((668, 743), 're.compile', 're....
from __future__ import print_function #! /usr/bin/env cmsRun import sys import FWCore.ParameterSet.Config as cms from SimTracker.TrackerMaterialAnalysis.trackingMaterialVarParsing import options process = cms.Process("MaterialAnalyser") if options.geometry == 'run2': process.load('Configuration.Geometry.Geometr...
[ "FWCore.ParameterSet.Config.Source", "FWCore.ParameterSet.Config.untracked.int32", "sys.exit", "FWCore.ParameterSet.Config.Process", "FWCore.ParameterSet.Config.untracked.bool", "FWCore.ParameterSet.Config.Path" ]
[((208, 239), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""MaterialAnalyser"""'], {}), "('MaterialAnalyser')\n", (219, 239), True, 'import FWCore.ParameterSet.Config as cms\n'), ((1255, 1280), 'FWCore.ParameterSet.Config.Source', 'cms.Source', (['"""EmptySource"""'], {}), "('EmptySource')\n", (1265, 1280)...
""" Copyright 2015, Institute for Systems Biology 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 w...
[ "django.conf.urls.url" ]
[((671, 719), 'django.conf.urls.url', 'url', (['"""^saveviz$"""', 'views.save_viz'], {'name': '"""saveviz"""'}), "('^saveviz$', views.save_viz, name='saveviz')\n", (674, 719), False, 'from django.conf.urls import patterns, url\n'), ((726, 780), 'django.conf.urls.url', 'url', (['"""^deleteviz$"""', 'views.delete_viz'], ...
#!/usr/bin/env python3 import subprocess import os import sys sys.path.append("../") sys.path.append("../../system/lib/") sys.path.append("../array/") import json_parser import pos import pos_util import cli import api import json import time import CREATE_ARRAY_BASIC ARRAYNAME = CREATE_ARRAY_BASIC.ARRAYNAME def exec...
[ "api.clear_result", "pos.flush_and_kill_pos", "api.wait_situation", "time.sleep", "pos.set_addr", "api.detach_ssd", "cli.array_info", "sys.path.append", "CREATE_ARRAY_BASIC.execute", "cli.mount_array" ]
[((62, 84), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (77, 84), False, 'import sys\n'), ((85, 121), 'sys.path.append', 'sys.path.append', (['"""../../system/lib/"""'], {}), "('../../system/lib/')\n", (100, 121), False, 'import sys\n'), ((122, 150), 'sys.path.append', 'sys.path.append', (['...
import numpy as np import matplotlib.pyplot as plt # colors corresponding to initial flight, stance, second flight colors = ['k', 'b', 'g'] ### The attributes of sol are: ## sol.t : series of time-points at which the solution was calculated ## sol.y : simulation results, size 6 x times ## sol.t_events : list of t...
[ "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.argmax", "matplotlib.pyplot.axhline", "matplotlib.pyplot.figure", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.pyplot.axvline",...
[((835, 891), 'matplotlib.pyplot.scatter', 'plt.scatter', (['x_com[0]', 'y_com[0]'], {'color': 'colors[0]', 's': 'size'}), '(x_com[0], y_com[0], color=colors[0], s=size)\n', (846, 891), True, 'import matplotlib.pyplot as plt\n'), ((941, 1033), 'matplotlib.pyplot.plot', 'plt.plot', (['[foot_x, x_com[0]]', '[foot_y, y_co...
import numpy as np class perceptron(object): #eta learning rata #n_iter times def __init__(self,eta,n_iter): self.eta=eta self.n_iter=n_iter def fit(self,x,y): ''' x=ndarray(n_samples,n_features),training data y=ndarray(n_samples),labels returns se...
[ "matplotlib.pyplot.ylabel", "numpy.where", "numpy.random.choice", "matplotlib.pyplot.xlabel", "numpy.dot", "matplotlib.pyplot.scatter", "numpy.random.uniform", "pandas.DataFrame", "numpy.shape", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((1308, 1340), 'numpy.random.uniform', 'np.random.uniform', (['(6.0)', '(7.0)', '(150)'], {}), '(6.0, 7.0, 150)\n', (1325, 1340), True, 'import numpy as np\n'), ((1341, 1373), 'numpy.random.uniform', 'np.random.uniform', (['(2.0)', '(4.0)', '(150)'], {}), '(2.0, 4.0, 150)\n', (1358, 1373), True, 'import numpy as np\n'...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "lib.time.datetime_isoformat" ]
[((2025, 2058), 'lib.time.datetime_isoformat', 'datetime_isoformat', (['x', '"""%m/%d/%Y"""'], {}), "(x, '%m/%d/%Y')\n", (2043, 2058), False, 'from lib.time import datetime_isoformat\n')]
import base64 import dataclasses import gzip import json from collections import defaultdict from typing import DefaultDict, Dict, Generator, List, Optional from sentry_sdk.api import capture_exception, capture_message from posthog.models import utils Event = Dict SnapshotData = Dict @dataclasses.dataclass class P...
[ "base64.b64encode", "json.dumps", "base64.b64decode", "gzip.decompress", "collections.defaultdict", "sentry_sdk.api.capture_exception", "posthog.models.utils.UUIDT" ]
[((556, 573), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (567, 573), False, 'from collections import defaultdict\n'), ((2376, 2393), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (2387, 2393), False, 'from collections import defaultdict\n'), ((4073, 4101), 'base64.b64d...
"""Django command for rebuilding cohort statistics after import.""" from django.core.management.base import BaseCommand from django.db import transaction from ...tasks import refresh_variants_smallvariantsummary import variants.models as models class Command(BaseCommand): """Implementation of rebuilding variant...
[ "variants.models.refresh_variants_smallvariantsummary" ]
[((787, 832), 'variants.models.refresh_variants_smallvariantsummary', 'models.refresh_variants_smallvariantsummary', ([], {}), '()\n', (830, 832), True, 'import variants.models as models\n')]
""" BEHAVIOR demo batch analysis script """ import argparse import json import logging import os from pathlib import Path import pandas as pd import igibson from igibson.examples.learning.demo_replaying_example import replay_demo def replay_demo_batch( demo_dir, demo_manifest, out_dir, get_callbacks...
[ "logging.getLogger", "os.path.exists", "argparse.ArgumentParser", "pandas.read_csv", "pathlib.Path", "os.path.join", "os.path.splitext", "igibson.examples.learning.demo_replaying_example.replay_demo", "logging.info", "json.dump" ]
[((2037, 2063), 'pandas.read_csv', 'pd.read_csv', (['demo_manifest'], {}), '(demo_manifest)\n', (2048, 2063), True, 'import pandas as pd\n'), ((4323, 4369), 'os.path.join', 'os.path.join', (['igibson.ig_dataset_path', '"""tests"""'], {}), "(igibson.ig_dataset_path, 'tests')\n", (4335, 4369), False, 'import os\n'), ((44...
from celery.task import task from time import sleep @task() def add(x, y): return x + y; @task() def status(delay): status.update_state(state='PROGRESS', meta={'description': 'starting timer'}) sleep(delay) status.update_state(state='PROGRESS', meta={'description': 'after first sleep'}) sleep(dela...
[ "celery.task.task", "time.sleep" ]
[((54, 60), 'celery.task.task', 'task', ([], {}), '()\n', (58, 60), False, 'from celery.task import task\n'), ((96, 102), 'celery.task.task', 'task', ([], {}), '()\n', (100, 102), False, 'from celery.task import task\n'), ((208, 220), 'time.sleep', 'sleep', (['delay'], {}), '(delay)\n', (213, 220), False, 'from time im...
from aioresponses import aioresponses from asynctest import TestCase from asyncworker.testing import HttpClientContext from baas.api import app class TransferAPITest(TestCase): async def test_health(self): async with HttpClientContext(app) as client: resp = await client.get("/health") ...
[ "asyncworker.testing.HttpClientContext" ]
[((232, 254), 'asyncworker.testing.HttpClientContext', 'HttpClientContext', (['app'], {}), '(app)\n', (249, 254), False, 'from asyncworker.testing import HttpClientContext\n')]
""" Capstone Project. Code to run on the EV3 robot (NOT on a laptop). Author: Your professors (for the framework) and <NAME>. Winter term, 2018-2019. """ import rosebot import mqtt_remote_method_calls as com import time import shared_gui_delegate_on_robot as dingding def main(): """ This code, wh...
[ "rosebot.RoseBot", "shared_gui_delegate_on_robot.DelegateThatRecieves", "time.sleep", "mqtt_remote_method_calls.MqttClient" ]
[((545, 562), 'rosebot.RoseBot', 'rosebot.RoseBot', ([], {}), '()\n', (560, 562), False, 'import rosebot\n'), ((592, 628), 'shared_gui_delegate_on_robot.DelegateThatRecieves', 'dingding.DelegateThatRecieves', (['robot'], {}), '(robot)\n', (621, 628), True, 'import shared_gui_delegate_on_robot as dingding\n'), ((649, 68...
import numpy as np from typing import Any, Tuple, Dict import logging class NotDescentDirection(Exception): pass class ZeroDescentProduct(Exception): pass class ZeroUpdate(Exception): pass class Newton: def __init__(self, obj_func : Any, gradient_func : Any, reg_inv_hessi...
[ "logging.getLogger", "numpy.dot", "logging.StreamHandler" ]
[((505, 528), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (526, 528), False, 'import logging\n'), ((593, 620), 'logging.getLogger', 'logging.getLogger', (['"""l-bfgs"""'], {}), "('l-bfgs')\n", (610, 620), False, 'import logging\n'), ((953, 969), 'numpy.dot', 'np.dot', (['p', 'grads'], {}), '(p, ...
#!/usr/bin/env python3 # Copyright © 2021 Helmholtz Centre Potsdam GFZ German Research Centre for Geosciences, Potsdam, Germany # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at # # https://www.ap...
[ "unittest.main", "intensityprovider.AliasIntensityProvider", "testimplementations.AlwaysTheSameIntensityProvider", "intensityprovider.ConversionIntensityProvider" ]
[((3462, 3477), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3475, 3477), False, 'import unittest\n'), ((1116, 1203), 'testimplementations.AlwaysTheSameIntensityProvider', 'testimplementations.AlwaysTheSameIntensityProvider', ([], {'kind': '"""PGA"""', 'value': '(1.0)', 'unit': '"""g"""'}), "(kind='PGA', value=...
import pytest from sqlalchemy.orm.exc import NoResultFound from content_store.api.api import create_app from content_store.api.config import TestingConfig from content_store.api.models import ArticlePart from content_store.api.repositories import ArticlePartRepository from content_store.api.database import DB @pytest...
[ "content_store.api.database.DB.create_all", "content_store.api.repositories.ArticlePartRepository", "pytest.raises", "pytest.mark.usefixtures", "content_store.api.models.ArticlePart", "content_store.api.database.DB.drop_all", "content_store.api.api.create_app" ]
[((496, 526), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""app"""'], {}), "('app')\n", (519, 526), False, 'import pytest\n'), ((1184, 1214), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""app"""'], {}), "('app')\n", (1207, 1214), False, 'import pytest\n'), ((359, 384), 'content_store.api.api...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('painindex_app', '0001_initial'), ] operations = [ migrations.CreateModel( name='PainProfile', fields...
[ "django.db.models.AutoField", "django.db.models.IntegerField", "django.db.models.ForeignKey" ]
[((653, 725), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'to': '"""painindex_app.PainProfile"""', 'null': '(True)'}), "(blank=True, to='painindex_app.PainProfile', null=True)\n", (670, 725), False, 'from django.db import models, migrations\n'), ((889, 1004), 'django.db.models.IntegerFi...
# Transfer functions and derivatives # Note _all_ transfer functions and derivatives _must_ accept keyword arguments # and handle the output keyword argument out=z correctly. # <NAME> import numpy as np import scipy.special #------------------------------------------------------------------------------- """ def sigv...
[ "numpy.copyto", "numpy.multiply", "numpy.empty_like", "numpy.subtract" ]
[((852, 878), 'numpy.subtract', 'np.subtract', (['(1.0)', 'y'], {'out': 'z'}), '(1.0, y, out=z)\n', (863, 878), True, 'import numpy as np\n'), ((880, 904), 'numpy.multiply', 'np.multiply', (['z', 'y'], {'out': 'z'}), '(z, y, out=z)\n', (891, 904), True, 'import numpy as np\n'), ((1125, 1154), 'numpy.copyto', 'np.copyto...
# Copyright (c) 2014 OpenStack Foundation. # # 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...
[ "swift.common.utils.config_true_value" ]
[((1382, 1406), 'swift.common.utils.config_true_value', 'config_true_value', (['value'], {}), '(value)\n', (1399, 1406), False, 'from swift.common.utils import config_true_value\n')]
import urwid from console.app import app from console.widgets.help import HelpDialog class Pane(urwid.WidgetPlaceholder): """ A widget which allows for easy display of dialogs. """ def __init__(self, widget=urwid.SolidFill(' ')): urwid.WidgetPlaceholder.__init__(self, widget) self.wi...
[ "console.app.app.draw_screen", "console.widgets.help.HelpDialog", "urwid.WidgetPlaceholder.__init__", "urwid.SolidFill", "urwid.LineBox" ]
[((227, 247), 'urwid.SolidFill', 'urwid.SolidFill', (['""" """'], {}), "(' ')\n", (242, 247), False, 'import urwid\n'), ((258, 304), 'urwid.WidgetPlaceholder.__init__', 'urwid.WidgetPlaceholder.__init__', (['self', 'widget'], {}), '(self, widget)\n', (290, 304), False, 'import urwid\n'), ((1418, 1430), 'console.widgets...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-17 13:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
[ "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((11368, 11478), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""articles.Category"""', 'verbose_name': '"""分类"""'}), "(on_delete=django.db.models.deletion.CASCADE, to=\n 'articles.Category', verbose_name='分类')\n", (11385, 11478), False, 'from dj...
#------testing the trained model and ensemble weights on the test data to get the final accuracy #importing required libraries and modules import os import sys import cv2 import numpy as np from preprocess import Preprocess from data_split import Load from conv_net import CNN from ensemble import Ensemble ...
[ "numpy.array", "numpy.load", "conv_net.CNN", "ensemble.Ensemble" ]
[((865, 870), 'conv_net.CNN', 'CNN', ([], {}), '()\n', (868, 870), False, 'from conv_net import CNN\n'), ((1051, 1061), 'ensemble.Ensemble', 'Ensemble', ([], {}), '()\n', (1059, 1061), False, 'from ensemble import Ensemble\n'), ((1526, 1536), 'ensemble.Ensemble', 'Ensemble', ([], {}), '()\n', (1534, 1536), False, 'from...
from dynaconf import FlaskDynaconf from flask import Flask def create_app(**config): app = Flask(__name__) FlaskDynaconf(app) # config managed by Dynaconf app.config.load_extensions('EXTENSIONS') # Load extensions from settings.toml app.config.update(config) # Override with passed config return...
[ "dynaconf.FlaskDynaconf", "flask.Flask" ]
[((97, 112), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (102, 112), False, 'from flask import Flask\n'), ((117, 135), 'dynaconf.FlaskDynaconf', 'FlaskDynaconf', (['app'], {}), '(app)\n', (130, 135), False, 'from dynaconf import FlaskDynaconf\n')]
"""Plots GridRad domains. Specifically, plots number of convective days with GridRad data at each grid point. """ import os.path import argparse import numpy import matplotlib matplotlib.use('agg') from matplotlib import pyplot from mpl_toolkits.basemap import Basemap from gewittergefahr.gg_io import gridrad_io from ...
[ "gewittergefahr.gg_utils.time_periods.range_and_interval_to_list", "numpy.array", "gewittergefahr.gg_utils.grids.create_equidistant_grid", "gewittergefahr.gg_utils.projections.project_xy_to_latlng", "gewittergefahr.gg_utils.grids.xy_vectors_to_matrices", "numpy.mod", "gewittergefahr.gg_utils.time_conver...
[((178, 199), 'matplotlib.use', 'matplotlib.use', (['"""agg"""'], {}), "('agg')\n", (192, 199), False, 'import matplotlib\n'), ((988, 1006), 'numpy.full', 'numpy.full', (['(3)', '(0.0)'], {}), '(3, 0.0)\n', (998, 1006), False, 'import numpy\n'), ((2059, 2084), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], ...
import random import matplotlib.pyplot as plt import gym # from agents.actor_critic_agents.A2C import A2C # from agents.actor_critic_agents.A3C import A3C # from agents.actor_critic_agents.SAC import SAC from agents.actor_critic_agents.SAC_Discrete import SAC_Discrete # from agents.DQN_agents.DQN_HER import DQN_HER #...
[ "utilities.data_structures.Config.Config", "torch.manual_seed", "environments.Cache_server.Cache_server", "agents.Trainer.Trainer", "matplotlib.pyplot.plot", "random.seed", "numpy.max", "numpy.random.seed", "matplotlib.pyplot.show" ]
[((1183, 1197), 'random.seed', 'random.seed', (['(1)'], {}), '(1)\n', (1194, 1197), False, 'import random\n'), ((1198, 1215), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (1212, 1215), True, 'import numpy as np\n'), ((1216, 1236), 'torch.manual_seed', 'torch.manual_seed', (['(1)'], {}), '(1)\n', (1233...
import os, argparse, torch, math, time, random from os.path import join, isfile import torch.nn.functional as F from torch.optim import SGD from torch.distributions import Beta from tensorboardX import SummaryWriter import torchvision import modified_vgg from dataloader import dataloader1 import dataloader from utils ...
[ "utils.compute_weight", "torch.multiprocessing.freeze_support", "torch.sum", "torchvision.models.vgg11", "modified_vgg.vgg11", "torch.nn.functional.softmax", "utils.make_folder", "tensorboardX.SummaryWriter", "argparse.ArgumentParser", "model.ConvLarge", "torch.ones_like", "utils.accuracy", ...
[((442, 467), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (465, 467), False, 'import os, argparse, torch, math, time, random\n'), ((2994, 3016), 'random.seed', 'random.seed', (['args.seed'], {}), '(args.seed)\n', (3005, 3016), False, 'import os, argparse, torch, math, time, random\n'), ((301...
import pandas as pd df = pd.read_csv('data.csv') # read the data print(df) def median(list_vales): n_num = list_vales n = len(n_num) n_num.sort() if n % 2 == 0: median1 = n_num[n // 2] median2 = n_num[n // 2 - 1] median = (median1 + median2) / 2 else: median = n_n...
[ "pandas.read_csv" ]
[((26, 49), 'pandas.read_csv', 'pd.read_csv', (['"""data.csv"""'], {}), "('data.csv')\n", (37, 49), True, 'import pandas as pd\n')]
from skimage.draw import line as sk_line from skimage.draw import circle_perimeter as sk_circle_perimeter from RGBMatrixEmulator.graphics.color import Color from RGBMatrixEmulator.graphics.font import Font def DrawText(canvas, font, x, y, color, text): # Early return for empty string prevents bugs in bdfparser l...
[ "skimage.draw.line", "skimage.draw.circle_perimeter" ]
[((1993, 2013), 'skimage.draw.line', 'sk_line', (['*int_points'], {}), '(*int_points)\n', (2000, 2013), True, 'from skimage.draw import line as sk_line\n'), ((2202, 2237), 'skimage.draw.circle_perimeter', 'sk_circle_perimeter', (['*int_points', 'r'], {}), '(*int_points, r)\n', (2221, 2237), True, 'from skimage.draw imp...
# # Copyright © 2021 United States Government as represented by the Administrator # of the National Aeronautics and Space Administration. No copyright is claimed # in the United States under Title 17, U.S. Code. All Other Rights Reserved. # # SPDX-License-Identifier: NASA-1.3 # """Generate a grid of pointings on the sk...
[ "ligo.skymap.tool.FileType", "ligo.skymap.tool.ArgumentParser" ]
[((507, 555), 'ligo.skymap.tool.ArgumentParser', 'ArgumentParser', ([], {'prog': '"""dorado-scheduling-skygrid"""'}), "(prog='dorado-scheduling-skygrid')\n", (521, 555), False, 'from ligo.skymap.tool import ArgumentParser, FileType\n'), ((921, 934), 'ligo.skymap.tool.FileType', 'FileType', (['"""w"""'], {}), "('w')\n",...
# main.py #----------------------------------------------------------------------# # # # #----------------------------------------------------------------------# from math import floor from sqlite3 import OperationalError import string, sqlite3 from urllib.parse import urlparse import http.server import socketserver ...
[ "math.floor", "flask.redirect", "sqlite3.connect", "flask.Flask" ]
[((1344, 1359), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (1349, 1359), False, 'from flask import Flask, request, render_template, redirect\n'), ((997, 1011), 'math.floor', 'floor', (['(num / b)'], {}), '(num / b)\n', (1002, 1011), False, 'from math import floor\n'), ((1920, 1942), 'flask.redirect', '...
import flask from flask import Flask, url_for from tensorflow.keras.applications.imagenet_utils import preprocess_input, decode_predictions from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing import image import numpy as np # instantiating a class object app = Flask(__name__) model_pat...
[ "tensorflow.keras.preprocessing.image.load_img", "flask.Flask", "tensorflow.keras.models.load_model", "numpy.expand_dims", "tensorflow.keras.preprocessing.image.img_to_array", "tensorflow.keras.applications.imagenet_utils.preprocess_input" ]
[((294, 309), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (299, 309), False, 'from flask import Flask, url_for\n'), ((362, 384), 'tensorflow.keras.models.load_model', 'load_model', (['model_path'], {}), '(model_path)\n', (372, 384), False, 'from tensorflow.keras.models import load_model\n'), ((540, 588)...
from flask import request, jsonify from functools import wraps from schema import SchemaError def json_required(func): @wraps(func) def wrapper(*args, **kwargs): if not request.data or not request.json: return jsonify({ 'status': 'Error', 'reason': 'No JSON ...
[ "functools.wraps", "flask.jsonify" ]
[((126, 137), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (131, 137), False, 'from functools import wraps\n'), ((466, 477), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (471, 477), False, 'from functools import wraps\n'), ((240, 298), 'flask.jsonify', 'jsonify', (["{'status': 'Error', 'reason': '...
import os import feedparser import json from flask import Flask, request # Add your Slack token to the variable below. SLACK_TOKEN = "" url = "" payload = {} headers = {'content-type': 'application/json'} app = Flask(__name__) # this endpoint listens for incoming slash commands from Slack. @app.route('/horos', metho...
[ "feedparser.parse", "json.dumps", "flask.request.form.get", "flask.Flask" ]
[((213, 228), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (218, 228), False, 'from flask import Flask, request\n'), ((1270, 1291), 'feedparser.parse', 'feedparser.parse', (['url'], {}), '(url)\n', (1286, 1291), False, 'import feedparser\n'), ((437, 461), 'flask.request.form.get', 'request.form.get', (['...
import base64 import hashlib import json import logging from dataclasses import dataclass import boto3 log = logging.getLogger() region = "us-east-1" def handle(event: dict, context): request = event["Records"][0]["cf"]["request"] try: authenticate(request["headers"]) except Exception as e: ...
[ "logging.getLogger", "json.loads", "boto3.client", "base64.b64decode" ]
[((111, 130), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (128, 130), False, 'import logging\n'), ((1231, 1247), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (1241, 1247), False, 'import json\n'), ((670, 693), 'base64.b64decode', 'base64.b64decode', (['creds'], {}), '(creds)\n', (686, 693), F...
#Copyright (c) 2017 <NAME>. #Cura is released under the terms of the LGPLv3 or higher. import gc from UM.Job import Job from UM.Application import Application from UM.Mesh.MeshData import MeshData from UM.Preferences import Preferences from UM.View.GL.OpenGLContext import OpenGLContext from UM.Message import Message...
[ "UM.Logger.Logger.log", "UM.Preferences.Preferences.getInstance", "cura.Scene.BuildPlateDecorator.BuildPlateDecorator", "cura.LayerDataDecorator.LayerDataDecorator", "cura.Scene.CuraSceneNode.CuraSceneNode", "UM.Job.Job.yieldThread", "cura.LayerDataBuilder.LayerDataBuilder", "cura.LayerPolygon.LayerPo...
[((792, 811), 'UM.i18n.i18nCatalog', 'i18nCatalog', (['"""cura"""'], {}), "('cura')\n", (803, 811), False, 'from UM.i18n import i18nCatalog\n'), ((1015, 1081), 'UM.Logger.Logger.log', 'Logger.log', (['"""w"""', '"""Unable to convert color code, returning default"""'], {}), "('w', 'Unable to convert color code, returnin...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, TextAreaField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo, Length from app.models import User from flask import request class CreateChallengeForm(FlaskForm): name = StringField('...
[ "wtforms.validators.Length", "wtforms.SubmitField", "wtforms.validators.DataRequired", "wtforms.StringField" ]
[((534, 557), 'wtforms.StringField', 'StringField', (['"""Interval"""'], {}), "('Interval')\n", (545, 557), False, 'from wtforms import StringField, PasswordField, BooleanField, SubmitField, TextAreaField\n'), ((566, 585), 'wtforms.StringField', 'StringField', (['"""Type"""'], {}), "('Type')\n", (577, 585), False, 'fro...
""" Given a permutation of any length, generate the next permutation in lexicographic order. For example, this are the permutations for [1,2,3] in lexicographic order. # >>> list(it.permutations([1,2,3])) [(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)] Then, your function next_permutation(t:tuple)...
[ "itertools.permutations" ]
[((2341, 2356), 'itertools.permutations', 'permutations', (['p'], {}), '(p)\n', (2353, 2356), False, 'from itertools import permutations\n')]
from unihan_db.tables import ( UnhnLocation, UnhnLocationkXHC1983, UnhnReading, kCantonese, kCCCII, kCheungBauer, kCheungBauerIndex, kCihaiT, kDaeJaweon, kDefinition, kFenn, kFennIndex, kGSR, kHanYu, kHanyuPinlu, kHanyuPinyin, kHDZRadBreak, kIICore...
[ "unihan_db.tables.kCihaiT", "unihan_db.tables.kGSR", "unihan_db.tables.kFennIndex", "unihan_db.tables.kIRGKangXi", "unihan_db.tables.kHanyuPinlu", "unihan_db.tables.kHanyuPinyin", "unihan_db.tables.kUnihanCore2020", "unihan_db.tables.kXHC1983", "unihan_db.tables.kIICoreSource", "unihan_db.tables.k...
[((2286, 2294), 'unihan_db.tables.kHanYu', 'kHanYu', ([], {}), '()\n', (2292, 2294), False, 'from unihan_db.tables import UnhnLocation, UnhnLocationkXHC1983, UnhnReading, kCantonese, kCCCII, kCheungBauer, kCheungBauerIndex, kCihaiT, kDaeJaweon, kDefinition, kFenn, kFennIndex, kGSR, kHanYu, kHanyuPinlu, kHanyuPinyin, kH...
from __future__ import absolute_import, division, print_function import iotbx.pdb import mmtbx.model from mmtbx.building.cablam_idealization import cablam_idealization, master_phil import sys import libtbx.load_env pdb_str = """\ ATOM 2327 N GLY A 318 169.195 115.930 63.690 1.00216.32 N ATOM 23...
[ "mmtbx.building.cablam_idealization.master_phil.extract" ]
[((4220, 4241), 'mmtbx.building.cablam_idealization.master_phil.extract', 'master_phil.extract', ([], {}), '()\n', (4239, 4241), False, 'from mmtbx.building.cablam_idealization import cablam_idealization, master_phil\n'), ((4654, 4675), 'mmtbx.building.cablam_idealization.master_phil.extract', 'master_phil.extract', ([...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed May 25 16:02:58 2022 @author: erri """ import os import numpy as np import math from morph_quantities_func_v2 import morph_quantities import matplotlib.pyplot as plt # SINGLE RUN NAME run = 'q07_1' DoD_name = 'DoD_s1-s0_filt_nozero_rst.txt' # Step betw...
[ "os.listdir", "numpy.nanstd", "math.floor", "numpy.where", "morph_quantities_func_v2.morph_quantities", "os.path.join", "os.getcwd", "numpy.append", "numpy.array", "numpy.nanmean", "numpy.isnan", "numpy.vstack", "numpy.loadtxt" ]
[((1005, 1016), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1014, 1016), False, 'import os\n'), ((1052, 1096), 'os.path.join', 'os.path.join', (['home_dir', '"""DoDs"""', "('DoD_' + run)"], {}), "(home_dir, 'DoDs', 'DoD_' + run)\n", (1064, 1096), False, 'import os\n'), ((1192, 1215), 'os.listdir', 'os.listdir', (['DoD...
#--------------------------------------------------------Import libraries import pickle import socket import struct import cv2 from stable_baselines import PPO2 import numpy as np import imageio #--------------------------------------------------------Establiosh connection s = socket.socket(socket.AF_INET,socket.SOCK_...
[ "cv2.resizeWindow", "socket.socket", "pickle.dumps", "stable_baselines.PPO2.load", "numpy.array", "struct.unpack", "cv2.cvtColor", "numpy.frombuffer", "cv2.waitKey", "cv2.namedWindow" ]
[((279, 328), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (292, 328), False, 'import socket\n'), ((446, 487), 'stable_baselines.PPO2.load', 'PPO2.load', (['"""model_output/model_final.zip"""'], {}), "('model_output/model_final.zip')\n", (45...
# from django.shortcuts import render # Create your views here. from django.urls import reverse_lazy from django.views.generic import CreateView from fitbox.consultas.forms import ConsultaForm from fitbox.consultas.models import Consulta class ConsultaCreateView(CreateView): template_name = "consultas/cadastro_...
[ "django.urls.reverse_lazy" ]
[((404, 446), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""consulta:cadastro_consulta"""'], {}), "('consulta:cadastro_consulta')\n", (416, 446), False, 'from django.urls import reverse_lazy\n')]
import os STATIC_FOLDERS = ( '{{cookiecutter.repo_name}}/common/static', '{{cookiecutter.repo_name}}/users/static', ) # Muffin Plugins PLUGINS = ( 'muffin_jinja2', 'muffin_peewee', 'muffin_session', ) # Plugins configurations SESSION_SECRET = 'SecretHere' SESSION_LOGIN_URL = '/users/signin/' JI...
[ "os.environ.get" ]
[((520, 597), 'os.environ.get', 'os.environ.get', (['"""DATABASE_URL"""', '"""sqlite:///{{cookiecutter.repo_name}}.sqlite"""'], {}), "('DATABASE_URL', 'sqlite:///{{cookiecutter.repo_name}}.sqlite')\n", (534, 597), False, 'import os\n')]
from typing import List, Dict from sc2.ids.ability_id import AbilityId from sc2.position import Point2 from sc2.unit import Unit from sc2.units import Units from sharpy.interfaces import IZoneManager from sharpy.managers.core.roles import UnitTask from sharpy.plans.acts import ActBase from sharpy.sc2math import get_in...
[ "sharpy.sc2math.get_intersections" ]
[((3371, 3445), 'sharpy.sc2math.get_intersections', 'get_intersections', (['mf.position', 'MINING_RADIUS', 'mf2.position', 'MINING_RADIUS'], {}), '(mf.position, MINING_RADIUS, mf2.position, MINING_RADIUS)\n', (3388, 3445), False, 'from sharpy.sc2math import get_intersections\n')]
# Generated by Django 2.1.3 on 2020-02-28 21:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('content_management', '0045_auto_20200228_1345'), ] operations = [ migrations.RemoveField( model...
[ "django.db.migrations.RemoveField", "django.db.models.ForeignKey" ]
[((279, 343), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""content"""', 'name': '"""collections"""'}), "(model_name='content', name='collections')\n", (301, 343), False, 'from django.db import migrations, models\n'), ((492, 606), 'django.db.models.ForeignKey', 'models.ForeignKey...
import os from fnmatch import fnmatch from typing import Iterator, List, Optional, Sequence, Tuple, Union import numpy as np from typing_extensions import Literal from . import lib from .otf import TemporaryOTF from .util import PathOrArray, _kwargs_for, imread def rl_cleanup(): """Release GPU buffer and cleanu...
[ "numpy.median", "os.listdir", "os.path.join", "numpy.ascontiguousarray", "os.path.isfile", "numpy.issubdtype", "os.path.isdir", "numpy.empty", "numpy.empty_like", "fnmatch.fnmatch" ]
[((4717, 4744), 'numpy.empty_like', 'np.empty_like', (['decon_result'], {}), '(decon_result)\n', (4730, 4744), True, 'import numpy as np\n'), ((4779, 4808), 'numpy.empty', 'np.empty', (['(1)'], {'dtype': 'np.float32'}), '(1, dtype=np.float32)\n', (4787, 4808), True, 'import numpy as np\n'), ((4851, 4885), 'numpy.issubd...