code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" Excitations =========== .. inheritance-diagram:: seapy.excitations.excitation .. automodule:: seapy.excitations.excitation .. automodule:: seapy.excitations.excitationpoint """ # from .excitationrain import ExcitationRain from .excitationpoint import ( ExcitationPointForce, ExcitationPointMoment, E...
[ "inspect.getmembers" ]
[((424, 482), 'inspect.getmembers', 'inspect.getmembers', (['sys.modules[__name__]', 'inspect.isclass'], {}), '(sys.modules[__name__], inspect.isclass)\n', (442, 482), False, 'import inspect, sys\n')]
import os from flask import Flask, request, render_template, send_from_directory, request, redirect, url_for, abort from wand.image import Image app = Flask(__name__) APP_ROOT = os.path.dirname(os.path.abspath(__file__)) @app.route("/") def index(): return render_template("index.html") @app.route("/", methods=["P...
[ "os.mkdir", "os.path.abspath", "flask.request.files.getlist", "os.path.isdir", "flask.Flask", "wand.image.Image", "flask.render_template", "flask.send_from_directory", "os.path.join", "os.listdir" ]
[((151, 166), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (156, 166), False, 'from flask import Flask, request, render_template, send_from_directory, request, redirect, url_for, abort\n'), ((194, 219), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (209, 219), False, 'import o...
import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * import control_gui import ambu_control if sys.platform == 'linux': ambu = ambu_control.AmbuControl("/dev/ttyACM0",convert=convert,adjust=adjust) else: ambu = ambu_control.AmbuControl("COM4",convert=convert,a...
[ "control_gui.ControlGui", "ambu_control.AmbuControl" ]
[((377, 424), 'control_gui.ControlGui', 'control_gui.ControlGui', ([], {'ambu': 'ambu', 'refPlot': '(True)'}), '(ambu=ambu, refPlot=True)\n', (399, 424), False, 'import control_gui\n'), ((183, 255), 'ambu_control.AmbuControl', 'ambu_control.AmbuControl', (['"""/dev/ttyACM0"""'], {'convert': 'convert', 'adjust': 'adjust...
import os import numpy as np import h5py from .utils import timestamp2array, timestamp2vec_origin, transtr, transtrlong, transtr24 def external_taxibj(datapath, fourty_eight, previous_meteorol): def f(tsx, tsy, ext_time): exd = ExtDat(datapath) tsx = np.asarray([exd.get_bjextarray(N, ext_time, fo...
[ "h5py.File", "numpy.asarray", "numpy.hstack", "numpy.timedelta64", "os.path.join", "numpy.vstack" ]
[((1507, 1553), 'os.path.join', 'os.path.join', (['datapath', 'dataset', '"""Holiday.txt"""'], {}), "(datapath, dataset, 'Holiday.txt')\n", (1519, 1553), False, 'import os\n'), ((1997, 2046), 'os.path.join', 'os.path.join', (['datapath', 'dataset', '"""Meteorology.h5"""'], {}), "(datapath, dataset, 'Meteorology.h5')\n"...
import pytest from django.urls import reverse class TestPostDetail: pytestmark = pytest.mark.django_db def test_get_post_detail(self, client, post): slugs = {"blog_slug": post.blog.slug, "slug": post.slug} detail_url = reverse("cast:post_detail", kwargs=slugs) r = client.get(detail_u...
[ "django.urls.reverse" ]
[((246, 287), 'django.urls.reverse', 'reverse', (['"""cast:post_detail"""'], {'kwargs': 'slugs'}), "('cast:post_detail', kwargs=slugs)\n", (253, 287), False, 'from django.urls import reverse\n'), ((624, 665), 'django.urls.reverse', 'reverse', (['"""cast:post_detail"""'], {'kwargs': 'slugs'}), "('cast:post_detail', kwar...
# -*- coding: utf-8 -*- # Copyright (c) 2009-2012, <NAME> # # This module is part of oyProjectManager and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause import os import shutil import tempfile import unittest from sqlalchemy.exc import IntegrityError from oyProjectManager impor...
[ "oyProjectManager.db.session.query", "oyProjectManager.User.query", "oyProjectManager.Version", "oyProjectManager.db.session.commit", "oyProjectManager.Asset", "oyProjectManager.VersionType.query", "tempfile.mkdtemp", "shutil.rmtree", "oyProjectManager.db.session.delete", "oyProjectManager.Project...
[((814, 832), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (830, 832), False, 'import tempfile\n'), ((869, 887), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (885, 887), False, 'import tempfile\n'), ((1073, 1094), 'oyProjectManager.Project', 'Project', (['"""TEST_PROJ1"""'], {}), "('TEST_PROJ1...
#!/usr/bin/env python """ ***************************************************************** Licensed Materials - Property of IBM (C) Copyright IBM Corp. 2020. All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. **************...
[ "os.path.isabs", "os.path.abspath", "os.path.basename", "os.path.dirname", "os.path.exists", "os.system", "os.getuid", "os.path.relpath", "os.path.join", "errors.OpenCEError", "shutil.copy" ]
[((757, 813), 'os.path.join', 'os.path.join', (['OPEN_CE_PATH', '"""images"""', 'RUNTIME_IMAGE_NAME'], {}), "(OPEN_CE_PATH, 'images', RUNTIME_IMAGE_NAME)\n", (769, 813), False, 'import os\n'), ((1857, 1877), 'os.system', 'os.system', (['build_cmd'], {}), '(build_cmd)\n', (1866, 1877), False, 'import os\n'), ((2628, 266...
import pyos import datetime def onStart(s, a): global state, application, timeText, secText, dateText, twelveHRTime state = s application = a twelveHRTime = False application.ui.backgroundColor = (53, 106, 166) timeText = pyos.GUI.Text((0, 40), datetime.datetime.now().strftime("%H:%M"...
[ "datetime.datetime.now", "pyos.GUI.getCenteredCoordinates" ]
[((648, 705), 'pyos.GUI.getCenteredCoordinates', 'pyos.GUI.getCenteredCoordinates', (['timeText', 'application.ui'], {}), '(timeText, application.ui)\n', (679, 705), False, 'import pyos\n'), ((735, 791), 'pyos.GUI.getCenteredCoordinates', 'pyos.GUI.getCenteredCoordinates', (['secText', 'application.ui'], {}), '(secText...
from gluon.tools import * import requests, json def index(): query=(Turmas) total = db(query).count() #link = URL('list_records', args='db') #form = crud.select(db.chamadas == auth.user_id, fields=['data_acionamento', 'sistema', 'email', 'estado']) query =( (Enturmacoes.alunos.contains(auth.user.id))& (Turma...
[ "json.loads", "requests.get" ]
[((639, 706), 'requests.get', 'requests.get', (['"""http://127.0.0.1:8000/she/rest/api/disciplina/.json"""'], {}), "('http://127.0.0.1:8000/she/rest/api/disciplina/.json')\n", (651, 706), False, 'import requests, json\n'), ((716, 744), 'json.loads', 'json.loads', (['resposta.content'], {}), '(resposta.content)\n', (726...
import os import json import pickle import subprocess from bs4 import BeautifulSoup from xml.etree.ElementTree import fromstring from xmljson import badgerfish as bf def cache_analysis(org, repo, rd, token): print("[RUNNING cache_analysis]") def get_cached_analysis(org, repo, redis, token, fmt): print("[RUNN...
[ "subprocess.Popen", "xml.etree.ElementTree.fromstring", "json.dumps", "bs4.BeautifulSoup", "pickle.dumps" ]
[((1997, 2094), 'subprocess.Popen', 'subprocess.Popen', (["['git', 'clone', url, path]"], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE'}), "(['git', 'clone', url, path], stdout=subprocess.PIPE,\n stderr=subprocess.PIPE)\n", (2013, 2094), False, 'import subprocess\n'), ((2325, 2468), 'subprocess.Popen', '...
import shutil from tempfile import mktemp class safe_write(object): def __init__(self, fname): self.fname = fname self.tmp_fname = mktemp() def __enter__(self): self.stream = open(self.tmp_fname, 'w') return self.stream def __exit__(self, exc_type, exc_val, exc_tb): ...
[ "tempfile.mktemp", "shutil.move" ]
[((153, 161), 'tempfile.mktemp', 'mktemp', ([], {}), '()\n', (159, 161), False, 'from tempfile import mktemp\n'), ((415, 454), 'shutil.move', 'shutil.move', (['self.tmp_fname', 'self.fname'], {}), '(self.tmp_fname, self.fname)\n', (426, 454), False, 'import shutil\n')]
import os import shutil from copy import copy from tasks.env import PROJ_ROOT, USABLE_CPUS, FAASM_RUNTIME_ROOT from os.path import join, exists from subprocess import run from faasmtools.build import build_config_cmd, WASM_LIB_INSTALL, WASM_SYSROOT from invoke import task # The python library name might have a lett...
[ "subprocess.run", "os.makedirs", "shutil.rmtree", "shutil.copytree", "copy.copy", "invoke.task", "os.path.join", "shutil.copy" ]
[((662, 697), 'os.path.join', 'join', (['BUILD_PYTHON_BIN', '"""python3.8"""'], {}), "(BUILD_PYTHON_BIN, 'python3.8')\n", (666, 697), False, 'from os.path import join, exists\n'), ((717, 749), 'os.path.join', 'join', (['BUILD_PYTHON_BIN', '"""pip3.8"""'], {}), "(BUILD_PYTHON_BIN, 'pip3.8')\n", (721, 749), False, 'from ...
"""Hierarchical Transformer implementation The hierarchical Transformer architecture was introduced in https://arxiv.org/abs/2006.09265 """ import tensorflow as tf from ..layers import positional_encoding as pe from . import transformer from .beam_search import BeamSearch def create_model(params, training, custom_...
[ "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.ones", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Dense", "tensorflow.maximum", "tensorflow.reshape", "tensorflow.keras.layers.Softmax", "tensorflow.pad", "tensorflow.math.equal", "tensorflow.keras.Model", "ten...
[((690, 755), 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', (['(None, None)'], {'dtype': 'tf.int32', 'name': '"""input"""'}), "((None, None), dtype=tf.int32, name='input')\n", (711, 755), True, 'import tensorflow as tf\n'), ((878, 970), 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', (['(None, Non...
import sys if (sys.version_info[0] != 3): print("This script requires Python version 3.x") exit(1) try: import requests except ImportError: print ("You need \"requests\" module installed. Try to run pip install requests") exit(1) #Need it to use TOR try: import socks except ImportError: print ("You need \"soc...
[ "urllib3.disable_warnings", "requests.get" ]
[((492, 559), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (516, 559), False, 'import urllib3\n'), ((742, 855), 'requests.get', 'requests.get', (['url'], {'proxies': 'proxies', 'timeout': 'timeout', 'verify'...
from nltk.stem.porter import PorterStemmer from collections import Counter class SentenceData: def __init__(self, path, encode='utf-8'): self.sentences = [] self.words = [] with open(path, encoding=encode) as f: for line in f.readlines(): sentence = self.stem_all...
[ "nltk.stem.porter.PorterStemmer", "collections.Counter" ]
[((741, 756), 'nltk.stem.porter.PorterStemmer', 'PorterStemmer', ([], {}), '()\n', (754, 756), False, 'from nltk.stem.porter import PorterStemmer\n'), ((866, 885), 'collections.Counter', 'Counter', (['self.words'], {}), '(self.words)\n', (873, 885), False, 'from collections import Counter\n')]
##### # # This class is part of the Programming the Internet of Things project. # # It is provided as a simple shell to guide the student and assist with # implementation for the Programming the Internet of Things exercises, # and designed to be modified by the student as needed. # import logging from programmingth...
[ "programmingtheiot.cda.sim.HumidifierActuatorSimTask.HumidifierActuatorSimTask", "logging.info", "programmingtheiot.cda.sim.HvacActuatorSimTask.HvacActuatorSimTask", "logging.warning" ]
[((821, 878), 'logging.info', 'logging.info', (['"""ActuatorAdapterManager is initializing..."""'], {}), "('ActuatorAdapterManager is initializing...')\n", (833, 878), False, 'import logging\n'), ((2416, 2475), 'logging.info', 'logging.info', (['"""ActuatorAdapterManager is using simulators."""'], {}), "('ActuatorAdapt...
import sys import struct import os import typing import io import csv import zlib RES_STRING = 1 RES_BITMAP = 2 RES_WAVE = 3 RES_SEQ = 4 RES_INT = 5 RES_MENU = 7 RES_STRTABLE = 8 RES_ALERT = 9 RES_DIALOG = 10 RES_SCREEN = 11 RES_STRINGARRAY = 12 RES_BITMAPS = 13 RES_RINGTONES = 14 RES_INPUTS = 15 ...
[ "io.BytesIO", "struct.unpack", "os.makedirs", "struct.pack" ]
[((859, 876), 'io.BytesIO', 'io.BytesIO', (['input'], {}), '(input)\n', (869, 876), False, 'import io\n'), ((2316, 2328), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (2326, 2328), False, 'import io\n'), ((3305, 3322), 'io.BytesIO', 'io.BytesIO', (['input'], {}), '(input)\n', (3315, 3322), False, 'import io\n'), ((484...
from apscheduler.schedulers.background import BackgroundScheduler import pymysql from datetime import datetime import smtplib from mark_attendance import Mark_Attendance from email.message import EmailMessage def getall_staffs(): conn = pymysql.connect(host = "localhost", user = "root", password = "", data...
[ "apscheduler.schedulers.background.BackgroundScheduler", "smtplib.SMTP_SSL", "smtplib.SMTP", "mark_attendance.Mark_Attendance", "email.message.EmailMessage", "pymysql.connect", "datetime.datetime.now" ]
[((5653, 5685), 'apscheduler.schedulers.background.BackgroundScheduler', 'BackgroundScheduler', ([], {'daemon': '(True)'}), '(daemon=True)\n', (5672, 5685), False, 'from apscheduler.schedulers.background import BackgroundScheduler\n'), ((250, 338), 'pymysql.connect', 'pymysql.connect', ([], {'host': '"""localhost"""', ...
from indico import IndicoClient, IndicoConfig from indico.queries import DocumentExtraction, JobStatus, RetrieveStorageObject # Create an Indico API client my_config = IndicoConfig( host="app.indico.io", api_token_path="./path/to/indico_api_token.txt" ) client = IndicoClient(config=my_config) # OCR a single file...
[ "indico.queries.RetrieveStorageObject", "indico.queries.JobStatus", "indico.IndicoClient", "indico.IndicoConfig" ]
[((170, 258), 'indico.IndicoConfig', 'IndicoConfig', ([], {'host': '"""app.indico.io"""', 'api_token_path': '"""./path/to/indico_api_token.txt"""'}), "(host='app.indico.io', api_token_path=\n './path/to/indico_api_token.txt')\n", (182, 258), False, 'from indico import IndicoClient, IndicoConfig\n'), ((269, 299), 'in...
#!/usr/bin/env python # -*- coding:utf-8 -*- from __future__ import absolute_import import time import logging.config from .config_logging import config_logging_dict from .same_level import same_notset, same_debug, same_info from .same_level import same_warning, same_error, same_critical from .child.child_level import ...
[ "time.sleep" ]
[((597, 610), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (607, 610), False, 'import time\n'), ((627, 640), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (637, 640), False, 'import time\n'), ((714, 727), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (724, 727), False, 'import time\n'), ((743, 756), ...
import threading from datetime import datetime, timedelta, timezone from typing import Dict, Optional, Union import toml from jwt import decode from pydantic import BaseModel, ValidationError from pydantic.fields import Field from qcs_api_client.client._configuration.file import QCSClientConfigurationFile _TOKEN_REF...
[ "threading.RLock", "datetime.timedelta", "toml.load", "datetime.datetime.now", "toml.dump", "jwt.decode" ]
[((344, 365), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(15)'}), '(seconds=15)\n', (353, 365), False, 'from datetime import datetime, timedelta, timezone\n'), ((388, 405), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (403, 405), False, 'import threading\n'), ((1132, 1166), 'jwt.decode', 'decode', ...
# Generated by Django 2.1.1 on 2018-10-07 10:59 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0003_auto_20181007_1858'), ] operations = [ migrations.AlterField( model_name='posts', name='...
[ "django.db.models.DateTimeField" ]
[((351, 414), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'blank': '(True)', 'default': 'datetime.datetime.now'}), '(blank=True, default=datetime.datetime.now)\n', (371, 414), False, 'from django.db import migrations, models\n')]
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making GameAISDK available. This source code file is licensed under the GNU General Public License Version 3. For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package. Copyright...
[ "os.path.dirname", "ubuntu.detect_util.main", "platform.platform" ]
[((3407, 3413), 'ubuntu.detect_util.main', 'main', ([], {}), '()\n', (3411, 3413), False, 'from ubuntu.detect_util import main\n'), ((613, 638), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (628, 638), False, 'import os\n'), ((673, 698), 'os.path.dirname', 'os.path.dirname', (['__file__'], ...
# -*- coding: utf-8 -*- """ @author: <NAME> """ import cv2 as cv import numpy as np class HistogramOperations(object): def __init__(self, image): self.Image = image self.ImageHeight, self.ImageWidth = image[:2] self.Maxangle = 180 def CreateHistogram(self, channel): # ...
[ "cv2.cartToPolar", "cv2.Sobel" ]
[((454, 500), 'cv2.Sobel', 'cv.Sobel', (['self.Image', 'cv.CV_64F', '(1)', '(0)'], {'ksize': '(1)'}), '(self.Image, cv.CV_64F, 1, 0, ksize=1)\n', (462, 500), True, 'import cv2 as cv\n'), ((523, 569), 'cv2.Sobel', 'cv.Sobel', (['self.Image', 'cv.CV_64F', '(1)', '(0)'], {'ksize': '(1)'}), '(self.Image, cv.CV_64F, 1, 0, k...
import os import sys import json import codecs import pickle import pathlib import itertools import numpy as np import pandas as pd from collections import defaultdict from functools import partial from multiprocessing import Pool from datetime import datetime import matplotlib matplotlib.use("Agg") from plotnine impo...
[ "pickle.dump", "pandas.HDFStore", "plotnine.labs", "collections.defaultdict", "pathlib.Path", "pickle.load", "plotnine.aes", "os.path.join", "pandas.DataFrame", "plotnine.geom_histogram", "codecs.open", "json.loads", "os.path.exists", "itertools.chain", "plotnine.ggplot", "functools.pa...
[((280, 301), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (294, 301), False, 'import matplotlib\n'), ((552, 614), 'datetime.datetime.strptime', 'datetime.strptime', (["x['date'][:-6]", '"""%a %b %d %Y %H:%M:%S %Z%z"""'], {}), "(x['date'][:-6], '%a %b %d %Y %H:%M:%S %Z%z')\n", (569, 614), False...
#!/usr/bin/env python3 from __future__ import print_function from argparse import ArgumentParser from datetime import datetime, timedelta from itertools import cycle from plot_ranked_items import calc_nasim import csv import json import math import matplotlib.pyplot as plt import os import os.path import sys import ...
[ "matplotlib.pyplot.show", "argparse.ArgumentParser", "os.path.exists", "plot_ranked_items.calc_nasim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ]
[((5003, 5038), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(2)', '(4)'], {'figsize': '(15, 7)'}), '(2, 4, figsize=(15, 7))\n', (5015, 5038), True, 'import matplotlib.pyplot as plt\n'), ((6555, 6576), 'matplotlib.pyplot.savefig', 'plt.savefig', (['out_file'], {}), '(out_file)\n', (6566, 6576), True, 'import matplo...
########################### # Tests help module ########################### from time import sleep import discord ########################### # Function: test # Description: runs each test # Inputs: # - testing_bot: bot that sends commands to test TeachersPetBot # - guild_id: id of the guild that is using th...
[ "discord.utils.get", "time.sleep" ]
[((605, 654), 'discord.utils.get', 'discord.utils.get', (['guild.roles'], {'name': '"""Instructor"""'}), "(guild.roles, name='Instructor')\n", (622, 654), False, 'import discord\n'), ((846, 854), 'time.sleep', 'sleep', (['(5)'], {}), '(5)\n', (851, 854), False, 'from time import sleep\n'), ((1080, 1088), 'time.sleep', ...
__author__ = '<EMAIL>' # coding=utf-8 import os import subprocess import io import sys from urllib.parse import urlparse from client import exceptions from client import protocol class ClientException(exceptions.ArmoryException): def __init__(self, msg): super(ClientException, self).__init__(msg); cla...
[ "subprocess.Popen", "client.protocol.read_file", "client.protocol.read_msg", "urllib.parse.urlparse", "os.path.exists", "client.protocol.write_file", "client.protocol.write_msg" ]
[((620, 633), 'urllib.parse.urlparse', 'urlparse', (['uri'], {}), '(uri)\n', (628, 633), False, 'from urllib.parse import urlparse\n'), ((3377, 3481), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'shell': '(True)', 'cwd': 'cwd', 'bufsize': '(1)', 'stdin': 'subprocess.PIPE', 'stdout': 'subprocess.PIPE'}), '(cmd, s...
"""empty message Revision ID: 9720f2c9aba2 Revises: <PASSWORD> Create Date: 2022-02-25 12:53:28.714751 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9720f2c9aba2' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgrade(): # ### ...
[ "sqlalchemy.VARCHAR", "alembic.op.drop_index", "alembic.op.create_index", "alembic.op.create_unique_constraint", "alembic.op.f", "alembic.op.drop_constraint", "alembic.op.drop_column", "alembic.op.execute", "sqlalchemy.String" ]
[((400, 460), 'alembic.op.create_unique_constraint', 'op.create_unique_constraint', (['None', '"""token"""', "['opaque_token']"], {}), "(None, 'token', ['opaque_token'])\n", (427, 460), False, 'from alembic import op\n'), ((537, 578), 'alembic.op.execute', 'op.execute', (['"""UPDATE "user" SET tin = cvr"""'], {}), '(\'...
# Copyright (c) 2003-2019 by <NAME> # # TreeCorr is free software: redistribution and use in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions...
[ "test_helper.assert_raises", "numpy.arctan2", "numpy.abs", "numpy.floor", "treecorr.Catalog", "fitsio.read", "numpy.isclose", "numpy.exp", "os.path.join", "numpy.testing.assert_almost_equal", "test_helper.do_pickle", "numpy.genfromtxt", "numpy.random.RandomState", "numpy.arcsin", "numpy....
[((3214, 3289), 'treecorr.NNNCorrelation', 'treecorr.NNNCorrelation', ([], {'min_sep': '(5)', 'max_sep': '(20)', 'nbins': '(20)', 'bin_type': '"""LogRUV"""'}), "(min_sep=5, max_sep=20, nbins=20, bin_type='LogRUV')\n", (3237, 3289), False, 'import treecorr\n'), ((3646, 3772), 'treecorr.NNNCorrelation', 'treecorr.NNNCorr...
import numpy as np import shutil import pytest import pysixtrack import CollimationToolKit as ctk #------------------------------------------------------------------------------- #--- basic foil class with default scatter function ------------------------- #------------ should act like LimitRect ---------------------...
[ "pysixtrack.Particles", "numpy.random.uniform", "numpy.zeros_like", "numpy.ones_like", "shutil.which", "pytest.skip", "CollimationToolKit.elements.LimitFoil", "pysixtrack.elements.LimitRect", "numpy.array_equal", "numpy.sqrt" ]
[((2371, 2448), 'CollimationToolKit.elements.LimitFoil', 'ctk.elements.LimitFoil', ([], {'min_x': 'foil_min_x', 'scatter': 'ctk.ScatterFunctions.GLOBAL'}), '(min_x=foil_min_x, scatter=ctk.ScatterFunctions.GLOBAL)\n', (2393, 2448), True, 'import CollimationToolKit as ctk\n'), ((463, 549), 'pysixtrack.elements.LimitRect'...
import os from datetime import datetime A_NONE = 'None' A_PARTIAL = 'Partial' A_FULL = 'Full' A_FAIL = 'Fail' A_PASS = 'Pass' class Scan: '''abstract class to scan a raw data file''' file_path = None file_size = None reader = None progress = 0 # completed percentage (0 - 100) scan_resu...
[ "os.path.getsize", "datetime.datetime.utcfromtimestamp" ]
[((628, 654), 'os.path.getsize', 'os.path.getsize', (['file_path'], {}), '(file_path)\n', (643, 654), False, 'import os\n'), ((754, 790), 'datetime.datetime.utcfromtimestamp', 'datetime.utcfromtimestamp', (['unix_time'], {}), '(unix_time)\n', (779, 790), False, 'from datetime import datetime\n')]
import logging import os import numpy as np from flask import Flask, jsonify, request from flask_cors import CORS from tensorflow import keras logging.basicConfig(level=logging.INFO) base_path = os.path.abspath(os.path.dirname(__file__)) logging.info('base path: {}'.format(base_path)) app = Flask(__name__) CORS(app)...
[ "logging.basicConfig", "numpy.argmax", "flask_cors.CORS", "flask.request.args.get", "os.path.dirname", "flask.Flask", "numpy.expand_dims", "logging.info", "flask.jsonify", "numpy.array", "os.path.join" ]
[((145, 184), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (164, 184), False, 'import logging\n'), ((295, 310), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (300, 310), False, 'from flask import Flask, jsonify, request\n'), ((311, 320), 'flask_c...
# Generated by Django 2.2.10 on 2020-03-22 11:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('account', '0004_activationcode'), ] operations = [ migrations.RemoveField( model_name='activationcode', name='timeout', ...
[ "django.db.migrations.RemoveField" ]
[((224, 291), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""activationcode"""', 'name': '"""timeout"""'}), "(model_name='activationcode', name='timeout')\n", (246, 291), False, 'from django.db import migrations\n')]
from engine import Data; # --------------------------------------------------- *\ # [class] KeyboardInput() # # * Keyboard input class * # # --------------------------------------------------- */ events = {}; class Keyboard(): # --------------------------------------------------- *\ # [function] __init__(): # # ...
[ "engine.Data.getData" ]
[((462, 490), 'engine.Data.getData', 'Data.getData', (["('k_' + keyName)"], {}), "('k_' + keyName)\n", (474, 490), False, 'from engine import Data\n')]
import numpy as np import operator _DeBug_ = False Smth = 2 BGloop= 10 PixNo = 25 PixNo_1_2 = 12 DirNo = 15 DirAgl= [i*(180//DirNo) for i in range(DirNo)] RowNo = lambda row: row//PixNo ColNo = lambda col: col//PixNo def checkTri(angle, fac=0): if (fac==0): # 0 +/- 30 if ( angle >=30 and angle < 90): #(60) ...
[ "numpy.full", "numpy.average", "numpy.copy", "numpy.argmax", "numpy.std", "numpy.empty", "numpy.zeros", "numpy.append", "numpy.tan", "numpy.array", "numpy.cos", "numpy.arctan", "numpy.ndarray", "numpy.unique" ]
[((14876, 14911), 'numpy.full', 'np.full', (['(DirNo, 3)', '(0)'], {'dtype': 'float'}), '((DirNo, 3), 0, dtype=float)\n', (14883, 14911), True, 'import numpy as np\n'), ((1695, 1707), 'numpy.empty', 'np.empty', (['(91)'], {}), '(91)\n', (1703, 1707), True, 'import numpy as np\n'), ((1814, 1834), 'numpy.zeros', 'np.zero...
import os import warnings warnings.filterwarnings("ignore") ############################################# # BenchMark Bike ############################################# ### DC ### # os.system('python STMeta_Obj.py -m STMeta_v1.model.yml -d bike_dc.data.yml ' # '-p data_range:0.25,train_data_length:7,perio...
[ "warnings.filterwarnings" ]
[((26, 59), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (49, 59), False, 'import warnings\n')]
import naislinter naislinter.main()
[ "naislinter.main" ]
[((19, 36), 'naislinter.main', 'naislinter.main', ([], {}), '()\n', (34, 36), False, 'import naislinter\n')]
# Copyright 2021 <NAME> (KRR-Oxford). 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 la...
[ "torch.mean", "torch.stack", "torch.mul", "transformers.AutoModel.from_pretrained", "torch.no_grad", "torch.sum" ]
[((1298, 1377), 'transformers.AutoModel.from_pretrained', 'AutoModel.from_pretrained', (['self.args.bert_checkpoint'], {'output_hidden_states': '(True)'}), '(self.args.bert_checkpoint, output_hidden_states=True)\n', (1323, 1377), False, 'from transformers import AutoModel\n'), ((3028, 3063), 'torch.sum', 'torch.sum', (...
from contextlib import contextmanager from shutil import rmtree from tempfile import mkdtemp, mkstemp from unittest import TestCase, main from minify import create_minified_file @contextmanager def temporary_folder(): """Creates a temporary folder, return it and delete it afterwards. This allows to do somet...
[ "unittest.main", "tempfile.mkstemp", "minify.create_minified_file", "tempfile.mkdtemp", "shutil.rmtree" ]
[((445, 454), 'tempfile.mkdtemp', 'mkdtemp', ([], {}), '()\n', (452, 454), False, 'from tempfile import mkdtemp, mkstemp\n'), ((1155, 1161), 'unittest.main', 'main', ([], {}), '()\n', (1159, 1161), False, 'from unittest import TestCase, main\n'), ((507, 522), 'shutil.rmtree', 'rmtree', (['tempdir'], {}), '(tempdir)\n',...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 TH<NAME>, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in complianc...
[ "django.utils.module_loading.import_string" ]
[((1005, 1024), 'django.utils.module_loading.import_string', 'import_string', (['path'], {}), '(path)\n', (1018, 1024), False, 'from django.utils.module_loading import import_string\n')]
# -*- coding:utf-8 -*- from PIL import Image from rest_framework import viewsets, status from rest_framework.exceptions import ParseError from rest_framework.parsers import FileUploadParser, MultiPartParser from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.decorat...
[ "uploaddemo.models.Airticle", "uploaddemo.models.Airticle.objects.all", "PIL.Image.open", "rest_framework.response.Response", "rest_framework.decorators.action", "rest_framework.exceptions.ParseError" ]
[((580, 602), 'uploaddemo.models.Airticle.objects.all', 'Airticle.objects.all', ([], {}), '()\n', (600, 602), False, 'from uploaddemo.models import Airticle\n'), ((651, 765), 'rest_framework.decorators.action', 'action', ([], {'methods': "['put']", 'detail': '(True)', 'serializer_class': 'AirticlePicSerializer', 'parse...
import pygame from pygame.sprite import Sprite from Points import Points class Flag_Pole(Sprite): def __init__(self, hub, x, y): super().__init__() self.hub = hub self.camera = self.hub.camera self.screen = hub.main_screen self.image_list = [pygame.image.lo...
[ "pygame.image.load", "pygame.transform.scale", "Points.Points" ]
[((305, 343), 'pygame.image.load', 'pygame.image.load', (['"""imgs/Misc-2/2.png"""'], {}), "('imgs/Misc-2/2.png')\n", (322, 343), False, 'import pygame\n'), ((372, 410), 'pygame.image.load', 'pygame.image.load', (['"""imgs/Misc-2/3.png"""'], {}), "('imgs/Misc-2/3.png')\n", (389, 410), False, 'import pygame\n'), ((439, ...
# -*- coding: utf-8 -*- import allure import os from itest2 import json_schema from .ext import root_dir @allure.feature('验证工具') @allure.story('JsonSchema') class TestJsonSchema(object): @allure.description('JsonSchema校验') @allure.severity(allure.severity_level.CRITICAL) def test_generate_and_validate(s...
[ "itest2.json_schema.validate", "itest2.json_schema.generate", "itest2.json_schema.generate_to_file", "itest2.json_schema.validate_from_file", "allure.description", "allure.story", "allure.severity", "allure.feature", "os.path.join" ]
[((109, 131), 'allure.feature', 'allure.feature', (['"""验证工具"""'], {}), "('验证工具')\n", (123, 131), False, 'import allure\n'), ((133, 159), 'allure.story', 'allure.story', (['"""JsonSchema"""'], {}), "('JsonSchema')\n", (145, 159), False, 'import allure\n'), ((196, 230), 'allure.description', 'allure.description', (['"""...
from machine import Pin, I2C import uasyncio as asyncio import utime as time from primitives.pushbutton import Pushbutton from drivers.mcp23017 import MCP23017 from drivers.i2c import I2C0 DEBUG = True def button_init(nb=-1): i2c = I2C(0, scl=Pin(21), sda=Pin(20)) #print(i2c.scan(), [hex(i) for i in i2c.scan...
[ "utime.sleep", "primitives.pushbutton.Pushbutton", "uasyncio.sleep_ms", "drivers.mcp23017.MCP23017", "machine.Pin" ]
[((338, 355), 'drivers.mcp23017.MCP23017', 'MCP23017', (['i2c', '(38)'], {}), '(i2c, 38)\n', (346, 355), False, 'from drivers.mcp23017 import MCP23017\n'), ((371, 388), 'drivers.mcp23017.MCP23017', 'MCP23017', (['i2c', '(39)'], {}), '(i2c, 39)\n', (379, 388), False, 'from drivers.mcp23017 import MCP23017\n'), ((2671, 2...
# Copyright 2019 VMware, Inc. # SPDX-License-Indentifier: Apache-2.0 import sys import abc import urllib.request import codecs import json from collections import OrderedDict from urllib.parse import urljoin from numbers import (Number) from .exception import TemplateEngineException class JsonLoader(object): ""...
[ "codecs.getreader", "urllib.parse.urljoin", "json.loads" ]
[((1621, 1646), 'codecs.getreader', 'codecs.getreader', (['"""utf-8"""'], {}), "('utf-8')\n", (1637, 1646), False, 'import codecs\n'), ((2068, 2098), 'urllib.parse.urljoin', 'urljoin', (['parent', 'json_resource'], {}), '(parent, json_resource)\n', (2075, 2098), False, 'from urllib.parse import urljoin\n'), ((2919, 297...
import json import logging import os from datetime import datetime from functools import reduce from typing import Any, List from bson.objectid import ObjectId from pymongo.collection import Collection from crawler.constants import ( COLLECTION_CHERRYPICK_TEST_DATA, FIELD_ADD_TO_DART, FIELD_BARCODES, ...
[ "crawler.constants.TEST_DATA_ERROR_NUMBER_OF_PLATES.format", "crawler.db.mongo.create_mongo_client", "crawler.helpers.general_helpers.get_config", "crawler.helpers.cherrypicker_test_data.create_barcode_meta", "crawler.db.mongo.get_mongo_db", "bson.objectid.ObjectId", "crawler.db.mongo.get_mongo_collecti...
[((1208, 1235), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1225, 1235), False, 'import logging\n'), ((2467, 2484), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (2482, 2484), False, 'from datetime import datetime\n'), ((6126, 6199), 'crawler.helpers.cherrypicker_te...
import logging from copy import copy from django.urls import reverse from . import managers from .data_helper import SerializedDataHelper logger = logging.getLogger(__name__) class StepsHelper(object): done_name = 'done' review_name = 'Review' next_name = 'Next' back_name = 'Back' wizard_goto_n...
[ "django.urls.reverse", "copy.copy", "logging.getLogger" ]
[((150, 177), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (167, 177), False, 'import logging\n'), ((2023, 2097), 'django.urls.reverse', 'reverse', (['self.view.request.resolver_match.view_name'], {'kwargs': "{'step': step}"}), "(self.view.request.resolver_match.view_name, kwargs={'step...
# Copyright © 2018 <NAME>. All rights reserved. """The models module from the orders app.""" from django.conf import settings from django.db import models from django.urls import reverse from subjects.models import Subject class Order(models.Model): """Model of order.""" STATUS_NEW = 0 STATUS_PREPAYME...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.Sum", "django.db.models.PositiveSmallIntegerField", "django.urls.reverse", "django.db.models.DateTimeField" ]
[((776, 869), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Subject'], {'on_delete': 'models.SET_NULL', 'verbose_name': '"""Предмет"""', 'null': '(True)'}), "(Subject, on_delete=models.SET_NULL, verbose_name=\n 'Предмет', null=True)\n", (793, 869), False, 'from django.db import models\n'), ((914, 1028), 'dj...
import os import subprocess from pathlib import Path import numpy as np from benchmark.model.model import Model class FMCBoosting(Model): def __init__(self, path: str = 'fmcb.jar', n_iter: int = 2000, lr: float = 5, gamma: float = 100, ...
[ "subprocess.run", "os.remove", "pathlib.Path" ]
[((3263, 3297), 'subprocess.run', 'subprocess.run', (['params'], {'stdout': 'out'}), '(params, stdout=out)\n', (3277, 3297), False, 'import subprocess\n'), ((4171, 4186), 'os.remove', 'os.remove', (['file'], {}), '(file)\n', (4180, 4186), False, 'import os\n'), ((1581, 1587), 'pathlib.Path', 'Path', ([], {}), '()\n', (...
import pytest from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__) instance = cluster.add_instance('instance') @pytest.fixture(scope="module", autouse=True) def started_cluster(): try: cluster.start() yield cluster finally: cluster.shutdown() def test_...
[ "helpers.cluster.ClickHouseCluster", "pytest.fixture" ]
[((71, 98), 'helpers.cluster.ClickHouseCluster', 'ClickHouseCluster', (['__file__'], {}), '(__file__)\n', (88, 98), False, 'from helpers.cluster import ClickHouseCluster\n'), ((146, 190), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""', 'autouse': '(True)'}), "(scope='module', autouse=True)\n", (160, ...
from tinydb import TinyDB, Query from uuid import uuid4 from datetime import datetime from menu import menuShortcuts from colored import fg, attr colorRed = fg('#CC0000') colorGreen = fg('#73D216') colorBlue = fg('#338CFF') res = attr('reset') # db = TinyDB('db/db.json', indent=2, separators=(',', ': ')) db = TinyDB(...
[ "uuid.uuid4", "colored.fg", "tinydb.Query", "menu.menuShortcuts", "colored.attr", "tinydb.TinyDB", "datetime.datetime.now" ]
[((158, 171), 'colored.fg', 'fg', (['"""#CC0000"""'], {}), "('#CC0000')\n", (160, 171), False, 'from colored import fg, attr\n'), ((185, 198), 'colored.fg', 'fg', (['"""#73D216"""'], {}), "('#73D216')\n", (187, 198), False, 'from colored import fg, attr\n'), ((211, 224), 'colored.fg', 'fg', (['"""#338CFF"""'], {}), "('...
""" Django settings for socketizer project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
[ "os.path.abspath", "os.path.join", "os.path.dirname" ]
[((4746, 4783), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""staticfiles"""'], {}), "(BASE_DIR, 'staticfiles')\n", (4758, 4783), False, 'import os\n'), ((5182, 5213), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""media"""'], {}), "(BASE_DIR, 'media')\n", (5194, 5213), False, 'import os\n'), ((550, 575), 'os.pa...
# Necessary imports. Provides library functions to ease writing tests. from lib import prebuild, testcase, SUBMITTY_TUTORIAL_DIR import subprocess import os import glob ############################################################################ # COPY THE ASSIGNMENT FROM THE SAMPLE ASSIGNMENTS DIRECTORIES SAMPLE_A...
[ "os.path.join" ]
[((537, 590), 'os.path.join', 'os.path.join', (['test.testcase_path', '"""assignment_config"""'], {}), "(test.testcase_path, 'assignment_config')\n", (549, 590), False, 'import os\n'), ((651, 691), 'os.path.join', 'os.path.join', (['test.testcase_path', '"""data"""'], {}), "(test.testcase_path, 'data')\n", (663, 691), ...
from sqlalchemy import Column, Integer, Unicode from db import Base class RedmineUser(Base): """SlackのユーザとRedmineのAPI Keyのmap.""" __tablename__ = "redmine_users" id = Column(Integer, primary_key=True) user_id = Column(Unicode(9), nullable=False, unique=True, doc=""" Slackのユーザid 例: U023BECGF ...
[ "sqlalchemy.Unicode", "sqlalchemy.Column" ]
[((183, 216), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (189, 216), False, 'from sqlalchemy import Column, Integer, Unicode\n'), ((662, 695), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (668, 69...
from . import service # noqa from . import confirmation # noqa from .document import Petition # noqa from pyramid.settings import aslist SETTINGS = {} def includeme(config): from iris.service.rest import auth from .acl import ( PublicPetitionServiceAuthFactory, SupportersTokenServiceAuthF...
[ "iris.service.elector.Elector" ]
[((1614, 1652), 'iris.service.elector.Elector', 'Elector', (['"""statemachine.petitions.cron"""'], {}), "('statemachine.petitions.cron')\n", (1621, 1652), False, 'from iris.service.elector import Elector\n')]
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: <EMAIL> # Maintained By: <EMAIL> """Audit contexts need to reference the audit for implication scoping. Revision ID: <KEY> Revises: 21<PASSWORD> ...
[ "sqlalchemy.sql.column" ]
[((624, 648), 'sqlalchemy.sql.column', 'column', (['"""id"""', 'sa.Integer'], {}), "('id', sa.Integer)\n", (630, 648), False, 'from sqlalchemy.sql import table, column, select\n'), ((654, 693), 'sqlalchemy.sql.column', 'column', (['"""related_object_id"""', 'sa.Integer'], {}), "('related_object_id', sa.Integer)\n", (66...
# coding=utf-8 from rest_framework import serializers from conf.models import * class MailConfigSerializer(serializers.ModelSerializer): mail_pass = serializers.CharField(style={'input_type': 'password'}, write_only=True,label='邮箱用户密码') class Meta: model = MailConfig fields = ('id','mail_h...
[ "rest_framework.serializers.CharField" ]
[((159, 251), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'style': "{'input_type': 'password'}", 'write_only': '(True)', 'label': '"""邮箱用户密码"""'}), "(style={'input_type': 'password'}, write_only=True,\n label='邮箱用户密码')\n", (180, 251), False, 'from rest_framework import serializers\n')]
from pyharp.device import Device from pyharp.messages import HarpMessage from pyharp.messages import MessageType from struct import * # ON THIS EXAMPLE # # This code opens the connection with the device and update content on a register # It uses register address 42, which stores the analog sensor's higher threshold i...
[ "pyharp.messages.HarpMessage.WriteU16", "pyharp.messages.HarpMessage.ReadS16", "pyharp.device.Device", "pyharp.messages.HarpMessage.ReadU16" ]
[((450, 476), 'pyharp.device.Device', 'Device', (['"""COM95"""', '"""ibl.bin"""'], {}), "('COM95', 'ibl.bin')\n", (456, 476), False, 'from pyharp.device import Device\n'), ((847, 895), 'pyharp.messages.HarpMessage.WriteU16', 'HarpMessage.WriteU16', (['(42)', '(analog_threshold_h + 1)'], {}), '(42, analog_threshold_h + ...
__author__ = 'dustworm' from oauth import OAuthGmailAPI from gmailapi.gmailapi import GmailAPI def run_mail_archive(): service = OAuthGmailAPI('secret/client_secret.json', 'FULL').get_gmail_service() gmail_api = GmailAPI() messagesIds = gmail_api.get_messages_ids_with_matching_query(service, 'me', '') ...
[ "oauth.OAuthGmailAPI", "gmailapi.gmailapi.GmailAPI" ]
[((222, 232), 'gmailapi.gmailapi.GmailAPI', 'GmailAPI', ([], {}), '()\n', (230, 232), False, 'from gmailapi.gmailapi import GmailAPI\n'), ((135, 185), 'oauth.OAuthGmailAPI', 'OAuthGmailAPI', (['"""secret/client_secret.json"""', '"""FULL"""'], {}), "('secret/client_secret.json', 'FULL')\n", (148, 185), False, 'from oaut...
from flask import render_template, request from . import app @app.errorhandler(404) def error_404(error): return render_template("error.html", error_head_title="Not Found Error", error_title="404", error_massage="This page doesn't ex...
[ "flask.render_template" ]
[((392, 527), 'flask.render_template', 'render_template', (['"""error.html"""'], {'error_head_title': '"""Internal Server Error"""', 'error_title': '"""500"""', 'error_massage': '"""Internal Server Error !"""'}), "('error.html', error_head_title='Internal Server Error',\n error_title='500', error_massage='Internal S...
from django.core.management.base import BaseCommand from saleor.plugins.manager import PluginsManager from saleor.plugins.allegroSync.plugin import AllegroSyncPlugin class Command(BaseCommand): version = "1.0" def add_arguments(self, parser): parser.add_argument('--type', type=str, help='allegro type...
[ "saleor.plugins.manager.PluginsManager" ]
[((392, 471), 'saleor.plugins.manager.PluginsManager', 'PluginsManager', ([], {'plugins': "['saleor.plugins.allegroSync.plugin.AllegroSyncPlugin']"}), "(plugins=['saleor.plugins.allegroSync.plugin.AllegroSyncPlugin'])\n", (406, 471), False, 'from saleor.plugins.manager import PluginsManager\n')]
# TODO - Using Abstract class # import collections from abc import abstractmethod, ABC try: collectionsAbc = collections.ABC, abstractmethod() except AttributeError: collectionsAbc = collections class GraphicSize(ABC): def __init__(self): super().__init__() @abstractmethod def calcarea(...
[ "abc.abstractmethod" ]
[((132, 148), 'abc.abstractmethod', 'abstractmethod', ([], {}), '()\n', (146, 148), False, 'from abc import abstractmethod, ABC\n')]
from root.method import Strategy import argparse parser = argparse.ArgumentParser(description='Compresses or decompresses images.', epilog='Enjoy it! :)', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('filename', nargs=1, metavar='file name',type=str ,help='The complete path to target ima...
[ "root.method.Strategy.compress", "root.method.Strategy.decompress", "argparse.ArgumentParser" ]
[((59, 220), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Compresses or decompresses images."""', 'epilog': '"""Enjoy it! :)"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description='Compresses or decompresses images.',\n epilog='Enjoy it! :)', formatter_cla...
import nltk text1 = "Python is a 2000 made-for-TV horror movie directed by Richard \ Clabaugh. The film features several cult favorite actors, including William \ Zabka of The Karate Kid fame, <NAME>, <NAME>, <NAME>, \ <NAME>, <NAME> (best known for his role as <NAME> in the \ A Nightmare on Elm Street series of films)...
[ "nltk.sent_tokenize" ]
[((745, 770), 'nltk.sent_tokenize', 'nltk.sent_tokenize', (['text1'], {}), '(text1)\n', (763, 770), False, 'import nltk\n')]
# You can run this example via # # $ civis-compute submit iris.py # $ <JOBID> # $ civis-compute status # $ civis-compute get <JOBID> # import os import pickle import numpy as np from sklearn.datasets import load_iris from sklearn.ensemble import RandomForestClassifier # Civis Platform container configurat...
[ "sklearn.ensemble.RandomForestClassifier", "sklearn.datasets.load_iris", "pickle.dump", "numpy.random.seed", "numpy.arange", "os.path.join", "numpy.random.shuffle" ]
[((462, 473), 'sklearn.datasets.load_iris', 'load_iris', ([], {}), '()\n', (471, 473), False, 'from sklearn.datasets import load_iris\n'), ((531, 552), 'numpy.arange', 'np.arange', (['X.shape[0]'], {}), '(X.shape[0])\n', (540, 552), True, 'import numpy as np\n'), ((553, 574), 'numpy.random.seed', 'np.random.seed', (['(...
import socket import subprocess from configurations import values from . import common, databases class Dev(databases.Databases, common.Common): """Settings for development.""" def get_client_ip(self): """Return the client IP address. Detect a Vagrant box by looking at the hostname. Return...
[ "configurations.values.BooleanValue", "subprocess.check_output", "socket.gethostname", "configurations.values.ListValue" ]
[((1352, 1372), 'configurations.values.ListValue', 'values.ListValue', (['[]'], {}), '([])\n', (1368, 1372), False, 'from configurations import values\n'), ((1403, 1428), 'configurations.values.BooleanValue', 'values.BooleanValue', (['(True)'], {}), '(True)\n', (1422, 1428), False, 'from configurations import values\n'...
import pandas as pd # Read in the data hockey_players = pd.read_csv('data/canucks.csv') # Find the column names of hockey_players # Save it as columns_hockey columns_hockey = hockey_players.columns # Display it by writing the object name columns_hockey
[ "pandas.read_csv" ]
[((58, 89), 'pandas.read_csv', 'pd.read_csv', (['"""data/canucks.csv"""'], {}), "('data/canucks.csv')\n", (69, 89), True, 'import pandas as pd\n')]
# -*- coding: utf-8 -*- # Copyright (c) 2020-2021 <NAME>. # All rights reserved. # Licensed under BSD-3-Clause-Clear. See LICENSE file for details. from django.core.management.base import BaseCommand from Competitie.models import Competitie, DeelCompetitie, LAAG_REGIO class Command(BaseCommand): help = "Slui...
[ "Competitie.models.Competitie.objects.filter", "Competitie.models.DeelCompetitie.objects.select_related" ]
[((458, 508), 'Competitie.models.DeelCompetitie.objects.select_related', 'DeelCompetitie.objects.select_related', (['"""nhb_regio"""'], {}), "('nhb_regio')\n", (495, 508), False, 'from Competitie.models import Competitie, DeelCompetitie, LAAG_REGIO\n'), ((2079, 2142), 'Competitie.models.Competitie.objects.filter', 'Com...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_data.ipynb (unless otherwise specified). __all__ = ['RegionST', 'extract_region', 'coords2bbox', 'split_region', 'merge_tifs', 'filter_region', 'filter_cloudy', 'n_least_cloudy', 'download_topography_data', 'download_data', 'download_data_ts', 'get_event_da...
[ "os.remove", "banet.geo.downsample", "banet.geo.open_tif", "pathlib.Path", "rasterio.coords.BoundingBox", "requests.get", "pandas.Timedelta", "ee.Initialize", "pandas.date_range", "rasterio.Env", "numpy.concatenate", "numpy.nanmax", "pandas.Timestamp", "json.load", "ee.ImageCollection", ...
[((5042, 5076), 'ee.Geometry.Rectangle', 'ee.Geometry.Rectangle', (['region.bbox'], {}), '(region.bbox)\n', (5063, 5076), False, 'import ee\n'), ((6043, 6052), 'pathlib.Path', 'Path', (['"""."""'], {}), "('.')\n", (6047, 6052), False, 'from pathlib import Path\n'), ((6191, 6206), 'ee.Initialize', 'ee.Initialize', ([], ...
#https://towardsdatascience.com/outlier-detection-with-isolation-forest-3d190448d45e #reference link # importing libaries ---- import numpy as np import pandas as pd import matplotlib.pyplot as plt from pylab import savefig from sklearn.ensemble import IsolationForest # Generating data ---- rng = np.random.RandomStat...
[ "pandas.DataFrame", "sklearn.ensemble.IsolationForest", "numpy.random.RandomState" ]
[((300, 325), 'numpy.random.RandomState', 'np.random.RandomState', (['(42)'], {}), '(42)\n', (321, 325), True, 'import numpy as np\n'), ((438, 481), 'pandas.DataFrame', 'pd.DataFrame', (['X_train'], {'columns': "['x1', 'x2']"}), "(X_train, columns=['x1', 'x2'])\n", (450, 481), True, 'import pandas as pd\n'), ((601, 643...
from collections import defaultdict import sys sys.setrecursionlimit(9999999) cache = defaultdict(int) def dp(n): if n <= 1: return 1 if cache.get(n, None): return cache[n] cache[n] = (dp(n - 2) + dp(n - 1)) % 1000000007 return cache[n] def solution(n): answer = dp(n) retu...
[ "collections.defaultdict", "sys.setrecursionlimit" ]
[((48, 78), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(9999999)'], {}), '(9999999)\n', (69, 78), False, 'import sys\n'), ((87, 103), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (98, 103), False, 'from collections import defaultdict\n')]
# Generated by Django 2.2.2 on 2019-07-05 17:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transactional_email', '0001_initial'), ] operations = [ migrations.AlterField( model_name='emaillog', name='body', ...
[ "django.db.models.CharField", "django.db.models.TextField" ]
[((337, 355), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (353, 355), False, 'from django.db import migrations, models\n'), ((480, 629), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'help_text': '"""Which services was used to send this e-mail. Eg: sendgrid, mailgun,...
# -*- coding: utf-8 -*- """ Created on Sun Oct 22 16:37:22 2017 @author: dzhaojie """ #import HelpFunctionsForCellTracking as HFCT import os import numpy as np from skimage import io def extract_intensity(num_of_field): F=io.imread('C:/Users/Desktop/AVG_flatfield-5x-590 nm LED.tif') F=F.ast...
[ "skimage.io.imread", "numpy.floor", "numpy.square", "numpy.zeros", "numpy.sort", "numpy.unique" ]
[((246, 307), 'skimage.io.imread', 'io.imread', (['"""C:/Users/Desktop/AVG_flatfield-5x-590 nm LED.tif"""'], {}), "('C:/Users/Desktop/AVG_flatfield-5x-590 nm LED.tif')\n", (255, 307), False, 'from skimage import io\n'), ((918, 938), 'numpy.unique', 'np.unique', (['xyl[:, 4]'], {}), '(xyl[:, 4])\n', (927, 938), True, 'i...
import numpy as np from correlations import * from normalizations import * # equal weighting def equal_weighting(X): N = np.shape(X)[1] return np.ones(N) / N # entropy weighting def entropy_weighting(X): # normalization for profit criteria criteria_type = np.ones(np.shape(X)[1]) pij = sum_normal...
[ "numpy.sum", "numpy.log", "numpy.std", "numpy.zeros", "numpy.ones", "numpy.hstack", "numpy.shape" ]
[((357, 370), 'numpy.shape', 'np.shape', (['pij'], {}), '(pij)\n', (365, 370), True, 'import numpy as np\n'), ((380, 396), 'numpy.zeros', 'np.zeros', (['(m, n)'], {}), '((m, n))\n', (388, 396), True, 'import numpy as np\n'), ((712, 729), 'numpy.std', 'np.std', (['X'], {'axis': '(0)'}), '(X, axis=0)\n', (718, 729), True...
""" Manage Versions in a python project This will bump the file holding the current version (src/version.txt) as well as tag releases """ import argparse from pathlib import Path from git import Repo import sys def parse_args(): parser = argparse.ArgumentParser("Manage the project version including git tags.") ...
[ "pathlib.Path", "git.Repo", "argparse.ArgumentParser", "sys.exit" ]
[((244, 317), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Manage the project version including git tags."""'], {}), "('Manage the project version including git tags.')\n", (267, 317), False, 'import argparse\n'), ((2008, 2017), 'git.Repo', 'Repo', (['"""."""'], {}), "('.')\n", (2012, 2017), False, 'from...
import random def GetRandomIpInRange(IpList): ''' Picks a random IP in IpList Arguments: IpList (List): list of IPs Returns: str: random IP in IpList ''' assert type(IpList) == tuple or type(IpList) == list, 'IpList is a %s not a list or tuple' %type(IpList) return Ip...
[ "random.choice", "random.randint" ]
[((530, 552), 'random.randint', 'random.randint', (['(1)', '(255)'], {}), '(1, 255)\n', (544, 552), False, 'import random\n'), ((563, 585), 'random.randint', 'random.randint', (['(0)', '(255)'], {}), '(0, 255)\n', (577, 585), False, 'import random\n'), ((596, 618), 'random.randint', 'random.randint', (['(0)', '(255)'],...
# -*- coding: utf-8 -*- import subprocess def get_git_user_name(): try: return subprocess.check_output(['git', 'config', '--get', 'user.name']).decode('utf8').strip() except: return "foolcage" def get_git_user_email(): try: return subprocess.check_output(['git', 'config', '--get'...
[ "subprocess.check_output" ]
[((93, 157), 'subprocess.check_output', 'subprocess.check_output', (["['git', 'config', '--get', 'user.name']"], {}), "(['git', 'config', '--get', 'user.name'])\n", (116, 157), False, 'import subprocess\n'), ((271, 336), 'subprocess.check_output', 'subprocess.check_output', (["['git', 'config', '--get', 'user.email']"]...
""" SFU CMPT 756 Sample application---playlist service. """ # Standard library modules import logging import sys # Installed packages from flask import Blueprint from flask import Flask from flask import request from flask import Response from prometheus_flask_exporter import PrometheusMetrics import requests impo...
[ "logging.error", "flask.Blueprint", "simplejson.dumps", "flask.Flask", "requests.delete", "requests.get", "requests.put", "requests.post", "prometheus_flask_exporter.PrometheusMetrics", "flask.Response", "flask.request.get_json", "sys.exit" ]
[((388, 403), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (393, 403), False, 'from flask import Flask\n'), ((415, 437), 'prometheus_flask_exporter.PrometheusMetrics', 'PrometheusMetrics', (['app'], {}), '(app)\n', (432, 437), False, 'from prometheus_flask_exporter import PrometheusMetrics\n'), ((646, 67...
""" Unit Tests for Py-ART's graph/common.py module. """ import pyart def test_corner_to_point(): corner = (36.5, -97.5) point = (36.4, -97.6) x, y = pyart.graph.common.corner_to_point(corner, point) assert round(x) == -8950. assert round(y) == -11119.0 def test_ax_radius_degrees(): R = pyar...
[ "pyart.graph.common.ax_radius", "pyart.graph.common.corner_to_point" ]
[((164, 213), 'pyart.graph.common.corner_to_point', 'pyart.graph.common.corner_to_point', (['corner', 'point'], {}), '(corner, point)\n', (198, 213), False, 'import pyart\n'), ((316, 367), 'pyart.graph.common.ax_radius', 'pyart.graph.common.ax_radius', (['(36.5)'], {'units': '"""degrees"""'}), "(36.5, units='degrees')\...
from downloader.downloader import Downloader from DFTI_categorization.dfti import DFTI from sentiment.sentiment import Sentiment from LDA_topic_analyzer.gridsearch_lda import GridSearchLDA from dataset_builder.dataset_builder import DatasetBuilder from ranking.rankings import Rankings from link_validator.link_validatio...
[ "LDA_topic_analyzer.gridsearch_lda.GridSearchLDA", "sentiment.sentiment.Sentiment", "DFTI_categorization.dfti.DFTI", "dataset_builder.dataset_builder.DatasetBuilder", "link_validator.link_validation.LinkValidator", "ranking.rankings.Rankings", "datetime.datetime.now", "downloader.downloader.Downloader...
[((409, 421), 'downloader.downloader.Downloader', 'Downloader', ([], {}), '()\n', (419, 421), False, 'from downloader.downloader import Downloader\n'), ((433, 439), 'DFTI_categorization.dfti.DFTI', 'DFTI', ([], {}), '()\n', (437, 439), False, 'from DFTI_categorization.dfti import DFTI\n'), ((456, 467), 'sentiment.senti...
import requests import zebr0 def test_basic_usage(): server = zebr0.TestServer({"key": "value"}) server.start() response = requests.get("http://127.0.0.1:8000/key") assert response.ok assert response.text == "value" server.stop() def test_context_manager_usage(): with zebr0.TestServer...
[ "zebr0.TestServer", "requests.get" ]
[((69, 103), 'zebr0.TestServer', 'zebr0.TestServer', (["{'key': 'value'}"], {}), "({'key': 'value'})\n", (85, 103), False, 'import zebr0\n'), ((139, 180), 'requests.get', 'requests.get', (['"""http://127.0.0.1:8000/key"""'], {}), "('http://127.0.0.1:8000/key')\n", (151, 180), False, 'import requests\n'), ((304, 338), '...
import time # TapeEquilibrium (Easy), O(N) def solution(A): first_part = 0 second_part = sum(A) minimum = None for element in A[:-1]: first_part += element second_part -= element distance = abs(first_part - second_part) if minimum is None or distance < minimum: ...
[ "time.time" ]
[((496, 507), 'time.time', 'time.time', ([], {}), '()\n', (505, 507), False, 'import time\n'), ((541, 552), 'time.time', 'time.time', ([], {}), '()\n', (550, 552), False, 'import time\n'), ((589, 600), 'time.time', 'time.time', ([], {}), '()\n', (598, 600), False, 'import time\n'), ((634, 645), 'time.time', 'time.time'...
import subprocess import datetime # https://stackoverflow.com/questions/431684/how-do-i-change-directory-cd-in-python import os class cd: """Context manager for changing the current working directory""" def __init__(self, newPath): self.newPath = os.path.expanduser(newPath) def __enter__(self): ...
[ "subprocess.run", "datetime.datetime.today", "os.getcwd", "os.path.expanduser", "os.chdir" ]
[((1463, 1492), 'subprocess.run', 'subprocess.run', (['clean_command'], {}), '(clean_command)\n', (1477, 1492), False, 'import subprocess\n'), ((264, 291), 'os.path.expanduser', 'os.path.expanduser', (['newPath'], {}), '(newPath)\n', (282, 291), False, 'import os\n'), ((343, 354), 'os.getcwd', 'os.getcwd', ([], {}), '(...
""" This module is only for the print statements. In production mode stdout printing is disabled. File logging can be enabled by creating a file that named 'debug.txt'. """ import os debug = True log_file = False #toggle logging if debug.txt is found in workdir if(os.path.isfile("debug.txt")): log_fi...
[ "os.path.isfile" ]
[((279, 306), 'os.path.isfile', 'os.path.isfile', (['"""debug.txt"""'], {}), "('debug.txt')\n", (293, 306), False, 'import os\n')]
import matplotlib.pyplot as plt import numpy as np import time from pydmd import HODMD def myfunc(x): return np.cos(x)*np.sin(np.cos(x)) + np.cos(x*.2) x = np.linspace(0, 10, 64) y = myfunc(x) snapshots = y plt.plot(x, snapshots, '.') plt.show() hodmd = HODMD(svd_rank=0, exact=True, opt=True, d=30).fit(snapsh...
[ "matplotlib.pyplot.subplot", "numpy.random.uniform", "matplotlib.pyplot.show", "pydmd.HODMD", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "numpy.linspace", "numpy.cos" ]
[((165, 187), 'numpy.linspace', 'np.linspace', (['(0)', '(10)', '(64)'], {}), '(0, 10, 64)\n', (176, 187), True, 'import numpy as np\n'), ((216, 243), 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'snapshots', '"""."""'], {}), "(x, snapshots, '.')\n", (224, 243), True, 'import matplotlib.pyplot as plt\n'), ((244, 254), ...
# -*- coding: utf-8 -*- """ Created on Mon Mar 16 17:02:17 2020 @author: rowe1 """ from __future__ import print_function import numpy as np import os import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' os.environ["PATH"] += os.pathsep + 'C:/P...
[ "numpy.sum", "matplotlib.pyplot.plot", "tensorflow.keras.layers.Dense", "matplotlib.pyplot.legend", "numpy.reshape", "tensorflow.keras.layers.Input", "numpy.random.rand", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig" ]
[((5691, 5711), 'numpy.sum', 'np.sum', (['temp_fitness'], {}), '(temp_fitness)\n', (5697, 5711), True, 'import numpy as np\n'), ((1440, 1493), 'matplotlib.pyplot.plot', 'plt.plot', (['generations', 'best', '"""r-"""'], {'label': '"""Best"""', 'lw': '(2)'}), "(generations, best, 'r-', label='Best', lw=2)\n", (1448, 1493...
import re smart_split_re = re.compile(r""" ((?: [^\s'"]* (?: (?:"(?:[^"\\]|\\.)*" | '(?:[^'\\]|\\.)*') [^\s'"]* )+ ) | \S+) """, re.VERBOSE) def smart_split(text): # https://github.com/django/django/blob/main/LICENCE """ Generator that splits a stri...
[ "re.compile" ]
[((28, 217), 're.compile', 're.compile', (['"""\n ((?:\n [^\\\\s\'"]*\n (?:\n (?:"(?:[^"\\\\\\\\]|\\\\\\\\.)*" | \'(?:[^\'\\\\\\\\]|\\\\\\\\.)*\')\n [^\\\\s\'"]*\n )+\n ) | \\\\S+)\n"""', 're.VERBOSE'], {}), '(\n """\n ((?:\n [^\\\\s\'"]*\n (?:\n ...
# -*- coding: utf-8 """Like the eponymous built-in module but with additional back-ported functonality if any. """ __all__ = [] from collections.abc import * from collections import abc as _abc __all__ += _abc.__all__ try: from _collections_abc import _check_methods except ImportError: def _check_methods(C, *meth...
[ "_collections_abc._check_methods" ]
[((783, 839), '_collections_abc._check_methods', '_check_methods', (['C', '"""__len__"""', '"""__iter__"""', '"""__contains__"""'], {}), "(C, '__len__', '__iter__', '__contains__')\n", (797, 839), False, 'from _collections_abc import _check_methods\n')]
# @author <NAME> <<EMAIL>>, Interactive Robotics Lab, Arizona State University from model_src.basismodelTorch import BasisModelTorch from model_src.basismodel import BasisModel import torch import torch.nn as nn import time class FeedBackControllerCellTorch(nn.Module): def __init__(self, robot_state_size,...
[ "torch.nn.ReLU", "torch.zeros_like", "model_src.basismodelTorch.BasisModelTorch", "torch.nn.LSTMCell", "torch.cat", "torch.squeeze", "torch.nn.Linear", "torch.nn.Hardsigmoid", "torch.nn.GRUCell" ]
[((1466, 1520), 'model_src.basismodelTorch.BasisModelTorch', 'BasisModelTorch', ([], {'nfunctions': 'self.n_bfuncs', 'scale': '(0.012)'}), '(nfunctions=self.n_bfuncs, scale=0.012)\n', (1481, 1520), False, 'from model_src.basismodelTorch import BasisModelTorch\n'), ((2781, 2802), 'torch.squeeze', 'torch.squeeze', (['act...
from flask import Flask, render_template, request from flask_uploads import UploadSet, configure_uploads from flask_basicauth import BasicAuth from mrt_file_server.request_log_adapter import RequestLogAdapter import logging import modes import os class FlashMessage: def __init__(self, message, category): self....
[ "flask_uploads.UploadSet", "logging.FileHandler", "os.makedirs", "os.path.realpath", "flask.Flask", "flask_basicauth.BasicAuth", "logging.StreamHandler", "os.environ.get", "logging.Formatter", "mrt_file_server.request_log_adapter.RequestLogAdapter", "flask.render_template", "os.path.join", "...
[((12975, 13021), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (12980, 13021), False, 'from flask import Flask, render_template, request\n'), ((13089, 13150), 'os.environ.get', 'os.environ.get', (['modes.ENVIRONMENT_VARIABLE', 'modes.DEVE...
from unittest import TestCase from day01.puzzle import Puzzle class TestPuzzle(TestCase): def test_calculate_fuel_requirement_for_module(self): self.assertEqual(2, Puzzle.calculate_fuel(12)) self.assertEqual(2, Puzzle.calculate_fuel(14)) self.assertEqual(654, Puzzle.calculate_fuel(1969))...
[ "day01.puzzle.Puzzle.calculate_total_fuel", "day01.puzzle.Puzzle.read_file", "day01.puzzle.Puzzle.calculate_fuel" ]
[((180, 205), 'day01.puzzle.Puzzle.calculate_fuel', 'Puzzle.calculate_fuel', (['(12)'], {}), '(12)\n', (201, 205), False, 'from day01.puzzle import Puzzle\n'), ((235, 260), 'day01.puzzle.Puzzle.calculate_fuel', 'Puzzle.calculate_fuel', (['(14)'], {}), '(14)\n', (256, 260), False, 'from day01.puzzle import Puzzle\n'), (...
import os from rec_to_nwb.processing.exceptions.missing_data_exception import \ MissingDataException from rec_to_nwb.processing.nwb.components.iterator.multi_thread_data_iterator import \ MultiThreadDataIterator from rec_to_nwb.processing.nwb.components.iterator.multi_thread_timestamp_iterator import \ Mul...
[ "rec_to_nwb.processing.nwb.components.mda.mda_data_manager.MdaDataManager", "rec_to_nwb.processing.nwb.components.iterator.multi_thread_data_iterator.MultiThreadDataIterator", "rec_to_nwb.processing.nwb.components.mda.mda_content.MdaContent", "rec_to_nwb.processing.nwb.components.iterator.multi_thread_timesta...
[((1045, 1152), 'rec_to_nwb.processing.nwb.components.mda.mda_timestamp_manager.MdaTimestampDataManager', 'MdaTimestampDataManager', ([], {'directories': 'timestamp_files', 'continuous_time_directories': 'continuous_time_files'}), '(directories=timestamp_files,\n continuous_time_directories=continuous_time_files)\n'...
from django.shortcuts import render from django.http import JsonResponse from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework import status from .serializers import TodolistSerializer from .models import Todolist # GET Data @api_view(['GET']) def a...
[ "rest_framework.decorators.api_view", "rest_framework.response.Response", "django.http.JsonResponse" ]
[((296, 313), 'rest_framework.decorators.api_view', 'api_view', (["['GET']"], {}), "(['GET'])\n", (304, 313), False, 'from rest_framework.decorators import api_view\n'), ((614, 632), 'rest_framework.decorators.api_view', 'api_view', (["['POST']"], {}), "(['POST'])\n", (622, 632), False, 'from rest_framework.decorators ...
# #Copyright (C) 2020-2021 ISTI-CNR #Licensed under the BSD 3-Clause Clear License (see license.txt) # import os import pandas as pd import torch from util import load_image, dataAugmentation_np from torch.utils.data import Dataset from sklearn.model_selection import train_test_split from torchvision.transforms.functi...
[ "pandas.DataFrame", "torchvision.transforms.functional.to_tensor", "pandas.read_csv", "sklearn.model_selection.train_test_split", "util.load_image", "torch.FloatTensor", "os.path.isfile", "os.path.join", "pandas.concat", "util.dataAugmentation_np" ]
[((409, 439), 'os.path.join', 'os.path.join', (['base_dir', '"""stim"""'], {}), "(base_dir, 'stim')\n", (421, 439), False, 'import os\n'), ((456, 485), 'os.path.join', 'os.path.join', (['stim_folder', 'fn'], {}), '(stim_folder, fn)\n', (468, 485), False, 'import os\n'), ((498, 523), 'os.path.isfile', 'os.path.isfile', ...
from setuptools import setup, find_packages import os version = '1.1' setup(name='django-easytree', version=version, description="Another attempt at modified preordered tree traversal for Django.", long_description="", # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifi...
[ "setuptools.find_packages" ]
[((658, 713), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['ez_setup', 'easytree_example']"}), "(exclude=['ez_setup', 'easytree_example'])\n", (671, 713), False, 'from setuptools import setup, find_packages\n')]
from django.urls import path, include from . import views from . import reports from . import views_aggregate urlpatterns = [ path('sales', views.SaleListView.as_view()), path('sales/<int:pk>', views.SaleDetailView.as_view()), path('sales/import', views.ImportSalesView.as_view()), path('sales/docs', vi...
[ "django.urls.path" ]
[((801, 849), 'django.urls.path', 'path', (['"""sales/destinations"""', 'reports.destinations'], {}), "('sales/destinations', reports.destinations)\n", (805, 849), False, 'from django.urls import path, include\n')]
#! /usr/bin/env python import xml.dom.minidom import pandas as pd import glob import math # pi # import the conversion module import LocalCoords def ProcessEntityStateFile(filename): isGoodMessage = True entityState = [] doc2 = xml.dom.minidom.parse(filename) if doc2.hasChildNodes(): try: entityId = 0 e...
[ "pandas.DataFrame", "glob.glob" ]
[((1608, 1635), 'glob.glob', 'glob.glob', (['"""EnityState_Id*"""'], {}), "('EnityState_Id*')\n", (1617, 1635), False, 'import glob\n'), ((1769, 1880), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'vehicleStateArray', 'columns': "['vehicleID', 'latitude', 'longitude', 'altitude', 'heading']"}), "(data=vehicleState...
# -*- coding: utf-8 -*- import scrapy import json import re from locations.hourstudy import inputoutput class DominosPizzaSpider(scrapy.Spider): name = "dominos_pizza" allowed_domains = ["dominos.com", "google.com"] start_urls = ( 'https://pizza.dominos.com/', ) def store_hours(self, sto...
[ "re.search" ]
[((1559, 1680), 're.search', 're.search', (['"""\\\\+?(\\\\s+)*(\\\\d{1})?(\\\\s|\\\\()*(\\\\d{3})(\\\\s+|\\\\))*(\\\\d{3})(\\\\s+|-)?(\\\\d{2})(\\\\s+|-)?(\\\\d{2})"""', 'phone'], {}), "(\n '\\\\+?(\\\\s+)*(\\\\d{1})?(\\\\s|\\\\()*(\\\\d{3})(\\\\s+|\\\\))*(\\\\d{3})(\\\\s+|-)?(\\\\d{2})(\\\\s+|-)?(\\\\d{2})'\n ,...
import re import scrapy from scrapy.spidermiddlewares.httperror import HttpError from twisted.internet.error import DNSLookupError from twisted.internet.error import TimeoutError, TCPTimedOutError from yahoo_spider.items import Product class YahooSpider(scrapy.Spider): name = "yahoo" start_urls = [ 'h...
[ "re.search", "yahoo_spider.items.Product", "scrapy.Request" ]
[((3776, 3785), 'yahoo_spider.items.Product', 'Product', ([], {}), '()\n', (3783, 3785), False, 'from yahoo_spider.items import Product\n'), ((4108, 4187), 'scrapy.Request', 'scrapy.Request', (['product_url'], {'callback': 'self.parse_amp', 'meta': "{'product': product}"}), "(product_url, callback=self.parse_amp, meta=...