code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from imp.better import BetterInteraction from discord import app_commands from imp.better import errors def IsHost(message: str = None): message = message or "You must be a game host for this." async def predicate(interaction: BetterInteraction): fulfilled = interaction.client.game_manager.is_host(in...
[ "imp.better.errors.GameCheckError", "discord.app_commands.check", "imp.better.errors.HostCheckError", "imp.better.errors.ParticipantCheckError", "imp.better.errors.PlayerTurnCheckError" ]
[((576, 605), 'discord.app_commands.check', 'app_commands.check', (['predicate'], {}), '(predicate)\n', (594, 605), False, 'from discord import app_commands\n'), ((1087, 1116), 'discord.app_commands.check', 'app_commands.check', (['predicate'], {}), '(predicate)\n', (1105, 1116), False, 'from discord import app_command...
from unittest import TestLoader, TextTestRunner if __name__ == "__main__": loader = TestLoader() tests = loader.discover('.') testRunner = TextTestRunner() test_results = testRunner.run(tests) if len(test_results.errors) > 0: exit(1)
[ "unittest.TextTestRunner", "unittest.TestLoader" ]
[((89, 101), 'unittest.TestLoader', 'TestLoader', ([], {}), '()\n', (99, 101), False, 'from unittest import TestLoader, TextTestRunner\n'), ((152, 168), 'unittest.TextTestRunner', 'TextTestRunner', ([], {}), '()\n', (166, 168), False, 'from unittest import TestLoader, TextTestRunner\n')]
import time, subprocess, os.path, re, multiprocessing, threading from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait class Kink: driver = None dispatcher_thread ...
[ "subprocess.run", "time.sleep", "multiprocessing.Pool", "threading.Thread", "re.subn" ]
[((539, 579), 'threading.Thread', 'threading.Thread', ([], {'target': 'self.__dispatch'}), '(target=self.__dispatch)\n', (555, 579), False, 'import time, subprocess, os.path, re, multiprocessing, threading\n'), ((2584, 2597), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (2594, 2597), False, 'import time, subproc...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import uuid from indico.util.locators import locator_property fr...
[ "indico.util.string.format_repr", "uuid.uuid4" ]
[((939, 980), 'indico.util.string.format_repr', 'format_repr', (['self', '"""id"""'], {'_text': 'self.title'}), "(self, 'id', _text=self.title)\n", (950, 980), False, 'from indico.util.string import format_repr, return_ascii\n'), ((593, 605), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (603, 605), False, 'import uuid...
import traceback from alog import debug, info, error from mykonos.core.core import Core from mykonos.keywords.management_device import ManagementDevice from mykonos.keywords.decorators import Parallel class LocatorElement(Core): def __init__(self): self.device_mobile = self.device() self.manageme...
[ "mykonos.keywords.management_device.ManagementDevice" ]
[((332, 350), 'mykonos.keywords.management_device.ManagementDevice', 'ManagementDevice', ([], {}), '()\n', (348, 350), False, 'from mykonos.keywords.management_device import ManagementDevice\n')]
import abc from typing import NewType from copy import copy def _(): # make the registered classes variable invisible __registered_classes = [] def _register(cls): if hasattr(cls, 'do_turn'): print(f'registering {cls.__name__}...') __registered_classes.append(cls) els...
[ "copy.copy" ]
[((448, 474), 'copy.copy', 'copy', (['__registered_classes'], {}), '(__registered_classes)\n', (452, 474), False, 'from copy import copy\n')]
"""Serializer de los miembros de un grupo familiar""" # Django REST Framework from rest_framework import serializers # Serializers from apis.users.serializers import UserModelSerializer from apis.pacient.serializers import PacientModelSerializer # Models from apis.family_group.models import Memberships class Membe...
[ "apis.pacient.serializers.PacientModelSerializer", "apis.family_group.models.Memberships.objects.filter", "rest_framework.serializers.ValidationError", "rest_framework.serializers.StringRelatedField", "apis.users.serializers.UserModelSerializer", "apis.family_group.models.Memberships.objects.create", "r...
[((447, 482), 'apis.users.serializers.UserModelSerializer', 'UserModelSerializer', ([], {'read_only': '(True)'}), '(read_only=True)\n', (466, 482), False, 'from apis.users.serializers import UserModelSerializer\n'), ((503, 535), 'rest_framework.serializers.StringRelatedField', 'serializers.StringRelatedField', ([], {})...
import requests import argparse import sys import os import urllib3 import random def user_agent(): useragent = [ "Mozilla/5.0 CK={ } (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/7...
[ "os.system", "random.choice", "argparse.ArgumentParser" ]
[((1677, 1851), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Send request to a website using proxies to check if it\'s online How to: python proxyon.py proxies.txt https://www.google.com/"""'}), '(description=\n "Send request to a website using proxies to check if it\'s online How t...
import pyFT.FTError import datetime as dt strfRFC3339 = '%Y-%m-%dT%H:%M:%S.000Z' def FTdateTime(val): return dt.datetime.strftime(val,strfRFC3339)
[ "datetime.datetime.strftime" ]
[((116, 154), 'datetime.datetime.strftime', 'dt.datetime.strftime', (['val', 'strfRFC3339'], {}), '(val, strfRFC3339)\n', (136, 154), True, 'import datetime as dt\n')]
#for data cleaning and analysis import pandas as pd import numpy as np from random import randint #for visualization import matplotlib.pyplot as plt import seaborn as sns #for directory-related functions import os import glob import getpass #for web-scraping baseball data import pybaseball as pyb #for drafting ...
[ "tkinter.Button", "math.log", "numpy.array", "tkinter.Label", "getpass.getuser", "sklearn.cluster.MeanShift", "pandas.ExcelWriter", "pandas.date_range", "numpy.mean", "tkinter.Entry", "random.choice", "pybaseball.chadwick_register", "pandas.merge", "numpy.std", "datetime.date.today", "...
[((718, 751), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (741, 751), False, 'import warnings\n'), ((861, 868), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (866, 868), True, 'import tkinter as tk\n'), ((983, 1054), 'tkinter.Label', 'tk.Label', (['root'], {'text': '"""Choos...
from Oddschecker.Event import * from Oddschecker import Tools as tl from Oddschecker.Line import * from Oddschecker.LineStorage import * from typing import List import pprint pp = pprint.PrettyPrinter(indent=4) class LineAggregator: def __init__(self, event: Event, market_to_line_class: dict, sportsbook_codes: L...
[ "Oddschecker.Tools.get_json_dict", "pprint.PrettyPrinter" ]
[((181, 211), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (201, 211), False, 'import pprint\n'), ((354, 422), 'Oddschecker.Tools.get_json_dict', 'tl.get_json_dict', (["(event.base_url + event.main_market_url + '?ajax=1')"], {}), "(event.base_url + event.main_market_url + '?a...
#!/usr/bin/python # -*- coding: utf-8 -*- # This file was created using the DirectGUI Designer from direct.gui import DirectGuiGlobals as DGG from direct.gui.DirectFrame import DirectFrame from DirectGuiExtension.DirectAutoSizer import DirectAutoSizer from DirectGuiExtension.DirectBoxSizer import DirectBoxSizer from...
[ "panda3d.core.LVecBase3f", "direct.showbase.ShowBase.ShowBase", "panda3d.core.LVecBase4f", "panda3d.core.LPoint3f" ]
[((2399, 2409), 'direct.showbase.ShowBase.ShowBase', 'ShowBase', ([], {}), '()\n', (2407, 2409), False, 'from direct.showbase.ShowBase import ShowBase\n'), ((778, 797), 'panda3d.core.LVecBase3f', 'LVecBase3f', (['(0)', '(0)', '(0)'], {}), '(0, 0, 0)\n', (788, 797), False, 'from panda3d.core import LPoint3f, LVecBase3f,...
import torch import torch.nn as nn import torch.nn.functional as F from torchvision.models import resnet18, vgg16_bn import omni_torch.networks.blocks as block import researches.img2img.probaV_SR.pvsr_module as module class CARN(nn.Module): def __init__(self, inchannel, filters, scale, BN=nn.BatchNorm2d, s_MSE=Fa...
[ "researches.img2img.probaV_SR.pvsr_module.CarnBlock", "torch.nn.ReLU", "torch.nn.Sequential", "torch.nn.L1Loss", "torch.nn.MSELoss", "torch.bmm", "researches.img2img.probaV_SR.pvsr_module.BasicBlock", "omni_torch.networks.blocks.conv_block", "torchvision.models.vgg16_bn", "torch.randn", "researc...
[((15513, 15541), 'torch.randn', 'torch.randn', (['(3)', '(10)', '(128)', '(128)'], {}), '(3, 10, 128, 128)\n', (15524, 15541), False, 'import torch\n'), ((15551, 15579), 'torch.randn', 'torch.randn', (['(3)', '(64)', '(384)', '(384)'], {}), '(3, 64, 384, 384)\n', (15562, 15579), False, 'import torch\n'), ((15633, 1565...
#!/usr/bin/env python3 import functools import itertools import operator import re class _Topic: def __init__(self, mediator): self._mediator = mediator def _get_published_data_for_topic(self, topic): return [publisher(topic) for publisher in self._mediator._get_publishers_for_topic(topic)] ...
[ "re.compile" ]
[((8155, 8183), 're.compile', 're.compile', (['"""astr|aint|adex"""'], {}), "('astr|aint|adex')\n", (8165, 8183), False, 'import re\n'), ((9606, 9627), 're.compile', 're.compile', (['"""adex_.+"""'], {}), "('adex_.+')\n", (9616, 9627), False, 'import re\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2019-01-20 12:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("crm", "0016_profile")] operations = [ migrations.AddField( model_name="prof...
[ "django.db.models.TextField" ]
[((376, 417), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': "b''"}), "(blank=True, default=b'')\n", (392, 417), False, 'from django.db import migrations, models\n')]
# MIT License # # Copyright (c) 2018 <NAME> # # 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, merge...
[ "null_api.Null.__init__", "hdaparmutils.promoteParm", "hou.undos.group" ]
[((1357, 1393), 'hou.undos.group', 'hou.undos.group', (['"""Create FK control"""'], {}), "('Create FK control')\n", (1372, 1393), False, 'import hou\n'), ((1574, 1608), 'null_api.Null.__init__', 'null_api.Null.__init__', (['self', 'node'], {}), '(self, node)\n', (1596, 1608), False, 'import null_api\n'), ((2889, 2958),...
import time import json import os class LimitExceeded(RuntimeError): pass class ServerError(RuntimeError): pass class WebAPI: """""" URL = '' def __init__(self, name): # 100,000 API calls per day. # 1 request per second # 60 request per minute self.max_api_call...
[ "os.path.expanduser", "time.sleep", "json.load", "time.time", "json.dump" ]
[((583, 631), 'os.path.expanduser', 'os.path.expanduser', (['f"""~/.config/api/{self.name}"""'], {}), "(f'~/.config/api/{self.name}')\n", (601, 631), False, 'import os\n'), ((979, 1015), 'os.path.expanduser', 'os.path.expanduser', (['f"""~/.config/api"""'], {}), "(f'~/.config/api')\n", (997, 1015), False, 'import os\n'...
from math import ceil from PySide2.QtCore import QRect, QSize, Qt, QAbstractTableModel, QMimeData, QByteArray from PySide2.QtGui import QPainter, QStandardItemModel, QStandardItem, QPen from PySide2.QtWidgets import * from models.constants import PropType, MimeType from views.draftbar_element_view_ui import Ui_DraftE...
[ "PySide2.QtCore.QMimeData", "views.draftbar_element_view_ui.Ui_DraftElement", "PySide2.QtCore.QSize" ]
[((756, 773), 'views.draftbar_element_view_ui.Ui_DraftElement', 'Ui_DraftElement', ([], {}), '()\n', (771, 773), False, 'from views.draftbar_element_view_ui import Ui_DraftElement\n'), ((1590, 1623), 'PySide2.QtCore.QSize', 'QSize', (['ELEMENT_SIZE', 'ELEMENT_SIZE'], {}), '(ELEMENT_SIZE, ELEMENT_SIZE)\n', (1595, 1623),...
from django.test import TestCase from restclients.models.gws import GroupUser from restclients.exceptions import DataFailureException from restclients.gws import GWS from restclients.test import fdao_gws_override @fdao_gws_override class TestGwsTrumbaGroup(TestCase): def test_get_group(self): group = GWS...
[ "restclients.gws.GWS" ]
[((317, 322), 'restclients.gws.GWS', 'GWS', ([], {}), '()\n', (320, 322), False, 'from restclients.gws import GWS\n')]
from urllib.request import urlopen import json import requests from django.db import models from crypto.settings import env from django.db.utils import IntegrityError NOT_EXIST_ERROR = "Crypto with that name and currency does not exist in database" EXTERNAL_API_ERROR = "External api did not send correct response" NOT_E...
[ "django.db.models.FloatField", "urllib.request.urlopen", "requests.put", "crypto.settings.env", "django.db.models.Q", "crypto.models.Alert.Alert", "django.db.models.CharField" ]
[((695, 751), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)', 'null': '(False)', 'unique': '(True)'}), '(max_length=30, null=False, unique=True)\n', (711, 751), False, 'from django.db import models\n'), ((771, 799), 'django.db.models.FloatField', 'models.FloatField', ([], {'default': '(0)'...
from unittest import TestCase from parameterized import parameterized, parameterized_class, param # demonstration of wolever/parameterized # ref: https://github.com/wolever/parameterized # see-also: # - http://h-miyako.hatenablog.com/entry/2017/08/16/173000 # - https://qiita.com/nittyan/items/0152a3b93e17c177...
[ "parameterized.parameterized_class", "parameterized.param", "parameterized.parameterized.expand" ]
[((908, 1030), 'parameterized.parameterized_class', 'parameterized_class', (["[{'x': 1, 'y': 2, 'z': 3, 'expected': 6}, {'x': 10, 'y': 20, 'expected': \n 330}, {'expected': 600}]"], {}), "([{'x': 1, 'y': 2, 'z': 3, 'expected': 6}, {'x': 10, 'y':\n 20, 'expected': 330}, {'expected': 600}])\n", (927, 1030), False, ...
import unittest from datetime import datetime from bpl_lib.network.Network import Network from bpl_lib.time.Time import Time class TestTime(unittest.TestCase): def test_get_time_1(self): Network.use("mainnet") time = Time.get_time(datetime.utcfromtimestamp(1533122273)) self.assertIsNotNo...
[ "datetime.datetime.utcfromtimestamp", "bpl_lib.network.Network.Network.use", "unittest.main", "bpl_lib.time.Time.Time.get_slot_number", "bpl_lib.time.Time.Time.get_real_time", "bpl_lib.time.Time.Time.get_slot_time" ]
[((1271, 1286), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1284, 1286), False, 'import unittest\n'), ((202, 224), 'bpl_lib.network.Network.Network.use', 'Network.use', (['"""mainnet"""'], {}), "('mainnet')\n", (213, 224), False, 'from bpl_lib.network.Network import Network\n'), ((456, 478), 'bpl_lib.network.N...
from gevent import monkey, pool monkey.patch_all() import gevent import time from otils.oo import _OO import os class Worker(_OO): def __init__(self, handler, data, **kwargs): super(Worker, self).__init__() self.handler = handler self.data = data for k, v in kwargs...
[ "gevent.monkey.patch_all", "gevent.joinall", "gevent.pool.Pool", "os.getpid", "time.time" ]
[((35, 53), 'gevent.monkey.patch_all', 'monkey.patch_all', ([], {}), '()\n', (51, 53), False, 'from gevent import monkey, pool\n'), ((593, 607), 'gevent.pool.Pool', 'pool.Pool', (['num'], {}), '(num)\n', (602, 607), False, 'from gevent import monkey, pool\n'), ((683, 717), 'gevent.joinall', 'gevent.joinall', (['g'], {'...
# Generated by Django 3.0.8 on 2020-08-12 17:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('backend', '0017_particip...
[ "django.db.migrations.swappable_dependency", "django.db.models.ManyToManyField", "django.db.models.ForeignKey" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((477, 843), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'default': ...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
[ "importlib.import_module", "qtgallery.reset_qapp", "napari.settings.get_settings", "pathlib.Path" ]
[((4022, 4036), 'napari.settings.get_settings', 'get_settings', ([], {}), '()\n', (4034, 4036), False, 'from napari.settings import get_settings\n'), ((4080, 4121), 'qtgallery.reset_qapp', 'qtgallery.reset_qapp', (['gallery_conf', 'fname'], {}), '(gallery_conf, fname)\n', (4100, 4121), False, 'import qtgallery\n'), ((5...
from confluent_kafka import TopicPartition as GroupPartitionMetadata from confluent_kafka.admin import BrokerMetadata from confluent_kafka.admin import GroupMember as GroupMemberMetadata from confluent_kafka.admin import GroupMetadata, PartitionMetadata, TopicMetadata from kaskade.kafka.models import ( Broker, ...
[ "kaskade.kafka.models.Partition", "kaskade.kafka.models.GroupPartition", "kaskade.kafka.models.Broker", "kaskade.kafka.models.Topic", "kaskade.kafka.models.GroupMember" ]
[((466, 528), 'kaskade.kafka.models.Broker', 'Broker', ([], {'id': 'metadata.id', 'host': 'metadata.host', 'port': 'metadata.port'}), '(id=metadata.id, host=metadata.host, port=metadata.port)\n', (472, 528), False, 'from kaskade.kafka.models import Broker, Group, GroupMember, GroupPartition, Partition, Topic\n'), ((850...
# Evolutionary Learning Strategy Implementation # Learn more from https://blog.openai.com/evolution-strategies/ import gym import numpy as np from gym import wrappers # GLOBAL SETTINGS RNG_SEED = 8 ENVIRONMENT = "LunarLander-v2" POPULATION_SIZE = 100 # Population size GENERATION_LIMIT = 100 # Max number of generati...
[ "numpy.mean", "gym.upload", "numpy.argmax", "numpy.zeros", "numpy.matmul", "numpy.random.seed", "gym.wrappers.Monitor", "numpy.random.randn", "gym.make" ]
[((1961, 1982), 'gym.make', 'gym.make', (['ENVIRONMENT'], {}), '(ENVIRONMENT)\n', (1969, 1982), False, 'import gym\n'), ((2212, 2236), 'numpy.random.seed', 'np.random.seed', (['RNG_SEED'], {}), '(RNG_SEED)\n', (2226, 2236), True, 'import numpy as np\n'), ((2414, 2449), 'numpy.zeros', 'np.zeros', (['(input_size, output_...
import versioneer from setuptools import setup, find_packages import os DESCRIPTION = "Inference of transcription factor motif activity from single cell RNA-seq data." with open("README.md") as f: long_description = f.read() setup( name="pananse", version=versioneer.get_version(), long_description = ...
[ "setuptools.find_packages", "versioneer.get_version" ]
[((271, 295), 'versioneer.get_version', 'versioneer.get_version', ([], {}), '()\n', (293, 295), False, 'import versioneer\n'), ((547, 562), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (560, 562), False, 'from setuptools import setup, find_packages\n')]
## ## Software PI-Net: Pose Interacting Network for Multi-Person Monocular 3D Pose Estimation ## Copyright Inria and UPC ## Year 2021 ## Contact : <EMAIL> ## ## The software PI-Net is provided under MIT License. ## import json with open("../data/MuPoTS-3D.json",'r') as f1: data_dict = json.load(f1) print("data...
[ "json.load", "json.dump" ]
[((291, 304), 'json.load', 'json.load', (['f1'], {}), '(f1)\n', (300, 304), False, 'import json\n'), ((766, 795), 'json.dump', 'json.dump', (['bbox_root_list', 'f2'], {}), '(bbox_root_list, f2)\n', (775, 795), False, 'import json\n')]
import re from collections import defaultdict from advent import AdventProblem def preprocess(line): match = re.match(r"([\w\s]+) bags contain (.+)\.", line) constituents = re.findall(r"(\d+) ([\w\s]+) bags?", match.group(2)) return (match.group(1), constituents) def part_1(pairings): contained_by =...
[ "advent.AdventProblem", "re.match", "collections.defaultdict" ]
[((116, 166), 're.match', 're.match', (['"""([\\\\w\\\\s]+) bags contain (.+)\\\\."""', 'line'], {}), "('([\\\\w\\\\s]+) bags contain (.+)\\\\.', line)\n", (124, 166), False, 'import re\n'), ((321, 338), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (332, 338), False, 'from collections import de...
import os import sys import time import subprocess import logging.config from logging import getLogger from flask import Flask, request, flash, jsonify, redirect, url_for from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager, current_user import flask_socketio from flask_socketio import SocketIO...
[ "logging.getLogger", "flask_login.LoginManager", "sqlalchemy.event.listens_for", "flask.Flask", "flask.request.endpoint.startswith", "os.path.join", "flask_socketio.SocketIO", "time.sleep", "flask.url_for", "sys.exit", "os.path.abspath", "flask_sqlalchemy.SQLAlchemy", "sys.stdout.flush" ]
[((893, 957), 'flask_socketio.SocketIO', 'SocketIO', ([], {'ping_interval': '(5)', 'ping_timeout': '(120)', 'async_mode': '"""gevent"""'}), "(ping_interval=5, ping_timeout=120, async_mode='gevent')\n", (901, 957), False, 'from flask_socketio import SocketIO\n'), ((966, 981), 'flask.Flask', 'Flask', (['__name__'], {}), ...
from PyQt5.QtCore import QRect, Qt from PyQt5.QtWidgets import QWidget, QVBoxLayout, QPushButton, QHBoxLayout, QLabel, QSizePolicy from xu.compa.Parapluie import Parapluie from xu.compa.Parapluie.src.StickyWindow.PSticky import PSticky class PMessage(PSticky): def __init__(self, parent: QWidget, rect: QRect = No...
[ "PyQt5.QtWidgets.QWidget", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QPushButton" ]
[((764, 777), 'PyQt5.QtWidgets.QHBoxLayout', 'QHBoxLayout', ([], {}), '()\n', (775, 777), False, 'from PyQt5.QtWidgets import QWidget, QVBoxLayout, QPushButton, QHBoxLayout, QLabel, QSizePolicy\n'), ((865, 873), 'PyQt5.QtWidgets.QLabel', 'QLabel', ([], {}), '()\n', (871, 873), False, 'from PyQt5.QtWidgets import QWidge...
""" Onoda 2012 ICA- and PCA-based algorithm See: Careful seeding method based on independent components analysis for k-means clustering http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.663.5343&rep=rep1&type=pdf#page=53 """ from abc import abstractmethod import numpy as np from initialisations.base import ...
[ "numpy.argmin", "numpy.array", "numpy.dot" ]
[((755, 774), 'numpy.array', 'np.array', (['centroids'], {}), '(centroids)\n', (763, 774), True, 'import numpy as np\n'), ((930, 952), 'numpy.dot', 'np.dot', (['component', 'row'], {}), '(component, row)\n', (936, 952), True, 'import numpy as np\n'), ((716, 736), 'numpy.argmin', 'np.argmin', (['distances'], {}), '(dist...
import KratosMultiphysics.KratosUnittest as KratosUnittest import KratosMultiphysics import KratosMultiphysics.TrilinosApplication as KratosTrilinos class TestTrilinosMatrix(KratosUnittest.TestCase): def test_resize(self): comm = KratosTrilinos.CreateEpetraCommunicator(KratosMultiphysics.DataCommunicator....
[ "KratosMultiphysics.TrilinosApplication.TrilinosSparseSpace", "KratosMultiphysics.KratosUnittest.main", "KratosMultiphysics.DataCommunicator.GetDefault" ]
[((576, 597), 'KratosMultiphysics.KratosUnittest.main', 'KratosUnittest.main', ([], {}), '()\n', (595, 597), True, 'import KratosMultiphysics.KratosUnittest as KratosUnittest\n'), ((350, 386), 'KratosMultiphysics.TrilinosApplication.TrilinosSparseSpace', 'KratosTrilinos.TrilinosSparseSpace', ([], {}), '()\n', (384, 386...
#lib import import sys, os, random, time sys.path.append('..\\..\\') import derpapi import pygame RUN = False #screen init try: pygame.init() except: pygame.display.init() def main(): global RUN, random, derpapi #place main code here HS = derpapi.retrieve('HISCORE') if HS == None:...
[ "random.choice", "sys.exit", "derpapi.retrieve", "pygame.init", "pygame.display.init", "pygame.event.get", "pygame.display.set_mode", "pygame.display.flip", "derpapi.collision", "pygame.Surface", "time.time", "time.sleep", "pygame.time.Clock", "pygame.display.quit", "derpapi.store", "p...
[((43, 70), 'sys.path.append', 'sys.path.append', (['"""..\\\\..\\\\"""'], {}), "('..\\\\..\\\\')\n", (58, 70), False, 'import sys, os, random, time\n'), ((3929, 3950), 'pygame.display.quit', 'pygame.display.quit', ([], {}), '()\n', (3948, 3950), False, 'import pygame\n'), ((143, 156), 'pygame.init', 'pygame.init', ([]...
from datetime import date print('{} DESAFIO 32 {}'.format('='*10, '='*10)) ano = int(input('Digite um ano qualquer (Ou 0 se quiser a análise do ano atual): ')) if ano == 0: ano = date.today().year if ano % 4 == 0 and ano != 100 or ano % 400 == 0: print('O ano {} é BISSEXTO!'.format(ano)) else: print('O ano ...
[ "datetime.date.today" ]
[((183, 195), 'datetime.date.today', 'date.today', ([], {}), '()\n', (193, 195), False, 'from datetime import date\n')]
import re import platform import os import time import json import datetime from .website import websiteText from .UpdateJson import UpdateJsonLanguage def EnglishFunction(Balthazar, text, languages): websiteText(Balthazar, text, languages) if "hello" in text: Balthazar.speak("hello, how are you?", la...
[ "datetime.datetime.now", "os.listdir", "os.path.join" ]
[((1104, 1125), 'os.listdir', 'os.listdir', (['music_dir'], {}), '(music_dir)\n', (1114, 1125), False, 'import os\n'), ((1172, 1205), 'os.path.join', 'os.path.join', (['music_dir', 'songs[0]'], {}), '(music_dir, songs[0])\n', (1184, 1205), False, 'import os\n'), ((1251, 1274), 'datetime.datetime.now', 'datetime.datetim...
import numpy as np from math import sqrt from numba import njit, prange, jitclass from src.Common import ParticleType from typing import Tuple @jitclass([]) class TimeStep: def __init__(self): pass def compute(self, J: int, pA: np.array, gamma_c: float = 0.25, gamma_f: float = 0.25) -> Tuple[float, flo...
[ "numba.prange", "numpy.array", "math.sqrt", "numba.jitclass" ]
[((145, 157), 'numba.jitclass', 'jitclass', (['[]'], {}), '([])\n', (153, 157), False, 'from numba import njit, prange, jitclass\n'), ((2085, 2094), 'numba.prange', 'prange', (['J'], {}), '(J)\n', (2091, 2094), False, 'from numba import njit, prange, jitclass\n'), ((2387, 2398), 'numpy.array', 'np.array', (['h'], {}), ...
from django.urls import path from bookbar.auth_app.views import UserRegistrationView, UserLoginView, logout_user, ChangeUserPasswordView, \ ChangeUserEmailView urlpatterns = ( path('register/', UserRegistrationView.as_view(), name='register user'), path('login/', UserLoginView.as_view(), name='login user'...
[ "bookbar.auth_app.views.ChangeUserEmailView.as_view", "bookbar.auth_app.views.UserRegistrationView.as_view", "bookbar.auth_app.views.UserLoginView.as_view", "django.urls.path", "bookbar.auth_app.views.ChangeUserPasswordView.as_view" ]
[((327, 375), 'django.urls.path', 'path', (['"""logout/"""', 'logout_user'], {'name': '"""logout user"""'}), "('logout/', logout_user, name='logout user')\n", (331, 375), False, 'from django.urls import path\n'), ((204, 234), 'bookbar.auth_app.views.UserRegistrationView.as_view', 'UserRegistrationView.as_view', ([], {}...
import iraf no = iraf.no yes = iraf.yes from axe import axesrc # Point to default parameter file for task _parfile = 'axe$fcubeprep.par' _taskname = 'fcubeprep' ###### # Set up Python IRAF interface here ###### def fcubeprep_iraf(grism_image, segm_image, filter_info, ...
[ "iraf.IrafTaskFactory", "axe.axesrc.fcubeprep", "iraf.help", "iraf.osfn", "axe.axesrc.straighten_string" ]
[((1449, 1468), 'iraf.osfn', 'iraf.osfn', (['_parfile'], {}), '(_parfile)\n', (1458, 1468), False, 'import iraf\n'), ((1478, 1600), 'iraf.IrafTaskFactory', 'iraf.IrafTaskFactory', ([], {'taskname': '_taskname', 'value': 'parfile', 'pkgname': 'PkgName', 'pkgbinary': 'PkgBinary', 'function': 'fcubeprep_iraf'}), '(tasknam...
# Generated by Django 2.1.8 on 2019-04-28 10:47 from django.db import migrations, models import mainApp.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ProblemPost', fields=[ ...
[ "django.db.models.TextField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.PositiveSmallIntegerField", "django.db.models.CharField" ]
[((329, 422), '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", (345, 422), False, 'from django.db import migrations, models\...
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='robotframework-snowlibrary', version='1.4.0', url='', licen...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((109, 131), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (121, 131), False, 'from os import path\n'), ((144, 173), 'os.path.join', 'path.join', (['here', '"""README.rst"""'], {}), "(here, 'README.rst')\n", (153, 173), False, 'from os import path\n'), ((475, 533), 'setuptools.find_packages', ...
import numpy as np import tensorflow as tf from pytorch2onnx import AntiSpoofPredict import cv2 import torch import time #load pytorch device_id = 0 model_path = "./resources/anti_spoof_models/2020-09-28-13-11_Anti_Spoofing_1.2_112x112_model_iter-150.pth" anti_model = AntiSpoofPredict(device_id, model_path) dummy_img...
[ "tensorflow.lite.Interpreter", "numpy.random.random_sample", "time.time", "cv2.imread", "pytorch2onnx.AntiSpoofPredict" ]
[((270, 309), 'pytorch2onnx.AntiSpoofPredict', 'AntiSpoofPredict', (['device_id', 'model_path'], {}), '(device_id, model_path)\n', (286, 309), False, 'from pytorch2onnx import AntiSpoofPredict\n'), ((323, 421), 'cv2.imread', 'cv2.imread', (['"""./datasets/RGB_Images/1.2_112x112/test_caffee_model/0/1599816416115_69.png"...
import os import numpy as np def read_data(input_path, english_only, english_indices=None): """Returns the list of signatures, labels, and ids. These can have English-only signatures if specified.""" if english_indices is None: english_indices = [] sig_list = [] lab_list = [] # Genuine = 0, Forged = 1...
[ "os.listdir", "numpy.delete", "numpy.array", "numpy.zeros", "numpy.empty", "numpy.random.seed", "numpy.concatenate", "numpy.genfromtxt" ]
[((1179, 1213), 'numpy.empty', 'np.empty', (['(rows, data[0].shape[1])'], {}), '((rows, data[0].shape[1]))\n', (1187, 1213), True, 'import numpy as np\n'), ((3460, 3477), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (3474, 3477), True, 'import numpy as np\n'), ((570, 617), 'numpy.genfromtxt', 'np.genf...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: v3/asset/ip/v4/geolocation/geolocation.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.proto...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((468, 494), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (492, 494), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((2352, 2699), 'google.protobuf.descriptor.FieldDescriptor', '_descriptor.FieldDescriptor', ([], {'name': '"""version"""', 'full_...
''' a simple script for generating uniform randoms and jackknife regions assuming the KiDS-1000 mask ''' import fitsio import numpy as np import healpy as hp import kmeans_radec from kmeans_radec import KMeans, kmeans_sample from astropy.table import Table lens = fitsio.read("lens.fits", columns = ["ra_gal", "dec_gal...
[ "astropy.table.Table", "fitsio.read", "numpy.vstack", "numpy.savetxt", "numpy.random.uniform", "kmeans_radec.kmeans_sample" ]
[((266, 351), 'fitsio.read', 'fitsio.read', (['"""lens.fits"""'], {'columns': "['ra_gal', 'dec_gal', 'observed_redshift_gal']"}), "('lens.fits', columns=['ra_gal', 'dec_gal', 'observed_redshift_gal']\n )\n", (277, 351), False, 'import fitsio\n'), ((464, 493), 'numpy.random.uniform', 'np.random.uniform', (['(0)', '(3...
# Generated by Django 2.0.5 on 2018-05-12 23:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
[ "django.db.models.ForeignKey", "django.db.models.NullBooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((247, 304), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (278, 304), False, 'from django.db import migrations, models\n'), ((434, 527), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
# 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 required by applicable law or agreed to in...
[ "logging.getLogger", "urllib3.disable_warnings", "openstack.connect", "openstack.enable_logging" ]
[((693, 760), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (717, 760), False, 'import urllib3\n'), ((768, 816), 'logging.getLogger', 'logging.getLogger', (['"""openstack_exporter.exporter"""'], {}), "('opens...
# ---------------------------------------------------------------------------------- # 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 ...
[ "arcpy.AddMessage", "arcpy.Describe", "csv.writer", "arcpy.AddError", "arcpy.ListFeatureClasses", "arcpy.ListFields", "arcpy.GetParameter", "arcpy.ListDatasets" ]
[((1159, 1180), 'arcpy.GetParameter', 'arcpy.GetParameter', (['(0)'], {}), '(0)\n', (1177, 1180), False, 'import arcpy\n'), ((1191, 1212), 'arcpy.GetParameter', 'arcpy.GetParameter', (['(1)'], {}), '(1)\n', (1209, 1212), False, 'import arcpy\n'), ((1891, 1911), 'arcpy.ListDatasets', 'arcpy.ListDatasets', ([], {}), '()\...
# -*- coding: utf-8 -*- import click import gitlab from colored import fg, bg, attr from core import gitlabwrapper from config import Config from configparser import ConfigParser from core.utils import read_config, print_green, print_red, create_gl g_namespace_lst = {} from prettytable import PrettyTable # def re...
[ "prettytable.PrettyTable", "click.group", "click.option", "click.File", "core.utils.create_gl", "core.utils.print_green", "core.utils.print_red" ]
[((641, 682), 'click.group', 'click.group', ([], {'invoke_without_command': '(False)'}), '(invoke_without_command=False)\n', (652, 682), False, 'import click\n'), ((801, 900), 'click.option', 'click.option', (['"""-s"""', '"""--section"""'], {'type': 'str', 'default': '"""global"""', 'help': '"""use default global sect...
# Generated by Django 3.1 on 2020-11-23 02:24 from django.db import migrations from manual.operations.manual_operations import ManualOperation def test_has_sample_stats(apps): SampleVariantAnnotationStats = apps.get_model("annotation", "SampleVariantAnnotationStats") return SampleVariantAnnotationStats.obje...
[ "manual.operations.manual_operations.ManualOperation.task_id_manage" ]
[((511, 580), 'manual.operations.manual_operations.ManualOperation.task_id_manage', 'ManualOperation.task_id_manage', (["['calculate_sample_stats', '--clear']"], {}), "(['calculate_sample_stats', '--clear'])\n", (541, 580), False, 'from manual.operations.manual_operations import ManualOperation\n')]
from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField, BooleanField, SelectField,\ SubmitField,IntegerField,DateField from wtforms.validators import DataRequired, Length, Email, Regexp from wtforms import ValidationError from flask_pagedown.fields import PageDownField from ..models im...
[ "wtforms.IntegerField", "wtforms.validators.Email", "wtforms.validators.DataRequired", "wtforms.BooleanField", "wtforms.SubmitField", "wtforms.StringField", "wtforms.validators.Length", "flask_pagedown.fields.PageDownField", "wtforms.DateField", "wtforms.validators.Regexp", "wtforms.SelectField"...
[((457, 478), 'wtforms.SubmitField', 'SubmitField', (['"""Submit"""'], {}), "('Submit')\n", (468, 478), False, 'from wtforms import StringField, TextAreaField, BooleanField, SelectField, SubmitField, IntegerField, DateField\n'), ((667, 692), 'wtforms.TextAreaField', 'TextAreaField', (['"""About me"""'], {}), "('About m...
import random import six import warnings from .partitionedsink import WritePartitionedFiles from .partitionedsink import PartitionedFileSink from .partitionedsink import T import apache_beam as beam from apache_beam import PTransform from apache_beam import core from apache_beam.transforms import window from apache_b...
[ "apache_beam.typehints.with_output_types", "apache_beam.typehints.with_input_types", "pipe_tools.timestamp.datetimeFromTimestamp", "pipe_tools.coders.JSONDictCoder", "random.randint" ]
[((1863, 1892), 'apache_beam.typehints.with_input_types', 'typehints.with_input_types', (['T'], {}), '(T)\n', (1889, 1892), False, 'from apache_beam import typehints\n'), ((1894, 1945), 'apache_beam.typehints.with_output_types', 'typehints.with_output_types', (['KV[Tuple[int, int], T]'], {}), '(KV[Tuple[int, int], T])\...
# # Copyright (c) 2012 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import os import shutil import sys import tempfile import time import unittest # Bring in the patman libraries our_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(our_path, '../patman')) import boa...
[ "builder.Builder", "toolchain.Toolchains", "control.DoBuildman", "command.CommandResult", "os.path.join", "commit.Commit", "os.getcwd", "os.path.realpath", "board.Board", "os.path.isdir", "tempfile.mkdtemp", "os.mkdir", "bsettings.Setup", "unittest.main", "board.Boards" ]
[((228, 254), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (244, 254), False, 'import os\n'), ((272, 307), 'os.path.join', 'os.path.join', (['our_path', '"""../patman"""'], {}), "(our_path, '../patman')\n", (284, 307), False, 'import os\n'), ((5915, 5930), 'unittest.main', 'unittest.main'...
if True: import numpy as np d = 3 K = 50 N = 10 ** 6 a = np.zeros(3) b = np.ones(3) orders = np.array([K for i in range(d)]) coeffs = np.random.random([k + 2 for k in orders]) points = np.random.random((N, d)) # each line is a vector points_c = points.T.copy() # each column i...
[ "numpy.ones", "numpy.random.random", "eval_cubic_splines_cython.vec_eval_cubic_spline_3", "numpy.zeros", "time.time" ]
[((79, 90), 'numpy.zeros', 'np.zeros', (['(3)'], {}), '(3)\n', (87, 90), True, 'import numpy as np\n'), ((99, 109), 'numpy.ones', 'np.ones', (['(3)'], {}), '(3)\n', (106, 109), True, 'import numpy as np\n'), ((168, 211), 'numpy.random.random', 'np.random.random', (['[(k + 2) for k in orders]'], {}), '([(k + 2) for k in...
#!/usr/bin/env python # -*- coding: utf-8 -*- """move_safe.py: get all the places in a radius using google place api .""" __author__ = "<NAME>, <NAME>" import populartimes import json import math import requests import geocoder apiKey = "" # get your current position def my_current_location(): g = geocoder.ip('...
[ "geocoder.ip", "populartimes.get", "populartimes.get_id", "json.dumps", "math.degrees", "math.radians", "math.cos", "math.sin" ]
[((307, 324), 'geocoder.ip', 'geocoder.ip', (['"""me"""'], {}), "('me')\n", (318, 324), False, 'import geocoder\n'), ((581, 598), 'math.radians', 'math.radians', (['lat'], {}), '(lat)\n', (593, 598), False, 'import math\n'), ((652, 669), 'math.radians', 'math.radians', (['lon'], {}), '(lon)\n', (664, 669), False, 'impo...
# Generated by Django 3.0.8 on 2020-07-31 06:20 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('ews', '0007_auto_20200729_1039'), ] operations = [ migrations.AlterField( model_name='featureda...
[ "django.db.models.ForeignKey" ]
[((371, 480), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""station"""', 'to': '"""ews.Station"""'}), "(on_delete=django.db.models.deletion.CASCADE, related_name\n ='station', to='ews.Station')\n", (388, 480), False, 'from django.db im...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- #=============================================================================== # Filename : check_ssh_file_existence # Author : <NAME> <<EMAIL>> # Description : Check on remote server if some files are present using SSH. #---------------------------------...
[ "logging.getLogger", "hashlib.md5", "re.compile", "datetime.datetime.strptime", "pprint.pformat", "datetime.datetime.today", "datetime.timedelta" ]
[((1285, 1308), 'logging.getLogger', 'log.getLogger', (['"""plugin"""'], {}), "('plugin')\n", (1298, 1308), True, 'import logging as log\n'), ((1546, 1588), 'datetime.datetime.strptime', 'datetime.strptime', (['time_string', '"""%H:%M:%S"""'], {}), "(time_string, '%H:%M:%S')\n", (1563, 1588), False, 'from datetime impo...
#!/usr/bin/python3 '''Adds a State object and one of its City object children to a database. ''' import sys from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, relationship from relationship_state import Base, State from relationship_city import City if __name__ == '__main__': if len(sy...
[ "sqlalchemy.orm.sessionmaker", "sqlalchemy.create_engine", "relationship_city.City", "relationship_state.Base.metadata.create_all", "relationship_state.State" ]
[((544, 571), 'sqlalchemy.create_engine', 'create_engine', (['DATABASE_URL'], {}), '(DATABASE_URL)\n', (557, 571), False, 'from sqlalchemy import create_engine\n'), ((580, 612), 'relationship_state.Base.metadata.create_all', 'Base.metadata.create_all', (['engine'], {}), '(engine)\n', (604, 612), False, 'from relationsh...
# Copyright 2015 Isotoma Limited # # 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...
[ "touchdown.tests.stubs.aws.Stubber" ]
[((2844, 2885), 'touchdown.tests.stubs.aws.Stubber', 'Stubber', (['load_balancer.service.ec2_client'], {}), '(load_balancer.service.ec2_client)\n', (2851, 2885), False, 'from touchdown.tests.stubs.aws import LoadBalancerStubber, Stubber\n')]
from __future__ import print_function import argparse import os import platform import time import cv2 import h5py import torch.optim as optim from torch.utils.data import DataLoader from datasets import DATASET_NAMES, TrainDataset, TestDataset, dataset_info from losses import * from model import DexiNed from model_...
[ "model.DexiNed", "torch.utils.tensorboard.SummaryWriter", "time.ctime", "utils.visualize_result", "os.makedirs", "argparse.ArgumentParser", "model_learnable_sigmoid.DexiNed_learnable_sigmoid", "os.path.join", "cv2.putText", "os.path.isfile", "h5py.File", "platform.system", "utils.save_image_...
[((639, 694), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""DexiNed trainer."""'}), "(description='DexiNed trainer.')\n", (662, 694), False, 'import argparse\n'), ((1092, 1134), 'datasets.dataset_info', 'dataset_info', (['TEST_DATA'], {'is_linux': 'IS_LINUX'}), '(TEST_DATA, is_linux=IS_...
import numpy as np import matplotlib.pyplot as plt from matplotlib import patches def get_ellipse_params(rho,M): """ Returns ellipse params (excl center point) """ #eigenvalue decomposition to get the axes w,v=np.linalg.eigh(M/rho) try: #let the smaller eigenvalue define the width (m...
[ "matplotlib.pyplot.savefig", "numpy.sqrt", "numpy.max", "numpy.arctan2", "numpy.linalg.eigh", "matplotlib.patches.Ellipse", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((232, 255), 'numpy.linalg.eigh', 'np.linalg.eigh', (['(M / rho)'], {}), '(M / rho)\n', (246, 255), True, 'import numpy as np\n'), ((925, 1026), 'matplotlib.patches.Ellipse', 'patches.Ellipse', (['(px, py)', 'w', 'h', 'a'], {'alpha': 'alpha_val', 'ec': 'linec', 'facecolor': 'facec', 'linestyle': 'linest'}), '((px, py)...
import cv2 import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from google.colab.patches import cv2_imshow from tensorflow.keras.applications import * from tensorflow.keras.layers import * from tensorflow.keras.models import * from math import * import glob import os import time from ...
[ "tensorflow.keras.preprocessing.image.load_img", "numpy.reshape", "cv2.ximgproc.createStructuredEdgeDetection", "tensorflow.keras.applications.vgg16.preprocess_input", "cv2.cvtColor", "tensorflow.keras.preprocessing.image.img_to_array", "cv2.ximgproc.createEdgeBoxes", "cv2.resize", "cv2.imread", "...
[((882, 898), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (892, 898), False, 'import cv2\n'), ((907, 949), 'cv2.resize', 'cv2.resize', (['im', '(800, 800)', 'cv2.INTER_AREA'], {}), '(im, (800, 800), cv2.INTER_AREA)\n', (917, 949), False, 'import cv2\n'), ((955, 990), 'cv2.cvtColor', 'cv2.cvtColor', (['im', ...
import random import collections import math import os import zipfile import time import re import numpy as np import tensorflow as tf from matplotlib import pylab from six.moves import range from six.moves.urllib.request import urlretrieve dataset_link = 'http://mattmahoney.net/dc/' zip_file = 'text8.zip' def data_d...
[ "os.path.exists", "zipfile.ZipFile", "collections.Counter", "os.path.isdir", "six.moves.urllib.request.urlretrieve" ]
[((1494, 1523), 'collections.Counter', 'collections.Counter', (['ft_token'], {}), '(ft_token)\n', (1513, 1523), False, 'import collections\n'), ((609, 640), 'os.path.isdir', 'os.path.isdir', (['extracted_folder'], {}), '(extracted_folder)\n', (622, 640), False, 'import os\n'), ((1887, 1925), 'collections.Counter', 'col...
# Generated by Django 2.0.3 on 2020-01-31 07:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app1', '0003_auto_20200129_0337'), ] operations = [ migrations.AlterField( model_name='flight', name='stripImage', ...
[ "django.db.models.ImageField" ]
[((337, 368), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '""""""'}), "(upload_to='')\n", (354, 368), False, 'from django.db import migrations, models\n')]
import os , time from client.client import client from client.text_color import color def main(): client().system("clear") client().system(f"figlet Tool Kit Searcher") client().puts(f"Welcome to Tool Kit Search Tool\n\ngithub.com/Altify-Development") client().puts(f"{color.GREEN}[✔] St...
[ "os.getuid", "client.client.client", "time.sleep" ]
[((354, 369), 'time.sleep', 'time.sleep', (['(2.5)'], {}), '(2.5)\n', (364, 369), False, 'import os, time\n'), ((1294, 1305), 'os.getuid', 'os.getuid', ([], {}), '()\n', (1303, 1305), False, 'import os, time\n'), ((112, 120), 'client.client.client', 'client', ([], {}), '()\n', (118, 120), False, 'from client.client imp...
import FWCore.ParameterSet.Config as cms ctppsRPAlignmentCorrectionsDataESSourceXML = cms.ESSource("CTPPSRPAlignmentCorrectionsDataESSourceXML", verbosity = cms.untracked.uint32(0), MeasuredFiles = cms.vstring(), RealFiles = cms.vstring(), MisalignedFiles = cms.vstring() )
[ "FWCore.ParameterSet.Config.vstring", "FWCore.ParameterSet.Config.untracked.uint32" ]
[((162, 185), 'FWCore.ParameterSet.Config.untracked.uint32', 'cms.untracked.uint32', (['(0)'], {}), '(0)\n', (182, 185), True, 'import FWCore.ParameterSet.Config as cms\n'), ((208, 221), 'FWCore.ParameterSet.Config.vstring', 'cms.vstring', ([], {}), '()\n', (219, 221), True, 'import FWCore.ParameterSet.Config as cms\n'...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from config import gamma, lr def flat_grad(grads): grad_flatten = [] for grad in grads: grad_flatten.append(grad.view(-1)) grad_flatten = torch.cat(grad_flatten) return grad_flatten def flat_hessian(hessians...
[ "torch.log", "numpy.random.choice", "torch.stack", "torch.Tensor", "torch.nn.Linear", "torch.nn.init.xavier_uniform", "torch.zeros_like", "torch.cat", "torch.dot" ]
[((246, 269), 'torch.cat', 'torch.cat', (['grad_flatten'], {}), '(grad_flatten)\n', (255, 269), False, 'import torch\n'), ((667, 684), 'torch.cat', 'torch.cat', (['params'], {}), '(params)\n', (676, 684), False, 'import torch\n'), ((1921, 1936), 'torch.dot', 'torch.dot', (['r', 'r'], {}), '(r, r)\n', (1930, 1936), Fals...
import json import os import sys import jsonpatch import unittest import pytest from deepdiff import DeepDiff from mock import patch from dump.helper import create_template_dict, sort_lists from dump.plugins.port import Port from dump.match_infra import MatchEngine, ConnectionPool from swsscommon.swsscommon import Soni...
[ "deepdiff.DeepDiff", "dump.plugins.port.Port", "dump.match_infra.ConnectionPool", "os.path.join", "dump.helper.create_template_dict", "json.load", "os.path.dirname", "pytest.mark.usefixtures", "dump.match_infra.MatchEngine", "swsscommon.swsscommon.SonicV2Connector", "pytest.fixture", "dump.hel...
[((396, 421), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (411, 421), False, 'import os\n'), ((440, 478), 'os.path.join', 'os.path.join', (['module_tests_path', '"""../"""'], {}), "(module_tests_path, '../')\n", (452, 478), False, 'import os\n'), ((492, 528), 'os.path.join', 'os.path.join'...
from numpy.random import randint def find_sum(a_list, target): r = [] sz = len(a_list) for i in range(sz): for j in range(i+1, sz): if (a_list[i] + a_list[j]) == target: r.append((a_list[i], a_list[j])) return r def fast_sum(a_list, target): r = [] h = {} ...
[ "numpy.random.randint" ]
[((482, 501), 'numpy.random.randint', 'randint', (['(0)', '(100)', '(20)'], {}), '(0, 100, 20)\n', (489, 501), False, 'from numpy.random import randint\n'), ((515, 527), 'numpy.random.randint', 'randint', (['(100)'], {}), '(100)\n', (522, 527), False, 'from numpy.random import randint\n')]
import asyncio import random import re from abc import ABC from typing import List, Iterable from src.entity.proxy_entity import ProxyEntity from src.enum.common import ProxyCoverEnum, ProxyTypeEnum from src.log.logger import logger from src.spider.abs_spider import AbsSpider from bs4 import BeautifulSoup, Tag from pyp...
[ "bs4.BeautifulSoup", "random.uniform", "pyppeteer.launch", "src.log.logger.logger.info" ]
[((449, 481), 'src.log.logger.logger.info', 'logger.info', (['f"""注册{cls.__name__}"""'], {}), "(f'注册{cls.__name__}')\n", (460, 481), False, 'from src.log.logger import logger\n'), ((3352, 3387), 'src.log.logger.logger.info', 'logger.info', (['f"""{self._name}开始爬取..."""'], {}), "(f'{self._name}开始爬取...')\n", (3363, 3387)...
import gooz_basic import dev.gooz_thread import os username = "Gorkem" password = "<PASSWORD>" login_flag = False print("Welcome to GoozOS") usr = input("Username: ") if usr == username: paswd = input("Password: ") if paswd == password: login_flag = True else: print("Wrong Password") else:...
[ "gooz_basic.command_analyzator", "gooz_basic.history.append", "os.getcwd", "os.chdir", "gooz_basic.add_run_commands" ]
[((479, 513), 'gooz_basic.command_analyzator', 'gooz_basic.command_analyzator', (['msg'], {}), '(msg)\n', (508, 513), False, 'import gooz_basic\n'), ((518, 555), 'gooz_basic.add_run_commands', 'gooz_basic.add_run_commands', (['cmd_list'], {}), '(cmd_list)\n', (545, 555), False, 'import gooz_basic\n'), ((560, 595), 'goo...
## This File Contains all the different Neural Network Architectures used and the Loss function import torch import torch.nn as nn import torch.nn.functional as functions ## Dense Network class Dense(nn.Module): def __init__(self): super(Dense,self).__init__() self.fc1 = nn.Linear(6*7,32) #board...
[ "torch.nn.BatchNorm2d", "torch.log", "torch.nn.Tanh", "torch.nn.Softmax", "torch.nn.Conv2d", "torch.nn.Linear" ]
[((294, 314), 'torch.nn.Linear', 'nn.Linear', (['(6 * 7)', '(32)'], {}), '(6 * 7, 32)\n', (303, 314), True, 'import torch.nn as nn\n'), ((356, 373), 'torch.nn.Linear', 'nn.Linear', (['(32)', '(16)'], {}), '(32, 16)\n', (365, 373), True, 'import torch.nn as nn\n'), ((397, 413), 'torch.nn.Linear', 'nn.Linear', (['(16)', ...
import findspark findspark.init() import time from pyspark import SparkConf,SparkContext from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import sys import requests def aggregate_tweets_count(new_values, total_sum): return sum(new_values) + (total_sum or 0) conf=S...
[ "findspark.init", "pyspark.streaming.StreamingContext", "pyspark.SparkConf", "pyspark.SparkContext.getOrCreate" ]
[((18, 34), 'findspark.init', 'findspark.init', ([], {}), '()\n', (32, 34), False, 'import findspark\n'), ((319, 330), 'pyspark.SparkConf', 'SparkConf', ([], {}), '()\n', (328, 330), False, 'from pyspark import SparkConf, SparkContext\n'), ((363, 398), 'pyspark.SparkContext.getOrCreate', 'SparkContext.getOrCreate', ([]...
from flask import jsonify, Blueprint, request from flask_restful import Resource, Api from services.cost_prediction_model.cost_prediction_model import CostPredictionModel from services.building_vol_calculator.building_vol_metres_calculator import BuildingVolMetresCalculator from measurement.utils import guess from s...
[ "services.cost_prediction_model.cost_prediction_model.CostPredictionModel", "flask_restful.Api", "flask.request.get_json", "services.error_handling.exceptions.cost_prediction_failed.CostPredictionFailed", "services.building_vol_calculator.building_vol_metres_calculator.BuildingVolMetresCalculator", "flask...
[((2095, 2151), 'flask.Blueprint', 'Blueprint', (['"""resources.fit_out_cost_prediction"""', '__name__'], {}), "('resources.fit_out_cost_prediction', __name__)\n", (2104, 2151), False, 'from flask import jsonify, Blueprint, request\n'), ((2164, 2195), 'flask_restful.Api', 'Api', (['fitout_cost_prediction_api'], {}), '(...
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
[ "os.path.exists" ]
[((7518, 7538), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (7532, 7538), False, 'import os\n')]
from .hunterdouglasplatinum import HunterDouglasPlatinumHub import argparse import sys import asyncio def err(msg): sys.stderr.write(msg+"\n") async def main(): parser = argparse.ArgumentParser() parser.add_argument("ip", help="ip address of the hub") parser.add_argument("-d", ...
[ "sys.stderr.write", "argparse.ArgumentParser" ]
[((121, 149), 'sys.stderr.write', 'sys.stderr.write', (["(msg + '\\n')"], {}), "(msg + '\\n')\n", (137, 149), False, 'import sys\n'), ((180, 205), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (203, 205), False, 'import argparse\n')]
import os import launch import launch_ros.actions from ament_index_python.packages import get_package_share_directory def generate_launch_description(): graphbasedslam_param_dir = launch.substitutions.LaunchConfiguration( 'graphbasedslam_param_dir', default=os.path.join( get_package_...
[ "ament_index_python.packages.get_package_share_directory", "launch.actions.DeclareLaunchArgument" ]
[((670, 849), 'launch.actions.DeclareLaunchArgument', 'launch.actions.DeclareLaunchArgument', (['"""graphbasedslam_param_dir"""'], {'default_value': 'graphbasedslam_param_dir', 'description': '"""Full path to graphbasedslam parameter file to load"""'}), "('graphbasedslam_param_dir',\n default_value=graphbasedslam_pa...
import pytest import networkx as nx from networkx.algorithms.community import ( greedy_modularity_communities, modularity, naive_greedy_modularity_communities, ) @pytest.mark.parametrize( "func", (greedy_modularity_communities, naive_greedy_modularity_communities) ) def test_modularity_communities(fu...
[ "networkx.algorithms.community.naive_greedy_modularity_communities", "networkx.algorithms.community.greedy_modularity_communities", "pytest.mark.parametrize", "networkx.balanced_tree", "networkx.karate_club_graph", "networkx.barbell_graph" ]
[((178, 283), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""func"""', '(greedy_modularity_communities, naive_greedy_modularity_communities)'], {}), "('func', (greedy_modularity_communities,\n naive_greedy_modularity_communities))\n", (201, 283), False, 'import pytest\n'), ((333, 355), 'networkx.karate_...
# tcp client can be used for services, send garbage data, fuzz... import socket tarket_host = "www.google.com" target_port = 80 # create socket object ## af_inet is saying we're going to use the standard ipv4 or hostname ## af_stream sates that this will be a simple tcp client. client = socket.socket(socket.AF_INET,...
[ "socket.socket" ]
[((291, 340), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (304, 340), False, 'import socket\n')]
import os import re import mne import numpy as np class SeegRecording(): def __init__(self, contacts, data, sampling_rate): ''' contacts (list of tuples) is a list of all the contact labels and their corresponding number data (np.ndarr...
[ "numpy.fromfile", "mne.io.read_raw_fif", "re.match", "os.path.splitext", "os.path.isfile", "numpy.linspace", "mne.io.read_raw_edf" ]
[((1067, 1136), 'numpy.linspace', 'np.linspace', (['(0)', '((nsamples - 1) * (1.0 / self.sampling_rate))', 'nsamples'], {}), '(0, (nsamples - 1) * (1.0 / self.sampling_rate), nsamples)\n', (1078, 1136), True, 'import numpy as np\n'), ((1725, 1749), 'os.path.isfile', 'os.path.isfile', (['bad_file'], {}), '(bad_file)\n',...
# -*- coding: UTF-8 -*- from pydub import AudioSegment sound = AudioSegment.from_mp3('D:/360Downloads/caixi-from-net-common.mp3').set_frame_rate(11025) sound.export('D:/360Downloads/from-net-common-3.wav', format='wav')
[ "pydub.AudioSegment.from_mp3" ]
[((65, 131), 'pydub.AudioSegment.from_mp3', 'AudioSegment.from_mp3', (['"""D:/360Downloads/caixi-from-net-common.mp3"""'], {}), "('D:/360Downloads/caixi-from-net-common.mp3')\n", (86, 131), False, 'from pydub import AudioSegment\n')]
import json import unittest from utils.factory import create_app from utils.config import Config class BaseTestCase(unittest.TestCase): """A base test case""" def setUp(self): app = create_app(Config()) app.app_context().push() self.app = app.test_client() def tearDown(self): ...
[ "utils.config.Config" ]
[((211, 219), 'utils.config.Config', 'Config', ([], {}), '()\n', (217, 219), False, 'from utils.config import Config\n')]
#!/usr/bin/env python from __future__ import division, unicode_literals import argparse import os import time import cv2 from net.wyun.blankanswer import image_utils from net.wyun.blankanswer.loader import SimplePreprocessor default_buckets = '[[240,100], [320,80], [400,80],[400,100], [480,80], [480,100], [560,80],...
[ "argparse.ArgumentParser", "flask.Flask", "cv2.threshold", "os.system", "time.time", "net.wyun.blankanswer.loader.SimplePreprocessor.SimplePreprocessor", "net.wyun.blankanswer.image_utils.crop_image", "net.wyun.blankanswer.image_utils.pad_image", "net.wyun.blankanswer.image_utils.downsample_image", ...
[((605, 620), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (610, 620), False, 'from flask import Flask\n'), ((630, 676), 'net.wyun.blankanswer.loader.SimplePreprocessor.SimplePreprocessor', 'SimplePreprocessor.SimplePreprocessor', (['(240)', '(95)'], {}), '(240, 95)\n', (667, 676), False, 'from net.wyun....
""" An experiment trying to bug out the geometry shader sprite culling. If the culling algorithm is wrong sprites can disappear before they leave the screen. Simply run the program and move draw the sprites around using the mouse. """ from arcade.sprite import Sprite import PIL import arcade class GeoCullingTest(ar...
[ "PIL.Image.new", "arcade.sprite.Sprite", "arcade.run", "arcade.SpriteList", "arcade.Sprite" ]
[((1564, 1576), 'arcade.run', 'arcade.run', ([], {}), '()\n', (1574, 1576), False, 'import arcade\n'), ((610, 629), 'arcade.SpriteList', 'arcade.SpriteList', ([], {}), '()\n', (627, 629), False, 'import arcade\n'), ((661, 755), 'arcade.sprite.Sprite', 'Sprite', (['""":resources:images/tiles/boxCrate_double.png"""'], {'...
from hivemind import app from flask import flash, redirect, render_template, request, url_for from mcipc.query import Client as QClient @app.route('/', methods=['GET', 'POST']) def index(): if request.method == 'GET': with QClient("diseased.horse", 25565) as q: stats = q.full_stats ...
[ "flask.render_template", "mcipc.query.Client", "hivemind.app.route" ]
[((139, 178), 'hivemind.app.route', 'app.route', (['"""/"""'], {'methods': "['GET', 'POST']"}), "('/', methods=['GET', 'POST'])\n", (148, 178), False, 'from hivemind import app\n'), ((342, 513), 'flask.render_template', 'render_template', (['"""index.html"""'], {'status': '"""Unknown"""', 'online_players': "stats['num_...
# Generated by Django 3.0.5 on 2020-04-19 18:06 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('basta', '0004_session_sl...
[ "django.db.migrations.swappable_dependency", "django.db.models.ForeignKey" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((462, 572), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django....
''' Copyright 2015 University of Auckland 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...
[ "PySide2.QtCore.QSettings.setDefaultFormat" ]
[((1488, 1549), 'PySide2.QtCore.QSettings.setDefaultFormat', 'QtCore.QSettings.setDefaultFormat', (['QtCore.QSettings.IniFormat'], {}), '(QtCore.QSettings.IniFormat)\n', (1521, 1549), False, 'from PySide2 import QtCore\n')]
#!/usr/bin/env python import selenium, time, os, platform from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from getpass impor...
[ "selenium.webdriver.support.ui.WebDriverWait", "selenium.webdriver.Chrome", "getpass.getpass", "time.sleep", "platform.system", "selenium.webdriver.support.expected_conditions.presence_of_element_located", "time.time", "selenium.webdriver.support.expected_conditions.element_to_be_clickable" ]
[((557, 574), 'platform.system', 'platform.system', ([], {}), '()\n', (572, 574), False, 'import selenium, time, os, platform\n'), ((848, 859), 'time.time', 'time.time', ([], {}), '()\n', (857, 859), False, 'import selenium, time, os, platform\n'), ((941, 963), 'selenium.webdriver.support.ui.WebDriverWait', 'WebDriverW...
# -*- coding: utf-8 -*- """ Created on Wed Nov 16 15:31:16 2016 @author: shaw """ import xlrd import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator, FormatStrFormatter import numpy as np from pylab import * from itertools import product from matplotlib.colors import LogNorm #impo...
[ "numpy.mat", "matplotlib.ticker.MultipleLocator", "matplotlib.pyplot.gca", "xlrd.open_workbook", "numpy.array", "numpy.dot", "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim" ]
[((2998, 3009), 'numpy.array', 'np.array', (['t'], {}), '(t)\n', (3006, 3009), True, 'import numpy as np\n'), ((3082, 3107), 'xlrd.open_workbook', 'xlrd.open_workbook', (['path1'], {}), '(path1)\n', (3100, 3107), False, 'import xlrd\n'), ((3122, 3147), 'xlrd.open_workbook', 'xlrd.open_workbook', (['path2'], {}), '(path...
from __future__ import print_function import sys, random, json, os, tempfile from collections import Counter import numpy as np INSIDE_BLENDER = True try: import bpy from mathutils import Vector except ImportError as e: INSIDE_BLENDER = False if INSIDE_BLENDER: try: import utils except ImportError as e: ...
[ "utils.add_material", "utils.get_camera_coords", "numpy.array", "sys.exit", "bpy.data.images.load", "utils.set_layer", "os.remove", "mathutils.Vector", "utils.delete_object", "bpy.ops.wm.open_mainfile", "utils.load_materials", "bpy.ops.mesh.primitive_plane_add", "utils.add_object", "bpy.op...
[((982, 1042), 'bpy.ops.wm.open_mainfile', 'bpy.ops.wm.open_mainfile', ([], {'filepath': 'args.base_scene_blendfile'}), '(filepath=args.base_scene_blendfile)\n', (1006, 1042), False, 'import bpy\n'), ((1065, 1104), 'utils.load_materials', 'utils.load_materials', (['args.material_dir'], {}), '(args.material_dir)\n', (10...
#!/usr/bin/env python2 # # Copyright (C) 2019 Intel Corporation # # 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 applicabl...
[ "os.path.exists", "os.makedirs", "argparse.ArgumentParser", "os.path.join", "os.path.basename", "action_detection.nn.monitors.factory.get_monitor" ]
[((1025, 1041), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (1039, 1041), False, 'from argparse import ArgumentParser\n'), ((1413, 1432), 'os.path.exists', 'exists', (['args.config'], {}), '(args.config)\n', (1419, 1432), False, 'from os.path import exists, basename, join\n'), ((1444, 1481), 'os.path...
import os import re import shutil from django.core.management.base import BaseCommand, CommandError from wagtail.images.models import Image class Command(BaseCommand): help = 'Add Image from folder that you indicate' IMAGE_FORMAT = ( 'jpg', 'jpeg', 'webp', 'png', 'gif...
[ "os.path.exists", "os.listdir", "shutil.copy2", "os.path.isdir", "os.mkdir", "re.search" ]
[((655, 678), 'os.path.exists', 'os.path.exists', (['"""media"""'], {}), "('media')\n", (669, 678), False, 'import os\n'), ((693, 710), 'os.mkdir', 'os.mkdir', (['"""media"""'], {}), "('media')\n", (701, 710), False, 'import os\n'), ((723, 750), 'os.path.exists', 'os.path.exists', (['path_folder'], {}), '(path_folder)\...
from pathlib import Path import environ # ENVIROMENT # ------------------------------------------------------------------------------ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent.parent # document_service/ BASE_DIR = ROOT_DIR / "nauci_service" APPS_DIR = BASE_DIR / "apps" env = environ.Env()...
[ "environ.Env", "pathlib.Path" ]
[((307, 320), 'environ.Env', 'environ.Env', ([], {}), '()\n', (318, 320), False, 'import environ\n'), ((148, 162), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (152, 162), False, 'from pathlib import Path\n')]
import array import os import socket from warnings import warn class NoFDError(RuntimeError): """Raised by :class:`FileDescriptor` methods if it was already closed/converted """ pass class FileDescriptor: """A file descriptor received in a D-Bus message This wrapper helps ensure that the file d...
[ "array.array", "socket.socket", "os.close", "socket.socket.CMSG_SPACE", "warnings.warn" ]
[((3781, 3804), 'socket.socket', 'socket', ([], {'fileno': 'self._fd'}), '(fileno=self._fd)\n', (3787, 3804), False, 'from socket import socket\n'), ((4115, 4131), 'array.array', 'array.array', (['"""i"""'], {}), "('i')\n", (4126, 4131), False, 'import array\n'), ((4989, 5024), 'socket.socket.CMSG_SPACE', 'socket.CMSG_...
""" Renders the animation into a list of frames """ __all__ = ['OpenCvRenderer', 'FileRenderer'] from dataclasses import dataclass import cv2 import imageio as iio import numpy as np from .animation import Frame, Animation ESC = 27 @dataclass class Options: brightness: int = 100 cutoff: int = 0 @datacla...
[ "numpy.clip", "cv2.destroyWindow", "numpy.array", "cv2.getWindowProperty", "imageio.mimsave", "cv2.resize", "cv2.waitKey", "cv2.namedWindow" ]
[((609, 644), 'numpy.clip', 'np.clip', (['buffer', '(0)', '(255)'], {'out': 'buffer'}), '(buffer, 0, 255, out=buffer)\n', (616, 644), True, 'import numpy as np\n'), ((1002, 1087), 'cv2.resize', 'cv2.resize', (['self.buffer', '(w * scale, h * scale)'], {'interpolation': 'cv2.INTER_NEAREST'}), '(self.buffer, (w * scale, ...
from django.db import models from django.contrib.auth.models import User from PIL import Image from django import template from django.contrib.auth.models import Group class Helper(models.Model): option = ( ('Male', 'Male'), ('Female', 'Female') ) user = models.OneToOneField(User, on_delet...
[ "django.db.models.OneToOneField", "PIL.Image.open", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.SmallIntegerField", "django.db.models.ImageField", "django.db.mod...
[((285, 348), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {'on_delete': 'models.CASCADE', 'null': '(True)'}), '(User, on_delete=models.CASCADE, null=True)\n', (305, 348), False, 'from django.db import models\n'), ((371, 474), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to'...
import re from typing import Generator from django.db import models, transaction, IntegrityError, InternalError from django.db.models import Q from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from django.conf impor...
[ "django.contrib.auth.get_user_model", "django.db.InternalError", "django.conf.settings.COUNTRY_CODE.upper", "django.utils.translation.gettext_lazy", "django.db.models.BooleanField", "re.sub" ]
[((4292, 4329), 'django.db.models.BooleanField', 'models.BooleanField', (['"""Outer transfer"""'], {}), "('Outer transfer')\n", (4311, 4329), False, 'from django.db import models, transaction, IntegrityError, InternalError\n'), ((424, 440), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (438,...
import os import random import numpy as np import cv2 from lxml import etree def mkdir(path): if not os.path.exists(path): os.makedirs(path) def object_random(objects): """ random choice the object :param objects: ['object1','object2',...] :return: 'object3' """ return random.choi...
[ "lxml.etree.Element", "cv2.imwrite", "os.path.exists", "random.choice", "cv2.warpAffine", "lxml.etree.SubElement", "lxml.etree.ElementTree", "os.makedirs", "os.path.join", "numpy.max", "cv2.addWeighted", "numpy.zeros", "numpy.min", "cv2.getRotationMatrix2D", "random.random", "random.ra...
[((309, 331), 'random.choice', 'random.choice', (['objects'], {}), '(objects)\n', (322, 331), False, 'import random\n'), ((572, 615), 'numpy.zeros', 'np.zeros', (['[rows, cols, chunnel]', 'img1.dtype'], {}), '([rows, cols, chunnel], img1.dtype)\n', (580, 615), True, 'import numpy as np\n'), ((663, 704), 'cv2.addWeighte...
import os import platform import sys from os import listdir from pathlib import Path from src.create_dir import create_numbered_dirs, get_parent_dir from src.validate_windows_file_name import is_valid_windows_file_name def get_files_in(dir: str): """Returns a list of absolute paths to files sorted alphabetically...
[ "src.create_dir.create_numbered_dirs", "os.listdir", "pathlib.Path", "src.validate_windows_file_name.is_valid_windows_file_name", "os.rename", "src.create_dir.get_parent_dir", "os.path.join", "platform.system", "os.path.basename", "sys.exit" ]
[((606, 661), 'src.create_dir.create_numbered_dirs', 'create_numbered_dirs', (['parent_dir', 'start', 'number_of_dirs'], {}), '(parent_dir, start, number_of_dirs)\n', (626, 661), False, 'from src.create_dir import create_numbered_dirs, get_parent_dir\n'), ((2058, 2068), 'sys.exit', 'sys.exit', ([], {}), '()\n', (2066, ...