code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import os import shutil from contextlib import ( contextmanager, ) from pathlib import Path import pytest @pytest.fixture(scope='function', autouse=True) def cleanup(): test_generate_dir = (Path('.') / 'tests' / 'biisan_data') if test_generate_dir.exists(): shutil.rmtree(test_generate_dir) yi...
[ "pathlib.Path", "pathlib.Path.cwd", "os.chdir", "shutil.copyfile", "shutil.rmtree", "pytest.fixture" ]
[((114, 160), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""', 'autouse': '(True)'}), "(scope='function', autouse=True)\n", (128, 160), False, 'import pytest\n'), ((403, 449), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""', 'autouse': '(True)'}), "(scope='function', autouse=True...
""" File: stanCodoshop.py Name: <NAME> ---------------------------------------------- SC101_Assignment3 Adapted from <NAME>'s Ghost assignment by <NAME>. ----------------------------------------------- Remove people or abnormal objects in a certain photo. """ import os import sys import time from simpleimage import S...
[ "os.listdir", "simpleimage.SimpleImage.blank", "os.path.join", "simpleimage.SimpleImage", "time.time" ]
[((3042, 3053), 'time.time', 'time.time', ([], {}), '()\n', (3051, 3053), False, 'import time\n'), ((3125, 3157), 'simpleimage.SimpleImage.blank', 'SimpleImage.blank', (['width', 'height'], {}), '(width, height)\n', (3142, 3157), False, 'from simpleimage import SimpleImage\n'), ((3642, 3653), 'time.time', 'time.time', ...
# coding: utf-8 # # This code is part of qclib. # # Copyright (c) 2021, <NAME> import numpy as np from ..math import apply_statevec, apply_density, density_matrix from .measure import measure_qubit, measure_qubit_rho class DensityMatrix: def __init__(self, mat): self._data = np.asarray(mat) def __l...
[ "numpy.asarray" ]
[((292, 307), 'numpy.asarray', 'np.asarray', (['mat'], {}), '(mat)\n', (302, 307), True, 'import numpy as np\n'), ((931, 946), 'numpy.asarray', 'np.asarray', (['vec'], {}), '(vec)\n', (941, 946), True, 'import numpy as np\n')]
#!/usr/bin/env python # coding: utf-8 # #### Modeling the elemental stoichiometry of phytoplankton and surrounding surface waters in and upwelling or estuarine system # >Steps to complete project: # >1. Translate matlab physical model into python # >2. Substitute Dynamic CFM into model for eco component # >3. Analyze ...
[ "matplotlib.pyplot.savefig", "numpy.ones", "numpy.full_like", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.size", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "math.sin", "matplotlib.pyplot.subplot", "numpy.arange", "matplotlib.pyp...
[((757, 781), 'numpy.arange', 'np.arange', (['(0)', '(T + dt)', 'dt'], {}), '(0, T + dt, dt)\n', (766, 781), True, 'import numpy as np\n'), ((1016, 1041), 'numpy.arange', 'np.arange', (['(0)', '(Lx + dx)', 'dx'], {}), '(0, Lx + dx, dx)\n', (1025, 1041), True, 'import numpy as np\n'), ((2479, 2502), 'numpy.arange', 'np....
import requests sess = requests.session() import gzip import json import time import os def downloadyear(year): print("fetching year", year) url = "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-{year}.json.gz".format(year=year) req = sess.get(url, stream=True) return gzip.open(req.raw)....
[ "requests.session", "time.strftime", "gzip.open" ]
[((24, 42), 'requests.session', 'requests.session', ([], {}), '()\n', (40, 42), False, 'import requests\n'), ((1524, 1543), 'time.strftime', 'time.strftime', (['"""%Y"""'], {}), "('%Y')\n", (1537, 1543), False, 'import time\n'), ((301, 319), 'gzip.open', 'gzip.open', (['req.raw'], {}), '(req.raw)\n', (310, 319), False,...
#!/usr/bin/env python3 ''' Perimeterator Enumerator. This wrapper is intended to allow for simplified AWS based deployment of the Perimeterator enumerator. This allows for a cost effective method of execution, as the Perimeterator poller component only needs to execute on a defined schedule in order to detect changes....
[ "logging.getLogger", "logging.basicConfig", "perimeterator.helper.aws_account_id", "os.getenv", "perimeterator.dispatcher.sqs.Dispatcher" ]
[((681, 700), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (698, 700), False, 'import logging\n'), ((834, 944), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s - %(process)d - [%(levelname)s] %(message)s"""'}), "(level=logging.INFO, format=\n '%(a...
# Copyright 2020 Ford Motor Company # 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...
[ "subprocess.Popen", "cookiecutterassert.messager.printError" ]
[((1029, 1086), 'subprocess.Popen', 'subprocess.Popen', (['self.script'], {'cwd': 'workingDir', 'shell': '(True)'}), '(self.script, cwd=workingDir, shell=True)\n', (1045, 1086), False, 'import subprocess\n'), ((1361, 1394), 'cookiecutterassert.messager.printError', 'messager.printError', (['errorMessage'], {}), '(error...
"""Test weighted path counting methods.""" # pylint: disable=redefined-outer-name,too-few-public-methods # pylint: disable=too-many-branches import pytest from pytest import approx import numpy as np import pandas as pd from pathcensus.definitions import PathDefinitionsWeighted from pathcensus import PathCensus @pyte...
[ "pathcensus.PathCensus", "pytest.approx", "numpy.allclose", "numpy.isclose", "pandas.DataFrame", "pathcensus.definitions.PathDefinitionsWeighted", "pytest.mark.parametrize", "numpy.isnan", "pytest.fixture", "numpy.zeros_like" ]
[((316, 347), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (330, 347), False, 'import pytest\n'), ((575, 606), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (589, 606), False, 'import pytest\n'), ((746, 777), 'pytest.fixture'...
""" Custom Fairness Metrics Note that ratio and difference computation is handled by AIF360's sklearn.metrics module. As of the V 0.4.0 release, these are calculated as [unprivileged/privileged] and [unprivileged - privileged], respectively """ from typing import Callable from aif360.sklearn.metrics import...
[ "aif360.sklearn.metrics.ratio", "aif360.sklearn.metrics.difference", "warnings.catch_warnings", "numpy.isnan", "warnings.filterwarnings" ]
[((1702, 1774), 'aif360.sklearn.metrics.ratio', 'ratio', (['precision', 'y_true', 'y_pred'], {'prot_attr': 'pa_name', 'priv_group': 'priv_grp'}), '(precision, y_true, y_pred, prot_attr=pa_name, priv_group=priv_grp)\n', (1707, 1774), False, 'from aif360.sklearn.metrics import difference, ratio\n'), ((2221, 2307), 'aif36...
"""The Kostal piko integration.""" import logging import xmltodict from datetime import timedelta from homeassistant.const import ( CONF_USERNAME, CONF_PASSWORD, CONF_HOST, CONF_MONITORED_CONDITIONS, ) from homeassistant.components.sensor import SensorEntity from homeassistant.helpers...
[ "logging.getLogger", "xmltodict.parse", "homeassistant.util.Throttle", "datetime.timedelta", "homeassistant.helpers.aiohttp_client.async_get_clientsession" ]
[((539, 566), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (556, 566), False, 'import logging\n'), ((586, 607), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(10)'}), '(seconds=10)\n', (595, 607), False, 'from datetime import timedelta\n'), ((5557, 5591), 'homeassistant.util.Thro...
import re import os import time class LogReader(object): def __init__(self): self.log_file_sizes = {} # (if the file changes more than this, ignore ) - 1 MB self.max_file_size_change = 1000000 # (if the time between checks is greater, ignore ) - 5 minutes self.max_file_time_...
[ "os.stat", "time.time", "re.search" ]
[((418, 452), 're.search', 're.search', (['"""r^.+\\\\.\\\\.\\\\.+$"""', 'path'], {}), "('r^.+\\\\.\\\\.\\\\.+$', path)\n", (427, 452), False, 'import re\n'), ((1308, 1319), 'time.time', 'time.time', ([], {}), '()\n', (1317, 1319), False, 'import time\n'), ((540, 603), 're.search', 're.search', (['"""^.+[\\\\\\\\|\\\\/...
#!/usr/bin/env python # -*- coding: utf-8 -*- import __future__ import sys import json def banner(): ban = '====' * 30 print("{}\nSAMPLE INP:\n{}\n{}".format(ban,ban,open(ip, 'r').read())) print("{}\nSAMPLE OUT:\n{}\n{}".format(ban,ban,open(op, 'r').read())) print("{}\nSTART:\n{}".format(ban,ban)) ...
[ "collections.defaultdict" ]
[((945, 962), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (956, 962), False, 'from collections import defaultdict\n')]
from django import http from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required from django.core import urlresolvers from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.translation import ugettext_lazy as _ fr...
[ "logging.getLogger", "django.http.HttpResponseRedirect", "satchmo.contact.forms.ExtendedContactInfoForm", "satchmo.contact.models.Contact.objects.from_request", "django.template.RequestContext", "django.core.urlresolvers.reverse", "satchmo.contact.models.Contact.objects.get", "satchmo.shop.models.Conf...
[((609, 651), 'logging.getLogger', 'logging.getLogger', (['"""satchmo.contact.views"""'], {}), "('satchmo.contact.views')\n", (626, 651), False, 'import logging\n'), ((1133, 1153), 'django.contrib.auth.decorators.login_required', 'login_required', (['view'], {}), '(view)\n', (1147, 1153), False, 'from django.contrib.au...
#***************************************************# # This file is part of PFNET. # # # # Copyright (c) 2015, <NAME>. # # # # PFNET is released under the BSD 2-clause license. # #***********...
[ "pfnet.Parser", "pfnet.Constraint", "numpy.linalg.norm", "sys.path.append", "numpy.random.randn" ]
[((413, 433), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (428, 433), False, 'import sys\n'), ((671, 712), 'pfnet.Constraint', 'pfnet.Constraint', (['"""AC power balance"""', 'net'], {}), "('AC power balance', net)\n", (687, 712), False, 'import pfnet\n'), ((1071, 1094), 'numpy.random.randn', 'n...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from logging import StreamHandler, INFO from flask import Flask from flask.ext.mail import Message, Mail from api import create_api from database import init_db API_VERSION = "v1" def check_environment(app): file_backend = os.environ.get('FILE_BACKEND', '...
[ "api.create_api", "logging.StreamHandler", "flask.Flask", "database.init_db", "os.environ.get" ]
[((1277, 1292), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (1282, 1292), False, 'from flask import Flask\n'), ((1348, 1363), 'database.init_db', 'init_db', (['db_url'], {}), '(db_url)\n', (1355, 1363), False, 'from database import init_db\n'), ((1470, 1498), 'api.create_api', 'create_api', (['app', 'AP...
# -*- coding: utf-8 -*- import unittest from app import app class TestPingView(unittest.TestCase): def setUp(self): app.config['TESTING'] = True self.client = app.test_client() def test_ping(self): response = self.client.get('/ping') assert response.data.decode('utf-8') == 'p...
[ "app.app.test_client" ]
[((182, 199), 'app.app.test_client', 'app.test_client', ([], {}), '()\n', (197, 199), False, 'from app import app\n')]
import pytest from dataclasses import dataclass, field from functools import reduce from typing import List, Optional from helpers.basetest import BaseTestBtc, LedgerjsApdu, TxData, CONSENSUS_BRANCH_ID from helpers.deviceappbtc import DeviceAppBtc, CommException # Test data below is from a Zcash test log from Live te...
[ "functools.reduce", "helpers.basetest.LedgerjsApdu", "pytest.mark.skip", "helpers.deviceappbtc.DeviceAppBtc", "pytest.mark.parametrize" ]
[((355, 392), 'helpers.basetest.LedgerjsApdu', 'LedgerjsApdu', ([], {'commands': "['b001000000']"}), "(commands=['b001000000'])\n", (367, 392), False, 'from helpers.basetest import BaseTestBtc, LedgerjsApdu, TxData, CONSENSUS_BRANCH_ID\n'), ((528, 678), 'helpers.basetest.LedgerjsApdu', 'LedgerjsApdu', ([], {'commands':...
import atexit import grpc import logging import os import server_pb2 import server_pb2_grpc port: str = None def init_env() -> None: global port port = os.environ['PORT'] logging.info('Found PORT at %s', port) def init_atexit() -> None: def end(): logging.info('bye') atexit.register...
[ "logging.basicConfig", "server_pb2_grpc.ReadyStub", "grpc.insecure_channel", "server_pb2.ConfKey", "server_pb2.ReadyService", "server_pb2.Ready", "server_pb2.ReadyStatus", "logging.info", "atexit.register" ]
[((189, 227), 'logging.info', 'logging.info', (['"""Found PORT at %s"""', 'port'], {}), "('Found PORT at %s', port)\n", (201, 227), False, 'import logging\n'), ((305, 325), 'atexit.register', 'atexit.register', (['end'], {}), '(end)\n', (320, 325), False, 'import atexit\n'), ((360, 483), 'logging.basicConfig', 'logging...
import base64 import shutil import json import re from enum import Enum, auto from typing import Optional import py7zr from cachetools import TTLCache, cached from ruamel.yaml import YAML, YAMLError from logger import getLogger import os import tempfile import zipfile import requests from bs4 import BeautifulSoup l ...
[ "os.listdir", "enum.auto", "py7zr.SevenZipFile", "re.compile", "zipfile.ZipFile", "requests.get", "ruamel.yaml.YAML", "bs4.BeautifulSoup", "os.path.isfile", "cachetools.TTLCache", "tempfile.mkdtemp", "shutil.rmtree", "json.load", "logger.getLogger", "os.walk" ]
[((322, 339), 'logger.getLogger', 'getLogger', (['"""main"""'], {}), "('main')\n", (331, 339), False, 'from logger import getLogger\n'), ((385, 391), 'enum.auto', 'auto', ([], {}), '()\n', (389, 391), False, 'from enum import Enum, auto\n'), ((409, 415), 'enum.auto', 'auto', ([], {}), '()\n', (413, 415), False, 'from e...
# -*- encoding: utf-8 -*- """ License: MIT Copyright (c) 2019 - present AppSeed.us """ from django.urls import path from .views import login_view, register_user, reset_password from django.contrib.auth.views import LogoutView from .views import * urlpatterns = [ path('login/', login_view, name="login"), path(...
[ "django.urls.path", "django.contrib.auth.views.LogoutView.as_view" ]
[((269, 309), 'django.urls.path', 'path', (['"""login/"""', 'login_view'], {'name': '"""login"""'}), "('login/', login_view, name='login')\n", (273, 309), False, 'from django.urls import path\n'), ((315, 364), 'django.urls.path', 'path', (['"""register/"""', 'register_user'], {'name': '"""register"""'}), "('register/',...
from flask import Blueprint admin_blu = Blueprint("admin", __name__, url_prefix="/admin") from .views import * @admin_blu.before_request def admin_identification(): """ 进入后台之前的校验 :return: """ # 我先从你的session获取下is_admin 如果能获取到 说明你是管理员 # 如果访问的接口是/admin/login 那么可以直接访问 is_login = request.ur...
[ "flask.Blueprint" ]
[((42, 91), 'flask.Blueprint', 'Blueprint', (['"""admin"""', '__name__'], {'url_prefix': '"""/admin"""'}), "('admin', __name__, url_prefix='/admin')\n", (51, 91), False, 'from flask import Blueprint\n')]
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from recipe.models import Tag from recipe.serializers import TagSerializer from core.tests.utils import sample_tag, sample_user ...
[ "recipe.models.Tag.objects.get", "core.tests.utils.sample_tag", "rest_framework.test.APIClient", "recipe.models.Tag.objects.all", "django.urls.reverse", "core.tests.utils.sample_user" ]
[((335, 361), 'django.urls.reverse', 'reverse', (['"""recipe:list-tag"""'], {}), "('recipe:list-tag')\n", (342, 361), False, 'from django.urls import reverse\n'), ((379, 407), 'django.urls.reverse', 'reverse', (['"""recipe:create-tag"""'], {}), "('recipe:create-tag')\n", (386, 407), False, 'from django.urls import reve...
from sfsidb import load as sload from sfsidb import toolkit from sfsidb import checking_tools as ct from sfsidb import sensor_file_reader as sfr from tests.conftest import TEST_DATA_DIR def test_get_depth_from_sensor_code(): sensor_ffp = TEST_DATA_DIR + "test-sensor-file.json" si = sfr.read_json_sensor_file(...
[ "sfsidb.toolkit.get_depth_by_code", "sfsidb.load.get_sensor_code_by_number", "sfsidb.checking_tools.isclose", "sfsidb.sensor_file_reader.read_json_sensor_file" ]
[((294, 331), 'sfsidb.sensor_file_reader.read_json_sensor_file', 'sfr.read_json_sensor_file', (['sensor_ffp'], {}), '(sensor_ffp)\n', (319, 331), True, 'from sfsidb import sensor_file_reader as sfr\n'), ((383, 440), 'sfsidb.load.get_sensor_code_by_number', 'sload.get_sensor_code_by_number', (['si', 'mtype', 'sensor_num...
# Setup procedures -- WIP import os import re import arcpy arcpy.env.workspace = "in_memory" # TODO: out_gdb = "//cityfiles/DEVServices/WallyG/projects/NhoodProfiles/nhoods/data/NhoodAmenities.gdb/MtStatePlane" # DATA PROCESSING # Nhood_buffers: arcpy.Buffer_analysis("Nhoods", "nhood_buffers", ...
[ "re.split", "arcpy.Dissolve_management", "arcpy.DeleteField_management", "arcpy.AddField_management", "arcpy.Select_analysis", "arcpy.FeatureClassToFeatureClass_conversion", "os.path.join", "arcpy.Buffer_analysis", "arcpy.da.UpdateCursor" ]
[((251, 451), 'arcpy.Buffer_analysis', 'arcpy.Buffer_analysis', (['"""Nhoods"""', '"""nhood_buffers"""'], {'buffer_distance_or_field': '"""100 Feet"""', 'line_side': '"""FULL"""', 'line_end_type': '"""ROUND"""', 'dissolve_option': '"""LIST"""', 'dissolve_field': '"""Name"""', 'method': '"""PLANAR"""'}), "('Nhoods', 'nh...
from ptrlib import * import re import time def create(name): sock.recvuntil("> ") sock.sendline("1") sock.sendline(name) def add(index, value): sock.recvuntil("> ") sock.sendline("2") sock.sendline(str(index)) sock.sendline(str(value)) def view(index, pos): sock.recvuntil("> ") so...
[ "re.findall" ]
[((465, 507), 're.findall', 're.findall', (["b'(.+)\\\\[(.+)\\\\] = (.+)'", 'line'], {}), "(b'(.+)\\\\[(.+)\\\\] = (.+)', line)\n", (475, 507), False, 'import re\n')]
# coding: utf-8 """ PKS PKS API # noqa: E501 OpenAPI spec version: 1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # python 2 and python 3 compatibility library import six from container_service_extension.lib.pksclient.api_cl...
[ "six.iteritems", "container_service_extension.lib.pksclient.api_client.ApiClient" ]
[((2560, 2591), 'six.iteritems', 'six.iteritems', (["params['kwargs']"], {}), "(params['kwargs'])\n", (2573, 2591), False, 'import six\n'), ((6353, 6384), 'six.iteritems', 'six.iteritems', (["params['kwargs']"], {}), "(params['kwargs'])\n", (6366, 6384), False, 'import six\n'), ((10119, 10150), 'six.iteritems', 'six.it...
import os import pytest import pandas as pd import numpy as np from shclassify.utils import (inverse_logit, choose_from_multinomial_probs, choose_from_binary_probs) def test_inverse_logit(): assert inverse_logit(0) == 0.5 def test_choose_from_multinomia...
[ "shclassify.utils.choose_from_multinomial_probs", "shclassify.utils.inverse_logit", "pytest.raises", "numpy.random.uniform", "shclassify.utils.choose_from_binary_probs" ]
[((489, 522), 'shclassify.utils.choose_from_multinomial_probs', 'choose_from_multinomial_probs', (['df'], {}), '(df)\n', (518, 522), False, 'from shclassify.utils import inverse_logit, choose_from_multinomial_probs, choose_from_binary_probs\n'), ((1242, 1287), 'shclassify.utils.choose_from_binary_probs', 'choose_from_b...
"""Module used polling SNMP enabled targets.""" import sys # PIP3 imports import easysnmp from easysnmp import exceptions # Import Pattoo libraries from pattoo_shared import log from pattoo_shared.variables import DataPoint from pattoo_shared.constants import ( DATA_INT, DATA_COUNT64, DATA_COUNT, DATA_STRING, DA...
[ "pattoo_shared.log.log2die", "pattoo_shared.variables.DataPoint", "pattoo_shared.log.log2see", "pattoo_agents.snmp.oid.OIDstring", "sys.exc_info", "easysnmp.Session" ]
[((17306, 17337), 'pattoo_shared.log.log2die', 'log.log2die', (['(51569)', 'log_message'], {}), '(51569, log_message)\n', (17317, 17337), False, 'from pattoo_shared import log\n'), ((7759, 7790), 'pattoo_agents.snmp.oid.OIDstring', 'class_oid.OIDstring', (['oid_to_get'], {}), '(oid_to_get)\n', (7778, 7790), True, 'from...
""" Ref: https://dacon.io/competitions/official/235673/talkboard/401911?page=1&dtype=recent """ import os import re import platform import itertools import collections import pkg_resources # pip install py-rouge from io import open if platform.system() == "Windows": try: from eunjeon import Mecab exc...
[ "platform.system", "collections.defaultdict", "eunjeon.Mecab", "re.compile" ]
[((238, 255), 'platform.system', 'platform.system', ([], {}), '()\n', (253, 255), False, 'import platform\n'), ((658, 687), 're.compile', 're.compile', (['"""[^A-Za-z0-9가-힣]"""'], {}), "('[^A-Za-z0-9가-힣]')\n", (668, 687), False, 'import re\n'), ((2691, 2719), 'collections.defaultdict', 'collections.defaultdict', (['int...
from django.contrib import admin from .. import models @admin.register(models.Contest) class ContestAdmin(admin.ModelAdmin): """ 대회관리 """ list_display = ['contest_name', 'start_time', 'end_time', 'message', 'host_email', 'after_open'] class Meta: model = models.Contest @admin.register(...
[ "django.contrib.admin.register" ]
[((59, 89), 'django.contrib.admin.register', 'admin.register', (['models.Contest'], {}), '(models.Contest)\n', (73, 89), False, 'from django.contrib import admin\n'), ((305, 342), 'django.contrib.admin.register', 'admin.register', (['models.ContestProblem'], {}), '(models.ContestProblem)\n', (319, 342), False, 'from dj...
import logging import predix.admin.cf.api import predix.admin.cf.orgs import predix.admin.cf.apps import predix.admin.cf.services class Space(object): """ Operations and data for Cloud Foundry Spaces. """ def __init__(self, *args, **kwargs): super(Space, self).__init__(*args, **kwargs) ...
[ "logging.warn" ]
[((4573, 4635), 'logging.warn', 'logging.warn', (["('Purging all services from space %s' % self.name)"], {}), "('Purging all services from space %s' % self.name)\n", (4585, 4635), False, 'import logging\n')]
import logging from fastapi import APIRouter from starlette import status from api.endpoints.dependencies.tenant_security import get_from_context from api.endpoints.models.v1.tenant import TenantGetResponse from api.services.v1 import tenant_service router = APIRouter() logger = logging.getLogger(__name__) @rou...
[ "logging.getLogger", "api.endpoints.dependencies.tenant_security.get_from_context", "api.services.v1.tenant_service.make_issuer", "fastapi.APIRouter", "api.endpoints.models.v1.tenant.TenantGetResponse" ]
[((265, 276), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (274, 276), False, 'from fastapi import APIRouter\n'), ((286, 313), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (303, 313), False, 'import logging\n'), ((661, 697), 'api.endpoints.dependencies.tenant_security.get_from_co...
import numpy as np from scipy import interpolate, signal from scipy.special import gamma import ndmath import warnings import pkg_resources class PlaningBoat(): """Prismatic planing craft Attributes: speed (float): Speed (m/s). It is an input to :class:`PlaningBoat`. weight (float): Weigh...
[ "numpy.log10", "numpy.sqrt", "ndmath.complexGrad", "numpy.column_stack", "scipy.interpolate.interp1d", "numpy.array", "numpy.sin", "numpy.genfromtxt", "scipy.interpolate.interp2d", "ndmath.nDimNewton", "scipy.signal.step", "numpy.multiply", "numpy.exp", "numpy.real", "numpy.polyval", "...
[((10728, 10758), 'numpy.array', 'np.array', (['[0, -self.weight, 0]'], {}), '([0, -self.weight, 0])\n', (10736, 10758), True, 'import numpy as np\n'), ((33506, 33544), 'numpy.array', 'np.array', (['[[-np.Inf, np.Inf], tauLims]'], {}), '([[-np.Inf, np.Inf], tauLims])\n', (33514, 33544), True, 'import numpy as np\n'), (...
# -*- coding: utf-8 -*- """ Created on Tue Oct 6 09:54:17 2015 @author: jmilli """ import numpy as np from scipy.interpolate import interp1d def create2dMap(values,inputRadii=None,maxRadius=None): """ This function takes a 1D radial distribution in input and builds a 2map """ nbValues=len(values) ...
[ "numpy.meshgrid", "numpy.isfinite", "numpy.arange", "scipy.interpolate.interp1d" ]
[((533, 573), 'numpy.arange', 'np.arange', (['(-maxRadius / 2)', '(maxRadius / 2)'], {}), '(-maxRadius / 2, maxRadius / 2)\n', (542, 573), True, 'import numpy as np\n'), ((579, 612), 'numpy.meshgrid', 'np.meshgrid', (['imageAxis', 'imageAxis'], {}), '(imageAxis, imageAxis)\n', (590, 612), True, 'import numpy as np\n'),...
# Copyright 2018 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...
[ "tensorflow.compat.v1.logging.warn", "tensorflow.python.eager.profiler.stop", "tensorflow.python.eager.profiler.save", "tensorflow.python.eager.profiler.start", "time.time", "tensorflow.compat.v1.logging.info" ]
[((1916, 1927), 'time.time', 'time.time', ([], {}), '()\n', (1925, 1927), False, 'import time\n'), ((3456, 3704), 'tensorflow.compat.v1.logging.warn', 'tf.compat.v1.logging.warn', (['"""Both TensorBoard and profiler callbacks are used. Note that the TensorBoard callback profiles the 2nd step (unless otherwise specified...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "googlecloudsdk.api_lib.sql.errors.OperationError", "googlecloudsdk.core.console.progress_tracker.ProgressTracker", "googlecloudsdk.core.util.retry.Retryer", "time.sleep" ]
[((2574, 2639), 'googlecloudsdk.core.console.progress_tracker.ProgressTracker', 'console_progress_tracker.ProgressTracker', (['message'], {'autotick': '(False)'}), '(message, autotick=False)\n', (2614, 2639), True, 'from googlecloudsdk.core.console import progress_tracker as console_progress_tracker\n'), ((2662, 2710),...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Marshmallow loader for record deserialization. Use marshmallow schema to transfor...
[ "flask.request.get_json", "json.dumps", "flask.request.view_args.get" ]
[((2862, 2890), 'flask.request.get_json', 'request.get_json', ([], {'force': '(True)'}), '(force=True)\n', (2878, 2890), False, 'from flask import request\n'), ((2202, 2218), 'json.dumps', 'json.dumps', (['body'], {}), '(body)\n', (2212, 2218), False, 'import json\n'), ((2353, 2371), 'flask.request.get_json', 'request....
#!/usr/bin/env python # coding: utf-8 # vim: set ts=4 sw=4 expandtab sts=4: # Copyright (c) 2011-2013 <NAME> & contributors # # 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 restricti...
[ "os.path.exists", "logging.debug", "pycarddav.carddav.PyCardDAV", "pycarddav.ui.start_pane", "pycarddav.model.cards_from_file", "sys.exit", "pycarddav.ui.VCardChooserPane", "pycarddav.backend.SQLiteDb" ]
[((1715, 1777), 'pycarddav.backend.SQLiteDb', 'backend.SQLiteDb', (['conf.sqlite__path', '"""utf-8"""', '"""stricts"""', '(False)'], {}), "(conf.sqlite__path, 'utf-8', 'stricts', False)\n", (1731, 1777), False, 'from pycarddav import backend\n'), ((4173, 4345), 'pycarddav.carddav.PyCardDAV', 'carddav.PyCardDAV', (['con...
import re from flask_restful import Resource, reqparse acceptedCreditCards = { "visa": r"/^4[0-9]{12}(?:[0-9]{3})?$/", "mastercard": r"/^5[1-5][0-9]{14}$|^2(?:2(?:2[1-9]|[3-9][0-9])|[3-6][0-9][0-9]|7(?:[01][0-9]|20))[0-9]{12}$/", "amex": r"/^3[47][0-9]{13}$/", "discover": r"/^65[4-9][0-9]{13}|64[4-9][0-9]{13}|...
[ "re.match", "flask_restful.reqparse.RequestParser" ]
[((678, 718), 're.match', 're.match', (['card_number', 'card_number_regex'], {}), '(card_number, card_number_regex)\n', (686, 718), False, 'import re\n'), ((1415, 1441), 're.match', 're.match', (['regex_name', 'name'], {}), '(regex_name, name)\n', (1423, 1441), False, 'import re\n'), ((1882, 1908), 're.match', 're.matc...
import asyncio import unittest from asyncio import ( gather, sleep, ) from unittest.mock import ( AsyncMock, call, ) from uuid import ( uuid4, ) import aiopg from minos.common import ( NotProvidedException, ) from minos.common.testing import ( PostgresAsyncTestCase, ) from minos.networks i...
[ "minos.networks.BrokerPublisher.from_config", "minos.networks.BrokerProducer.from_config", "unittest.mock.AsyncMock", "minos.networks.BrokerConsumer.from_config", "uuid.uuid4", "asyncio.sleep", "unittest.main", "tests.utils.FakeModel", "aiopg.connect" ]
[((7562, 7577), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7575, 7577), False, 'import unittest\n'), ((678, 717), 'minos.networks.BrokerConsumer.from_config', 'BrokerConsumer.from_config', (['self.config'], {}), '(self.config)\n', (704, 717), False, 'from minos.networks import BrokerConsumer, BrokerMessageSta...
# -*- coding: utf-8 -*- """ Highcharts Demos Donut chart: http://www.highcharts.com/demo/pie-donut """ from highcharts import Highchart H = Highchart(width = 850, height = 400) data = [{ 'y': 55.11, 'color': 'Highcharts.getOptions().colors[0]', 'drilldown': { 'name'...
[ "highcharts.Highchart" ]
[((141, 173), 'highcharts.Highchart', 'Highchart', ([], {'width': '(850)', 'height': '(400)'}), '(width=850, height=400)\n', (150, 173), False, 'from highcharts import Highchart\n')]
import discord import os import asyncio from discord.ext import commands from random import randint from cogs.libs import Settings from cogs.libs import Utils class Messages(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_message(self, message): ...
[ "discord.ext.commands.Cog.listener" ]
[((248, 271), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (269, 271), False, 'from discord.ext import commands\n')]
import argparse import multiprocessing import random import time import torch.optim as optim from auto_LiRPA.eps_scheduler import LinearScheduler, AdaptiveScheduler, SmoothedScheduler, FixedScheduler from auto_LiRPA.perturbations import * from auto_LiRPA.utils import MultiAverageMeter from torch.nn import CrossEntropy...
[ "torch.nn.CrossEntropyLoss", "argparse.ArgumentParser", "pointnet.model.PointNet", "auto_LiRPA.eps_scheduler.FixedScheduler", "torch.optim.lr_scheduler.StepLR", "random.seed", "data_processing.datasets.modelnet40", "auto_LiRPA.BoundedModule", "auto_LiRPA.BoundedTensor", "torch.utils.data.DataLoade...
[((682, 707), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (705, 707), False, 'import argparse\n'), ((2762, 2781), 'auto_LiRPA.utils.MultiAverageMeter', 'MultiAverageMeter', ([], {}), '()\n', (2779, 2781), False, 'from auto_LiRPA.utils import MultiAverageMeter\n'), ((7264, 7286), 'random.seed...
# !/usr/bin/env python # Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # # Modified by <NAME> on 20 April 2020 import argparse import datetime impo...
[ "numpy.dtype", "pygame.font.get_fonts", "numpy.reshape", "argparse.ArgumentParser", "pygame.event.get", "carla.WeatherParameters", "pygame.font.match_font", "math.radians", "math.cos", "numpy.array", "numpy.dot", "pdb.set_trace", "numpy.linalg.norm", "numpy.finfo", "pygame.font.Font", ...
[((2198, 2292), 'numpy.array', 'np.array', (['[target_location.x - current_location.x, target_location.y - current_location.y\n ]'], {}), '([target_location.x - current_location.x, target_location.y -\n current_location.y])\n', (2206, 2292), True, 'import numpy as np\n'), ((2307, 2336), 'numpy.linalg.norm', 'np.l...
import SpiceInterface import TestUtilities # create the test utility object test_utilities_obj = TestUtilities.TestUtilities() test_utilities_obj.netlist_generation('bandgap_opamp_test_op.sch', 'rundir') # create the spice interface spice_interface_obj = SpiceInterface.SpiceInterface(netlist_path="rundir/bandgap_opa...
[ "SpiceInterface.SpiceInterface", "TestUtilities.TestUtilities" ]
[((99, 128), 'TestUtilities.TestUtilities', 'TestUtilities.TestUtilities', ([], {}), '()\n', (126, 128), False, 'import TestUtilities\n'), ((258, 343), 'SpiceInterface.SpiceInterface', 'SpiceInterface.SpiceInterface', ([], {'netlist_path': '"""rundir/bandgap_opamp_test_op.spice"""'}), "(netlist_path='rundir/bandgap_opa...
# fa19-516-170 E.Cloudmesh.Common.2 from cloudmesh.common.dotdict import dotdict color = {"red": 255, "blue": 255, "green": 255, "alpha": 0} color = dotdict(color) print("A RGB color: ", color.red, color.blue, color.green, color.alpha)
[ "cloudmesh.common.dotdict.dotdict" ]
[((151, 165), 'cloudmesh.common.dotdict.dotdict', 'dotdict', (['color'], {}), '(color)\n', (158, 165), False, 'from cloudmesh.common.dotdict import dotdict\n')]
''' 对windows的注册表进行操作 _open_key: 返回key _read_key_value:读取key下一个value的值和类型 _save_key_value:以某种类型的方式,把值保存到某个key中 read_PATH_value:读取环境变量PATH的值 append_value_in_PATH:为PATH添加一个值 del_value_in_PATH:从PATH中删除一个值 check_key_value_exists(key,value_name):检查某个key小,value_name是否存在 create_value(key,value_name,value_type,value): 直接调用_sav...
[ "winreg.CloseKey", "winreg.QueryValueEx", "winreg.OpenKey", "winreg.DeleteValue", "winreg.EnumValue", "winreg.SetValueEx", "winreg.QueryInfoKey" ]
[((1481, 1517), 'winreg.QueryValueEx', 'winreg.QueryValueEx', (['key', 'value_name'], {}), '(key, value_name)\n', (1500, 1517), False, 'import winreg\n'), ((1689, 1745), 'winreg.SetValueEx', 'winreg.SetValueEx', (['key', 'value_name', '(0)', 'value_type', 'value'], {}), '(key, value_name, 0, value_type, value)\n', (170...
import warnings from collections.abc import Iterable from collections import OrderedDict import torch import numpy as np from torch.utils.data import Dataset from deep_staple.utils.torch_utils import interpolate_sample, augmentNoise, spatial_augment, torch_manual_seeded, ensure_dense from deep_staple.utils.common_uti...
[ "torch.utils.data._utils.collate.default_collate", "deep_staple.utils.torch_utils.ensure_dense", "torch.load", "torch.max", "deep_staple.utils.torch_utils.augmentNoise", "torch.tensor", "numpy.quantile", "numpy.linspace", "deep_staple.utils.torch_utils.interpolate_sample", "deep_staple.utils.torch...
[((14231, 14259), 'deep_staple.utils.torch_utils.ensure_dense', 'ensure_dense', (['modified_label'], {}), '(modified_label)\n', (14243, 14259), False, 'from deep_staple.utils.torch_utils import interpolate_sample, augmentNoise, spatial_augment, torch_manual_seeded, ensure_dense\n'), ((22241, 22287), 'deep_staple.utils....
# -*- coding: UTF-8 -*- from base_plugin import SimpleCommandPlugin from plugins.core.player_manager_plugin import permissions, UserLevels from utility_functions import build_packet, move_ship_to_coords, extract_name from packets import ( Packets, WarpAliasType, WarpWorldType, WarpActionType, player...
[ "utility_functions.move_ship_to_coords", "plugins.core.player_manager_plugin.permissions", "utility_functions.extract_name", "packets.player_warp_toplayer_write", "packets.player_warp_toworld_write", "packets.player_warp_toalias_write" ]
[((885, 918), 'plugins.core.player_manager_plugin.permissions', 'permissions', (['UserLevels.MODERATOR'], {}), '(UserLevels.MODERATOR)\n', (896, 918), False, 'from plugins.core.player_manager_plugin import permissions, UserLevels\n'), ((1677, 1706), 'plugins.core.player_manager_plugin.permissions', 'permissions', (['Us...
#!/usr/bin/env python # Copyright (c) 2018, 2019, 2020 Pure Storage, Inc. # # * Overview # # This short Nagios/Icinga plugin code shows how to build a simple plugin to monitor Pure Storage FlashArrays. # The Pure Storage Python REST Client is used to query the FlashArray. # # * Installation # # The script should be co...
[ "logging.getLogger", "argparse.ArgumentParser", "logging.Formatter", "nagiosplugin.Metric", "purestorage.FlashArray", "urllib3.disable_warnings", "nagiosplugin.ScalarContext", "logging.handlers.SysLogHandler" ]
[((3546, 3571), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3569, 3571), False, 'import argparse\n'), ((2157, 2185), 'logging.getLogger', 'logging.getLogger', (['self.name'], {}), '(self.name)\n', (2174, 2185), False, 'import logging\n'), ((2204, 2254), 'logging.handlers.SysLogHandler', 'lo...
from __future__ import annotations from argparse import ArgumentParser from collections import deque import numpy as np def count_lte(mat: np.ndarray) -> np.ndarray: """ lte[i,j] = count (neighbours <= mat[i,j]) . t . l . r . b . """ aug = np.pad(mat.astype(float), (1, 1), mode="constant...
[ "numpy.product", "collections.deque", "argparse.ArgumentParser", "numpy.where", "matplotlib.colors.ListedColormap", "numpy.sum", "numpy.linspace", "matplotlib.pyplot.scatter", "numpy.zeros_like", "matplotlib.pyplot.show" ]
[((544, 568), 'numpy.sum', 'np.sum', (['(1 + xs[lte == 0])'], {}), '(1 + xs[lte == 0])\n', (550, 568), True, 'import numpy as np\n'), ((787, 794), 'collections.deque', 'deque', ([], {}), '()\n', (792, 794), False, 'from collections import deque\n'), ((1510, 1529), 'numpy.product', 'np.product', (['top[:3]'], {}), '(top...
import numpy as np import tensorflow as tf def split_reim(array): """Split a complex valued matrix into its real and imaginary parts. Args: array(complex): An array of shape (batch_size, N, N) or (batch_size, N, N, 1) Returns: split_array(float): An array of shape (batch_size, N, N, 2) conta...
[ "tensorflow.math.imag", "numpy.real", "numpy.stack", "tensorflow.concat", "tensorflow.math.real", "tensorflow.cast", "numpy.imag", "tensorflow.stack" ]
[((417, 431), 'numpy.real', 'np.real', (['array'], {}), '(array)\n', (424, 431), True, 'import numpy as np\n'), ((443, 457), 'numpy.imag', 'np.imag', (['array'], {}), '(array)\n', (450, 457), True, 'import numpy as np\n'), ((476, 506), 'numpy.stack', 'np.stack', (['(real, imag)'], {'axis': '(3)'}), '((real, imag), axis...
#!/usr/bin/env python ''' modify camera parameters using v4l ''' import os # change /dev/video6 resolution #os.system('v4l2-ctl -d /dev/video6 -v width=640,height=480') os.system('v4l2-ctl -d /dev/video6 -v width=160,height=120')
[ "os.system" ]
[((172, 232), 'os.system', 'os.system', (['"""v4l2-ctl -d /dev/video6 -v width=160,height=120"""'], {}), "('v4l2-ctl -d /dev/video6 -v width=160,height=120')\n", (181, 232), False, 'import os\n')]
# /bin/env python # coding: utf-8 from __future__ import print_function import sys import argparse import logging import os import math import cv2 import numpy as np class GenerateSyntheticData: import PythonMagick as Magick def __init__(self, logger=None): if logger == None: logging.b...
[ "logging.basicConfig", "logging.getLogger", "cv2.__version__.split", "numpy.random.normal", "cv2.imwrite", "argparse.ArgumentParser", "os.path.isfile", "numpy.random.uniform", "argparse.Namespace", "cv2.VideoCapture", "cv2.VideoWriter_fourcc", "sys.exit", "cv2.imread", "numpy.random.binomi...
[((23128, 23153), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (23151, 23153), False, 'import argparse\n'), ((23668, 23728), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'level': 'args.log_level'}), '(stream=sys.stdout, level=args.log_level)\n', (23687, 23728), ...
from service_objects import services import numpy as np import pandas as pd from django.db import connection import datetime from front.models import Match, Match_Stats, Player, Tourney, Tourney_Level, Surface class IngestMatchesService(services.Service): def process(self): cursor = connection.cursor() ...
[ "front.models.Tourney_Level.objects.filter", "pandas.isnull", "front.models.Match.objects.filter", "front.models.Surface", "front.models.Tourney_Level", "datetime.datetime.now", "front.models.Match_Stats.objects.filter", "front.models.Player.objects.filter", "django.db.connection.cursor", "numpy.i...
[((299, 318), 'django.db.connection.cursor', 'connection.cursor', ([], {}), '()\n', (316, 318), False, 'from django.db import connection\n'), ((9006, 9034), 'front.models.Player.objects.filter', 'Player.objects.filter', ([], {'id': 'id'}), '(id=id)\n', (9027, 9034), False, 'from front.models import Match, Match_Stats, ...
import subprocess import secrets import getpass import os import requests import urllib.parse import time from google.colab import files, drive, auth from google.cloud import storage import glob def connect(LOG_DIR = '/log/fit'): print('It may take a few seconds for processing. Please wait.') root_password = s...
[ "google.cloud.storage.Client", "os.path.exists", "os.listdir", "os.makedirs", "google.colab.drive.mount", "pathlib.Path", "secrets.token_urlsafe", "google.colab.files.upload", "time.sleep", "getpass.getpass", "os.chdir", "google.colab.auth.authenticate_user", "requests.get", "os.path.join"...
[((319, 342), 'secrets.token_urlsafe', 'secrets.token_urlsafe', ([], {}), '()\n', (340, 342), False, 'import secrets\n'), ((347, 396), 'subprocess.call', 'subprocess.call', (['"""apt-get update -qq"""'], {'shell': '(True)'}), "('apt-get update -qq', shell=True)\n", (362, 396), False, 'import subprocess\n'), ((401, 512)...
# -*- coding: utf-8 -*- import pymysql import json def countNum(table): # 打开数据库连接 db = pymysql.connect("cd-cdb-6sbfm2hw.sql.tencentcdb.com", "root", "Mrsnow@0", "spider") # 使用cursor()方法创建一个可以执行SQL语句的游标对象cursor cursor = db.cursor() sql = "SELECT COUNT(*) FROM" + table + "WHERE text like '%川大%'" ...
[ "pymysql.connect" ]
[((97, 184), 'pymysql.connect', 'pymysql.connect', (['"""cd-cdb-6sbfm2hw.sql.tencentcdb.com"""', '"""root"""', '"""Mrsnow@0"""', '"""spider"""'], {}), "('cd-cdb-6sbfm2hw.sql.tencentcdb.com', 'root', 'Mrsnow@0',\n 'spider')\n", (112, 184), False, 'import pymysql\n')]
import pytest import sys import ray from ray._private.test_utils import wait_for_condition def test_list_named_actors_basic(ray_start_regular): @ray.remote class A: pass a = A.remote() assert not ray.util.list_named_actors() a = A.options(name="hi").remote() assert len(ray.util.list...
[ "os.environ.get", "ray.util.list_named_actors", "pytest.main", "pytest.mark.parametrize", "ray._private.test_utils.wait_for_condition" ]
[((802, 889), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""ray_start_regular"""', "[{'local_mode': True}]"], {'indirect': '(True)'}), "('ray_start_regular', [{'local_mode': True}],\n indirect=True)\n", (825, 889), False, 'import pytest\n'), ((693, 722), 'ray._private.test_utils.wait_for_condition', 'w...
"""Main/example start-up script for the pyjobserver Use this as a guide if importing pyjobserver into another app instead """ # Built-Ins: import asyncio from logging import getLogger, Logger import os from pathlib import Path # External Dependencies: from aiohttp import web import click from dotenv import load_dote...
[ "logging.getLogger", "pathlib.Path", "click.option", "asyncio.get_event_loop", "aiohttp.web.Application", "aiohttp.web.AppRunner", "os.getcwd", "aiohttp.web.TCPSite", "aiohttp.web.json_response", "click.command" ]
[((2190, 2205), 'click.command', 'click.command', ([], {}), '()\n', (2203, 2205), False, 'import click\n'), ((2207, 2327), 'click.option', 'click.option', (['"""--manifest"""'], {'default': '""""""', 'help': '"""Location of (optional) manifest file relative to current working dir"""'}), "('--manifest', default='', help...
""" Provide function to load a wasm module into the current process. Note that for this to work, we require compiled wasm code and a runtime. The wasm runtime contains the following: - Implement function like sqrt, floor, bit rotations etc.. """ import os import abc import shelve import io import struct import logg...
[ "logging.getLogger", "os.path.exists", "types.ModuleType", "struct.pack", "shelve.open", "io.StringIO" ]
[((753, 785), 'logging.getLogger', 'logging.getLogger', (['"""instantiate"""'], {}), "('instantiate')\n", (770, 785), False, 'import logging\n'), ((5364, 5377), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (5375, 5377), False, 'import io\n'), ((5522, 5539), 'types.ModuleType', 'ModuleType', (['"""gen"""'], {}), "('g...
import numpy as np import cv2 import os from matplotlib import pyplot as plt #### INPUT #### # folder that contains datapoints folderName = '2dIR' #### SETTINGS #### # settings listed below are suitable for 2D data # intensity of noise filtering; higher values mean more blurring medianKernel = 5 # bl...
[ "matplotlib.pyplot.ylabel", "numpy.ascontiguousarray", "numpy.genfromtxt", "os.listdir", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.sort", "cv2.medianBlur", "numpy.amin", "numpy.average", "numpy.argmax", "cv2.putText", "numpy.isnan", "numpy.savetxt", "numpy.std", "cv2...
[((11748, 11777), 'os.listdir', 'os.listdir', (["(folderName + '/.')"], {}), "(folderName + '/.')\n", (11758, 11777), False, 'import os\n'), ((13133, 13182), 'numpy.savetxt', 'np.savetxt', (['"""results.txt"""', 'results'], {'delimiter': '""","""'}), "('results.txt', results, delimiter=',')\n", (13143, 13182), True, 'i...
from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg from kivy.app import App from kivy.uix.boxlayout import BoxLayout import matplotlib.pyplot as plt plt.plot([1, 23, 2, 4]) plt.ylabel('some numbers') class MyApp(App): def build(self): box = BoxLayout() box.add_widget(FigureCan...
[ "matplotlib.pyplot.gcf", "matplotlib.pyplot.plot", "kivy.uix.boxlayout.BoxLayout", "matplotlib.pyplot.ylabel" ]
[((170, 193), 'matplotlib.pyplot.plot', 'plt.plot', (['[1, 23, 2, 4]'], {}), '([1, 23, 2, 4])\n', (178, 193), True, 'import matplotlib.pyplot as plt\n'), ((194, 220), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""some numbers"""'], {}), "('some numbers')\n", (204, 220), True, 'import matplotlib.pyplot as plt\n'), ((2...
import os import random from tqdm import tqdm from collections import defaultdict from data_genie.data_genie_config import * from data_genie.data_genie_utils import TRAINING_DATA_PATH, CACHED_KENDALL_TAU_PATH, load_obj, save_obj from data_genie.data_genie_utils import count_performance_retained, get_best_results from...
[ "os.path.exists", "data_genie.data_genie_utils.count_performance_retained", "random.shuffle", "data_genie.data_genie_utils.get_best_results", "data_genie.data_genie_utils.load_obj", "data_genie.data_genie_utils.TRAINING_DATA_PATH", "collections.defaultdict", "data_genie.data_genie_utils.CACHED_KENDALL...
[((380, 420), 'data_genie.data_genie_utils.TRAINING_DATA_PATH', 'TRAINING_DATA_PATH', (['dataset', '"""pointwise"""'], {}), "(dataset, 'pointwise')\n", (398, 420), False, 'from data_genie.data_genie_utils import TRAINING_DATA_PATH, CACHED_KENDALL_TAU_PATH, load_obj, save_obj\n'), ((487, 501), 'data_genie.data_genie_uti...
import numpy as np from matplotlib import pyplot as plt from env import DrivingEnv from solvers import GridSolver, SampleGraphSolver def time_compare(seed=1234, min_sample=10, max_sample=50, count=10): sample_count = np.linspace(min_sample, max_sample, count).astype(int) grid_times = [] graph_times = [] ...
[ "matplotlib.pyplot.semilogy", "env.DrivingEnv", "solvers.SampleGraphSolver", "numpy.mean", "numpy.sqrt", "matplotlib.pyplot.ylabel", "solvers.GridSolver", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.figure", "numpy.linspace", "matplotlib.pyplot.title", "numpy.logspace", "matplotlib.pyplot...
[((650, 662), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (660, 662), True, 'from matplotlib import pyplot as plt\n'), ((667, 725), 'matplotlib.pyplot.semilogy', 'plt.semilogy', (['sample_count', 'grid_times'], {'label': '"""Grid-based"""'}), "(sample_count, grid_times, label='Grid-based')\n", (679, 725...
import cherrypy, cherrypy_cors, os import tca_ng.example_maps import tca_ng.models import random class TCAServer(object): @cherrypy.expose @cherrypy.tools.json_out() def start(self): self.automaton = tca_ng.models.Automaton() self.automaton.topology = tca_ng.example_maps.simple_map(10...
[ "cherrypy.tools.json_out", "random.choice", "cherrypy_cors.install", "os.path.dirname", "random.randint" ]
[((155, 180), 'cherrypy.tools.json_out', 'cherrypy.tools.json_out', ([], {}), '()\n', (178, 180), False, 'import cherrypy, cherrypy_cors, os\n'), ((404, 429), 'cherrypy.tools.json_out', 'cherrypy.tools.json_out', ([], {}), '()\n', (427, 429), False, 'import cherrypy, cherrypy_cors, os\n'), ((1154, 1179), 'os.path.dirna...
from rest_framework import viewsets from api.serializers import LabelSerializer, ItemSerializer from api.models import Label, Item class LabelViewSet(viewsets.ModelViewSet): """ API endpoint that allows labels to be viewed or edited. """ queryset = Label.objects.all().order_by('name') serializer_...
[ "api.models.Label.objects.all", "api.models.Item.objects.all" ]
[((268, 287), 'api.models.Label.objects.all', 'Label.objects.all', ([], {}), '()\n', (285, 287), False, 'from api.models import Label, Item\n'), ((478, 496), 'api.models.Item.objects.all', 'Item.objects.all', ([], {}), '()\n', (494, 496), False, 'from api.models import Label, Item\n')]
import numpy as np import math from scipy.stats import truncnorm class ElectricMotor: """ Base class for all technical electrical motor models. A motor consists of the ode-state. These are the dynamic quantities of its ODE. For example: ODE-State of a DC-shunt motor...
[ "numpy.abs", "numpy.sqrt", "numpy.random.random_sample", "numpy.asarray", "math.cos", "numpy.array", "numpy.matmul", "math.sin", "numpy.zeros_like", "numpy.atleast_1d" ]
[((18618, 18695), 'numpy.array', 'np.array', (["[[-mp['r_a'], 0, -mp['l_e_prime'], 1, 0], [0, -mp['r_e'], 0, 0, 1]]"], {}), "([[-mp['r_a'], 0, -mp['l_e_prime'], 1, 0], [0, -mp['r_e'], 0, 0, 1]])\n", (18626, 18695), True, 'import numpy as np\n'), ((29603, 29660), 'numpy.array', 'np.array', (["[[-mp['r_a'] - mp['r_e'], -...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Voting system core service :author: <NAME> :license: Apache Software License 2.0 :version: 1.1.0 .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the...
[ "logging.getLogger", "pelix.ipopo.decorators.Provides", "pelix.ipopo.decorators.ComponentFactory", "pelix.ipopo.decorators.Instantiate", "cohorte.vote.beans.Ballot", "pelix.ipopo.decorators.Requires", "cohorte.vote.beans.VoteResults" ]
[((1231, 1258), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1248, 1258), False, 'import logging\n'), ((1344, 1362), 'pelix.ipopo.decorators.ComponentFactory', 'ComponentFactory', ([], {}), '()\n', (1360, 1362), False, 'from pelix.ipopo.decorators import ComponentFactory, Provides, Req...
import socket from ast import literal_eval import Yetiborg.Drive as Yetiborg HEADERSIZE = 2 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("localhost", 12345)) # 192.168.0.11 / localhost / 192.168.0.108 # car always looks up at the beginning car = Yetiborg.Yetiborg((0, 1)) """ fs: finished "...
[ "ast.literal_eval", "Yetiborg.Drive.Yetiborg", "socket.socket" ]
[((98, 147), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (111, 147), False, 'import socket\n'), ((271, 296), 'Yetiborg.Drive.Yetiborg', 'Yetiborg.Yetiborg', (['(0, 1)'], {}), '((0, 1))\n', (288, 296), True, 'import Yetiborg.Drive as Yetibor...
# 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 writing, softw...
[ "json.load", "os.path.dirname", "os.path.join" ]
[((3425, 3446), 'os.path.dirname', 'os.path.dirname', (['path'], {}), '(path)\n', (3440, 3446), False, 'import os\n'), ((3332, 3344), 'json.load', 'json.load', (['f'], {}), '(f)\n', (3341, 3344), False, 'import json\n'), ((3867, 3895), 'os.path.join', 'os.path.join', (['parentDir', 'uri'], {}), '(parentDir, uri)\n', (3...
import pdfkit import boto3 s3 = boto3.client('s3') def lambda_handler(event, context): pdfkit.from_url('http://google.com', '/tmp/out.pdf') with open('/tmp/out.pdf', 'rb') as f: response = s3.put_object( Bucket='temp-awseabsgddev', Key='juni/google.pdf', Body=f.re...
[ "boto3.client", "pdfkit.from_url" ]
[((33, 51), 'boto3.client', 'boto3.client', (['"""s3"""'], {}), "('s3')\n", (45, 51), False, 'import boto3\n'), ((94, 146), 'pdfkit.from_url', 'pdfkit.from_url', (['"""http://google.com"""', '"""/tmp/out.pdf"""'], {}), "('http://google.com', '/tmp/out.pdf')\n", (109, 146), False, 'import pdfkit\n')]
import pytest import torch from packaging.version import parse as V from torch_complex import ComplexTensor from espnet2.enh.layers.complex_utils import is_complex from espnet2.enh.separator.dc_crn_separator import DC_CRNSeparator is_torch_1_9_plus = V(torch.__version__) >= V("1.9.0") @pytest.mark.parametrize("inpu...
[ "torch_complex.ComplexTensor", "pytest.mark.parametrize", "torch.tensor", "pytest.raises", "torch.complex", "espnet2.enh.separator.dc_crn_separator.DC_CRNSeparator", "packaging.version.parse", "espnet2.enh.layers.complex_utils.is_complex", "torch.rand" ]
[((291, 337), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""input_dim"""', '[33, 65]'], {}), "('input_dim', [33, 65])\n", (314, 337), False, 'import pytest\n'), ((339, 381), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""num_spk"""', '[1, 2]'], {}), "('num_spk', [1, 2])\n", (362, 381), False,...
from django.conf.urls import url from usaspending_api.download.v2 import views urlpatterns = [ url(r'^awards', views.RowLimitedAwardDownloadViewSet.as_view()), url(r'^accounts', views.AccountDownloadViewSet.as_view()), # url(r'^columns', views.DownloadColumnsViewSet.as_view()), url(r'^status', views....
[ "usaspending_api.download.v2.views.RowLimitedAwardDownloadViewSet.as_view", "usaspending_api.download.v2.views.AccountDownloadViewSet.as_view", "usaspending_api.download.v2.views.RowLimitedTransactionDownloadViewSet.as_view", "usaspending_api.download.v2.views.DownloadStatusViewSet.as_view", "usaspending_ap...
[((118, 164), 'usaspending_api.download.v2.views.RowLimitedAwardDownloadViewSet.as_view', 'views.RowLimitedAwardDownloadViewSet.as_view', ([], {}), '()\n', (162, 164), False, 'from usaspending_api.download.v2 import views\n'), ((189, 227), 'usaspending_api.download.v2.views.AccountDownloadViewSet.as_view', 'views.Accou...
import os import sys sys.path.append('.') import argparse import numpy as np import os.path as osp from multiprocessing import Process, Pool from glob import glob from tqdm import tqdm import tensorflow as tf from PIL import Image from lib.core.config import INSTA_DIR, INSTA_IMG_DIR def process_single_record(fname,...
[ "tensorflow.train.Example", "os.makedirs", "argparse.ArgumentParser", "tensorflow.python_io.tf_record_iterator", "tensorflow.Session", "numpy.squeeze", "sys.path.append", "glob.glob", "tensorflow.image.decode_jpeg" ]
[((21, 41), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (36, 41), False, 'import sys\n'), ((348, 360), 'tensorflow.Session', 'tf.Session', ([], {}), '()\n', (358, 360), True, 'import tensorflow as tf\n'), ((1226, 1251), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (124...
# Generated by Django 3.1.5 on 2021-03-22 17:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('movies', '0010_actors_moved'), ('person', '0003_refactoring_movie_person_m2m_rels'), ] operations = [ migrations.AddField( ...
[ "django.db.models.ManyToManyField", "django.db.models.CharField" ]
[((389, 487), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'related_name': '"""persons"""', 'through': '"""person.PersonRole"""', 'to': '"""movies.Movie"""'}), "(related_name='persons', through='person.PersonRole',\n to='movies.Movie')\n", (411, 487), False, 'from django.db import migrations, ...
from pathlib import Path import sys path = str(Path(Path(__file__).parent.absolute()).parent.absolute()) sys.path.insert(0, path) from mnist_utils.util import _x, _y_int from sklearn.cluster import MiniBatchKMeans from sklearn.metrics import accuracy_score, adjusted_rand_score import numpy as np from fast_pytorch_kmean...
[ "fast_pytorch_kmeans.KMeans", "tabulate.tabulate", "sys.path.insert", "numpy.unique", "pathlib.Path", "numpy.where", "sklearn.cluster.MiniBatchKMeans", "sklearn.metrics.adjusted_rand_score", "torch.from_numpy", "numpy.bincount", "sklearn.metrics.accuracy_score" ]
[((105, 129), 'sys.path.insert', 'sys.path.insert', (['(0)', 'path'], {}), '(0, path)\n', (120, 129), False, 'import sys\n'), ((849, 905), 'sklearn.cluster.MiniBatchKMeans', 'MiniBatchKMeans', ([], {'n_clusters': 'cluster_count', 'verbose': '(False)'}), '(n_clusters=cluster_count, verbose=False)\n', (864, 905), False, ...
import graphene import os from promise import Promise from datetime import datetime from promise.dataloader import DataLoader import requests from core.graphql.types import CountryType from core.models import Country class Natura2000FeatureType(graphene.ObjectType): id = graphene.String() site_code = graphene...
[ "graphene.String", "requests.post", "graphene.Field", "graphene.List", "os.getenv", "graphene.Float", "graphene.DateTime", "promise.Promise.resolve", "graphene.Boolean" ]
[((278, 295), 'graphene.String', 'graphene.String', ([], {}), '()\n', (293, 295), False, 'import graphene\n'), ((312, 329), 'graphene.String', 'graphene.String', ([], {}), '()\n', (327, 329), False, 'import graphene\n'), ((346, 363), 'graphene.String', 'graphene.String', ([], {}), '()\n', (361, 363), False, 'import gra...
from _satoshitx import * import struct #https://bitcoincore.org/en/segwit_wallet_dev/ class SWitnessTransaction(STransaction): def __init__(version,flag,ins,outs,witness,locktime): super(SWitnessTransaction,self).__init__(version,ins,outs,locktime) self.flag=flag self.witness=witness def serialize(self): tx...
[ "struct.pack" ]
[((5665, 5696), 'struct.pack', 'struct.pack', (['"""<L"""', 'stxo.version'], {}), "('<L', stxo.version)\n", (5676, 5696), False, 'import struct\n'), ((5927, 5947), 'struct.pack', 'struct.pack', (['"""<Q"""', 'a'], {}), "('<Q', a)\n", (5938, 5947), False, 'import struct\n'), ((5953, 6002), 'struct.pack', 'struct.pack', ...
from tarfile import open as tarfile_open from pandas import read_csv def read_correlate_copynumber_vs_mrnaseq(tar_gz_file_path, genes): with tarfile_open(tar_gz_file_path) as tar_gz_file: n = read_csv( tar_gz_file.extractfile( tuple(file for file in tar_gz_file if file.name....
[ "tarfile.open" ]
[((149, 179), 'tarfile.open', 'tarfile_open', (['tar_gz_file_path'], {}), '(tar_gz_file_path)\n', (161, 179), True, 'from tarfile import open as tarfile_open\n')]
#!/usr/bin/env python3 import sys if sys.version_info >= (3, 3): import importlib def import_file(module_path='', module=''): importlib.invalidate_caches() if module in sys.modules: del sys.modules[module] sys.path.insert(0, module_path) loader = importlib.find_lo...
[ "importlib.find_loader", "sys.path.insert", "importlib.invalidate_caches", "pprint.pprint" ]
[((1050, 1066), 'pprint.pprint', 'pprint.pprint', (['d'], {}), '(d)\n', (1063, 1066), False, 'import pprint\n'), ((146, 175), 'importlib.invalidate_caches', 'importlib.invalidate_caches', ([], {}), '()\n', (173, 175), False, 'import importlib\n'), ((254, 285), 'sys.path.insert', 'sys.path.insert', (['(0)', 'module_path...
import os from pathlib import Path from flask import Flask, current_app, jsonify, request from flask_cors import CORS from mongoengine import connect, MongoEngineConnectionError import namesgenerator from model import Doc from app_logic import random_df, call_r def create_app(config=None): app = Flask(__name__) ...
[ "flask.request.args.get", "namesgenerator.get_random_name", "flask_cors.CORS", "flask.Flask", "pathlib.Path", "os.environ.get", "model.Doc.objects.get", "app_logic.random_df", "mongoengine.connect", "flask.jsonify" ]
[((303, 318), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (308, 318), False, 'from flask import Flask, current_app, jsonify, request\n'), ((323, 332), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (327, 332), False, 'from flask_cors import CORS\n'), ((386, 451), 'os.environ.get', 'os.environ.get'...
import os from configurations.importer import install from mypy.version import __version__ # noqa: F401 from mypy_django_plugin import main def plugin(version): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') install() ret...
[ "os.environ.setdefault", "configurations.importer.install", "mypy_django_plugin.main.plugin" ]
[((169, 233), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""core.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'core.settings')\n", (190, 233), False, 'import os\n'), ((238, 298), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_CONFIGURATION"""', '"""Developmen...
import numpy as np from JacobiPolynomials import * import math # 1D - LINE #------------------------------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------------------------------# #---------...
[ "numpy.sqrt", "numpy.isclose", "math.sqrt", "numpy.array", "numpy.zeros" ]
[((464, 479), 'numpy.zeros', 'np.zeros', (['(C + 2)'], {}), '(C + 2)\n', (472, 479), True, 'import numpy as np\n'), ((1188, 1199), 'numpy.zeros', 'np.zeros', (['N'], {}), '(N)\n', (1196, 1199), True, 'import numpy as np\n'), ((2575, 2586), 'numpy.zeros', 'np.zeros', (['N'], {}), '(N)\n', (2583, 2586), True, 'import num...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import calendar import frappe from datetime import datetime from frappe.utils import today from frappe import _ from frappe.model.document import Docum...
[ "frappe.utils.today", "frappe._" ]
[((885, 941), 'frappe._', '_', (['"""Leave Type can be either without pay or partial pay"""'], {}), "('Leave Type can be either without pay or partial pay')\n", (886, 941), False, 'from frappe import _\n'), ((1076, 1145), 'frappe._', '_', (['"""The fraction of Daily Salary per Leave should be between 0 and 1"""'], {}),...
import os import torch import librosa import pickle import soundfile as sf from synthesis import build_model from synthesis import wavegen spect_vc = pickle.load(open('results.pkl', 'rb')) device = torch.device("cuda") model = build_model().to(device) checkpoint = torch.load("checkpoint_step001000000_ema.pth") model.l...
[ "synthesis.wavegen", "synthesis.build_model", "torch.load", "os.path.join", "torch.device" ]
[((199, 219), 'torch.device', 'torch.device', (['"""cuda"""'], {}), "('cuda')\n", (211, 219), False, 'import torch\n'), ((266, 312), 'torch.load', 'torch.load', (['"""checkpoint_step001000000_ema.pth"""'], {}), "('checkpoint_step001000000_ema.pth')\n", (276, 312), False, 'import torch\n'), ((475, 494), 'synthesis.waveg...
import time from contextlib import suppress, contextmanager from astropy import units as u from panoptes.utils import error from panoptes.utils.utils import get_quantity_value from panoptes.utils.time import current_time, wait_for_events, CountdownTimer from panoptes.pocs.observatory import Observatory from panoptes....
[ "huntsman.pocs.camera.group.CameraGroup", "huntsman.pocs.utils.flats.get_cameras_with_filter", "huntsman.pocs.guide.bisque.Guide", "huntsman.pocs.archive.utils.remove_empty_directories", "huntsman.pocs.utils.logger.get_logger", "panoptes.utils.time.CountdownTimer", "panoptes.utils.time.current_time", ...
[((1860, 1885), 'huntsman.pocs.camera.group.CameraGroup', 'CameraGroup', (['self.cameras'], {}), '(self.cameras)\n', (1871, 1885), False, 'from huntsman.pocs.camera.group import CameraGroup, dispatch_parallel\n'), ((9216, 9252), 'huntsman.pocs.archive.utils.remove_empty_directories', 'remove_empty_directories', (['imag...
from django.conf.urls import url from dist import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^add$', views.AddCategoryView.as_view(), name='add_category'), url(r'^(?P<cat_id>\d+)/$', views.CategoryView.as_view(), name='category'), ]
[ "dist.views.CategoryView.as_view", "dist.views.IndexView.as_view", "dist.views.AddCategoryView.as_view" ]
[((89, 114), 'dist.views.IndexView.as_view', 'views.IndexView.as_view', ([], {}), '()\n', (112, 114), False, 'from dist import views\n'), ((149, 180), 'dist.views.AddCategoryView.as_view', 'views.AddCategoryView.as_view', ([], {}), '()\n', (178, 180), False, 'from dist import views\n'), ((235, 263), 'dist.views.Categor...
# Generated by Django 3.1.5 on 2021-01-10 04:06 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.RenameField( model_name='article', old_name='descripton', new...
[ "django.db.migrations.RenameField" ]
[((212, 307), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""article"""', 'old_name': '"""descripton"""', 'new_name': '"""description"""'}), "(model_name='article', old_name='descripton',\n new_name='description')\n", (234, 307), False, 'from django.db import migrations\n')]
from conans import ConanFile, tools class HapplyConan(ConanFile): name = "happly" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/nmwsharp/happly" topics = ("conan", "happly", "ply", "3D") license = "MIT" description = "A C++ header-only parser for the PLY...
[ "conans.tools.check_min_cppstd", "conans.tools.get" ]
[((632, 743), 'conans.tools.get', 'tools.get', ([], {'destination': 'self._source_subfolder', 'strip_root': '(True)'}), "(**self.conan_data['sources'][self.version], destination=self.\n _source_subfolder, strip_root=True)\n", (641, 743), False, 'from conans import ConanFile, tools\n'), ((568, 600), 'conans.tools.che...
from djitellopy import Tello from time import sleep # Initialize and Connect tello = Tello() tello.connect() # Takeoff and move up to 6 feet (183cm) tello.takeoff() tello.move_up(101) # Move forward (east) 5 feet (152cm) tello.move_forward(152) sleep(.5) # rotate 90 degrees CCW tello.rotate_counter_clockwise(90) #...
[ "time.sleep", "djitellopy.Tello" ]
[((86, 93), 'djitellopy.Tello', 'Tello', ([], {}), '()\n', (91, 93), False, 'from djitellopy import Tello\n'), ((248, 258), 'time.sleep', 'sleep', (['(0.5)'], {}), '(0.5)\n', (253, 258), False, 'from time import sleep\n'), ((381, 391), 'time.sleep', 'sleep', (['(0.5)'], {}), '(0.5)\n', (386, 391), False, 'from time imp...
import cv2 import numpy as np import math # img = cv2.imread('/home/geesara/Pictures/bp8OO.jpg', 0) # img = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY)[1] # ensure binary # ret, labels = cv2.connectedComponents(img) # # print("Number of labels" , len(labels)) # # def imshow_components(labels): # # Map componen...
[ "math.exp" ]
[((801, 813), 'math.exp', 'math.exp', (['(-x)'], {}), '(-x)\n', (809, 813), False, 'import math\n')]
# Generated by Django 2.2 on 2019-10-11 17:25 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('review', '0002_auto_20191009_1119'), ] operations = [ migrations.RenameField( model_name='review', old_name='is_deleted', ...
[ "django.db.migrations.RenameField" ]
[((224, 319), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""review"""', 'old_name': '"""is_deleted"""', 'new_name': '"""is_rejected"""'}), "(model_name='review', old_name='is_deleted', new_name\n ='is_rejected')\n", (246, 319), False, 'from django.db import migrations\n')]
import math import random from PIL import Image import cairo from wyggles import Dna PI = math.pi RADIUS = 32 WIDTH = RADIUS HEIGHT = RADIUS class WyggleDna(Dna): def __init__(self, klass): super().__init__(klass) name = self.name r = random.uniform(0, .75) r1 = r + .20 r...
[ "cairo.Context", "random.uniform", "cairo.ImageSurface", "cairo.RadialGradient" ]
[((267, 290), 'random.uniform', 'random.uniform', (['(0)', '(0.75)'], {}), '(0, 0.75)\n', (281, 290), False, 'import random\n'), ((344, 367), 'random.uniform', 'random.uniform', (['(0)', '(0.75)'], {}), '(0, 0.75)\n', (358, 367), False, 'import random\n'), ((421, 444), 'random.uniform', 'random.uniform', (['(0)', '(0.7...
#!/usr/bin/python3 from tools import * from sys import argv from os.path import join import h5py import matplotlib.pylab as plt from matplotlib.patches import Wedge import numpy as np if len(argv) > 1: pathToSimFolder = argv[1] else: pathToSimFolder = "../data/" parameters, electrodes = readParameters(pathT...
[ "matplotlib.pylab.subplots", "matplotlib.pylab.Circle", "matplotlib.patches.Wedge", "matplotlib.colors.to_rgba", "os.path.join", "matplotlib.pylab.Rectangle", "numpy.cos", "numpy.sin", "matplotlib.pylab.close" ]
[((637, 672), 'os.path.join', 'join', (['pathToSimFolder', '"""device.txt"""'], {}), "(pathToSimFolder, 'device.txt')\n", (641, 672), False, 'from os.path import join\n'), ((2671, 2726), 'os.path.join', 'join', (['pathToSimFolder', 'f"""swapTrackFile{fileNumber}.txt"""'], {}), "(pathToSimFolder, f'swapTrackFile{fileNum...
import pytest import stweet as st from tests.test_util import get_temp_test_file_name, get_tweets_to_tweet_output_test, \ two_lists_assert_equal def test_csv_serialization(): csv_filename = get_temp_test_file_name('csv') tweets_collector = st.CollectorTweetOutput() get_tweets_to_tweet_output_test([ ...
[ "stweet.read_tweets_from_csv_file", "tests.test_util.get_temp_test_file_name", "stweet.read_tweets_from_json_lines_file", "stweet.CollectorTweetOutput", "stweet.JsonLineFileTweetOutput", "stweet.CsvTweetOutput" ]
[((201, 231), 'tests.test_util.get_temp_test_file_name', 'get_temp_test_file_name', (['"""csv"""'], {}), "('csv')\n", (224, 231), False, 'from tests.test_util import get_temp_test_file_name, get_tweets_to_tweet_output_test, two_lists_assert_equal\n'), ((255, 280), 'stweet.CollectorTweetOutput', 'st.CollectorTweetOutput...
# coding=utf-8 """ Setup for scikit-surgerytf """ from setuptools import setup, find_packages import versioneer # Get the long description with open('README.rst') as f: long_description = f.read() setup( name='scikit-surgerytf', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), ...
[ "versioneer.get_cmdclass", "setuptools.find_packages", "versioneer.get_version" ]
[((252, 276), 'versioneer.get_version', 'versioneer.get_version', ([], {}), '()\n', (274, 276), False, 'import versioneer\n'), ((291, 316), 'versioneer.get_cmdclass', 'versioneer.get_cmdclass', ([], {}), '()\n', (314, 316), False, 'import versioneer\n'), ((1294, 1334), 'setuptools.find_packages', 'find_packages', ([], ...
# coding: utf-8 """ 2018-03-19. Maximum screenshots in 1 second by computing BGRA raw values to RGB. GNU/Linux pil_frombytes 139 mss_rgb 119 pil_frombytes_rgb 51 numpy_flip 31 numpy_slice 29 macOS pil_frombytes 209 mss_rgb 174 pil_frombytes_rgb 113 numpy_fl...
[ "numpy.flip", "mss.mss", "numpy.array", "PIL.Image.frombytes", "time.time" ]
[((655, 689), 'numpy.array', 'numpy.array', (['im'], {'dtype': 'numpy.uint8'}), '(im, dtype=numpy.uint8)\n', (666, 689), False, 'import numpy\n'), ((1057, 1066), 'mss.mss', 'mss.mss', ([], {}), '()\n', (1064, 1066), False, 'import mss\n'), ((701, 731), 'numpy.flip', 'numpy.flip', (['frame[:, :, :3]', '(2)'], {}), '(fra...
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=no-member,relative-import """Unit tests for blink_idl_parser.py.""" import unittest from blink_idl_parser import BlinkIDLParser class B...
[ "blink_idl_parser.BlinkIDLParser" ]
[((556, 572), 'blink_idl_parser.BlinkIDLParser', 'BlinkIDLParser', ([], {}), '()\n', (570, 572), False, 'from blink_idl_parser import BlinkIDLParser\n')]
import calc def caesar_cipher(word, base): up_alpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] low_alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x...
[ "calc.base_finder" ]
[((387, 409), 'calc.base_finder', 'calc.base_finder', (['base'], {}), '(base)\n', (403, 409), False, 'import calc\n')]
""" Allows easy loading of pixmaps used in UI elements. Provides support for frozen environments as well. """ import os, sys, pickle from ..functions import makeQImage from ..Qt import QtGui from ..python2_3 import basestring if sys.version_info[0] == 2: from . import pixmapData_2 as pixmapData else: ...
[ "pickle.loads" ]
[((711, 729), 'pickle.loads', 'pickle.loads', (['data'], {}), '(data)\n', (723, 729), False, 'import os, sys, pickle\n')]