code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from scrapy.spiders import Spider import scrapy import json class CompetitionsSpider(Spider): name = "competitions" def start_requests(self): yield scrapy.Request('https://www.kaggle.com/competitions?sortBy=prize&group=active&page=1&segment=inClass', self.parse_kaggle) def parse_kaggle(self, resp...
[ "json.loads", "scrapy.Request" ]
[((447, 462), 'json.loads', 'json.loads', (['doc'], {}), '(doc)\n', (457, 462), False, 'import json\n'), ((813, 828), 'json.loads', 'json.loads', (['doc'], {}), '(doc)\n', (823, 828), False, 'import json\n'), ((1175, 1190), 'json.loads', 'json.loads', (['doc'], {}), '(doc)\n', (1185, 1190), False, 'import json\n'), ((1...
import os import sys from pathlib import Path from yaml import dump, Dumper from yaml import load, Loader from pydrive2.auth import GoogleAuth from pydrive2.settings import ValidateSettings from pydrive2.settings import InvalidConfigError HOME = Path.home() BASE = Path.home() / ".gdrive" CONFIG = BASE / "config.yaml...
[ "yaml.load", "os.path.abspath", "pathlib.Path.home", "pydrive2.settings.ValidateSettings", "yaml.dump", "os.environ.get", "pydrive2.auth.GoogleAuth" ]
[((249, 260), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (258, 260), False, 'from pathlib import Path\n'), ((268, 279), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (277, 279), False, 'from pathlib import Path\n'), ((703, 743), 'os.environ.get', 'os.environ.get', (['"""PYDRIVE_SETTINGS"""', 'None'], {})...
""" Conection to Cloudant and Load to a DB2 database to feed a cognos DashBoard https://eu-gb.dataplatform.cloud.ibm.com/dashboards/f090b7a0-3b4d-4c29-a072-6983b07e65b5/view/5b1fd40238b232cc50c3d4e407cd7d042e622d55bbbbd00484847b490a652397a8381097c87e4f5c88195366f3bf1a5fcc """ from cloudant.client import Cloudant import...
[ "pandas.DataFrame", "ibm_db.pconnect", "ibm_db.exec_immediate", "cloudant.client.Cloudant", "pandas.concat" ]
[((422, 509), 'cloudant.client.Cloudant', 'Cloudant', (["credentials['username']", "credentials['password']"], {'url': "credentials['url']"}), "(credentials['username'], credentials['password'], url=credentials[\n 'url'])\n", (430, 509), False, 'from cloudant.client import Cloudant\n'), ((4421, 4536), 'pandas.concat...
import datetime from django.conf import settings from django.template.defaultfilters import slugify from scrivo.models import Post from scrivo.tests.base import BlogPostTest, f class SimplePostTest(BlogPostTest): def setUp(self): self.user = self.create_user() self.post = self.create_post(au...
[ "scrivo.tests.base.f", "datetime.datetime.now", "django.template.defaultfilters.slugify" ]
[((502, 526), 'django.template.defaultfilters.slugify', 'slugify', (['self.post.title'], {}), '(self.post.title)\n', (509, 526), False, 'from django.template.defaultfilters import slugify\n'), ((810, 833), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (831, 833), False, 'import datetime\n'), ((120...
import os import sys from abc import abstractmethod # abstract class that every parser should inherit class Parser: def __init__(self, filepath=None, str_data=None, delimiter='\t', decimal_sep='.'): if filepath is None and str_data is None: raise ValueError("At least one argument (filepath or...
[ "os.path.split", "os.path.splitext", "sys.getfilesystemencoding" ]
[((1534, 1561), 'sys.getfilesystemencoding', 'sys.getfilesystemencoding', ([], {}), '()\n', (1559, 1561), False, 'import sys\n'), ((2422, 2450), 'os.path.split', 'os.path.split', (['self.filepath'], {}), '(self.filepath)\n', (2435, 2450), False, 'import os\n'), ((2470, 2492), 'os.path.splitext', 'os.path.splitext', (['...
try: from setuptools import setup, find_packages except ImportError: import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages # class BuildCommand(build): # def run(self): # build.run(self) # # # class InstallCommand(install): # def run(self): # if...
[ "setuptools.find_packages", "ez_setup.use_setuptools" ]
[((98, 123), 'ez_setup.use_setuptools', 'ez_setup.use_setuptools', ([], {}), '()\n', (121, 123), False, 'import ez_setup\n'), ((959, 974), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (972, 974), False, 'from setuptools import setup, find_packages\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-29 21:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cxbx_compat', '0006_executable'), ] operations = [ migrations.CreateModel( ...
[ "django.db.models.CharField", "django.db.models.IntegerField", "django.db.models.ManyToManyField", "django.db.models.AutoField" ]
[((801, 833), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)'}), '(max_length=255)\n', (817, 833), False, 'from django.db import migrations, models\n'), ((964, 1015), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'to': '"""cxbx_compat.XDKLibrary"""'}), "(to='cxbx_comp...
# Copyright 2020 Regents of the University of Minnesota. # # 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 applic...
[ "mtap.api.v1.events_pb2_grpc.EventsStub", "mtap.api.v1.events_pb2.AddBinaryDataRequest", "mtap.api.v1.events_pb2.GetBinaryDataRequest", "mtap.api.v1.events_pb2.AddLabelsRequest", "mtap.api.v1.events_pb2.OpenEventRequest", "typing.NamedTuple", "threading.Lock", "mtap.data._base.LabelIndexInfo", "mtap...
[((1188, 1220), 'typing.TypeVar', 'TypeVar', (['"""L"""'], {'bound': '"""data.Label"""'}), "('L', bound='data.Label')\n", (1195, 1220), False, 'from typing import Iterator, List, Dict, MutableMapping, Generic, TypeVar, NamedTuple, ContextManager, Iterable, Optional, Sequence, Union, Mapping, TYPE_CHECKING, Callable\n')...
import numpy as np import time import argparse import warnings import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, WeightedRandomSampler from torch.utils.data.sampler import SubsetRandomSampler from torchvision import transforms import csv from sklearn.me...
[ "torch.nn.Dropout", "argparse.ArgumentParser", "utils.set_seed", "numpy.floor", "torch.nn.AdaptiveMaxPool1d", "torch.randn", "dataset.testset", "dataset.trainset", "torch.nn.BCELoss", "torch.utils.data.DataLoader", "torch.nn.Conv1d", "numpy.savetxt", "torch.nn.Linear", "torch.nn.AvgPool1d"...
[((7018, 7043), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (7041, 7043), False, 'import argparse\n'), ((9163, 9181), 'utils.set_seed', 'set_seed', (['seed_num'], {}), '(seed_num)\n', (9171, 9181), False, 'from utils import set_seed\n'), ((9204, 9245), 'dataset.trainset', 'trainset', (['args...
# -*- coding: utf-8 -*- """ Created on Fri Feb 12 14:22:31 2016 @author: <NAME> """ import collections import matplotlib.pyplot as plt import numpy as np from abc import ABCMeta, abstractmethod from .. import gui from .. import helpers as hp from .. import traces as tc from ..evaluate import signal as sn from ..graph...
[ "matplotlib.pyplot.close", "numpy.any", "numpy.min", "numpy.max", "numpy.array", "numpy.linspace", "numpy.digitize", "numpy.round" ]
[((3383, 3405), 'matplotlib.pyplot.close', 'plt.close', (['self.figure'], {}), '(self.figure)\n', (3392, 3405), True, 'import matplotlib.pyplot as plt\n'), ((23139, 23165), 'numpy.min', 'np.min', (['data[:, sorttrace]'], {}), '(data[:, sorttrace])\n', (23145, 23165), True, 'import numpy as np\n'), ((23184, 23210), 'num...
from abc import ABC, abstractmethod import torch import random import sys current_module = sys.modules[__name__] from typing import Tuple def get_idces_uniform_linear(neighborhood_size): """ select neighborhood_size weights from a fully connected layer according to a uniform law """ def get_idx(layer)...
[ "torch.ones", "torch.randint", "random.shuffle", "torch.Tensor", "torch.arange", "torch.rand" ]
[((899, 929), 'random.shuffle', 'random.shuffle', (['idces_of_idces'], {}), '(idces_of_idces)\n', (913, 929), False, 'import random\n'), ((1381, 1413), 'torch.randint', 'torch.randint', (['(0)', 'n_output', '(1,)'], {}), '(0, n_output, (1,))\n', (1394, 1413), False, 'import torch\n'), ((1839, 1871), 'torch.randint', 't...
from django import forms from django.forms import modelformset_factory from .models import SiteConfig, AcademicTerm, AcademicSession, StudentClass, Subject SiteConfigForm = modelformset_factory(SiteConfig, fields=('key', 'value',), extra=0) AcademicTermForm = modelformset_factory(AcademicTerm, fields=('name',), can_...
[ "django.forms.modelformset_factory" ]
[((175, 241), 'django.forms.modelformset_factory', 'modelformset_factory', (['SiteConfig'], {'fields': "('key', 'value')", 'extra': '(0)'}), "(SiteConfig, fields=('key', 'value'), extra=0)\n", (195, 241), False, 'from django.forms import modelformset_factory\n'), ((263, 341), 'django.forms.modelformset_factory', 'model...
from PIL import Image, ImageDraw from typing import List, Callable import random class BaiLanError(Exception): pass def paste_image(pt, im, x, y, w=-1, h=-1, with_mask=True): w = im.width if w == -1 else w h = im.height if h == -1 else h im = im.resize((w, h)) pt.paste(im, (x, y, x + w, y + h), ...
[ "PIL.ImageDraw.Draw", "PIL.Image.new", "random.randint", "PIL.Image.open" ]
[((566, 597), 'PIL.Image.new', 'Image.new', (['"""RGBA"""', '(w, h)', 'fill'], {}), "('RGBA', (w, h), fill)\n", (575, 597), False, 'from PIL import Image, ImageDraw\n'), ((1444, 1462), 'PIL.ImageDraw.Draw', 'ImageDraw.Draw', (['pt'], {}), '(pt)\n', (1458, 1462), False, 'from PIL import Image, ImageDraw\n'), ((1367, 139...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .status import StatusDevice from ..node.property import TemperatureProperty import logging logger = logging.getLogger(__name__) class TemperatureDevice(StatusDevice): def __init__( self, device_id=None, name=None, homie_settings=...
[ "logging.getLogger" ]
[((153, 180), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (170, 180), False, 'import logging\n')]
""" =========================== Cross Session Motor Imagery =========================== This Example show how to perform a cross session motor imagery analysis on the very popular dataset 2a from the BCI competition IV. We will compare two pipelines : - CSP+LDA - Riemannian Geometry+Logistic Regression We will use ...
[ "pyriemann.tangentspace.TangentSpace", "moabb.paradigms.LeftRightImagery", "matplotlib.pyplot.show", "moabb.set_log_level", "seaborn.pointplot", "moabb.datasets.BNCI2014001", "seaborn.stripplot", "seaborn.regplot", "sklearn.linear_model.LogisticRegression", "moabb.evaluations.CrossSessionEvaluatio...
[((1252, 1279), 'moabb.set_log_level', 'moabb.set_log_level', (['"""info"""'], {}), "('info')\n", (1271, 1279), False, 'import moabb\n'), ((2440, 2458), 'moabb.paradigms.LeftRightImagery', 'LeftRightImagery', ([], {}), '()\n', (2456, 2458), False, 'from moabb.paradigms import LeftRightImagery\n'), ((2531, 2544), 'moabb...
from datetime import datetime import logging import json import ipdb from collections import OrderedDict def get_current_date_time(just_get_day=False): # datetime object containing current date and time now = datetime.now() if just_get_day: dt_string = now.strftime("%d_%m_%Y") else: dt_...
[ "collections.OrderedDict", "json.dump", "json.load", "datetime.datetime.now" ]
[((218, 232), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (230, 232), False, 'from datetime import datetime\n'), ((1382, 1395), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1393, 1395), False, 'from collections import OrderedDict\n'), ((578, 591), 'collections.OrderedDict', 'OrderedDict',...
import timeit s = """ import cymunk as pymunk #print("pymunk.version", pymunk.version) s = pymunk.Space() s.add(pymunk.Circle(s.static_body, 5)) b = pymunk.Body(1,10) c = pymunk.Circle(b, 5) s.add(b, c) def f(arb): return False s.set_default_collision_handler(pre_solve=f) """ print(min(timeit.repeat("s.step(0...
[ "timeit.repeat" ]
[((297, 346), 'timeit.repeat', 'timeit.repeat', (['"""s.step(0.01)"""'], {'setup': 's', 'repeat': '(10)'}), "('s.step(0.01)', setup=s, repeat=10)\n", (310, 346), False, 'import timeit\n')]
#!/usr/local/python3 import os import time while(True): if(os.path.exists('static/info.json')): os.system("curl http://sick.pwall.icu:7878/add") time.sleep(60) os.remove('static/info.json') else: print("no") time.sleep(1)
[ "os.remove", "os.path.exists", "os.system", "time.sleep" ]
[((64, 98), 'os.path.exists', 'os.path.exists', (['"""static/info.json"""'], {}), "('static/info.json')\n", (78, 98), False, 'import os\n'), ((109, 157), 'os.system', 'os.system', (['"""curl http://sick.pwall.icu:7878/add"""'], {}), "('curl http://sick.pwall.icu:7878/add')\n", (118, 157), False, 'import os\n'), ((166, ...
import sqlite3 import sys from PyQt5.QtWidgets import QDialog, QTableWidgetItem, QHeaderView from PyQt5 import QtWidgets, uic import functions.chemistry import usefulwidgets class Chemist(QDialog): def __init__(self): super(Chemist, self).__init__() uic.loadUi('ui_dir/chemist.ui',...
[ "PyQt5.uic.loadUi", "sqlite3.connect", "usefulwidgets.on_close", "PyQt5.QtWidgets.QApplication", "usefulwidgets.returnalert" ]
[((2651, 2683), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (2673, 2683), False, 'from PyQt5 import QtWidgets, uic\n'), ((289, 326), 'PyQt5.uic.loadUi', 'uic.loadUi', (['"""ui_dir/chemist.ui"""', 'self'], {}), "('ui_dir/chemist.ui', self)\n", (299, 326), False, 'from Py...
import os import time from datetime import datetime import pandas as pd from Parser.Json.BugsJsonParser import BugsJsonParser from Parser.Json.EventsJsonParser import EventsJsonParser from Utility.CDPConfigValues import CDPConfigValues from Utility.Utilities import Utilities from WebConnection.WebConnection import We...
[ "pandas.DataFrame", "datetime.datetime.today", "pandas.read_csv", "Utility.CDPConfigValues.CDPConfigValues.create_directory", "pandas.merge", "os.path.exists", "WebConnection.WebConnection.WebConnection", "time.time", "time.sleep", "Parser.Json.BugsJsonParser.BugsJsonParser", "Utility.CDPConfigV...
[((2035, 2050), 'WebConnection.WebConnection.WebConnection', 'WebConnection', ([], {}), '()\n', (2048, 2050), False, 'from WebConnection.WebConnection import WebConnection\n'), ((2319, 2369), 'Utility.CDPConfigValues.CDPConfigValues.configFetcher.get', 'CDPConfigValues.configFetcher.get', (['"""name"""', 'project'], {}...
import torch import torch.nn as nn from transformers import BertModel, BertPreTrainedModel from transformers.models.bert.modeling_bert import BertAttention, BertIntermediate, BertOutput from components import masked_avgpool class DecoderLayer(nn.Module): def __init__(self, config): super().__init__() ...
[ "torch.nn.Dropout", "torch.ones_like", "torch.nn.ReLU", "torch.nn.MaxPool2d", "components.masked_avgpool", "torch.FloatTensor", "transformers.models.bert.modeling_bert.BertIntermediate", "torch.nn.BatchNorm2d", "transformers.models.bert.modeling_bert.BertAttention", "torch.nn.ELU", "transformers...
[((342, 375), 'transformers.models.bert.modeling_bert.BertAttention', 'BertAttention', (['config.bert_config'], {}), '(config.bert_config)\n', (355, 375), False, 'from transformers.models.bert.modeling_bert import BertAttention, BertIntermediate, BertOutput\n'), ((406, 439), 'transformers.models.bert.modeling_bert.Bert...
import subprocess from redun import task from task_lib2.utils import lib_task_on_batch redun_namespace = "redun.examples.aws_batch" @task() def task_on_default(x: int): return [ 'task_on_default', subprocess.check_output(['uname', '-a']), x ] @task(executor='batch', version="12")...
[ "subprocess.check_output", "redun.task", "pdb.set_trace", "task_lib2.utils.lib_task_on_batch" ]
[((139, 145), 'redun.task', 'task', ([], {}), '()\n', (143, 145), False, 'from redun import task\n'), ((284, 320), 'redun.task', 'task', ([], {'executor': '"""batch"""', 'version': '"""12"""'}), "(executor='batch', version='12')\n", (288, 320), False, 'from redun import task\n'), ((486, 532), 'redun.task', 'task', ([],...
""" test_bundle_asset """ import secrets import logging import json from starfish.asset import DataAsset from starfish.asset import BundleAsset TEST_ASSET_COUNT = 4 def test_init(): bundle = BundleAsset.create('Bundle Asset') assert(bundle) bundle = BundleAsset.create('test') assert(bundle) ...
[ "starfish.asset.DataAsset.create", "starfish.asset.BundleAsset.create", "secrets.token_hex" ]
[((205, 239), 'starfish.asset.BundleAsset.create', 'BundleAsset.create', (['"""Bundle Asset"""'], {}), "('Bundle Asset')\n", (223, 239), False, 'from starfish.asset import BundleAsset\n'), ((273, 299), 'starfish.asset.BundleAsset.create', 'BundleAsset.create', (['"""test"""'], {}), "('test')\n", (291, 299), False, 'fro...
import pygame import sys from time import sleep from bullet import Bullet from alien import Alien pygame.init() def check_key_down(event, ship): if event.key == pygame.K_RIGHT or event.key == pygame.K_d: ship.move_right = True elif event.key == pygame.K_LEFT or event.key == pygame.K_a: ship....
[ "bullet.Bullet", "pygame.event.get", "pygame.sprite.groupcollide", "pygame.init", "pygame.display.flip", "time.sleep", "pygame.mouse.get_pos", "alien.Alien", "sys.exit", "pygame.sprite.spritecollideany" ]
[((100, 113), 'pygame.init', 'pygame.init', ([], {}), '()\n', (111, 113), False, 'import pygame\n'), ((1096, 1118), 'pygame.mouse.get_pos', 'pygame.mouse.get_pos', ([], {}), '()\n', (1116, 1118), False, 'import pygame\n'), ((1350, 1368), 'pygame.event.get', 'pygame.event.get', ([], {}), '()\n', (1366, 1368), False, 'im...
#!/usr/bin/env python # Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
[ "os.walk", "os.path.join" ]
[((1094, 1106), 'os.walk', 'os.walk', (['"""."""'], {}), "('.')\n", (1101, 1106), False, 'import os\n'), ((1164, 1193), 'os.path.join', 'os.path.join', (['dirname', 'README'], {}), '(dirname, README)\n', (1176, 1193), False, 'import os\n'), ((1695, 1729), 'os.path.join', 'os.path.join', (['dirname', 'sub', 'README'], {...
from app import create_app app = create_app('default')
[ "app.create_app" ]
[((34, 55), 'app.create_app', 'create_app', (['"""default"""'], {}), "('default')\n", (44, 55), False, 'from app import create_app\n')]
import os from ctypes import * import fcntl from .version import DrmVersion from .drm_h import * from .connector import DrmConnector from .encoder import DrmEncoder from .crtc import DrmCrtc from .plane import DrmPlane from .framebuffer import DrmFramebuffer from .format import DrmFormat def drm_set_client_cap(fd,...
[ "PIL.ImageDraw.Draw", "fcntl.ioctl", "os.path.exists" ]
[((422, 466), 'fcntl.ioctl', 'fcntl.ioctl', (['fd', 'DRM_IOCTL_SET_CLIENT_CAP', 'c'], {}), '(fd, DRM_IOCTL_SET_CLIENT_CAP, c)\n', (433, 466), False, 'import fcntl\n'), ((1596, 1645), 'fcntl.ioctl', 'fcntl.ioctl', (['self._drm.fd', 'DRM_IOCTL_GET_CAP', 'arg'], {}), '(self._drm.fd, DRM_IOCTL_GET_CAP, arg)\n', (1607, 1645...
#!/usr/bin/env python """ Parse Ruffus pipelines using old fashioned decorator syntax """ ################################################################################ # # parse_old_style_ruffus.py # # # Copyright (c) 25 February 2015 <NAME> # This is free software, and you are welcome to redistribute it ...
[ "sys.stdout.write", "logging.Formatter.format", "argparse.ArgumentParser", "os.path.join", "logging.FileHandler", "os.path.basename", "logging.StreamHandler", "logging.addLevelName", "logging.Formatter", "os.path.expanduser", "logging.getLogger", "re.compile" ]
[((2390, 2430), 'logging.addLevelName', 'logging.addLevelName', (['MESSAGE', '"""MESSAGE"""'], {}), "(MESSAGE, 'MESSAGE')\n", (2410, 2430), False, 'import logging\n'), ((5138, 5165), 're.compile', 're.compile', (['"""^\\\\s*def.*\\\\("""'], {}), "('^\\\\s*def.*\\\\(')\n", (5148, 5165), False, 'import re\n'), ((5580, 56...
import pymysql from DBUtils.PooledDB import PooledDB from config import * class Wcr: def __init__(self): self.db_pool = PooledDB(creator=pymysql, host=DB_HOST, port=DB_PORT, user=DB_USER, password=DB_PWD, database='wcr', blocking=True, ping=0) async def creat...
[ "DBUtils.PooledDB.PooledDB" ]
[((141, 268), 'DBUtils.PooledDB.PooledDB', 'PooledDB', ([], {'creator': 'pymysql', 'host': 'DB_HOST', 'port': 'DB_PORT', 'user': 'DB_USER', 'password': 'DB_PWD', 'database': '"""wcr"""', 'blocking': '(True)', 'ping': '(0)'}), "(creator=pymysql, host=DB_HOST, port=DB_PORT, user=DB_USER,\n password=DB_PWD, database='w...
# Generated by Django 3.0.5 on 2020-04-22 03:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('file_receiver', '0001_initial'), ] operations = [ migrations.AlterField( model_name='file', name='file_data', ...
[ "django.db.models.FileField" ]
[((332, 368), 'django.db.models.FileField', 'models.FileField', ([], {'upload_to': '"""files/"""'}), "(upload_to='files/')\n", (348, 368), False, 'from django.db import migrations, models\n')]
from distutils.core import setup LONG_DESC = """ Unicode URLS in django.""" setup( name='unicode_urls', packages=['unicode_urls', 'unicode_urls.django', 'unicode_urls.cms'], version='0.2.1', long_description=LONG_DESC, description='Unicode urls.', author='<NAME>', author_email='<EMAIL>', ...
[ "distutils.core.setup" ]
[((78, 691), 'distutils.core.setup', 'setup', ([], {'name': '"""unicode_urls"""', 'packages': "['unicode_urls', 'unicode_urls.django', 'unicode_urls.cms']", 'version': '"""0.2.1"""', 'long_description': 'LONG_DESC', 'description': '"""Unicode urls."""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': ...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:set ts=4 sw=4 et: # Copyright 2018-2019 <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/LICE...
[ "json_array.JsonArray", "threading.Thread", "gui.QtWidgets.QApplication", "json.load", "time.sleep", "logger.get_logger", "gui.MainWindowApp", "queue.Queue" ]
[((2061, 2093), 'gui.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (2083, 2093), False, 'from gui import QtWidgets, MainWindowApp\n'), ((2173, 2188), 'gui.MainWindowApp', 'MainWindowApp', ([], {}), '()\n', (2186, 2188), False, 'from gui import QtWidgets, MainWindowApp\n'), ((279...
# example 5-1 Modeling CSV data with multilayer perceptron networks import tensorflow.python.platform import tensorflow as tf import pandas as pd import numpy as np import os from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Input, Dense from matplotlib import pyplot print(...
[ "matplotlib.pyplot.title", "tensorflow.keras.layers.Dense", "pandas.read_csv", "tensorflow.math.reduce_std", "tensorflow.executing_eagerly", "matplotlib.pyplot.figure", "tensorflow.divide", "numpy.arange", "os.path.join", "tensorflow.math.log", "numpy.max", "matplotlib.pyplot.show", "matplot...
[((464, 510), 'os.path.join', 'os.path.join', (['"""data"""', '"""classification-simdata"""'], {}), "('data', 'classification-simdata')\n", (476, 510), False, 'import os\n'), ((6927, 6977), 'matplotlib.pyplot.plot', 'pyplot.plot', (["history.history['loss']"], {'label': '"""loss"""'}), "(history.history['loss'], label=...
## For development use, utilities to instrospect ffi functions from inspect import signature def stump_code_for_overriding_ffi_calls(obj, f=None): if f is not None: return stump_code_for_overriding_ffi_call(obj,f) result=[] for f,timeout in obj.ffi_auth_methods.items(): code=stump_code_for_overridi...
[ "safenet.authenticator.Authenticator", "inspect.signature" ]
[((1667, 1687), 'safenet.authenticator.Authenticator', 'auth.Authenticator', ([], {}), '()\n', (1685, 1687), True, 'import safenet.authenticator as auth\n'), ((1027, 1042), 'inspect.signature', 'signature', (['func'], {}), '(func)\n', (1036, 1042), False, 'from inspect import signature\n'), ((1129, 1144), 'inspect.sign...
#!/usr/bin/python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility to duplicate a config in some subset of our GM expectation files. Created for http://skbug.com/2752 ('split existing "gpu" ...
[ "argparse.ArgumentParser", "os.path.dirname", "gm_json.WriteToFile", "gm_json.LoadFromFile", "os.path.join", "os.listdir", "re.compile" ]
[((1002, 1044), 're.compile', 're.compile', (['gm_json.IMAGE_FILENAME_PATTERN'], {}), '(gm_json.IMAGE_FILENAME_PATTERN)\n', (1012, 1044), False, 'import re\n'), ((922, 947), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (937, 947), False, 'import os\n'), ((2583, 2608), 'argparse.ArgumentPars...
############################################################################### ## ## Copyright (c) Crossbar.io Technologies GmbH ## ## 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 ## ##...
[ "zope.interface.Attribute" ]
[((3230, 3308), 'zope.interface.Attribute', 'Attribute', (['"""Default output directory base path. (e.g. \'reports/wamp/servers\')"""'], {}), '("Default output directory base path. (e.g. \'reports/wamp/servers\')")\n', (3239, 3308), False, 'from zope.interface import Interface, Attribute\n'), ((3333, 3401), 'zope.inter...
# pylint:disable=unused-variable # pylint:disable=unused-argument # pylint:disable=redefined-outer-name # from simcore_postgres_database.models.projects import projects as projects_table import json import urllib.parse from pathlib import Path from typing import Dict from urllib.parse import parse_qs import pytest fr...
[ "simcore_service_webserver.studies_dispatcher.handlers_redirects.RedirectionQueryParams.parse_obj", "simcore_service_webserver.studies_dispatcher._projects.UserInfo", "simcore_service_webserver.studies_dispatcher._projects.create_viewer_project_model", "simcore_service_webserver.studies_dispatcher._projects.V...
[((3167, 3966), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""url_in,expected_download_link"""', "[(\n 'http://localhost:9081/view?file_type=CSV&download_link=https%253A%252F%252Fraw.githubusercontent.com%252Frawgraphs%252Fraw%252Fmaster%252Fdata%252Forchestra.csv&file_name=orchestra.json&file_size=4&v...
import typing as tt from rich.console import Console from rich.table import Table def create_table(results: tt.Dict, label_analysis: tt.Dict = None): """Create summary table for all the results. Example: Results: ``` Label Analysis ┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓ ┃ Clas...
[ "rich.console.Console", "rich.table.Table" ]
[((1463, 1472), 'rich.console.Console', 'Console', ([], {}), '()\n', (1470, 1472), False, 'from rich.console import Console\n'), ((1888, 1918), 'rich.table.Table', 'Table', ([], {'title': '"""Result Analysis"""'}), "(title='Result Analysis')\n", (1893, 1918), False, 'from rich.table import Table\n'), ((1518, 1547), 'ri...
palette_str = '''0 0 0 128 0 0 0 128 0 128 128 0 0 0 128 128 0 128 0 128 128 128 128 128 64 0 0 191 0 0 64 128 0 191 128 0 64 0 128 191 0 128 64 128 128 191 128 128 0 64 0 128 64 0 0 191 0 128 191 0 0 64 128 128 64 128 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33...
[ "matplotlib.colors.ListedColormap" ]
[((2965, 2996), 'matplotlib.colors.ListedColormap', 'ListedColormap', (['tensor', '"""davis"""'], {}), "(tensor, 'davis')\n", (2979, 2996), False, 'from matplotlib.colors import ListedColormap\n')]
# Simple Wallet # Copyright (c) 2022 Mystic Technology LLC # 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...
[ "base64.b64decode" ]
[((1469, 1496), 'base64.b64decode', 'base64.b64decode', (['signature'], {}), '(signature)\n', (1485, 1496), False, 'import base64\n')]
"""Doomsday fuel. """ def solution(m): import numpy as np import fractions if len(m) == 1: return [1, 1] n_states = len(m) mask = [False if mi == [0] * n_states else True for mi in m] idx = np.concatenate([np.arange(n_states)[mask], np.arange(n_states)[np.logical_not(mask)]]) M...
[ "numpy.sum", "numpy.logical_not", "numpy.lcm.reduce", "numpy.array", "numpy.arange", "numpy.matmul", "numpy.eye", "fractions.Fraction" ]
[((323, 334), 'numpy.array', 'np.array', (['m'], {}), '(m)\n', (331, 334), True, 'import numpy as np\n'), ((633, 644), 'numpy.array', 'np.array', (['M'], {}), '(M)\n', (641, 644), True, 'import numpy as np\n'), ((839, 854), 'numpy.matmul', 'np.matmul', (['N', 'R'], {}), '(N, R)\n', (848, 854), True, 'import numpy as np...
import inspect import importlib from django.core.management.base import BaseCommand, CommandError from django.apps import apps as django_apps from django.db import transaction from accountifie.gl.bmo import BusinessModelObject from accountifie.gl.models import TranLine from accountifie.common.api import api_func imp...
[ "django.apps.apps.get_models", "django.db.transaction.atomic", "logging.getLogger" ]
[((341, 369), 'logging.getLogger', 'logging.getLogger', (['"""default"""'], {}), "('default')\n", (358, 369), False, 'import logging\n'), ((1227, 1251), 'django.apps.apps.get_models', 'django_apps.get_models', ([], {}), '()\n', (1249, 1251), True, 'from django.apps import apps as django_apps\n'), ((1468, 1488), 'django...
from os import cpu_count from bfio import BioReader, BioWriter, OmeXml import argparse, logging import numpy as np from pathlib import Path from cellpose import dynamics, utils import torch from concurrent.futures import ThreadPoolExecutor, wait, Future import typing """ Plugin Constants """ TILE_SIZE = 2048 # Larg...
[ "argparse.ArgumentParser", "logging.basicConfig", "numpy.argmax", "numpy.empty", "numpy.dtype", "logging.getLogger", "numpy.argwhere", "bfio.BioReader", "os.cpu_count", "cellpose.utils.fill_holes_and_remove_small_masks", "pathlib.Path", "torch.cuda.is_available", "cellpose.dynamics.get_masks...
[((512, 537), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (535, 537), False, 'import torch\n'), ((642, 767), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(name)-8s - %(levelname)-8s - %(message)s"""', 'datefmt': '"""%d-%b-%y %H:%M:%S"""'}), "(format=\n ...
# File sets up the django environment, used by other scripts that need to # execute in django land import os import django from django.conf import settings YASET_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), 'yaset')) def boot_django(): settings.configure( BASE_DIR=YASET_DIR, DEBUG...
[ "os.path.dirname", "django.setup", "os.path.join" ]
[((726, 740), 'django.setup', 'django.setup', ([], {}), '()\n', (738, 740), False, 'import django\n'), ((198, 223), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (213, 223), False, 'import os\n'), ((450, 487), 'os.path.join', 'os.path.join', (['YASET_DIR', '"""db.sqlite3"""'], {}), "(YASET_D...
"""Tests for utils/loadext.py""" from pathlib import Path from eggbot.utils import loadext MOCK_FILE = Path("tests/fixtures/ext/valid.py") EXPECTED_FILE = "tests.fixtures.ext.valid" EXPECTED_FILES = [ Path("tests/fixtures/ext/valid.py"), Path("tests/fixtures/ext/invalid.py"), Path("tests/fixtures/ext/__in...
[ "eggbot.utils.loadext.convert_to_module_path", "pathlib.Path", "eggbot.utils.loadext.load_ext", "eggbot.utils.loadext.get_files" ]
[((105, 140), 'pathlib.Path', 'Path', (['"""tests/fixtures/ext/valid.py"""'], {}), "('tests/fixtures/ext/valid.py')\n", (109, 140), False, 'from pathlib import Path\n'), ((207, 242), 'pathlib.Path', 'Path', (['"""tests/fixtures/ext/valid.py"""'], {}), "('tests/fixtures/ext/valid.py')\n", (211, 242), False, 'from pathli...
# Generated by Django 3.0.8 on 2020-08-02 16:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('wagtailimages', '0022_uploadedimage'), ('wagtailcore', '0045_assign_unlock_grouppagepermission')...
[ "django.db.models.CharField", "django.db.models.OneToOneField", "django.db.models.ForeignKey" ]
[((462, 632), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'auto_created': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'parent_link': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'to': '"""wagtailcore.Page"""'}), "(auto_created=True, on_delete=django.db.models.deletion\n...
import sys import cv2 import gi gi.require_version("Gst", "1.0") from gi.repository import Gst def cb_newpad(decodebin, decoder_src_pad, data): print("In cb_newpad\n") caps = decoder_src_pad.get_current_caps() gststruct = caps.get_structure(0) gstname = gststruct.get_name() source_bin = data ...
[ "gi.repository.Gst.Bin.new", "gi.require_version", "gi.repository.Gst.ElementFactory.make", "gi.repository.Gst.GhostPad.new_no_target", "cv2.VideoCapture", "gi.repository.Gst.Bin.add", "sys.stderr.write" ]
[((33, 65), 'gi.require_version', 'gi.require_version', (['"""Gst"""', '"""1.0"""'], {}), "('Gst', '1.0')\n", (51, 65), False, 'import gi\n'), ((1636, 1657), 'gi.repository.Gst.Bin.new', 'Gst.Bin.new', (['bin_name'], {}), '(bin_name)\n', (1647, 1657), False, 'from gi.repository import Gst\n'), ((1960, 2017), 'gi.reposi...
from flask import Blueprint, flash, redirect, request, url_for, render_template from flask_babel import gettext as _ from kanban_boards.blueprints.contact.forms import ContactForm contact = Blueprint("contact", __name__, template_folder="templates") @contact.route("/contact", methods=["GET", "POST"], endpoint="inde...
[ "kanban_boards.blueprints.contact.forms.ContactForm", "flask.Blueprint", "kanban_boards.blueprints.contact.tasks.deliver_contact_email.delay", "flask.request.form.get", "flask.url_for", "flask.render_template", "flask_babel.gettext" ]
[((192, 251), 'flask.Blueprint', 'Blueprint', (['"""contact"""', '__name__'], {'template_folder': '"""templates"""'}), "('contact', __name__, template_folder='templates')\n", (201, 251), False, 'from flask import Blueprint, flash, redirect, request, url_for, render_template\n'), ((348, 361), 'kanban_boards.blueprints.c...
import cv2 from numpy import pi, cos, sin from pprint import pprint from statistics import median from sys import exit def hough_transform(edges, img=None, thresh=110): """Get contour lines of the receipt in polar coords(r, t) using a thresh for the hough accumulator and calculate cartesian coords(x, y). ...
[ "cv2.line", "statistics.median", "numpy.sin", "cv2.HoughLines", "pprint.pprint", "numpy.cos", "sys.exit" ]
[((337, 379), 'cv2.HoughLines', 'cv2.HoughLines', (['edges', '(1)', '(pi / 180)', 'thresh'], {}), '(edges, 1, pi / 180, thresh)\n', (351, 379), False, 'import cv2\n'), ((1266, 1287), 'pprint.pprint', 'pprint', (['intersections'], {}), '(intersections)\n', (1272, 1287), False, 'from pprint import pprint\n'), ((3448, 349...
# pyclesperanto assistant standalone # # The assistant allows to call operations from the graphical user interface and implement an # image-data-flow-graph. When parameters of operations high in the hierarchy are updated, downstream # operations are updated. This facilitates finding a good parameter setting for complex...
[ "pyclesperanto_prototype.maximum_sphere", "pyclesperanto_prototype.artificial_tissue_2d", "pyclesperanto_prototype.get_device", "napari.gui_qt", "pyclesperanto_prototype.pull_zyx", "napari_pyclesperanto_assistant.napari_plugin", "pyclesperanto_prototype.detect_label_edges", "pyclesperanto_prototype.se...
[((1509, 1533), 'pyclesperanto_prototype.select_device', 'cle.select_device', (['"""rtx"""'], {}), "('rtx')\n", (1526, 1533), True, 'import pyclesperanto_prototype as cle\n'), ((715, 731), 'skimage.io.imread', 'imread', (['filename'], {}), '(filename)\n', (721, 731), False, 'from skimage.io import imread\n'), ((836, 94...
# noinspection PyPackageRequirements import pytest from json import loads as json_load from django_docker_helpers.config.backends.environment_parser import EnvironmentParser pytestmark = [pytest.mark.backend, pytest.mark.env] def yaml_load_safe(stream): from yaml import load, SafeLoader return load(stream,...
[ "pytest.raises", "yaml.load", "django_docker_helpers.config.backends.environment_parser.EnvironmentParser" ]
[((308, 332), 'yaml.load', 'load', (['stream', 'SafeLoader'], {}), '(stream, SafeLoader)\n', (312, 332), False, 'from yaml import load, SafeLoader\n'), ((455, 483), 'django_docker_helpers.config.backends.environment_parser.EnvironmentParser', 'EnvironmentParser', (['"""project"""'], {}), "('project')\n", (472, 483), Fa...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import numpy as np from sklearn.model_selection import train_test_split def create_validation_split(X, y, grouplabels, test_size, random_seed=45): """ :param X: Features matrix :param y: label matr...
[ "numpy.concatenate", "sklearn.model_selection.train_test_split", "numpy.where", "numpy.array", "numpy.unique" ]
[((3235, 3273), 'numpy.concatenate', 'np.concatenate', (['X_train_pieces'], {'axis': '(0)'}), '(X_train_pieces, axis=0)\n', (3249, 3273), True, 'import numpy as np\n'), ((3291, 3328), 'numpy.concatenate', 'np.concatenate', (['X_test_pieces'], {'axis': '(0)'}), '(X_test_pieces, axis=0)\n', (3305, 3328), True, 'import nu...
#!/usr/bin/env python # encoding: utf-8 """An asymmetric SOM. This type of SOM doesn't use a grid, but the nodes are freely positioned on a plane. """ from collections import UserList from math import exp import random from random import choice from scipy.spatial import Voronoi, voronoi_plot_2d from .som import SOM, ...
[ "matplotlib.pyplot.title", "scipy.spatial.voronoi_plot_2d", "matplotlib.pyplot.xlim", "math.exp", "matplotlib.pyplot.show", "numpy.arctan2", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylim", "numpy.asarray", "matplotlib.pyplot.axis", "scipy.spatial.Voronoi", "random.choice", "matplotlib.py...
[((1379, 1403), 'scipy.spatial.voronoi_plot_2d', 'voronoi_plot_2d', (['voronoi'], {}), '(voronoi)\n', (1394, 1403), False, 'from scipy.spatial import Voronoi, voronoi_plot_2d\n'), ((1604, 1629), 'matplotlib.pyplot.title', 'plt.title', (['"""Voronoi plot"""'], {}), "('Voronoi plot')\n", (1613, 1629), True, 'import matpl...
import collections import numpy as np import tensorflow as tf from tensorflow.python.ops.rnn import dynamic_rnn from tensorflow.contrib.rnn import BasicLSTMCell from helpers import FileLogger from ml_utils import create_adam_optimizer from ml_utils import create_weight_variable from phased_lstm import PhasedLSTMCell f...
[ "tensorflow.trainable_variables", "phased_lstm.PhasedLSTMCell", "tensorflow.matmul", "tensorflow.ConfigProto", "numpy.mean", "collections.deque", "tensorflow.get_variable", "tensorflow.placeholder", "ml_utils.create_weight_variable", "ml_utils.create_adam_optimizer", "tensorflow.global_variables...
[((781, 847), 'helpers.FileLogger', 'FileLogger', (['"""log.tsv"""', "['step', 'training_loss', 'benchmark_loss']"], {}), "('log.tsv', ['step', 'training_loss', 'benchmark_loss'])\n", (791, 847), False, 'from helpers import FileLogger\n'), ((1268, 1335), 'tensorflow.python.ops.rnn.dynamic_rnn', 'dynamic_rnn', (['lstm',...
# Generated by Django 3.1.3 on 2020-11-20 00:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('signapp', '0005_auto_20201119_2344'), ] operations = [ migrations.AlterField( model_name='phone', name='country_code...
[ "django.db.models.CharField" ]
[((341, 371), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(5)'}), '(max_length=5)\n', (357, 371), False, 'from django.db import migrations, models\n')]
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: token_features Author : <NAME> date: 2019/8/20 ------------------------------------------------- """ __author__ = '<NAME>' # 获取token features,即每一个字符的向量,可以用cls作为句子向量,也可以用每一个字符的向量 import os import sys cu...
[ "sys.path.append", "h5py.File", "tensorflow.trainable_variables", "modeling.BertModel", "tensorflow.global_variables_initializer", "tokenization.FullTokenizer", "os.path.dirname", "tensorflow.Session", "numpy.asarray", "tensorflow.placeholder", "tensorflow.train.init_from_checkpoint", "numpy.a...
[((408, 433), 'sys.path.append', 'sys.path.append', (['rootPath'], {}), '(rootPath)\n', (423, 433), False, 'import sys\n'), ((707, 759), 'modeling.BertConfig.from_json_file', 'modeling.BertConfig.from_json_file', (['bert_config_file'], {}), '(bert_config_file)\n', (741, 759), False, 'import modeling\n'), ((1296, 1358),...
import TestModule print(TestModule) TestModule(1, 2, 3, abc=123) print(TestModule.a) print(TestModule.b) print(TestModule.c)
[ "TestModule" ]
[((38, 66), 'TestModule', 'TestModule', (['(1)', '(2)', '(3)'], {'abc': '(123)'}), '(1, 2, 3, abc=123)\n', (48, 66), False, 'import TestModule\n')]
""" EDA : print and plot essential information about the data """ from PIL import Image import pandas as pd import matplotlib.pyplot as plt import matplotlib.image as mpimg import config def print_dataset_size(): """print the size of imquality and diagnosis dataset""" q_traindf = pd.read_csv(f'{config.PATH_V...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.image.imread", "matplotlib.pyplot.show", "pandas.read_csv", "matplotlib.pyplot.imshow" ]
[((292, 350), 'pandas.read_csv', 'pd.read_csv', (['f"""{config.PATH_VM}/data/output/q_traindf.csv"""'], {}), "(f'{config.PATH_VM}/data/output/q_traindf.csv')\n", (303, 350), True, 'import pandas as pd\n'), ((366, 423), 'pandas.read_csv', 'pd.read_csv', (['f"""{config.PATH_VM}/data/output/q_testdf.csv"""'], {}), "(f'{co...
#import os import pathlib import babel.messages.extract import babel.messages.pofile import babel.messages.mofile from babel._compat import BytesIO from WebApi.Google.Translator import Translator class Maker: @classmethod def Make(cls, srcDir='../../../src/', dstDir='../locales/', domain='hello', msgidLocale='...
[ "babel._compat.BytesIO", "pathlib.Path", "WebApi.Google.Translator.Translator.Translate" ]
[((970, 979), 'babel._compat.BytesIO', 'BytesIO', ([], {}), '()\n', (977, 979), False, 'from babel._compat import BytesIO\n'), ((1675, 1684), 'babel._compat.BytesIO', 'BytesIO', ([], {}), '()\n', (1682, 1684), False, 'from babel._compat import BytesIO\n'), ((3645, 3674), 'pathlib.Path', 'pathlib.Path', (['f"""{domain}....
import psycopg2 from dataclasses import dataclass from ..export import search_query from poodle.secret import DATABASE @dataclass class Export: db: str = "" data: list = "" def __post_init__(self): self.conn = psycopg2.connect(**DATABASE) self.cursor = self.conn.cursor() self.que...
[ "psycopg2.connect" ]
[((234, 262), 'psycopg2.connect', 'psycopg2.connect', ([], {}), '(**DATABASE)\n', (250, 262), False, 'import psycopg2\n')]
from django.apps import AppConfig class CoreConfig(AppConfig): name = "metagov.core" verbose_name = "Metagov App" def ready(self): from metagov.core import signals from metagov.core.signals import handlers from metagov.core.plugin_manager import plugin_registry print(f"Me...
[ "metagov.core.plugin_manager.plugin_registry.keys" ]
[((362, 384), 'metagov.core.plugin_manager.plugin_registry.keys', 'plugin_registry.keys', ([], {}), '()\n', (382, 384), False, 'from metagov.core.plugin_manager import plugin_registry\n')]
#!/usr/bin/env python # inst: university of bristol # auth: <NAME> # mail: <EMAIL> / <EMAIL> import sys import subprocess import configparser import getopt import numpy as np import pandas as pd import gdalutils from lfptools import shapefile from lfptools import misc_utils from osgeo import osr def getwidths_shell...
[ "gdalutils.get_geo", "lfptools.misc_utils.near_euc", "getopt.getopt", "pandas.read_csv", "lfptools.shapefile.Writer", "numpy.where", "configparser.SafeConfigParser", "sys.exit", "gdalutils.clip_raster", "osgeo.osr.SpatialReference" ]
[((1001, 1032), 'configparser.SafeConfigParser', 'configparser.SafeConfigParser', ([], {}), '()\n', (1030, 1032), False, 'import configparser\n'), ((1533, 1566), 'lfptools.shapefile.Writer', 'shapefile.Writer', (['shapefile.POINT'], {}), '(shapefile.POINT)\n', (1549, 1566), False, 'from lfptools import shapefile\n'), (...
from .experiment import Experiment import numpy as np class XenonSimple(Experiment): detector_name = 'Xe_simple' target_material = 'Xe' exposure_tonne_year = 5 energy_threshold_kev = 10 cut_efficiency = 0.8 detection_efficiency = 0.5 interaction_type = 'SI' location = 'XENON' def ...
[ "numpy.sqrt" ]
[((1309, 1356), 'numpy.sqrt', 'np.sqrt', (['(0.3 ** 2 + 0.06 ** 2 * energies_in_kev)'], {}), '(0.3 ** 2 + 0.06 ** 2 * energies_in_kev)\n', (1316, 1356), True, 'import numpy as np\n'), ((614, 638), 'numpy.sqrt', 'np.sqrt', (['energies_in_kev'], {}), '(energies_in_kev)\n', (621, 638), True, 'import numpy as np\n'), ((209...
# Built-ins import json import datetime import pathlib import itertools from typing import List, Dict # Externals import requests from requests.exceptions import HTTPError # Own Modules from my_quickbase.settings import Q_REALM, Q_USER_TOKEN from my_quickbase.helpers import check_attr_exists, parse_response, TokenAndRe...
[ "json.dump", "my_quickbase.helpers.QuickbaseConnectionError", "my_quickbase.helpers.parse_response", "my_quickbase.helpers.TokenAndRealmNotSet", "requests.Session", "datetime.date.today", "pathlib.Path", "my_quickbase.logger.info", "my_quickbase.logger.error", "my_quickbase.helpers.check_attr_exis...
[((3961, 3995), 'my_quickbase.helpers.check_attr_exists', 'check_attr_exists', (['"""field_mapping"""'], {}), "('field_mapping')\n", (3978, 3995), False, 'from my_quickbase.helpers import check_attr_exists, parse_response, TokenAndRealmNotSet, QuickbaseConnectionError\n'), ((654, 672), 'requests.Session', 'requests.Ses...
from matplotlib.widgets import MultiCursor from pylab import figure, show, pi, arange, sin t = arange(0.0, 2.0, 0.01) s1 = sin(2*pi*t) s2 = sin(4*pi*t) fig = figure() ax1 = fig.add_subplot(211) ax1.plot(t, s1) ax2 = fig.add_subplot(212, sharex=ax1) ax2.plot(t, s2) multi = MultiCursor(fig.canvas, (ax1, ax2), color='...
[ "pylab.show", "pylab.arange", "pylab.sin", "matplotlib.widgets.MultiCursor", "pylab.figure" ]
[((96, 118), 'pylab.arange', 'arange', (['(0.0)', '(2.0)', '(0.01)'], {}), '(0.0, 2.0, 0.01)\n', (102, 118), False, 'from pylab import figure, show, pi, arange, sin\n'), ((124, 139), 'pylab.sin', 'sin', (['(2 * pi * t)'], {}), '(2 * pi * t)\n', (127, 139), False, 'from pylab import figure, show, pi, arange, sin\n'), ((...
import json import logging import time from app.models import Url, Domain, AtsException from app.tlsanalyzer.analyzer import Analyzer from app.tlsanalyzer.collector import Collector class App: def __init__(self, work_dir, output_file, rescan_urls, db, cleanup): self.work_dir = work_dir self.outp...
[ "app.tlsanalyzer.analyzer.Analyzer", "json.dumps", "time.time", "logging.info", "app.models.AtsException.query.filter_by", "app.models.Domain.query.all", "app.models.AtsException", "app.tlsanalyzer.collector.Collector", "app.models.AtsException.query.all", "app.models.Url.query.all" ]
[((579, 590), 'time.time', 'time.time', ([], {}), '()\n', (588, 590), False, 'import time\n'), ((611, 635), 'app.tlsanalyzer.collector.Collector', 'Collector', (['self.work_dir'], {}), '(self.work_dir)\n', (620, 635), False, 'from app.tlsanalyzer.collector import Collector\n'), ((2461, 2477), 'logging.info', 'logging.i...
import json import os import dydx.constants as consts from web3 import Web3 class Eth(object): def __init__( self, node, private_key, public_address, account_number ): self.web3 = Web3(None if node is None else Web3.HTTPProvider(node)) self.private_key ...
[ "web3.Web3.HTTPProvider", "os.path.abspath", "os.path.join" ]
[((4686, 4711), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (4701, 4711), False, 'import os\n'), ((270, 293), 'web3.Web3.HTTPProvider', 'Web3.HTTPProvider', (['node'], {}), '(node)\n', (287, 293), False, 'from web3 import Web3\n'), ((4812, 4848), 'os.path.join', 'os.path.join', (['this_fol...
import os import unittest import cv2 import sys import numpy as np from src.models.storage.frame import Frame from src.models.storage.batch import FrameBatch from src.udfs.depth_estimation.depth_estimator import DepthEstimator from src.utils.frame_filter_util import FrameFilter class DepthEstimatorTest(u...
[ "os.path.abspath", "numpy.array_equal", "src.utils.frame_filter_util.FrameFilter", "cv2.cvtColor", "numpy.random.rand", "unittest.skip", "cv2.imread", "src.udfs.depth_estimation.depth_estimator.DepthEstimator", "os.path.join", "src.models.storage.batch.FrameBatch" ]
[((2565, 2626), 'unittest.skip', 'unittest.skip', (['"""need correction in depth mask initialization"""'], {}), "('need correction in depth mask initialization')\n", (2578, 2626), False, 'import unittest\n'), ((1029, 1045), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (1039, 1045), False, 'import cv2\n'), ((...
# -*- coding: utf-8 -*- """ response status component module. """ from pyrin.application.decorators import component from pyrin.application.structs import Component from pyrin.processor.response.status import ResponseStatusPackage from pyrin.processor.response.status.manager import ResponseStatusManager @component(R...
[ "pyrin.application.decorators.component" ]
[((309, 356), 'pyrin.application.decorators.component', 'component', (['ResponseStatusPackage.COMPONENT_NAME'], {}), '(ResponseStatusPackage.COMPONENT_NAME)\n', (318, 356), False, 'from pyrin.application.decorators import component\n')]
"""vcrpy integration helpers.""" import os import unittest import vcr CASSETTE_LIB = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'cassettes') assert os.path.isdir(CASSETTE_LIB), "Cassette library not found." RECORD_MODE = 'none' class VCRHelper(unittest.TestCase): filter_headers = [ ...
[ "os.path.isdir", "os.path.realpath", "vcr.VCR" ]
[((172, 199), 'os.path.isdir', 'os.path.isdir', (['CASSETTE_LIB'], {}), '(CASSETTE_LIB)\n', (185, 199), False, 'import os\n'), ((123, 149), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (139, 149), False, 'import os\n'), ((1360, 1379), 'vcr.VCR', 'vcr.VCR', ([], {}), '(**defaults)\n', (136...
import torch from .untargeted_batch_l1_gradient_descent import * class UntargetedBatchL1ClippedGradientDescent(UntargetedBatchL1GradientDescent): """ Implementation of untargetetd PGD attack. """ # For L_1 norm, the norm should be weighted smaller. # This means, weighting the objective and bound ...
[ "torch.max", "torch.min" ]
[((1957, 2026), 'torch.min', 'torch.min', (['(self.max_bound - self.images.data)', 'self.perturbations.data'], {}), '(self.max_bound - self.images.data, self.perturbations.data)\n', (1966, 2026), False, 'import torch\n'), ((2112, 2181), 'torch.max', 'torch.max', (['(self.min_bound - self.images.data)', 'self.perturbati...
import pyglet as pg from core.math import Rect from core.event import EventHandler class Widget(EventHandler): """Base class for all widgets""" def __init__(self, *args, **kwargs): super().__init__() self.parent = None # -- position attributes self._x = kwargs.get("x", 0) ...
[ "core.math.Rect", "pyglet.graphics.Batch", "pyglet.graphics.OrderedGroup" ]
[((1030, 1046), 'core.math.Rect', 'Rect', (['(0)', '(0)', '(1)', '(1)'], {}), '(0, 0, 1, 1)\n', (1034, 1046), False, 'from core.math import Rect\n'), ((1119, 1138), 'pyglet.graphics.Batch', 'pg.graphics.Batch', ([], {}), '()\n', (1136, 1138), True, 'import pyglet as pg\n'), ((1182, 1209), 'pyglet.graphics.OrderedGroup'...
# -*- coding: utf-8 -*- """Entrypoint for AWS Lambda function """ import logging import os from libs.submission_moderator_app import main from libs.shared.authpraw import get_datascience_bot import libs.shared.logging libs.shared.logging.basicConfig() logger = logging.getLogger(__name__) def lambda_handler(event, ...
[ "libs.submission_moderator_app.main", "libs.shared.authpraw.get_datascience_bot", "os.getenv", "logging.getLogger" ]
[((264, 291), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (281, 291), False, 'import logging\n'), ((342, 363), 'libs.shared.authpraw.get_datascience_bot', 'get_datascience_bot', ([], {}), '()\n', (361, 363), False, 'from libs.shared.authpraw import get_datascience_bot\n'), ((385, 412),...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import configparser import csv import logging import os import pathlib import re import subprocess import sys import time import tkinter as tk import tkinter.filedialog as filedialog from tkinter import font, messagebox, ttk import psutil class Config(configparser.Confi...
[ "tkinter.StringVar", "tkinter.filedialog.asksaveasfilename", "tkinter.font.Font", "logging.Formatter", "pathlib.Path", "os.path.join", "csv.DictWriter", "tkinter.ttk.Separator", "logging.FileHandler", "subprocess.STARTUPINFO", "tkinter.filedialog.askopenfilename", "re.findall", "tkinter.ttk....
[((20176, 20199), 'pathlib.Path', 'pathlib.Path', (['file_path'], {}), '(file_path)\n', (20188, 20199), False, 'import pathlib\n'), ((1145, 1175), 'logging.FileHandler', 'logging.FileHandler', (['self.file'], {}), '(self.file)\n', (1164, 1175), False, 'import logging\n'), ((1238, 1311), 'logging.Formatter', 'logging.Fo...
from django.core.files import File from django import http BUILTIN_MEDIA_TYPES = dict() class MediaType(object): recognized_media_types = [] @classmethod def register_with_builtins(cls): for media_type in cls.recognized_media_types: BUILTIN_MEDIA_TYPES[media_type] = cls ...
[ "django.http.HttpResponse" ]
[((1634, 1653), 'django.http.HttpResponse', 'http.HttpResponse', ([], {}), '()\n', (1651, 1653), False, 'from django import http\n')]
#!/usr/bin/python import socket import cv2 import numpy as np import torch import torchvision.transforms as transforms from DETR import build_model import yaml import os import time import json import torch.nn.functional as F import torch.nn as nn import time import pickle import struct from pathlib import Path from s...
[ "yaml.load", "torch.stack", "torch.load", "socket.socket", "DETR.build_model", "pathlib.Path", "torch.cuda.is_available", "torchvision.transforms.Normalize", "torch.tensor", "torchvision.transforms.ToTensor" ]
[((415, 428), 'DETR.build_model', 'build_model', ([], {}), '()\n', (426, 428), False, 'from DETR import build_model\n'), ((446, 502), 'torch.load', 'torch.load', (["params['is_weight_path']"], {'map_location': '"""cpu"""'}), "(params['is_weight_path'], map_location='cpu')\n", (456, 502), False, 'import torch\n'), ((784...
from django.conf.urls import url, include urlpatterns = [ url(r"^", include("pinax.referrals.urls")), ]
[ "django.conf.urls.include" ]
[((73, 104), 'django.conf.urls.include', 'include', (['"""pinax.referrals.urls"""'], {}), "('pinax.referrals.urls')\n", (80, 104), False, 'from django.conf.urls import url, include\n')]
import dota2api import json import numpy as np import csv fo=open("steam_api_key.txt","r") steam_api_key=fo.read() fo.close() fo=open("our_ids.txt","r") we_list=fo.readlines() fo.close() for i in range(0,len(we_list)): we_list[i]=int(we_list[i]) fo=open("id_name.json","r") id_name_dic=json.loads(fo.read()) fo.clo...
[ "dota2api.Initialise", "csv.writer", "json.dumps" ]
[((412, 446), 'dota2api.Initialise', 'dota2api.Initialise', (['steam_api_key'], {}), '(steam_api_key)\n', (431, 446), False, 'import dota2api\n'), ((983, 997), 'csv.writer', 'csv.writer', (['fo'], {}), '(fo)\n', (993, 997), False, 'import csv\n'), ((2287, 2314), 'json.dumps', 'json.dumps', (['already_id_list'], {}), '(...
import logging from flask import Flask, g from backend.utils.checks import get_checks from backend.database.objects import Player logger = logging.getLogger(__name__) def create_jinja_globals(app: Flask, global_object): is_admin, is_alpha, is_beta = get_checks(global_object) app.jinja_env.globals.update(i...
[ "logging.getLogger", "backend.utils.checks.get_checks" ]
[((142, 169), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (159, 169), False, 'import logging\n'), ((259, 284), 'backend.utils.checks.get_checks', 'get_checks', (['global_object'], {}), '(global_object)\n', (269, 284), False, 'from backend.utils.checks import get_checks\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "square", help="display a square of a given number", type=int ) args = parser.parse_args() print(args.square ** 2)
[ "argparse.ArgumentParser" ]
[((109, 134), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (132, 134), False, 'import argparse\n')]
#!/usr/bin/env python from distutils.core import setup with open('README.txt') as file: long_description = file.read() setup( name='rsonlite', version='0.1.0', description='rsonlite -- extremely lightweight version of rson', long_description=long_description, author='<NAME>', author_email...
[ "distutils.core.setup" ]
[((126, 851), 'distutils.core.setup', 'setup', ([], {'name': '"""rsonlite"""', 'version': '"""0.1.0"""', 'description': '"""rsonlite -- extremely lightweight version of rson"""', 'long_description': 'long_description', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'platforms': '"""Independent"""', 'url': '...
"""GraphQL tests.""" from django.contrib.auth import get_user_model from django.test import TestCase, override_settings from nautobot.core.graphql import execute_query from nautobot.utilities.testing.utils import create_test_user from nautobot.circuits.models import Circuit, CircuitType, Provider from nautobot_circuit...
[ "nautobot.core.graphql.execute_query", "nautobot_circuit_maintenance.models.CircuitMaintenance.objects.bulk_create", "nautobot.circuits.models.CircuitType", "nautobot.circuits.models.Circuit", "nautobot_circuit_maintenance.models.CircuitImpact.objects.bulk_create", "django.contrib.auth.get_user_model", ...
[((440, 456), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (454, 456), False, 'from django.contrib.auth import get_user_model\n'), ((2335, 2383), 'django.test.override_settings', 'override_settings', ([], {'EXEMPT_VIEW_PERMISSIONS': "['*']"}), "(EXEMPT_VIEW_PERMISSIONS=['*'])\n", (2352, 238...
"""Facility is published Revision ID: 430e5b9bee56 Revises: <KEY> Create Date: 2014-04-07 12:44:33.761038 """ # revision identifiers, used by Alembic. revision = '430e5b9bee56' down_revision = '<KEY>' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column("facilities", sa.Column('is_publi...
[ "sqlalchemy.Boolean", "sqlalchemy.schema.DefaultClause" ]
[((327, 339), 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), '()\n', (337, 339), True, 'import sqlalchemy as sa\n'), ((372, 400), 'sqlalchemy.schema.DefaultClause', 'sa.schema.DefaultClause', (['"""1"""'], {}), "('1')\n", (395, 400), True, 'import sqlalchemy as sa\n')]
import logging # Configure logging console = logging.StreamHandler() console.setFormatter(logging.Formatter('%(asctime)s %(levelname)s [%(name)s]: %(message)s', "%Y-%m-%d %H:%M:%S")) root = logging.getLogger() root.handlers.clear() root.addHandler(console) # Configure logglevels logging.getLogger().setLevel(logging.I...
[ "logging.Formatter", "logging.StreamHandler", "logging.getLogger" ]
[((46, 69), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (67, 69), False, 'import logging\n'), ((191, 210), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (208, 210), False, 'import logging\n'), ((91, 186), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s %(levelname)s [%(...
import pandas as pd import tensorflow as tf import numpy as np def to_cat_codes(df, col): """ """ df[col] = pd.Categorical(df[col]) return df[col].cat.codes def convert_cols(df, columns): """ """ for col in columns: df[col] = to_cat_codes(df, col) return df def parse_shot...
[ "tensorflow.keras.layers.Dense", "pandas.read_csv", "tensorflow.load", "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.data.Dataset.from_tensor_slices", "pandas.Categorical" ]
[((123, 146), 'pandas.Categorical', 'pd.Categorical', (['df[col]'], {}), '(df[col])\n', (137, 146), True, 'import pandas as pd\n'), ((1060, 1090), 'pandas.read_csv', 'pd.read_csv', (['"""./data/test.csv"""'], {}), "('./data/test.csv')\n", (1071, 1090), True, 'import pandas as pd\n'), ((1102, 1133), 'pandas.read_csv', '...
#!/usr/bin/env python """ SWIG generation server. Listens for connections from swig generation clients and runs swig in the requested fashion, sending back the results. """ # Future imports from __future__ import absolute_import from __future__ import print_function # Python modules import argparse import io import...
[ "io.BytesIO", "logging.error", "logging.debug", "os.makedirs", "shutil.rmtree", "socket.socket", "tempfile.gettempdir", "logging.info", "select.select", "tempfile.mkdtemp", "traceback.format_exc", "lldbsuite.support.sockutil.recvall", "io.open", "lldbsuite.support.fs.find_executable", "o...
[((1060, 1095), 'logging.debug', 'logging.debug', (['"""Creating socket..."""'], {}), "('Creating socket...')\n", (1073, 1095), False, 'import logging\n'), ((1104, 1153), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (1117, 1153), False, 'imp...
from __future__ import print_function, division import os import torch import numpy as np from torch.utils.data import Dataset, DataLoader import Options import cv2 import shutil config = Options.Config() def find_classes(dir, config=config): classes = [str(d) for d in range(config.label_size)] class_to_idx =...
[ "os.path.join", "Options.Config", "os.path.isdir", "cv2.cvtColor", "numpy.fromfile", "numpy.zeros", "os.path.exists", "cv2.imread", "numpy.fliplr", "numpy.random.randint", "numpy.arange", "numpy.mean", "numpy.loadtxt", "shutil.rmtree", "os.path.expanduser", "os.listdir" ]
[((188, 204), 'Options.Config', 'Options.Config', ([], {}), '()\n', (202, 204), False, 'import Options\n'), ((485, 508), 'os.path.expanduser', 'os.path.expanduser', (['dir'], {}), '(dir)\n', (503, 508), False, 'import os\n'), ((1219, 1235), 'numpy.arange', 'np.arange', (['(2)', '(27)'], {}), '(2, 27)\n', (1228, 1235), ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-28 02:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='City',...
[ "django.db.models.CharField", "django.db.models.DecimalField", "django.db.models.IntegerField", "django.db.models.AutoField" ]
[((365, 458), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (381, 458), False, 'from django.db import migrations, models\...
from coche import Coche carro = Coche('Verde', 'Renault', 'Sandero', '200', '150') carro.getInfo() if type(carro) == Coche: print("Es un objeto correcto !!") else: print("No es un objeto !!")
[ "coche.Coche" ]
[((33, 83), 'coche.Coche', 'Coche', (['"""Verde"""', '"""Renault"""', '"""Sandero"""', '"""200"""', '"""150"""'], {}), "('Verde', 'Renault', 'Sandero', '200', '150')\n", (38, 83), False, 'from coche import Coche\n')]
# ██╗ ██╗██████╗ ███╗ ███╗███████╗ █████╗ ██╗ # ██║ ██║██╔══██╗████╗ ████║██╔════╝██╔══██╗██║ # ███████║██║ ██║██╔████╔██║█████╗ ███████║██║ # ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ██╔══██║██║ # ██║ ██║██████╔╝██║ ╚═╝ ██║███████╗██║ ██║███████╗ # ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝ # Copyright 2019...
[ "modules.log.err", "json.dump", "json.load", "json.loads", "hashlib.sha256", "requests.post", "modules.log.info", "os.getenv" ]
[((544, 570), 'os.getenv', 'os.getenv', (['"""SERVER_SECRET"""'], {}), "('SERVER_SECRET')\n", (553, 570), False, 'import os\n'), ((590, 619), 'os.getenv', 'os.getenv', (['"""RECAPTCHA_SECRET"""'], {}), "('RECAPTCHA_SECRET')\n", (599, 619), False, 'import os\n'), ((675, 754), 'modules.log.info', 'log.info', (["('[#%s] g...
from concurrent import futures from copy import deepcopy import nifty.tools as nt import numpy as np import torch from tqdm import tqdm from ..transform.raw import standardize def _load_block(input_, offset, block_shape, halo, padding_mode="reflect", with_channels=False): shape = input_.shape if with_channe...
[ "numpy.pad", "copy.deepcopy", "numpy.zeros", "nifty.tools.blocking", "torch.device", "concurrent.futures.ThreadPoolExecutor", "torch.no_grad", "torch.from_numpy" ]
[((3601, 3644), 'nifty.tools.blocking', 'nt.blocking', (['([0] * ndim)', 'shape', 'block_shape'], {}), '([0] * ndim, shape, block_shape)\n', (3612, 3644), True, 'import nifty.tools as nt\n'), ((1621, 1663), 'numpy.pad', 'np.pad', (['data', 'pad_width'], {'mode': 'padding_mode'}), '(data, pad_width, mode=padding_mode)\n...
# -*- coding: utf-8 -*- """One-class SVM detector. Implemented on scikit-learn library. """ # Author: <NAME> <<EMAIL>> # License: BSD 2 clause from __future__ import division from __future__ import print_function from sklearn.svm import OneClassSVM from sklearn.utils.validation import check_is_fitted from sklearn.uti...
[ "sklearn.utils.check_array", "sklearn.svm.OneClassSVM", "sklearn.utils.validation.check_is_fitted" ]
[((5306, 5320), 'sklearn.utils.check_array', 'check_array', (['X'], {}), '(X)\n', (5317, 5320), False, 'from sklearn.utils import check_array\n'), ((5378, 5600), 'sklearn.svm.OneClassSVM', 'OneClassSVM', ([], {'kernel': 'self.kernel', 'degree': 'self.degree', 'gamma': 'self.gamma', 'coef0': 'self.coef0', 'tol': 'self.t...
# Generated by Django 3.2.9 on 2021-12-05 06:53 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('products', '0004_alter_product_categories'), migrations.swappable_dependency(settin...
[ "django.db.models.ForeignKey", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((282, 339), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (313, 339), False, 'from django.db import migrations, models\n'), ((515, 659), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'n...
import pathlib import setuptools package_name = 'pandas_dtype_efficiency' version = '0.0.1' # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() setuptools.setup( author="<NAME>", author_email='<EMAIL>', classif...
[ "pathlib.Path", "setuptools.setup" ]
[((242, 1029), 'setuptools.setup', 'setuptools.setup', ([], {'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'classifiers': "['Development Status :: 3 - Alpha', 'Intended Audience :: Developers',\n 'Programming Language :: Python :: 3',\n 'Programming Language :: Python :: 3.7',\n 'Topic :: Scientif...
# -*- coding: utf-8 -*- """ Created on Fri Sep 1 19:11:52 2017 @author: mariapanteli """ import pytest import numpy as np import os import scripts.OPMellin as OPMellin opm = OPMellin.OPMellin() TEST_AUDIO_FILE = os.path.join(os.path.dirname(__file__), 'data', 'mel_1_2_1.wav') def test_load_audiofile(): audi...
[ "os.path.dirname", "numpy.round", "scripts.OPMellin.OPMellin" ]
[((181, 200), 'scripts.OPMellin.OPMellin', 'OPMellin.OPMellin', ([], {}), '()\n', (198, 200), True, 'import scripts.OPMellin as OPMellin\n'), ((232, 257), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (247, 257), False, 'import os\n'), ((1222, 1286), 'numpy.round', 'np.round', (['((opm.melsp...
from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static from django.contrib import admin urlpatterns = [ path('', views.gallery, name='gallery'), path('photo/<str:pk>/', views.viewPhoto, name='photo'), path('add/', views.addPhoto, name='a...
[ "django.conf.urls.static.static", "django.urls.path" ]
[((179, 218), 'django.urls.path', 'path', (['""""""', 'views.gallery'], {'name': '"""gallery"""'}), "('', views.gallery, name='gallery')\n", (183, 218), False, 'from django.urls import path\n'), ((224, 278), 'django.urls.path', 'path', (['"""photo/<str:pk>/"""', 'views.viewPhoto'], {'name': '"""photo"""'}), "('photo/<s...
from dataclasses import dataclass from enum import Enum, auto from dekespo_ai_sdk.core.dimensions import Dim2D from dekespo_ai_sdk.core.graph import Graph from dekespo_ai_sdk.core.disjoint_set import DisjointSet from dekespo_ai_sdk.core.neighbour import NeighbourData, NeighbourType class ConnectivityType(Enum): ...
[ "dekespo_ai_sdk.core.dimensions.Dim2D", "dekespo_ai_sdk.core.neighbour.NeighbourData", "dekespo_ai_sdk.core.disjoint_set.DisjointSet", "dekespo_ai_sdk.core.disjoint_set.DisjointSet.Element", "enum.auto" ]
[((327, 333), 'enum.auto', 'auto', ([], {}), '()\n', (331, 333), False, 'from enum import Enum, auto\n'), ((346, 352), 'enum.auto', 'auto', ([], {}), '()\n', (350, 352), False, 'from enum import Enum, auto\n'), ((832, 845), 'dekespo_ai_sdk.core.disjoint_set.DisjointSet', 'DisjointSet', ([], {}), '()\n', (843, 845), Fal...
# -*- coding: utf-8 -*- # Copyright (c) 2021-2021 the DerivX authors # All rights reserved. # # The project sponsor and lead author is <NAME>. # E-mail: <EMAIL>, QQ: 277195007, WeChat: xrd_ustc # See the contributors file for names of other contributors. # # Commercial use of this code in source and binary forms is #...
[ "pandas.DataFrame", "numpy.meshgrid", "matplotlib.pyplot.show", "mpl_toolkits.mplot3d.Axes3D", "matplotlib.pyplot.get_cmap", "numpy.zeros", "derivx.Barrier", "matplotlib.pyplot.figure", "numpy.arange", "numpy.array" ]
[((2501, 2513), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (2511, 2513), True, 'import matplotlib.pyplot as plt\n'), ((2523, 2537), 'mpl_toolkits.mplot3d.Axes3D', 'Axes3D', (['figure'], {}), '(figure)\n', (2529, 2537), False, 'from mpl_toolkits.mplot3d import Axes3D\n'), ((2624, 2657), 'numpy.arange', ...
import json import os def add_dragonborn_data(race_data): if debug: print("Adding class data: Dragonborn") # Features determined by racial traits features = [ "Dragonic Ancestry", "Breath Weapon", "Damage Resistance" ] if debug: print("{} {}".format(len(fea...
[ "json.dump", "os.mkdir" ]
[((6837, 6857), 'os.mkdir', 'os.mkdir', (['"""../data/"""'], {}), "('../data/')\n", (6845, 6857), False, 'import os\n'), ((6948, 6982), 'json.dump', 'json.dump', (['data', 'outfile'], {'indent': '(4)'}), '(data, outfile, indent=4)\n', (6957, 6982), False, 'import json\n')]
from django.conf.urls import patterns, url, include from rest_framework import routers import views as chat_views router = routers.SimpleRouter() router.register(r'room', chat_views.RoomViewSet) router.register(r'message', chat_views.MessageViewSet) router_patterns = patterns('', url(r'^api/', include(router.urls...
[ "django.conf.urls.include", "django.conf.urls.url", "rest_framework.routers.SimpleRouter" ]
[((124, 146), 'rest_framework.routers.SimpleRouter', 'routers.SimpleRouter', ([], {}), '()\n', (144, 146), False, 'from rest_framework import routers\n'), ((366, 425), 'django.conf.urls.url', 'url', (['"""^room/(?P<slug>[0-9a-zA-Z_-]+)$"""', 'chat_views.get_room'], {}), "('^room/(?P<slug>[0-9a-zA-Z_-]+)$', chat_views.g...