code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from oslo_log import log as logging LOG = logging.getLogger(__name__) def main(): pass
[ "oslo_log.log.getLogger" ]
[((44, 71), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (61, 71), True, 'from oslo_log import log as logging\n')]
import os, logging as L import striga.core.exception import striga.server.application from ._stsvcsb_utils import PathLimiter, LoabableObject ### class View(PathLimiter, LoabableObject): ''' Process bus object that executes Striga views ''' def __init__(self, rootdir, source, mode, entry = 'main', pat...
[ "os.path.join" ]
[((451, 480), 'os.path.join', 'os.path.join', (['rootdir', 'source'], {}), '(rootdir, source)\n', (463, 480), False, 'import os, logging as L\n')]
from conans import ConanFile, AutoToolsBuildEnvironment, tools from conans.errors import ConanInvalidConfiguration import functools import os import re import typing import unittest required_conan_version = ">=1.43.0" # This recipe includes a selftest to test conversion of os/arch to triplets (and vice verse) # Run...
[ "conans.tools.get", "conans.tools.unix_path", "os.path.realpath", "re.match", "conans.tools.patch", "conans.AutoToolsBuildEnvironment", "conans.errors.ConanInvalidConfiguration", "conans.tools.get_env", "functools.lru_cache", "os.path.join" ]
[((7022, 7044), 'functools.lru_cache', 'functools.lru_cache', (['(1)'], {}), '(1)\n', (7041, 7044), False, 'import functools\n'), ((6370, 6512), 'conans.errors.ConanInvalidConfiguration', 'ConanInvalidConfiguration', (['f"""This configuration is unsupported by this conan recip. Please consider adding support. ({key}={v...
import unittest from homeworks.homework_1.task_1.vector import Vector class VectorTest(unittest.TestCase): def test_empty_vector(self): with self.assertRaises(ValueError): self.assertEqual(Vector([]).length(), 0) def test_int_length(self): self.assertEqual(Vector([3, 4]).length()...
[ "homeworks.homework_1.task_1.vector.Vector" ]
[((773, 806), 'homeworks.homework_1.task_1.vector.Vector', 'Vector', (['[3.5, 1.74, 0.896, 0.445]'], {}), '([3.5, 1.74, 0.896, 0.445])\n', (779, 806), False, 'from homeworks.homework_1.task_1.vector import Vector\n'), ((826, 859), 'homeworks.homework_1.task_1.vector.Vector', 'Vector', (['[1, -2.97, -1.065, -3.29]'], {}...
import numpy as np import tensorflow as tf class PositionalEncodings(tf.keras.Model): """Sinusoidal positional encoding generator. """ def __init__(self, channels: int, presize: int = 128): """Initializer. Args: channels: size of the channels. presize: initial pe ca...
[ "tensorflow.range", "tensorflow.sin", "numpy.log", "tensorflow.reshape", "tensorflow.cast", "tensorflow.cos" ]
[((1155, 1169), 'tensorflow.range', 'tf.range', (['size'], {}), '(size)\n', (1163, 1169), True, 'import tensorflow as tf\n'), ((1211, 1240), 'tensorflow.range', 'tf.range', (['(0)', 'self.channels', '(2)'], {}), '(0, self.channels, 2)\n', (1219, 1240), True, 'import tensorflow as tf\n'), ((1626, 1663), 'tensorflow.resh...
from tkinter import * from PIL import Image, ImageTk import Utils import MainGUI def day_gui(day_date): # Create the frame root = Tk() # Initialisation of some useful variables last_click_x = 0 last_click_y = 0 root_width = 700 root_height = 400 # Definition of some useful functio...
[ "PIL.ImageTk.PhotoImage", "Utils.get_resources_path", "Utils.button_click_sound", "MainGUI.main_gui" ]
[((1573, 1604), 'Utils.button_click_sound', 'Utils.button_click_sound', (['(False)'], {}), '(False)\n', (1597, 1604), False, 'import Utils\n'), ((1735, 1766), 'Utils.button_click_sound', 'Utils.button_click_sound', (['(False)'], {}), '(False)\n', (1759, 1766), False, 'import Utils\n'), ((1798, 1816), 'MainGUI.main_gui'...
class Evaluator(object): """ Compute metrics for recommendations that have been written to file. Parameters ---------- compute_metrics : function(list,list) The evaluation function which should accept two lists of predicted and actual item indices. max_items : int The nu...
[ "collections.defaultdict" ]
[((1684, 1702), 'collections.defaultdict', 'defaultdict', (['float'], {}), '(float)\n', (1695, 1702), False, 'from collections import defaultdict\n')]
from django.db.models import BooleanField, CharField, TextField from wab.core.components.models import BaseModel class EmailTemplate(BaseModel): code = CharField("Specific code for core app", max_length=50, blank=True, null=True, editable=False, unique=True) is_protected = BooleanField("Is protected", defaul...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.BooleanField" ]
[((159, 270), 'django.db.models.CharField', 'CharField', (['"""Specific code for core app"""'], {'max_length': '(50)', 'blank': '(True)', 'null': '(True)', 'editable': '(False)', 'unique': '(True)'}), "('Specific code for core app', max_length=50, blank=True, null=\n True, editable=False, unique=True)\n", (168, 270)...
#!/usr/bin/env python3 # Copyright 2021 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
[ "matplotlib.pyplot.show", "matplotlib.dates.DayLocator", "numpy.cumsum", "matplotlib.dates.DateFormatter", "datetime.date.fromisoformat", "numpy.array", "matplotlib.pyplot.rc", "numpy.loadtxt", "matplotlib.ticker.MultipleLocator", "matplotlib.pyplot.subplots", "numpy.vstack" ]
[((1244, 1300), 'numpy.array', 'np.array', (["[d for d in data if d[0] not in ('', 'total')]"], {}), "([d for d in data if d[0] not in ('', 'total')])\n", (1252, 1300), True, 'import numpy as np\n'), ((1493, 1531), 'numpy.vstack', 'np.vstack', (['[[[data[0, 0], 0.0]], data]'], {}), '([[[data[0, 0], 0.0]], data])\n', (1...
import functools import pytest import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write('Hello, world') application = tornado.web.Application([ (r'/', MainHandler), (r'/f00', MainHandler), ]) @pytest.fixture(scope='module') def app(): ...
[ "functools.partial", "pytest.raises", "pytest.fixture" ]
[((276, 306), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (290, 306), False, 'import pytest\n'), ((422, 463), 'functools.partial', 'functools.partial', (['http_client.fetch', 'url'], {}), '(http_client.fetch, url)\n', (439, 463), False, 'import functools\n'), ((1542, 1585)...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
[ "tastypie.utils.trailing_slash", "tastypie.fields.ManyToManyField", "logging.getLogger", "tastypie.utils.mime.build_content_type", "geonode.base.models.HierarchicalKeyword.objects.none", "haystack.query.SQ", "guardian.shortcuts.get_objects_for_user", "geonode.layers.models.Layer.objects.get", "json....
[((2674, 2701), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2691, 2701), False, 'import logging\n'), ((3456, 3510), 'tastypie.fields.ToManyField', 'fields.ToManyField', (['TagResource', '"""keywords"""'], {'null': '(True)'}), "(TagResource, 'keywords', null=True)\n", (3474, 3510), Fal...
#!/usr/bin/env python2 from __future__ import print_function import csv import datetime import errno import hashlib import os import sys import traceback import zipfile AUDIT_CSV_PATH = "audit.csv" AUDIT_ZIPFILES_CSV_PATH = "audit_with_zipfile_entries.csv" AUDIT_CSV_FIELDNAMES = ["path", "size", "last_modified_tim...
[ "traceback.print_exc", "zipfile.ZipFile", "os.stat", "os.path.basename", "os.path.isdir", "csv.DictReader", "os.walk", "hashlib.sha256", "datetime.datetime.fromtimestamp", "os.path.join", "sys.exit", "csv.DictWriter" ]
[((539, 555), 'hashlib.sha256', 'hashlib.sha256', ([], {}), '()\n', (553, 555), False, 'import hashlib\n'), ((991, 1004), 'os.walk', 'os.walk', (['root'], {}), '(root)\n', (998, 1004), False, 'import os\n'), ((850, 869), 'os.path.isdir', 'os.path.isdir', (['root'], {}), '(root)\n', (863, 869), False, 'import os\n'), ((...
""" Created on Mon Sep 9 15:51:35 2013 QgasUtils: Basic Quantum Gas Utilities functions @author: ispielman Modified on Wed Dec 10 11:26: 2014 @author: aputra """ import numpy import scipy.ndimage def ImageSlice(xVals, yVals, Image, r0, Width, Scaled = False): """ Produces a pair of slices from image of a ...
[ "numpy.ceil", "numpy.ravel", "numpy.floor", "numpy.array", "numpy.round" ]
[((936, 958), 'numpy.round', 'numpy.round', (['(Width / 2)'], {}), '(Width / 2)\n', (947, 958), False, 'import numpy\n'), ((986, 1008), 'numpy.round', 'numpy.round', (['(Width / 2)'], {}), '(Width / 2)\n', (997, 1008), False, 'import numpy\n'), ((2672, 2687), 'numpy.floor', 'numpy.floor', (['r0'], {}), '(r0)\n', (2683,...
import os import json import multiprocessing from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import scipy as sp import matplotlib.pyplot as plt import matplotlib as mpl import pandas as pd import matplotlib.animation from sklearn.model_selection import train_test_split fr...
[ "sklearn.metrics.accuracy_score", "sklearn.metrics.classification_report", "matplotlib.animation.FuncAnimation", "matplotlib.pyplot.figure", "sklearn.metrics.f1_score", "numpy.arange", "matplotlib.colors.ListedColormap", "numpy.round", "numpy.unique", "numpy.linspace", "matplotlib.pyplot.subplot...
[((2528, 2546), 'numpy.zeros', 'np.zeros', (['(256, 4)'], {}), '((256, 4))\n', (2536, 2546), True, 'import numpy as np\n'), ((2604, 2626), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', '(256)'], {}), '(0, 1, 256)\n', (2615, 2626), True, 'import numpy as np\n'), ((2677, 2721), 'matplotlib.colors.ListedColormap', 'mpl...
#!/usr/bin/env python from flask import Flask, request, abort, make_response from flask_httpauth import HTTPTokenAuth from urllib.parse import parse_qs import re from prometheus_client import generate_latest, CollectorRegistry, CONTENT_TYPE_LATEST from flasharray_collector import FlasharrayCollector import logging c...
[ "prometheus_client.CollectorRegistry", "prometheus_client.generate_latest", "flask.request.args.get", "flask.Flask", "flask.abort", "urllib.parse.parse_qs", "flask_httpauth.HTTPTokenAuth", "re.compile" ]
[((774, 789), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (779, 789), False, 'from flask import Flask, request, abort, make_response\n'), ((887, 917), 'flask_httpauth.HTTPTokenAuth', 'HTTPTokenAuth', ([], {'scheme': '"""Bearer"""'}), "(scheme='Bearer')\n", (900, 917), False, 'from flask_httpauth import ...
"Defines matplotlib stylesheet" import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np # %%-- Matplotlib style sheet mpl.style.use('seaborn-paper') mpl.rcParams['font.family'] = 'serif' mpl.rcParams['font.serif'] ='STIXGeneral' mpl.rcParams['font.size'] = 14 mpl.rcParams['mathtext.default'] = 'rm...
[ "matplotlib.style.use", "matplotlib.pyplot.cm.viridis" ]
[((140, 170), 'matplotlib.style.use', 'mpl.style.use', (['"""seaborn-paper"""'], {}), "('seaborn-paper')\n", (153, 170), True, 'import matplotlib as mpl\n'), ((1270, 1331), 'matplotlib.pyplot.cm.viridis', 'plt.cm.viridis', (['[0.8, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]'], {}), '([0.8, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0....
from data_utils import UDC from transformer_rnn import TransformerRNN from args import get_args from eval import eval_model import torch import numpy as np from tqdm import tqdm import torch.optim as optim import torch.nn.functional as F from sklearn.metrics import f1_score import torch.nn as nn args = get_args() if a...
[ "tqdm.tqdm", "data_utils.UDC", "eval.eval_model", "torch.cuda.manual_seed", "args.get_args", "torch.nn.NLLLoss" ]
[((305, 315), 'args.get_args', 'get_args', ([], {}), '()\n', (313, 315), False, 'from args import get_args\n'), ((378, 429), 'data_utils.UDC', 'UDC', ([], {'train_inp': 'args.train_inp', 'val_inp': 'args.val_inp'}), '(train_inp=args.train_inp, val_inp=args.val_inp)\n', (381, 429), False, 'from data_utils import UDC\n')...
import logging import logging.config logger = logging.getLogger('sync_gbif2tnt') import re import pudb from configparser import ConfigParser config = ConfigParser() config.read('config.ini') from .InsertIntoTablesBase import InsertIntoTablesBase class InsertExternalDatabaseBase(InsertIntoTablesBase): def __init...
[ "configparser.ConfigParser", "logging.getLogger" ]
[((47, 81), 'logging.getLogger', 'logging.getLogger', (['"""sync_gbif2tnt"""'], {}), "('sync_gbif2tnt')\n", (64, 81), False, 'import logging\n'), ((154, 168), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (166, 168), False, 'from configparser import ConfigParser\n')]
import time import warnings import socket from _thread import allocate_lock from os import getpid from speedysvc.toolkit.documentation.copydoc import copydoc from speedysvc.client_server.base_classes.ClientProviderBase import ClientProviderBase from speedysvc.client_server.network.consts import len_packer, response_pa...
[ "os.getpid", "socket.socket", "speedysvc.client_server.base_classes.ClientProviderBase.ClientProviderBase.__init__", "_thread.allocate_lock", "time.time", "time.sleep", "speedysvc.toolkit.documentation.copydoc.copydoc" ]
[((1643, 1675), 'speedysvc.toolkit.documentation.copydoc.copydoc', 'copydoc', (['ClientProviderBase.send'], {}), '(ClientProviderBase.send)\n', (1650, 1675), False, 'from speedysvc.toolkit.documentation.copydoc import copydoc\n'), ((4075, 4086), 'time.time', 'time.time', ([], {}), '()\n', (4084, 4086), False, 'import t...
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/master/LICENSE from __future__ import absolute_import import pytest import skhep_testdata import uproot4 def test_version(): assert uproot4.classname_decode( uproot4.classname_encode("xAOD::MissingETAuxAssociationMap_v2") ) == (...
[ "uproot4.classname_encode" ]
[((246, 309), 'uproot4.classname_encode', 'uproot4.classname_encode', (['"""xAOD::MissingETAuxAssociationMap_v2"""'], {}), "('xAOD::MissingETAuxAssociationMap_v2')\n", (270, 309), False, 'import uproot4\n'), ((410, 476), 'uproot4.classname_encode', 'uproot4.classname_encode', (['"""xAOD::MissingETAuxAssociationMap_v2""...
import json import tempfile from AccessControl import getSecurityManager from DateTime import DateTime from Products.CMFCore.utils import getToolByName from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t, isAttributeHidden ...
[ "bika.lims.utils.isAttributeHidden", "bika.lims.bikaMessageFactory", "bika.lims.browser.reports.selection_macros.SelectionMacrosView", "bika.lims.utils.t", "zope.interface.implements", "tempfile.mkstemp", "Products.Five.browser.pagetemplatefile.ViewPageTemplateFile", "os.write" ]
[((715, 736), 'zope.interface.implements', 'implements', (['IViewView'], {}), '(IViewView)\n', (725, 736), False, 'from zope.interface import implements\n'), ((753, 824), 'Products.Five.browser.pagetemplatefile.ViewPageTemplateFile', 'ViewPageTemplateFile', (['"""templates/qualitycontrol_referenceanalysisqc.pt"""'], {}...
import sys import os sys.path.append(os.pardir) import pytest from pytz import timezone from logging import Logger, FileHandler, getLogger from datetime import datetime from types import GeneratorType from minette import ( Minette, DialogService, SQLiteConnectionProvider, SQLiteContextStore, SQLiteUserStore, S...
[ "sys.path.append", "minette.Payload", "os.path.abspath", "minette.Group", "logging.getLogger", "minette.Config", "minette.utils.date_to_unixtime", "minette.Message", "pytz.timezone", "datetime.datetime.now", "minette.Minette" ]
[((21, 47), 'sys.path.append', 'sys.path.append', (['os.pardir'], {}), '(os.pardir)\n', (36, 47), False, 'import sys\n'), ((546, 560), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (558, 560), False, 'from datetime import datetime\n'), ((2640, 2649), 'minette.Minette', 'Minette', ([], {}), '()\n', (2647, 2...
import nose import numpy as np from numpy.polynomial.polynomial import polyval import pySDC.helpers.transfer_helper as th from pySDC.core.Collocation import CollBase from pySDC.tests.test_helpers import get_derived_from_in_package classes = [] def setup(): global classes, t_start, t_end # generate random bo...
[ "numpy.polynomial.polynomial.polyval", "numpy.linalg.norm", "pySDC.helpers.transfer_helper.restriction_matrix_1d", "pySDC.tests.test_helpers.get_derived_from_in_package", "numpy.random.rand", "nose.tools.with_setup", "pySDC.helpers.transfer_helper.interpolation_matrix_1d" ]
[((576, 604), 'nose.tools.with_setup', 'nose.tools.with_setup', (['setup'], {}), '(setup)\n', (597, 604), False, 'import nose\n'), ((2290, 2318), 'nose.tools.with_setup', 'nose.tools.with_setup', (['setup'], {}), '(setup)\n', (2311, 2318), False, 'import nose\n'), ((491, 577), 'pySDC.tests.test_helpers.get_derived_from...
#!/usr/bin/env pyshrimp # $opts: magic from pyshrimp import log, shell_cmd print('You can run this as any other script') print('But then what is the point? :)') log('You can use log with a bit more details!') log('The log is initialized by run... but with magic it gets magically invoked!') log('To do that just add m...
[ "pyshrimp.log", "pyshrimp.shell_cmd" ]
[((164, 211), 'pyshrimp.log', 'log', (['"""You can use log with a bit more details!"""'], {}), "('You can use log with a bit more details!')\n", (167, 211), False, 'from pyshrimp import log, shell_cmd\n'), ((212, 298), 'pyshrimp.log', 'log', (['"""The log is initialized by run... but with magic it gets magically invoke...
import claripy from kalm import utils from . import ast_util from . import spec_act from . import spec_reg # TODO: Akvile had put a cache here, which is a good idea since the read-then-write pattern is common; # I removed it cause it depended on state.globals, but we should put it back somehow def __constrain_...
[ "kalm.utils.definitely_true", "claripy.BVV", "kalm.utils.definitely_false", "claripy.BVS" ]
[((606, 641), 'claripy.BVV', 'claripy.BVV', (['value', '(end - start + 1)'], {}), '(value, end - start + 1)\n', (617, 641), False, 'import claripy\n'), ((1255, 1288), 'claripy.BVS', 'claripy.BVS', (['name', "data['length']"], {}), "(name, data['length'])\n", (1266, 1288), False, 'import claripy\n'), ((2487, 2521), 'cla...
from app import app HOST = "localhost" PORT = 5000 if __name__ == '__main__': app.run(HOST, PORT, debug=True)
[ "app.app.run" ]
[((84, 115), 'app.app.run', 'app.run', (['HOST', 'PORT'], {'debug': '(True)'}), '(HOST, PORT, debug=True)\n', (91, 115), False, 'from app import app\n')]
from __future__ import absolute_import, division, print_function, unicode_literals import os, sys from datetime import datetime from typing import List import boto3 import botocore.exceptions from . import register_parser from .util import ThreadPoolExecutor from .util.printing import format_table, page_output def ...
[ "boto3.Session" ]
[((377, 410), 'boto3.Session', 'boto3.Session', ([], {'region_name': 'region'}), '(region_name=region)\n', (390, 410), False, 'import boto3\n'), ((1243, 1258), 'boto3.Session', 'boto3.Session', ([], {}), '()\n', (1256, 1258), False, 'import boto3\n')]
from numpy import ndarray from src.domain.cs_column import Column import numpy as np from src.model.stop_at_station_summary import StopAtStationSummary class CargoSpace(object): """ Represents cargo space in transport vehicle/ship ect. """ def __init__(self, width: int, height: int): self._widt...
[ "src.domain.cs_column.Column", "numpy.argmin" ]
[((407, 421), 'src.domain.cs_column.Column', 'Column', (['height'], {}), '(height)\n', (413, 421), False, 'from src.domain.cs_column import Column\n'), ((2339, 2366), 'numpy.argmin', 'np.argmin', (['packages_per_col'], {}), '(packages_per_col)\n', (2348, 2366), True, 'import numpy as np\n')]
""" License, Header """ from __future__ import absolute_import from __future__ import print_function from copy import copy import xml.etree.ElementTree as xml from . import modelunit as munit from . import description from . import inout from . import parameterset as pset from . import checking from . import algorithm...
[ "xml.etree.ElementTree.parse", "os.path.abspath", "os.path.join" ]
[((1958, 1991), 'os.path.abspath', 'os.path.abspath', (['self.crop2ml_dir'], {}), '(self.crop2ml_dir)\n', (1973, 1991), False, 'import os\n'), ((890, 931), 'os.path.join', 'os.path.join', (['self.crop2ml_dir', '"""crop2ml"""'], {}), "(self.crop2ml_dir, 'crop2ml')\n", (902, 931), False, 'import os\n'), ((960, 1001), 'os...
from datetime import date, time import pytest import json from city_scrapers.spiders.chi_water import Chi_waterSpider test_response = [] with open('tests/files/chi_water_test.json') as f: test_response.extend(json.loads(f.read())) spider = Chi_waterSpider() # This line throws error parsed_items = [item for item ...
[ "pytest.mark.parametrize", "city_scrapers.spiders.chi_water.Chi_waterSpider", "datetime.date", "datetime.time" ]
[((247, 264), 'city_scrapers.spiders.chi_water.Chi_waterSpider', 'Chi_waterSpider', ([], {}), '()\n', (262, 264), False, 'from city_scrapers.spiders.chi_water import Chi_waterSpider\n'), ((1899, 1944), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""item"""', 'parsed_items'], {}), "('item', parsed_items)\n"...
import gc import uasyncio as asyncio import ujson import utime from machine import UART, WDT import ustruct as struct import logger from config import read_configuration c = read_configuration() wdt = WDT(timeout=600000) async def start_readings(client): while True: logger.log('Initialising UART bus') ...
[ "utime.time", "logger.log", "config.read_configuration", "gc.collect", "machine.WDT", "uasyncio.sleep", "ujson.dumps", "machine.UART" ]
[((175, 195), 'config.read_configuration', 'read_configuration', ([], {}), '()\n', (193, 195), False, 'from config import read_configuration\n'), ((203, 222), 'machine.WDT', 'WDT', ([], {'timeout': '(600000)'}), '(timeout=600000)\n', (206, 222), False, 'from machine import UART, WDT\n'), ((282, 317), 'logger.log', 'log...
import json import random import pysparkling import torch from .decoder.utils.instance_scorer import InstanceScorer from . import show DATA_FILE = ('outputs/resnet101block5-pif-paf-edge401-190412-151013.pkl' '.decodertraindata-edge641-samples0.json') # pylint: skip-file def plot_training_data(train_d...
[ "torch.nn.functional.binary_cross_entropy", "pysparkling.Context", "torch.utils.data.DataLoader", "torch.save", "random.random", "torch.utils.data.TensorDataset", "torch.no_grad", "torch.tensor" ]
[((3160, 3181), 'pysparkling.Context', 'pysparkling.Context', ([], {}), '()\n', (3179, 3181), False, 'import pysparkling\n'), ((3500, 3543), 'torch.utils.data.TensorDataset', 'torch.utils.data.TensorDataset', (['*train_data'], {}), '(*train_data)\n', (3530, 3543), False, 'import torch\n'), ((3563, 3635), 'torch.utils.d...
# trunk-ignore(black-py) import torch from torch.nn import Conv1d, Conv2d, Conv3d, MaxPool1d, MaxPool2d, MaxPool3d, Linear, Upsample from lrp.utils import Flatten from inverter_util import ( upsample_inverse, max_pool_nd_inverse, max_pool_nd_fwd_hook, conv_nd_fwd_hook, linear_fwd_hook, ...
[ "inverter_util.upsample_inverse", "inverter_util.max_pool_nd_inverse", "torch.device" ]
[((3319, 3338), 'torch.device', 'torch.device', (['"""cpu"""'], {}), "('cpu')\n", (3331, 3338), False, 'import torch\n'), ((5821, 5858), 'inverter_util.max_pool_nd_inverse', 'max_pool_nd_inverse', (['layer', 'relevance'], {}), '(layer, relevance)\n', (5840, 5858), False, 'from inverter_util import upsample_inverse, max...
""" Module to take in a directory, iterate through it and create a Starlette routing map. """ import importlib import inspect from pathlib import Path from typing import Union from starlette.routing import Route as StarletteRoute, Mount from nested_dict import nested_dict from admin.route import Route def construct...
[ "importlib.import_module", "inspect.isclass", "nested_dict.nested_dict", "pathlib.Path", "starlette.routing.Route", "inspect.getmembers" ]
[((728, 741), 'nested_dict.nested_dict', 'nested_dict', ([], {}), '()\n', (739, 741), False, 'from nested_dict import nested_dict\n'), ((433, 454), 'inspect.isclass', 'inspect.isclass', (['item'], {}), '(item)\n', (448, 454), False, 'import inspect\n'), ((685, 698), 'pathlib.Path', 'Path', (['"""admin"""'], {}), "('adm...
import numpy as np class BayesLinearRegressor: def __init__(self, number_of_features, alpha=1e6): ''' :param number_of_features: Integer number of features in the training rows, excluding the intercept and output values :param alpha: Float inverse ridge regularizaiton constant, set to 1e...
[ "numpy.eye", "numpy.linalg.inv", "numpy.array", "numpy.random.multivariate_normal" ]
[((965, 1021), 'numpy.array', 'np.array', (['([0] * (number_of_features + 1))'], {'dtype': 'np.float'}), '([0] * (number_of_features + 1), dtype=np.float)\n', (973, 1021), True, 'import numpy as np\n'), ((3376, 3417), 'numpy.linalg.inv', 'np.linalg.inv', (['inverted_covariance_matrix'], {}), '(inverted_covariance_matri...
import copy import json import jsonschema import logging import pandas as pd import os from sklearn.cross_validation import train_test_split import minst.utils as utils logger = logging.getLogger(__name__) class MissingDataException(Exception): pass class Observation(object): """Document model each item i...
[ "pandas.DataFrame", "copy.deepcopy", "json.load", "os.path.dirname", "os.path.exists", "minst.utils.check_audio_file", "pandas.Series", "os.path.join", "pandas.concat", "logging.getLogger" ]
[((180, 207), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (197, 207), False, 'import logging\n'), ((3034, 3070), 'os.path.join', 'os.path.join', (['audio_root', 'audio_file'], {}), '(audio_root, audio_file)\n', (3046, 3070), False, 'import os\n'), ((9584, 9621), 'pandas.concat', 'pd.co...
from pathlib import Path from docs_src.importers.hfml.tutorial001 import result def test_hfml_base(): output_fn = Path("tests") / "formatters" / "hfml" / "data" / "kangyur_base.txt" expected = output_fn.read_text() assert result == expected
[ "pathlib.Path" ]
[((121, 134), 'pathlib.Path', 'Path', (['"""tests"""'], {}), "('tests')\n", (125, 134), False, 'from pathlib import Path\n')]
import array as arr import pytz # Owned __project__ = "peimar" __author__ = "<NAME>" __license__ = "MIT" __version__ = "0.0.4" __date__ = "02/11/2021" __email__ = "<<EMAIL>>" # Inverter Web Server inverter_server = "192.168.1.8" inverter_port = 80 # Inverter metric decimals cf = arr.array('I', [0, 2, 1, 2, 1, 1, 2,...
[ "array.array", "pytz.timezone" ]
[((284, 406), 'array.array', 'arr.array', (['"""I"""', '[0, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2,\n 1, 2, 1, 2, 1, 2, 1, 1, 1]'], {}), "('I', [0, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n 2, 2, 2, 0, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1])\n", (293, 406), True, 'import ar...
import os from sqlalchemy.exc import IntegrityError, InvalidRequestError from .backup import Backup from .serializer import Serializer from .autoclean import BackupAutoClean from .mixins import AdminBackupModelViewMixin from .fileadmin import BackupFileAdmin class FlaskAdminBackup: def __init__(self, app=None, ...
[ "os.getcwd", "os.path.join" ]
[((1090, 1190), 'os.path.join', 'os.path.join', (["self.app.config['ADMIN_BACKUP_PATH']", "self.app.config['ADMIN_BACKUP_FOLDER_NAME']"], {}), "(self.app.config['ADMIN_BACKUP_PATH'], self.app.config[\n 'ADMIN_BACKUP_FOLDER_NAME'])\n", (1102, 1190), False, 'import os\n'), ((733, 744), 'os.getcwd', 'os.getcwd', ([], {...
import numpy as np class Camera(object): """Camera is a simple finite pinhole camera defined by the matrices K, R and t. see "Multiple View Geometry in Computer Vision" by <NAME> and <NAME> for notation. Parameters ---------- K: The 3x3 intrinsic camera parameters R: The 3x3 rota...
[ "numpy.linalg.inv", "numpy.linalg.pinv", "numpy.hstack" ]
[((1711, 1733), 'numpy.linalg.pinv', 'np.linalg.pinv', (['self.P'], {}), '(self.P)\n', (1725, 1733), True, 'import numpy as np\n'), ((1560, 1589), 'numpy.hstack', 'np.hstack', (['[self._R, self._t]'], {}), '([self._R, self._t])\n', (1569, 1589), True, 'import numpy as np\n'), ((1263, 1284), 'numpy.linalg.inv', 'np.lina...
SRC = """ --- - - college - -380608299.3165369 - closely: 595052867 born: false stomach: true expression: true chosen: 34749965 somebody: false - positive - true - false - price - 2018186817 - average - young - -1447308110 """ import ryaml for _ in range(1000): ryaml.loads(SRC)
[ "ryaml.loads" ]
[((299, 315), 'ryaml.loads', 'ryaml.loads', (['SRC'], {}), '(SRC)\n', (310, 315), False, 'import ryaml\n')]
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class SlidePartnerRelation(models.Model): _inherit = 'slide.slide.partner' user_input_ids = fields.One2many('survey.user_input', 'slide_partner_id', 'Certification attempts...
[ "odoo.fields.Selection", "odoo.fields.Many2one", "odoo.fields.Integer", "odoo.api.onchange", "odoo.api.depends", "odoo.fields.One2many", "odoo.fields.Boolean" ]
[((240, 326), 'odoo.fields.One2many', 'fields.One2many', (['"""survey.user_input"""', '"""slide_partner_id"""', '"""Certification attempts"""'], {}), "('survey.user_input', 'slide_partner_id',\n 'Certification attempts')\n", (255, 326), False, 'from odoo import api, fields, models\n'), ((349, 450), 'odoo.fields.Bool...
from random import randint from time import sleep def sorteia(lst): print('Sorteando 5 valores da lista: ', end='') for i in range(0, 5): num = randint(1, 10) lst.append(num) print(num, end=' ') sleep(0.5) print('PRONTO!') def somaPar(lst): soma = 0 for i in lst: ...
[ "random.randint", "time.sleep" ]
[((161, 175), 'random.randint', 'randint', (['(1)', '(10)'], {}), '(1, 10)\n', (168, 175), False, 'from random import randint\n'), ((236, 246), 'time.sleep', 'sleep', (['(0.5)'], {}), '(0.5)\n', (241, 246), False, 'from time import sleep\n')]
#! python # -*- coding: utf-8 -*- ## import time import wx import cv2 import numpy as np from mwx.controls import Param, LParam from mwx.controls import ToggleButton, Choice from mwx.graphman import Layer, Thread import editor as edi class Plugin(Layer): """Plugins of camera viewer """ menu = "Cameras" ...
[ "cv2.line", "cv2.circle", "cv2.bitwise_xor", "mwx.controls.Param", "cv2.destroyAllWindows", "mwx.graphman.Frame", "cv2.waitKey", "cv2.imshow", "mwx.controls.Choice", "numpy.zeros", "mwx.graphman.Layer.Destroy", "wx.App", "mwx.controls.LParam", "mwx.graphman.Thread", "cv2.getWindowPropert...
[((3655, 3663), 'wx.App', 'wx.App', ([], {}), '()\n', (3661, 3663), False, 'import wx\n'), ((3674, 3685), 'mwx.graphman.Frame', 'Frame', (['None'], {}), '(None)\n', (3679, 3685), False, 'from mwx.graphman import Frame\n'), ((542, 554), 'mwx.graphman.Thread', 'Thread', (['self'], {}), '(self)\n', (548, 554), False, 'fro...
def test_ipython(): print('DATA FILE IS AVAILABLE ON drp-ued-cmp001 ONLY') #from psana.pyalgos.generic.NDArrUtils import info_ndarr from psana import DataSource ds = DataSource(files='/u2/pcds/pds/ued/ueddaq02/xtc/ueddaq02-r0028-s000-c000.xtc2') run = next(ds.runs()) det = run.Detector('epix...
[ "psana.DataSource" ]
[((185, 264), 'psana.DataSource', 'DataSource', ([], {'files': '"""/u2/pcds/pds/ued/ueddaq02/xtc/ueddaq02-r0028-s000-c000.xtc2"""'}), "(files='/u2/pcds/pds/ued/ueddaq02/xtc/ueddaq02-r0028-s000-c000.xtc2')\n", (195, 264), False, 'from psana import DataSource\n'), ((710, 762), 'psana.DataSource', 'DataSource', ([], {'exp...
from __future__ import annotations import typing import clock import zone from NeonOcean.S4.Main import Mods, This from NeonOcean.S4.Main.Tools import Exceptions from protocolbuffers import FileSerialization_pb2 from server import client as clientModule from sims4 import service_manager from sims4.tuning import insta...
[ "NeonOcean.S4.Main.Tools.Exceptions.DoesNotInheritException", "NeonOcean.S4.Main.Tools.Exceptions.IncorrectTypeException" ]
[((2936, 3002), 'NeonOcean.S4.Main.Tools.Exceptions.IncorrectTypeException', 'Exceptions.IncorrectTypeException', (['announcer', '"""announcer"""', '(type,)'], {}), "(announcer, 'announcer', (type,))\n", (2969, 3002), False, 'from NeonOcean.S4.Main.Tools import Exceptions\n'), ((3054, 3115), 'NeonOcean.S4.Main.Tools.Ex...
from django.db import models class BaseManagerModel(models.Model): @classmethod def create(cls): return cls.objects.create() class TestManager(models.Manager): def get_queryset(self): return super(TestManager, self).get_queryset().none() class RenameManagerModel(models.Model): inst...
[ "django.db.models.Manager" ]
[((328, 344), 'django.db.models.Manager', 'models.Manager', ([], {}), '()\n', (342, 344), False, 'from django.db import models\n'), ((626, 642), 'django.db.models.Manager', 'models.Manager', ([], {}), '()\n', (640, 642), False, 'from django.db import models\n')]
from __future__ import print_function import tensorflow as tf import numpy as np import pytest import sys from tensorflow.python.ops import array_ops shapes = [ (3, 4), (50, 70, 12) ] seed = 123 def _test_random_func(func_name, shape): print('func_name', func_name) func = eval(func_name) with t...
[ "numpy.abs", "tensorflow.device", "tensorflow.ConfigProto", "numpy.array", "tensorflow.initialize_all_variables", "tensorflow.Graph", "pytest.mark.parametrize", "pytest.mark.skip" ]
[((1229, 1269), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""shape"""', 'shapes'], {}), "('shape', shapes)\n", (1252, 1269), False, 'import pytest\n'), ((1362, 1402), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""shape"""', 'shapes'], {}), "('shape', shapes)\n", (1385, 1402), False, 'import...
from sendgrid_backend.signals import sendgrid_email_sent from django_sendgrid_tracking.mail import create_send_email sendgrid_email_sent.connect(create_send_email)
[ "sendgrid_backend.signals.sendgrid_email_sent.connect" ]
[((119, 165), 'sendgrid_backend.signals.sendgrid_email_sent.connect', 'sendgrid_email_sent.connect', (['create_send_email'], {}), '(create_send_email)\n', (146, 165), False, 'from sendgrid_backend.signals import sendgrid_email_sent\n')]
import os import tempfile from aquascope.webserver.data_access.conversions import list_of_item_dicts_to_tsv from aquascope.webserver.data_access.storage.export import upload_export_file def export_items(items, storage_client): with tempfile.TemporaryDirectory() as tmpdirname: local_filepath = os.path.joi...
[ "aquascope.webserver.data_access.storage.export.upload_export_file", "tempfile.TemporaryDirectory", "os.path.join", "aquascope.webserver.data_access.conversions.list_of_item_dicts_to_tsv" ]
[((239, 268), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (266, 268), False, 'import tempfile\n'), ((309, 349), 'os.path.join', 'os.path.join', (['tmpdirname', '"""features.tsv"""'], {}), "(tmpdirname, 'features.tsv')\n", (321, 349), False, 'import os\n'), ((358, 406), 'aquascope.web...
import sys import os import string class BackwardsReader: """ Stripped and stolen from : http://code.activestate.com/recipes/120686-read-a-text-file-backwards/ """ def readline(self): while len(self.data) == 1 and ((self.blkcount * self.blksize) < self.size): self.blkcount = self.blkcount + 1 line ...
[ "os.stat" ]
[((857, 870), 'os.stat', 'os.stat', (['file'], {}), '(file)\n', (864, 870), False, 'import os\n')]
from random import choice from time import sleep print('Vamos jogar \033[32mJokenpô\033[m') escolhas = ['pedra', 'papel', 'tesoura'] computador = choice(escolhas) jogador = str(input('Já escolhi a minha opção, qual a sua jogador \033[34mdesafiante\033[m: ')).strip().lower() while not (jogador in escolhas): jogador...
[ "random.choice", "time.sleep" ]
[((147, 163), 'random.choice', 'choice', (['escolhas'], {}), '(escolhas)\n', (153, 163), False, 'from random import choice\n'), ((450, 460), 'time.sleep', 'sleep', (['(1.5)'], {}), '(1.5)\n', (455, 460), False, 'from time import sleep\n'), ((490, 498), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (495, 498), False, '...
from __future__ import print_function import inspect import ast import sys import collections import weakref def qualname(obj): """ Lookup or compute the ``__qualname__`` of ``obj`` :param obj: class or function to lookup :return: ``__qualname__`` of ``obj`` :rtype: str :raises: AttributeErro...
[ "ast.NodeVisitor.__init__", "ast.NodeVisitor.__new__", "inspect.findsource", "ast.parse", "collections.deque", "weakref.WeakValueDictionary" ]
[((633, 656), 'inspect.findsource', 'inspect.findsource', (['obj'], {}), '(obj)\n', (651, 656), False, 'import inspect\n'), ((1477, 1503), 'inspect.findsource', 'inspect.findsource', (['module'], {}), '(module)\n', (1495, 1503), False, 'import inspect\n'), ((1615, 1644), 'weakref.WeakValueDictionary', 'weakref.WeakValu...
"""The module demonstrates using threaded binary trees to implement ordered index.""" from typing import Any from forest.binary_trees import single_threaded_binary_trees from forest.binary_trees import traversal class MyDatabase: """Example using threaded binary trees to build index.""" def __init__(self) ...
[ "forest.binary_trees.single_threaded_binary_trees.LeftThreadedBinaryTree", "forest.binary_trees.single_threaded_binary_trees.RightThreadedBinaryTree" ]
[((354, 407), 'forest.binary_trees.single_threaded_binary_trees.LeftThreadedBinaryTree', 'single_threaded_binary_trees.LeftThreadedBinaryTree', ([], {}), '()\n', (405, 407), False, 'from forest.binary_trees import single_threaded_binary_trees\n'), ((434, 488), 'forest.binary_trees.single_threaded_binary_trees.RightThre...
import os import numpy as np import pandas as pd '''This script is for preprocessing the label, finding the mistake in it and stroe label in a unified format in processed_label dic''' file_dic_Extra = os.listdir('../../label/Extra_Labels') file_dic_Train = os.listdir('../../label/Train_labels') file_dic_Test = os.lis...
[ "pandas.read_csv", "numpy.asarray", "numpy.where", "numpy.array", "os.listdir", "numpy.concatenate" ]
[((203, 241), 'os.listdir', 'os.listdir', (['"""../../label/Extra_Labels"""'], {}), "('../../label/Extra_Labels')\n", (213, 241), False, 'import os\n'), ((259, 297), 'os.listdir', 'os.listdir', (['"""../../label/Train_labels"""'], {}), "('../../label/Train_labels')\n", (269, 297), False, 'import os\n'), ((314, 351), 'o...
import shutil, os, glob import pandas as pd for ratio in [0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 100]: metafile = 'partitionmeta/meta' + str(ratio) + '.csv' df = pd.read_csv(metafile, index_col = 'docid') for i in df.index: if df.loc[i, 'tags'] != 'random': continue outpa...
[ "pandas.read_csv", "shutil.copyfile" ]
[((178, 218), 'pandas.read_csv', 'pd.read_csv', (['metafile'], {'index_col': '"""docid"""'}), "(metafile, index_col='docid')\n", (189, 218), True, 'import pandas as pd\n'), ((372, 421), 'shutil.copyfile', 'shutil.copyfile', (["('../data/' + i + '.tsv')", 'outpath'], {}), "('../data/' + i + '.tsv', outpath)\n", (387, 42...
import os import cv2 from concurrent.futures import ProcessPoolExecutor import torch from facenet_pytorch import MTCNN from tqdm import tqdm from PIL import Image import pickle from face_detection import RetinaFace from bisect import bisect_left from collections import Counter import math def delete_folders(): """...
[ "os.mkdir", "tqdm.tqdm", "face_detection.RetinaFace", "cv2.cvtColor", "concurrent.futures.ProcessPoolExecutor", "cv2.VideoCapture", "PIL.Image.fromarray", "glob.glob", "facenet_pytorch.MTCNN", "torch.device", "shutil.rmtree", "os.path.join", "os.listdir", "cv2.resize" ]
[((1059, 1087), 'cv2.VideoCapture', 'cv2.VideoCapture', (['input_path'], {}), '(input_path)\n', (1075, 1087), False, 'import cv2\n'), ((2226, 2254), 'cv2.VideoCapture', 'cv2.VideoCapture', (['input_path'], {}), '(input_path)\n', (2242, 2254), False, 'import cv2\n'), ((2745, 2773), 'cv2.VideoCapture', 'cv2.VideoCapture'...
import unittest import warnings from pybt.system import System from pybt.exceptions import InvalidAPIKey from .config import CONFIG class ClientTestCase(unittest.TestCase): def setUp(self): warnings.simplefilter('ignore', ResourceWarning) self.api = System(CONFIG.get("panel_address"), CONFIG.get(...
[ "warnings.simplefilter" ]
[((205, 253), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'ResourceWarning'], {}), "('ignore', ResourceWarning)\n", (226, 253), False, 'import warnings\n')]
# coding: utf-8 # Author: <NAME> # Contact: <EMAIL> # Python modules import traceback import os import logging logger = logging.getLogger(__name__) # Wizard modules from houdini_wizard import wizard_tools from houdini_wizard import wizard_export # Houdini modules def main(): scene = wizard_export.save_or_save_...
[ "houdini_wizard.wizard_export.save_or_save_increment", "houdini_wizard.wizard_export.reopen", "houdini_wizard.wizard_tools.check_out_node_existence", "houdini_wizard.wizard_export.trigger_before_export_hook", "traceback.format_exc", "houdini_wizard.wizard_export.export", "logging.getLogger" ]
[((121, 148), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (138, 148), False, 'import logging\n'), ((293, 331), 'houdini_wizard.wizard_export.save_or_save_increment', 'wizard_export.save_or_save_increment', ([], {}), '()\n', (329, 331), False, 'from houdini_wizard import wizard_export\n...
#! /usr/bin/python # -*- coding: utf-8 -*- ''' # 使用 convert(ImageMagick) 转换png为gif图片: ls |sed 's/\(.*\).png/convert \1.png -flatten -channel A -threshold 0% \1.gif/g' # cx-freeze打包: Python setup.py build Python setup.py bdist_msi ''' from os import mkdir from os import walk from os import path from os import getcwd ...
[ "os.mkdir", "pygame.Surface", "codecs.open", "pygame.transform.smoothscale", "os.getcwd", "pygame.Rect", "pygame.Color", "os.path.exists", "pygame.init", "math.floor", "os.path.splitext", "os.path.join" ]
[((747, 764), 'pygame.Rect', 'pygame.Rect', (['rect'], {}), '(rect)\n', (758, 764), False, 'import pygame\n'), ((784, 804), 'pygame.Color', 'pygame.Color', (['*color'], {}), '(*color)\n', (796, 804), False, 'import pygame\n'), ((927, 969), 'pygame.Surface', 'pygame.Surface', (['rect.size', 'pygame.SRCALPHA'], {}), '(re...
#!/usr/bin/env python # -*- coding: utf-8 -*- from dataclasses import dataclass, field from typing import Callable, List from astropy.coordinates import SkyCoord, Longitude, Latitude, Angle from astropy.time import Time from astropy.units.quantity import Quantity from astropy.wcs import WCS from astropy.visualization.w...
[ "pandas.DataFrame", "numpy.stack", "shapely.geometry.Point", "shapely.geometry.MultiPoint", "descartes.patch.PolygonPatch", "shapely.geometry.Polygon", "matplotlib.patches.Rectangle", "numpy.zeros", "numpy.expand_dims", "scipy.optimize.least_squares", "matplotlib.pyplot.figure", "numpy.sin", ...
[((1409, 1427), 'numpy.array', 'np.array', (['position'], {}), '(position)\n', (1417, 1427), True, 'import numpy as np\n'), ((2059, 2084), 'astropy.coordinates.Angle', 'Angle', (['(0.0)'], {'unit': '"""degree"""'}), "(0.0, unit='degree')\n", (2064, 2084), False, 'from astropy.coordinates import SkyCoord, Longitude, Lat...
#!/usr/bin/env python3 #------------------------------------------------------------ # Programmer(s): <NAME> @ SMU #------------------------------------------------------------ # Copyright (c) 2019, Southern Methodist University. # All rights reserved. # For details, see the LICENSE file. #----------------------------...
[ "matplotlib.pyplot.title", "numpy.meshgrid", "matplotlib.pyplot.show", "numpy.abs", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.close", "numpy.zeros", "matplotlib.pyplot.figure", "matplotlib.pyplot.savefig", "numpy.sqrt" ]
[((1092, 1123), 'numpy.zeros', 'np.zeros', (['(ny, nz)'], {'dtype': 'float'}), '((ny, nz), dtype=float)\n', (1100, 1123), True, 'import numpy as np\n'), ((1131, 1162), 'numpy.zeros', 'np.zeros', (['(ny, nz)'], {'dtype': 'float'}), '((ny, nz), dtype=float)\n', (1139, 1162), True, 'import numpy as np\n'), ((1170, 1201), ...
# -*- coding: utf-8 -*- # Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ "sys.stdout.write", "sys.stderr.write", "IPython.utils.io.capture_output", "google.colab.load_ipython_extension" ]
[((2828, 2858), 'google.colab.load_ipython_extension', 'load_ipython_extension', (['cls.ip'], {}), '(cls.ip)\n', (2850, 2858), False, 'from google.colab import load_ipython_extension\n'), ((2470, 2490), 'sys.stderr.write', 'sys.stderr.write', (['""""""'], {}), "('')\n", (2486, 2490), False, 'import sys\n'), ((2497, 253...
# Copyright 2018 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
[ "galini.relaxations.relaxation.RelaxationResult" ]
[((1175, 1202), 'galini.relaxations.relaxation.RelaxationResult', 'RelaxationResult', (['objective'], {}), '(objective)\n', (1191, 1202), False, 'from galini.relaxations.relaxation import Relaxation, RelaxationResult\n'), ((1272, 1300), 'galini.relaxations.relaxation.RelaxationResult', 'RelaxationResult', (['constraint...
from math import sin from wsgi import HASH_SALT def calculate_hash(data: str) -> str: return _calculate_inner(HASH_SALT + data) def _calculate_inner(data: str) -> str: A = 0x12345678 B = 0x9ABCDEF0 C = 0xDEADDEAD D = 0xC0FEC0FE E = 0xFEEDBEAF X = [int(0xFFFFFFFF * sin(i)) & 0xFFFFFFFF fo...
[ "math.sin" ]
[((297, 303), 'math.sin', 'sin', (['i'], {}), '(i)\n', (300, 303), False, 'from math import sin\n')]
############################################### ##<NAME>, 2018## ##Topo-Seq analysis## #The script takes raw GCSs data, returns only trusted GCSs, #computes GCSs shared between different conditions, #draws Venn diagrams of the sets overlappings, #writes GCSs sets. ############################################### ##...
[ "numpy.mean", "os.path.exists", "os.makedirs" ]
[((1698, 1731), 'os.path.exists', 'os.path.exists', (['Replicas_path_out'], {}), '(Replicas_path_out)\n', (1712, 1731), False, 'import os\n'), ((1737, 1767), 'os.makedirs', 'os.makedirs', (['Replicas_path_out'], {}), '(Replicas_path_out)\n', (1748, 1767), False, 'import os\n'), ((11670, 11688), 'numpy.mean', 'np.mean',...
""" Original author: xnaas (2022) License: The Unlicense (public domain) """ import requests from sopel import plugin, formatting from sopel.config.types import StaticSection, ValidatedAttribute class ThesaurusSection(StaticSection): api_key = ValidatedAttribute("api_key", str) def setup(bot): bot.config.de...
[ "sopel.plugin.command", "sopel.plugin.output_prefix", "sopel.config.types.ValidatedAttribute", "requests.get" ]
[((528, 560), 'sopel.plugin.command', 'plugin.command', (['"""syn"""', '"""synonym"""'], {}), "('syn', 'synonym')\n", (542, 560), False, 'from sopel import plugin, formatting\n'), ((562, 596), 'sopel.plugin.output_prefix', 'plugin.output_prefix', (['"""[synonym] """'], {}), "('[synonym] ')\n", (582, 596), False, 'from ...
import os os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = os.path.expanduser('~/.key.json')
[ "os.path.expanduser" ]
[((57, 90), 'os.path.expanduser', 'os.path.expanduser', (['"""~/.key.json"""'], {}), "('~/.key.json')\n", (75, 90), False, 'import os\n')]
""" Assorted utilities for HHVM GDB bindings. """ # @lint-avoid-python-3-compatibility-imports import collections import functools import gdb #------------------------------------------------------------------------------ # Memoization. def memoized(func): """Simple memoization decorator that ignores **kwargs."...
[ "gdb.lookup_type", "gdb.lookup_symbol", "functools.wraps", "gdb.string_to_argv", "gdb.parse_and_eval", "gdb.lookup_global_symbol" ]
[((345, 366), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (360, 366), False, 'import functools\n'), ((1284, 1305), 'gdb.lookup_type', 'gdb.lookup_type', (['name'], {}), '(name)\n', (1299, 1305), False, 'import gdb\n'), ((737, 760), 'gdb.parse_and_eval', 'gdb.parse_and_eval', (['arg'], {}), '(arg)\...
__copyright__ = "Copyright (c) Microsoft Corporation and Mila - Quebec AI Institute" __license__ = "MIT" """Billiards game """ __all__ = ("billiards_default_config", "Billiards", "BilliardsInitialization") import math from typing import Optional import numpy as np from segar.mdps.initializations import ArenaInitia...
[ "math.sqrt", "segar.things.Hole", "segar.sim.location_priors.RandomBottomLocation", "segar.factors.GaussianNoise", "segar.rules.Prior", "segar.mdps.rewards.l2_distance_reward_fn", "numpy.array", "segar.factors.Circle", "segar.things.Ball", "numpy.random.normal", "segar.mdps.rewards.dead_reward_f...
[((1278, 1292), 'math.sqrt', 'math.sqrt', (['(2.0)'], {}), '(2.0)\n', (1287, 1292), False, 'import math\n'), ((1893, 1904), 'segar.factors.Circle', 'Circle', (['(0.2)'], {}), '(0.2)\n', (1899, 1904), False, 'from segar.factors import Label, Mass, Charge, Shape, Text, Circle, GaussianNoise, Size, Position, ID, Done, Ali...
import os import sqlite3 from datetime import datetime abs_path = os.getcwd() split = os.path.split(abs_path) workflow_db_path = os.path.join( split[0], "pipeline/deplatformr_open_images_workflow.sqlite") workflow_db = sqlite3.connect(workflow_db_path) cursor = workflow_db.cursor() utctime = datetime.utcnow() ...
[ "os.getcwd", "datetime.datetime.utcnow", "sqlite3.connect", "os.path.split", "os.path.join" ]
[((68, 79), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (77, 79), False, 'import os\n'), ((88, 111), 'os.path.split', 'os.path.split', (['abs_path'], {}), '(abs_path)\n', (101, 111), False, 'import os\n'), ((132, 206), 'os.path.join', 'os.path.join', (['split[0]', '"""pipeline/deplatformr_open_images_workflow.sqlite"""...
# coding: utf-8 """ Accounting Extension These APIs allow you to interact with HubSpot's Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSp...
[ "six.iteritems", "hubspot.crm.extensions.accounting.configuration.Configuration" ]
[((18751, 18784), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (18764, 18784), False, 'import six\n'), ((2930, 2945), 'hubspot.crm.extensions.accounting.configuration.Configuration', 'Configuration', ([], {}), '()\n', (2943, 2945), False, 'from hubspot.crm.extensions.account...
from __future__ import unicode_literals from mezzanine.core import fields from mezzanine.pages.models import Page from django.db import models DATASET_TYPES = [ ('Voters', 'Voters'), ('Candidates', 'Candidates'), ('Political Parties', 'Political Parties'), ('Federal', 'Federal'), ('Results', 'Re...
[ "django.db.models.TextField", "django.db.models.URLField", "django.db.models.CharField", "django.db.models.IntegerField", "mezzanine.core.fields.FileField", "django.db.models.DateTimeField", "mezzanine.core.fields.RichTextField" ]
[((2657, 2697), 'mezzanine.core.fields.FileField', 'fields.FileField', (['"""Logo"""'], {'format': '"""Image"""'}), "('Logo', format='Image')\n", (2673, 2697), False, 'from mezzanine.core import fields\n'), ((2716, 2773), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'null': '(False)', ...
from django.conf.urls import include, url from django.contrib import admin from django.shortcuts import render from authlib import views from authlib.facebook import FacebookOAuth2Client from authlib.google import GoogleOAuth2Client from authlib.twitter import TwitterOAuthClient from testapp.views import custom_verif...
[ "django.shortcuts.render", "django.conf.urls.include", "django.conf.urls.url" ]
[((427, 458), 'django.conf.urls.url', 'url', (['"""^admin/"""', 'admin.site.urls'], {}), "('^admin/', admin.site.urls)\n", (430, 458), False, 'from django.conf.urls import include, url\n'), ((530, 572), 'django.conf.urls.url', 'url', (['"""^login/$"""', 'views.login'], {'name': '"""login"""'}), "('^login/$', views.logi...
from torchvision.datasets.vision import VisionDataset import os import pickle from torchvision.datasets.folder import default_loader class Imagenet(VisionDataset): def __init__(self, root, data_list, train=True, transform=None, target_transform=None, img_dir='all', target_dir='annos'): super(Imagenet, se...
[ "torchvision.datasets.folder.default_loader", "os.path.isfile", "os.path.join" ]
[((535, 564), 'os.path.join', 'os.path.join', (['root', 'data_list'], {}), '(root, data_list)\n', (547, 564), False, 'import os\n'), ((593, 620), 'os.path.join', 'os.path.join', (['root', 'img_dir'], {}), '(root, img_dir)\n', (605, 620), False, 'import os\n'), ((652, 682), 'os.path.join', 'os.path.join', (['root', 'tar...
from dash import html, dcc import dash_bootstrap_components as dbc import pandas as pd from .demo import blueprint as spa global_md = """\ ### Global Warming Global Temperature Time Series. Data are included from the GISS Surface Temperature (GISTEMP) analysis and the global component of Climate at a Glance (GCAG). ...
[ "dash.html.H2", "pandas.read_csv", "dash.html.Div", "dash_bootstrap_components.Table.from_dataframe", "dash.html.Br" ]
[((527, 561), 'pandas.read_csv', 'pd.read_csv', (['"""demo/data/solar.csv"""'], {}), "('demo/data/solar.csv')\n", (538, 561), True, 'import pandas as pd\n'), ((665, 699), 'dash.html.Div', 'html.Div', (['[]'], {'className': '"""col-md-2"""'}), "([], className='col-md-2')\n", (673, 699), False, 'from dash import html, dc...
import os from licensing.models import * from licensing.methods import Key, Helpers from PIL import Image, ImageFont, ImageDraw import sys import time from colorama import Fore, Back, Style, init import shutil import sys import os import requests import shutil from bs4 import BeautifulSoup from reque...
[ "sys.stdout.write", "PIL.Image.new", "os.remove", "socket.socket", "pyfiglet.figlet_format", "selenium.webdriver.ChromeOptions", "sys.stdout.flush", "requests.post", "os.chdir", "colorama.init", "requests.get", "PIL.ImageDraw.Draw", "shutil.copyfileobj", "threading.Thread", "os.system", ...
[((338, 358), 'colorama.init', 'init', ([], {'autoreset': '(True)'}), '(autoreset=True)\n', (342, 358), False, 'from colorama import Fore, Back, Style, init\n'), ((684, 704), 'os.getenv', 'os.getenv', (['"""APPDATA"""'], {}), "('APPDATA')\n", (693, 704), False, 'import os\n'), ((1884, 1921), 'PIL.ImageFont.truetype', '...
""" Copyright (c) 2016-2019 <NAME> http://www.keithsterling.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
[ "botbuilder.schema.Activity.deserialize", "botframework.connector.ConnectorClient", "programy.utils.logging.ylogger.YLogger.debug", "programy.utils.logging.ylogger.YLogger.exception", "programy.clients.restful.asyncio.microsoft.config.MicrosoftConfiguration", "programy.clients.restful.flask.client.FlaskRe...
[((1667, 1730), 'programy.clients.restful.flask.client.FlaskRestBotClient.__init__', 'FlaskRestBotClient.__init__', (['self', '"""microsoft"""', 'argument_parser'], {}), "(self, 'microsoft', argument_parser)\n", (1694, 1730), False, 'from programy.clients.restful.flask.client import FlaskRestBotClient\n'), ((1740, 1794...
''' Created by auto_sdk on 2021.01.26 ''' from dingtalk.api.base import RestApi class OapiFinanceIdCardOcrRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.back_picture_url = None self.front_picture_url = None self.id_card_no = None self.request_id = None self.user_mobile = Non...
[ "dingtalk.api.base.RestApi.__init__" ]
[((156, 183), 'dingtalk.api.base.RestApi.__init__', 'RestApi.__init__', (['self', 'url'], {}), '(self, url)\n', (172, 183), False, 'from dingtalk.api.base import RestApi\n')]
# program r4_01.py # Sprawdzamy, czy mamy zainstalowane odpowiednie biblilteki zewnętrzne # Importujemy funkcje dodatkowe from sys import exit from r4_functions import * load_module_ok = True try: import numpy as np ok_module_info("numpy") except: error_module_info("numpy") load_module_ok = False t...
[ "sys.exit" ]
[((853, 860), 'sys.exit', 'exit', (['(0)'], {}), '(0)\n', (857, 860), False, 'from sys import exit\n')]
#!/usr/bin/env python # encoding: utf-8 from collections import defaultdict from cp_estimator import Estimator class State(object): def __init__(self, estimator, set2items, item2sets, parent=None, picked_set=None, decision=None): # Don't use this constructor directly. Use .from_task() in...
[ "collections.defaultdict", "cp_estimator.Estimator", "reader.read_input" ]
[((1415, 1430), 'cp_estimator.Estimator', 'Estimator', (['task'], {}), '(task)\n', (1424, 1430), False, 'from cp_estimator import Estimator\n'), ((1515, 1531), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (1526, 1531), False, 'from collections import defaultdict\n'), ((6950, 6971), 'reader.read_i...
"""Test suite for Beta Diversity display module.""" from app.display_modules.beta_div import BetaDiversityDisplayModule from app.display_modules.beta_div.models import BetaDiversityResult from app.display_modules.beta_div import MODULE_NAME from app.display_modules.display_module_base_test import BaseDisplayModuleTest...
[ "app.display_modules.beta_div.models.BetaDiversityResult", "tests.utils.add_sample_group", "app.tool_results.beta_diversity.tests.factory.create_ranks", "app.tool_results.beta_diversity.models.BetaDiversityToolResult" ]
[((772, 786), 'app.tool_results.beta_diversity.tests.factory.create_ranks', 'create_ranks', ([], {}), '()\n', (784, 786), False, 'from app.tool_results.beta_diversity.tests.factory import create_ranks\n'), ((813, 844), 'app.display_modules.beta_div.models.BetaDiversityResult', 'BetaDiversityResult', ([], {'data': 'rank...
import requests,pprint,json from bs4 import BeautifulSoup url=requests.get("https://www.imdb.com/india/top-rated-indian-movies/?ref_=nv_mv_250_in") soup=BeautifulSoup(url.text,"lxml") def scrape_top_list(): tbody= soup.find("tbody",class_="lister-list") all_movies=[] for tr in tbody.find_all("tr"): dic={} d...
[ "bs4.BeautifulSoup", "requests.get", "json.dumps" ]
[((62, 152), 'requests.get', 'requests.get', (['"""https://www.imdb.com/india/top-rated-indian-movies/?ref_=nv_mv_250_in"""'], {}), "(\n 'https://www.imdb.com/india/top-rated-indian-movies/?ref_=nv_mv_250_in')\n", (74, 152), False, 'import requests, pprint, json\n'), ((153, 184), 'bs4.BeautifulSoup', 'BeautifulSoup'...
# -*- coding: utf-8 -*- import jsonschema import sys def clean_doc(doc): """ Clean given JSON document from keys where its value is None :param doc: Pure, dirty JSON :return: Cleaned JSON document """ for key, value in list(doc.items()): if value is None: del doc[key] ...
[ "jsonschema.validate", "sys.stdout.write", "sys.stderr.write" ]
[((620, 652), 'jsonschema.validate', 'jsonschema.validate', (['doc', 'schema'], {}), '(doc, schema)\n', (639, 652), False, 'import jsonschema\n'), ((661, 685), 'sys.stdout.write', 'sys.stdout.write', (['"""OK\n"""'], {}), "('OK\\n')\n", (677, 685), False, 'import sys\n'), ((782, 808), 'sys.stderr.write', 'sys.stderr.wr...
import os import json cwd=os.getcwd() weighted_graph_dict={} stop_dict = {} off_stop_dict={} with open(cwd+'/WeightedGraph','r')as f: line = True while line: line = f.readline() if line: data = json.loads(line) weighted_graph_dict = data exception_dict={} with open(cwd+...
[ "os.getcwd", "json.loads" ]
[((26, 37), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (35, 37), False, 'import os\n'), ((231, 247), 'json.loads', 'json.loads', (['line'], {}), '(line)\n', (241, 247), False, 'import json\n'), ((453, 469), 'json.loads', 'json.loads', (['line'], {}), '(line)\n', (463, 469), False, 'import json\n'), ((616, 632), 'json....
# Create by Packetsss # Personal use is allowed # Commercial use is prohibited import numpy as np import cv2 from scipy import ndimage import math from copy import deepcopy class Images: def __init__(self, img): self.img = cv2.imread(img, 1) if self.img.shape[0] / self.img.shape[1] ...
[ "cv2.bitwise_and", "cv2.medianBlur", "math.atan2", "cv2.adaptiveThreshold", "numpy.clip", "cv2.edgePreservingFilter", "cv2.imshow", "cv2.inRange", "cv2.cvtColor", "math.radians", "cv2.imwrite", "cv2.detailEnhance", "cv2.split", "cv2.convertScaleAbs", "math.cos", "cv2.destroyAllWindows"...
[((7505, 7534), 'cv2.imshow', 'cv2.imshow', (['img_name', 'img.img'], {}), '(img_name, img.img)\n', (7515, 7534), False, 'import cv2\n'), ((7540, 7553), 'cv2.waitKey', 'cv2.waitKey', ([], {}), '()\n', (7551, 7553), False, 'import cv2\n'), ((7559, 7582), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n'...
from airflow import DAG from datetime import datetime, timedelta from airflow.operators.bash_operator import BashOperator from airflow.sensors.external_task_sensor import ExternalTaskSensor default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': datetime(2020, 6, 7), 'email_on_fai...
[ "airflow.operators.bash_operator.BashOperator", "datetime.timedelta", "airflow.DAG", "datetime.datetime" ]
[((430, 530), 'airflow.DAG', 'DAG', (['"""dependent-dag"""'], {'default_args': 'default_args', 'schedule_interval': '"""*/5 * * * *"""', 'catchup': '(False)'}), "('dependent-dag', default_args=default_args, schedule_interval=\n '*/5 * * * *', catchup=False)\n", (433, 530), False, 'from airflow import DAG\n'), ((755,...
""" Minimizes D(b, Ax) for x ∈ ℝ₊^N where aₙ, b ∈ ℝ₊^M and D is a divergence. These occur as ingredients of algorithms for the sparse case. """ import cvxpy import numpy def euclidean(A, b): return _solve_convex(A, b, lambda p, q: cvxpy.norm2(p - q)) def total_variation(A, b): return _solve_convex(A, b, ...
[ "cvxpy.norm1", "numpy.isclose", "cvxpy.Problem", "cvxpy.Variable", "cvxpy.norm2" ]
[((397, 423), 'cvxpy.Variable', 'cvxpy.Variable', (['A.shape[1]'], {}), '(A.shape[1])\n', (411, 423), False, 'import cvxpy\n'), ((509, 546), 'cvxpy.Problem', 'cvxpy.Problem', (['objective', 'constraints'], {}), '(objective, constraints)\n', (522, 546), False, 'import cvxpy\n'), ((706, 725), 'numpy.isclose', 'numpy.iscl...
from django.urls import path from api.authentication import CustomAuthToken from api.views import ( ApiKeyDetail, ApiKeyView, PaymentConfirmationView, PaymentView, RegisterUserView, TransactionList) urlpatterns = [ # Register path('user/register/', RegisterUserView.as_view(), name="register-user"), ...
[ "api.views.PaymentConfirmationView.as_view", "api.views.RegisterUserView.as_view", "api.authentication.CustomAuthToken.as_view", "api.views.ApiKeyDetail.as_view", "api.views.TransactionList.as_view", "api.views.ApiKeyView.as_view", "api.views.PaymentView.as_view" ]
[((268, 294), 'api.views.RegisterUserView.as_view', 'RegisterUserView.as_view', ([], {}), '()\n', (292, 294), False, 'from api.views import ApiKeyDetail, ApiKeyView, PaymentConfirmationView, PaymentView, RegisterUserView, TransactionList\n'), ((348, 373), 'api.authentication.CustomAuthToken.as_view', 'CustomAuthToken.a...
from datetime import datetime from schema import Optional, Or # Main queue constants ACTION = "action" CORRELATION_ID = "correlation_id" DATA = "data" RESULT_PIPE = "result_pipe" QUEUE_NAME = "queue_name" PROPERTIES = "properties" HIGH_PRIORITY = 0 MEDIUM_PRIORITY = 1 LOW_PRIORITY = 2 # Processor action types ACTION_...
[ "schema.Optional", "datetime.datetime.now", "schema.Or" ]
[((1698, 1712), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1710, 1712), False, 'from datetime import datetime\n'), ((3564, 3576), 'schema.Or', 'Or', (['str', 'int'], {}), '(str, int)\n', (3566, 3576), False, 'from schema import Optional, Or\n'), ((3972, 4001), 'schema.Optional', 'Optional', (['"""explo...
import os.path as osp import pickle as pkl import torch import random import numpy as np from torch_geometric.data import InMemoryDataset, Data class SPMotif(InMemoryDataset): splits = ['train', 'val', 'test'] def __init__(self, root, mode='train', transform=None, pre_transform=None, pre_filter=None): ...
[ "torch.unique", "torch.LongTensor", "torch.load", "os.path.join", "torch.tensor", "torch.from_numpy" ]
[((568, 605), 'torch.load', 'torch.load', (['self.processed_paths[idx]'], {}), '(self.processed_paths[idx])\n', (578, 605), False, 'import torch\n'), ((1245, 1293), 'os.path.join', 'osp.join', (['self.raw_dir', 'self.raw_file_names[idx]'], {}), '(self.raw_dir, self.raw_file_names[idx])\n', (1253, 1293), True, 'import o...
import logging import hydra import torch from model import MyAwesomeModel from pytorch_lightning import Trainer from pytorch_lightning.callbacks.early_stopping import EarlyStopping from torch.utils.data import DataLoader from src.data.mnist import CorruptedMNIST log = logging.getLogger(__name__) @hyd...
[ "pytorch_lightning.Trainer", "model.MyAwesomeModel", "torch.jit.script", "src.data.mnist.CorruptedMNIST", "hydra.main", "pytorch_lightning.callbacks.early_stopping.EarlyStopping", "logging.getLogger" ]
[((283, 310), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (300, 310), False, 'import logging\n'), ((317, 383), 'hydra.main', 'hydra.main', ([], {'config_path': '"""configs"""', 'config_name': '"""mnist_config.yaml"""'}), "(config_path='configs', config_name='mnist_config.yaml')\n", (32...
"""Split each echo to prepare for registration.""" import os import subprocess import numpy as np import nibabel as nb # ============================================================================= NII_NAMES = [ '/home/faruk/data/DATA_MRI_NIFTI/derived/sub-23/T2s/01_crop/sub-23_ses-T2s_run-01_dir-AP_part-mag_MEG...
[ "nibabel.Nifti1Image", "os.makedirs", "nibabel.load", "os.path.basename", "numpy.asanyarray", "os.path.exists", "numpy.squeeze", "os.path.join" ]
[((928, 950), 'os.path.exists', 'os.path.exists', (['OUTDIR'], {}), '(OUTDIR)\n', (942, 950), False, 'import os\n'), ((956, 975), 'os.makedirs', 'os.makedirs', (['OUTDIR'], {}), '(OUTDIR)\n', (967, 975), False, 'import os\n'), ((1115, 1132), 'nibabel.load', 'nb.load', (['nii_name'], {}), '(nii_name)\n', (1122, 1132), T...
import typing from datetime import datetime from ..schema import BaseTransformer class Transformer(BaseTransformer): """Transform Indiana raw data for consolidation.""" postal_code = "IN" fields = dict( company="Company", location="City", notice_date="Notice Date", effect...
[ "datetime.datetime" ]
[((915, 936), 'datetime.datetime', 'datetime', (['(2012)', '(1)', '(30)'], {}), '(2012, 1, 30)\n', (923, 936), False, 'from datetime import datetime\n'), ((965, 985), 'datetime.datetime', 'datetime', (['(2020)', '(4)', '(1)'], {}), '(2020, 4, 1)\n', (973, 985), False, 'from datetime import datetime\n'), ((1031, 1051), ...
from flask import Flask def create_app(): app = Flask(__name__) # register routes with app instead of current_app: from app.main import bp as main_bp app.register_blueprint(main_bp) return app
[ "flask.Flask" ]
[((54, 69), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (59, 69), False, 'from flask import Flask\n')]
from calendar import timegm from django.contrib.auth import get_user_model from django.contrib.auth.signals import user_logged_in, user_logged_out from django.db import transaction import graphene from graphene.types.generic import GenericScalar from graphene_django_jwt import signals from graphene_django_jwt.blackl...
[ "graphene.String", "django.contrib.auth.signals.user_logged_out.send", "graphene_django_jwt.shortcuts.get_token", "graphene.NonNull", "django.contrib.auth.get_user_model", "graphene_django_jwt.models.RefreshToken.objects.filter", "graphene_django_jwt.shortcuts.get_refresh_token", "graphene_django_jwt....
[((738, 754), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (752, 754), False, 'from django.contrib.auth import get_user_model\n'), ((1289, 1319), 'graphene.String', 'graphene.String', ([], {'required': '(True)'}), '(required=True)\n', (1304, 1319), False, 'import graphene\n'), ((1340, 1370)...
import numpy as np class layer(): def __init__(self,name,type,nodes_number): self.name=name self.type=type self.nodes_number=nodes_number self.input_values=np.zeros(shape=(nodes_number,1),dtype=float)##input values of nodes self.sum_values=np.zeros(shape=(nodes_number,1),dty...
[ "numpy.where", "numpy.zeros", "numpy.argmax" ]
[((193, 239), 'numpy.zeros', 'np.zeros', ([], {'shape': '(nodes_number, 1)', 'dtype': 'float'}), '(shape=(nodes_number, 1), dtype=float)\n', (201, 239), True, 'import numpy as np\n'), ((285, 331), 'numpy.zeros', 'np.zeros', ([], {'shape': '(nodes_number, 1)', 'dtype': 'float'}), '(shape=(nodes_number, 1), dtype=float)\...
import CTL.funcs.xplib as xplib from CTL.tensorbase.tensorbase import TensorBase import CTL.funcs.funcs as funcs # import numpy as np from copy import deepcopy from CTL.tensor.leg import Leg from CTL.tensor.tensor import Tensor import warnings class DiagonalTensor(Tensor): """ The class for diagonal tensors,...
[ "CTL.funcs.xplib.xp.ravel", "CTL.funcs.xplib.xp.ones", "CTL.funcs.funcs.listDifference", "CTL.funcs.funcs.diagonalNDTensor", "CTL.funcs.funcs.compareLists", "CTL.funcs.xplib.xp.linalg.norm", "CTL.funcs.xplib.xp.copy", "CTL.funcs.funcs.deprecatedFuncWarning", "CTL.funcs.funcs.errorMessage", "CTL.te...
[((20375, 20408), 'CTL.tensor.contract.contract.contractTwoTensors', 'contractTwoTensors', ([], {'ta': 'self', 'tb': 'b'}), '(ta=self, tb=b)\n', (20393, 20408), False, 'from CTL.tensor.contract.contract import contractTwoTensors\n'), ((22452, 22586), 'CTL.funcs.funcs.errorMessage', 'funcs.errorMessage', (['"""DiagonalT...
import argparse from torchvision import transforms import time, os, sys from time import strftime from sklearn.metrics import mean_squared_error, accuracy_score, hamming_loss, roc_curve, auc, f1_score, confusion_matrix import copy from torch.utils.data import DataLoader, Dataset import pdb from prostate_utils import * ...
[ "os.mkdir", "argparse.ArgumentParser", "sklearn.metrics.accuracy_score", "time.strftime", "sklearn.metrics.f1_score", "sys.stdout.flush", "torchvision.transforms.Normalize", "sys.setrecursionlimit", "os.path.join", "torch.utils.data.DataLoader", "torchvision.transforms.Scale", "copy.deepcopy",...
[((342, 417), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PyTorch Digital Mammography Training"""'}), "(description='PyTorch Digital Mammography Training')\n", (365, 417), False, 'import argparse\n'), ((3535, 3633), 'torch.utils.data.DataLoader', 'DataLoader', (['train_set'], {'batch_...
"""File with the preprocessing tools.""" import os import numpy as np import nibabel as nib import pandas as pd from tqdm import tqdm from sklearn.metrics import pairwise_distances from sklearn.metrics.pairwise import linear_kernel # Change this path path = '' # folder containing the gray-matter maps # Folders wi...
[ "pandas.DataFrame", "tqdm.tqdm", "numpy.load", "sklearn.metrics.pairwise.linear_kernel", "pandas.read_csv", "numpy.empty", "numpy.asarray", "sklearn.metrics.pairwise_distances", "pandas.Series", "os.path.join", "os.listdir" ]
[((789, 812), 'os.listdir', 'os.listdir', (['output_data'], {}), '(output_data)\n', (799, 812), False, 'import os\n'), ((1026, 1058), 'numpy.empty', 'np.empty', (['(n_samples, n_samples)'], {}), '((n_samples, n_samples))\n', (1034, 1058), True, 'import numpy as np\n'), ((1076, 1108), 'numpy.empty', 'np.empty', (['(n_sa...