code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright (c) 2018 Ultim<NAME>.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Dict, Optional, List from PyQt5.QtCore import QObject, pyqtSlot # # A QualityGroup represents a group of containers that must be applied to each ContainerStack when it's used. # Some concrete examples ...
[ "PyQt5.QtCore.pyqtSlot" ]
[((1464, 1484), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {'result': 'str'}), '(result=str)\n', (1472, 1484), False, 'from PyQt5.QtCore import QObject, pyqtSlot\n')]
from django.core.management import BaseCommand from django.contrib.auth import get_user_model from django.db.models import Prefetch, Q from user.models import Recommender, Friendship, Recommendation from user.recommendations.saver import RecommendationSaver class Command(BaseCommand): help = 'Generate recommenda...
[ "user.models.Recommender.objects.order_by", "user.recommendations.saver.RecommendationSaver", "django.contrib.auth.get_user_model", "user.models.Friendship.objects.filter" ]
[((686, 707), 'user.recommendations.saver.RecommendationSaver', 'RecommendationSaver', ([], {}), '()\n', (705, 707), False, 'from user.recommendations.saver import RecommendationSaver\n'), ((729, 766), 'user.models.Recommender.objects.order_by', 'Recommender.objects.order_by', (['"""order"""'], {}), "('order')\n", (757...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ "language.common.utils.file_utils.copy_files_to_dir", "tensorflow.logging.info", "language.common.utils.file_utils.make_empty_dir" ]
[((3365, 3432), 'tensorflow.logging.info', 'tf.logging.info', (['"""Saving new best checkpoint to %s"""', 'checkpoint_dir'], {}), "('Saving new best checkpoint to %s', checkpoint_dir)\n", (3380, 3432), True, 'import tensorflow as tf\n'), ((3437, 3478), 'language.common.utils.file_utils.make_empty_dir', 'file_utils.make...
import unittest from distutils.version import StrictVersion from mopidy import __version__ class VersionTest(unittest.TestCase): def test_current_version_is_parsable_as_a_strict_version_number(self): StrictVersion(__version__)
[ "distutils.version.StrictVersion" ]
[((215, 241), 'distutils.version.StrictVersion', 'StrictVersion', (['__version__'], {}), '(__version__)\n', (228, 241), False, 'from distutils.version import StrictVersion\n')]
""" Author: <NAME> (@zujko) Author: <NAME> (@chrislemelin) Description: Tests for petition operations. Date Created: Sept 15 2016 Updated: Feb 17 2017 """ from datetime import timedelta from django.contrib.auth.models import User from django.test import Client, TestCase from django.test.client import RequestFactory fr...
[ "django.contrib.auth.models.User.objects.get", "django.test.Client", "petitions.models.Tag", "django.utils.timezone.now", "petitions.models.Petition.objects.get", "django.contrib.auth.models.User.objects.create_user", "django.test.client.RequestFactory", "datetime.timedelta", "petitions.models.Petit...
[((676, 684), 'django.test.Client', 'Client', ([], {}), '()\n', (682, 684), False, 'from django.test import Client, TestCase\n'), ((708, 724), 'django.test.client.RequestFactory', 'RequestFactory', ([], {}), '()\n', (722, 724), False, 'from django.test.client import RequestFactory\n'), ((750, 826), 'django.contrib.auth...
# -*- coding:utf-8 -*- # /usr/bin/env python """ Author: <NAME> date: 2020/1/23 9:07 contact: <EMAIL> desc: 新增-事件接口 新增-事件接口新型冠状病毒-网易 新增-事件接口新型冠状病毒-丁香园 """ import json import time import requests import pandas as pd from bs4 import BeautifulSoup def epidemic_163(): url = "https://news.163.com/special/epidemic/?sp...
[ "bs4.BeautifulSoup", "json.loads", "requests.get", "time.time" ]
[((388, 405), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (400, 405), False, 'import requests\n'), ((417, 448), 'bs4.BeautifulSoup', 'BeautifulSoup', (['res.text', '"""lxml"""'], {}), "(res.text, 'lxml')\n", (430, 448), False, 'from bs4 import BeautifulSoup\n'), ((1077, 1109), 'requests.get', 'requests.ge...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
[ "angus_display.blur", "angus_display.displayHair", "cv2.imencode", "cv2.imshow", "angus_display.displayAnimation", "angus_display.displayAge", "angus_display.displayGaze", "cv2.cvtColor", "angus_display.displayAvatar", "angus_display.display_logo", "cv2.destroyAllWindows", "datetime.datetime.n...
[((995, 1025), 'cv2.VideoCapture', 'cv2.VideoCapture', (['stream_index'], {}), '(stream_index)\n', (1011, 1025), False, 'import cv2\n'), ((1407, 1429), 'stats.Stats', 'st.Stats', (['"""stats.json"""'], {}), "('stats.json')\n", (1415, 1429), True, 'import stats as st\n'), ((1478, 1493), 'angus.connect', 'angus.connect',...
from datetime import datetime import pytest from pydantic import ValidationError from datahub.configuration.time_window_config import BucketDuration, get_time_bucket from datahub.emitter.mcp import MetadataChangeProposalWrapper from datahub.ingestion.api.workunit import MetadataWorkUnit from datahub.ingestion.source....
[ "datahub.ingestion.source.usage.usage_common.BaseUsageConfig", "pytest.raises", "datahub.configuration.time_window_config.get_time_bucket", "datetime.datetime" ]
[((687, 707), 'datetime.datetime', 'datetime', (['(2020)', '(1)', '(1)'], {}), '(2020, 1, 1)\n', (695, 707), False, 'from datetime import datetime\n'), ((726, 773), 'datahub.configuration.time_window_config.get_time_bucket', 'get_time_bucket', (['event_time', 'BucketDuration.DAY'], {}), '(event_time, BucketDuration.DAY...
#!/usr/bin/python import paho.mqtt.publish as publish import RPi.GPIO as GPIO import subprocess import time import os #Define list of button parameters PIN_CONFIG = [ {'pin':20, 'mqttTopic':'home/htpc/power/restart'}, {'pin':21, 'mqttTopic':'home/htpc/power/off'}, {'pin':13, 'mqttTopic':'home/htpc/kodi/on'}, {'pin':1...
[ "RPi.GPIO.setmode", "RPi.GPIO.setup", "os.system", "time.sleep", "subprocess.call", "paho.mqtt.publish.single", "RPi.GPIO.add_event_detect" ]
[((2530, 2552), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BCM'], {}), '(GPIO.BCM)\n', (2542, 2552), True, 'import RPi.GPIO as GPIO\n'), ((628, 680), 'paho.mqtt.publish.single', 'publish.single', (['mqtt_topic', '""""""'], {'hostname': 'mqtt_broker'}), "(mqtt_topic, '', hostname=mqtt_broker)\n", (642, 680), True, 'imp...
import unittest from histogram_class import Histogram class Test_Histogram(unittest.TestCase): def test_add_to_histogram(self): h = Histogram() h.add("Apache") h.add("Apache") h.add("IIS") self.assertTrue(h.count("Apache") == 2) self.assertTrue(h.count("IIS") == 1...
[ "unittest.main", "histogram_class.Histogram" ]
[((580, 595), 'unittest.main', 'unittest.main', ([], {}), '()\n', (593, 595), False, 'import unittest\n'), ((147, 158), 'histogram_class.Histogram', 'Histogram', ([], {}), '()\n', (156, 158), False, 'from histogram_class import Histogram\n'), ((364, 375), 'histogram_class.Histogram', 'Histogram', ([], {}), '()\n', (373...
import os import logging from typing import Dict, List, Any, Union, Callable, NewType from ..common.absclient import AbstractPipelineComponent from ..grammar_tester.grammartester import GrammarTesterComponent from ..grammar_learner import GrammarLearnerComponent from ..text_parser import TextParserComponent from ..das...
[ "os.path.isdir", "os.makedirs", "logging.getLogger" ]
[((591, 618), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (608, 618), False, 'import logging\n'), ((2421, 2438), 'os.makedirs', 'os.makedirs', (['leaf'], {}), '(leaf)\n', (2432, 2438), False, 'import os\n'), ((982, 999), 'os.makedirs', 'os.makedirs', (['path'], {}), '(path)\n', (993, 9...
import discord,platform,os from discord.ext import commands t=os.environ['DISCORD_TOKEN'] pfx=os.environ['DISCORD_PFX'] hid=int(os.environ['HID']) async def is_owner(ctx): return ctx.author.id==hid client=commands.Bot(command_prefix=pfx,case_insensitive=True) @client.command() async def tst(ctx): await ctx.send...
[ "discord.Game", "discord.ext.commands.check", "platform.python_version", "discord.ext.commands.Bot" ]
[((209, 264), 'discord.ext.commands.Bot', 'commands.Bot', ([], {'command_prefix': 'pfx', 'case_insensitive': '(True)'}), '(command_prefix=pfx, case_insensitive=True)\n', (221, 264), False, 'from discord.ext import commands\n'), ((359, 383), 'discord.ext.commands.check', 'commands.check', (['is_owner'], {}), '(is_owner)...
from soteria.debug_support.boogie_output_parser import BoogieOutputParser class TestBoogieOutputParser: sample1 = '''input(168,1): Error BP5002: A precondition for this call might not hold. input(146,1): Related location: This is the precondition that might not hold. Execution trace: input(164,2): anon0 input(...
[ "soteria.debug_support.boogie_output_parser.BoogieOutputParser" ]
[((1083, 1103), 'soteria.debug_support.boogie_output_parser.BoogieOutputParser', 'BoogieOutputParser', ([], {}), '()\n', (1101, 1103), False, 'from soteria.debug_support.boogie_output_parser import BoogieOutputParser\n')]
# -*- coding: utf-8 -*- import logging import numpy as np import gensim from .common import MultiprocModelsRunner, MultiprocModelsWorkerABC, MultiprocEvaluationRunner, \ MultiprocEvaluationWorkerABC, dtm_to_gensim_corpus from .eval_metrics import metric_cao_juan_2009 AVAILABLE_METRICS = ( 'perplexity', # ...
[ "numpy.exp2", "gensim.models.ldamodel.LdaModel", "logging.getLogger" ]
[((393, 423), 'logging.getLogger', 'logging.getLogger', (['"""tmtoolkit"""'], {}), "('tmtoolkit')\n", (410, 423), False, 'import logging\n'), ((630, 652), 'numpy.exp2', 'np.exp2', (['(-perwordbound)'], {}), '(-perwordbound)\n', (637, 652), True, 'import numpy as np\n'), ((869, 916), 'gensim.models.ldamodel.LdaModel', '...
# -*- coding: utf-8 -*- import queue import select import signal import socket import sys import threading class Client: def __init__(self, host, port, sq, rq): self._host = host self._port = port self._connect() self._send_q = sq self._recv_q = rq ...
[ "threading.Thread", "socket.socket", "socket.getaddrinfo", "select.select", "threading.Event", "signal.signal" ]
[((440, 457), 'threading.Event', 'threading.Event', ([], {}), '()\n', (455, 457), False, 'import threading\n'), ((489, 532), 'threading.Thread', 'threading.Thread', ([], {'target': 'self._receive_data'}), '(target=self._receive_data)\n', (505, 532), False, 'import threading\n'), ((728, 813), 'socket.getaddrinfo', 'sock...
# Generated by Django 2.2.10 on 2020-03-07 07:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('anijung', '0002_quote'), ] operations = [ migrations.AlterField( model_name='quote', ...
[ "django.db.models.ForeignKey" ]
[((354, 463), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""anijung.Case"""'}), "(blank=True, null=True, on_delete=django.db.models.\n deletion.CASCADE, to='anijung.Case')\n", (371, 463), False, 'from django....
__all__ = [ "C2TConfig" , "Run" , "get_new_rsp" , "DebugClient" , "DebugServer" , "TestBuilder" ] from collections import ( namedtuple ) from common import ( pypath ) with pypath("..pyrsp"): from pyrsp.rsp import ( RSP, archmap ) # CPU Testing Tool configuration component...
[ "common.pypath", "collections.namedtuple" ]
[((334, 422), 'collections.namedtuple', 'namedtuple', (['"""C2TConfig"""', '"""rsp_target qemu gdbserver target_compiler oracle_compiler"""'], {}), "('C2TConfig',\n 'rsp_target qemu gdbserver target_compiler oracle_compiler')\n", (344, 422), False, 'from collections import namedtuple\n'), ((435, 471), 'collections.n...
# -*- coding: utf-8 -*- import warnings import numpy as np import pandas as pd import pytest with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=DeprecationWarning) import xarray as xr from snl_d3d_cec_verify.cases import CaseStudy from snl_d3d_cec_verify.result.faces import (_check_c...
[ "snl_d3d_cec_verify.result.faces._get_quadrilateral_centre", "pandas.read_csv", "numpy.isclose", "snl_d3d_cec_verify.result.faces._faces_frame_to_slice", "snl_d3d_cec_verify.result.faces._trim_to_faces_frame", "pytest.mark.parametrize", "pytest.raises", "warnings.catch_warnings", "snl_d3d_cec_verify...
[((10168, 10233), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""x, y"""', "[('mock', None), (None, 'mock')]"], {}), "('x, y', [('mock', None), (None, 'mock')])\n", (10191, 10233), False, 'import pytest\n'), ((101, 126), 'warnings.catch_warnings', 'warnings.catch_warnings', ([], {}), '()\n', (124, 126), Fa...
import colorsys import math import os import random from decimal import Decimal import hpbandster.core.result as hpres import matplotlib.pyplot as plt import numpy as np # smallest value is best -> reverse_loss = True # largest value is best -> reverse_loss = False REVERSE_LOSS = True EXP_LOSS = 1 OUTLIER_PERC_WORST ...
[ "matplotlib.pyplot.title", "numpy.mean", "numpy.arange", "colorsys.hls_to_rgb", "os.path.join", "numpy.std", "matplotlib.pyplot.yticks", "matplotlib.pyplot.subplots", "hpbandster.core.result.logged_results_to_HBS_result", "matplotlib.pyplot.show", "random.random", "matplotlib.pyplot.subplots_a...
[((445, 488), 'hpbandster.core.result.logged_results_to_HBS_result', 'hpres.logged_results_to_HBS_result', (['log_dir'], {}), '(log_dir)\n', (479, 488), True, 'import hpbandster.core.result as hpres\n'), ((2340, 2356), 'matplotlib.pyplot.title', 'plt.title', (['title'], {}), '(title)\n', (2349, 2356), True, 'import mat...
import pygame, sys from typing import List, Tuple import time from pygame.math import Vector2 from .snake import Snake from .eatable.mouse import Mouse from .model import Model from .eatable.sandglass import Sandglass from .eatable.peel import Peel from .components import sound_controller from .eatable.saw import Saw ...
[ "pygame.quit", "pygame.event.get", "pygame.display.set_mode", "pygame.mixer.pre_init", "pygame.init", "pygame.display.update", "pygame.time.Clock", "pygame.time.set_timer", "sys.exit" ]
[((584, 623), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(xSize, ySize)'], {}), '((xSize, ySize))\n', (607, 623), False, 'import pygame, sys\n'), ((720, 739), 'pygame.time.Clock', 'pygame.time.Clock', ([], {}), '()\n', (737, 739), False, 'import pygame, sys\n'), ((777, 818), 'pygame.mixer.pre_init', 'pyga...
#!/usr/bin/python import os import doxy.module as module import doxy.debug as debug import doxy.tools as tools def create(target, module_name): my_module = module.Module(__file__, module_name) my_module.set_version("version.txt") my_module.set_title("$N gesture recognition") my_module.set_website("http://atria-sof...
[ "doxy.module.Module" ]
[((158, 194), 'doxy.module.Module', 'module.Module', (['__file__', 'module_name'], {}), '(__file__, module_name)\n', (171, 194), True, 'import doxy.module as module\n')]
import numpy as np import pandas as pd from pytest import approx from lenskit.topn import precision from lenskit.util.test import demo_recs from lenskit import topn def _test_prec(items, rel, **k): recs = pd.DataFrame({'item': items}) truth = pd.DataFrame({'item': rel}).set_index('item') return precisio...
[ "pandas.DataFrame", "pandas.Index", "numpy.arange", "pandas.Series", "numpy.array", "lenskit.topn.precision", "lenskit.topn.RecListAnalysis", "pytest.approx" ]
[((213, 242), 'pandas.DataFrame', 'pd.DataFrame', (["{'item': items}"], {}), "({'item': items})\n", (225, 242), True, 'import pandas as pd\n'), ((312, 339), 'lenskit.topn.precision', 'precision', (['recs', 'truth'], {}), '(recs, truth, **k)\n', (321, 339), False, 'from lenskit.topn import precision\n'), ((2499, 2513), ...
import re USERNAME_RE = re.compile(r"^[a-zA-Z0-9_-]{3,20}$") PASSWORD_RE = re.compile(r"^.{3,20}$") EMAIL_RE = re.compile(r'^[\S]+@[\S]+\.[\S]+$') USERNAME_ERROR = "That's not a valid username." PASSWORD_ERROR = "That wasn't a valid password." V_PASSWORD_ERROR = "Your passwords didn't match." EMAIL_ERROR =...
[ "re.compile" ]
[((29, 64), 're.compile', 're.compile', (['"""^[a-zA-Z0-9_-]{3,20}$"""'], {}), "('^[a-zA-Z0-9_-]{3,20}$')\n", (39, 64), False, 'import re\n'), ((81, 104), 're.compile', 're.compile', (['"""^.{3,20}$"""'], {}), "('^.{3,20}$')\n", (91, 104), False, 'import re\n'), ((118, 156), 're.compile', 're.compile', (['"""^[\\\\S]+@...
from threading import Thread, Semaphore from random import randint from time import sleep #global array to denote the airplanes in the air planes = [] tracks = [] planes_landed = -1 passengersDownloaded = 0 mutex = Semaphore(1) ops = Semaphore(0) bus = Semaphore(0) landingTrack = Semaphore(0) airplane = Semaphore(1...
[ "threading.Thread", "threading.Semaphore", "random.randint", "time.sleep" ]
[((219, 231), 'threading.Semaphore', 'Semaphore', (['(1)'], {}), '(1)\n', (228, 231), False, 'from threading import Thread, Semaphore\n'), ((238, 250), 'threading.Semaphore', 'Semaphore', (['(0)'], {}), '(0)\n', (247, 250), False, 'from threading import Thread, Semaphore\n'), ((257, 269), 'threading.Semaphore', 'Semaph...
import json from django.core.serializers.json import DjangoJSONEncoder from tastypie.serializers import Serializer class CustomJSONSerializer(Serializer): def to_json(self, data, options=None): options = options or {} data = self.to_simple(data, options) return json.dumps(data, cls=Djang...
[ "json.loads", "json.dumps" ]
[((294, 333), 'json.dumps', 'json.dumps', (['data'], {'cls': 'DjangoJSONEncoder'}), '(data, cls=DjangoJSONEncoder)\n', (304, 333), False, 'import json\n'), ((384, 403), 'json.loads', 'json.loads', (['content'], {}), '(content)\n', (394, 403), False, 'import json\n')]
from functools import lru_cache from typing import Dict import base64 try: from ..league_process import find_path_of_league except ValueError: from src.league_client_api.league_process import find_path_of_league def _read_lockfile() -> Dict: path = find_path_of_league() with open(path, 'r') as f: ...
[ "src.league_client_api.league_process.find_path_of_league" ]
[((264, 285), 'src.league_client_api.league_process.find_path_of_league', 'find_path_of_league', ([], {}), '()\n', (283, 285), False, 'from src.league_client_api.league_process import find_path_of_league\n')]
from st7920 import Screen from gfx import GFX from sysfont import sysfont import machine import time machine.freq(160000000) spi = machine.SPI(1, baudrate=80000000, polarity=1, phase=1) screen = Screen(slaveSelectPin=Pin(15), resetDisplayPin=Pin(5)) draw=GFX(128,64,screen.plot) #screen.set_rotation(2) screen.clear() ...
[ "machine.SPI", "time.ticks_ms", "gfx.GFX", "machine.freq", "time.ticks_diff" ]
[((102, 125), 'machine.freq', 'machine.freq', (['(160000000)'], {}), '(160000000)\n', (114, 125), False, 'import machine\n'), ((132, 186), 'machine.SPI', 'machine.SPI', (['(1)'], {'baudrate': '(80000000)', 'polarity': '(1)', 'phase': '(1)'}), '(1, baudrate=80000000, polarity=1, phase=1)\n', (143, 186), False, 'import m...
import click import tabulate from .module import SaraN211Module, PingError def connect_module(module: SaraN211Module, app_ctx): click.echo(click.style(f"Connecting to network...", fg="yellow", bold=True)) module.read_module_status() if app_ctx.apn: module.set_pdp_context(apn=app_ctx.apn) modu...
[ "click.argument", "click.echo", "click.option", "click.command", "tabulate.tabulate", "click.style" ]
[((634, 649), 'click.command', 'click.command', ([], {}), '()\n', (647, 649), False, 'import click\n'), ((1189, 1204), 'click.command', 'click.command', ([], {}), '()\n', (1202, 1204), False, 'import click\n'), ((1206, 1226), 'click.argument', 'click.argument', (['"""ip"""'], {}), "('ip')\n", (1220, 1226), False, 'impo...
import wtforms.ext.appengine.ndb as wtfndb import wtforms from google.appengine.ext import ndb from . import fields ### Additional Converters def add_convertor(property_type, converter_func): setattr(wtfndb.ModelConverter, 'convert_%s' % property_type, converter_func) def convert_UserProperty(self, model, prop,...
[ "wtforms.validators.email", "wtforms.validators.length" ]
[((542, 568), 'wtforms.validators.email', 'wtforms.validators.email', ([], {}), '()\n', (566, 568), False, 'import wtforms\n'), ((602, 636), 'wtforms.validators.length', 'wtforms.validators.length', ([], {'max': '(500)'}), '(max=500)\n', (627, 636), False, 'import wtforms\n')]
import aiohttp import json import copy from typing import Tuple from aiogqlc.utils import ( is_file_like, is_file_list_like, contains_file_variable, null_file_variables, ) class GraphQLClient: def __init__(self, endpoint: str, headers: dict = None) -> None: self.endpoint = endpoint ...
[ "aiogqlc.utils.null_file_variables", "copy.deepcopy", "aiohttp.FormData", "aiogqlc.utils.is_file_list_like", "aiogqlc.utils.is_file_like", "json.dumps", "aiohttp.ClientSession", "aiogqlc.utils.contains_file_variable" ]
[((400, 427), 'copy.deepcopy', 'copy.deepcopy', (['self.headers'], {}), '(self.headers)\n', (413, 427), False, 'import copy\n'), ((1884, 1902), 'aiohttp.FormData', 'aiohttp.FormData', ([], {}), '()\n', (1900, 1902), False, 'import aiohttp\n'), ((777, 807), 'aiogqlc.utils.null_file_variables', 'null_file_variables', (['...
import json from .settings import app_settings _cached_attrs = {} class Settings: """ A proxy to get or set app settings. """ def __getattr__(self, attr): if attr in _cached_attrs: return _cached_attrs[attr] return getattr(app_settings, attr, None) def __setattr__(s...
[ "json.load", "json.loads" ]
[((774, 794), 'json.loads', 'json.loads', (['settings'], {}), '(settings)\n', (784, 794), False, 'import json\n'), ((990, 1003), 'json.load', 'json.load', (['fp'], {}), '(fp)\n', (999, 1003), False, 'import json\n')]
#!/usr/bin/python3 # Auteur : <NAME> from tkinter import * import random, math, time, copy ### Variables globales ### height, width = 300, 100 goal = (width/4, 5*height/6) start = (3*width/4, height/6) refreshRate = 1 population = 100 generations = 100 firstGen = True goalReached = False won = False allDead = False...
[ "random.random", "copy.deepcopy", "math.sqrt" ]
[((4242, 4269), 'copy.deepcopy', 'copy.deepcopy', (['self.fittest'], {}), '(self.fittest)\n', (4255, 4269), False, 'import random, math, time, copy\n'), ((4386, 4407), 'copy.deepcopy', 'copy.deepcopy', (['fitDot'], {}), '(fitDot)\n', (4399, 4407), False, 'import random, math, time, copy\n'), ((1200, 1215), 'random.rand...
import numpy as np from skmultiflow.trees.nodes import ActiveLearningNodePerceptron from skmultiflow.trees.attribute_observer import NominalAttributeRegressionObserver from skmultiflow.trees.attribute_observer import NumericAttributeRegressionObserver from skmultiflow.utils import get_dimensions class RandomLearning...
[ "skmultiflow.trees.attribute_observer.NominalAttributeRegressionObserver", "skmultiflow.trees.attribute_observer.NumericAttributeRegressionObserver", "skmultiflow.utils.get_dimensions", "numpy.array" ]
[((1649, 1661), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (1657, 1661), True, 'import numpy as np\n'), ((3595, 3612), 'skmultiflow.utils.get_dimensions', 'get_dimensions', (['X'], {}), '(X)\n', (3609, 3612), False, 'from skmultiflow.utils import get_dimensions\n'), ((3867, 3903), 'skmultiflow.trees.attribute_o...
''' Populates the SQLite database with a user and a sequence with three components. ''' import json from pyelixys.web.database.model import session from pyelixys.web.database.model import Roles from pyelixys.web.database.model import User from pyelixys.web.database.model import Sequence from pyelixys.web.database.model...
[ "pyelixys.web.database.model.Roles", "pyelixys.web.database.model.Reagents", "hashlib.md5", "pyelixys.web.database.model.Sequence", "pyelixys.web.database.model.User", "pyelixys.web.database.model.session.add", "IPython.embed", "pyelixys.web.database.model.Component", "pyelixys.web.database.model.me...
[((545, 572), 'pyelixys.web.database.model.Roles', 'Roles', (['"""Administrator"""', '(255)'], {}), "('Administrator', 255)\n", (550, 572), False, 'from pyelixys.web.database.model import Roles\n'), ((577, 594), 'pyelixys.web.database.model.session.add', 'session.add', (['role'], {}), '(role)\n', (588, 594), False, 'fr...
from os import path from dbt_airflow_factory.airflow_dag_factory import AirflowDagFactory from dbt_airflow_factory.operator import EphemeralOperator from tests.utils import task_group_prefix_builder, test_dag def _get_ephemeral_name(model_name: str) -> str: return f"{model_name}__ephemeral" def test_ephemeral_...
[ "tests.utils.task_group_prefix_builder", "os.path.abspath", "tests.utils.test_dag" ]
[((1328, 1338), 'tests.utils.test_dag', 'test_dag', ([], {}), '()\n', (1336, 1338), False, 'from tests.utils import task_group_prefix_builder, test_dag\n'), ((1624, 1667), 'tests.utils.task_group_prefix_builder', 'task_group_prefix_builder', (['"""model1"""', '"""test"""'], {}), "('model1', 'test')\n", (1649, 1667), Fa...
import os import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from gottesdienstplan import GoDiPlanChecker MAIL_TEXT_TEMPLATE = """ Hallo, im Gottesdienstplan scheint es einen Fehler, bzw. einen fehlenden Eintrag zu geben. Bitte ergänze die fehlende Information oder kor...
[ "os.environ.get", "email.mime.multipart.MIMEMultipart", "smtplib.SMTP", "gottesdienstplan.GoDiPlanChecker" ]
[((1848, 1877), 'os.environ.get', 'os.environ.get', (['"""MAIL_DOMAIN"""'], {}), "('MAIL_DOMAIN')\n", (1862, 1877), False, 'import os\n'), ((1887, 1927), 'gottesdienstplan.GoDiPlanChecker', 'GoDiPlanChecker', ([], {'mail_domain': 'MAIL_DOMAIN'}), '(mail_domain=MAIL_DOMAIN)\n', (1902, 1927), False, 'from gottesdienstpla...
#En este modulo se almacenan todas las rutas del proyecto from flask import request, render_template, redirect, flash from flask.views import MethodView #Este modulo importa la logica de la clase MethodView from src.db import mysql class IndexController(MethodView): #Heredo de methodview def get(self): w...
[ "src.db.mysql.cursor", "flask.redirect", "flask.flash", "flask.render_template" ]
[((3247, 3288), 'flask.render_template', 'render_template', (['"""public/categories.html"""'], {}), "('public/categories.html')\n", (3262, 3288), False, 'from flask import request, render_template, redirect, flash\n'), ((324, 338), 'src.db.mysql.cursor', 'mysql.cursor', ([], {}), '()\n', (336, 338), False, 'from src.db...
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy from sample_py.msg import sample_message def callback(msg): rospy.loginfo("I heard: message = [%s], count = [%d]" % (msg.message, msg.count)); def subscriber(): rospy.init_node('sample_py_subscriber', anonymous=True) rospy.Subscriber('sample_topic...
[ "rospy.loginfo", "rospy.spin", "rospy.Subscriber", "rospy.init_node" ]
[((122, 208), 'rospy.loginfo', 'rospy.loginfo', (["('I heard: message = [%s], count = [%d]' % (msg.message, msg.count))"], {}), "('I heard: message = [%s], count = [%d]' % (msg.message, msg.\n count))\n", (135, 208), False, 'import rospy\n'), ((229, 284), 'rospy.init_node', 'rospy.init_node', (['"""sample_py_subscri...
import numpy as np import theano import lasagne ## ALIASES ## L = lasagne.layers T = theano.tensor get_output = L.get_output get_all_params = L.get_all_params cross_entropy = lasagne.objectives.categorical_crossentropy get_layers = L.get_all_layers class Network(object): """ Wrapper for neural networks for M...
[ "numpy.load", "theano.function", "numpy.zeros", "numpy.array", "numpy.savez" ]
[((904, 917), 'numpy.zeros', 'np.zeros', (['(500)'], {}), '(500)\n', (912, 917), True, 'import numpy as np\n'), ((945, 958), 'numpy.zeros', 'np.zeros', (['(500)'], {}), '(500)\n', (953, 958), True, 'import numpy as np\n'), ((2183, 2238), 'theano.function', 'theano.function', (['[self.input_var]', 'self.test_prediction'...
import logging import os from datetime import timedelta import alpaca_trade_api import faust from alpaca_trade_api.common import URL from faust import Worker app = faust.App( 'stock-app', broker='kafka://localhost:9092', value_serializer='json', store='rocksdb://', version=1, ) ALPACA_BASE_URL = ...
[ "alpaca_trade_api.REST", "alpaca_trade_api.common.URL", "logging.info", "datetime.timedelta", "faust.Worker", "os.getenv", "faust.App" ]
[((166, 282), 'faust.App', 'faust.App', (['"""stock-app"""'], {'broker': '"""kafka://localhost:9092"""', 'value_serializer': '"""json"""', 'store': '"""rocksdb://"""', 'version': '(1)'}), "('stock-app', broker='kafka://localhost:9092', value_serializer=\n 'json', store='rocksdb://', version=1)\n", (175, 282), False,...
# Copyright 2019 Graphcore Ltd. """ Dataset reader from Datalogue keras-attention tutorial. References: https://github.com/datalogue/keras-attention https://medium.com/datalogue """ import json import csv import random import numpy as np # from keras.utils.np_utils import to_categorical INPUT_PADDING = ...
[ "random.sample", "json.load", "csv.reader", "numpy.array" ]
[((683, 695), 'json.load', 'json.load', (['f'], {}), '(f)\n', (692, 695), False, 'import json\n'), ((3124, 3137), 'csv.reader', 'csv.reader', (['f'], {}), '(f)\n', (3134, 3137), False, 'import csv\n'), ((4146, 4184), 'random.sample', 'random.sample', (['instance_id', 'batch_size'], {}), '(instance_id, batch_size)\n', (...
# coding: utf-8 # pylint: disable=invalid-name, exec-used """Setup lightgbm package.""" from __future__ import absolute_import import os import sys from setuptools import find_packages, setup sys.path.insert(0, '.') CURRENT_DIR = os.path.dirname(__file__) libpath_py = os.path.join(CURRENT_DIR, 'lightgbm/libpath.py...
[ "os.path.dirname", "sys.path.insert", "os.path.relpath", "os.path.join", "setuptools.find_packages" ]
[((195, 218), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""."""'], {}), "(0, '.')\n", (210, 218), False, 'import sys\n'), ((234, 259), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (249, 259), False, 'import os\n'), ((274, 322), 'os.path.join', 'os.path.join', (['CURRENT_DIR', '"""ligh...
"""entries table Revision ID: 11848f9f4372 Revises: e<PASSWORD> Create Date: 2021-05-20 13:39:16.441005 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '11848f9f4372' down_revision = 'eb<PASSWORD>d363477' branch_labels = None depends_on = None def upgrade(): ...
[ "alembic.op.drop_table", "alembic.op.f", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Boolean", "sqlalchemy.String", "sqlalchemy.Integer" ]
[((2396, 2421), 'alembic.op.drop_table', 'op.drop_table', (['"""handover"""'], {}), "('handover')\n", (2409, 2421), False, 'from alembic import op\n'), ((1103, 1135), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""ho_id"""'], {}), "('ho_id')\n", (1126, 1135), True, 'import sqlalchemy as sa\n'), ((1...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'float_display_dialog.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_FloatDisplayDialog(object): def setupUi(self, FloatDisp...
[ "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QWidget", "PyQt5.QtWidgets.QRadioButton", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QDialogButtonBox", "PyQt5.QtWidgets.QSpinBox", "PyQt5.QtWidgets.Q...
[((577, 614), 'PyQt5.QtWidgets.QWidget', 'QtWidgets.QWidget', (['FloatDisplayDialog'], {}), '(FloatDisplayDialog)\n', (594, 614), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((771, 811), 'PyQt5.QtWidgets.QVBoxLayout', 'QtWidgets.QVBoxLayout', (['self.layoutWidget'], {}), '(self.layoutWidget)\n', (792, 811),...
#!python from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ObjectProperty from kivy.base import EventLoop from kivy.lang import Builder class Scaler(Widget): scale = NumericProperty(2) container = ObjectProperty(None) def __init__(self, **kwargs): from kivy.base impor...
[ "kivy.base.EventLoop.add_postproc_module", "kivy.properties.NumericProperty", "kivy.lang.Builder.load_string", "kivy.properties.ObjectProperty" ]
[((201, 219), 'kivy.properties.NumericProperty', 'NumericProperty', (['(2)'], {}), '(2)\n', (216, 219), False, 'from kivy.properties import NumericProperty, ObjectProperty\n'), ((236, 256), 'kivy.properties.ObjectProperty', 'ObjectProperty', (['None'], {}), '(None)\n', (250, 256), False, 'from kivy.properties import Nu...
import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.manager import Session from . import db log = logging.getLogger('archive') class Archive: """ Archives all new items into database where they can be later searched and injected. ...
[ "flexget.entry.Entry", "flexget.event.event", "flexget.manager.Session", "flexget.plugin.register", "re.sub", "logging.getLogger" ]
[((178, 206), 'logging.getLogger', 'logging.getLogger', (['"""archive"""'], {}), "('archive')\n", (195, 206), False, 'import logging\n'), ((4535, 4559), 'flexget.event.event', 'event', (['"""plugin.register"""'], {}), "('plugin.register')\n", (4540, 4559), False, 'from flexget.event import event\n'), ((4587, 4633), 'fl...
from cached import Resource from lib.paypal.client import get_client from lib.paypal.forms import (CheckPermission, GetPermissionToken, GetPermissionURL) class GetPermissionURLResource(Resource): class Meta(Resource.Meta): resource_name = 'permission-url' list_allow...
[ "lib.paypal.forms.GetPermissionToken", "lib.paypal.client.get_client" ]
[((867, 898), 'lib.paypal.forms.GetPermissionToken', 'GetPermissionToken', (['bundle.data'], {}), '(bundle.data)\n', (885, 898), False, 'from lib.paypal.forms import CheckPermission, GetPermissionToken, GetPermissionURL\n'), ((990, 1002), 'lib.paypal.client.get_client', 'get_client', ([], {}), '()\n', (1000, 1002), Fal...
from typing import Union, ClassVar import sty from colour import Color from autopalette.colormatch import ColorPoint, AnsiCodeType from autopalette.palette import Ansi256Palette, Ansi16Palette, Ansi8Palette from autopalette.utils import rgb_to_RGB255 OptionalColor = Union['Color', None] OptionalPalette = ClassVar['B...
[ "autopalette.colormatch.ColorPoint", "sty.fg", "autopalette.utils.rgb_to_RGB255", "sty.bg", "autopalette.palette.Ansi256Palette" ]
[((1771, 1786), 'sty.fg', 'sty.fg', (['fg.ansi'], {}), '(fg.ansi)\n', (1777, 1786), False, 'import sty\n'), ((3653, 3677), 'autopalette.utils.rgb_to_RGB255', 'rgb_to_RGB255', (['color.rgb'], {}), '(color.rgb)\n', (3666, 3677), False, 'from autopalette.utils import rgb_to_RGB255\n'), ((3693, 3728), 'autopalette.colormat...
import logging from src.evaluation.stats import stats_evaluation console = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') console.setFormatter(formatter) LOG = logging.getLogger("Random Dataset Validator") LOG.addHandler(console) LOG.setLevel(logging.INFO...
[ "logging.Formatter", "src.evaluation.stats.stats_evaluation", "logging.StreamHandler", "logging.getLogger" ]
[((77, 100), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (98, 100), False, 'import logging\n'), ((113, 186), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""'], {}), "('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n", (130, 186), F...
#!/usr/bin/env false """TODO: Write """ # Internal packages (absolute references, distributed with Python) # External packages (absolute references, NOT distributed with Python) # Library modules (absolute references, NOT packaged, in project) from utility import my_assert as is_ # Project modules (relative refere...
[ "utility.my_assert.nonempty_string", "utility.my_assert.absolute_path", "utility.my_assert.absolute_directory" ]
[((432, 454), 'utility.my_assert.nonempty_string', 'is_.nonempty_string', (['v'], {}), '(v)\n', (451, 454), True, 'from utility import my_assert as is_\n'), ((529, 549), 'utility.my_assert.absolute_path', 'is_.absolute_path', (['v'], {}), '(v)\n', (546, 549), True, 'from utility import my_assert as is_\n'), ((674, 694)...
from tethys_dataset_services.valid_engines import VALID_ENGINES, VALID_SPATIAL_ENGINES class DatasetService: """ Used to define dataset services for apps. """ def __init__(self, name, type, endpoint, apikey=None, username=None, password=None): """ Constructor """ self....
[ "tethys_dataset_services.valid_engines.VALID_SPATIAL_ENGINES.keys", "tethys_dataset_services.valid_engines.VALID_ENGINES.keys" ]
[((671, 691), 'tethys_dataset_services.valid_engines.VALID_ENGINES.keys', 'VALID_ENGINES.keys', ([], {}), '()\n', (689, 691), False, 'from tethys_dataset_services.valid_engines import VALID_ENGINES, VALID_SPATIAL_ENGINES\n'), ((2187, 2215), 'tethys_dataset_services.valid_engines.VALID_SPATIAL_ENGINES.keys', 'VALID_SPAT...
import pytest import mxnet as mx import numpy as np from mxfusion.components.variables.runtime_variable import add_sample_dimension, array_has_samples, get_num_samples from mxfusion.components.distributions import Laplace from mxfusion.util.testutils import numpy_array_reshape, plot_univariate from mxfusion.util.testut...
[ "numpy.abs", "mxfusion.util.testutils.plot_univariate", "numpy.random.laplace", "mxfusion.components.variables.runtime_variable.array_has_samples", "numpy.random.rand", "mxfusion.components.distributions.Laplace.define_variable", "scipy.stats.laplace.logpdf", "numpy.array", "mxnet.nd.array", "mxfu...
[((391, 426), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""set_seed"""'], {}), "('set_seed')\n", (414, 426), False, 'import pytest\n'), ((1594, 1651), 'mxfusion.util.testutils.numpy_array_reshape', 'numpy_array_reshape', (['location', 'location_is_samples', 'n_dim'], {}), '(location, location_is_samples,...
# -*- encoding: utf-8 -*- # ====================================================================== """ Copyright and other protections apply. Please see the accompanying :doc:`LICENSE <LICENSE>` and :doc:`CREDITS <CREDITS>` file(s) for rights and restrictions governing use of this software. All rights not expressly wai...
[ "future.standard_library.install_aliases", "gettext.gettext" ]
[((1189, 1206), 'future.standard_library.install_aliases', 'install_aliases', ([], {}), '()\n', (1204, 1206), False, 'from future.standard_library import install_aliases\n'), ((1709, 1730), 'gettext.gettext', 'gettext', (['"""Emojiwatch"""'], {}), "('Emojiwatch')\n", (1716, 1730), False, 'from gettext import gettext\n'...
from django.core.management.base import BaseCommand from oms_cms.backend.menu.models import Menu, MenuItem class Command(BaseCommand): help = 'Add menu' def handle(self, *args, **options): menu = Menu.objects.create(name="Верхнее") MenuItem.objects.create(title="Главная", name="home", menu=me...
[ "oms_cms.backend.menu.models.MenuItem.objects.create", "oms_cms.backend.menu.models.Menu.objects.create" ]
[((215, 250), 'oms_cms.backend.menu.models.Menu.objects.create', 'Menu.objects.create', ([], {'name': '"""Верхнее"""'}), "(name='Верхнее')\n", (234, 250), False, 'from oms_cms.backend.menu.models import Menu, MenuItem\n'), ((259, 334), 'oms_cms.backend.menu.models.MenuItem.objects.create', 'MenuItem.objects.create', ([...
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
[ "random.Random" ]
[((1135, 1148), 'random.Random', 'Random', (['*args'], {}), '(*args)\n', (1141, 1148), False, 'from random import Random\n')]
# -*- coding: utf-8 -*- ################################################################################ # Copyright (c) 2014 McAfee Inc. - All Rights Reserved. ################################################################################ # Run with python -m unittest dxlclient.test.test_dxlclient import unittest ...
[ "dxlclient.Response", "dxlclient.DxlClientConfig.create_dxl_config_from_file", "dxlclient.Request", "dxlclient.EventCallback", "unittest.main", "nose_parameterized.parameterized.expand", "dxlclient.RequestCallback", "dxlclient.DxlClient", "dxlclient.Event", "dxlclient.Broker", "nose.plugins.attr...
[((19945, 19959), 'nose.plugins.attrib.attr', 'attr', (['"""system"""'], {}), "('system')\n", (19949, 19959), False, 'from nose.plugins.attrib import attr\n'), ((2399, 2437), 'nose_parameterized.parameterized.expand', 'parameterized.expand', (["[(None,), ('',)]"], {}), "([(None,), ('',)])\n", (2419, 2437), False, 'from...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((3941, 3982), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""awsConnectionStatus"""'}), "(name='awsConnectionStatus')\n", (3954, 3982), False, 'import pulumi\n'), ((4223, 4256), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""azureStatus"""'}), "(name='azureStatus')\n", (4236, 4256), False, 'import pulumi\n'...
import unittest import os import sys if sys.version_info[0] >= 3: from unittest import mock else: import mock from oslo_concurrency import lockutils import scipy.sparse import openml from openml import OpenMLDataset from openml.exceptions import OpenMLCacheException, PyOpenMLError from openml.testing import ...
[ "openml.datasets.functions._get_cached_datasets", "os.remove", "openml.datasets.list_datasets", "openml.config.set_cache_directory", "os.path.join", "openml.datasets.functions._create_dataset_cache_directory", "openml.datasets.functions._get_cached_dataset", "os.path.exists", "openml.OpenMLDataset",...
[((2007, 2068), 'mock.patch', 'mock.patch', (['"""openml.datasets.functions._list_cached_datasets"""'], {}), "('openml.datasets.functions._list_cached_datasets')\n", (2017, 2068), False, 'import mock\n'), ((5237, 5308), 'unittest.skip', 'unittest.skip', (['"""See https://github.com/openml/openml-python/issues/149"""'],...
from __future__ import print_function import argparse import logging import sys import os import numpy as np import matplotlib.pyplot as plt from .config import EXT from .fileio import read_binned_sfh from .utils import convertz, parse_pipeline, float2sci logger = logging.getLogger() def mh2z(num): return 0.02...
[ "matplotlib.pyplot.savefig", "numpy.sum", "argparse.ArgumentParser", "numpy.abs", "os.path.join", "matplotlib.pyplot.close", "matplotlib.pyplot.legend", "numpy.nonzero", "numpy.append", "numpy.diff", "numpy.array", "matplotlib.ticker.NullFormatter", "numpy.mean", "matplotlib.pyplot.subplot...
[((268, 287), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (285, 287), False, 'import logging\n'), ((14995, 15048), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Plot match sfh"""'}), "(description='Plot match sfh')\n", (15018, 15048), False, 'import argparse\n'), ((373, ...
import torch from cupy_kernel import cupyKernel import numpy as np import math kernel = ''' extern "C" __inline__ __device__ int hash(int value, int range, int a, int b) { int h = a * value + b; h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; h ^= h >> 16; return h % range; } ...
[ "math.ceil", "torch.FloatTensor", "torch.zeros", "torch.cuda.sparse.FloatTensor", "cupy_kernel.cupyKernel", "torch.cuda.current_stream" ]
[((2143, 2189), 'cupy_kernel.cupyKernel', 'cupyKernel', (['kernel', '"""cms_hash_update_retrieve"""'], {}), "(kernel, 'cms_hash_update_retrieve')\n", (2153, 2189), False, 'from cupy_kernel import cupyKernel\n'), ((2935, 2987), 'torch.cuda.sparse.FloatTensor', 'torch.cuda.sparse.FloatTensor', (['indices', 'result', 'siz...
import argparse import warnings import librosa from tqdm import tqdm SAMPLE_RATE = 16000 def read_audio_and_text(inputs): audio_path = inputs['file_path'] audio, sr = librosa.load(audio_path, sr=SAMPLE_RATE, mono=True) return audio.size / float(sr) def process_line(args, line): filename, language,...
[ "tqdm.tqdm", "librosa.load", "warnings.simplefilter", "argparse.ArgumentParser" ]
[((179, 230), 'librosa.load', 'librosa.load', (['audio_path'], {'sr': 'SAMPLE_RATE', 'mono': '(True)'}), '(audio_path, sr=SAMPLE_RATE, mono=True)\n', (191, 230), False, 'import librosa\n'), ((817, 879), 'warnings.simplefilter', 'warnings.simplefilter', ([], {'action': '"""ignore"""', 'category': 'FutureWarning'}), "(ac...
'''OpenGL extension SUN.convolution_border_modes Automatically generated by the get_gl_extensions script, do not edit! ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_SUN_convolution_border_modes' _DEPRECATED = Fa...
[ "OpenGL.constant.Constant", "OpenGL.extensions.hasGLExtension" ]
[((345, 391), 'OpenGL.constant.Constant', 'constant.Constant', (['"""GL_WRAP_BORDER_SUN"""', '(33236)'], {}), "('GL_WRAP_BORDER_SUN', 33236)\n", (362, 391), False, 'from OpenGL import platform, constants, constant, arrays\n'), ((519, 560), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['EXTENSION_NA...
from datetime import datetime, timedelta from random import shuffle from flask import request from flask_restful import Resource, abort from sqlalchemy.sql.expression import func from backend.model.project import FluencyProject from backend.model.result import FluencyResultSchema, FluencyResult from backend.model.pro...
[ "sqlalchemy.sql.expression.func.rand", "backend.model.project_status.ProjectStatus.query.get", "flask_restful.abort", "backend.model.summary.Summary.query.get", "backend.model.project_status.ProjectStatus.query.filter_by", "datetime.datetime.utcnow", "flask.request.get_json", "backend.model.ma.Nested"...
[((712, 742), 'backend.model.ma.Nested', 'ma.Nested', (['FluencyResultSchema'], {}), '(FluencyResultSchema)\n', (721, 742), False, 'from backend.model import ma, db\n'), ((757, 781), 'backend.model.ma.Nested', 'ma.Nested', (['SummarySchema'], {}), '(SummarySchema)\n', (766, 781), False, 'from backend.model import ma, d...
from datetime import datetime from itertools import chain from rest_framework.response import Response from rest_framework.views import APIView from .models import User, Character from .serializers import * from rest_framework import generics from rest_framework.permissions import IsAuthenticated, IsAdminUser from res...
[ "rest_framework.decorators.permission_classes", "datetime.datetime.strptime", "rest_framework.response.Response", "itertools.chain" ]
[((416, 453), 'rest_framework.decorators.permission_classes', 'permission_classes', (['[IsAuthenticated]'], {}), '([IsAuthenticated])\n', (434, 453), False, 'from rest_framework.decorators import api_view, permission_classes\n'), ((599, 636), 'rest_framework.decorators.permission_classes', 'permission_classes', (['[IsA...
# MB-Lab # # Сайт ветки MB-Lab: https://github.com/animate1978/MB-Lab # Сайт ветки перевода на русский язык MB-Lab: https://github.com/SergeyRom-23/MB-Lab-master-RU # # ##### НАЧАЛО ЛИЦЕНЗИОННОГО БЛОКА GPL ##### # # Эта программа является свободным программным обеспечением; Вы можете распространять его и / или # измени...
[ "json.dump", "bpy.ops.import_anim.bvh", "os.path.isdir", "mathutils.Quaternion", "bpy.ops.nla.bake", "bpy.context.view_layer.update", "time.time", "os.path.isfile", "mathutils.Vector", "mathutils.Euler", "os.path.splitext", "functools.lru_cache", "os.path.join", "os.listdir", "logging.ge...
[((1309, 1336), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1326, 1336), False, 'import logging\n'), ((14611, 14631), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(2)'}), '(maxsize=2)\n', (14620, 14631), False, 'from functools import lru_cache\n'), ((1574, 1641), 'os.path.joi...
from sanic_restplus import Api from .cat import api as cat_api from .dog import api as dog_api api = Api( title='Zoo API', version='1.0', description='A simple demo API', additional_css="/static/testme.css" ) api.add_namespace(cat_api) api.add_namespace(dog_api)
[ "sanic_restplus.Api" ]
[((103, 212), 'sanic_restplus.Api', 'Api', ([], {'title': '"""Zoo API"""', 'version': '"""1.0"""', 'description': '"""A simple demo API"""', 'additional_css': '"""/static/testme.css"""'}), "(title='Zoo API', version='1.0', description='A simple demo API',\n additional_css='/static/testme.css')\n", (106, 212), False,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 18 10:12:42 2020 @author: shlomi """ from PW_paths import work_yuval ims_path = work_yuval / 'IMS_T' gis_path = work_yuval / 'gis' awd_path = work_yuval/'AW3D30' def interpolate_var_ds_at_multiple_dts(var_ds, geo_var_df, predict_df, ...
[ "numpy.abs", "numpy.polyfit", "sklearn.metrics.r2_score", "numpy.isnan", "seaborn.regplot", "numpy.mean", "numpy.arange", "numpy.exp", "aux_gps.coarse_dem", "salem.read_shapefile", "sklearn.model_selection.RepeatedKFold", "pandas.DataFrame", "matplotlib.pyplot.axvline", "numpy.meshgrid", ...
[((515, 529), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (527, 529), True, 'import pandas as pd\n'), ((1408, 1438), 'pandas.to_datetime', 'pd.to_datetime', (["df['datetime']"], {}), "(df['datetime'])\n", (1422, 1438), True, 'import pandas as pd\n'), ((2602, 2656), 'xarray.load_dataset', 'xr.load_dataset', ([...
# coding=utf-8 __author__ = 'zouxin' import xlrd import xlwt class xlsUtil: heading_xf = xlwt.easyxf('font: bold on; align:wrap on, vert centre, horiz center') @staticmethod def write_xls(sheet_name, headings, data): heading_xf = xlsUtil.heading_xf # data_xfs = [WriteXLSUtil.kind_to_xf...
[ "xlrd.open_workbook", "xlwt.easyxf" ]
[((98, 168), 'xlwt.easyxf', 'xlwt.easyxf', (['"""font: bold on; align:wrap on, vert centre, horiz center"""'], {}), "('font: bold on; align:wrap on, vert centre, horiz center')\n", (109, 168), False, 'import xlwt\n'), ((1062, 1091), 'xlrd.open_workbook', 'xlrd.open_workbook', (['file_name'], {}), '(file_name)\n', (1080...
"""Execute time benchmarks in a separate python session for each config.""" import os from typing import Iterable, Tuple from run_time_evecs import __name__ as SCRIPT from run_time_evecs import get_output_file from shared import layerwise_group, one_group from shared_call import run from shared_evecs import ( fra...
[ "shared_call.run", "os.path.exists", "run_time_evecs.get_output_file" ]
[((2137, 2208), 'run_time_evecs.get_output_file', 'get_output_file', (['architecture', 'device', 'param_groups', 'computations', 'N', 'K'], {}), '(architecture, device, param_groups, computations, N, K)\n', (2152, 2208), False, 'from run_time_evecs import get_output_file\n'), ((2242, 2267), 'os.path.exists', 'os.path.e...
# -*- coding: utf-8 -*- import data_quality_controller as controller def test_check_email(): assert controller.check_email("<EMAIL>") is True assert controller.check_email("totododo") is False def test_check_ip(): assert controller.check_ip("192.168.127.12") is True assert controller.check_ip("130.x...
[ "data_quality_controller.perform_full_check", "data_quality_controller.check_email", "data_quality_controller.check_ip" ]
[((106, 139), 'data_quality_controller.check_email', 'controller.check_email', (['"""<EMAIL>"""'], {}), "('<EMAIL>')\n", (128, 139), True, 'import data_quality_controller as controller\n'), ((159, 193), 'data_quality_controller.check_email', 'controller.check_email', (['"""totododo"""'], {}), "('totododo')\n", (181, 19...
import unittest import rx from rx import operators as ops from rx.testing import TestScheduler, ReactiveTest, is_prime on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = ReactiveTest.subscribed disposed = ReactiveTes...
[ "rx.operators.take_while_indexed", "rx.testing.is_prime", "rx.testing.TestScheduler", "rx.operators.take_while" ]
[((472, 487), 'rx.testing.TestScheduler', 'TestScheduler', ([], {}), '()\n', (485, 487), False, 'from rx.testing import TestScheduler, ReactiveTest, is_prime\n'), ((1335, 1350), 'rx.testing.TestScheduler', 'TestScheduler', ([], {}), '()\n', (1348, 1350), False, 'from rx.testing import TestScheduler, ReactiveTest, is_pr...
from geojson import LineString, Feature, FeatureCollection, Point import geojson def simple_output(parser, place_data): for d in place_data: print('{0}, {1}, {2}'.format(d.name, d.address, d.opening_hours_text)) def geojson_output(parser, place_data): features = [] route = LineString(list(map(lamb...
[ "geojson.Point", "geojson.Feature", "geojson.FeatureCollection", "geojson.dumps" ]
[((387, 410), 'geojson.Feature', 'Feature', ([], {'geometry': 'route'}), '(geometry=route)\n', (394, 410), False, 'from geojson import LineString, Feature, FeatureCollection, Point\n'), ((595, 622), 'geojson.FeatureCollection', 'FeatureCollection', (['features'], {}), '(features)\n', (612, 622), False, 'from geojson im...
# =============================================================================== # Copyright 2012 <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/...
[ "traits.api.Float", "traitsui.api.EnumEditor", "traits.api.Str", "traitsui.api.Item" ]
[((1193, 1201), 'traits.api.Float', 'Float', (['(1)'], {}), '(1)\n', (1198, 1201), False, 'from traits.api import Float, Str\n'), ((1213, 1221), 'traits.api.Float', 'Float', (['(1)'], {}), '(1)\n', (1218, 1221), False, 'from traits.api import Float, Str\n'), ((1276, 1298), 'traits.api.Float', 'Float', (['_default_perio...
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 core.models import Tag from post.serializers import TagSerializer TAGS_URL = reverse('post:tag-list') class PublicTagsApi...
[ "core.models.Tag.objects.create", "core.models.Tag.objects.filter", "post.serializers.TagSerializer", "django.contrib.auth.get_user_model", "django.urls.reverse", "core.models.Tag.objects.all", "rest_framework.test.APIClient" ]
[((274, 298), 'django.urls.reverse', 'reverse', (['"""post:tag-list"""'], {}), "('post:tag-list')\n", (281, 298), False, 'from django.urls import reverse\n'), ((426, 437), 'rest_framework.test.APIClient', 'APIClient', ([], {}), '()\n', (435, 437), False, 'from rest_framework.test import APIClient\n'), ((984, 995), 'res...
from rest_framework.routers import SimpleRouter router = SimpleRouter() urlpatterns = router.urls
[ "rest_framework.routers.SimpleRouter" ]
[((59, 73), 'rest_framework.routers.SimpleRouter', 'SimpleRouter', ([], {}), '()\n', (71, 73), False, 'from rest_framework.routers import SimpleRouter\n')]
from json.decoder import JSONDecodeError from typing import Any, Dict, List, Optional import requests def fetch_ip_addresses( headers: Dict[str, str] = {}, instance: Optional[str] = None ) -> Any: url = "https://api.packet.net/devices/{}".format(instance) response = requests.get(url, headers=headers) ...
[ "requests.get" ]
[((282, 316), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (294, 316), False, 'import requests\n'), ((1214, 1248), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (1226, 1248), False, 'import requests\n')]
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ "oci.util.formatted_flat_dict" ]
[((11878, 11903), 'oci.util.formatted_flat_dict', 'formatted_flat_dict', (['self'], {}), '(self)\n', (11897, 11903), False, 'from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel\n')]
import json import urllib.request from dotenv import load_dotenv import os from pathlib import Path from urllib.parse import quote #.env käyttöön tarvittavat konfiguraatiot dotenv_path = Path('./.env') load_dotenv(dotenv_path=dotenv_path) API_KEY = os.getenv('API_KEY') API_ID = os.getenv('API_ID') def get_media(key...
[ "json.loads", "dotenv.load_dotenv", "urllib.parse.quote", "pathlib.Path", "os.getenv" ]
[((189, 203), 'pathlib.Path', 'Path', (['"""./.env"""'], {}), "('./.env')\n", (193, 203), False, 'from pathlib import Path\n'), ((204, 240), 'dotenv.load_dotenv', 'load_dotenv', ([], {'dotenv_path': 'dotenv_path'}), '(dotenv_path=dotenv_path)\n', (215, 240), False, 'from dotenv import load_dotenv\n'), ((251, 271), 'os....
# coding: utf-8 from django.test import TestCase from cryptography.hazmat.primitives.asymmetric import rsa from bounca.certificate_engine.ssl.key import Key class KeyTest(TestCase): def test_generate_private_key_2048(self): keyhandler = Key() keyhandler.create_key(2048) self.assertEqua...
[ "bounca.certificate_engine.ssl.key.Key" ]
[((255, 260), 'bounca.certificate_engine.ssl.key.Key', 'Key', ([], {}), '()\n', (258, 260), False, 'from bounca.certificate_engine.ssl.key import Key\n'), ((785, 790), 'bounca.certificate_engine.ssl.key.Key', 'Key', ([], {}), '()\n', (788, 790), False, 'from bounca.certificate_engine.ssl.key import Key\n'), ((1110, 111...
from discord.ext import commands import discord import asyncio import logging class AdminUtilsCog(commands.Cog, name="Admin Utilities"): """Cog for administrative commands, be these for users or to manage the bot. All commands within this cog require administrative permissions or admin-like roles """ ...
[ "asyncio.sleep", "discord.ext.commands.command", "logging.getLogger", "discord.ext.commands.Cog.listener" ]
[((591, 614), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (612, 614), False, 'from discord.ext import commands\n'), ((1159, 1177), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (1175, 1177), False, 'from discord.ext import commands\n'), ((1749, 1767), 'discord...
import util import sys as _sys class Topology: def __init__(self, exp_config): #System parameters self.par2Dev = exp_config.system_config.device_placement.par2Dev self.num_wafers = exp_config.system_config.num_wafers self.num_nodes_per_wafer= exp_config.system_config.num_nodes_per_...
[ "sys.exit" ]
[((1505, 1517), 'sys.exit', '_sys.exit', (['(0)'], {}), '(0)\n', (1514, 1517), True, 'import sys as _sys\n')]
# %% # test out geopy import os os.chdir(os.path.dirname(os.getcwd())) # make directory one step up the current directory from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent='<PASSWORD>_agent') location = geolocator.geocode('175 5th Avenue NYC') print(location.address) print((location.latitude, lo...
[ "os.getcwd", "folium.Map", "geopy.geocoders.Nominatim" ]
[((175, 215), 'geopy.geocoders.Nominatim', 'Nominatim', ([], {'user_agent': '"""<PASSWORD>_agent"""'}), "(user_agent='<PASSWORD>_agent')\n", (184, 215), False, 'from geopy.geocoders import Nominatim\n'), ((408, 483), 'folium.Map', 'folium.Map', ([], {'location': '[location.latitude, location.longitude]', 'zoom_start': ...
#!/usr/bin/env python3 # Magento 2.2.0 <= 2.3.0 Unauthenticated SQLi # <NAME> # 2019-03-22 # # SOURCE & SINK # The sink (from-to SQL condition) has been present from Magento 1.x onwards. # The source (/catalog/product_frontend_action/synchronize) from 2.2.0. # If your target runs Magento < 2.2.0, you need to find anoth...
[ "requests.packages.urllib3.disable_warnings", "requests.Session", "string.encode", "random.choice" ]
[((614, 689), 'requests.packages.urllib3.disable_warnings', 'requests.packages.urllib3.disable_warnings', ([], {'category': 'InsecureRequestWarning'}), '(category=InsecureRequestWarning)\n', (656, 689), False, 'import requests\n'), ((1199, 1217), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1215, 1217), F...
import os import tempfile import numpy as np import pytest import calliope def verify_solution_integrity(model_solution, solution_from_disk, tempdir): # Check whether the two are the same np.allclose(model_solution['e_cap'], solution_from_disk['e_cap']) # Check that config AttrDict has been...
[ "tempfile.TemporaryDirectory", "calliope.read.read_netcdf", "numpy.allclose", "pytest.fixture", "calliope.read.read_csv", "calliope.Model", "os.path.join" ]
[((208, 273), 'numpy.allclose', 'np.allclose', (["model_solution['e_cap']", "solution_from_disk['e_cap']"], {}), "(model_solution['e_cap'], solution_from_disk['e_cap'])\n", (219, 273), True, 'import numpy as np\n'), ((435, 465), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", ...
import datetime import io import gzip import json import time from airflow import DAG from airflow.contrib.operators.aws_athena_operator import AWSAthenaOperator from airflow.hooks.S3_hook import S3Hook from airflow.operators.python_operator import PythonOperator from airflow.models import Variable import pytz import ...
[ "io.BytesIO", "airflow.hooks.S3_hook.S3Hook", "airflow.DAG", "airflow.operators.python_operator.PythonOperator", "pkg_resources.resource_stream", "airflow.contrib.operators.aws_athena_operator.AWSAthenaOperator", "airflow.models.Variable.get", "datetime.datetime", "json.dumps", "jinja2.PackageLoad...
[((1040, 1076), 'pytz.timezone', 'pytz.timezone', (['"""America/Los_Angeles"""'], {}), "('America/Los_Angeles')\n", (1053, 1076), False, 'import pytz\n'), ((5017, 5180), 'airflow.DAG', 'DAG', (['"""mixpanel_ingest_schema_update"""'], {'default_args': 'default_args', 'description': '"""Mixpanel data schema definition.""...
#! /usr/bin/python3 # # @(!--#) @(#) modbusgwudp.py, version 003, 02-july-2018 # # modbus gateway over UDP for a TP-Link HS100/HS110 Smart WiFi Plug # # Links # # https://www.softscheck.com/en/reverse-engineering-tp-link-hs110/ # https://github.com/softScheck/tplink-smartplug # https://github.com/softScheck/tp...
[ "socket.socket", "argparse.ArgumentParser", "os.path.basename" ]
[((2945, 2974), 'os.path.basename', 'os.path.basename', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (2961, 2974), False, 'import os\n'), ((2985, 3010), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3008, 3010), False, 'import argparse\n'), ((3363, 3423), 'socket.socket', 'socket.socket', ([], {...
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT # Copyright (c) 2016-2020 <NAME>, <NAME>, <NAME>, <NAME> import sys import os import json class Config: fnp = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../config.json") if not os.path.exists(fnp): print("ERROR: file not found:"...
[ "os.path.realpath", "json.load", "os.path.exists", "sys.exit" ]
[((261, 280), 'os.path.exists', 'os.path.exists', (['fnp'], {}), '(fnp)\n', (275, 280), False, 'import os\n'), ((416, 427), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (424, 427), False, 'import sys\n'), ((466, 478), 'json.load', 'json.load', (['f'], {}), '(f)\n', (475, 478), False, 'import json\n'), ((203, 229), '...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ "numpy.shape", "numpy.random.randn" ]
[((1836, 1857), 'numpy.shape', 'np.shape', (['mean_action'], {}), '(mean_action)\n', (1844, 1857), True, 'import numpy as np\n'), ((2010, 2044), 'numpy.random.randn', 'np.random.randn', (['*batch_action_dim'], {}), '(*batch_action_dim)\n', (2025, 2044), True, 'import numpy as np\n')]
from ModelSpecification import NodeFormat, EdgeFormat, GlobalFormat, PositionFrame, \ GraphAttributeFormat, GraphNetStructure, ModelSpecification, ClothKeypoints, TrainingParams, LossFunction # Define a model specification which can be instantiated def specify_input_graph_format() -> GraphAttributeFormat: re...
[ "ModelSpecification.TrainingParams", "ModelSpecification.ClothKeypoints", "ModelSpecification.GraphAttributeFormat", "ModelSpecification.GraphNetStructure" ]
[((325, 489), 'ModelSpecification.GraphAttributeFormat', 'GraphAttributeFormat', ([], {'node_format': 'NodeFormat.XYZR_FixedFlag', 'edge_format': 'EdgeFormat.DiffXYZ_ConnectionFlag', 'global_format': 'GlobalFormat.NextEndEffectorXYZR'}), '(node_format=NodeFormat.XYZR_FixedFlag, edge_format=\n EdgeFormat.DiffXYZ_Conn...
##################################################################################### # MIT License # # # # Copyright (C) 2018 <NAME> ...
[ "shutil.copyfile", "os.remove" ]
[((2928, 2955), 'os.remove', 'os.remove', (['target_file_name'], {}), '(target_file_name)\n', (2937, 2955), False, 'import os\n'), ((2867, 2923), 'shutil.copyfile', 'copyfile', (['target_file_name', "(target_file_name + '.backup')"], {}), "(target_file_name, target_file_name + '.backup')\n", (2875, 2923), False, 'from ...
# -*- coding: utf-8 -*- # Copyright 2021 Tampere University and VTT Technical Research Centre of Finland # This software was developed as a part of the ProCemPlus project: https://www.senecc.fi/projects/procemplus # This source code is licensed under the MIT license. See LICENSE in the repository root directory. # Aut...
[ "economic_dispatch.model.factory.UnitFactory.make_component", "pyomo.environ.Expression", "pyomo.environ.Constraint", "pyomo.environ.Block", "pyomo.environ.Set" ]
[((3565, 3591), 'pyomo.environ.Set', 'pyo.Set', ([], {'initialize': 'U_init'}), '(initialize=U_init)\n', (3572, 3591), True, 'import pyomo.environ as pyo\n'), ((3716, 3750), 'pyomo.environ.Block', 'pyo.Block', (['block.U'], {'rule': 'unit_rule'}), '(block.U, rule=unit_rule)\n', (3725, 3750), True, 'import pyomo.environ...
from datetime import datetime from flask import Flask, request, render_template from inference import get_category,save_image app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def fragment(): # Write the GET Method to get the index file if request.method == 'GET': return render_template...
[ "flask.Flask", "inference.save_image", "flask.render_template", "inference.get_category" ]
[((133, 148), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (138, 148), False, 'from flask import Flask, request, render_template\n'), ((305, 334), 'flask.render_template', 'render_template', (['"""index.html"""'], {}), "('index.html')\n", (320, 334), False, 'from flask import Flask, request, render_templ...
from matplotlib.finance import quotes_historical_yahoo import sys from datetime import date import matplotlib.pyplot as plt import numpy as np today = date.today() start = (today.year - 1, today.month, today.day) symbol = 'DISH' if len(sys.argv) == 2: symbol = sys.argv[1] quotes = quotes_historical_yahoo(symbol,...
[ "matplotlib.finance.quotes_historical_yahoo", "matplotlib.pyplot.show", "datetime.date.today", "matplotlib.pyplot.figure", "numpy.diff", "numpy.array" ]
[((152, 164), 'datetime.date.today', 'date.today', ([], {}), '()\n', (162, 164), False, 'from datetime import date\n'), ((289, 334), 'matplotlib.finance.quotes_historical_yahoo', 'quotes_historical_yahoo', (['symbol', 'start', 'today'], {}), '(symbol, start, today)\n', (312, 334), False, 'from matplotlib.finance import...
# -*- coding: utf-8 -*- # dcf # --- # A Python library for generating discounted cashflows. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.7, copyright Tuesday, 31 May 2022 # Website: https://github.com/sonntagsgesicht/dcf # License: Apache License 2.0 (see LICENSE file) ...
[ "collections.OrderedDict", "warnings.warn", "inspect.signature" ]
[((1831, 1898), 'warnings.warn', 'warn', (["('%s().kwargs is under construction' % self.__class__.__name__)"], {}), "('%s().kwargs is under construction' % self.__class__.__name__)\n", (1835, 1898), False, 'from warnings import warn\n'), ((1912, 1925), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1923, ...
import tkinter as tk import time # Routine for non-implemented features. def NOTIMPLEMENTED(): print(">>> Not implemented <<<") # Simulate the face buttons. class MicrobitButton(tk.Button): def setup(self): self.presses = 0 self.state = False self.bind("<Button-1>", self.bpress) self.bind("<ButtonRelease-1...
[ "tkinter.Canvas", "tkinter.Tk" ]
[((2331, 2338), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (2336, 2338), True, 'import tkinter as tk\n'), ((2558, 2599), 'tkinter.Canvas', 'tk.Canvas', (['_mb_win'], {'width': '(200)', 'height': '(200)'}), '(_mb_win, width=200, height=200)\n', (2567, 2599), True, 'import tkinter as tk\n')]
import numpy as np def test_rotation(): board_size = 3 states = np.array([[[[1, 2, 0], [2, 1, 0], [0, 1, 2]]], [[[0, 3, 4], [0, 0, 0], [2, 1, 0]]]]) visit_counts = np.array([[0, 0, 3,...
[ "numpy.fliplr", "numpy.rot90", "numpy.array", "numpy.flip" ]
[((74, 163), 'numpy.array', 'np.array', (['[[[[1, 2, 0], [2, 1, 0], [0, 1, 2]]], [[[0, 3, 4], [0, 0, 0], [2, 1, 0]]]]'], {}), '([[[[1, 2, 0], [2, 1, 0], [0, 1, 2]]], [[[0, 3, 4], [0, 0, 0], [2, \n 1, 0]]]])\n', (82, 163), True, 'import numpy as np\n'), ((301, 369), 'numpy.array', 'np.array', (['[[0, 0, 3, 0, 0, 2, 1...
from unittest import TestCase from mock import patch from pykongregate.api import _handle_request from pykongregate.exceptions import NullResponseException class TestApi(TestCase): def test_base_request(self): with patch('requests.get') as patch_get: class _Temp(object): def...
[ "pykongregate.api._handle_request", "mock.patch" ]
[((232, 253), 'mock.patch', 'patch', (['"""requests.get"""'], {}), "('requests.get')\n", (237, 253), False, 'from mock import patch\n'), ((610, 631), 'mock.patch', 'patch', (['"""requests.get"""'], {}), "('requests.get')\n", (615, 631), False, 'from mock import patch\n'), ((910, 938), 'pykongregate.api._handle_request'...
import logging import sys from flask import Flask, send_from_directory, jsonify from flask_jwt_extended import JWTManager from api.utils.database import db from api.utils.responses import response_with import api.utils.responses as resp from api.utils.email import mail from api.routes.authors import author_routes fro...
[ "api.utils.database.db.init_app", "flask_jwt_extended.JWTManager", "logging.error", "logging.basicConfig", "flask.Flask", "api.utils.responses.response_with", "api.utils.database.db.create_all", "os.environ.get", "flask.jsonify", "api.utils.email.mail.init_app", "flask_swagger.swagger", "flask...
[((523, 538), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (528, 538), False, 'from flask import Flask, send_from_directory, jsonify\n'), ((831, 924), 'flask_swagger_ui.get_swaggerui_blueprint', 'get_swaggerui_blueprint', (['"""/api/docs"""', '"""/api/spec"""'], {'config': "{'app_name': 'Flask Author DB'...
from django.http import Http404 from django.shortcuts import render, redirect from users.models import Profile, Team from .forms import MultiBadgeForm from django.contrib.auth.decorators import login_required from .models import Points from webpages.models import Banner, Visibility from webpages.utils import return_c...
[ "users.models.Team.objects.get", "webpages.models.Banner.objects.filter", "webpages.models.Visibility.objects.filter", "django.shortcuts.redirect", "webpages.utils.return_camp_id", "users.models.Team.objects.filter", "django.http.Http404", "users.models.Profile.objects.filter", "django.shortcuts.ren...
[((1500, 1520), 'webpages.utils.return_camp_id', 'return_camp_id', (['camp'], {}), '(camp)\n', (1514, 1520), False, 'from webpages.utils import return_camp_id\n'), ((1997, 2054), 'django.shortcuts.render', 'render', (['request', '"""award/award_list.html"""'], {'context': 'context'}), "(request, 'award/award_list.html'...
# coding= utf8 import logging logger = logging.getLogger("ikpy") stream_handler = logging.StreamHandler() logger.setLevel(logging.WARNING) logger.addHandler(stream_handler) def set_log_level(level): logger.setLevel(level)
[ "logging.StreamHandler", "logging.getLogger" ]
[((40, 65), 'logging.getLogger', 'logging.getLogger', (['"""ikpy"""'], {}), "('ikpy')\n", (57, 65), False, 'import logging\n'), ((83, 106), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (104, 106), False, 'import logging\n')]