code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from tokens import Token, TokenType whitespace = " \n\t" digits = "0123456789" class Lexer: def __init__(self, code): self.source = code + '\n' self.cur_char = None self.cur_pos = -1 self.advance() def advance(self, pos=1): self.cur_pos += pos try: ...
[ "tokens.Token" ]
[((1044, 1071), 'tokens.Token', 'Token', (['TokenType.plus_token'], {}), '(TokenType.plus_token)\n', (1049, 1071), False, 'from tokens import Token, TokenType\n'), ((1164, 1192), 'tokens.Token', 'Token', (['TokenType.minus_token'], {}), '(TokenType.minus_token)\n', (1169, 1192), False, 'from tokens import Token, TokenT...
#!/usr/bin/python3 import sys import os libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'epd') if os.path.exists(libdir): sys.path.append(libdir) import epd7in5_V2 epd = epd7in5_V2.EPD() epd.init() epd.Clear() epd.sleep() print("e-Paper clear & sleep done.")
[ "sys.path.append", "os.path.realpath", "os.path.exists", "epd7in5_V2.EPD" ]
[((117, 139), 'os.path.exists', 'os.path.exists', (['libdir'], {}), '(libdir)\n', (131, 139), False, 'import os\n'), ((194, 210), 'epd7in5_V2.EPD', 'epd7in5_V2.EPD', ([], {}), '()\n', (208, 210), False, 'import epd7in5_V2\n'), ((145, 168), 'sys.path.append', 'sys.path.append', (['libdir'], {}), '(libdir)\n', (160, 168)...
from catstuff import core, tools from .config import mod_name, build class Filelist(core.plugins.CSTask): def __init__(self): super().__init__(mod_name, build) def main(self, path, max_depth=0, followlinks=False, include=None, exclude=None, mode='whitelist', safe_walk=True,...
[ "catstuff.tools.path.import_file_list" ]
[((347, 502), 'catstuff.tools.path.import_file_list', 'tools.path.import_file_list', (['path'], {'max_depth': 'max_depth', 'followlinks': 'followlinks', 'include': 'include', 'exclude': 'exclude', 'mode': 'mode', 'safe_walk': 'safe_walk'}), '(path, max_depth=max_depth, followlinks=\n followlinks, include=include, ex...
import tornado.gen from tornado.gen import sleep, Future from tornado.httpclient import HTTPRequest, HTTPError from tornado.simple_httpclient import SimpleAsyncHTTPClient from .. import options as _opts from anthill.common.internal import Internal, InternalError from anthill.common.validate import validate_value fro...
[ "anthill.common.server.Server.instance", "tornado.httpclient.HTTPRequest", "anthill.common.validate.validate_value", "tornado.gen.Future", "anthill.common.internal.Internal", "tornado.simple_httpclient.SimpleAsyncHTTPClient" ]
[((904, 921), 'anthill.common.server.Server.instance', 'Server.instance', ([], {}), '()\n', (919, 921), False, 'from anthill.common.server import Server\n'), ((1268, 1291), 'tornado.simple_httpclient.SimpleAsyncHTTPClient', 'SimpleAsyncHTTPClient', ([], {}), '()\n', (1289, 1291), False, 'from tornado.simple_httpclient ...
""" Abstract class for defining scenarios """ import random from typing import Tuple import numpy as np from copy import deepcopy import torch import stillleben as sl import nimblephysics as nimble from sl_cutscenes.room_models import RoomAssembler from sl_cutscenes.objects.mesh_loader import MeshLoader from sl_cutsce...
[ "torch.eye", "sl_cutscenes.object_info.get_object_by_class_id", "numpy.sum", "sl_cutscenes.camera.Camera", "torch.cat", "numpy.sin", "sl_cutscenes.objects.mesh_loader.MeshLoader", "sl_cutscenes.utils.utils.sl_object_to_nimble", "sl_cutscenes.objects.decorator_loader.DecoratorLoader", "sl_cutscenes...
[((999, 1011), 'sl_cutscenes.objects.mesh_loader.MeshLoader', 'MeshLoader', ([], {}), '()\n', (1009, 1011), False, 'from sl_cutscenes.objects.mesh_loader import MeshLoader\n'), ((1041, 1074), 'sl_cutscenes.objects.object_loader.ObjectLoader', 'ObjectLoader', ([], {'scenario_reset': '(True)'}), '(scenario_reset=True)\n'...
from edna.ingest.streaming import TwitterStreamingIngest from edna.process import BaseProcess from edna.emit import KafkaEmit from edna.serializers.EmptySerializer import EmptyStringSerializer from edna.core.execution.context import SimpleStreamingContext def main(): context = SimpleStreamingContext() ing...
[ "edna.core.execution.context.SimpleStreamingContext", "edna.process.BaseProcess", "edna.serializers.EmptySerializer.EmptyStringSerializer" ]
[((288, 312), 'edna.core.execution.context.SimpleStreamingContext', 'SimpleStreamingContext', ([], {}), '()\n', (310, 312), False, 'from edna.core.execution.context import SimpleStreamingContext\n'), ((337, 360), 'edna.serializers.EmptySerializer.EmptyStringSerializer', 'EmptyStringSerializer', ([], {}), '()\n', (358, ...
import schedule import threading import datetime as dt import subprocess import time import os # auto commit 실행 def auto_commit(): print("auto commit을 시행합니다") subprocess.call(['sh', './continue.sh']) subprocess.call(['sh', './TimeAutoCommitProcess.sh']) # n분마다 auto_commit 실행 def time_based_autocommit(num)...
[ "schedule.run_pending", "subprocess.check_output", "os.path.isfile", "subprocess.call", "schedule.every", "datetime.datetime.fromtimestamp", "os.path.getctime", "datetime.datetime.now", "os.listdir" ]
[((168, 208), 'subprocess.call', 'subprocess.call', (["['sh', './continue.sh']"], {}), "(['sh', './continue.sh'])\n", (183, 208), False, 'import subprocess\n'), ((213, 266), 'subprocess.call', 'subprocess.call', (["['sh', './TimeAutoCommitProcess.sh']"], {}), "(['sh', './TimeAutoCommitProcess.sh'])\n", (228, 266), Fals...
#! /usr/bin/env python import argparse import requests arg_parser = argparse.ArgumentParser( prog="get-weather", description="Get weather for entered city." ) arg_parser.add_argument( "city", metavar="my_city", type=str, help="City for which you want to get weather." ) def get_city_weather(search_city): ...
[ "argparse.ArgumentParser", "requests.get" ]
[((69, 162), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""get-weather"""', 'description': '"""Get weather for entered city."""'}), "(prog='get-weather', description=\n 'Get weather for entered city.')\n", (92, 162), False, 'import argparse\n'), ((460, 491), 'requests.get', 'requests.get', ...
# Generated by Django 3.0.7 on 2020-06-14 15:47 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0003_auto_20200614_1506'), ] operations = [ migrations.AlterField( model_name='urlmapping'...
[ "django.db.models.TextField" ]
[((373, 439), 'django.db.models.TextField', 'models.TextField', ([], {'validators': '[django.core.validators.URLValidator]'}), '(validators=[django.core.validators.URLValidator])\n', (389, 439), False, 'from django.db import migrations, models\n')]
from django.core.management.utils import get_random_secret_key secret_key = get_random_secret_key() text = 'SECRET_KEY = \'{0}\''.format(secret_key) print(text)
[ "django.core.management.utils.get_random_secret_key" ]
[((79, 102), 'django.core.management.utils.get_random_secret_key', 'get_random_secret_key', ([], {}), '()\n', (100, 102), False, 'from django.core.management.utils import get_random_secret_key\n')]
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ print函数展示 """ import time def end_demo(): """print结尾控制,加flush强制刷新""" for _ in range(100): print("#", end="", flush=True) time.sleep(0.01) print() def progress_demo(): """使用\r展示进度""" days = 365 for i in ...
[ "time.sleep" ]
[((221, 237), 'time.sleep', 'time.sleep', (['(0.01)'], {}), '(0.01)\n', (231, 237), False, 'import time\n'), ((433, 449), 'time.sleep', 'time.sleep', (['(0.01)'], {}), '(0.01)\n', (443, 449), False, 'import time\n')]
from __future__ import annotations import time from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Optional, List, Tuple, Dict, Any if TYPE_CHECKING: from . import * ScoreBoardItemType = Tuple[User, int] from . import WithGameLifecycle def minmax(x: int, a: int, b: int) -> int: if x<a: r...
[ "time.time" ]
[((3589, 3600), 'time.time', 'time.time', ([], {}), '()\n', (3598, 3600), False, 'import time\n')]
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import subprocess import os import json import sys from ansible.errors import AnsibleError import qb from qb.ipc.rpc import client as rpc_client def get_semver_path(): bin_path = os.path.join(qb.ROOT, 'node_modules', 'semve...
[ "json.loads", "subprocess.check_output", "qb.ipc.rpc.client.send", "json.dumps", "os.path.isfile", "os.path.join", "doctest.testmod" ]
[((276, 340), 'os.path.join', 'os.path.join', (['qb.ROOT', '"""node_modules"""', '"""semver"""', '"""bin"""', '"""semver"""'], {}), "(qb.ROOT, 'node_modules', 'semver', 'bin', 'semver')\n", (288, 340), False, 'import os\n'), ((1358, 1386), 'subprocess.check_output', 'subprocess.check_output', (['cmd'], {}), '(cmd)\n', ...
from datetime import datetime from collections import Counter, defaultdict, OrderedDict from itertools import chain from random import random import numpy as np from cma import CMAEvolutionStrategy, CMAOptions from loguru import logger from math import sqrt from sklearn.preprocessing import MinMaxScaler from sortedcon...
[ "trueskill.global_env", "math.sqrt", "numpy.polyval", "sklearn.preprocessing.MinMaxScaler", "loguru.logger.warning", "cma.CMAEvolutionStrategy", "datetime.datetime.now", "datetime.datetime", "collections.defaultdict", "loguru.logger.info", "datetime.datetime.strptime", "numpy.array", "xgboos...
[((774, 812), 'math.sqrt', 'sqrt', (['(size * (BETA * BETA) + sum_sigma)'], {}), '(size * (BETA * BETA) + sum_sigma)\n', (778, 812), False, 'from math import sqrt\n'), ((822, 834), 'trueskill.global_env', 'global_env', ([], {}), '()\n', (832, 834), False, 'from trueskill import BETA, global_env, rate_1vs1, Rating\n'), ...
from flask_script import Manager from kron import Kron, db, restore_from_file from kron import Tag, Post, Archive, Box, Document, Person, Topic app = Kron(__name__) manager = Manager(app) @manager.command def restore(file): restore_from_file(file) @manager.shell def _make_shell_context(): return dict( ...
[ "kron.restore_from_file", "flask_script.Manager", "kron.Kron" ]
[((153, 167), 'kron.Kron', 'Kron', (['__name__'], {}), '(__name__)\n', (157, 167), False, 'from kron import Kron, db, restore_from_file\n'), ((178, 190), 'flask_script.Manager', 'Manager', (['app'], {}), '(app)\n', (185, 190), False, 'from flask_script import Manager\n'), ((233, 256), 'kron.restore_from_file', 'restore...
import requests from bs4 import BeautifulSoup linklertoplam=[] # öncelikle haber sitesinin page şeklinde olması önemli # burda linkleri alıp link listesi oluşturuyoruz #html bilenler bilir a href kısmında bizim linklerimiz bulunmakta fakat sitedeki her link işimize yaramıyor # bu yüzden öncelikle göslem yapmanız geriyo...
[ "bs4.BeautifulSoup" ]
[((1168, 1192), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.content'], {}), '(r.content)\n', (1181, 1192), False, 'from bs4 import BeautifulSoup\n')]
import os import time import json import arxiv def get_paper_list(query="cat:cs.CL", domain='cscl', latest_year=2021, end_year=2010, max_results=1000): outs = {} year = latest_year i = 0 while year > end_year: print(f"Results {i} - {i+max_results}:") result = arxiv....
[ "json.dump", "os.mkdir", "json.load", "os.path.isdir", "arxiv.query", "json.dumps", "time.sleep", "os.listdir" ]
[((3882, 3907), 'os.listdir', 'os.listdir', (['tmp_list_path'], {}), '(tmp_list_path)\n', (3892, 3907), False, 'import os\n'), ((314, 427), 'arxiv.query', 'arxiv.query', ([], {'query': 'query', 'start': 'i', 'sort_by': '"""submittedDate"""', 'sort_order': '"""descending"""', 'max_results': 'max_results'}), "(query=quer...
import copy from aerosandbox import * opti = cas.Opti() # Initialize an optimization environment def variable(init_val, lb=None, ub=None): """ Initialize attrib_name scalar design variable. :param init_val: Initial guess :param lb: Optional lower bound :param ub: Optional upper bound :retur...
[ "copy.deepcopy" ]
[((6399, 6416), 'copy.deepcopy', 'copy.deepcopy', (['ap'], {}), '(ap)\n', (6412, 6416), False, 'import copy\n')]
import math num = int(input('Digite um número para encontrar a raíz: ')) raiz = math.sqrt(num) print('A raíz quadrada de {}, é {}.'.format(num, raiz))
[ "math.sqrt" ]
[((80, 94), 'math.sqrt', 'math.sqrt', (['num'], {}), '(num)\n', (89, 94), False, 'import math\n')]
from __future__ import division import json from django.template import Library register = Library() def global_weight(criterion, report): """ Formula: Global Weight = Criterion W value / Criterion Count For example: W Value = 1 Criterion Count = 5 Global Weight = 1 / 5 = 0.2 """ ...
[ "django.template.Library" ]
[((95, 104), 'django.template.Library', 'Library', ([], {}), '()\n', (102, 104), False, 'from django.template import Library\n')]
"""Test searching for shows.""" import datetime from tests.context import BaseTVDBTest from libtvdb.model.enums import AirDay, ShowStatus class ShowTestSuite(BaseTVDBTest): """Show test cases.""" def test_show_parse(self): """Test that a show is parsed as we'd expect.""" show = self.clien...
[ "datetime.date", "datetime.datetime" ]
[((1133, 1159), 'datetime.date', 'datetime.date', (['(2004)', '(9)', '(22)'], {}), '(2004, 9, 22)\n', (1146, 1159), False, 'import datetime\n'), ((3077, 3119), 'datetime.datetime', 'datetime.datetime', (['(2018)', '(11)', '(23)', '(0)', '(28)', '(59)'], {}), '(2018, 11, 23, 0, 28, 59)\n', (3094, 3119), False, 'import d...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/00_core.ipynb (unless otherwise specified). __all__ = ['ExactGPModel', 'MultitaskGPModel', 'nv_cost', 'week_of_month'] # Cell import gpytorch from math import ceil import datetime # Cell class ExactGPModel(gpytorch.models.ExactGP): def __init__(self, train_x, train...
[ "gpytorch.distributions.MultivariateNormal", "math.ceil", "gpytorch.distributions.MultitaskMultivariateNormal", "gpytorch.kernels.RBFKernel", "gpytorch.kernels.PeriodicKernel", "datetime.datetime.strptime", "gpytorch.means.ConstantMean" ]
[((1629, 1675), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['dt_str', '"""%Y-%m-%d"""'], {}), "(dt_str, '%Y-%m-%d')\n", (1655, 1675), False, 'import datetime\n'), ((437, 466), 'gpytorch.means.ConstantMean', 'gpytorch.means.ConstantMean', ([], {}), '()\n', (464, 466), False, 'import gpytorch\n'), ((677...
import unittest import pickle import tempfile import os import math from datetime import datetime import numpy as np import quaternion import cv2 from visnav.algo.model import Camera from visnav.algo.odometry import VisualOdometry, Pose from visnav.algo import tools class TestOdometry(unittest.TestC...
[ "pickle.dump", "os.unlink", "numpy.ones", "pickle.load", "numpy.linalg.norm", "unittest.main", "visnav.render.render.RenderEngine", "math.radians", "cv2.imwrite", "os.path.dirname", "visnav.algo.odometry.VisualOdometry", "visnav.missions.didymos.DidymosSystemModel", "cv2.resize", "cv2.wait...
[((5755, 5860), 'visnav.algo.model.Camera', 'Camera', (['(2048)', '(1944)', '(7.7)', '(7.309)'], {'f_stop': '(5)', 'point_spread_fn': '(0.5)', 'scattering_coef': '(2e-10)'}), '(2048, 1944, 7.7, 7.309, f_stop=5, point_spread_fn=0.5,\n scattering_coef=2e-10, **common_kwargs)\n', (5761, 5860), False, 'from visnav.algo....
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="books_info-bsodhi", version="0.0.2", author="<NAME>", author_email="<EMAIL>", description="Books data scraper.", long_description="Scrapes books and articles informatio from Goodreads ...
[ "setuptools.find_packages" ]
[((456, 482), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (480, 482), False, 'import setuptools\n')]
""" utils.py @author: developmentseed Functions used to generate a list of tiles via recursion """ from os import path as op import json from shapely.geometry import Polygon from pygeotile.tile import Tile def _get_quadrant_tiles(tile): """Return indicies of tiles at one higher zoom (in google tiling scheme)""...
[ "pygeotile.tile.Tile.from_google", "os.path.exists", "os.path.splitext", "shapely.geometry.Polygon" ]
[((385, 430), 'pygeotile.tile.Tile.from_google', 'Tile.from_google', (['ul[0]', 'ul[1]', '(tile.zoom + 1)'], {}), '(ul[0], ul[1], tile.zoom + 1)\n', (401, 430), False, 'from pygeotile.tile import Tile\n'), ((459, 508), 'pygeotile.tile.Tile.from_google', 'Tile.from_google', (['ul[0]', '(ul[1] + 1)', '(tile.zoom + 1)'], ...
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import codecs import re from .process import load_word_list from .process import load_word_pattern from .process import remove_urls_and_tags from .process import remove_escapes_and_non_printable smiles = load_word_list("emoticons-smile.dat") laughs = loa...
[ "re.compile" ]
[((823, 844), 're.compile', 're.compile', (['fwd_regex'], {}), '(fwd_regex)\n', (833, 844), False, 'import re\n'), ((916, 937), 're.compile', 're.compile', (['bck_regex'], {}), '(bck_regex)\n', (926, 937), False, 'import re\n')]
from collections import namedtuple import itertools import logging import os import time from multiprocessing.dummy import Pool import multiprocessing import uuid from elasticsearch import helpers import elasticsearch from elasticsearch_dsl import Index from django.conf import settings from django.core.management.base...
[ "imageledger.models.Image.objects.filter", "multiprocessing.dummy.Pool", "imageledger.search.init", "elasticsearch.helpers.bulk", "logging.StreamHandler", "imageledger.search.db_image_to_index", "imageledger.search.Image.init", "django.db.connection.cursor", "time.sleep", "collections.namedtuple",...
[((467, 490), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (488, 490), False, 'import logging\n'), ((497, 524), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (514, 524), False, 'import logging\n'), ((4844, 4869), 'elasticsearch.helpers.bulk', 'helpers.bulk', (['es'...
# -*- coding: utf-8 -*- """Constants for the Mantarray File Manager.""" from typing import Dict import uuid from immutabledict import immutabledict from labware_domain_models import LabwareDefinition try: from importlib import metadata except ImportError: # pragma: no cover import importlib_metadata as metad...
[ "labware_domain_models.LabwareDefinition", "uuid.UUID", "immutabledict.immutabledict", "importlib_metadata.version" ]
[((358, 385), 'importlib_metadata.version', 'metadata.version', (['"""pulse3D"""'], {}), "('pulse3D')\n", (374, 385), True, 'import importlib_metadata as metadata\n'), ((411, 460), 'uuid.UUID', 'uuid.UUID', (['"""73f52be0-368c-42d8-a1fd-660d49ba5604"""'], {}), "('73f52be0-368c-42d8-a1fd-660d49ba5604')\n", (420, 460), F...
from flask import current_app import pytest import json from base64 import b64encode import basis_set_exchange as bse headers = {'Content-Type': 'application/json'} def get_ref_formats(): return [(format) for format in bse.get_reference_formats()] @pytest.mark.usefixtures("app", "client", autouse=True) # to...
[ "basis_set_exchange.get_archive_types", "basis_set_exchange.get_reference_formats", "json.loads", "basis_set_exchange.version", "pytest.mark.parametrize", "pytest.mark.usefixtures", "basis_set_exchange.get_formats" ]
[((259, 313), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""app"""', '"""client"""'], {'autouse': '(True)'}), "('app', 'client', autouse=True)\n", (282, 313), False, 'import pytest\n'), ((2303, 2417), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""bs_format,output"""', '[(\'gaussian94\', \'Ba...
from flask import Flask, render_template, Response, request from video import Video import requests app = Flask(__name__) vid=Video(0) geste = "" data = "" def gen(): global geste while True: frame, geste = vid.get_frame() r=requests.post('http://localhost:8090/getAPI',data={'geste':geste,'pos...
[ "video.Video", "requests.post", "flask.Flask", "flask.render_template" ]
[((107, 122), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (112, 122), False, 'from flask import Flask, render_template, Response, request\n'), ((127, 135), 'video.Video', 'Video', (['(0)'], {}), '(0)\n', (132, 135), False, 'from video import Video\n'), ((477, 519), 'flask.render_template', 'render_templ...
__author__ = "Altertech Group, https://www.altertech.com/" __copyright__ = "Copyright (C) 2012-2018 Altertech Group" __license__ = "Apache License 2.0" __version__ = "2.0.0" __description__ = "Denkovi smartDEN IP-32IN" __api__ = 4 __required__ = ['value', 'events'] __mods_required__ = [] __lpi_default__ = 'sensor' __e...
[ "netsnmp.VarList", "eva.uc.driverapi.log_traceback", "eva.uc.drivers.tools.snmp.get", "eva.uc.driverapi.handle_phi_event", "eva.uc.driverapi.get_timeout" ]
[((4313, 4410), 'eva.uc.drivers.tools.snmp.get', 'snmp.get', (["('%s.%u' % (oid, port - 1))", 'host', 'snmp_port', 'community', '_timeout', '(tries - 1)'], {'rf': 'int'}), "('%s.%u' % (oid, port - 1), host, snmp_port, community, _timeout, \n tries - 1, rf=int)\n", (4321, 4410), True, 'import eva.uc.drivers.tools.snm...
from datahandler import ConnData import pandas import os #influx import influxdb_client from influxdb_client.client.write_api import SYNCHRONOUS class DataLoader(ConnData): def init(self, fileName): data = pandas.read_csv(fileName) write_api = self.influx_client.write_api(write_options=SYNCHRON...
[ "pandas.read_csv", "influxdb_client.Point" ]
[((223, 248), 'pandas.read_csv', 'pandas.read_csv', (['fileName'], {}), '(fileName)\n', (238, 248), False, 'import pandas\n'), ((398, 432), 'influxdb_client.Point', 'influxdb_client.Point', (['"""test_Mote"""'], {}), "('test_Mote')\n", (419, 432), False, 'import influxdb_client\n')]
""" Show differences between WT and STFT """ from scipy import signal import matplotlib.pyplot as plt import numpy as np import pywt waveletname = 'morl' scales = range(1,200) t = np.linspace(-1, 1, 200, endpoint=False) sig = np.cos(2 * np.pi * 7 * t) + signal.gausspulse(t - 0.4, fc=2) t = np.linspace(-1, 1, 50, en...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "scipy.signal.gausspulse", "matplotlib.pyplot.plot", "numpy.abs", "pywt.cwt", "matplotlib.pyplot.figure", "numpy.sin", "numpy.linspace", "matplotlib.pyplot.pcolormesh", "numpy.cos", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", ...
[((183, 222), 'numpy.linspace', 'np.linspace', (['(-1)', '(1)', '(200)'], {'endpoint': '(False)'}), '(-1, 1, 200, endpoint=False)\n', (194, 222), True, 'import numpy as np\n'), ((295, 333), 'numpy.linspace', 'np.linspace', (['(-1)', '(1)', '(50)'], {'endpoint': '(False)'}), '(-1, 1, 50, endpoint=False)\n', (306, 333), ...
import math import numpy as np #1-a def function1(): value=0 for i in range(1,1000+1): value+=i return value #1-b def function2(m): value=0 for i in range(1,m+1): value+=i return value #2 def function3(): value=0 for i in range(1,100+1): value+=math.sqrt(i*...
[ "math.sin", "numpy.arange", "math.sqrt" ]
[((1229, 1245), 'numpy.arange', 'np.arange', (['(1)', '(26)'], {}), '(1, 26)\n', (1238, 1245), True, 'import numpy as np\n'), ((308, 336), 'math.sqrt', 'math.sqrt', (['(i * math.pi / 100)'], {}), '(i * math.pi / 100)\n', (317, 336), False, 'import math\n'), ((333, 360), 'math.sin', 'math.sin', (['(i * math.pi / 100)'],...
from PyQt5.QtWidgets import QWidget from PyQt5.QtGui import QPainter, QBrush, QPen, QColor from PyQt5.QtCore import Qt import math class QBarPlot(QWidget): def __init__(self): super().__init__() self.horizontal_margin = 10 self.vertical_margin = 10 self.data = None self....
[ "PyQt5.QtGui.QPainter", "PyQt5.QtGui.QColor", "math.floor", "PyQt5.QtGui.QPen", "PyQt5.QtGui.QBrush" ]
[((854, 868), 'PyQt5.QtGui.QPainter', 'QPainter', (['self'], {}), '(self)\n', (862, 868), False, 'from PyQt5.QtGui import QPainter, QBrush, QPen, QColor\n'), ((3187, 3220), 'PyQt5.QtGui.QBrush', 'QBrush', (['Qt.white', 'Qt.SolidPattern'], {}), '(Qt.white, Qt.SolidPattern)\n', (3193, 3220), False, 'from PyQt5.QtGui impo...
#!/usr/bin/python3 import sys import os import signal from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * from replay_sorcery import ReplaySorcery signal.signal(signal.SIGINT, signal.SIG_DFL) app = QApplication([]) dir_name = os.path.dirname(sys.argv[0]) full_path = os.path....
[ "os.path.abspath", "os.path.dirname", "replay_sorcery.ReplaySorcery", "signal.signal", "os.path.join", "sys.exit" ]
[((182, 226), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'signal.SIG_DFL'], {}), '(signal.SIGINT, signal.SIG_DFL)\n', (195, 226), False, 'import signal\n'), ((263, 291), 'os.path.dirname', 'os.path.dirname', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (278, 291), False, 'import os\n'), ((312, 337), 'os.path.abs...
import torch import numpy as np from time import time from os.path import join import lpips from Hessian.GAN_hessian_compute import hessian_compute #%% ImDist = lpips.LPIPS(net='squeeze').cuda() use_gpu = True if torch.cuda.is_available() else False model = torch.hub.load('facebookresearch/pytorch_GAN_zoo:hub', ...
[ "Hessian.hessian_analysis_tools.plot_consistency_example", "Hessian.hessian_analysis_tools.average_H", "Hessian.GAN_hessian_compute.hessian_compute", "Hessian.hessian_analysis_tools.plot_spectra", "Hessian.hessian_analysis_tools.scan_hess_npz", "time.time", "torch.clamp", "torch.cuda.is_available", ...
[((259, 386), 'torch.hub.load', 'torch.hub.load', (['"""facebookresearch/pytorch_GAN_zoo:hub"""', '"""PGAN"""'], {'model_name': '"""celebAHQ-256"""', 'pretrained': '(True)', 'useGPU': 'use_gpu'}), "('facebookresearch/pytorch_GAN_zoo:hub', 'PGAN', model_name=\n 'celebAHQ-256', pretrained=True, useGPU=use_gpu)\n", (27...
from django.contrib import admin from django.urls import include, path from django.conf.urls.static import static from django.conf import settings from django.conf.urls import handler404, handler500 from . import views handler404 = "foodgram.views.page_not_found" handler500 = "foodgram.views.server_error" urlpatt...
[ "django.conf.urls.static.static", "django.urls.path", "django.urls.include" ]
[((666, 729), 'django.conf.urls.static.static', 'static', (['settings.STATIC_URL'], {'document_root': 'settings.STATIC_ROOT'}), '(settings.STATIC_URL, document_root=settings.STATIC_ROOT)\n', (672, 729), False, 'from django.conf.urls.static import static\n'), ((776, 837), 'django.conf.urls.static.static', 'static', (['s...
from tkinter import * import sys class Panel(Frame): def __init__(self, master, *args, **kw): super().__init__(master, *args, **kw) def hide(self): self.grid_forget() def show(self): self.grid() # http://tkinter.unpythonic.net/wiki/VerticalScrolledFrame #https:/...
[ "sys.platform.startswith" ]
[((672, 704), 'sys.platform.startswith', 'sys.platform.startswith', (['"""linux"""'], {}), "('linux')\n", (695, 704), False, 'import sys\n'), ((1368, 1400), 'sys.platform.startswith', 'sys.platform.startswith', (['"""linux"""'], {}), "('linux')\n", (1391, 1400), False, 'import sys\n')]
#!/usr/bin/env python3 import sys, os, shutil, subprocess, re, difflib os.environ['LC_ALL'] = 'C' # otherwise 'nm' prints in wrong order builddir = os.getenv('builddir', os.path.dirname(__file__)) libs = os.getenv('libs', '.libs') IGNORED_SYMBOLS = '|'.join(['_fini', '_init', '_fdata', '_ftext', '_fbss', ...
[ "os.path.basename", "os.path.dirname", "os.path.exists", "shutil.which", "re.match", "re.sub", "os.path.join", "os.getenv", "sys.exit" ]
[((208, 234), 'os.getenv', 'os.getenv', (['"""libs"""', '""".libs"""'], {}), "('libs', '.libs')\n", (217, 234), False, 'import sys, os, shutil, subprocess, re, difflib\n'), ((678, 701), 'shutil.which', 'shutil.which', (['"""c++filt"""'], {}), "('c++filt')\n", (690, 701), False, 'import sys, os, shutil, subprocess, re, ...
import torch from torch.utils.data import Dataset import numpy as np import matplotlib.pyplot as plt import pandas as pd import collections from chr import coverage import pdb class RegressionDataset(Dataset): def __init__(self, X_data, y_data): self.X_data = torch.from_numpy(X_data).float() sel...
[ "pandas.DataFrame", "matplotlib.pyplot.xlim", "matplotlib.pyplot.axvline", "matplotlib.pyplot.show", "matplotlib.pyplot.step", "numpy.min", "numpy.mean", "numpy.max", "chr.coverage.wsc_unbiased", "numpy.where", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.fill_b...
[((614, 629), 'numpy.min', 'np.min', (['pred', '(1)'], {}), '(pred, 1)\n', (620, 629), True, 'import numpy as np\n'), ((642, 657), 'numpy.max', 'np.max', (['pred', '(1)'], {}), '(pred, 1)\n', (648, 657), True, 'import numpy as np\n'), ((737, 751), 'numpy.mean', 'np.mean', (['cover'], {}), '(cover)\n', (744, 751), True,...
import os if not os.path.exists("data"): os.mkdir("data") if not os.path.exists("data/about"): os.mkdir("data/about") if not os.path.exists("data/father"): os.mkdir("data/father") for filename in os.listdir("raw_data"): full_filename = f"raw_data/{filename}" if "About" in filename: dest_file...
[ "os.mkdir", "os.rename", "os.path.exists", "os.listdir" ]
[((208, 230), 'os.listdir', 'os.listdir', (['"""raw_data"""'], {}), "('raw_data')\n", (218, 230), False, 'import os\n'), ((17, 39), 'os.path.exists', 'os.path.exists', (['"""data"""'], {}), "('data')\n", (31, 39), False, 'import os\n'), ((45, 61), 'os.mkdir', 'os.mkdir', (['"""data"""'], {}), "('data')\n", (53, 61), Fa...
from django.contrib import admin from shipment.models import Shipment # Register your models here. @admin.register(Shipment) class ShipmentAdmin(admin.ModelAdmin): list_display = ("name", "surname", "email", "phone","city","district","neighborhood","others")
[ "django.contrib.admin.register" ]
[((101, 125), 'django.contrib.admin.register', 'admin.register', (['Shipment'], {}), '(Shipment)\n', (115, 125), False, 'from django.contrib import admin\n')]
# -*- coding: utf-8 -*- # Copyright 2010 <NAME>, h<EMAIL> # # 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...
[ "os.remove", "ho.pisa.showLogging", "ho.pisa.startViewer", "tempfile.mktemp", "logging.getLogger" ]
[((797, 824), 'logging.getLogger', 'logging.getLogger', (['__file__'], {}), '(__file__)\n', (814, 824), False, 'import logging\n'), ((14133, 14151), 'ho.pisa.showLogging', 'pisa.showLogging', ([], {}), '()\n', (14149, 14151), True, 'import ho.pisa as pisa\n'), ((14073, 14099), 'ho.pisa.startViewer', 'pisa.startViewer',...
import asyncio import subprocess from quart import session from async_http import AsyncHTTP from config import twilio_available_sms_numbers_base_uri from config import twilio_purchase_sms_number_base_uri from config import twilio_create_subaccount_base_uri from config import twilio_assign_new_number_base_uri from confi...
[ "config.twilio_assign_new_number_base_uri.format", "async_http.AsyncHTTP", "config.twilio_purchase_sms_number_base_uri.format", "config.twilio_available_sms_numbers_base_uri.format" ]
[((511, 522), 'async_http.AsyncHTTP', 'AsyncHTTP', ([], {}), '()\n', (520, 522), False, 'from async_http import AsyncHTTP\n'), ((1817, 1884), 'config.twilio_available_sms_numbers_base_uri.format', 'twilio_available_sms_numbers_base_uri.format', ([], {'auth_token': 'auth_token'}), '(auth_token=auth_token)\n', (1861, 188...
import keras from keras.models import model_from_json from keras.utils import plot_model import pandas as pd import numpy as np from ann_visualizer.visualize import ann_viz import glob import os #batch visualize: for model in glob.glob('./models/*.json'): #load json model: classifier_name = os.path.split...
[ "ann_visualizer.visualize.ann_viz", "keras.utils.plot_model", "keras.models.model_from_json", "os.path.splitext", "glob.glob" ]
[((228, 256), 'glob.glob', 'glob.glob', (['"""./models/*.json"""'], {}), "('./models/*.json')\n", (237, 256), False, 'import glob\n'), ((527, 559), 'keras.models.model_from_json', 'model_from_json', (['classifier_json'], {}), '(classifier_json)\n', (542, 559), False, 'from keras.models import model_from_json\n'), ((752...
import pathlib import re from setuptools import find_packages, setup about = {} with open(pathlib.Path("rikai") / "__version__.py", "r") as fh: exec(fh.read(), about) with open( pathlib.Path(__file__).absolute().parent.parent / "README.md", "r", ) as fh: long_description = fh.read() # extras test = [...
[ "pathlib.Path", "setuptools.find_packages" ]
[((839, 854), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (852, 854), False, 'from setuptools import find_packages, setup\n'), ((91, 112), 'pathlib.Path', 'pathlib.Path', (['"""rikai"""'], {}), "('rikai')\n", (103, 112), False, 'import pathlib\n'), ((188, 210), 'pathlib.Path', 'pathlib.Path', (['__fi...
from datetime import timedelta from unittest import TestCase from unittest.mock import patch from path import Path from dakara_feeder.directory import SongPaths from dakara_feeder.metadata import FFProbeMetadataParser, MediaParseError from dakara_feeder.song import BaseSong from dakara_feeder.subtitle.parsing import ...
[ "unittest.mock.patch.object", "dakara_feeder.subtitle.parsing.SubtitleParseError", "path.Path", "datetime.timedelta", "dakara_feeder.metadata.MediaParseError" ]
[((439, 497), 'unittest.mock.patch.object', 'patch.object', (['Pysubs2SubtitleParser', '"""parse"""'], {'autoset': '(True)'}), "(Pysubs2SubtitleParser, 'parse', autoset=True)\n", (451, 497), False, 'from unittest.mock import patch\n'), ((503, 561), 'unittest.mock.patch.object', 'patch.object', (['FFProbeMetadataParser'...
""" Training from scratch with different conditions. """ import os import sys import argparse import copy import time import shutil import json import logging logging.getLogger().setLevel(logging.DEBUG) import numpy as np import torch import torch.nn as nn import torch.nn.parallel import torch.backe...
[ "copy.deepcopy", "gumi.model_runner.parser.create_cli_parser", "logging.info", "torch.cuda.is_available", "logging.getLogger" ]
[((765, 811), 'gumi.model_runner.parser.create_cli_parser', 'create_cli_parser', ([], {'prog': '"""CLI tool for pruning"""'}), "(prog='CLI tool for pruning')\n", (782, 811), False, 'from gumi.model_runner.parser import create_cli_parser\n'), ((1208, 1233), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}),...
#!/usr/bin/env python3 from aws_cdk import core import os from ec2_ialb_aga_custom_r53.network_stack import NetworkingStack from ec2_ialb_aga_custom_r53.aga_stack import AgaStack from ec2_ialb_aga_custom_r53.alb_stack import ALBStack from ec2_ialb_aga_custom_r53.certs_stack import CertsStack from ec2_ialb_aga_custom_...
[ "ec2_ialb_aga_custom_r53.aga_stack.AgaStack", "ec2_ialb_aga_custom_r53.alb_stack.ALBStack", "ec2_ialb_aga_custom_r53.certs_stack.CertsStack", "ec2_ialb_aga_custom_r53.network_stack.NetworkingStack", "aws_cdk.core.Environment", "aws_cdk.core.App", "ec2_ialb_aga_custom_r53.ec2_stack.EC2Stack", "os.geten...
[((364, 469), 'aws_cdk.core.Environment', 'core.Environment', ([], {'account': "os.environ['CDK_DEFAULT_ACCOUNT']", 'region': "os.environ['CDK_DEFAULT_REGION']"}), "(account=os.environ['CDK_DEFAULT_ACCOUNT'], region=os.\n environ['CDK_DEFAULT_REGION'])\n", (380, 469), False, 'from aws_cdk import core\n'), ((535, 560...
from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.http import Http404, HttpResponseRedirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.utils import translation from vanilla import TemplateView, DetailView, Upd...
[ "django.utils.translation.activate", "deck.models.Proposal.objects.count", "deck.models.Event.objects.count", "core.forms.ProfileChangeLanguageForm", "django.shortcuts.get_object_or_404", "django.utils.translation.ugettext", "core.forms.ProfileForm", "django.contrib.auth.models.User.objects.count" ]
[((3473, 3515), 'django.utils.translation.activate', 'translation.activate', (['self.object.language'], {}), '(self.object.language)\n', (3493, 3515), False, 'from django.utils import translation\n'), ((1386, 1438), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['queryset'], {'user__username': 'username'}...
import os from discord.ext import commands from dotenv import load_dotenv import json import shutil from datetime import datetime load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') DST_DIR = os.getenv('DST_DIR') BACKUP_DIR = os.getenv('BACKUP_DIR') bot = commands.Bot(command_prefix='!') @bot.event async def on_ready...
[ "json.dump", "json.load", "dotenv.load_dotenv", "discord.ext.commands.Bot", "shutil.copytree", "datetime.datetime.now", "os.getenv" ]
[((132, 145), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (143, 145), False, 'from dotenv import load_dotenv\n'), ((154, 180), 'os.getenv', 'os.getenv', (['"""DISCORD_TOKEN"""'], {}), "('DISCORD_TOKEN')\n", (163, 180), False, 'import os\n'), ((191, 211), 'os.getenv', 'os.getenv', (['"""DST_DIR"""'], {}), "('...
from typing import List, Tuple import numpy as np from PIL import Image import pytorch_lightning as pl import torch from torchvision.models import resnet18 from torchvision import transforms from ml_models.model_initializer import ModelInitializer class PredPostureNet(pl.LightningModule): def __init__(self): ...
[ "torchvision.models.resnet18", "torch.stack", "numpy.argmax", "ml_models.model_initializer.ModelInitializer", "torchvision.transforms.ToTensor", "PIL.Image.open", "torch.nn.Linear", "torchvision.transforms.CenterCrop", "torchvision.transforms.Normalize", "torch.no_grad", "numpy.round", "torchv...
[((367, 392), 'torchvision.models.resnet18', 'resnet18', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (375, 392), False, 'from torchvision.models import resnet18\n'), ((411, 435), 'torch.nn.Linear', 'torch.nn.Linear', (['(1000)', '(4)'], {}), '(1000, 4)\n', (426, 435), False, 'import torch\n'), ((805, 870), '...
from typing import Dict, TYPE_CHECKING, Type from django.apps import apps from django.utils.translation import ugettext_lazy as _ from ..settings import settings if TYPE_CHECKING: from django.db.models import Model __all__ = ( 'cart_element_representation_serializer', 'get_base_api_view' ) def cart_el...
[ "django.utils.translation.ugettext_lazy", "django.apps.apps.get_model" ]
[((565, 591), 'django.apps.apps.get_model', 'apps.get_model', (['model_path'], {}), '(model_path)\n', (579, 591), False, 'from django.apps import apps\n'), ((783, 819), 'django.utils.translation.ugettext_lazy', '_', (['"""Unexpected type of cart element"""'], {}), "('Unexpected type of cart element')\n", (784, 819), Tr...
# -*- coding: utf-8 -*- """Tests for PCATransformer.""" import numpy as np import pytest from sktime.transformations.panel.pca import PCATransformer from sktime.utils._testing.panel import _make_nested_from_array @pytest.mark.parametrize("bad_components", ["str", 1.2, -1.2, -1, 11]) def test_bad_input_args(bad_compo...
[ "pytest.mark.parametrize", "pytest.raises", "sktime.transformations.panel.pca.PCATransformer", "numpy.ones" ]
[((217, 286), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""bad_components"""', "['str', 1.2, -1.2, -1, 11]"], {}), "('bad_components', ['str', 1.2, -1.2, -1, 11])\n", (240, 286), False, 'import pytest\n'), ((421, 432), 'numpy.ones', 'np.ones', (['(10)'], {}), '(10)\n', (428, 432), True, 'import numpy as ...
from direct.showbase.ShowBase import ShowBase from panda3d.core import ExecutionEnvironment from p3dopenvr.p3dopenvr import P3DOpenVR import openvr import os class MinimalOpenVR(P3DOpenVR): def __init__(self): P3DOpenVR.__init__(self) self.left_hand = None self.right_hand = None def ...
[ "direct.showbase.ShowBase.ShowBase", "os.path.join", "p3dopenvr.p3dopenvr.P3DOpenVR.__init__", "panda3d.core.ExecutionEnvironment.getEnvironmentVariable" ]
[((3115, 3125), 'direct.showbase.ShowBase.ShowBase', 'ShowBase', ([], {}), '()\n', (3123, 3125), False, 'from direct.showbase.ShowBase import ShowBase\n'), ((225, 249), 'p3dopenvr.p3dopenvr.P3DOpenVR.__init__', 'P3DOpenVR.__init__', (['self'], {}), '(self)\n', (243, 249), False, 'from p3dopenvr.p3dopenvr import P3DOpen...
# 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, software # distributed under t...
[ "adcm_pytest_plugin.utils.catch_failed", "pytest.mark.parametrize", "adcm_pytest_plugin.steps.actions.run_service_action_and_assert_result", "tests.functional.plugin_utils.build_objects_comparator", "random.randint", "pytest.fail", "adcm_pytest_plugin.utils.random_string", "adcm_pytest_plugin.steps.ac...
[((1909, 1940), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (1923, 1940), False, 'import pytest\n'), ((2969, 3010), 'allure.step', 'allure.step', (['"""Check actions availability"""'], {}), "('Check actions availability')\n", (2980, 3010), False, 'import allure\n'), ((32...
import numpy as np from flask import Flask, render_template, redirect, url_for, jsonify, make_response, request from Frontend import application # Imports application details from a private file from details import client_id, client_secret import requests from Backend.RequestError import RequestError from Backend.Sptfy...
[ "Frontend.application.route", "Frontend.application.run", "flask.redirect", "flask.request.args.get", "Backend.RequestError.RequestError", "Backend.SptfyApiHndler.SptfyApiHndler", "flask.url_for", "flask.jsonify", "Frontend.application.config.from_object", "requests.get", "flask.render_template"...
[((353, 418), 'Frontend.application.config.from_object', 'application.config.from_object', (['"""configurations.ProductionConfig"""'], {}), "('configurations.ProductionConfig')\n", (383, 418), False, 'from Frontend import application\n'), ((421, 472), 'Frontend.application.route', 'application.route', (['"""/getPlaylis...
""" ================================================== Save image to GeoTIFF ================================================== This example demonstrates how to save an image to your local machine in GeoTiff format. """ import descarteslabs as dl # Create an aoi feature to clip imagery to box = { "type": "Polygo...
[ "descarteslabs.Raster" ]
[((1094, 1105), 'descarteslabs.Raster', 'dl.Raster', ([], {}), '()\n', (1103, 1105), True, 'import descarteslabs as dl\n')]
from __future__ import absolute_import import os import argparse import cwltool.main import cwltool.argparser import cwltool.utils from .exec_profile import ExecProfileBase, LocalToolExec from cwltool.executors import MultithreadedJobExecutor, SingleJobExecutor from . import worker from .tool_handling import make_cust...
[ "argparse.Namespace", "functools.partial", "os.path.abspath", "yaml.load", "argparse.ArgumentParser", "importlib.import_module", "inspect.isclass", "cwltool.executors.SingleJobExecutor", "copy.copy", "cwltool.executors.MultithreadedJobExecutor", "importlib.util.spec_from_file_location", "impor...
[((9325, 9345), 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), "('.')\n", (9340, 9345), False, 'import os\n'), ((9593, 9819), 'argparse.Namespace', 'argparse.Namespace', ([], {'debug': 'debug', 'exec_profile': 'exec_profile', 'cwl_document': 'cwl_document', 'input_params': '[input_params]', 'outdir': 'outdir'...
import numpy as np import torch from torch import nn from torch.utils.data import Dataset from tqdm import tqdm class SeqMaskGenerator(object): def __init__(self, seqconfig): self.seqconfig = seqconfig def create_enc_mask(self, enc_inp): #enc_inp = [N, inp_seq_len] # N is total numb...
[ "numpy.full", "torch.from_numpy", "numpy.ones", "numpy.triu_indices", "torch.device", "torch.tensor", "numpy.repeat" ]
[((762, 802), 'numpy.full', 'np.full', (['(bsize, 1, seq_len, seq_len)', '(1)'], {}), '((bsize, 1, seq_len, seq_len), 1)\n', (769, 802), True, 'import numpy as np\n'), ((1128, 1181), 'numpy.full', 'np.full', (['(num_samples, 1, outp_seqlen, inp_seqlen)', '(1)'], {}), '((num_samples, 1, outp_seqlen, inp_seqlen), 1)\n', ...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\apartments\situations\neighbor_react_to_you_situation.py # Compiled at: 2018-07-22 23:17:14 # Size o...
[ "event_testing.resolver.DoubleSimResolver", "situations.situation_complex.SituationStateData", "sims4.tuning.instances.lock_instance_tunables", "interactions.utils.loot.LootActions.TunableReference", "services.sim_filter_service", "random.choice", "situations.situation_guest_list.SituationGuestInfo", ...
[((7487, 7702), 'sims4.tuning.instances.lock_instance_tunables', 'lock_instance_tunables', (['NeighborReactToYouSituation'], {'exclusivity': 'BouncerExclusivityCategory.NORMAL', 'creation_ui_option': 'SituationCreationUIOption.NOT_AVAILABLE', 'duration': '(0)', '_implies_greeted_status': '(False)'}), '(NeighborReactToY...
from threading import Thread, Event import logging import peewee import socket from ..database import CorsikaRun, CeresRun from ..queries import get_pending_jobs, count_jobs, update_job_status from .corsika import prepare_corsika_job from .ceres import prepare_ceres_job log = logging.getLogger(__name__) hostname = s...
[ "socket.getfqdn", "threading.Event", "logging.getLogger" ]
[((280, 307), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (297, 307), False, 'import logging\n'), ((319, 335), 'socket.getfqdn', 'socket.getfqdn', ([], {}), '()\n', (333, 335), False, 'import socket\n'), ((1320, 1327), 'threading.Event', 'Event', ([], {}), '()\n', (1325, 1327), False, ...
""" Backend of Narrator web app. """ import os import sys import shutil import pandas as pd import skimage.io as io import PIL from flask import render_template, request, redirect, url_for, send_from_directory, session from app import app sys.path.append(app.config['COCOAPI_PATH'] + 'PythonAPI') from pycocotools.coco ...
[ "sys.path.append", "app.app.route", "pandas.DataFrame", "pandas.read_csv", "skimage.io.imread", "os.path.exists", "flask.url_for", "flask.render_template", "flask.send_from_directory", "os.path.join", "shutil.copy", "Narrator.Narrator" ]
[((240, 297), 'sys.path.append', 'sys.path.append', (["(app.config['COCOAPI_PATH'] + 'PythonAPI')"], {}), "(app.config['COCOAPI_PATH'] + 'PythonAPI')\n", (255, 297), False, 'import sys\n'), ((333, 359), 'sys.path.append', 'sys.path.append', (['"""../src/"""'], {}), "('../src/')\n", (348, 359), False, 'import sys\n'), (...
from tkinter import * import cv2 import numpy as np import urllib.request import pandas as pd from tkinter import filedialog from PIL import ImageTk,Image import pyperclip as pc root = Tk() root.title("Image Color Detection") root.geometry("936x536+300+130") root.configure(bg='#243B53') image_path = "" ...
[ "PIL.ImageTk.PhotoImage", "cv2.putText", "pandas.read_csv", "cv2.waitKey", "cv2.imdecode", "cv2.imshow", "tkinter.filedialog.askopenfilename", "PIL.Image.open", "cv2.imread", "cv2.setMouseCallback", "pyperclip.copy", "cv2.destroyAllWindows", "cv2.namedWindow" ]
[((1400, 1506), 'PIL.Image.open', 'Image.open', (['"""C:/Users/7p/Desktop/temp pypro/python-project-color-detection/buttons/urllabel.png"""'], {}), "(\n 'C:/Users/7p/Desktop/temp pypro/python-project-color-detection/buttons/urllabel.png'\n )\n", (1410, 1506), False, 'from PIL import ImageTk, Image\n'), ((1583, 16...
import pytest, logging from read_video import read_video def test_read_video(): test_data = "/Users/pepper/Projekte/PythonProjects/GM_brightness_metric/resources/video/Brosserness_4sec_h264_1920x1080_24fps_2Ch-stereo.mp4" #logging.info('ERROR') i = 0 for frame in read_video(test_data): logging....
[ "read_video.read_video", "logging.info" ]
[((281, 302), 'read_video.read_video', 'read_video', (['test_data'], {}), '(test_data)\n', (291, 302), False, 'from read_video import read_video\n'), ((312, 342), 'logging.info', 'logging.info', (['"""Output in loop"""'], {}), "('Output in loop')\n", (324, 342), False, 'import pytest, logging\n')]
import pyglet import platform import struct from ctypes import addressof,pointer import ctypes from compushady import HEAP_UPLOAD, Swapchain, Compute, Texture2D, Buffer from compushady.formats import B8G8R8A8_UNORM from compushady.shaders import hlsl if platform.system() != 'Windows': raise Exception('only Windows...
[ "compushady.shaders.hlsl.compile", "pyglet.app.run", "compushady.Texture2D", "struct.pack", "compushady.Buffer", "platform.system", "pyglet.window.Window", "compushady.Swapchain", "pyglet.clock.schedule_interval" ]
[((363, 385), 'pyglet.window.Window', 'pyglet.window.Window', ([], {}), '()\n', (383, 385), False, 'import pyglet\n'), ((399, 441), 'compushady.Swapchain', 'Swapchain', (['window._hwnd', 'B8G8R8A8_UNORM', '(3)'], {}), '(window._hwnd, B8G8R8A8_UNORM, 3)\n', (408, 441), False, 'from compushady import HEAP_UPLOAD, Swapcha...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-09-07 21:53 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', 'remove_atmosphereuser_selected_identity'), ] operations = [ migrations.Alte...
[ "django.db.migrations.RemoveField", "django.db.migrations.DeleteModel" ]
[((433, 506), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""providerdnsserverip"""', 'name': '"""provider"""'}), "(model_name='providerdnsserverip', name='provider')\n", (455, 506), False, 'from django.db import migrations\n'), ((551, 601), 'django.db.migrations.DeleteModel', 'mi...
import obspy import read_event_obspy_file as reof from getwaveform import * def get_ev_info(ev_info,iex): # =============================================================== # SilwalTape2016 example event (Anchorage) if iex == 0: ev_info.use_catalog = 0 ev_info.otime = obspy.UTCDateTime("2009-04-07T2...
[ "obspy.UTCDateTime" ]
[((289, 333), 'obspy.UTCDateTime', 'obspy.UTCDateTime', (['"""2009-04-07T20:12:55.351"""'], {}), "('2009-04-07T20:12:55.351')\n", (306, 333), False, 'import obspy\n')]
import shutil import sys from PIL import Image def get_term_width(): """ return terminal width this function depends upon shutil.get_terminal_size this works only on Python >= 3.3 """ return shutil.get_terminal_size().columns def get_aspect_ratio(img): """ return the aspect ratio o...
[ "shutil.get_terminal_size", "sys.exit", "PIL.Image.open" ]
[((223, 249), 'shutil.get_terminal_size', 'shutil.get_terminal_size', ([], {}), '()\n', (247, 249), False, 'import shutil\n'), ((1846, 1857), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1854, 1857), False, 'import sys\n'), ((1909, 1929), 'PIL.Image.open', 'Image.open', (['img_file'], {}), '(img_file)\n', (1919, 19...
from unittest import TestCase from unittest.mock import patch, Mock from rpiatipo.Events import Event, EventService class EventsTest(TestCase): @patch('rpiatipo.Events.EventService') def setUp(self, MockEventService): self.event = Event(type="test", data={"data": 1}) self.eventService = MockEve...
[ "unittest.mock.patch", "rpiatipo.Events.Event" ]
[((150, 187), 'unittest.mock.patch', 'patch', (['"""rpiatipo.Events.EventService"""'], {}), "('rpiatipo.Events.EventService')\n", (155, 187), False, 'from unittest.mock import patch, Mock\n'), ((248, 284), 'rpiatipo.Events.Event', 'Event', ([], {'type': '"""test"""', 'data': "{'data': 1}"}), "(type='test', data={'data'...
""" $lic$ Copyright (C) 2016-2019 by The Board of Trustees of Stanford University This program is free software: you can redistribute it and/or modify it under the terms of the Modified BSD-3 License as published by the Open Source Initiative. This program is distributed in the hope that it will be useful, but WITHOU...
[ "nn_dataflow.core.Resource", "nn_dataflow.core.PhyDim2" ]
[((7233, 7501), 'nn_dataflow.core.Resource', 'Resource', ([], {'proc_region': 'self.proc_region', 'dram_region': 'self.dram_region', 'src_data_region': 'self.src_data_region', 'dst_data_region': 'self.dst_data_region', 'dim_array': '(16, 16)', 'size_gbuf': '(131072)', 'size_regf': '(512)', 'array_bus_width': '(8)', 'dr...
from .transform import Transform from torch.nn import Parameter import torch class Affine(Transform): def __init__(self, loc=0.0, scale=1.0, learnable=True): super().__init__() if not isinstance(loc, torch.Tensor): loc = torch.tensor(loc).view(1, -1) if not isinstance(scale, t...
[ "torch.nn.Parameter", "torch.tensor" ]
[((528, 547), 'torch.nn.Parameter', 'Parameter', (['self.loc'], {}), '(self.loc)\n', (537, 547), False, 'from torch.nn import Parameter\n'), ((573, 594), 'torch.nn.Parameter', 'Parameter', (['self.scale'], {}), '(self.scale)\n', (582, 594), False, 'from torch.nn import Parameter\n'), ((256, 273), 'torch.tensor', 'torch...
from builtins import sorted from itertools import cycle from unittest.mock import patch, Mock from pyclarity_lims.entities import Sample from scripts.copy_samples import Container from scripts.copy_samples import CopySamples from tests.test_common import TestEPP, FakeEntitiesMaker class TestCopySamples(TestEPP): ...
[ "unittest.mock.patch.object", "builtins.sorted", "unittest.mock.Mock", "tests.test_common.FakeEntitiesMaker", "unittest.mock.patch", "scripts.copy_samples.CopySamples", "itertools.cycle" ]
[((655, 713), 'unittest.mock.patch', 'patch', (['"""lims.copy_samples.create_batch"""'], {'return_value': '(True)'}), "('lims.copy_samples.create_batch', return_value=True)\n", (660, 713), False, 'from unittest.mock import patch, Mock\n'), ((795, 852), 'unittest.mock.patch.object', 'patch.object', (['Container', '"""cr...
# # Object detector (by sequential file read from directory) # import os import sys import random import math import re import time import numpy as np import tensorflow as tf import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as patches from glob import glob import argparse import skimage impo...
[ "sys.path.append", "os.path.abspath", "argparse.ArgumentParser", "skimage.io.imread", "tensorflow.device", "mrcnn.model.MaskRCNN", "os.path.join", "samples.miyukiCamera.miyukiCamera.MiyukiCameraDataset" ]
[((374, 399), 'os.path.abspath', 'os.path.abspath', (['"""../../"""'], {}), "('../../')\n", (389, 399), False, 'import os\n'), ((420, 445), 'sys.path.append', 'sys.path.append', (['ROOT_DIR'], {}), '(ROOT_DIR)\n', (435, 445), False, 'import sys\n'), ((785, 815), 'os.path.join', 'os.path.join', (['ROOT_DIR', '"""logs"""...
from django.test import TestCase from django.test import Client class HelloWorldTestCase(TestCase): """Hello world tests""" def test_successful_case(self): """Successful test case""" self.assertTrue(True) def test_http_request(self): client = Client() response = client.ge...
[ "django.test.Client" ]
[((283, 291), 'django.test.Client', 'Client', ([], {}), '()\n', (289, 291), False, 'from django.test import Client\n')]
import os import sys import logging import importlib from ast import literal_eval from copy import deepcopy from collections import defaultdict from collections import namedtuple, Counter from modelmapper.misc import read_csv_gen, load_toml, camel_to_snake from modelmapper.slack import slack OVERRIDES_FILE_NAME = "...
[ "sys.path.append", "copy.deepcopy", "importlib.import_module", "os.path.basename", "os.path.dirname", "modelmapper.misc.camel_to_snake", "modelmapper.misc.read_csv_gen", "os.environ.get", "collections.defaultdict", "modelmapper.misc.load_toml", "modelmapper.slack.slack", "ast.literal_eval", ...
[((405, 432), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (422, 432), False, 'import logging\n'), ((914, 946), 'os.path.dirname', 'os.path.dirname', (['self.setup_path'], {}), '(self.setup_path)\n', (929, 946), False, 'import os\n'), ((955, 986), 'sys.path.append', 'sys.path.append', (...
""" This file contains the logic to generate the master dataset for the INDDEX reports Overview -------- Beneficiaries are asked about their diet in a "recall" session. This results in a "foodrecall" case. Every food they mention results in the creation of a "food" case that's a child of this foodrecall. This dataset...
[ "uuid.uuid4", "corehq.apps.es.users.UserES", "collections.defaultdict", "corehq.apps.reports.filters.case_list.CaseListFilter.show_all_data", "corehq.apps.reports.standard.cases.utils.get_case_owners", "functools.reduce", "corehq.apps.reports.filters.case_list.CaseListFilter.no_filters_selected", "cor...
[((6749, 6761), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (6759, 6761), False, 'import uuid\n'), ((15090, 15123), 'corehq.apps.reports.filters.case_list.CaseListFilter.show_deactivated_data', 'EMWF.show_deactivated_data', (['slugs'], {}), '(slugs)\n', (15116, 15123), True, 'from corehq.apps.reports.filters.case_lis...
import locale import os import re import string import unicodedata import zlib from datetime import date from urllib.parse import parse_qs, urlencode from django.core.exceptions import ObjectDoesNotExist from django.db import IntegrityError, transaction from django.urls import reverse_lazy as reverse from django.utils...
[ "unicodedata.normalize", "os.urandom", "django.urls.reverse_lazy", "datetime.date", "datetime.date.today", "django.utils.encoding.iri_to_uri", "urllib.parse.parse_qs", "django.utils.functional.lazy", "locale._grouping_intervals", "locale.setlocale", "django.utils.translation.ugettext_lazy", "d...
[((4113, 4163), 're.compile', 're.compile', (['f"""[?&]{settings.LEPRIKON_PARAM_BACK}="""'], {}), "(f'[?&]{settings.LEPRIKON_PARAM_BACK}=')\n", (4123, 4163), False, 'import re\n'), ((8946, 8966), 'django.utils.functional.lazy', 'lazy', (['paragraph', 'str'], {}), '(paragraph, str)\n', (8950, 8966), False, 'from django....
'''OpenGL extension NV.texture_expand_normal This module customises the behaviour of the OpenGL.raw.GL.NV.texture_expand_normal to provide a more Python-friendly API Overview (from the spec) This extension provides a remapping mode where unsigned texture components (in the range [0,1]) can be treated a...
[ "OpenGL.extensions.hasGLExtension" ]
[((1243, 1285), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (1268, 1285), False, 'from OpenGL import extensions\n')]
#!/usr/bin/env python3 """An abstract _Runner_ module. """ from abc import ABCMeta, abstractmethod from collections import namedtuple from enum import Enum, auto, unique import threading import uuid RUNNER_IMAGE = 'alanbchristie/pydatalister' RUNNER_TAG = 'latest' @unique class RunnerState(Enum): """Runner exe...
[ "threading.Thread.__init__", "uuid.uuid4", "threading.Lock", "collections.namedtuple", "enum.auto" ]
[((1264, 1313), 'collections.namedtuple', 'namedtuple', (['"""Runner"""', "['state', 'context', 'msg']"], {}), "('Runner', ['state', 'context', 'msg'])\n", (1274, 1313), False, 'from collections import namedtuple\n'), ((697, 703), 'enum.auto', 'auto', ([], {}), '()\n', (701, 703), False, 'from enum import Enum, auto, u...
from chinormfilter import __version__ from chinormfilter.cli import Filter def test_version(): assert __version__ == '0.5.0' def test_kuro2sudachi_cli(capsys): f = Filter(dict_type="full") assert f.duplicated("林檎,りんご") is True assert f.duplicated("レナリドミド, レナリドマイド") is False assert f.duplicated("...
[ "chinormfilter.cli.Filter" ]
[((176, 200), 'chinormfilter.cli.Filter', 'Filter', ([], {'dict_type': '"""full"""'}), "(dict_type='full')\n", (182, 200), False, 'from chinormfilter.cli import Filter\n')]
#!/usr/bin/env python3 import json import os import sys NAME = "{VERSION_FROM}-{VERSION_CURRENT}-{VERSION_TO}-{STAGE}.json" with open(NAME.format(**os.environ), "w") as fd: json.dump(sys.argv, fd)
[ "json.dump" ]
[((179, 202), 'json.dump', 'json.dump', (['sys.argv', 'fd'], {}), '(sys.argv, fd)\n', (188, 202), False, 'import json\n')]
# Author: <NAME> # Data: 2020-01-10 # Function: Run training #-------------------------- import package --------------------------# from __future__ import division from __future__ import print_function import time import tensorflow as tf import winsound from Code_utils import * from Code_models import G...
[ "tensorflow.global_variables_initializer", "winsound.Beep", "tensorflow.placeholder_with_default", "tensorflow.Session", "tensorflow.constant", "time.time", "tensorflow.set_random_seed", "tensorflow.placeholder", "tensorflow.sparse_placeholder" ]
[((465, 489), 'tensorflow.set_random_seed', 'tf.set_random_seed', (['seed'], {}), '(seed)\n', (483, 489), True, 'import tensorflow as tf\n'), ((4150, 4162), 'tensorflow.Session', 'tf.Session', ([], {}), '()\n', (4160, 4162), True, 'import tensorflow as tf\n'), ((4730, 4741), 'time.time', 'time.time', ([], {}), '()\n', ...
from datetime import datetime from twick.tweet import Tweet import twick.settings as settings class Response(object): def __init__(self, raw): self.raw = raw self.tweets = list(map(Tweet, raw["statuses"])) self.metadata = dict(raw["search_metadata"]) self.timestamp = datetime.now() ...
[ "datetime.datetime.now" ]
[((305, 319), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (317, 319), False, 'from datetime import datetime\n')]
# Generated by Django 2.1 on 2019-05-15 12:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('articl...
[ "django.db.models.ForeignKey", "django.db.migrations.swappable_dependency", "django.db.migrations.AlterUniqueTogether", "django.db.models.ManyToManyField" ]
[((245, 302), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (276, 302), False, 'from django.db import migrations, models\n'), ((1504, 1599), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether',...
from django.db import models from tagging.fields import TagField class Perch(models.Model): size = models.IntegerField() smelly = models.BooleanField(default=True) class Parrot(models.Model): state = models.CharField(maxlength=50) perch = models.ForeignKey(Perch, null=True) def __str__(self): ...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.IntegerField", "tagging.fields.TagField" ]
[((104, 125), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (123, 125), False, 'from django.db import models\n'), ((139, 172), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)'}), '(default=True)\n', (158, 172), False, 'from django.db import models\n'), ((214,...
import bpy from bpy_extras.mesh_utils import ngon_tessellate from . import se3 def get_se3_mesh_form_file(filepath): file_query = se3.ASCIIFileQuery(filepath) version = file_query.get_num_value("SE_MESH") mesh = se3.Mesh(version) num_of_layers = file_query.get_num_value("LAYERS") file_que...
[ "bpy.ops.object.material_slot_add", "bpy.ops.object.transform_apply", "mathutils.Vector", "bpy.data.materials.new", "bpy.data.objects.new", "bpy.data.meshes.new", "mathutils.Matrix" ]
[((11951, 11983), 'bpy.data.meshes.new', 'bpy.data.meshes.new', (['"""Test mesh"""'], {}), "('Test mesh')\n", (11970, 11983), False, 'import bpy\n'), ((12677, 12778), 'mathutils.Matrix', 'Matrix', (['((-1.0, 0.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0), (0.0, 1.0, 0.0, 0.0), (0.0, \n 0.0, 0.0, 1.0))'], {}), '(((-1.0, 0.0, 0...
import ply.lex as lex import ply.yacc as yacc import global_var # definicie tokenov tokens = ( 'STRING', 'NUMBER', 'FIELD', 'GRE', 'LOE', 'EQ', 'NEQ', ) # literaly literals = ['+', '-', '*', '/', '>', '<'] # popis tokenov t_FIELD = r'[a-zA-Z0-9_\.][a-zA-Z0-9_\.]*' t_STRING = r'\".*\"' t_GRE = '>=' t_LOE = '<=' ...
[ "global_var.fields.append", "ply.yacc.yacc", "ply.lex.lex" ]
[((1017, 1047), 'global_var.fields.append', 'global_var.fields.append', (['p[1]'], {}), '(p[1])\n', (1041, 1047), False, 'import global_var\n'), ((1543, 1552), 'ply.lex.lex', 'lex.lex', ([], {}), '()\n', (1550, 1552), True, 'import ply.lex as lex\n'), ((1566, 1588), 'ply.yacc.yacc', 'yacc.yacc', ([], {'debug': '(False)...
# Generated by Django 3.1 on 2020-08-29 02:18 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('interview', '0003_auto_20200828_2215'), ] operations = [ migrations.AlterModelOptions( name='candidate', options={'permissions...
[ "django.db.migrations.AlterModelOptions" ]
[((227, 462), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""candidate"""', 'options': "{'permissions': [('export', 'Can export candidate list'), ('notify',\n 'notify interviewer for candidate review')], 'verbose_name': '应聘者',\n 'verbose_name_plural': '应聘者'}"}), "(name...
"""Training script for the WaveNet network on the VCTK corpus. This script trains a network with the WaveNet using data from the VCTK corpus, which can be freely downloaded at the following site (~10 GB): http://homepages.inf.ed.ac.uk/jyamagis/page3/page58/page58.html """ from __future__ import print_function import...
[ "wavenet_tf.WaveNetModel", "sys.stdout.flush", "tensorflow.RunOptions", "os.path.join", "tensorflow.compat.v1.global_variables_initializer", "os.path.abspath", "os.path.exists", "tensorflow.compat.v1.RunMetadata", "tensorflow.name_scope", "datetime.datetime.now", "tensorflow.train.get_checkpoint...
[((809, 823), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (821, 823), False, 'from datetime import datetime\n'), ((2069, 2103), 'tensorflow.compat.v1.trainable_variables', 'tf.compat.v1.trainable_variables', ([], {}), '()\n', (2101, 2103), True, 'import tensorflow as tf\n'), ((2213, 2258), 'tensorflow.co...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() print(setuptools.find_packages()) setuptools.setup( name="pymortar", version="0.1.4", author="<NAME>", author_email="<EMAIL>", description="Python3 Mortar", long_description=long_description, long_descrip...
[ "setuptools.find_packages" ]
[((94, 120), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (118, 120), False, 'import setuptools\n'), ((414, 440), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (438, 440), False, 'import setuptools\n')]
import cv2 import numpy as np def detect(img): # finds and fills the located robots img = cv2.convertScaleAbs(img, 1, 1.5) structure = np.ones((3, 3)) canny = np.copy(cv2.Canny(img, 20, 120)) dilated = cv2.dilate(canny, structure) contours, hier = cv2.findContours(dilated, cv2.RETR_T...
[ "cv2.Canny", "cv2.contourArea", "numpy.arctan2", "numpy.copy", "cv2.dilate", "cv2.moments", "numpy.zeros", "numpy.ones", "numpy.all", "numpy.histogram", "numpy.where", "numpy.diff", "cv2.convertScaleAbs", "numpy.squeeze", "cv2.findContours" ]
[((106, 138), 'cv2.convertScaleAbs', 'cv2.convertScaleAbs', (['img', '(1)', '(1.5)'], {}), '(img, 1, 1.5)\n', (125, 138), False, 'import cv2\n'), ((156, 171), 'numpy.ones', 'np.ones', (['(3, 3)'], {}), '((3, 3))\n', (163, 171), True, 'import numpy as np\n'), ((233, 261), 'cv2.dilate', 'cv2.dilate', (['canny', 'structur...
import socket import re import concurrent.futures from pprint import pformat from .unrealserver import UnrealServer # Setup Logger import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class UnrealMasterServer(object): def __init__( self, hostname, ...
[ "socket.socket", "pprint.pformat", "logging.getLogger", "logging.NullHandler" ]
[((156, 183), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (173, 183), False, 'import logging\n'), ((202, 223), 'logging.NullHandler', 'logging.NullHandler', ([], {}), '()\n', (221, 223), False, 'import logging\n'), ((1087, 1136), 'socket.socket', 'socket.socket', (['socket.AF_INET', 's...
from flask import render_template, flash, redirect, url_for, request from app import app, db from flask_sqlalchemy import sqlalchemy from app.forms import RegisterForm, LoginForm from app.models import User from flask_login import current_user, login_user, logout_user, login_required @app.before_first_request def init...
[ "app.models.User", "app.app.route", "flask.flash", "flask_login.login_user", "flask_login.logout_user", "flask.url_for", "app.models.User.query.filter_by", "app.forms.LoginForm", "app.db.session.commit", "flask.render_template", "app.forms.RegisterForm", "app.db.create_all", "app.db.session....
[((363, 394), 'app.app.route', 'app.route', (['"""/"""'], {'methods': "['GET']"}), "('/', methods=['GET'])\n", (372, 394), False, 'from app import app, db\n'), ((396, 432), 'app.app.route', 'app.route', (['"""/index"""'], {'methods': "['GET']"}), "('/index', methods=['GET'])\n", (405, 432), False, 'from app import app,...
import cv2 import numpy as np cap = cv2.VideoCapture(0) while True: _, frame = cap.read() hsv_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) # Red color low_red = np.array([161, 155, 84]) high_red = np.array([179, 255, 255]) red_mask = cv2.inRange(hsv_frame, low_red, high_red) red = cv2.b...
[ "cv2.bitwise_and", "cv2.cvtColor", "cv2.waitKey", "cv2.VideoCapture", "numpy.array", "cv2.imshow", "cv2.inRange" ]
[((37, 56), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (53, 56), False, 'import cv2\n'), ((112, 150), 'cv2.cvtColor', 'cv2.cvtColor', (['frame', 'cv2.COLOR_BGR2HSV'], {}), '(frame, cv2.COLOR_BGR2HSV)\n', (124, 150), False, 'import cv2\n'), ((182, 206), 'numpy.array', 'np.array', (['[161, 155, 84]']...
from django.shortcuts import render from django.conf.urls import url from django.http import HttpResponse from django.views.decorators.csrf import csrf_protect from django.views.decorators.debug import sensitive_post_parameters from django.views.decorators.cache import never_cache from django import shortcuts from djan...
[ "django.contrib.messages.success", "django.shortcuts.redirect", "django.contrib.messages.error", "json.dumps", "django.http.Http404", "django.shortcuts.render", "django.views.decorators.debug.sensitive_post_parameters" ]
[((502, 529), 'django.views.decorators.debug.sensitive_post_parameters', 'sensitive_post_parameters', ([], {}), '()\n', (527, 529), False, 'from django.views.decorators.debug import sensitive_post_parameters\n'), ((2145, 2172), 'django.views.decorators.debug.sensitive_post_parameters', 'sensitive_post_parameters', ([],...
# -*- coding: utf-8 -*- import os import copy import time import shutil from nipype import config from nipype import logging import nipype.pipeline.engine as pe import nipype.interfaces.afni as afni import nipype.interfaces.fsl as fsl import nipype.interfaces.io as nio from nipype.interfaces.utility import Merge, Iden...
[ "CPAC.anat_preproc.anat_preproc.create_anat_preproc", "CPAC.utils.interfaces.datasink.DataSink", "os.walk", "CPAC.registration.create_fsl_flirt_linear_reg", "CPAC.seg_preproc.seg_preproc.connect_anat_segmentation", "CPAC.func_preproc.func_ingress.connect_func_ingress", "os.path.join", "CPAC.utils.inte...
[((1863, 1899), 'nipype.logging.getLogger', 'logging.getLogger', (['"""nipype.workflow"""'], {}), "('nipype.workflow')\n", (1880, 1899), False, 'from nipype import logging\n'), ((2967, 2992), 'CPAC.utils.utils.check_config_resources', 'check_config_resources', (['c'], {}), '(c)\n', (2989, 2992), False, 'from CPAC.utils...
import sys import time import constants import parser.correct as correct import parser.export as export import parser.read as read class App: """ Base container class to divert all export file conversions and error handling to their respective packages and libraries. """ def __init__(self...
[ "sys.stdout.write", "time.time", "parser.correct.FixExport", "constants.expansions", "parser.export.DataExporter", "parser.read.FileReader", "sys.exit" ]
[((923, 955), 'parser.correct.FixExport', 'correct.FixExport', (['self.filename'], {}), '(self.filename)\n', (940, 955), True, 'import parser.correct as correct\n'), ((1081, 1111), 'parser.read.FileReader', 'read.FileReader', (['self.filename'], {}), '(self.filename)\n', (1096, 1111), True, 'import parser.read as read\...
#!/usr/bin/env python import sys import loco import tinymath as tm import numpy as np PHYSICS_BACKEND = loco.sim.PHYSICS_NONE RENDERING_BACKEND = loco.sim.RENDERING_GLVIZ_GLFW COM_TETRAHEDRON = [ 1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0 ] TETRAHEDRON_VERTICES = [ 0.0 - COM_TETRAHEDRON[0], 0.0 - COM_TETRAHEDRON[1], 0.0 - COM...
[ "loco.sim.Scenario", "tinymath.Matrix3f", "numpy.sin", "tinymath.Vector3f", "loco.sim.Runtime", "numpy.cos", "loco.sim.Sphere", "loco.sim.Mesh" ]
[((1846, 1866), 'numpy.cos', 'np.cos', (['(dtheta * idx)'], {}), '(dtheta * idx)\n', (1852, 1866), True, 'import numpy as np\n'), ((1882, 1902), 'numpy.sin', 'np.sin', (['(dtheta * idx)'], {}), '(dtheta * idx)\n', (1888, 1902), True, 'import numpy as np\n'), ((1920, 1946), 'numpy.cos', 'np.cos', (['(dtheta * (idx + 1))...