code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#Title: Notification Processor #Tags:plyer,python #Can process notification of your choice #plyer:built in module help you to find more information from plyer import notification def notifyme(title, message): notification.notify( title=title, message=message, app_icon='Write your icon...
[ "plyer.notification.notify" ]
[((220, 326), 'plyer.notification.notify', 'notification.notify', ([], {'title': 'title', 'message': 'message', 'app_icon': '"""Write your icon address here"""', 'timeout': '(5)'}), "(title=title, message=message, app_icon=\n 'Write your icon address here', timeout=5)\n", (239, 326), False, 'from plyer import notifi...
import logging from threading import Thread from time import sleep from multipledispatch import dispatch from dialogue_state import DialogueState from modules.dialogue_recorder import DialogueRecorder from modules.forward_planner import ForwardPlanner class DialogueImporter(Thread): """ Functionality to im...
[ "logging.getLogger", "multipledispatch.dispatch", "time.sleep" ]
[((517, 548), 'logging.getLogger', 'logging.getLogger', (['"""PyOpenDial"""'], {}), "('PyOpenDial')\n", (534, 548), False, 'import logging\n'), ((958, 972), 'multipledispatch.dispatch', 'dispatch', (['bool'], {}), '(bool)\n', (966, 972), False, 'from multipledispatch import dispatch\n'), ((1317, 1327), 'multipledispatc...
import os, sys, subprocess, tempfile, time # 创建临时文件夹,返回临时文件夹路径 TempFile = tempfile.mkdtemp(suffix='_test', prefix='python_') # 文件名 FileNum = int(time.time() * 1000) # python编译器位置 EXEC = sys.executable # 获取python版本 def get_version(): v = sys.version_info version = "python %s.%s" % (v.major, v.minor) retur...
[ "subprocess.check_output", "os.path.join", "tempfile.mkdtemp", "time.time", "os.remove" ]
[((75, 125), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {'suffix': '"""_test"""', 'prefix': '"""python_"""'}), "(suffix='_test', prefix='python_')\n", (91, 125), False, 'import os, sys, subprocess, tempfile, time\n'), ((465, 505), 'os.path.join', 'os.path.join', (['TempFile', "('%s.py' % pyname)"], {}), "(TempFile, '...
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import torch import torch.nn as nn from transformers import BertTokenizer, BertForQuestionAnswering, BertConfig from captum.attr import visualization as viz from captum.attr import LayerConductance, LayerIntegratedGradients ...
[ "matplotlib.pyplot.ylabel", "torch.softmax", "numpy.array", "torch.cuda.is_available", "numpy.linalg.norm", "torch.arange", "numpy.divide", "numpy.arange", "numpy.histogram", "captum.attr.LayerIntegratedGradients", "matplotlib.pyplot.xlabel", "IPython.display.Image", "captum.attr.visualizati...
[((440, 492), 'transformers.BertForQuestionAnswering.from_pretrained', 'BertForQuestionAnswering.from_pretrained', (['model_path'], {}), '(model_path)\n', (480, 492), False, 'from transformers import BertTokenizer, BertForQuestionAnswering, BertConfig\n'), ((554, 595), 'transformers.BertTokenizer.from_pretrained', 'Ber...
#!/bin/env python # import the technology's complete stack definition from example import stack # in order to decrease simulation times, some metal layers can be removed from # the stack, allowing more oxide layers to be merged in the next step stack.remove_metal_layer_by_name('PO1') stack.remove_metal_layer_by_name...
[ "example.stack.simplify", "example.stack.write_momentum_substrate", "example.stack.remove_metal_layer_by_name", "example.stack.draw", "example.stack.write_sonnet_technology" ]
[((248, 287), 'example.stack.remove_metal_layer_by_name', 'stack.remove_metal_layer_by_name', (['"""PO1"""'], {}), "('PO1')\n", (280, 287), False, 'from example import stack\n'), ((288, 327), 'example.stack.remove_metal_layer_by_name', 'stack.remove_metal_layer_by_name', (['"""ME1"""'], {}), "('ME1')\n", (320, 327), Fa...
#!/usr/bin/env python import os import stat from sys import platform from shutil import rmtree from subprocess import check_call def get_platform_type(): if platform == "linux" or platform == "linux2" or platform == "darwin": return "unix" elif platform == "win32": return "windows" else: ...
[ "os.chdir", "os.system", "os.path.dirname", "os.makedirs" ]
[((826, 845), 'os.chdir', 'os.chdir', (['build_dir'], {}), '(build_dir)\n', (834, 845), False, 'import os\n'), ((517, 534), 'os.makedirs', 'os.makedirs', (['root'], {}), '(root)\n', (528, 534), False, 'import os\n'), ((887, 955), 'os.system', 'os.system', (['"""emcmake cmake ../.. -DEMSCRIPTEN=ON -G "Unix Makefiles\\""...
# Generated by Django 3.1.4 on 2021-02-28 15:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('parser_vacancies', '0004_auto_20210207_0052'), ] operations = [ migrations.CreateModel( name='Vacancies_count', fiel...
[ "django.db.models.DateField", "django.db.models.IntegerField" ]
[((348, 402), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'primary_key': '(True)', 'serialize': '(False)'}), '(primary_key=True, serialize=False)\n', (367, 402), False, 'from django.db import migrations, models\n'), ((430, 470), 'django.db.models.DateField', 'models.DateField', ([], {'null': '(True)',...
#! /usr/bin/env python3 import sys import os import re import subprocess import argparse import collections import copy import decimal import vcf import pysam import pandas as pd import settings def cnv_locationtype(region, par1, par2): chrom = str(region[0]).upper() start = int(region[1]) stop = int(regio...
[ "pysam.Fastafile", "collections.namedtuple", "pandas.read_csv", "argparse.ArgumentParser", "decimal.Decimal", "copy.deepcopy", "vcf.Writer" ]
[((665, 690), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (688, 690), False, 'import argparse\n'), ((1564, 1585), 'copy.deepcopy', 'copy.deepcopy', (['record'], {}), '(record)\n', (1577, 1585), False, 'import copy\n'), ((1619, 1666), 'collections.namedtuple', 'collections.namedtuple', (['"""...
import binascii import json import os import requests from time import time from Crypto.PublicKey import RSA from Crypto.Hash import SHA256 from Crypto.Hash import RIPEMD160 from Crypto.Signature import pkcs1_15 import Validation import PySimpleGUI as sg import hashlib class Wallet: unix_time = time() def __i...
[ "requests.post", "binascii.hexlify", "PySimpleGUI.Button", "Crypto.Hash.RIPEMD160.new", "Crypto.PublicKey.RSA.import_key", "os.path.exists", "json.dumps", "Crypto.Signature.pkcs1_15.new", "PySimpleGUI.InputText", "hashlib.sha256", "PySimpleGUI.popup", "Validation.enumerate_funds", "Crypto.Pu...
[((9040, 9085), 'PySimpleGUI.Window', 'sg.Window', (['"""Python-blockchain Wallet"""', 'layout'], {}), "('Python-blockchain Wallet', layout)\n", (9049, 9085), True, 'import PySimpleGUI as sg\n'), ((301, 307), 'time.time', 'time', ([], {}), '()\n', (305, 307), False, 'from time import time\n'), ((650, 699), 'PySimpleGUI...
import requests import json import time import os import sys green = "\x1b[38;2;0;255;0m" greenish = "\x1b[38;2;93;173;110m" red = "\x1b[38;2;255;0;0m" grey = "\x1b[38;2;193;184;192m" reset = "\033[0m" clear_line = "\033[0K" # Maximum repository size in megabytes MAX_REPO_SIZE = 5 def load_cache(): result = [] ...
[ "os.path.exists", "json.loads", "os.listdir", "json.dumps", "time.sleep", "os.mkdir", "sys.stdout.flush" ]
[((353, 374), 'os.listdir', 'os.listdir', (['"""sources"""'], {}), "('sources')\n", (363, 374), False, 'import os\n'), ((1048, 1073), 'os.path.exists', 'os.path.exists', (['"""sources"""'], {}), "('sources')\n", (1062, 1073), False, 'import os\n'), ((1083, 1102), 'os.mkdir', 'os.mkdir', (['"""sources"""'], {}), "('sour...
from model import make_model, IMAGE_SIZE from tensorflow.keras.preprocessing.image import ImageDataGenerator model = make_model() batch_size = 16 # this is the augmentation configuration we will use for training train_datagen = ImageDataGenerator( rescale=1./255, shear_range=0.2, zoom_range=0.2, hori...
[ "tensorflow.keras.preprocessing.image.ImageDataGenerator", "model.make_model" ]
[((118, 130), 'model.make_model', 'make_model', ([], {}), '()\n', (128, 130), False, 'from model import make_model, IMAGE_SIZE\n'), ((231, 327), 'tensorflow.keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'rescale': '(1.0 / 255)', 'shear_range': '(0.2)', 'zoom_range': '(0.2)', 'horizontal_fli...
"""Написать функцию которая возвращают случайным образом одну карту из стандартной колоды в 36 карт, где на первом месте номинал карты номинал (6 - 10, J, D, K, A), а на втором название масти (Hearts, Diamonds, Clubs, Spades).""" import random """faces = ["6", "7", "8", "9", "10", "J", "D", "K", "A"] suits = ["Heart...
[ "random.choice" ]
[((674, 694), 'random.choice', 'random.choice', (['cards'], {}), '(cards)\n', (687, 694), False, 'import random\n')]
# -*- coding: UTF-8 -*- from unittest import TestCase class TestNumpy(TestCase): def test_dot(self): from numpy import array, dot A = array([[1,2],[3,4]], dtype='int32') B = array([[5,6],[7,8]], dtype='int32') R = array([[19,22],[43,50]], dtype='int32') for val in (dot(A,B...
[ "numpy.array", "numpy.dot", "numpy.linalg.inv", "numpy.linalg.eig" ]
[((157, 195), 'numpy.array', 'array', (['[[1, 2], [3, 4]]'], {'dtype': '"""int32"""'}), "([[1, 2], [3, 4]], dtype='int32')\n", (162, 195), False, 'from numpy import array, dot\n'), ((205, 243), 'numpy.array', 'array', (['[[5, 6], [7, 8]]'], {'dtype': '"""int32"""'}), "([[5, 6], [7, 8]], dtype='int32')\n", (210, 243), F...
# Copyright (C) [2015-2017] [Thomson Reuters LLC] # Copyright (C) [2015-2017] [<NAME>] # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unle...
[ "json.load", "graphite_api.finders.match_entries", "graphite_api.utils.is_pattern" ]
[((4330, 4360), 'graphite_api.finders.match_entries', 'match_entries', (['keys', 'sub_query'], {}), '(keys, sub_query)\n', (4343, 4360), False, 'from graphite_api.finders import match_entries\n'), ((4402, 4423), 'graphite_api.utils.is_pattern', 'is_pattern', (['sub_query'], {}), '(sub_query)\n', (4412, 4423), False, 'f...
"""create pipeline_retries table Revision ID: d04cf726555d Revises: <PASSWORD> Create Date: 2021-09-02 13:04:36.053768 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd04cf726555d' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgra...
[ "alembic.op.drop_table", "sqlalchemy.Column", "alembic.op.create_foreign_key" ]
[((522, 639), 'alembic.op.create_foreign_key', 'op.create_foreign_key', (['"""fk_pipeline_retries_pipeline"""', '"""pipeline_retries"""', '"""pipelines"""', "['pipeline_id']", "['name']"], {}), "('fk_pipeline_retries_pipeline', 'pipeline_retries',\n 'pipelines', ['pipeline_id'], ['name'])\n", (543, 639), False, 'fro...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "azure.cli.testsdk.StorageAccountPreparer", "os.path.join", "os.path.realpath", "azure.cli.testsdk.JMESPathCheck", "azure.cli.testsdk.ResourceGroupPreparer" ]
[((595, 618), 'azure.cli.testsdk.ResourceGroupPreparer', 'ResourceGroupPreparer', ([], {}), '()\n', (616, 618), False, 'from azure.cli.testsdk import ResourceGroupPreparer, StorageAccountPreparer, JMESPathCheck, ScenarioTest\n'), ((624, 648), 'azure.cli.testsdk.StorageAccountPreparer', 'StorageAccountPreparer', ([], {}...
"""Fixtures for tests.py (Dogs API testing)""" import pytest import requests URLS = ["https://dog.ceo/dog-api/", "https://dog.ceo/api/breeds/list/all", "https://dog.ceo/api/breeds/image/random", "https://dog.ceo/api/breeds/image/random/3", "https://dog.ceo/api/breed/hound/images", ...
[ "pytest.fixture", "requests.get" ]
[((856, 884), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'PAIRS'}), '(params=PAIRS)\n', (870, 884), False, 'import pytest\n'), ((1148, 1164), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1162, 1164), False, 'import pytest\n'), ((1361, 1377), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1375...
# -*- coding: utf-8 -*- #!/usr/bin/env python3 from __future__ import print_function import numpy as np import os import argparse import time import pandas as pd from termcolor import colored from analytics.analyzer import Sentinel2Analyzer parser = argparse.ArgumentParser(description='Sentinel 2 All band median anal...
[ "os.listdir", "analytics.analyzer.Sentinel2Analyzer", "argparse.ArgumentParser", "os.path.join", "os.path.basename", "pandas.DataFrame", "time.time", "pandas.to_datetime" ]
[((252, 328), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Sentinel 2 All band median analytics """'}), "(description='Sentinel 2 All band median analytics ')\n", (275, 328), False, 'import argparse\n'), ((671, 690), 'analytics.analyzer.Sentinel2Analyzer', 'Sentinel2Analyzer', ([], {})...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/9/16 13:23 # @Author : JackyLUO # @E-mail : <EMAIL> # @Site : # @File : read_mat.py # @Software: PyCharm import pandas as pd import scipy.io as scio dataFile = "roc_curves/CUHKMED/roc_curve.mat" data = scio.loadmat(dataFile) fpr = data['fpr'][0...
[ "pandas.DataFrame", "scipy.io.loadmat" ]
[((277, 299), 'scipy.io.loadmat', 'scio.loadmat', (['dataFile'], {}), '(dataFile)\n', (289, 299), True, 'import scipy.io as scio\n'), ((349, 387), 'pandas.DataFrame', 'pd.DataFrame', (["{'FPR': fpr, 'TPR': tpr}"], {}), "({'FPR': fpr, 'TPR': tpr})\n", (361, 387), True, 'import pandas as pd\n')]
import os from datetime import datetime, timedelta from src.database.models.user import User # noqa from src.database.models.file import File # noqa from src.database.session import db_session # noqa from src.utils.hash import hash_pass from sqlalchemy.orm.exc import NoResultFound from src.utils.cipher import encr...
[ "src.database.session.db_session.commit", "src.database.session.db_session.rollback", "datetime.datetime.fromtimestamp", "src.utils.hash.hash_md5", "src.utils.hash.hash_pass", "src.database.session.db_session.add", "src.utils.hash.generate_token", "src.database.session.db_session.flush", "src.databa...
[((1811, 1830), 'src.database.session.db_session.commit', 'db_session.commit', ([], {}), '()\n', (1828, 1830), False, 'from src.database.session import db_session\n'), ((604, 624), 'src.database.session.db_session.add', 'db_session.add', (['user'], {}), '(user)\n', (618, 624), False, 'from src.database.session import d...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ "symbolic_functionals.syfes.symbolic.enhancement_factors.f_b97_x2_short.eval", "numpy.random.rand", "symbolic_functionals.syfes.symbolic.enhancement_factors.f_cos_wb97mv_short.make_isomorphic_copy", "symbolic_functionals.syfes.symbolic.enhancement_factors.f_b97_x2_short.get_symbolic_expression", "symbolic_f...
[((1008, 1049), 'jax.config.update', 'jax.config.update', (['"""jax_enable_x64"""', '(True)'], {}), "('jax_enable_x64', True)\n", (1025, 1049), False, 'import jax\n'), ((6022, 6059), 'absl.testing.parameterized.parameters', 'parameterized.parameters', (['(False)', '(True)'], {}), '(False, True)\n', (6046, 6059), False,...
import pytest def test_cube(): from demo.demo import cube assert cube(2) == 8
[ "demo.demo.cube" ]
[((74, 81), 'demo.demo.cube', 'cube', (['(2)'], {}), '(2)\n', (78, 81), False, 'from demo.demo import cube\n')]
import json from typing import Dict, TypeVar from ..paths import config_dir_path, config_path from ..cli.log import warn V = TypeVar("V") class Config: def __init__(self): self.options = [ 'wallpapers_folder' ] def check(self, create: bool=False): if not config_dir_path.i...
[ "json.load", "json.dump", "typing.TypeVar" ]
[((126, 138), 'typing.TypeVar', 'TypeVar', (['"""V"""'], {}), "('V')\n", (133, 138), False, 'from typing import Dict, TypeVar\n'), ((752, 769), 'json.load', 'json.load', (['config'], {}), '(config)\n', (761, 769), False, 'import json\n'), ((890, 917), 'json.dump', 'json.dump', (['new_dict', 'config'], {}), '(new_dict, ...
import functools from time import sleep import logging def retries(max_tries, should_retry, delay=1, backoff=2): """ Decorator that implements exponential backoff retry logic. If you have a function that may fail, this decorator can catch the exception and retry at exponentially increasing intervals u...
[ "time.sleep", "logging.info", "functools.wraps" ]
[((733, 754), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (748, 754), False, 'import functools\n'), ((1055, 1124), 'logging.info', 'logging.info', (["('Caught %s with %s retries left' % (e, tries_remaining))"], {}), "('Caught %s with %s retries left' % (e, tries_remaining))\n", (1067, 1124), False...
import ctypes import ida_ida import ida_funcs import ida_graph import ida_idaapi import ida_kernwin import ida_hexrays from PyQt5 import QtWidgets, QtGui, QtCore, sip from lucid.ui.sync import MicroCursorHighlight from lucid.ui.subtree import MicroSubtreeView from lucid.util.python import register_callback, notify_c...
[ "ida_kernwin.jumpto", "ida_kernwin.get_screen_ea", "ida_kernwin.create_empty_widget", "lucid.microtext.translate_mtext_position", "ida_funcs.get_func", "PyQt5.QtWidgets.QVBoxLayout", "lucid.microtext.remap_mtext_position", "ida_kernwin.PluginForm.TWidgetToPyQtWidget", "PyQt5.QtWidgets.QGroupBox", ...
[((1926, 1959), 'lucid.ui.subtree.MicroSubtreeView', 'MicroSubtreeView', (['insn_token.insn'], {}), '(insn_token.insn)\n', (1942, 1959), False, 'from lucid.ui.subtree import MicroSubtreeView\n'), ((2164, 2208), 'ida_graph.viewer_set_titlebar_height', 'ida_graph.viewer_set_titlebar_height', (['gv', '(15)'], {}), '(gv, 1...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.PaidOuterCardCycleSellConfDTO import PaidOuterCardCycleSellConfDTO from alipay.aop.api.domain.PaidOuterCardManageUrlConfDTO import PaidOuterCardManageUrlConfDTO from alipay.aop.api....
[ "alipay.aop.api.domain.PaidOuterCardManageUrlConfDTO.PaidOuterCardManageUrlConfDTO.from_alipay_dict", "alipay.aop.api.domain.PaidOuterCardSellingConfDTO.PaidOuterCardSellingConfDTO.from_alipay_dict", "alipay.aop.api.domain.PaidOuterCardCycleSellConfDTO.PaidOuterCardCycleSellConfDTO.from_alipay_dict" ]
[((898, 951), 'alipay.aop.api.domain.PaidOuterCardCycleSellConfDTO.PaidOuterCardCycleSellConfDTO.from_alipay_dict', 'PaidOuterCardCycleSellConfDTO.from_alipay_dict', (['value'], {}), '(value)\n', (944, 951), False, 'from alipay.aop.api.domain.PaidOuterCardCycleSellConfDTO import PaidOuterCardCycleSellConfDTO\n'), ((125...
import requests import argparse import urllib3 from urllib3.exceptions import InsecureRequestWarning urllib3.disable_warnings(InsecureRequestWarning) parser = argparse.ArgumentParser() parser.add_argument("--TARGET_IP", help="IP address of the firewall", type=str) parser.add_argument("--api_key", help="Firewall API K...
[ "urllib3.disable_warnings", "requests.post", "argparse.ArgumentParser" ]
[((101, 149), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['InsecureRequestWarning'], {}), '(InsecureRequestWarning)\n', (125, 149), False, 'import urllib3\n'), ((161, 186), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (184, 186), False, 'import argparse\n'), ((871, 916), 'reques...
# ============================================================================ # Copyright 2018-2019 Open-MMLab. All rights reserved. # Apache License # Version 2.0, January 2004 # http://www.apache.org/licenses/ # # TERMS AND CONDITI...
[ "mmskeleton.utils.call_obj", "torch.onnx.export", "argparse.ArgumentParser", "mmskeleton.utils.load_checkpoint" ]
[((1785, 1871), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""ST-GCN Pytorch model convert to ONNX model"""'}), "(description=\n 'ST-GCN Pytorch model convert to ONNX model')\n", (1808, 1871), False, 'import argparse\n'), ((2535, 2556), 'mmskeleton.utils.call_obj', 'call_obj', ([], {...
# fits better in a StyleGAN or small network implementation, but provides a good # proof of concept (especially for things like fashion MNIST) import tensorflow as tf from .utils import Conv2D as SpecializedConv2D def nslice(rank, dim): start = tuple(slice(None) for i in range(dim)) end = tuple(slice(None) for...
[ "tensorflow.math.reduce_prod", "tensorflow.math.cumsum", "tensorflow.keras.activations.get", "tensorflow.shape", "tensorflow.nn.relu", "tensorflow.ones", "tensorflow.math.cumprod", "tensorflow.range", "tensorflow.concat", "tensorflow.tensor_scatter_nd_update", "tensorflow.constant", "tensorflo...
[((1055, 1092), 'tensorflow.ones', 'tf.ones', (['(self.rank,)'], {'dtype': 'tf.int64'}), '((self.rank,), dtype=tf.int64)\n', (1062, 1092), True, 'import tensorflow as tf\n'), ((1109, 1167), 'tensorflow.tensor_scatter_nd_update', 'tf.tensor_scatter_nd_update', (['shape', '[[self.primary]]', '[-1]'], {}), '(shape, [[self...
from django.shortcuts import render, redirect from django.urls import reverse from django.views.generic import ListView from django.views.generic.detail import DetailView from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.db.models import Q from .models i...
[ "django.shortcuts.render", "django.db.models.Q", "django.urls.reverse" ]
[((1402, 1455), 'django.shortcuts.render', 'render', (['request', '"""post/new_post.html"""', "{'form': form}"], {}), "(request, 'post/new_post.html', {'form': form})\n", (1408, 1455), False, 'from django.shortcuts import render, redirect\n'), ((1493, 1531), 'django.shortcuts.render', 'render', (['request', '"""post/us...
#!/usr/bin/env python # coding: utf-8 # # Developing an AI application # # Going forward, AI algorithms will be incorporated into more and more everyday applications. For example, you might want to include an image classifier in a smart phone app. To do this, you'd use a deep learning model trained on hundreds of tho...
[ "numpy.clip", "torch.nn.ReLU", "tarfile.open", "torch.nn.Dropout", "torch.exp", "torch.from_numpy", "numpy.array", "os.walk", "seaborn.color_palette", "torchvision.datasets.ImageFolder", "subprocess.call", "torchvision.transforms.ToTensor", "torchvision.transforms.RandomResizedCrop", "torc...
[((5005, 5064), 'torchvision.datasets.ImageFolder', 'datasets.ImageFolder', (['train_dir'], {'transform': 'train_transforms'}), '(train_dir, transform=train_transforms)\n', (5025, 5064), False, 'from torchvision import datasets, transforms, models\n'), ((5077, 5134), 'torchvision.datasets.ImageFolder', 'datasets.ImageF...
from config import db, ma class Notification(db.Model): __tablename__ = "notification" __table_args__ = {"schema": "eagle_db"} id = db.Column(db.Integer(), primary_key=True) isActive = db.Column(db.Boolean()) lastUpdated = db.Column(db.String(20)) toUserId = db.Column(db.Integer(), db...
[ "config.db.ForeignKey", "config.db.String", "config.db.Integer", "config.db.Boolean" ]
[((162, 174), 'config.db.Integer', 'db.Integer', ([], {}), '()\n', (172, 174), False, 'from config import db, ma\n'), ((220, 232), 'config.db.Boolean', 'db.Boolean', ([], {}), '()\n', (230, 232), False, 'from config import db, ma\n'), ((263, 276), 'config.db.String', 'db.String', (['(20)'], {}), '(20)\n', (272, 276), F...
#!/usr/bin/env python3 from spiceypy import spiceypy as spice from lincov.spice_loader import SpiceLoader import pandas as pd import numpy as np from scipy.linalg import norm from scipy.stats import chi2 import sys import matplotlib matplotlib.use('TKAgg') import matplotlib.pyplot as plt from matplotlib.patches imp...
[ "matplotlib.use", "spiceypy.spiceypy.spkez", "lincov.spice_loader.SpiceLoader", "lincov.frames.compute_T_inrtl_to_lvlh", "lincov.LinCov.load_covariance", "matplotlib.pyplot.show" ]
[((237, 260), 'matplotlib.use', 'matplotlib.use', (['"""TKAgg"""'], {}), "('TKAgg')\n", (251, 260), False, 'import matplotlib\n'), ((873, 925), 'lincov.LinCov.load_covariance', 'LinCov.load_covariance', (['label', 'count', 'snapshot_label'], {}), '(label, count, snapshot_label)\n', (895, 925), False, 'from lincov impor...
import redis redis_db = redis.StrictRedis(host="nn-sq-svc", port=6379, db=0) print(redis_db.keys()) redis_db.set('n_samples',100000) redis_db.set('epochs', 150) redis_db.set('batch_size', 1000) redis_db.set('mid_range', 10)
[ "redis.StrictRedis" ]
[((25, 77), 'redis.StrictRedis', 'redis.StrictRedis', ([], {'host': '"""nn-sq-svc"""', 'port': '(6379)', 'db': '(0)'}), "(host='nn-sq-svc', port=6379, db=0)\n", (42, 77), False, 'import redis\n')]
import unittest import ifm_contrib as ifm from ifm import Enum import numpy as np import geopandas as gpd import pandas as pd class TestPlot(unittest.TestCase): def test_faces(self): ifm.forceLicense("Viewer") self.doc = ifm.loadDocument(r".\models\example_2D.dac") self.doc.c.plot.faces() ...
[ "unittest.main", "ifm_contrib.loadDocument", "ifm_contrib.forceLicense" ]
[((1894, 1909), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1907, 1909), False, 'import unittest\n'), ((197, 223), 'ifm_contrib.forceLicense', 'ifm.forceLicense', (['"""Viewer"""'], {}), "('Viewer')\n", (213, 223), True, 'import ifm_contrib as ifm\n'), ((243, 288), 'ifm_contrib.loadDocument', 'ifm.loadDocument...
import os import uuid from werkzeug.utils import secure_filename from pathlib import Path import random from flask import Flask, flash, request, redirect, url_for, render_template, jsonify from flask_cors import CORS, cross_origin import chaosencryptor.src.models from PIL import Image import json DEBUG = False dirp = ...
[ "flask.render_template", "flask.request.args.get", "PIL.Image.open", "flask_cors.CORS", "flask.Flask", "pathlib.Path", "json.dumps", "os.path.join", "flask.request.form.get", "uuid.uuid4", "os.path.basename", "random.randint" ]
[((364, 395), 'os.path.join', 'os.path.join', (['dirp', '"""templates"""'], {}), "(dirp, 'templates')\n", (376, 395), False, 'import os\n'), ((412, 451), 'os.path.join', 'os.path.join', (['template_folder', '"""static"""'], {}), "(template_folder, 'static')\n", (424, 451), False, 'import os\n'), ((467, 494), 'os.path.j...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch import os from modules.model import BertForSequenceClassification_tpr from utils.data_utils import convert_examples_to_features, logger from transformers.file_utils import PYTORCH_PRETRAINED_BERT_...
[ "torch.utils.data.distributed.DistributedSampler", "modules.model.BertForSequenceClassification_tpr", "torch.distributed.get_world_size", "torch.optim.SGD", "torch.utils.data.SequentialSampler", "torch.utils.data.TensorDataset", "utils.data_utils.logger.info", "transformers.optimization.WarmupLinearSc...
[((883, 916), 'os.path.join', 'os.path.join', (['args.data_dir', 'task'], {}), '(args.data_dir, task)\n', (895, 916), False, 'import os\n'), ((1246, 1425), 'utils.data_utils.convert_examples_to_features', 'convert_examples_to_features', (['examples', 'label_list', 'args.max_seq_length', 'tokenizer', 'single_sentence', ...
""" @license: MIT @repository: https://github.com/semontesdeoca/MNPR _ _ __ ___ _ __ _ __ _ __ ___ _ _ ___| |_ ___ _ __ ___ | '_ ` _ \| '_ \| '_ \| '__| / __| | | / __| __/ _ \ '_ ` _ \ | | | | | | | | | |_) | | \__ \ |_| \__ \ || __/ | | | | ...
[ "maya.cmds.hyperShade", "maya.cmds.flushUndo", "mnpr_runner.openOverrideSettings", "maya.cmds.about", "coopLib.screenshot", "coopLib.getActiveModelPanel", "mnpr_info.loadPlugin", "mnpr_runner.openPaintFX", "coopLib.setAttr", "mnpr_matPresets.setMaterialAttrs", "maya.cmds.mnpr", "maya.cmds.eval...
[((669, 691), 'mnpr_info.loadPlugin', 'mnpr_info.loadPlugin', ([], {}), '()\n', (689, 691), False, 'import mnpr_info\n'), ((2115, 2140), 'coopLib.getActiveModelPanel', 'lib.getActiveModelPanel', ([], {}), '()\n', (2138, 2140), True, 'import coopLib as lib\n'), ((2145, 2189), 'maya.cmds.modelEditor', 'cmds.modelEditor',...
# blogs_posts/forms.py from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField, SubmitField from wtforms.validators import DataRequired class BlogPostForm(FlaskForm): title = StringField("Title", validators=[DataRequired()]) text = TextAreaField("Text", validators=[DataRequired()]) ...
[ "wtforms.validators.DataRequired", "wtforms.SubmitField" ]
[((330, 349), 'wtforms.SubmitField', 'SubmitField', (['"""Post"""'], {}), "('Post')\n", (341, 349), False, 'from wtforms import StringField, TextAreaField, SubmitField\n'), ((238, 252), 'wtforms.validators.DataRequired', 'DataRequired', ([], {}), '()\n', (250, 252), False, 'from wtforms.validators import DataRequired\n...
# Generated by Django 3.1.7 on 2021-02-26 08:07 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((337, 430), '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", (353, 430), False, 'from django.db import migrations, models\...
from model import efficientdet import cv2 import os import numpy as np import time from utils import preprocess_image from utils.anchors import anchors_for_shape from utils.draw_boxes import draw_boxes from utils.post_process_boxes import post_process_boxes def main(): os.environ['CUDA_VISIBLE_DEVICES'] = '0' ...
[ "utils.preprocess_image", "utils.anchors.anchors_for_shape", "numpy.where", "utils.draw_boxes.draw_boxes", "utils.post_process_boxes.post_process_boxes", "cv2.imshow", "numpy.squeeze", "cv2.waitKey", "numpy.random.randint", "model.efficientdet", "numpy.expand_dims", "time.time", "cv2.namedWi...
[((921, 1036), 'model.efficientdet', 'efficientdet', ([], {'phi': 'phi', 'weighted_bifpn': 'weighted_bifpn', 'num_classes': 'num_classes', 'score_threshold': 'score_threshold'}), '(phi=phi, weighted_bifpn=weighted_bifpn, num_classes=\n num_classes, score_threshold=score_threshold)\n', (933, 1036), False, 'from model...
"""Stake Program Constants.""" from solana.publickey import PublicKey STAKE_PROGRAM_ID: PublicKey = PublicKey("Stake11111111111111111111111111111111111111") """Public key that identifies the Stake program.""" SYSVAR_STAKE_CONFIG_ID: PublicKey = PublicKey("StakeConfig11111111111111111111111111111111") """Public key t...
[ "solana.publickey.PublicKey" ]
[((102, 158), 'solana.publickey.PublicKey', 'PublicKey', (['"""Stake11111111111111111111111111111111111111"""'], {}), "('Stake11111111111111111111111111111111111111')\n", (111, 158), False, 'from solana.publickey import PublicKey\n'), ((248, 304), 'solana.publickey.PublicKey', 'PublicKey', (['"""StakeConfig111111111111...
import pytest from rdkit import Chem from aizynthfinder.chem import MoleculeException, Molecule def test_no_input(): with pytest.raises(MoleculeException): Molecule() def test_create_with_mol(): rd_mol = Chem.MolFromSmiles("O") mol = Molecule(rd_mol=rd_mol) assert mol.smiles == "O" def ...
[ "aizynthfinder.chem.Molecule", "rdkit.Chem.MolFromSmiles", "rdkit.Chem.MolToSmiles", "pytest.raises" ]
[((225, 248), 'rdkit.Chem.MolFromSmiles', 'Chem.MolFromSmiles', (['"""O"""'], {}), "('O')\n", (243, 248), False, 'from rdkit import Chem\n'), ((260, 283), 'aizynthfinder.chem.Molecule', 'Molecule', ([], {'rd_mol': 'rd_mol'}), '(rd_mol=rd_mol)\n', (268, 283), False, 'from aizynthfinder.chem import MoleculeException, Mol...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import jso...
[ "json.loads" ]
[((1248, 1316), 'json.loads', 'json.loads', (["self.default_version_metadata['config'][imports_to_load]"], {}), "(self.default_version_metadata['config'][imports_to_load])\n", (1258, 1316), False, 'import json\n')]
import tensorflow as tf def sum(): return tf.ones([2,2,2]) def resize_by_axis(image, dim_1, dim_2, ax): resized_list = [] unstack_img_depth_list = tf.unstack(image, axis = ax) for i in unstack_img_depth_list: resized_list.append(tf.image.resize(i, [dim_1, dim_2])) stack_img = tf.stack(resized_list, axis=ax) ...
[ "tensorflow.unstack", "tensorflow.image.resize", "tensorflow.stack", "tensorflow.ones" ]
[((44, 62), 'tensorflow.ones', 'tf.ones', (['[2, 2, 2]'], {}), '([2, 2, 2])\n', (51, 62), True, 'import tensorflow as tf\n'), ((151, 177), 'tensorflow.unstack', 'tf.unstack', (['image'], {'axis': 'ax'}), '(image, axis=ax)\n', (161, 177), True, 'import tensorflow as tf\n'), ((285, 316), 'tensorflow.stack', 'tf.stack', (...
#!/usr/bin/env python3 import os, sys, signal import multiprocessing import subprocess as sp import shutil import shlex import psutil import time import csv import json import pytz from datetime import datetime import Lib as lib sys.path.append('/home/jrchang/workspace/gym-OptClang/gym_OptClang/envs/') import RemoteWo...
[ "pytz.timezone", "RemoteWorker.Programs", "os.makedirs", "os.getenv", "json.dump", "time.perf_counter", "Lib.EnvResponseActor", "os.getcwd", "os.chdir", "Lib.EnvBuilder", "sys.path.append", "os.walk" ]
[((230, 304), 'sys.path.append', 'sys.path.append', (['"""/home/jrchang/workspace/gym-OptClang/gym_OptClang/envs/"""'], {}), "('/home/jrchang/workspace/gym-OptClang/gym_OptClang/envs/')\n", (245, 304), False, 'import os, sys, signal\n'), ((448, 464), 'RemoteWorker.Programs', 'rwork.Programs', ([], {}), '()\n', (462, 46...
#!/usr/bin/env python3 import sys sys.path.append('../..') import numpy as np from neml.cp import crystallography from neml.math import rotations import matplotlib.pyplot as plt if __name__ == "__main__": N = 300 orientations = rotations.random_orientations(N) sgroup = crystallography.SymmetryGroup("432") ...
[ "matplotlib.pyplot.hist", "neml.cp.crystallography.SymmetryGroup", "neml.math.rotations.random_orientations", "matplotlib.pyplot.figure", "numpy.rad2deg", "sys.path.append", "matplotlib.pyplot.show" ]
[((35, 59), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (50, 59), False, 'import sys\n'), ((238, 270), 'neml.math.rotations.random_orientations', 'rotations.random_orientations', (['N'], {}), '(N)\n', (267, 270), False, 'from neml.math import rotations\n'), ((283, 319), 'neml.cp.crystall...
import numpy import pandas as pd # 替换异常值 if __name__ == '__main__': df = pd.read_csv("../dataset/temp4.csv") df.replace(to_replace='-', value=0.5, inplace=True) print(df.head(3)) df.to_csv("../dataset/temp5.csv", index=False)
[ "pandas.read_csv" ]
[((78, 113), 'pandas.read_csv', 'pd.read_csv', (['"""../dataset/temp4.csv"""'], {}), "('../dataset/temp4.csv')\n", (89, 113), True, 'import pandas as pd\n')]
import unittest import datetime import genetic import random class Node: Value = None Left = None Right = None def __init__(self, value, left=None, right=None): self.Value = value self.Left = left self.Right = right def isFunction(self): return self.Left is not No...
[ "unittest.main", "datetime.datetime.now", "genetic.getBest", "random.randint" ]
[((13637, 13652), 'unittest.main', 'unittest.main', ([], {}), '()\n', (13650, 13652), False, 'import unittest\n'), ((3240, 3263), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (3261, 3263), False, 'import datetime\n'), ((4884, 4907), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\...
from graphene import Schema, Mutation, String, Field, ID, List from minio import Minio from minio.error import ResponseError from .minio_bucket import MinioBucket from minio_client.client import minio_client class CreateMinioBucket(Mutation): # Use minio bucket type definition to be returned when created Output ...
[ "graphene.String", "minio_client.client.minio_client.make_bucket" ]
[((429, 437), 'graphene.String', 'String', ([], {}), '()\n', (435, 437), False, 'from graphene import Schema, Mutation, String, Field, ID, List\n'), ((529, 566), 'minio_client.client.minio_client.make_bucket', 'minio_client.make_bucket', (['bucket_name'], {}), '(bucket_name)\n', (553, 566), False, 'from minio_client.cl...
import mock import pytest from openapi_core.schema.links.models import Link from openapi_core.schema.servers.models import Server class TestLinks(object): @pytest.fixture def link_factory(self): def link_factory(request_body, server): parameters = { 'par1': mock.sentinel....
[ "pytest.mark.parametrize", "openapi_core.schema.servers.models.Server", "openapi_core.schema.links.models.Link" ]
[((861, 903), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""server"""', 'servers'], {}), "('server', servers)\n", (884, 903), False, 'import pytest\n'), ((909, 967), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""request_body"""', 'request_body_list'], {}), "('request_body', request_body_list...
import sys from collections import deque n = int(sys.stdin.readline()) deck = deque(list(range(1, n+1))) for i in range(n-1): deck.popleft() deck.append(deck.popleft()) print(str(deck.pop()))
[ "sys.stdin.readline" ]
[((50, 70), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (68, 70), False, 'import sys\n')]
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from django.urls import URLPattern DEBUG: bool = True DEFAULT_FROM_EMAIL: str = '<EMAIL>' SECRET_KEY: str = 'not so secret' MY_SETTING: URLPattern = URLPattern(pattern='foo', callback=l...
[ "django.urls.URLPattern" ]
[((284, 333), 'django.urls.URLPattern', 'URLPattern', ([], {'pattern': '"""foo"""', 'callback': '(lambda : None)'}), "(pattern='foo', callback=lambda : None)\n", (294, 333), False, 'from django.urls import URLPattern\n')]
import json from datetime import timedelta, datetime from requests import get from airflow import DAG from airflow.models import Variable from airflow.operators.python_operator import PythonOperator # Config variables # dag_config = Variable.get("hello_world_variables", deserialize_json=True) default_args = { 'o...
[ "datetime.datetime", "airflow.operators.python_operator.PythonOperator", "requests.get", "airflow.DAG", "datetime.timedelta" ]
[((813, 902), 'airflow.DAG', 'DAG', (['"""fake_rest_api"""'], {'default_args': 'default_args', 'schedule_interval': 'schedule_interval'}), "('fake_rest_api', default_args=default_args, schedule_interval=\n schedule_interval)\n", (816, 902), False, 'from airflow import DAG\n'), ((1219, 1327), 'airflow.operators.pytho...
from pathlib import Path import dash_core_components as dcc import dash_bootstrap_components as dbc import dash_html_components as html import plotly import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots # -------------------- Graphing Functions -------------------- ...
[ "plotly.express.line", "plotly.express.scatter", "pathlib.Path" ]
[((698, 846), 'plotly.express.line', 'px.line', (['curr_chrom_data'], {'x': '"""Window"""', 'y': '"""Value"""', 'category_orders': "{'Sample': samples}", 'color': '"""Sample"""', 'color_discrete_sequence': 'colors', 'height': '(500)'}), "(curr_chrom_data, x='Window', y='Value', category_orders={'Sample':\n samples},...
import boto3 import csv import json import argparse ''' You need to have aws configured with access tokens prior to running this script (use aws configure) ''' def batch_create(table, csv_file_name, column_names): ''' Can Handle many puts at one time. Boto3 gives an example of 50, even though max batch s...
[ "boto3.resource", "json.dumps", "csv.reader" ]
[((2087, 2133), 'boto3.resource', 'boto3.resource', (['"""dynamodb"""'], {'region_name': 'region'}), "('dynamodb', region_name=region)\n", (2101, 2133), False, 'import boto3\n'), ((1335, 1355), 'csv.reader', 'csv.reader', (['csv_file'], {}), '(csv_file)\n', (1345, 1355), False, 'import csv\n'), ((577, 597), 'csv.reader...
import numpy as np import scipy as sp import ast import os from quchem.Unitary_Partitioning.Graph import Clique_cover_Hamiltonian import quchem.Misc_functions.conversion_scripts as conv_scr from copy import deepcopy from quchem.Unitary_Partitioning.Unitary_partitioning_LCU_method import LCU_linalg_Energy from openf...
[ "os.listdir", "pickle.dump", "numpy.isclose", "os.path.join", "pickle.load", "os.getcwd", "quchem.Unitary_Partitioning.Unitary_partitioning_LCU_method.LCU_linalg_Energy", "quchem.Misc_functions.conversion_scripts.Get_Openfermion_Hamiltonian", "datetime.datetime.now", "copy.deepcopy", "os.path.ab...
[((554, 591), 'os.path.join', 'os.path.join', (['working_dir', '"""Analysis"""'], {}), "(working_dir, 'Analysis')\n", (566, 591), False, 'import os\n'), ((613, 670), 'os.path.join', 'os.path.join', (['Analysis_dir', '"""SeqRot_LCU_script_A_results"""'], {}), "(Analysis_dir, 'SeqRot_LCU_script_A_results')\n", (625, 670)...
# --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.13.0 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # # PN Ou 5:...
[ "astropy.coordinates.ICRS", "astropy.table.Table", "pathlib.Path", "astropy.coordinates.SkyCoord", "astropy.io.fits.open", "astropy.table.Table.read" ]
[((439, 465), 'pathlib.Path', 'Path', (['"""../data/originals/"""'], {}), "('../data/originals/')\n", (443, 465), False, 'from pathlib import Path\n'), ((802, 818), 'astropy.table.Table', 'Table', ([], {'rows': 'data'}), '(rows=data)\n', (807, 818), False, 'from astropy.table import Table\n'), ((1512, 1576), 'astropy.c...
import project_test from common.contrail_test_init import ContrailTestInit from common.connections import ContrailConnections import os import fixtures from test import BaseTestCase import time from floating_ip import * from vn_test import * from control_node import * from common import isolated_creds from tcutils.util...
[ "os.environ.get" ]
[((1886, 1914), 'os.environ.get', 'os.environ.get', (['"""MX_GW_TEST"""'], {}), "('MX_GW_TEST')\n", (1900, 1914), False, 'import os\n'), ((2830, 2858), 'os.environ.get', 'os.environ.get', (['"""MX_GW_TEST"""'], {}), "('MX_GW_TEST')\n", (2844, 2858), False, 'import os\n'), ((3829, 3857), 'os.environ.get', 'os.environ.ge...
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
[ "pydantic.Field" ]
[((778, 835), 'pydantic.Field', 'Field', (['"""getVoiceChatAvailableParticipants"""'], {'alias': '"""@type"""'}), "('getVoiceChatAvailableParticipants', alias='@type')\n", (783, 835), False, 'from pydantic import Field\n')]
import logging import os from scapy.all import IP, TCP import actions.tree import actions.drop import actions.tamper import actions.duplicate import actions.utils import layers.packet def test_init(): """ Tests initialization """ print(actions.action.Action.get_actions("out")) def test_count_leaves...
[ "logging.getLogger", "os.path.exists", "scapy.all.TCP", "scapy.all.IP", "os.remove" ]
[((425, 450), 'logging.getLogger', 'logging.getLogger', (['"""test"""'], {}), "('test')\n", (442, 450), False, 'import logging\n'), ((1143, 1168), 'logging.getLogger', 'logging.getLogger', (['"""test"""'], {}), "('test')\n", (1160, 1168), False, 'import logging\n'), ((1892, 1917), 'logging.getLogger', 'logging.getLogge...
#!/usr/bin/python3 import json import re import boto3 import botocore from . import provider class S3(provider.Provider): def __init__(self, access_key_id, bucket, cacert, endpoint, no_ssl_verify, region, secret_access_key, staging_directory): """Create a new S3 provider which allows interaction with S3...
[ "boto3.resource", "re.compile" ]
[((1389, 1419), 'boto3.resource', 'boto3.resource', (['"""s3"""'], {}), "('s3', **kwargs)\n", (1403, 1419), False, 'import boto3\n'), ((4528, 4713), 're.compile', 're.compile', (['"""([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3])_([0-5][0-9])_([0-5][0-9]|60)(\\\\.[0-9]+)?(([Zz])|([\\\\+|\\\\-](...
import random import string # Gera um número inteiro entra A e B # inteiro = random.randint(10, 20) # Gera um número de ponto flutuante entra A e B # flutuante = random.uniform(10, 20) # Gera um número de ponto flutuante entre 0.0 e 1.0 flutuante = random.random() # Gerar um número aleatório usando a função range()...
[ "random.sample", "random.shuffle", "random.randrange", "random.choices", "random.random" ]
[((252, 267), 'random.random', 'random.random', ([], {}), '()\n', (265, 267), False, 'import random\n'), ((384, 415), 'random.randrange', 'random.randrange', (['(900)', '(1000)', '(10)'], {}), '(900, 1000, 10)\n', (400, 415), False, 'import random\n'), ((551, 574), 'random.sample', 'random.sample', (['lista', '(2)'], {...
import json from aio_pika import Message, DeliveryMode, ExchangeType from lib.ipc.util import poll_for_async_connection class Emitter: def __init__(self): self.connection = None self.event_exchange = None async def connect(self, loop): # Perform connection self.connection = a...
[ "json.dumps", "lib.ipc.util.poll_for_async_connection" ]
[((325, 356), 'lib.ipc.util.poll_for_async_connection', 'poll_for_async_connection', (['loop'], {}), '(loop)\n', (350, 356), False, 'from lib.ipc.util import poll_for_async_connection\n'), ((695, 711), 'json.dumps', 'json.dumps', (['body'], {}), '(body)\n', (705, 711), False, 'import json\n')]
# Copyright 2019 Systems & Technology Research, LLC # Use of this software is governed by the license.txt file. import os import numpy as np import torch import torch.nn as nn import torchvision.transforms as transforms import torch.nn.functional as F from PIL import ImageFilter def prepare_vggface_image(img): ...
[ "torchvision.transforms.CenterCrop", "torch.nn.ReLU", "torch.nn.Dropout", "numpy.random.random", "torch.load", "numpy.rollaxis", "torchvision.transforms.Lambda", "torch.from_numpy", "torch.nn.Conv2d", "torch.nn.functional.normalize", "numpy.array", "torchvision.transforms.RandomCrop", "torch...
[((730, 759), 'numpy.rollaxis', 'np.rollaxis', (['img_bgr_fp', '(2)', '(0)'], {}), '(img_bgr_fp, 2, 0)\n', (741, 759), True, 'import numpy as np\n'), ((1862, 1896), 'torchvision.transforms.Compose', 'transforms.Compose', (['transform_list'], {}), '(transform_list)\n', (1880, 1896), True, 'import torchvision.transforms ...
#!/usr/bin/python import os import sys sys.path.append("/usr/local/munki/munkilib") import FoundationPlist RESULTS_PATH = "/usr/local/sal/plugin_results.plist" def main(): ard_path = "/Library/Preferences/com.apple.RemoteDesktop.plist" if os.path.exists(ard_path): ard_prefs = FoundationPlist.read...
[ "os.path.exists", "FoundationPlist.readPlist", "sys.path.append", "FoundationPlist.writePlist" ]
[((42, 86), 'sys.path.append', 'sys.path.append', (['"""/usr/local/munki/munkilib"""'], {}), "('/usr/local/munki/munkilib')\n", (57, 86), False, 'import sys\n'), ((254, 278), 'os.path.exists', 'os.path.exists', (['ard_path'], {}), '(ard_path)\n', (268, 278), False, 'import os\n'), ((679, 707), 'os.path.exists', 'os.pat...
#!/usr/bin/env python # SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import os import shutil import sys import unittest from subprocess import STDOUT, run from test_utils import compare_folders, fill_sector, generate_local_folder_structure, generate_test_...
[ "os.path.exists", "fatfsgen.FATFS", "test_utils.compare_folders", "os.listdir", "os.makedirs", "subprocess.run", "test_utils.generate_test_dir_2", "test_utils.fill_sector", "os.path.dirname", "test_utils.generate_local_folder_structure", "shutil.rmtree", "unittest.main", "os.remove" ]
[((10738, 10753), 'unittest.main', 'unittest.main', ([], {}), '()\n', (10751, 10753), False, 'import unittest\n'), ((356, 381), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (371, 381), False, 'import os\n'), ((518, 544), 'os.makedirs', 'os.makedirs', (['"""output_data"""'], {}), "('output_d...
# Copyright 2020 Bradbase import os, sys import unittest import configparser from dataclasses import asdict from requests_oauthlib import OAuth2Session from oauthlib.oauth2 import MobileApplicationClient, WebApplicationClient import httpretty import warnings from dacite import from_dict import json sys.path.insert(0...
[ "dacite.from_dict", "sys.path.insert", "httpretty.disable", "httpretty.register_uri", "httpretty.enable", "json.dumps", "harvest.Harvest", "warnings.filterwarnings", "httpretty.reset" ]
[((303, 342), 'sys.path.insert', 'sys.path.insert', (['(0)', "(sys.path[0] + '/..')"], {}), "(0, sys.path[0] + '/..')\n", (318, 342), False, 'import os, sys\n'), ((1596, 1671), 'harvest.Harvest', 'harvest.Harvest', (['"""https://api.harvestapp.com/api/v2"""', 'personal_access_token'], {}), "('https://api.harvestapp.com...
import bs4 import requests import os str = input() input_str = str str = str.replace(" ", "&20") url = "https://www.snapdeal.com/search?keyword={}&santizedKeyword=&catId=&categoryId=0&suggested=false&vertical=&noOfResults=20&searchState=&clickSrc=go_header&lastKeyword=&prodCatId=&changeBackToAll=false&foundInAll=false...
[ "os.listdir", "os.path.join", "requests.get", "bs4.BeautifulSoup", "os.mkdir" ]
[((432, 449), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (444, 449), False, 'import requests\n'), ((457, 492), 'bs4.BeautifulSoup', 'bs4.BeautifulSoup', (['response.content'], {}), '(response.content)\n', (474, 492), False, 'import bs4\n'), ((555, 574), 'os.mkdir', 'os.mkdir', (['input_str'], {}), '(inpu...
""" Slixmpp: The Slick XMPP Library Copyright (C) 2010 <NAME> This file is part of Slixmpp. See the file LICENSE for copying permission. """ import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) import asyncio # Required for python < 3.7 to use the old ssl implementation # and...
[ "logging.NullHandler", "logging.getLogger" ]
[((214, 235), 'logging.NullHandler', 'logging.NullHandler', ([], {}), '()\n', (233, 235), False, 'import logging\n'), ((175, 202), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (192, 202), False, 'import logging\n')]
from collections import defaultdict from pathlib import Path from typing import Dict, List, Optional import hydra import numpy as np import pandas as pd from omegaconf import DictConfig, OmegaConf from pytorch_lightning import ( Callback, LightningDataModule, LightningModule, Trainer, seed_everythi...
[ "src.utils.utils.get_logger", "pandas.read_csv", "src.utils.utils.log_cv_result", "pathlib.Path", "hydra.utils.instantiate", "pytorch_lightning.seed_everything", "src.utils.utils.log_hyperparameters", "numpy.array_split", "src.train.PrepareTmpFile", "collections.defaultdict", "src.utils.utils._l...
[((499, 525), 'src.utils.utils.get_logger', 'utils.get_logger', (['__name__'], {}), '(__name__)\n', (515, 525), False, 'from src.utils import utils\n'), ((1376, 1412), 'src.utils.utils._locate', 'utils._locate', (['config.model._target_'], {}), '(config.model._target_)\n', (1389, 1412), False, 'from src.utils import ut...
from agent import Qnet from agent import ReplayBuffer from agent import train q = Qnet() q_target = Qnet() q_target.load_state_dict(q.state_dict()) memory = ReplayBuffer() print_interval = 20 score = 0.0 optimizer = optim.Adam(q.parameters(), lr=learning_rate) score_history= [] for n_epi in range(30...
[ "agent.train", "agent.Qnet", "agent.ReplayBuffer" ]
[((90, 96), 'agent.Qnet', 'Qnet', ([], {}), '()\n', (94, 96), False, 'from agent import Qnet\n'), ((109, 115), 'agent.Qnet', 'Qnet', ([], {}), '()\n', (113, 115), False, 'from agent import Qnet\n'), ((168, 182), 'agent.ReplayBuffer', 'ReplayBuffer', ([], {}), '()\n', (180, 182), False, 'from agent import ReplayBuffer\n...
""" These tests check basic operation of ide.tasks.archive.do_import_archive """ import mock from django.core.exceptions import ValidationError from ide.tasks.archive import do_import_archive, InvalidProjectArchiveException from ide.utils.cloudpebble_test import CloudpebbleTestCase, make_package, make_appinfo, build_...
[ "ide.tasks.archive.do_import_archive", "mock.patch", "utils.fakes.FakeS3", "ide.utils.cloudpebble_test.make_package", "ide.models.project.Project.objects.get", "ide.utils.cloudpebble_test.make_appinfo" ]
[((447, 455), 'utils.fakes.FakeS3', 'FakeS3', ([], {}), '()\n', (453, 455), False, 'from utils.fakes import FakeS3\n'), ((459, 502), 'mock.patch', 'mock.patch', (['"""ide.models.s3file.s3"""', 'fake_s3'], {}), "('ide.models.s3file.s3', fake_s3)\n", (469, 502), False, 'import mock\n'), ((7304, 7347), 'mock.patch', 'mock...
# -*- coding: utf-8 -*- import click import os import logging import sys import pandas as pd import os, sys, inspect cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"images_in_features_subdirs"))) if cmd_subfolder not in sys.path: sys.path...
[ "logging.getLogger", "logging.basicConfig", "json.loads", "images_in_features_subdirs.images_in_features_subdirs", "pandas.read_csv", "inspect.currentframe", "training_and_validation_sets.training_and_validation_sets", "sys.path.append", "non_duplicate_lesion_id.non_duplicate_lesion_id" ]
[((312, 342), 'sys.path.append', 'sys.path.append', (['cmd_subfolder'], {}), '(cmd_subfolder)\n', (327, 342), False, 'import os, sys, inspect\n'), ((542, 572), 'sys.path.append', 'sys.path.append', (['cmd_subfolder'], {}), '(cmd_subfolder)\n', (557, 572), False, 'import os, sys, inspect\n'), ((777, 807), 'sys.path.appe...
from __future__ import print_function import numpy as np import os class BFGS_Hessian(object): """ Class to evaluate the update to inverse Hessian matrix in the L-BFGS scheme. (see wikipedia article if nothing else). H is B^-1 form that article. B_k+1 = B + yy^t / (y^ts) - B s s^t B / (s^t Bk s)...
[ "os.path.exists", "numpy.random.set_state", "os.path.join", "numpy.max", "numpy.sum", "numpy.load", "numpy.save", "os.remove" ]
[((1529, 1569), 'numpy.load', 'np.load', (['self.paths2ys[n]'], {'mmap_mode': '"""r"""'}), "(self.paths2ys[n], mmap_mode='r')\n", (1536, 1569), True, 'import numpy as np\n'), ((1606, 1646), 'numpy.load', 'np.load', (['self.paths2ss[n]'], {'mmap_mode': '"""r"""'}), "(self.paths2ss[n], mmap_mode='r')\n", (1613, 1646), Tr...
import feedparser import difflib import json cbc = feedparser.parse("http://rss.cbc.ca/lineup/topstories.xml") print(json.dumps(cbc)) print("\n\n################################################\n\n") cnn = feedparser.parse("http://rss.cnn.com/rss/cnn_topstories.rss") print(json.dumps(cnn)) print("\n\n##################...
[ "feedparser.parse", "json.dumps", "difflib.get_close_matches" ]
[((51, 110), 'feedparser.parse', 'feedparser.parse', (['"""http://rss.cbc.ca/lineup/topstories.xml"""'], {}), "('http://rss.cbc.ca/lineup/topstories.xml')\n", (67, 110), False, 'import feedparser\n'), ((206, 267), 'feedparser.parse', 'feedparser.parse', (['"""http://rss.cnn.com/rss/cnn_topstories.rss"""'], {}), "('http...
""" Usage Example: cat imesh_sample.txt | python dump_to_json.py -o imesh.json -e imesh_hashes.json """ import sys import json import argparse import traceback from os.path import dirname, abspath project_folder = dirname(dirname(abspath('.'))) if project_folder not in sys.path: sys.path.append(project_folder) ...
[ "sys.path.insert", "breaches.imesh.imesh.ImeshImporter", "argparse.ArgumentParser", "json.dumps", "sys.exit", "os.path.abspath", "traceback.print_exc", "sys.path.append" ]
[((287, 318), 'sys.path.append', 'sys.path.append', (['project_folder'], {}), '(project_folder)\n', (302, 318), False, 'import sys\n'), ((516, 541), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (539, 541), False, 'import argparse\n'), ((1106, 1121), 'breaches.imesh.imesh.ImeshImporter', 'Imes...
#!/usr/bin/env python3 # -*- mode: python; py-indent-offset: 4; py-continuation-offset: 4 -*- #=============================================================================== # # License (3-Clause BSD) # ---------------------- # Copyright 2021 National Technology & Engineering Solutions of Sandia, # LLC (NTESS). Under ...
[ "contextlib.redirect_stdout", "os.path.realpath", "os.path.dirname", "os.path.basename", "os.path.abspath", "io.StringIO", "pprint.pprint" ]
[((4147, 4173), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (4163, 4173), False, 'import os\n'), ((4204, 4236), 'os.path.basename', 'os.path.basename', (['unit_test_path'], {}), '(unit_test_path)\n', (4220, 4236), False, 'import os\n'), ((4267, 4298), 'os.path.dirname', 'os.path.dirname'...
import random import string import requests def SQL_SYNTAX_CHECK(input: str) -> bool: bad_char = ['*',';','SELECT ',' FROM ', ' TRUE ', ' WHERE '] for char in bad_char: if char in input: return False return True def validateRegistration(name, uname, email, password, confirm): if l...
[ "random.choice", "requests.get" ]
[((964, 1002), 'requests.get', 'requests.get', (['"""http://www.example.com"""'], {}), "('http://www.example.com')\n", (976, 1002), False, 'import requests\n'), ((1207, 1229), 'random.choice', 'random.choice', (['letters'], {}), '(letters)\n', (1220, 1229), False, 'import random\n')]
from random import choice, randint import os def generate_grid(w, h): global width, height alphabet = 'qwertyuiopasdfghjklzxcvbnm' grid = [] for i in range(h): row = [] for j in range(w): row.append(' ') grid.append(row) return grid def popul...
[ "os.path.exists", "random.choice", "random.randint" ]
[((2009, 2029), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (2023, 2029), False, 'import os\n'), ((600, 632), 'random.choice', 'choice', (['[(1, 0), (0, 1), (1, 1)]'], {}), '([(1, 0), (0, 1), (1, 1)])\n', (606, 632), False, 'from random import choice, randint\n'), ((1621, 1637), 'random.choice', 'ch...
import sys, os, asyncio, shutil import wget from ffmpeg import FFmpeg # Func calls wget to download the file given in url arg def webget(url): wget.download(url) # Fuc calls ffmpeg to transcode .m3u8 to .mp4 def transcode(ffmpeg): @ffmpeg.on('stderr') def on_stderr(line): print(line) @ffmpeg....
[ "wget.download", "os.listdir", "shutil.move", "os.getcwd", "os.mkdir", "asyncio.get_event_loop", "ffmpeg.FFmpeg" ]
[((148, 166), 'wget.download', 'wget.download', (['url'], {}), '(url)\n', (161, 166), False, 'import wget\n'), ((563, 587), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (585, 587), False, 'import sys, os, asyncio, shutil\n'), ((1669, 1680), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1678, 168...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from detector.ssd.utils import box_utils from nn.separable_conv_2d import SeparableConv2d from fpn.extension import Extension from detector.ssd.to_predictions import ToPredictions class SSD(nn.Module): def __init__(self, num_cl...
[ "torch.load", "fpn.extension.Extension", "detector.ssd.to_predictions.ToPredictions", "torch.nn.Conv2d", "nn.separable_conv_2d.SeparableConv2d", "torch.cat" ]
[((705, 816), 'fpn.extension.Extension', 'Extension', ([], {'bootstrap_channels': 'feature_channels[-1]', 'out_channels': '[512, 256, 256, 64]', 'conv': 'SeparableConv2d'}), '(bootstrap_channels=feature_channels[-1], out_channels=[512, 256, \n 256, 64], conv=SeparableConv2d)\n', (714, 816), False, 'from fpn.extensio...
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
[ "taurus.Factory", "json.loads", "taurus.core.tango.TangoDevice.__getattr__", "json.dumps", "taurus.external.qt.Qt.QObject.__getattr__", "taurus.external.qt.Qt.pyqtSignal" ]
[((1575, 1590), 'taurus.external.qt.Qt.pyqtSignal', 'Qt.pyqtSignal', ([], {}), '()\n', (1588, 1590), False, 'from taurus.external.qt import Qt\n'), ((3048, 3064), 'taurus.Factory', 'taurus.Factory', ([], {}), '()\n', (3062, 3064), False, 'import taurus\n'), ((1982, 2016), 'taurus.external.qt.Qt.QObject.__getattr__', 'Q...
import logging import os import json from collections import namedtuple from opentrons.config import get_config_index FILE_DIR = os.path.abspath(os.path.dirname(__file__)) log = logging.getLogger(__name__) def pipette_config_path(): index = get_config_index() return index.get('pipetteConfigFile', './setting...
[ "logging.getLogger", "os.path.exists", "collections.namedtuple", "os.path.dirname", "opentrons.config.get_config_index", "json.load" ]
[((180, 207), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (197, 207), False, 'import logging\n'), ((348, 576), 'collections.namedtuple', 'namedtuple', (['"""pipette_config"""', "['plunger_positions', 'pick_up_current', 'aspirate_flow_rate',\n 'dispense_flow_rate', 'ul_per_mm', 'chan...
# -*- coding: utf-8 -*- """ Created on Sat Nov 28 17:16:29 2020 @author: mauro """ import logging import os from explanation import ( CounterfactualExplanation, PermutationExplanation, ShapleyExplanation, SurrogateModelExplanation, ControlGroupExplanation ) from src.model.config import path_base f...
[ "logging.getLogger", "explanation.ShapleyExplanation", "explanation.PermutationExplanation", "os.listdir", "src.model.utils.create_treatment_dataframe", "explanation.SurrogateModelExplanation", "src.model.utils.get_dataset", "os.path.join", "src.model.DataConfig.DataConfig", "src.model.utils.exper...
[((619, 646), 'logging.getLogger', 'logging.getLogger', (['__file__'], {}), '(__file__)\n', (636, 646), False, 'import logging\n'), ((694, 737), 'os.path.join', 'os.path.join', (['path_base', '"""src"""', '"""resources"""'], {}), "(path_base, 'src', 'resources')\n", (706, 737), False, 'import os\n'), ((750, 796), 'os.p...
# Copyright (C) 2019 <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <NAME> # # This file is pa...
[ "numpy.abs", "src.constants.VIEWS.is_cc", "numpy.array", "numpy.zeros", "src.constants.VIEWS.is_mlo", "numpy.expand_dims", "numpy.concatenate", "cv2.resize", "numpy.round" ]
[((2308, 2386), 'cv2.resize', 'cv2.resize', (['image_to_resize', '(size[1], size[0])'], {'interpolation': 'cv2.INTER_CUBIC'}), '(image_to_resize, (size[1], size[0]), interpolation=cv2.INTER_CUBIC)\n', (2318, 2386), False, 'import cv2\n'), ((3833, 3857), 'numpy.array', 'np.array', (['max_crop_noise'], {}), '(max_crop_no...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ "enum.IntEnum" ]
[((1604, 1635), 'enum.IntEnum', 'IntEnum', (['"""FieldUnitEnum"""', '_dict'], {}), "('FieldUnitEnum', _dict)\n", (1611, 1635), False, 'from enum import IntEnum\n')]
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "data_pipeline._retry_util.MaxRetryError", "collections.namedtuple", "kafka.common.ProduceRequest", "data_pipeline._retry_util.Predicate", "data_pipeline.config.get_config", "collections.defaultdict", "data_pipeline._position_data_tracker.PositionDataTracker", "data_pipeline._retry_util.ExpBackoffPoli...
[((1446, 1504), 'collections.namedtuple', 'namedtuple', (['"""_EnvelopeAndMessage"""', "['envelope', 'message']"], {}), "('_EnvelopeAndMessage', ['envelope', 'message'])\n", (1456, 1504), False, 'from collections import namedtuple\n'), ((1514, 1526), 'data_pipeline.config.get_config', 'get_config', ([], {}), '()\n', (1...
import numpy as np import matplotlib.pyplot as plt from astropy import units as u from astropy.coordinates import SkyCoord from astropy.io import fits from astropy.nddata import CCDData from astropy.nddata import Cutout2D from astropy.stats import sigma_clipped_stats from astropy.wcs.utils import proj_plane_pixel_scale...
[ "numpy.sqrt", "astropy.table.Table", "numpy.array", "photutils.source_properties", "photutils.psf.extract_stars", "astropy.io.fits.open", "numpy.arange", "matplotlib.pyplot.imshow", "photutils.EPSFBuilder", "astropy.units.degree.to", "astropy.visualization.make_lupton_rgb", "astropy.nddata.CCD...
[((5528, 5594), 'astropy.stats.sigma_clipped_stats', 'sigma_clipped_stats', (['self.data.data'], {'mask': 'self.data.mask'}), '(self.data.data, mask=self.data.mask, **kwargs)\n', (5547, 5594), False, 'from astropy.stats import sigma_clipped_stats\n'), ((7580, 7605), 'numpy.abs', 'np.abs', (['(xlim[1] - xlim[0])'], {}),...
import cv2 import numpy as np class TapeTracker(object): min_thresh = np.array( [80,0,0] ) max_thresh = np.array( [90, 255, 255] ) def __init_(self): self.img = np.zeros((500,500)) def pipeline(self, img): self.img = cv2.resize(img, (300,300), cv2.INTER_NEAREST) self.img = cv2.cvtColor(self.img, c...
[ "cv2.rectangle", "numpy.copy", "cv2.drawContours", "numpy.ones", "cv2.inRange", "cv2.contourArea", "numpy.array", "numpy.zeros", "cv2.circle", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.cvtColor", "cv2.moments", "cv2.findContours", "cv2.resize", "cv2.imread", "cv2.boundingRect" ]
[((74, 94), 'numpy.array', 'np.array', (['[80, 0, 0]'], {}), '([80, 0, 0])\n', (82, 94), True, 'import numpy as np\n'), ((110, 134), 'numpy.array', 'np.array', (['[90, 255, 255]'], {}), '([90, 255, 255])\n', (118, 134), True, 'import numpy as np\n'), ((1765, 1788), 'cv2.imread', 'cv2.imread', (['"""img/1.jpg"""'], {}),...
from flask import Flask from flask import request from flask import render_template # Login Extension from flask_login import LoginManager from flask_login import login_required from flask_login import login_user from flask_login import logout_user from mockdbhelper import MockDBHelper as DBHelper from user import Use...
[ "flask.render_template", "flask_login.LoginManager", "flask.Flask", "flask_login.login_user", "flask_login.logout_user", "mockdbhelper.MockDBHelper", "flask.request.form.get", "passwordhelper.PasswordHelper", "flask.url_for", "user.User" ]
[((474, 484), 'mockdbhelper.MockDBHelper', 'DBHelper', ([], {}), '()\n', (482, 484), True, 'from mockdbhelper import MockDBHelper as DBHelper\n'), ((518, 534), 'passwordhelper.PasswordHelper', 'PasswordHelper', ([], {}), '()\n', (532, 534), False, 'from passwordhelper import PasswordHelper\n'), ((576, 591), 'flask.Flas...
import sys # in this case local import sys.path.append("../") import mag2dpoly as mag import numpy as np # induced magnetization Jind = mag.MagnetizVector(mod=4.9,Ideg=90.0,Ddeg=45.0) # remanent magnetization Jrem = mag.MagnetizVector(mod=3.1,Ideg=45.0,Ddeg=0.0) # angle with the North axis northxax = 90.0 # numb...
[ "numpy.ones", "mag2dpoly.tmagpolybodies2Dgen", "mag2dpoly.MagnetizVector", "mag2dpoly.MagPolyBodies2D", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "numpy.array", "matplotlib.pyplot.figure", "numpy.append", "numpy.empty", "numpy.linspace", "matplotlib.pyplot.title", "sys.path.appe...
[((41, 63), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (56, 63), False, 'import sys\n'), ((141, 190), 'mag2dpoly.MagnetizVector', 'mag.MagnetizVector', ([], {'mod': '(4.9)', 'Ideg': '(90.0)', 'Ddeg': '(45.0)'}), '(mod=4.9, Ideg=90.0, Ddeg=45.0)\n', (159, 190), True, 'import mag2dpoly as mag...
import io from nose.tools import istest, assert_equal import funk from mammoth import documents, results from mammoth.docx.xmlparser import element as xml_element, text as xml_text from mammoth.docx.document_xml import read_document_xml_element from mammoth.docx.numbering_xml import Numbering from mammoth.docx.relati...
[ "mammoth.docx.document_xml.read_document_xml_element", "mammoth.documents.run", "mammoth.docx.relationships_xml.Relationship", "mammoth.results.warning", "funk.allows", "io.BytesIO", "mammoth.docx.xmlparser.text", "mammoth.documents.numbering_level", "mammoth.documents.Text", "nose.tools.assert_eq...
[((9630, 9672), 'mammoth.docx.document_xml.read_document_xml_element', 'read_document_xml_element', (['*args'], {}), '(*args, **kwargs)\n', (9655, 9672), False, 'from mammoth.docx.document_xml import read_document_xml_element\n'), ((9677, 9710), 'nose.tools.assert_equal', 'assert_equal', (['[]', 'result.messages'], {})...
from funlib.show.neuroglancer import add_layer, ScalePyramid import argparse import daisy import glob import neuroglancer import numpy as np import os import webbrowser from swc_parser import _parse_swc from pathlib import Path import itertools import random import logging ngid = itertools.count(start=1) parser = arg...
[ "logging.basicConfig", "funlib.show.neuroglancer.add_layer", "argparse.ArgumentParser", "pathlib.Path", "neuroglancer.Viewer", "numpy.round", "time.sleep", "neuroglancer.set_server_bind_address", "numpy.array", "itertools.count", "neuroglancer.AnnotationLayer", "logging.info", "swc_parser._p...
[((282, 306), 'itertools.count', 'itertools.count', ([], {'start': '(1)'}), '(start=1)\n', (297, 306), False, 'import itertools\n'), ((317, 342), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (340, 342), False, 'import argparse\n'), ((1419, 1466), 'neuroglancer.set_server_bind_address', 'neuro...
# # Copyright 2018 British Broadcasting 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 applicable law or...
[ "mediatimestamp.immutable.Timestamp.get_time", "deprecated.deprecated", "mediatimestamp.immutable.TimeOffset.from_count", "fractions.Fraction", "struct.pack", "copy.deepcopy", "mediatimestamp.immutable.Timestamp" ]
[((2587, 2679), 'deprecated.deprecated', 'deprecated', ([], {'version': '"""2.13.0"""', 'reason': '"""Please use mediagrains.patterngenerators instead"""'}), "(version='2.13.0', reason=\n 'Please use mediagrains.patterngenerators instead')\n", (2597, 2679), False, 'from deprecated import deprecated\n'), ((3577, 3669...
""" _logging module (imdb package). """ import logging LEVELS = {'debug': logging.DEBUG, 'info': logging.INFO, 'warn': logging.WARNING, 'warning': logging.WARNING, 'error': logging.ERROR, 'critical': logging.CRITICAL} imdbpyLogger = logging.getLogger('media_browser') imdbpySt...
[ "logging.getLogger", "logging.Formatter", "logging.getLevelName", "logging.StreamHandler" ]
[((277, 311), 'logging.getLogger', 'logging.getLogger', (['"""media_browser"""'], {}), "('media_browser')\n", (294, 311), False, 'import logging\n'), ((334, 357), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (355, 357), False, 'import logging\n'), ((376, 480), 'logging.Formatter', 'logging.Format...
import datetime from collections import OrderedDict def decode_date(string): """Decodes a date from a command line argument, returning datetime object". Args: string: See AssetSetCommand class comment for the allowable date formats.v Returns: long, datetime object Raises: V...
[ "datetime.datetime.strptime" ]
[((604, 651), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['string', 'date_format'], {}), '(string, date_format)\n', (630, 651), False, 'import datetime\n')]
# %% # from numpy.core.fromnumeric import size import pandas as pd df = pd.read_csv("glassdoor_jobs.csv") df = df[df["Salary Estimate"] != "-1"] df # TO DO IN DATA CLEANING # ------------------- # salary parsing # %% salary = df["Salary Estimate"].apply(lambda x: x.split("(")[0]) # salary minus_Kd = salary.apply( ...
[ "pandas.read_csv" ]
[((73, 106), 'pandas.read_csv', 'pd.read_csv', (['"""glassdoor_jobs.csv"""'], {}), "('glassdoor_jobs.csv')\n", (84, 106), True, 'import pandas as pd\n'), ((1931, 1969), 'pandas.read_csv', 'pd.read_csv', (['"""GL_sal_data_cleaned.csv"""'], {}), "('GL_sal_data_cleaned.csv')\n", (1942, 1969), True, 'import pandas as pd\n'...
# -*- coding: utf-8 -*- """ # Class to handle reading of SDK Log Data as a pipe/fifo for # Windows and Unix, to avoid big log files. ---------------------------------------------------------- """ import platform import os import tempfile IS_WINDOWS = platform.system().lower() == "windows" if IS_WINDOWS: try: ...
[ "win32file.ReadFile", "win32pipe.ConnectNamedPipe", "os.path.join", "win32pipe.CreateNamedPipe", "platform.system", "tempfile.mkdtemp", "os.mkfifo" ]
[((2123, 2171), 'win32pipe.ConnectNamedPipe', 'win32pipe.ConnectNamedPipe', (['self.namedPipe', 'None'], {}), '(self.namedPipe, None)\n', (2149, 2171), False, 'import win32pipe, win32file\n'), ((2224, 2274), 'win32file.ReadFile', 'win32file.ReadFile', (['self.namedPipe', 'self.num_bytes'], {}), '(self.namedPipe, self.n...
import time import uuid import base64 import hashlib def millis(): return int(round(time.time() * 1000)) def timestamp(): return int(time.time()) def base64_encode(s): return base64.b64encode(s.encode('utf-8')).decode('utf-8') def base64_decode(b): return base64.b64decode(b).decode('utf-8') ...
[ "hashlib.sha1", "time.time", "base64.b64decode", "uuid.uuid4" ]
[((413, 427), 'hashlib.sha1', 'hashlib.sha1', ([], {}), '()\n', (425, 427), False, 'import hashlib\n'), ((147, 158), 'time.time', 'time.time', ([], {}), '()\n', (156, 158), False, 'import time\n'), ((356, 368), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (366, 368), False, 'import uuid\n'), ((282, 301), 'base64.b64de...