code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Standard Libraries # Third party packages import ipaddress from pydantic import root_validator, conint, constr from pydantic.typing import Union, Optional, List, Literal, List # Local package from net_models.fields import ( GENERIC_OBJECT_NAME, VRF_NAME, VLAN_ID, BRIDGE_DOMAIN_ID, ROUTE_TARGET, ROUTE_DISTING...
[ "pydantic.conint", "pydantic.constr", "pydantic.root_validator" ]
[((1426, 1458), 'pydantic.root_validator', 'root_validator', ([], {'allow_reuse': '(True)'}), '(allow_reuse=True)\n', (1440, 1458), False, 'from pydantic import root_validator, conint, constr\n'), ((3413, 3445), 'pydantic.root_validator', 'root_validator', ([], {'allow_reuse': '(True)'}), '(allow_reuse=True)\n', (3427,...
""" Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
[ "absl.app.UsageError", "discretezoo.metrics.sentence_bleu_scores", "tensorflow.summary.experimental.set_step", "discretezoo.attack_setup.sort_dataset", "absl.logging.info", "nltk.tokenize.treebank.TreebankWordDetokenizer", "discretezoo.attack_setup.load_embeddings", "absl.flags.DEFINE_enum", "tensor...
[((1145, 1220), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""model"""', 'None', '"""The directory of the model to attack."""'], {}), "('model', None, 'The directory of the model to attack.')\n", (1164, 1220), False, 'from absl import flags\n'), ((1221, 1318), 'absl.flags.DEFINE_integer', 'flags.DEFINE_integ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-13 03:23 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cert_manager', '0001_initial'), ] operations = [ migrations.AlterModelOptions( ...
[ "django.db.migrations.AlterModelOptions" ]
[((286, 488), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""certificatefingerprintmodel"""', 'options': "{'ordering': ['created'], 'verbose_name': 'certificate fingerprint',\n 'verbose_name_plural': 'certificate fingerprints'}"}), "(name='certificatefingerprintmodel', op...
#coding=UTF-8 ''' Created on 2011-7-7 @author: Administrator ''' import Queue fetch_quere=Queue.Queue()
[ "Queue.Queue" ]
[((91, 104), 'Queue.Queue', 'Queue.Queue', ([], {}), '()\n', (102, 104), False, 'import Queue\n')]
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields class WebsiteConfigSettings(models.TransientModel): _inherit = 'website.config.settings' def _default_order_mail_template(self): if self.env['ir.module.module'].sea...
[ "odoo.fields.Many2one", "odoo.api.onchange", "odoo.fields.Boolean", "odoo.fields.Selection" ]
[((569, 661), 'odoo.fields.Many2one', 'fields.Many2one', (['"""res.users"""'], {'related': '"""website_id.salesperson_id"""', 'string': '"""Salesperson"""'}), "('res.users', related='website_id.salesperson_id', string=\n 'Salesperson')\n", (584, 661), False, 'from odoo import api, models, fields\n'), ((676, 764), 'o...
import click import pyperclip from ..utils.logging import logger from ..utils.exceptions import handle_exceptions from ..utils.load import get_default_code_name import os @click.command(short_help='Copies code from file to clipboard.') @click.argument('code_file', type=click.Path(exists=True, dir_okay...
[ "os.path.exists", "click.command", "click.Path" ]
[((174, 237), 'click.command', 'click.command', ([], {'short_help': '"""Copies code from file to clipboard."""'}), "(short_help='Copies code from file to clipboard.')\n", (187, 237), False, 'import click\n'), ((288, 327), 'click.Path', 'click.Path', ([], {'exists': '(True)', 'dir_okay': '(False)'}), '(exists=True, dir_...
import paho.mqtt.client as mqtt import sched, time, threading,os import json,logging, traceback from datetime import datetime, timedelta LOGLEVEL = os.environ.get('HABLIB_LOGLEVEL', 'INFO').upper() FORMATTER = os.environ.get('HABLIB_FORMAT', '[%(asctime)s] p%(process)s {%(pathname)s:%(lineno)d} %(levelname)s - %(messag...
[ "traceback.format_exc", "logging.StreamHandler", "logging.debug", "paho.mqtt.client.Client", "threading.Timer", "json.dumps", "os.environ.get", "datetime.datetime.now", "logging.FileHandler", "sched.scheduler", "logging.info", "logging.error" ]
[((210, 334), 'os.environ.get', 'os.environ.get', (['"""HABLIB_FORMAT"""', '"""[%(asctime)s] p%(process)s {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s"""'], {}), "('HABLIB_FORMAT',\n '[%(asctime)s] p%(process)s {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'\n )\n", (224, 334), False, 'import sche...
from .blockstate import BlockState import math import minecraft.TAG as TAG import mmap import os import time import util class Chunk(TAG.MutableMapping, util.Cache): """Chunk data model and interface Chunks are opened and saved directly, abstracting .mca files """ __slots__ = ['_cache...
[ "minecraft.TAG.Compound.__getitem__", "util.get_bits", "minecraft.TAG.Compound.__setitem__", "util.Cache.__setitem__", "minecraft.TAG.Long", "util.set_bits", "minecraft.TAG.Compound.__delitem__", "util.Cache.__delitem__", "util.Cache.__getitem__", "minecraft.TAG.Byte" ]
[((741, 774), 'util.Cache.__delitem__', 'util.Cache.__delitem__', (['self', 'key'], {}), '(self, key)\n', (763, 774), False, 'import util\n'), ((803, 838), 'minecraft.TAG.Compound.__delitem__', 'TAG.Compound.__delitem__', (['self', 'key'], {}), '(self, key)\n', (827, 838), True, 'import minecraft.TAG as TAG\n'), ((1026...
from datetime import date,datetime,timedelta from random import randint from bokeh.io import output_file, show from bokeh.layouts import widgetbox, Spacer from bokeh.models import ColumnDataSource,CustomJS,Div from bokeh.models.widgets import DataTable, DateFormatter, TableColumn, Tabs, Panel from bokeh.models.widgets ...
[ "bokeh.models.Div", "bokeh.models.widgets.DateFormatter", "bokeh.plotting.figure", "bokeh.models.widgets.Select", "bokeh.models.widgets.Button", "pandas_datareader.get_data_yahoo", "bokeh.models.widgets.DataTable", "bokeh.models.ColumnDataSource", "bokeh.models.widgets.TableColumn", "traceback.pri...
[((1934, 1961), 'bokeh.models.ColumnDataSource', 'ColumnDataSource', (['self.data'], {}), '(self.data)\n', (1950, 1961), False, 'from bokeh.models import ColumnDataSource, CustomJS, Div\n'), ((7147, 7184), 'bokeh.models.widgets.Button', 'Button', ([], {'label': "self._settings['label']"}), "(label=self._settings['label...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from feature_extraction import * from detection import * import pickle import random import matplotlib.pyplot as plt from sklearn.preprocessing import RobustScaler if __name__ == '__main__': with open('udacity_data.p', 'rb') as f: cars = pickle.load(f) ...
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "pickle.load", "matplotlib.pyplot.figure", "sklearn.preprocessing.RobustScaler", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplots" ]
[((565, 584), 'matplotlib.pyplot.imshow', 'plt.imshow', (['car_img'], {}), '(car_img)\n', (575, 584), True, 'import matplotlib.pyplot as plt\n'), ((589, 617), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""car_image.png"""'], {}), "('car_image.png')\n", (600, 617), True, 'import matplotlib.pyplot as plt\n'), ((989, ...
from InstagramAPI import InstagramAPI as IG from random import randint from pprint import PrettyPrinter from operator import itemgetter import time import yaml import os # This Python script is to list down all your following's followers # The result will generated into tmp/ folder pp = PrettyPrinter(indent=2) d1 =...
[ "InstagramAPI.InstagramAPI", "os.path.dirname", "pprint.PrettyPrinter", "operator.itemgetter", "time.localtime", "time.time", "random.randint" ]
[((291, 314), 'pprint.PrettyPrinter', 'PrettyPrinter', ([], {'indent': '(2)'}), '(indent=2)\n', (304, 314), False, 'from pprint import PrettyPrinter\n'), ((786, 836), 'InstagramAPI.InstagramAPI', 'IG', (["ig_account['username']", "ig_account['password']"], {}), "(ig_account['username'], ig_account['password'])\n", (788...
import itertools # combine iterators it = itertools.chain([1, 2, 3], [4, 5, 6]) # repeat a value it = itertools.repeat("hello", 3) print(list(it)) # repeat an iterator's items it = itertools.cycle([1, 2]) result = [next(it) for _ in range(10)] print(result) # split an iterator it1, it2, it3 = itertools.tee(["fir...
[ "itertools.chain", "itertools.cycle", "itertools.zip_longest", "itertools.tee", "itertools.repeat" ]
[((43, 80), 'itertools.chain', 'itertools.chain', (['[1, 2, 3]', '[4, 5, 6]'], {}), '([1, 2, 3], [4, 5, 6])\n', (58, 80), False, 'import itertools\n'), ((105, 133), 'itertools.repeat', 'itertools.repeat', (['"""hello"""', '(3)'], {}), "('hello', 3)\n", (121, 133), False, 'import itertools\n'), ((186, 209), 'itertools.c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Little program to build a mini index station_id:station_name from the official Trainline stations.csv""" import pandas as pd import io import requests _STATIONS_CSV_FILE = "https://raw.githubusercontent.com/\ trainline-eu/stations/master/stations.csv" csv_content =...
[ "requests.get" ]
[((321, 353), 'requests.get', 'requests.get', (['_STATIONS_CSV_FILE'], {}), '(_STATIONS_CSV_FILE)\n', (333, 353), False, 'import requests\n')]
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create a pipeline: some skinny-ass triangles sphere = vtk.vtkSphereSource() sphere.SetThetaResolution(6) sphere.SetPhiResolution(24) ids = vtk.vtkIdFilter() ids.SetInpu...
[ "vtk.util.misc.vtkGetDataRoot", "vtk.vtkProperty", "vtk.vtkSphereSource", "vtk.vtkRenderWindowInteractor", "vtk.vtkRenderWindow", "vtk.vtkPolyDataMapper", "vtk.vtkActor", "vtk.vtkIdFilter", "vtk.vtkAdaptiveSubdivisionFilter", "vtk.vtkRenderer" ]
[((123, 139), 'vtk.util.misc.vtkGetDataRoot', 'vtkGetDataRoot', ([], {}), '()\n', (137, 139), False, 'from vtk.util.misc import vtkGetDataRoot\n'), ((200, 221), 'vtk.vtkSphereSource', 'vtk.vtkSphereSource', ([], {}), '()\n', (219, 221), False, 'import vtk\n'), ((290, 307), 'vtk.vtkIdFilter', 'vtk.vtkIdFilter', ([], {})...
"""Get details about users and servers, like avatar, and so on.""" from colour import Color from plumeria.command import commands, channel_only, CommandError from plumeria.config.common import short_date_time_format from plumeria.core.scoped_config import scoped_config from plumeria.message.mappings import build_mapp...
[ "colour.Color", "plumeria.core.scoped_config.scoped_config.get", "plumeria.command.commands.create", "plumeria.message.mappings.build_mapping", "plumeria.command.CommandError", "plumeria.command.commands.add" ]
[((683, 746), 'plumeria.command.commands.create', 'commands.create', (['"""avatar"""', '"""user avatar"""'], {'category': '"""Inspection"""'}), "('avatar', 'user avatar', category='Inspection')\n", (698, 746), False, 'from plumeria.command import commands, channel_only, CommandError\n'), ((1103, 1162), 'plumeria.comman...
#!/usr/bin/env python3 """ Update crypto statistics to cache file using coinmarketcap API Use currency.converter() if currency to convert to not supported, """ import requests # pip install nh-currency import currency import util config = util.readconfig() def process_meta_info(meta): """ pretty price number in m...
[ "currency.rounding", "requests.get", "currency.convert", "currency.pretty", "util.writecache", "util.readconfig" ]
[((243, 260), 'util.readconfig', 'util.readconfig', ([], {}), '()\n', (258, 260), False, 'import util\n'), ((456, 490), 'currency.pretty', 'currency.pretty', (['volume_24h', '"""USD"""'], {}), "(volume_24h, 'USD')\n", (471, 490), False, 'import currency\n'), ((523, 557), 'currency.pretty', 'currency.pretty', (['market_...
import unittest import os import numpy as np from phonopy.interface.phonopy_yaml import read_cell_yaml from phono3py.phonon3.triplets import (get_grid_point_from_address, get_grid_point_from_address_py) data_dir = os.path.dirname(os.path.abspath(__file__)) class TestTriplets(u...
[ "phono3py.phonon3.triplets.get_grid_point_from_address", "phono3py.phonon3.triplets.get_grid_point_from_address_py", "os.path.join", "numpy.ndindex", "os.path.abspath", "unittest.TextTestRunner", "unittest.TestLoader" ]
[((271, 296), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (286, 296), False, 'import os\n'), ((396, 433), 'os.path.join', 'os.path.join', (['data_dir', '"""POSCAR.yaml"""'], {}), "(data_dir, 'POSCAR.yaml')\n", (408, 433), False, 'import os\n'), ((753, 775), 'numpy.ndindex', 'np.ndindex', (...
import torch import copy import joblib from nltk import word_tokenize from backend.common.logging.console_loger import ConsoleLogger from entity_extraction.application.ai.model import BERTEntityModel from entity_extraction.application.ai.settings import Settings from entity_extraction.application.ai.training.src.datase...
[ "nltk.word_tokenize", "joblib.load", "torch.no_grad", "copy.copy", "torch.device" ]
[((648, 687), 'joblib.load', 'joblib.load', (['self.settings.MAPPING_PATH'], {}), '(self.settings.MAPPING_PATH)\n', (659, 687), False, 'import joblib\n'), ((5026, 5045), 'nltk.word_tokenize', 'word_tokenize', (['data'], {}), '(data)\n', (5039, 5045), False, 'from nltk import word_tokenize\n'), ((5531, 5546), 'copy.copy...
"""Test BoB Token API""" import logging import os import unittest from datetime import datetime, timezone import dateutil.parser from bobby_client.env import TestEnvironment from bobby_client.utils import b64e class TestTokenAPI(unittest.TestCase): def setUp(self): logging.basicConfig(level=logging.IN...
[ "logging.basicConfig", "bobby_client.env.TestEnvironment.create_from_config_file", "os.urandom", "datetime.datetime.now", "unittest.main", "logging.info" ]
[((2991, 3006), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3004, 3006), False, 'import unittest\n'), ((284, 323), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (303, 323), False, 'import logging\n'), ((343, 395), 'bobby_client.env.TestEnvironment.crea...
import numpy import simtk.unit import simtk.unit as units import simtk.openmm as mm from openmmtools.integrators import ExternalPerturbationLangevinIntegrator kB = units.BOLTZMANN_CONSTANT_kB * units.AVOGADRO_CONSTANT_NA class NCMCGeodesicBAOAB(ExternalPerturbationLangevinIntegrator): """ Implementation of a ...
[ "numpy.exp" ]
[((4535, 4563), 'numpy.exp', 'numpy.exp', (['(-gamma * timestep)'], {}), '(-gamma * timestep)\n', (4544, 4563), False, 'import numpy\n')]
""" Find the configuration files to load. """ import os from typing import Iterable, Set, List, Callable from ....aid.std import ( log, VERBOSE, ) _EXT_EXTENSIONS = ('.json', '.yaml', '.yml',) def find_extension_config_files( paths: Iterable[str], recurse: bool = False ) -> Iterable[str]: "...
[ "os.path.splitext", "os.listdir", "os.path.join", "os.walk" ]
[((1519, 1542), 'os.path.join', 'os.path.join', (['path', 'fnm'], {}), '(path, fnm)\n', (1531, 1542), False, 'import os\n'), ((918, 949), 'os.walk', 'os.walk', (['path'], {'followlinks': '(True)'}), '(path, followlinks=True)\n', (925, 949), False, 'import os\n'), ((1203, 1219), 'os.listdir', 'os.listdir', (['path'], {}...
from typing import List from numpy import array, asarray, cos, linspace, ndarray, pi, power, sin, sum from numpy.linalg import norm import meshpy.triangle as triangle class tri_mesh: def __init__(self, surf_points: ndarray, external_n: float, external_radius: float) -> None: self.__surf_points = surf_poi...
[ "meshpy.triangle.MeshInfo", "numpy.power", "meshpy.triangle.build", "numpy.asarray", "numpy.array", "numpy.linspace", "numpy.cos", "numpy.linalg.norm", "numpy.sin" ]
[((1726, 1745), 'meshpy.triangle.MeshInfo', 'triangle.MeshInfo', ([], {}), '()\n', (1743, 1745), True, 'import meshpy.triangle as triangle\n'), ((2245, 2339), 'meshpy.triangle.build', 'triangle.build', (['info'], {'quality_meshing': '(0.9)', 'min_angle': '(25)', 'refinement_func': 'needs_refinement'}), '(info, quality_...
"""Holder Tests""" import asyncio from acapy_client.models.credential_definition_send_result import ( CredentialDefinitionSendResult, ) import pytest from typing import cast from acapy_client import Client from acapy_client.models.create_invitation_request import CreateInvitationRequest from acapy_client.models.co...
[ "acapy_client.models.receive_invitation_request.ReceiveInvitationRequest", "acapy_client.models.cred_attr_spec.CredAttrSpec", "acapy_client.api.issue_credential_v10.get_issue_credential_records.asyncio", "acapy_client.models.create_invitation_request.CreateInvitationRequest", "pytest.fixture", "typing.cas...
[((1317, 1347), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1331, 1347), False, 'import pytest\n'), ((3534, 3575), 'typing.cast', 'cast', (['V10CredentialExchange', 'issue_result'], {}), '(V10CredentialExchange, issue_result)\n', (3538, 3575), False, 'from typing import c...
import json from typing import Any, Dict from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import check_send_webhook_message from zerver.mode...
[ "zerver.decorator.webhook_view", "zerver.lib.response.json_success", "zerver.lib.request.REQ", "json.dumps", "zerver.lib.webhooks.common.check_send_webhook_message" ]
[((416, 436), 'zerver.decorator.webhook_view', 'webhook_view', (['"""JSON"""'], {}), "('JSON')\n", (428, 436), False, 'from zerver.decorator import webhook_view\n'), ((569, 594), 'zerver.lib.request.REQ', 'REQ', ([], {'argument_type': '"""body"""'}), "(argument_type='body')\n", (572, 594), False, 'from zerver.lib.reque...
""" Tu labor en esta ocasión es ayudar a <NAME>. Para ello, debes determinar por él si ha aprobado el Programa Formativo como soldado o no para poder formar parte de la Legión de Reconocimiento. La única forma de aprobar dicho programa es aprobando todos y cada uno de los N cursos que lo componen. - Cada curso está co...
[ "unittest.main", "statistics.mean" ]
[((7259, 7265), 'unittest.main', 'main', ([], {}), '()\n', (7263, 7265), False, 'from unittest import main, TestCase\n'), ((4379, 4390), 'statistics.mean', 'mean', (['curso'], {}), '(curso)\n', (4383, 4390), False, 'from statistics import mean\n')]
import boto3 from botocore.exceptions import ClientError from boto3.dynamodb.conditions import Key import json import os import logging import datetime from dateutil import tz from pprint import pprint import logging logger = logging.getLogger() class GCPProject(object): """Class to represent a GCP Project """ ...
[ "logging.getLogger", "boto3.resource", "boto3.dynamodb.conditions.Key" ]
[((228, 247), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (245, 247), False, 'import logging\n'), ((642, 668), 'boto3.resource', 'boto3.resource', (['"""dynamodb"""'], {}), "('dynamodb')\n", (656, 668), False, 'import boto3\n'), ((904, 920), 'boto3.dynamodb.conditions.Key', 'Key', (['"""projectId"""'], ...
import datetime def get_log_time() -> str: now = datetime.datetime.now() return now.strftime("%d-%m-%Y %H:%M:%S")
[ "datetime.datetime.now" ]
[((55, 78), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (76, 78), False, 'import datetime\n')]
# -*- coding: utf-8 -*- """ Simulating diffraction by a 2D metamaterial =========================================== Finite element simulation of the diffraction of a plane wave by a mono-periodic grating and calculation of diffraction efficiencies. """ #################################################################...
[ "pytheas.Periodic2D", "pytheas.genmat.MaterialDensity", "pytheas.genmat.np.random.seed", "matplotlib.pyplot.subplots", "numpy.random.permutation" ]
[((645, 657), 'pytheas.Periodic2D', 'Periodic2D', ([], {}), '()\n', (655, 657), False, 'from pytheas import Periodic2D\n'), ((2884, 2910), 'pytheas.genmat.np.random.seed', 'genmat.np.random.seed', (['(100)'], {}), '(100)\n', (2905, 2910), False, 'from pytheas import genmat\n'), ((2917, 2941), 'pytheas.genmat.MaterialDe...
# This script creates a callable class which runs a single Perceptron # The perceptron is able to solve the logical OR, the logical AND, but not # The logical XOR problem. The only library used is numpy. # # Code from <NAME>, Machine Learning An Algorithmic Perspective, 2nd edition # https://seat.massey.ac.nz/pers...
[ "numpy.trace", "numpy.multiply", "numpy.random.rand", "numpy.ones", "numpy.where", "numpy.ndim", "numpy.argmax", "numpy.array", "numpy.dot", "numpy.zeros", "numpy.sum", "numpy.shape", "numpy.transpose" ]
[((10313, 10367), 'numpy.array', 'np.array', (['[[0, 0, 0], [0, 1, 1], [1, 0, 1], [1, 1, 1]]'], {}), '([[0, 0, 0], [0, 1, 1], [1, 0, 1], [1, 1, 1]])\n', (10321, 10367), True, 'import numpy as np\n'), ((10388, 10442), 'numpy.array', 'np.array', (['[[0, 0, 0], [0, 1, 0], [1, 0, 0], [1, 1, 1]]'], {}), '([[0, 0, 0], [0, 1,...
#! /usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2019/3/10 7:04 PM # @Author : xiaoliji # @Email : <EMAIL> """ 判断是否为平衡二叉树 >>> t1 = '1,2,4,$,$,5,7,$,$,$,3,$,6,$,$' >>> t1 = deserialize_tree(t1) >>> isBalanced(t1) True >>> t2 = '1,2,4,$,$,5,7,8,$,$,$,$,3,$,6,$,$' >>> t2 = deseri...
[ "collections.defaultdict" ]
[((1039, 1055), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1050, 1055), False, 'from collections import defaultdict\n')]
import torch import torch.nn as nn import torch.nn.functional as F class ResBlock(nn.Module): def __init__(self, channel_in, channel_out, stride = 1): super(ResBlock, self).__init__() self.stem = nn.Sequential( nn.Conv2d(channel_in, channel_out, kernel_size = 3, stride = stride, padding...
[ "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Sequential", "torch.nn.Conv2d", "torch.nn.functional.relu" ]
[((601, 616), 'torch.nn.Sequential', 'nn.Sequential', ([], {}), '()\n', (614, 616), True, 'import torch.nn as nn\n'), ((999, 1013), 'torch.nn.functional.relu', 'F.relu', (['output'], {}), '(output)\n', (1005, 1013), True, 'import torch.nn.functional as F\n'), ((244, 335), 'torch.nn.Conv2d', 'nn.Conv2d', (['channel_in',...
from os import listdir from os.path import expanduser, isdir, join import os from mycroft.skills import FallbackSkill from mycroft.util.parse import match_one from padacioso import IntentContainer class ApplicationLauncherSkill(FallbackSkill): def initialize(self): # some applications can't be easily trig...
[ "os.listdir", "padacioso.IntentContainer", "os.path.join", "os.path.isdir", "os.system", "os.path.expanduser" ]
[((1011, 1028), 'padacioso.IntentContainer', 'IntentContainer', ([], {}), '()\n', (1026, 1028), False, 'from padacioso import IntentContainer\n'), ((1300, 1357), 'os.path.join', 'join', (['self.root_dir', '"""locale"""', 'self.lang', '"""launch.intent"""'], {}), "(self.root_dir, 'locale', self.lang, 'launch.intent')\n"...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='randominfo', version='2.0.2', packages=['randominfo'], author="<NAME>", author_email="<EMAIL>", description="Random data generator for IDs, names, emails, passwords, dates, numbers, a...
[ "setuptools.setup" ]
[((89, 872), 'setuptools.setup', 'setuptools.setup', ([], {'name': '"""randominfo"""', 'version': '"""2.0.2"""', 'packages': "['randominfo']", 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'description': '"""Random data generator for IDs, names, emails, passwords, dates, numbers, addresses, images, OTPs et...
from parity_utils import ( get_predicted_E, data_preprocessing, apply_filters, get_specific_smile_plot, get_general_plot, get_npz_path, ) import yaml import sys import pandas as pd import time from itertools import combinations from jinja2 import Template import os import warnings import numpy a...
[ "os.path.exists", "parity_utils.data_preprocessing", "os.makedirs", "time.strftime", "itertools.combinations", "warnings.warn", "parity_utils.get_specific_smile_plot", "pandas.concat", "parity_utils.get_npz_path", "pandas.DataFrame", "parity_utils.get_general_plot", "parity_utils.apply_filters...
[((1202, 1221), 'parity_utils.get_npz_path', 'get_npz_path', (['model'], {}), '(model)\n', (1214, 1221), False, 'from parity_utils import get_predicted_E, data_preprocessing, apply_filters, get_specific_smile_plot, get_general_plot, get_npz_path\n'), ((1237, 1261), 'os.path.exists', 'os.path.exists', (['npz_path'], {})...
""" A helper class for solving the non-linear time dependent equations of biofilm growth which includes models of the cell concentration and also nutrient concentrations in both the substrate and biofilm. All of these are asumed to be radially symmetric and depend on r and t, and the article concentration additional...
[ "scipy.sparse.linalg.LinearOperator", "scipy.sparse.linalg.bicgstab", "numpy.isfinite", "numpy.linalg.norm", "numpy.arange", "scipy.sparse.linalg.spilu", "scipy.sparse.linalg.gmres", "numpy.linspace", "numpy.empty", "numpy.concatenate", "scipy.sparse.diags", "scipy.sparse.coo_matrix", "numpy...
[((3903, 3935), 'numpy.arange', 'np.arange', (['(0.0)', '(R + 0.5 * dr)', 'dr'], {}), '(0.0, R + 0.5 * dr, dr)\n', (3912, 3935), True, 'import numpy as np\n'), ((4016, 4038), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', 'nxi'], {}), '(0, 1, nxi)\n', (4027, 4038), True, 'import numpy as np\n'), ((4064, 4094), 'numpy...
from rest_framework import serializers from rest_framework import serializers from rest_framework.fields import SkipField from rest_framework.fields import ChoiceField import six from parser_app.models import RegisteredModel class ChoiceDisplayField(ChoiceField): def __init__(self, *args, **kwargs): super...
[ "six.text_type", "rest_framework.serializers.CharField", "rest_framework.serializers.JSONField" ]
[((1105, 1158), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'max_length': '(256)', 'required': '(False)'}), '(max_length=256, required=False)\n', (1126, 1158), False, 'from rest_framework import serializers\n'), ((428, 446), 'six.text_type', 'six.text_type', (['key'], {}), '(key)\n', (441, 44...
import functools import json from typing import Optional from flask import Response, Request as FlaskRequest from marshmallow import ValidationError import sentry_sdk from kokon.orm import User from kokon.serializers import UUIDEncoder from .auth import upsert_user_from_jwt from .db import DB from .errors import AppE...
[ "json.dumps", "sentry_sdk.flush", "functools.wraps", "sentry_sdk.capture_exception" ]
[((1230, 1251), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (1245, 1251), False, 'import functools\n'), ((999, 1056), 'json.dumps', 'json.dumps', (['response'], {'cls': 'UUIDEncoder', 'ensure_ascii': '(False)'}), '(response, cls=UUIDEncoder, ensure_ascii=False)\n', (1009, 1056), False, 'import jso...
from pyxie.model.pynodes.values import ProfilePyNode import pyxie.model.functions def initialise_external_function_definitions(): # Inside <Servo.h> function_calls = { "Servo": { "iterator": False, "return_ctype": "Servo", # C type of the...
[ "pyxie.model.pynodes.values.ProfilePyNode" ]
[((1127, 1159), 'pyxie.model.pynodes.values.ProfilePyNode', 'ProfilePyNode', (['"""HIGH"""', '"""integer"""'], {}), "('HIGH', 'integer')\n", (1140, 1159), False, 'from pyxie.model.pynodes.values import ProfilePyNode\n'), ((1206, 1237), 'pyxie.model.pynodes.values.ProfilePyNode', 'ProfilePyNode', (['"""LOW"""', '"""inte...
from setuptools import * from os import path this_dir = path.abspath(path.dirname(__file__)) with open(path.join(this_dir, "README.md"), encoding = "utf-8") as file: long_description = file.read() with open(path.join(this_dir, "requirements.txt"), encoding = "utf-8") as file: requirements = file.readlines() ...
[ "os.path.dirname", "os.path.join" ]
[((70, 92), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (82, 92), False, 'from os import path\n'), ((104, 136), 'os.path.join', 'path.join', (['this_dir', '"""README.md"""'], {}), "(this_dir, 'README.md')\n", (113, 136), False, 'from os import path\n'), ((213, 252), 'os.path.join', 'path.join...
import os from flask import Flask def create_app(test_config = None): app = Flask(__name__, instance_relative_config = True) app.config.from_mapping(SECRET_KEY = 'dev') if test_config is None: app.config.from_pyfile('config.py', silent = True) else: app.config.from_mapping(test_confi...
[ "os.makedirs", "flask.Flask" ]
[((82, 128), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (87, 128), False, 'from flask import Flask\n'), ((345, 375), 'os.makedirs', 'os.makedirs', (['app.instance_path'], {}), '(app.instance_path)\n', (356, 375), False, 'import os\n')]
# Generated by Django 3.2.7 on 2021-11-03 20:34 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('draft', '0050_league_completed'), ] operations = [ migrations.AlterUniqueTogether( name='fantasyteam', unique_together={('na...
[ "django.db.migrations.AlterUniqueTogether" ]
[((223, 315), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether', ([], {'name': '"""fantasyteam"""', 'unique_together': "{('name', 'league')}"}), "(name='fantasyteam', unique_together={('name',\n 'league')})\n", (253, 315), False, 'from django.db import migrations\n')]
""" Image processing utilities """ __all__ = ['background_mask', 'foreground_mask', 'overlay_edges', 'diff_image', 'equalize_image_histogram'] from scipy import ndimage from visualqc import config as cfg from visualqc.utils import scale_0to1 import numpy as np from functools import partial from scipy.ndi...
[ "matplotlib.interactive", "numpy.hstack", "numpy.logical_not", "numpy.array", "visualqc.utils.scale_0to1", "numpy.gradient", "numpy.divide", "numpy.histogram", "numpy.greater", "numpy.repeat", "scipy.ndimage.binary_erosion", "scipy.ndimage.generate_binary_structure", "numpy.delete", "numpy...
[((543, 571), 'matplotlib.interactive', 'matplotlib.interactive', (['(True)'], {}), '(True)\n', (565, 571), False, 'import matplotlib\n'), ((621, 637), 'matplotlib.cm.get_cmap', 'get_cmap', (['"""gray"""'], {}), "('gray')\n", (629, 637), False, 'from matplotlib.cm import get_cmap\n'), ((649, 664), 'matplotlib.cm.get_cm...
# # ContentExtractorのテスト # import random import string import tempfile from pathlib import Path from unittest import TestCase from src.blueprintpy.core import Argument, Content, ContentBuilder, ContentExtractor class testContentExtractor(TestCase): def setUp(self) -> None: # テンプレートファイル置き場および展開先となる一時ディレ...
[ "tempfile.TemporaryDirectory", "pathlib.Path", "random.randbytes", "src.blueprintpy.core.ContentExtractor.extract", "random.choices", "src.blueprintpy.core.ContentBuilder", "src.blueprintpy.core.Argument" ]
[((351, 380), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (378, 380), False, 'import tempfile\n'), ((458, 482), 'pathlib.Path', 'Path', (['template_root.name'], {}), '(template_root.name)\n', (462, 482), False, 'from pathlib import Path\n'), ((507, 536), 'tempfile.TemporaryDirectory'...
# -*- coding: utf-8 -*- """ Module for AixLib.Fluid.Movers.Pump containes the python class Pump, as well as a function to instantiate classes from the corresponding SimModel instances. """ import mapapi.MapClasses as MapHierarchy import SimTimeSeriesSchedule_Year_Default import SimTimeSeriesSchedule_Week_Daily import...
[ "warnings.warn", "mapapi.molibs.MSL.Blocks.Sources.CombiTimeTable.CombiTimeTable", "mapapi.molibs.MSL.Blocks.Math.RealToBoolean.RealToBoolean" ]
[((2600, 2640), 'mapapi.molibs.MSL.Blocks.Sources.CombiTimeTable.CombiTimeTable', 'CombiTimeTable', (['self.project', 'None', 'self'], {}), '(self.project, None, self)\n', (2614, 2640), False, 'from mapapi.molibs.MSL.Blocks.Sources.CombiTimeTable import CombiTimeTable\n'), ((3015, 3054), 'mapapi.molibs.MSL.Blocks.Math....
import numpy as np import statistics import time def time_stat(func, size, ntrials): total = 0 # the time to generate the random array should not be included for i in range(ntrials): data = np.random.rand(size) # modify this function to time func with ntrials times using a new random array each ti...
[ "numpy.random.rand", "time.perf_counter" ]
[((209, 229), 'numpy.random.rand', 'np.random.rand', (['size'], {}), '(size)\n', (223, 229), True, 'import numpy as np\n'), ((336, 355), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (353, 355), False, 'import time\n'), ((392, 411), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (409, 411), F...
import pytest from model_bakery import baker from documents.models import Document from .helpers import create_documents @pytest.mark.django_db def test_get_seller_orders_as_anonymous(api_client): response = api_client.get("/orders/sales") assert response.status_code == 401 @pytest.mark.django_db def test...
[ "model_bakery.baker.make" ]
[((386, 432), 'model_bakery.baker.make', 'baker.make', (['"""users.user"""'], {'groups': '[buyer_group]'}), "('users.user', groups=[buyer_group])\n", (396, 432), False, 'from model_bakery import baker\n')]
""" Define the base self-play/ data gathering class. This class should work with any MCTS-based neural network learning algorithm like AlphaZero or MuZero. Self-play, model-fitting, and pitting is performed sequentially on a single-thread in this default implementation. Notes: - Code adapted from https://github.com/s...
[ "utils.selfplay_utils.GameHistory", "os.path.exists", "collections.deque", "utils.selfplay_utils.ParameterScheduler", "utils.selfplay_utils.GameHistory.print_statistics", "os.makedirs", "os.path.join", "pickle.Pickler", "os.path.isfile", "pickle.Unpickler", "utils.selfplay_utils.GameHistory.flat...
[((1988, 2034), 'collections.deque', 'deque', ([], {'maxlen': 'self.args.selfplay_buffer_window'}), '(maxlen=self.args.selfplay_buffer_window)\n', (1993, 2034), False, 'from collections import deque\n'), ((2933, 2983), 'utils.selfplay_utils.ParameterScheduler', 'ParameterScheduler', (['self.args.temperature_schedule'],...
import os, subprocess from itertools import chain from os.path import join import pandas as pd from Modules.Utils import run, make_dir class FileManager: """Project non-specific class for handling local and cloud storage.""" def __init__(self, training=False): """create an empty local_paths variable ...
[ "Modules.Utils.run", "os.path.exists", "os.getenv", "pandas.read_csv", "subprocess.run", "os.path.join", "os.path.splitext", "os.path.split", "os.path.dirname", "Modules.Utils.make_dir", "os.remove" ]
[((3876, 3927), 'os.path.join', 'join', (["self.local_paths['master_dir']", 'relative_path'], {}), "(self.local_paths['master_dir'], relative_path)\n", (3880, 3927), False, 'from os.path import join\n'), ((4366, 4408), 'os.path.join', 'join', (['self.cloud_master_dir', 'relative_path'], {}), '(self.cloud_master_dir, re...
from mainwindow.ds.dsgui.sll_gui import SLLgui import time class SLL: def __init__(self, root): sll = LinkedList() gui = SLLgui(root, sll) sll.setgui(gui) class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self...
[ "time.sleep", "mainwindow.ds.dsgui.sll_gui.SLLgui" ]
[((143, 160), 'mainwindow.ds.dsgui.sll_gui.SLLgui', 'SLLgui', (['root', 'sll'], {}), '(root, sll)\n', (149, 160), False, 'from mainwindow.ds.dsgui.sll_gui import SLLgui\n'), ((3146, 3161), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (3156, 3161), False, 'import time\n'), ((4956, 4971), 'time.sleep', 'time.s...
from IPython.display import display from .nodes.estimate_propensity import ( schedule_propensity_scoring, schedule_propensity_scoring, fit_propensity, estimate_propensity) from .nodes.utils import ( bundle_train_and_test_data, impute_cols_features, treatment_fractions_, compute_cate, add_cate_to_df, ...
[ "IPython.display.display" ]
[((3720, 3754), 'IPython.display.display', 'display', (['self.treated__sim_eval_df'], {}), '(self.treated__sim_eval_df)\n', (3727, 3754), False, 'from IPython.display import display\n'), ((3767, 3803), 'IPython.display.display', 'display', (['self.untreated__sim_eval_df'], {}), '(self.untreated__sim_eval_df)\n', (3774,...
import tensorflow as tf import numpy as np from tensorflow.keras.models import Model from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Dense, Flatten from tensorflow.keras.optimizers import Adam from tensorflow.keras.metrics import categorical_crossentropy from tensorflow.keras.preproce...
[ "os.listdir", "tensorflow.keras.applications.mobilenet.MobileNet", "os.path.join", "tensorflow.keras.preprocessing.image.ImageDataGenerator", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Dense", "tensorflow.keras.models.Model" ]
[((1711, 1754), 'tensorflow.keras.applications.mobilenet.MobileNet', 'tf.keras.applications.mobilenet.MobileNet', ([], {}), '()\n', (1752, 1754), True, 'import tensorflow as tf\n'), ((1974, 2021), 'tensorflow.keras.models.Model', 'Model', ([], {'inputs': 'mobile.input', 'outputs': 'predictions'}), '(inputs=mobile.input...
""" This file does three things: - It implements a simple PyTorch model. - Exports in to ONNX using a combination of tracing and scripting - Converts it to MDF """ import torch import onnx from onnx import helper from modeci_mdf.interfaces.onnx import onnx_to_mdf class SimpleIntegrator(torch.nn.Module):...
[ "torch.jit.script", "torch.ones", "onnx.load", "modeci_mdf.interfaces.onnx.onnx_to_mdf", "torch.zeros", "torch.zeros_like", "onnx.checker.check_model", "torch.onnx.export" ]
[((2351, 2374), 'torch.jit.script', 'torch.jit.script', (['model'], {}), '(model)\n', (2367, 2374), False, 'import torch\n'), ((2453, 2471), 'torch.ones', 'torch.ones', (['(1, 1)'], {}), '((1, 1))\n', (2463, 2471), False, 'import torch\n'), ((2476, 2608), 'torch.onnx.export', 'torch.onnx.export', (['model', 'dummy_inpu...
import pymongo import os from dotenv import load_dotenv ### ESTABLISH POSTGRES CONNECTION load_dotenv() DB_USER = os.getenv("MONGO_USER", default="OOPS") DB_PASSWORD = os.getenv("MONGO_PASSWORD", default="<PASSWORD>") CLUSTER_NAME = os.getenv("MONGO_CLUSTER_NAME", default="OOPS") connection_uri = f"mongodb+srv://{D...
[ "pymongo.MongoClient", "os.getenv", "dotenv.load_dotenv" ]
[((93, 106), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (104, 106), False, 'from dotenv import load_dotenv\n'), ((118, 157), 'os.getenv', 'os.getenv', (['"""MONGO_USER"""'], {'default': '"""OOPS"""'}), "('MONGO_USER', default='OOPS')\n", (127, 157), False, 'import os\n'), ((172, 221), 'os.getenv', 'os.geten...
#!/usr/bin/env python3 import requests class NetworkException(Exception): pass class ApiException(Exception): pass class ApiClient(): def __init__(self, post_url = '2captcha.com'): self.post_url = post_url def in_(self, files={}, **kwargs): ''' s...
[ "requests.post", "requests.get" ]
[((2371, 2415), 'requests.get', 'requests.get', (['current_url_out'], {'params': 'kwargs'}), '(current_url_out, params=kwargs)\n', (2383, 2415), False, 'import requests\n'), ((958, 1010), 'requests.post', 'requests.post', (['current_url'], {'data': 'kwargs', 'files': 'files'}), '(current_url, data=kwargs, files=files)\...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def crear_recursos_desde_aulas(apps, schema_editor): Aula = apps.get_model('app_reservas', 'Aula') Recurso = apps.get_model('app_reservas', 'Recurso') # Recorre todas las aulas existentes. for aul...
[ "django.db.migrations.RunPython" ]
[((806, 854), 'django.db.migrations.RunPython', 'migrations.RunPython', (['crear_recursos_desde_aulas'], {}), '(crear_recursos_desde_aulas)\n', (826, 854), False, 'from django.db import migrations, models\n')]
import pandas as pd import numpy as np import plotly.graph_objects as go import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input,Output import os print(os.getcwd()) df_input_large=pd.read_csv('C:/Users/Asus/ads_covid-19/data/processed/COVID_large...
[ "plotly.graph_objects.Bar", "pandas.read_csv", "dash_core_components.Input", "dash.dependencies.Output", "dash_html_components.Br", "os.getcwd", "dash.dependencies.Input", "plotly.graph_objects.Figure", "numpy.array", "dash_core_components.Dropdown", "plotly.graph_objects.Scatter", "dash_core_...
[((254, 372), 'pandas.read_csv', 'pd.read_csv', (['"""C:/Users/Asus/ads_covid-19/data/processed/COVID_large_flat_table.csv"""'], {'sep': '""";"""', 'parse_dates': '[0]'}), "(\n 'C:/Users/Asus/ads_covid-19/data/processed/COVID_large_flat_table.csv',\n sep=';', parse_dates=[0])\n", (265, 372), True, 'import pandas ...
import pandas as pd import requests import re import aiohttp import asyncio import nest_asyncio from joblib import logger nest_asyncio.apply() def preprocessing(): data =pd.read_csv("data/external/dialect_dataset.csv") n = int(data.shape[0]/1000) # chunk row size list_df = [data[i:i + n] for i in ran...
[ "aiohttp.ClientSession", "pandas.read_csv", "asyncio.gather", "nest_asyncio.apply", "joblib.logger.error" ]
[((123, 143), 'nest_asyncio.apply', 'nest_asyncio.apply', ([], {}), '()\n', (141, 143), False, 'import nest_asyncio\n'), ((178, 226), 'pandas.read_csv', 'pd.read_csv', (['"""data/external/dialect_dataset.csv"""'], {}), "('data/external/dialect_dataset.csv')\n", (189, 226), True, 'import pandas as pd\n'), ((460, 483), '...
# Generated by Django 3.0.11 on 2020-12-12 22:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0005_remove_user_home_address'), ] operations = [ migrations.Add...
[ "django.db.models.ForeignKey" ]
[((404, 566), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'help_text': '"""User who applied leader designation."""', 'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), "(help_text='User who applied leader designation.', null=\n True, on_delete=django...
"""ROS node that connects multiple speakers to ROS topics.""" import rospy from gazebo_simulation.msg import CarState as CarStateMsg from simulation_evaluation.msg import Broadcast as BroadcastMsg from simulation_evaluation.msg import Speaker as SpeakerMsg from simulation_groundtruth.msg import GroundtruthStatus from ...
[ "simulation.src.simulation_evaluation.src.speaker.speakers.SpeedSpeaker", "simulation.src.simulation_evaluation.src.speaker.speakers.AreaSpeaker", "rospy.Publisher", "rospy.Subscriber", "simulation.src.simulation_evaluation.src.speaker.speakers.ZoneSpeaker", "rospy.ServiceProxy", "rospy.wait_for_message...
[((1726, 1760), 'rospy.logdebug', 'rospy.logdebug', (['"""STARTING SPEAKER"""'], {}), "('STARTING SPEAKER')\n", (1740, 1760), False, 'import rospy\n'), ((1895, 1953), 'rospy.ServiceProxy', 'rospy.ServiceProxy', (['groundtruth_topics.section', 'SectionSrv'], {}), '(groundtruth_topics.section, SectionSrv)\n', (1913, 1953...
from Layers import * import torch_geometric.nn as pyg_nn from torch_geometric.data import Data import scipy.sparse as sp class GraphCNN(nn.Module): def __init__(self,num_stock, d_market,d_news,out_c,d_hidden , hidn_rnn , hid_c, dropout ,alpha=0.2,alpha1=0.0054,t_mix=1,n_layeres=2,n_heads=1):##alpha1 denotes the ...
[ "scipy.sparse.coo_matrix" ]
[((2894, 2965), 'scipy.sparse.coo_matrix', 'sp.coo_matrix', (['(cc, (row, col))'], {'shape': '(self.num_stock, self.num_stock)'}), '((cc, (row, col)), shape=(self.num_stock, self.num_stock))\n', (2907, 2965), True, 'import scipy.sparse as sp\n')]
import RPi.GPIO as GPIO import time import subprocess from datetime import datetime from pprint import pprint import sys import time card = '' counter = 1 while True: rfid = open('/dev/bus/usb/001/021', 'rb') RFID_input = rfid.read() #RFID_output = rfid.write(card) print(f"read {counter}: ", RFID_input...
[ "time.sleep" ]
[((343, 356), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (353, 356), False, 'import time\n')]
from django.conf.urls import url from rest_framework import routers from rest_framework_jwt.views import obtain_jwt_token from .views import * urlpatterns = [ url(r'^mobiles/count/$', MobileCountView.as_view()), url(r'^login/account', obtain_jwt_token), url(r'^currentUser', CurrentUserView.as_view()) ]
[ "django.conf.urls.url" ]
[((222, 261), 'django.conf.urls.url', 'url', (['"""^login/account"""', 'obtain_jwt_token'], {}), "('^login/account', obtain_jwt_token)\n", (225, 261), False, 'from django.conf.urls import url\n')]
import sys, configparser from math import floor from fractions import Fraction from .matrixOp import frange from collections import OrderedDict # NOTE File path starts where main.py executes config = configparser.ConfigParser() filePath = 'config.ini' # Reads config file and returns variables # TODO enforce input ty...
[ "fractions.Fraction", "configparser.ConfigParser" ]
[((202, 229), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (227, 229), False, 'import sys, configparser\n'), ((1164, 1202), 'fractions.Fraction', 'Fraction', (["configType['RatioTrainData']"], {}), "(configType['RatioTrainData'])\n", (1172, 1202), False, 'from fractions import Fraction\n'...
#!/usr/bin/env python3 import os import subprocess import unittest from btrfs_diff.tests.render_subvols import render_sendstream from tests.temp_subvolumes import with_temp_subvols from ..procfs_serde import serialize, deserialize_untyped, deserialize_int def _render_subvol(subvol: {'Subvol'}): rendered = rende...
[ "os.path.join", "os.geteuid", "os.getegid" ]
[((1744, 1782), 'os.path.join', 'os.path.join', (['outer_dir', 'name_with_ext'], {}), '(outer_dir, name_with_ext)\n', (1756, 1782), False, 'import os\n'), ((2347, 2385), 'os.path.join', 'os.path.join', (['outer_dir', 'name_with_ext'], {}), '(outer_dir, name_with_ext)\n', (2359, 2385), False, 'import os\n'), ((1055, 109...
# -*- coding:utf-8 -*- from __future__ import absolute_import, unicode_literals from pipeline.compressors import CompressorBase from yepes.utils.minifier import minify_css, minify_js class Minifier(CompressorBase): """ A compressor that utilizes ``yepes.utils.minifier.minify_css()`` for CSS files and `...
[ "yepes.utils.minifier.minify_js", "yepes.utils.minifier.minify_css" ]
[((426, 441), 'yepes.utils.minifier.minify_css', 'minify_css', (['css'], {}), '(css)\n', (436, 441), False, 'from yepes.utils.minifier import minify_css, minify_js\n'), ((489, 502), 'yepes.utils.minifier.minify_js', 'minify_js', (['js'], {}), '(js)\n', (498, 502), False, 'from yepes.utils.minifier import minify_css, mi...
import click from migrate_command import migrate @click.group() def cli(): """""" cli.add_command(migrate) if __name__ == '__main__': cli()
[ "click.group" ]
[((52, 65), 'click.group', 'click.group', ([], {}), '()\n', (63, 65), False, 'import click\n')]
from abc import ABCMeta from typing import Dict, List, Tuple import numpy as np import tensorflow as tf import tf_metrics from IMGJM.layers import (CharEmbedding, GloveEmbedding, CoarseGrainedLayer, Interaction, FineGrainedLayer) class BaseModel(metaclass=ABCMeta): def build_tf_session(s...
[ "tensorflow.local_variables_initializer", "tensorflow.nn.softmax", "tensorflow.reduce_mean", "IMGJM.layers.CoarseGrainedLayer", "tensorflow.Session", "tensorflow.placeholder", "tensorflow.layers.dropout", "tensorflow.train.AdamOptimizer", "tensorflow.train.get_or_create_global_step", "tensorflow.s...
[((484, 496), 'tensorflow.Session', 'tf.Session', ([], {}), '()\n', (494, 496), True, 'import tensorflow as tf\n'), ((3475, 3516), 'IMGJM.layers.CharEmbedding', 'CharEmbedding', ([], {'vocab_size': 'char_vocab_size'}), '(vocab_size=char_vocab_size)\n', (3488, 3516), False, 'from IMGJM.layers import CharEmbedding, Glove...
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import re from setuptools import setup with io.open('README.rst', 'rt', encoding='utf8') as f: readme = f.read() setup( name='itacate', version='1.0.3', url='https://github.com/categulario/itacate', license='BSD', author='<NAME>', aut...
[ "setuptools.setup", "io.open" ]
[((175, 1082), 'setuptools.setup', 'setup', ([], {'name': '"""itacate"""', 'version': '"""1.0.3"""', 'url': '"""https://github.com/categulario/itacate"""', 'license': '"""BSD"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'description': '"""Configuration module from flask, for the rest of the world"""'...
from tkinter import * from tkinter import filedialog from tkinter import filedialog,messagebox from MQTT.mqttListener import * from globalVar import * import os def openFile(): global filepath filepath = StringVar() #Fetch the file path of the hex file browsed. if(filepath == ""): ...
[ "tkinter.filedialog.askopenfilename", "os.getcwd" ]
[((496, 606), 'tkinter.filedialog.askopenfilename', 'filedialog.askopenfilename', ([], {'initialdir': 'filepath', 'title': '"""select a file"""', 'filetypes': "[('bin files', '*.bin')]"}), "(initialdir=filepath, title='select a file',\n filetypes=[('bin files', '*.bin')])\n", (522, 606), False, 'from tkinter import ...
import logging import os import time import boto3 client = boto3.client("pinpoint") def lambda_handler(event, context): log_level = str(os.environ.get("LOG_LEVEL")).upper() if log_level not in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]: log_level = "ERROR" logging.getLogger().setLevel(log...
[ "logging.getLogger", "os.environ.get", "boto3.client", "logging.info" ]
[((61, 85), 'boto3.client', 'boto3.client', (['"""pinpoint"""'], {}), "('pinpoint')\n", (73, 85), False, 'import boto3\n'), ((332, 351), 'logging.info', 'logging.info', (['event'], {}), '(event)\n', (344, 351), False, 'import logging\n'), ((500, 522), 'logging.info', 'logging.info', (['response'], {}), '(response)\n', ...
from typing import List, Tuple, Dict from copy import deepcopy from sqlite3 import Cursor import os from parsimonious import Grammar from parsimonious.exceptions import ParseError from allennlp.common.checks import ConfigurationError from allennlp.semparse.contexts.sql_context_utils import SqlVisitor from allennlp.se...
[ "text2sql.semparse.contexts.text2sql_table_context_v3.update_grammar_with_global_values", "text2sql.semparse.contexts.text2sql_table_context_v3.update_grammar_to_be_variable_free", "text2sql.semparse.contexts.text2sql_table_context_v3.update_grammar_numbers_and_strings_with_variables", "allennlp.data.dataset_...
[((2980, 3012), 'allennlp.data.dataset_readers.dataset_utils.text2sql_utils.read_dataset_schema', 'read_dataset_schema', (['schema_path'], {}), '(schema_path)\n', (2999, 3012), False, 'from allennlp.data.dataset_readers.dataset_utils.text2sql_utils import read_dataset_schema\n'), ((3986, 4024), 'copy.deepcopy', 'deepco...
import csv import numpy as np from collections import Counter from sklearn.linear_model import LogisticRegression from sklearn.naive_bayes import GaussianNB from sklearn.model_selection import KFold from sklearn.feature_extraction import DictVectorizer from sklearn.metrics import f1_score from sklearn imp...
[ "sklearn.feature_extraction.DictVectorizer", "support.helper.process_tokens", "sklearn.linear_model.LogisticRegression", "collections.Counter", "numpy.array", "support.helper.tokenize", "sklearn.naive_bayes.GaussianNB", "sklearn.model_selection.KFold", "csv.reader", "sklearn.preprocessing.scale" ]
[((654, 663), 'collections.Counter', 'Counter', ([], {}), '()\n', (661, 663), False, 'from collections import Counter\n'), ((1314, 1330), 'sklearn.feature_extraction.DictVectorizer', 'DictVectorizer', ([], {}), '()\n', (1328, 1330), False, 'from sklearn.feature_extraction import DictVectorizer\n'), ((2370, 2390), 'nump...
import requests import json from .models import Location, WeatherDetails def get_location(ip_address): resp = requests.get('http://ip-api.com/json/' + ip_address) resp_json = json.loads(resp.text) city = resp_json['city'] lon = resp_json['lon'] lat = resp_json['lat'] country = resp_json['cou...
[ "requests.post", "json.loads", "json.dumps", "requests.get" ]
[((116, 168), 'requests.get', 'requests.get', (["('http://ip-api.com/json/' + ip_address)"], {}), "('http://ip-api.com/json/' + ip_address)\n", (128, 168), False, 'import requests\n'), ((186, 207), 'json.loads', 'json.loads', (['resp.text'], {}), '(resp.text)\n', (196, 207), False, 'import json\n'), ((550, 567), 'reque...
from ray.rllib.models.torch.torch_modelv2 import TorchModelV2 from ray.rllib.models import ModelCatalog from ray.rllib.utils.annotations import override from ray.rllib.utils import try_import_torch torch, nn = try_import_torch() from utils.utils import get_conv_output_shape ########################################...
[ "ray.rllib.utils.try_import_torch", "utils.utils.get_conv_output_shape" ]
[((211, 229), 'ray.rllib.utils.try_import_torch', 'try_import_torch', ([], {}), '()\n', (227, 229), False, 'from ray.rllib.utils import try_import_torch\n'), ((1430, 1472), 'utils.utils.get_conv_output_shape', 'get_conv_output_shape', (['shape', '*conv_params'], {}), '(shape, *conv_params)\n', (1451, 1472), False, 'fro...
#!/usr/bin/env python3 # coding : utf-8 import os import curses from select_template import select_temp import unicodedata as ucd def commit(stdscr): prefix = select_temp(stdscr) cursor = 0 body = "" stdscr.keypad(True) curses.curs_set(1) curses.use_default_colors() curses.init_pair(2,...
[ "curses.color_pair", "select_template.select_temp", "curses.wrapper", "curses.init_pair", "curses.curs_set", "curses.use_default_colors", "unicodedata.east_asian_width", "os.system" ]
[((167, 186), 'select_template.select_temp', 'select_temp', (['stdscr'], {}), '(stdscr)\n', (178, 186), False, 'from select_template import select_temp\n'), ((246, 264), 'curses.curs_set', 'curses.curs_set', (['(1)'], {}), '(1)\n', (261, 264), False, 'import curses\n'), ((269, 296), 'curses.use_default_colors', 'curses...
#!/usr/bin/env python from setuptools import setup setup( name = "glitch", version = "1.4", description = "glitch jpg files", license = 'MIT', author = "trsqxyz", author_email = "<EMAIL>", url = "https://github.com/trsqxyz/glitch", classifiers = [ "Programming Language :: Pyth...
[ "setuptools.setup" ]
[((54, 495), 'setuptools.setup', 'setup', ([], {'name': '"""glitch"""', 'version': '"""1.4"""', 'description': '"""glitch jpg files"""', 'license': '"""MIT"""', 'author': '"""trsqxyz"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/trsqxyz/glitch"""', 'classifiers': "['Programming Language :: Python ...
import numpy from channel_noise_simulator import channel_noise_simulator cns = channel_noise_simulator() example_data = "" sample_size = 20000 for i in range(sample_size): example_data += "0" error_density_multiplier = 2 #Higher density means smaler but more errors x1 = 0; x2 = 0; count = 1000 enter_error_rate=...
[ "channel_noise_simulator.channel_noise_simulator" ]
[((81, 106), 'channel_noise_simulator.channel_noise_simulator', 'channel_noise_simulator', ([], {}), '()\n', (104, 106), False, 'from channel_noise_simulator import channel_noise_simulator\n')]
from django.db import transaction from django.utils.translation import gettext_lazy as _ import django_filters import reversion from rest_framework import exceptions, serializers, viewsets from resources.api.base import NullableDateTimeField, TranslatedModelSerializer, register_view from .models import CateringProdu...
[ "resources.api.base.NullableDateTimeField", "django_filters.NumberFilter", "django.utils.translation.gettext_lazy", "reversion.create_revision", "reversion.set_comment", "django_filters.CharFilter", "rest_framework.exceptions.ValidationError", "resources.api.base.register_view", "reversion.set_user"...
[((1072, 1124), 'resources.api.base.register_view', 'register_view', (['CateringProvider', '"""catering_provider"""'], {}), "(CateringProvider, 'catering_provider')\n", (1085, 1124), False, 'from resources.api.base import NullableDateTimeField, TranslatedModelSerializer, register_view\n'), ((1806, 1880), 'resources.api...
import calendar import requests from datetime import datetime, timedelta class Magicseaweed(object): api_url = '' def __init__(self, api_key): base_url = 'http://magicseaweed.com/api/{0}/forecast' self.api_url = base_url.format(api_key) def timestamp_from_datetime(self, dt): ...
[ "datetime.datetime", "datetime.timedelta" ]
[((1043, 1093), 'datetime.datetime', 'datetime', (['dt.year', 'dt.month', 'dt.day', 'dt.hour', '(0)', '(0)'], {}), '(dt.year, dt.month, dt.day, dt.hour, 0, 0)\n', (1051, 1093), False, 'from datetime import datetime, timedelta\n'), ((1009, 1027), 'datetime.timedelta', 'timedelta', ([], {'hours': '(1)'}), '(hours=1)\n', ...
import numpy as np import ast def newtonInterpolation(x, y): x = ast.literal_eval(x) y = ast.literal_eval(y) n = len(y) table = np.zeros([n, n]) # Create a square matrix to hold table table[::, 0] = y # first column is y results = {"table": [], "coefficient": []} results["tabl...
[ "ast.literal_eval", "numpy.zeros" ]
[((74, 93), 'ast.literal_eval', 'ast.literal_eval', (['x'], {}), '(x)\n', (90, 93), False, 'import ast\n'), ((103, 122), 'ast.literal_eval', 'ast.literal_eval', (['y'], {}), '(y)\n', (119, 122), False, 'import ast\n'), ((152, 168), 'numpy.zeros', 'np.zeros', (['[n, n]'], {}), '([n, n])\n', (160, 168), True, 'import num...
import os from simplediscord import SimpleDiscord as Discord token = "Bot " + os.getenv("DISCORD_TOKEN") api = os.getenv("DISCORD_API") guild = os.getenv("DISCORD_GUILD") bad_words = {} # When modifying: make sure the language keyword begins with an uppercase and the words are all lowercased. Discord.Filter("bad_wor...
[ "simplediscord.SimpleDiscord.Filter", "simplediscord.SimpleDiscord.Connect", "os.getenv" ]
[((112, 136), 'os.getenv', 'os.getenv', (['"""DISCORD_API"""'], {}), "('DISCORD_API')\n", (121, 136), False, 'import os\n'), ((145, 171), 'os.getenv', 'os.getenv', (['"""DISCORD_GUILD"""'], {}), "('DISCORD_GUILD')\n", (154, 171), False, 'import os\n'), ((297, 328), 'simplediscord.SimpleDiscord.Filter', 'Discord.Filter'...
#!/usr/bin/env python3 import os from pathlib import Path from sys import platform from broker._utils.yaml import Yaml from broker.errors import QuietExit class ENV_BASE: def __init__(self) -> None: self.HOME: Path = Path.home() hidden_base_dir = self.HOME / ".ebloc-broker" fn = hidden_b...
[ "pathlib.Path", "pathlib.Path.home", "os.path.isfile", "os.path.isdir", "broker.errors.QuietExit", "broker._utils.yaml.Yaml" ]
[((233, 244), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (242, 244), False, 'from pathlib import Path\n'), ((584, 592), 'broker._utils.yaml.Yaml', 'Yaml', (['fn'], {}), '(fn)\n', (588, 592), False, 'from broker._utils.yaml import Yaml\n'), ((989, 1017), 'pathlib.Path', 'Path', (["self.cfg['ebloc_path']"], {}),...
#coding: utf-8 __author__ = '<NAME> <<EMAIL>>' __status__ = 'experimental' import re import sys import collections from _utilities import sort_uniq _BRANCH_OPES = frozenset([ "ifeq", "ifnull", "iflt", "ifle", "ifne", "ifnonnull", "ifgt", "ifge", "if_icmpeq", "if_icmpne", "if_icmplt", "if_icmpgt", "if_icmple...
[ "collections.Counter", "_utilities.sort_uniq", "re.compile" ]
[((1645, 1701), 're.compile', 're.compile', (['"""^//\\\\s+(Interface)?Method\\\\s+(?P<name>.+)$"""'], {}), "('^//\\\\s+(Interface)?Method\\\\s+(?P<name>.+)$')\n", (1655, 1701), False, 'import re\n'), ((10726, 10747), 'collections.Counter', 'collections.Counter', ([], {}), '()\n', (10745, 10747), False, 'import collect...
from django.db import models from django.urls import reverse from django.contrib.auth.models import AbstractUser, BaseUserManager class UserManager(BaseUserManager): """ Base para customizar User""" use_in_migrations = True def _create_user(self, username, email, password, **extra_fields): i...
[ "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.BooleanField", "django.urls.reverse", "django.db.models.CharField" ]
[((1496, 1536), 'django.db.models.EmailField', 'models.EmailField', (['"""E-mail"""'], {'unique': '(True)'}), "('E-mail', unique=True)\n", (1513, 1536), False, 'from django.db import models\n'), ((1554, 1593), 'django.db.models.CharField', 'models.CharField', (['"""Nome"""'], {'max_length': '(30)'}), "('Nome', max_leng...
from flask import Flask app = Flask(__name__) app.config.from_object('settings') import govhack2014.routes # noqa
[ "flask.Flask" ]
[((31, 46), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (36, 46), False, 'from flask import Flask\n')]
import code import logging from threading import Thread from .helpers import setup_logging # Set up logging setup_logging() logger = logging.getLogger(__name__) class InteractiveSession: """ Starting an InteractiveConsole and constantly checking """ mitm_handler = None def __init__(self, mitm_...
[ "logging.getLogger", "threading.Thread", "code.InteractiveConsole" ]
[((135, 162), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (152, 162), False, 'import logging\n'), ((654, 688), 'code.InteractiveConsole', 'code.InteractiveConsole', (['variables'], {}), '(variables)\n', (677, 688), False, 'import code\n'), ((712, 741), 'threading.Thread', 'Thread', ([]...
import pytest from sdk.data.Mappable import NoneAsMappable, StringAsMappable def test_none_as_mappable(): none = NoneAsMappable() assert none.to_json() == '' assert none == NoneAsMappable() @pytest.mark.parametrize('string', [ 'asdfg', 'test-test', 'dunnoLol' ]) def test_string_as_mappable(...
[ "sdk.data.Mappable.NoneAsMappable", "pytest.mark.parametrize", "sdk.data.Mappable.StringAsMappable.from_str", "sdk.data.Mappable.StringAsMappable" ]
[((208, 277), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""string"""', "['asdfg', 'test-test', 'dunnoLol']"], {}), "('string', ['asdfg', 'test-test', 'dunnoLol'])\n", (231, 277), False, 'import pytest\n'), ((120, 136), 'sdk.data.Mappable.NoneAsMappable', 'NoneAsMappable', ([], {}), '()\n', (134, 136), Fa...
""" The main hyperion entry point. Run `hyperion --help` for more info. """ import logging from asyncio import get_event_loop, set_event_loop_policy import click import uvloop from click import Path from colorama import Fore from .fetch import ApiError from . import logger from .api import run_api_server from .cli im...
[ "logging.basicConfig", "click.argument", "click.option", "click.command", "click.echo", "click.Path", "uvloop.EventLoopPolicy", "asyncio.get_event_loop", "logging.error" ]
[((473, 488), 'click.command', 'click.command', ([], {}), '()\n', (486, 488), False, 'import click\n'), ((490, 543), 'click.argument', 'click.argument', (['"""locations"""'], {'required': '(False)', 'nargs': '(-1)'}), "('locations', required=False, nargs=-1)\n", (504, 543), False, 'import click\n'), ((545, 587), 'click...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ libG(oogle)Reader Copyright (C) 2010 <NAME> <<EMAIL>> http://asktherelic.com Python library for working with the unofficial Google Reader API. Google may break this at anytime, I am not responsible for damages from that breakage, but I will try my best to fix it. Us...
[ "time.localtime", "urllib2.urlopen", "sys.setdefaultencoding", "lib.oauth2.Token", "lib.oauth2.Client", "urllib2.Request", "lib.oauth2.Consumer", "urllib.urlencode", "urlparse.parse_qsl", "time.time", "simplejson.loads", "time.gmtime" ]
[((750, 781), 'sys.setdefaultencoding', 'sys.setdefaultencoding', (['"""utf-8"""'], {}), "('utf-8')\n", (772, 781), False, 'import sys\n'), ((15308, 15345), 'simplejson.loads', 'json.loads', (['contentJson'], {'strict': '(False)'}), '(contentJson, strict=False)\n', (15318, 15345), True, 'import simplejson as json\n'), ...
from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr from ..models.ssh_binding import SSHBinding from ..models.ssh_host_key import SSHHostKey from ..types import UNSET, Unset T = TypeVar("T", bound="SSHServiceStatus") @attr.s(auto_attribs=True) class SSHServiceStatus: """ """ is_acti...
[ "attr.s", "attr.ib", "typing.TypeVar" ]
[((204, 242), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': '"""SSHServiceStatus"""'}), "('T', bound='SSHServiceStatus')\n", (211, 242), False, 'from typing import Any, Dict, List, Type, TypeVar, Union, cast\n'), ((246, 271), 'attr.s', 'attr.s', ([], {'auto_attribs': '(True)'}), '(auto_attribs=True)\n', (252, 27...
# Generated by Django 3.1.1 on 2020-09-23 01:03 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('web_project', '0003_stock_change'), ] operations = [ migrations.RemoveField( model_name='stock', name='high', ), ...
[ "django.db.migrations.RemoveField" ]
[((225, 280), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""stock"""', 'name': '"""high"""'}), "(model_name='stock', name='high')\n", (247, 280), False, 'from django.db import migrations\n'), ((325, 379), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_...
# Standard library imports import pathlib import sys # ---------------------------------------------------------------------------- # Local imports # ---------------------------------------------------------------------------- # # option: 1 # import files # option: 2 # Implicit Relative Imports. # These were removed...
[ "pathlib.Path.cwd", "files.add_empty_file", "pathlib.Path" ]
[((1124, 1142), 'pathlib.Path.cwd', 'pathlib.Path.cwd', ([], {}), '()\n', (1140, 1142), False, 'import pathlib\n'), ((474, 496), 'pathlib.Path', 'pathlib.Path', (['__file__'], {}), '(__file__)\n', (486, 496), False, 'import pathlib\n'), ((1305, 1346), 'files.add_empty_file', 'files.add_empty_file', (['(new_root / rel_p...
#Hazirlayan: <NAME> import math def polinomlar(derece): if(derece == 1): a1 = ((xiler[0]*xiyiler[1])-(xiler[1]*xiyiler[0]))/ ((xiler[0]*xiler[2])-(xiler[1])**(2)) a0 = (xiyiler[0]-(a1*xiler[1]))/xiler[0] with open("sonuc.txt","w") as file: #sonuc.txt dosyasini temizleyip ...
[ "math.sqrt" ]
[((5592, 5617), 'math.sqrt', 'math.sqrt', (['((st - sr) / st)'], {}), '((st - sr) / st)\n', (5601, 5617), False, 'import math\n')]
import torch as th import time import numpy as np import pandas as pd import os import seaborn as sns import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter sns.set() sns.set_style("darkgrid", {"axes.facecolor": "#f0f0f7"}) linestyle = [':', '--', '-.', '-'] fontsize = 20 #EXP_PATH = os.path.join(...
[ "seaborn.cubehelix_palette", "matplotlib.pyplot.ylabel", "time.sleep", "seaborn.set_style", "seaborn.set", "seaborn.color_palette", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.yticks", "matplotlib.pyplot.axis", "matplotlib.pyplot.ylim", "torch.gather", "matplotlib.pyplot.xticks", "matplot...
[((178, 187), 'seaborn.set', 'sns.set', ([], {}), '()\n', (185, 187), True, 'import seaborn as sns\n'), ((188, 244), 'seaborn.set_style', 'sns.set_style', (['"""darkgrid"""', "{'axes.facecolor': '#f0f0f7'}"], {}), "('darkgrid', {'axes.facecolor': '#f0f0f7'})\n", (201, 244), True, 'import seaborn as sns\n'), ((1112, 113...
# electric.csv를 읽어서 w,b를 구하고 # 실측데이터 scatter, 예측데이터는 라인차트를 그리시요. # 전기생산량이 5인경우 전기사용량을 예측하시오 # 전기생산량, 전기사용량 # Keras 버전으로 import tensorflow as tf import numpy as np import matplotlib import matplotlib.pyplot as plt from tensorflow.keras.layers import Dense from tensorflow.keras import Sequential from tensorflow.keras.o...
[ "matplotlib.pyplot.plot", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Dense", "numpy.loadtxt", "matplotlib.pyplot.show" ]
[((449, 556), 'numpy.loadtxt', 'np.loadtxt', (['"""../../../data/electric.csv"""'], {'delimiter': '""","""', 'skiprows': '(1)', 'dtype': 'np.float32', 'encoding': '"""UTF8"""'}), "('../../../data/electric.csv', delimiter=',', skiprows=1, dtype=\n np.float32, encoding='UTF8')\n", (459, 556), True, 'import numpy as np...
#!/usr/bin/python # -*- coding: utf-8 -*- import os import mock import pytest import dallinger.db import datetime import signal from dallinger.config import get_config from dallinger.heroku import app_name from dallinger.heroku.messages import EmailingHITMessenger from dallinger.heroku.messages import EmailConfig @py...
[ "dallinger.heroku.messages.HITSummary", "mock.Mock", "smtplib.SMTPException", "dallinger.heroku.clock.check_db_for_missing_notifications", "datetime.timedelta", "dallinger.heroku.messages.EmailConfig", "mock.patch", "dallinger.utils.GitClient", "dallinger.heroku.tools.HerokuApp", "pytest.mark.usef...
[((11820, 11859), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""dummy_mailer"""'], {}), "('dummy_mailer')\n", (11843, 11859), False, 'import pytest\n'), ((24384, 24423), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""bartlett_dir"""'], {}), "('bartlett_dir')\n", (24407, 24423), False, 'import...
"""Test geomconv script.""" import os import pytest import geomconv fixtures_dir = os.path.join('tests', 'fixtures') @pytest.fixture def chdir_fixtures(request): """Change the directory to the fixtures dir and back to the root directory after finished.""" cwd = os.getcwd() os.chdir(fixtures_dir) ...
[ "geomconv.main", "os.path.join", "os.getcwd", "os.chdir", "pytest.mark.parametrize" ]
[((84, 117), 'os.path.join', 'os.path.join', (['"""tests"""', '"""fixtures"""'], {}), "('tests', 'fixtures')\n", (96, 117), False, 'import os\n'), ((792, 843), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""outfile"""', "[[], ['*.out']]"], {}), "('outfile', [[], ['*.out']])\n", (815, 843), False, 'import p...
from floodsystem.geo import * from floodsystem.station import MonitoringStation from unittest import result from floodsystem.stationdata import build_station_list def test_stations_by_distance(): station1 = MonitoringStation("s id", "m id","A station", (3.0,4.0),(0.0,1.0),"A river","A town") station2 = Monitor...
[ "floodsystem.station.MonitoringStation", "floodsystem.stationdata.build_station_list" ]
[((212, 307), 'floodsystem.station.MonitoringStation', 'MonitoringStation', (['"""s id"""', '"""m id"""', '"""A station"""', '(3.0, 4.0)', '(0.0, 1.0)', '"""A river"""', '"""A town"""'], {}), "('s id', 'm id', 'A station', (3.0, 4.0), (0.0, 1.0),\n 'A river', 'A town')\n", (229, 307), False, 'from floodsystem.statio...
# Importar librerias import unittest from context import scripts # Carga de datos de funciones y obtencion del diccionario clases_orf dir_name_functions = '/home/datasci/PycharmProjects/P4-Issam/Data/tb_functions.pl' clases_orf = scripts.ProcessFiles(dir_name_functions).process_functions() class TestEjercicio2(unitt...
[ "unittest.main", "context.scripts.Ejercicio2.PatronOrf", "context.scripts.ProcessFiles" ]
[((1346, 1361), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1359, 1361), False, 'import unittest\n'), ((231, 271), 'context.scripts.ProcessFiles', 'scripts.ProcessFiles', (['dir_name_functions'], {}), '(dir_name_functions)\n', (251, 271), False, 'from context import scripts\n'), ((710, 750), 'context.scripts.E...
import tensorflow as tf import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import os import pandas as pd mpl.rcParams['figure.figsize'] = (8, 6) mpl.rcParams['axes.grid'] = False #data zip_path = tf.keras.utils.get_file( origin='https://storage.googleapis.com/tensorflow/tf-keras-dataset...
[ "numpy.mean", "numpy.reshape", "tensorflow.random.set_seed", "pandas.read_csv", "tensorflow.data.Dataset.from_tensor_slices", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "os.path.splitext", "numpy.array", "tensorflow.keras.layers.LSTM", "tensorflow.keras.layers.Dense", "tensorflow.ke...
[((225, 413), 'tensorflow.keras.utils.get_file', 'tf.keras.utils.get_file', ([], {'origin': '"""https://storage.googleapis.com/tensorflow/tf-keras-datasets/jena_climate_2009_2016.csv.zip"""', 'fname': '"""jena_climate_2009_2016.csv.zip"""', 'extract': '(True)'}), "(origin=\n 'https://storage.googleapis.com/tensorflo...