code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This module is for webkit-layout-tests-related operations.""" import re from libs import test_name_util from libs.test_results.base_test_results import B...
[ "libs.test_name_util.RemoveVirtualLayersFromWebkitLayoutTestName", "libs.test_results.classified_test_results.ClassifiedTestResults", "re.compile" ]
[((1972, 2006), 're.compile', 're.compile', (['"""^virtual/[^/]+/(.*)$"""'], {}), "('^virtual/[^/]+/(.*)$')\n", (1982, 2006), False, 'import re\n'), ((8064, 8087), 'libs.test_results.classified_test_results.ClassifiedTestResults', 'ClassifiedTestResults', ([], {}), '()\n', (8085, 8087), False, 'from libs.test_results.c...
import os import zipfile import hashlib import logging import json from django.conf import settings from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import (AllowAny, IsAuthenticated, ) from .serializers import Test...
[ "logging.getLogger", "os.listdir", "zipfile.ZipFile", "os.makedirs", "json.dumps", "os.path.join", "os.chmod", "rest_framework.response.Response", "logging.FileHandler", "os.remove" ]
[((418, 439), 'logging.getLogger', 'logging.getLogger', (['""""""'], {}), "('')\n", (435, 439), False, 'import logging\n'), ((487, 531), 'logging.FileHandler', 'logging.FileHandler', (['"""recvCases/log/log.txt"""'], {}), "('recvCases/log/log.txt')\n", (506, 531), False, 'import logging\n'), ((1178, 1197), 'os.remove',...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "dataclasses.asdict", "json.dumps", "model_card_toolkit.utils.validation.validate_json_schema", "dataclasses.field", "model_card_toolkit.utils.validation.get_latest_schema_version" ]
[((9595, 9634), 'dataclasses.field', 'dataclasses.field', ([], {'default_factory': 'list'}), '(default_factory=list)\n', (9612, 9634), False, 'import dataclasses\n'), ((9666, 9708), 'dataclasses.field', 'dataclasses.field', ([], {'default_factory': 'Version'}), '(default_factory=Version)\n', (9683, 9708), False, 'impor...
#!/usr/bin/env python from __future__ import division, print_function import numpy as np import rospy from rospkg.rospack import RosPack from copy import deepcopy from tf2_ros import TransformListener, Buffer from bopt_grasp_quality.srv import bopt, boptResponse from bayesian_optimization import Random_Explorer from b...
[ "rospy.logerr", "tf2_ros.TransformListener", "rospy.init_node", "rospy.get_param", "numpy.array", "rospy.Time", "geometry_msgs.msg.PoseStamped", "rospy.get_name", "rospy.Duration", "rospy.sleep", "bayesian_optimization.opt_nodes.RS_Node" ]
[((486, 499), 'geometry_msgs.msg.PoseStamped', 'PoseStamped', ([], {}), '()\n', (497, 499), False, 'from geometry_msgs.msg import PoseStamped, Pose, Transform\n'), ((1025, 1050), 'rospy.init_node', 'rospy.init_node', (['"""ros_bo"""'], {}), "('ros_bo')\n", (1040, 1050), False, 'import rospy\n'), ((1297, 1337), 'rospy.g...
#!/usr/bin/env python from time import sleep from rediscache import rediscache import time, redis @rediscache(1, 2) def getTestValue(): return (5, 'toto') if __name__ == '__main__': myfunction()
[ "rediscache.rediscache" ]
[((103, 119), 'rediscache.rediscache', 'rediscache', (['(1)', '(2)'], {}), '(1, 2)\n', (113, 119), False, 'from rediscache import rediscache\n')]
from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.test import TestCase from .models import Event UserModel = get_user_model() class TestHappeningsGeneralViews(TestCase): fixtures = ['events.json', 'users.json'] def setUp(self): self.event = Even...
[ "django.contrib.auth.get_user_model", "django.core.urlresolvers.reverse" ]
[((165, 181), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (179, 181), False, 'from django.contrib.auth import get_user_model\n'), ((488, 511), 'django.core.urlresolvers.reverse', 'reverse', (['"""events_index"""'], {}), "('events_index')\n", (495, 511), False, 'from django.core.urlresolver...
# -*- coding: UTF-8 -*- # # generated by wxGlade 0.9.3 on Wed Sep 11 13:50:00 2019 # import wx # begin wxGlade: dependencies # end wxGlade # begin wxGlade: extracode # end wxGlade class MyDialog(wx.Dialog): def __init__(self, *args, **kwds): # begin wxGlade: MyDialog.__init__ kwds["style"] = kw...
[ "wx.ListBox", "wx.BoxSizer", "wx.Button", "wx.Dialog.__init__" ]
[((373, 412), 'wx.Dialog.__init__', 'wx.Dialog.__init__', (['self', '*args'], {}), '(self, *args, **kwds)\n', (391, 412), False, 'import wx\n'), ((477, 525), 'wx.ListBox', 'wx.ListBox', (['self', 'wx.ID_ANY'], {'choices': '[]', 'style': '(0)'}), '(self, wx.ID_ANY, choices=[], style=0)\n', (487, 525), False, 'import wx\...
#!/bin/python # -*- coding: utf-8 -*- import numpy as np import numpy.linalg as nl import scipy.linalg as sl import scipy.stats as ss import time aca = np.ascontiguousarray def nul(n): return np.zeros((n, n)) def iuc(x, y): """ Checks if pair of generalized EVs x,y is inside the unit circle. Here for ...
[ "numpy.abs", "numpy.eye", "numpy.linalg.solve", "numpy.linalg.qr", "numpy.sqrt", "numpy.isclose", "time.sleep", "numpy.linalg.det", "numpy.array", "numpy.zeros", "numpy.linalg.inv", "numpy.empty_like", "scipy.linalg.ordqz", "time.time", "numpy.round", "numpy.random.shuffle" ]
[((200, 216), 'numpy.zeros', 'np.zeros', (['(n, n)'], {}), '((n, n))\n', (208, 216), True, 'import numpy as np\n'), ((354, 382), 'numpy.empty_like', 'np.empty_like', (['x'], {'dtype': 'bool'}), '(x, dtype=bool)\n', (367, 382), True, 'import numpy as np\n'), ((709, 737), 'numpy.empty_like', 'np.empty_like', (['x'], {'dt...
import collections import logging from event_model import DocumentRouter, RunRouter import numpy from matplotlib.backends.backend_qt5agg import ( FigureCanvasQTAgg as FigureCanvas, NavigationToolbar2QT as NavigationToolbar) import matplotlib from qtpy.QtWidgets import ( # noqa QLabel, QWidget, QVB...
[ "logging.getLogger", "matplotlib.backends.backend_qt5agg.NavigationToolbar2QT", "traitlets.traitlets.Set", "qtpy.QtWidgets.QVBoxLayout", "matplotlib.use", "qtpy.QtWidgets.QLabel", "qtpy.QtWidgets.QWidget", "numpy.asarray", "traitlets.traitlets.Bool", "traitlets.traitlets.List", "collections.defa...
[((562, 586), 'matplotlib.use', 'matplotlib.use', (['"""Qt5Agg"""'], {}), "('Qt5Agg')\n", (576, 586), False, 'import matplotlib\n'), ((682, 718), 'logging.getLogger', 'logging.getLogger', (['"""bluesky_browser"""'], {}), "('bluesky_browser')\n", (699, 718), False, 'import logging\n'), ((852, 875), 'traitlets.traitlets....
import base64 import datetime import http.client import json import sys from pyblake2 import blake2b from flask import Flask, request from flask import render_template from util.config import host_config app = Flask(__name__) AUTH_SIZE = 16 API_KEY = '<KEY>' # use the provided one SECRET_KEY = '2a4309a8a2c54e539e...
[ "flask.render_template", "flask.request.args.get", "json.loads", "flask.Flask", "datetime.datetime.now", "json.JSONEncoder" ]
[((213, 228), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (218, 228), False, 'from flask import Flask, request\n'), ((1338, 1358), 'json.loads', 'json.loads', (['response'], {}), '(response)\n', (1348, 1358), False, 'import json\n'), ((2230, 2258), 'flask.request.args.get', 'request.args.get', (['"""tex...
import os import json from fair_research_login import NativeClient CLIENT_ID = 'e54de045-d346-42ef-9fbc-5d466f4a00c6' APP_NAME = 'My App' SCOPES = 'openid email profile urn:globus:auth:scope:transfer.api.globus.org:all urn:globus:auth:scope:search.api.globus.org:all' CONFIG_FILE = 'tokens-data.json' tokens = None # ...
[ "json.dumps", "fair_research_login.NativeClient" ]
[((384, 436), 'fair_research_login.NativeClient', 'NativeClient', ([], {'client_id': 'CLIENT_ID', 'app_name': 'APP_NAME'}), '(client_id=CLIENT_ID, app_name=APP_NAME)\n', (396, 436), False, 'from fair_research_login import NativeClient\n'), ((867, 911), 'json.dumps', 'json.dumps', (['tokens'], {'indent': '(4)', 'sort_ke...
# Libraries import ast import collections import pandas as pd # ----------------- # Methods # ----------------- def invert(d): if isinstance(d, dict): return {v: k for k, v in d.items()} return d def str2eval(x): if pd.isnull(x): return None return ast.literal_eval(x) def sortkeys(...
[ "ast.literal_eval", "pandas.isnull", "pandas.ExcelWriter", "pandas.read_excel" ]
[((240, 252), 'pandas.isnull', 'pd.isnull', (['x'], {}), '(x)\n', (249, 252), True, 'import pandas as pd\n'), ((285, 304), 'ast.literal_eval', 'ast.literal_eval', (['x'], {}), '(x)\n', (301, 304), False, 'import ast\n'), ((666, 706), 'pandas.read_excel', 'pd.read_excel', (['path_tmp'], {'sheet_name': 'None'}), '(path_t...
import argparse import twitter import os import json from likes import Likes import sys import time class Downloader: def __init__(self): self._current_path = os.path.dirname(os.path.realpath(__file__)) def downloadLikes(self, api, screen_name, force_redownload): liked_tweets = Likes( ...
[ "argparse.ArgumentParser", "likes.Likes", "os.path.join", "time.sleep", "os.path.realpath", "twitter.Api", "sys.exit", "json.load", "time.localtime", "json.dump" ]
[((306, 367), 'likes.Likes', 'Likes', (['api', 'screen_name', 'self._current_path', 'force_redownload'], {}), '(api, screen_name, self._current_path, force_redownload)\n', (311, 367), False, 'from likes import Likes\n'), ((862, 872), 'sys.exit', 'sys.exit', ([], {}), '()\n', (870, 872), False, 'import sys\n'), ((911, 1...
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N, X = na() S = ns() up = 0 tmp_S = "" for c in S[::-1]: if c =...
[ "sys.setrecursionlimit" ]
[((67, 97), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 6)'], {}), '(10 ** 6)\n', (88, 97), False, 'import sys\n')]
import sqlalchemy from sqlalchemy.ext.compiler import compiles import sys from src.container import create_container from src.models.base import Base from src.models import * @compiles(sqlalchemy.LargeBinary, 'mysql') def compile_binary_mysql(element, compiler, **kw): if isinstance(element.length, int) and eleme...
[ "src.models.base.Base.metadata.create_all", "src.container.create_container", "sqlalchemy.ext.compiler.compiles" ]
[((179, 220), 'sqlalchemy.ext.compiler.compiles', 'compiles', (['sqlalchemy.LargeBinary', '"""mysql"""'], {}), "(sqlalchemy.LargeBinary, 'mysql')\n", (187, 220), False, 'from sqlalchemy.ext.compiler import compiles\n'), ((597, 626), 'src.container.create_container', 'create_container', (['config_path'], {}), '(config_p...
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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. A copy of the License is # located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file acc...
[ "logging.getLogger", "boto3.client", "pcluster.cli.exceptions.APIOperationException", "pcluster.cli.exceptions.ParameterException", "jmespath.search" ]
[((1095, 1122), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1112, 1122), False, 'import logging\n'), ((2855, 2885), 'boto3.client', 'boto3.client', (['"""cloudformation"""'], {}), "('cloudformation')\n", (2867, 2885), False, 'import boto3\n'), ((3477, 3507), 'boto3.client', 'boto3.cli...
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from numpy.testing import assert_almost_equal from mmpose.models import build_loss from mmpose.models.utils.geometry import batch_rodrigues def test_mesh_loss(): """test mesh loss.""" loss_cfg = dict( type='MeshLoss', ...
[ "mmpose.models.build_loss", "torch.tensor", "pytest.raises", "torch.zeros", "torch.rand", "torch.ones" ]
[((534, 554), 'mmpose.models.build_loss', 'build_loss', (['loss_cfg'], {}), '(loss_cfg)\n', (544, 554), False, 'from mmpose.models import build_loss\n'), ((572, 613), 'torch.zeros', 'torch.zeros', (['[1, 72]'], {'dtype': 'torch.float32'}), '([1, 72], dtype=torch.float32)\n', (583, 613), False, 'import torch\n'), ((706,...
from operator import is_ from ._helper import _UnhashableFriendlyDict, _LinkedList, _is_iterable_non_string, Rangelike from .Range import Range from .RangeSet import RangeSet from typing import Iterable, Union, Any, TypeVar, List, Tuple, Dict, Tuple T = TypeVar('T', bound=Any) V = TypeVar('V', bound=Any) class Range...
[ "typing.TypeVar" ]
[((255, 278), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': 'Any'}), "('T', bound=Any)\n", (262, 278), False, 'from typing import Iterable, Union, Any, TypeVar, List, Tuple, Dict, Tuple\n'), ((283, 306), 'typing.TypeVar', 'TypeVar', (['"""V"""'], {'bound': 'Any'}), "('V', bound=Any)\n", (290, 306), False, 'from ...
from django.urls import path from cases.api.get_visuals_data import UpdateVisualsData from cases.api.kenyan_cases import KenyanCaseList from cases.api.visuals import VisualList urlpatterns = [ path('kenyan/all', KenyanCaseList.as_view(), name='Historical data'), path('history/', VisualList.as_view(), name='Hi...
[ "cases.api.get_visuals_data.UpdateVisualsData.as_view", "cases.api.kenyan_cases.KenyanCaseList.as_view", "cases.api.visuals.VisualList.as_view" ]
[((218, 242), 'cases.api.kenyan_cases.KenyanCaseList.as_view', 'KenyanCaseList.as_view', ([], {}), '()\n', (240, 242), False, 'from cases.api.kenyan_cases import KenyanCaseList\n'), ((290, 310), 'cases.api.visuals.VisualList.as_view', 'VisualList.as_view', ([], {}), '()\n', (308, 310), False, 'from cases.api.visuals im...
from typing import List import pytest from cfn_lint_ax.rules import ( CloudfrontDistributionComment, CloudfrontDistributionLogging, ) from tests.utils import BAD_TEMPLATE_FIXTURES_PATH, ExpectedError, assert_all_matches @pytest.mark.parametrize( "filename,expected_errors", [ ( "c...
[ "pytest.mark.parametrize", "tests.utils.assert_all_matches" ]
[((233, 675), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""filename,expected_errors"""', "[('cloudfront_distribution_without_logging_configuration.yaml', [(6,\n CloudfrontDistributionLogging,\n 'Property Resources/Distribution/Properties/DistributionConfig/Logging is missing'\n )]), ('cloudfront...
''' records.py: base record class for holding data Authors ------- <NAME> <<EMAIL>> -- Caltech Library Copyright --------- Copyright (c) 2018 by the California Institute of Technology. This code is open-source software released under a 3-clause BSD license. Please see the file "LICENSE" for more information. ''' ...
[ "holdit.debug.log" ]
[((2023, 2068), 'holdit.debug.log', 'log', (['"""Diffing known records with new records"""'], {}), "('Diffing known records with new records')\n", (2026, 2068), False, 'from holdit.debug import log\n')]
#!/usr/bin/env python ############################################################## # preparation of srtm data for use in gamma # module of software pyroSAR # <NAME> 2014-18 ############################################################## """ The following tasks are performed by executing this script: -reading of a par...
[ "zipfile.ZipFile", "spatialist.raster.Raster", "pyroSAR.ancillary.run", "os.remove", "spatialist.envi.HDRobject", "urllib2.urlopen", "pyroSAR.ancillary.finder", "shutil.move", "os.rename", "os.path.splitext", "os.path.isfile", "os.path.dirname", "shutil.copy", "re.findall", "os.makedirs"...
[((1426, 1450), 'os.path.dirname', 'os.path.dirname', (['dem_out'], {}), '(dem_out)\n', (1441, 1450), False, 'import os\n'), ((2054, 2078), 'os.remove', 'os.remove', (["(dem + '_temp')"], {}), "(dem + '_temp')\n", (2063, 2078), False, 'import os\n'), ((2081, 2106), 'os.remove', 'os.remove', (["(dem + '_temp2')"], {}), ...
import unittest from my_test_api import TestAPI class TestCreateIssue(TestAPI): def test_create_issue(self): params = { 'project': 'API', 'summary': 'test issue by robots', 'description': 'You are mine ! ', } response = self.put('/issue/', params) ...
[ "unittest.main" ]
[((616, 631), 'unittest.main', 'unittest.main', ([], {}), '()\n', (629, 631), False, 'import unittest\n')]
from model.contact import Contact from model.group import Group import random def test_add_contact_to_group(app, db): if len(db.get_contact_list()) == 0: app.contact.create(Contact(firstname="contact", lastname="forGroup", address="UA, Kyiv, KPI", homephone="0123456789", email="<EMAIL>")) if len(db.ge...
[ "model.group.Group", "model.contact.Contact" ]
[((187, 306), 'model.contact.Contact', 'Contact', ([], {'firstname': '"""contact"""', 'lastname': '"""forGroup"""', 'address': '"""UA, Kyiv, KPI"""', 'homephone': '"""0123456789"""', 'email': '"""<EMAIL>"""'}), "(firstname='contact', lastname='forGroup', address='UA, Kyiv, KPI',\n homephone='0123456789', email='<EMA...
import csv from collections import Counter from collections import defaultdict from datetime import datetime # Make dictionary with district as key # Create the CSV file: csvfile csvfile = open('crime_sampler.csv', 'r') # Create a dictionary that defaults to a list: crimes_by_district crimes_by_district = defaultdic...
[ "collections.Counter", "csv.DictReader", "collections.defaultdict", "datetime.datetime.strptime" ]
[((310, 327), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (321, 327), False, 'from collections import defaultdict\n'), ((381, 404), 'csv.DictReader', 'csv.DictReader', (['csvfile'], {}), '(csvfile)\n', (395, 404), False, 'import csv\n'), ((921, 930), 'collections.Counter', 'Counter', ([], {}),...
#!/usr/bin/env python # Break up idstr file into separate measid/objectid lists per exposure on /data0 import os import sys import numpy as np import time from dlnpyutils import utils as dln, db from astropy.io import fits import sqlite3 import socket from argparse import ArgumentParser def breakup_idstr(dbfile): ...
[ "os.path.exists", "dlnpyutils.utils.match", "sys.exit", "sqlite3.connect", "argparse.ArgumentParser", "os.makedirs", "dlnpyutils.utils.strlen", "dlnpyutils.utils.create_index", "numpy.array", "astropy.io.fits.getdata", "dlnpyutils.utils.readlines", "os.path.basename", "time.time", "numpy.d...
[((421, 432), 'time.time', 'time.time', ([], {}), '()\n', (430, 432), False, 'import time\n'), ((532, 624), 'astropy.io.fits.getdata', 'fits.getdata', (['"""/net/dl2/dnidever/nsc/instcal/v3/lists/nsc_v3_exposure_table.fits.gz"""', '(1)'], {}), "(\n '/net/dl2/dnidever/nsc/instcal/v3/lists/nsc_v3_exposure_table.fits.g...
# -*- coding: utf-8 -*- import unittest import unittest.mock as mock import requests import json from io import BytesIO from fastapi.testclient import TestClient from projects.api.main import app from projects.database import session_scope import tests.util as util app.dependency_overrides[session_scope] = util.ove...
[ "fastapi.testclient.TestClient", "tests.util.create_mocks", "unittest.mock.patch", "tests.util.delete_mocks" ]
[((354, 369), 'fastapi.testclient.TestClient', 'TestClient', (['app'], {}), '(app)\n', (364, 369), False, 'from fastapi.testclient import TestClient\n'), ((3238, 3341), 'unittest.mock.patch', 'mock.patch', (['"""projects.controllers.predictions.load_dataset"""'], {'side_effect': 'util.FILE_NOT_FOUND_ERROR'}), "('projec...
from __future__ import absolute_import import unittest import sys from testutils import ADMIN_CLIENT from testutils import harbor_server from library.project import Project from library.user import User from library.repository import Repository from library.repository import push_image_to_project from li...
[ "library.repository.push_special_image_to_project", "unittest.makeSuite", "library.registry.Registry", "unittest.TextTestRunner", "library.repository.push_image_to_project", "library.artifact.Artifact", "library.project.Project", "library.user.User", "library.tag_immutability.Tag_Immutability", "l...
[((712, 721), 'library.project.Project', 'Project', ([], {}), '()\n', (719, 721), False, 'from library.project import Project\n'), ((742, 748), 'library.user.User', 'User', ([], {}), '()\n', (746, 748), False, 'from library.user import User\n'), ((769, 781), 'library.repository.Repository', 'Repository', ([], {}), '()\...
""" Designed to be used in conjunction with xtream1101/humblebundle-downloader. Takes the download directory of that script, then copies all file types of each non-comic book to a chosen directory. Each folder in the target directory will be one book, containing the different file formats available for the boo...
[ "os.path.exists", "os.listdir", "os.makedirs", "json.dumps", "os.path.splitext", "shutil.copyfile", "os.path.isdir", "json.load" ]
[((866, 884), 'os.listdir', 'os.listdir', (['source'], {}), '(source)\n', (876, 884), False, 'import os\n'), ((1276, 1294), 'os.listdir', 'os.listdir', (['source'], {}), '(source)\n', (1286, 1294), False, 'import os\n'), ((1700, 1718), 'os.listdir', 'os.listdir', (['source'], {}), '(source)\n', (1710, 1718), False, 'im...
""" info_routes.py - Handle the routes for basic information pages. This module provides the views for the following routes: /about /privacy /terms_and_conditions Copyright (c) 2019 by <NAME>. All Rights Reserved. """ from flask import Blueprint, render_template info_routes = Blueprint("info_routes", __name__, tem...
[ "flask.render_template", "flask.Blueprint" ]
[((282, 345), 'flask.Blueprint', 'Blueprint', (['"""info_routes"""', '__name__'], {'template_folder': '"""templates"""'}), "('info_routes', __name__, template_folder='templates')\n", (291, 345), False, 'from flask import Blueprint, render_template\n'), ((418, 447), 'flask.render_template', 'render_template', (['"""abou...
import os import logging import tempfile log = logging.getLogger(__name__) class PidFile(object): """ A small helper class for pidfiles. """ PID_DIR = '/var/run/rollbard' def __init__(self, program, pid_dir=None): self.pid_file = "%s.pid" % program self.pid_dir = pid_dir or self.get_defa...
[ "logging.getLogger", "os.access", "os.path.join", "tempfile.gettempdir", "os.remove" ]
[((48, 75), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (65, 75), False, 'import logging\n'), ((358, 399), 'os.path.join', 'os.path.join', (['self.pid_dir', 'self.pid_file'], {}), '(self.pid_dir, self.pid_file)\n', (370, 399), False, 'import os\n'), ((560, 592), 'os.access', 'os.access...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('server', '0018_auto_20151124_1654'), ] operations = [ migrations.CreateModel( name='UpdateHistoryItem', ...
[ "django.db.models.ForeignKey", "django.db.migrations.AlterModelOptions", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((706, 793), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""updatehistory"""', 'options': "{'ordering': ['name']}"}), "(name='updatehistory', options={'ordering': [\n 'name']})\n", (734, 793), False, 'from django.db import models, migrations\n'), ((1168, 1235), 'django.d...
""" batch iterator""" from __future__ import absolute_import import ctypes from ddls.base import check_call, LIB, c_str, c_array from ddls.hpps.tensor import Tensor class Batch(object): """ The BatchIterator """ def __init__(self, handle): """ The batch from iterator """ self.hand...
[ "ddls.base.c_array", "ctypes.byref", "ctypes.POINTER", "ddls.base.c_str", "ddls.base.LIB.HPPS_BatchDestroy", "ddls.hpps.tensor.Tensor", "ctypes.c_int", "ctypes.c_void_p" ]
[((556, 573), 'ctypes.c_void_p', 'ctypes.c_void_p', ([], {}), '()\n', (571, 573), False, 'import ctypes\n'), ((785, 826), 'ddls.hpps.tensor.Tensor', 'Tensor', ([], {'handle': 'out', 'shape': 'None', 'type': 'None'}), '(handle=out, shape=None, type=None)\n', (791, 826), False, 'from ddls.hpps.tensor import Tensor\n'), (...
import autograd.numpy as anp import numpy as np from autograd import value_and_grad from pymoo.factory import normalize from pymoo.util.ref_dirs.energy import squared_dist from pymoo.util.ref_dirs.optimizer import Adam from pymoo.util.reference_direction import ReferenceDirectionFactory, scale_reference_directions c...
[ "numpy.abs", "numpy.eye", "autograd.numpy.row_stack", "pymoo.util.ref_dirs.optimizer.Adam", "numpy.any", "numpy.array", "pymoo.util.reference_direction.scale_reference_directions", "numpy.linspace", "pymoo.util.ref_dirs.energy.squared_dist", "autograd.value_and_grad", "numpy.full" ]
[((3256, 3275), 'autograd.numpy.row_stack', 'anp.row_stack', (['vals'], {}), '(vals)\n', (3269, 3275), True, 'import autograd.numpy as anp\n'), ((3444, 3461), 'numpy.any', 'np.any', (['(D < 1e-12)'], {}), '(D < 1e-12)\n', (3450, 3461), True, 'import numpy as np\n'), ((1252, 1258), 'pymoo.util.ref_dirs.optimizer.Adam', ...
import numpy as np import math import fatpack import matplotlib.pyplot as plt import pandas as pd #Create a function that reutrns the Goodman correction: def Goodman_method_correction(M_a,M_m,M_max): M_u = 1.5*M_max M_ar = M_a/(1-M_m/M_u) return M_ar def Equivalent_bending_moment(M_ar,Neq,m): P = M_ar...
[ "math.pow", "numpy.array", "numpy.max" ]
[((433, 461), 'math.pow', 'math.pow', (['(M_sum / Neq)', '(1 / m)'], {}), '(M_sum / Neq, 1 / m)\n', (441, 461), False, 'import math\n'), ((596, 613), 'numpy.array', 'np.array', (['[Sm, S]'], {}), '([Sm, S])\n', (604, 613), True, 'import numpy as np\n'), ((683, 692), 'numpy.max', 'np.max', (['S'], {}), '(S)\n', (689, 69...
# Programmer friendly subprocess wrapper. # # Author: <NAME> <<EMAIL>> # Last Change: March 2, 2020 # URL: https://executor.readthedocs.io """ Portable process control functionality for the `executor` package. The :mod:`executor.process` module defines the :class:`ControllableProcess` abstract base class which enable...
[ "logging.getLogger", "humanfriendly.Timer", "property_manager.required_property", "property_manager.PropertyManager.__init__", "executor.quote", "humanfriendly.terminal.spinners.Spinner" ]
[((1026, 1053), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1043, 1053), False, 'import logging\n'), ((11729, 11765), 'property_manager.required_property', 'required_property', ([], {'usage_notes': '(False)'}), '(usage_notes=False)\n', (11746, 11765), False, 'from property_manager imp...
from logging import basicConfig, getLogger, INFO from connect_to_ledger import create_qldb_driver from amazon.ion.simpleion import dumps, loads logger = getLogger(__name__) basicConfig(level=INFO) from constants import Constants from register_person import get_scentityid_from_personid,get_scentity_contact from sampled...
[ "logging.getLogger", "logging.basicConfig", "sampledata.sample_data.get_value_from_documentid", "register_person.get_scentity_contact", "check_container_safety.isContainerSafe", "connect_to_ledger.create_qldb_driver", "register_person.get_scentityid_from_personid", "sampledata.sample_data.update_docum...
[((153, 172), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (162, 172), False, 'from logging import basicConfig, getLogger, INFO\n'), ((173, 196), 'logging.basicConfig', 'basicConfig', ([], {'level': 'INFO'}), '(level=INFO)\n', (184, 196), False, 'from logging import basicConfig, getLogger, INFO...
#!/usr/bin/python # Copyright (c) 2009, Purdue University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list ...
[ "unittest.main", "iscpy.ParseISCString", "iscpy.ScrubComments", "iscpy.Serialize" ]
[((3717, 3732), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3730, 3732), False, 'import unittest\n'), ((3058, 3095), 'iscpy.ParseISCString', 'iscpy.ParseISCString', (['self.named_file'], {}), '(self.named_file)\n', (3078, 3095), False, 'import iscpy\n'), ((2460, 2488), 'iscpy.Serialize', 'iscpy.Serialize', (['...
import functools import logging from typing import Callable from logging_context.context.base import BaseContext from .context import get_logging_context def context_logging_factory(record_factory: Callable, context: BaseContext) -> Callable: @functools.wraps(record_factory) def wrapper(*args, **kwargs): ...
[ "logging.getLogRecordFactory", "functools.wraps" ]
[((252, 283), 'functools.wraps', 'functools.wraps', (['record_factory'], {}), '(record_factory)\n', (267, 283), False, 'import functools\n'), ((595, 624), 'logging.getLogRecordFactory', 'logging.getLogRecordFactory', ([], {}), '()\n', (622, 624), False, 'import logging\n')]
# %% [Algorithm 1c Loop] # # MUSHROOMS # %% [markdown] # ## Binary Classification # %% [markdown] # ### Imports # %% import os import pandas as pd import numpy as np import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt # %% [markdown] # ### Load Data dataset = pd.read_csv(r"C:\User...
[ "pandas.read_csv", "matplotlib.pyplot.ylabel", "math.log", "tensorflow.keras.callbacks.EarlyStopping", "tensorflow.keras.layers.Dense", "numpy.arange", "matplotlib.pyplot.xlabel", "sklearn.compose.ColumnTransformer", "pandas.DataFrame", "matplotlib.pyplot.ylim", "tensorflow.keras.layers.InputLay...
[((299, 388), 'pandas.read_csv', 'pd.read_csv', (['"""C:\\\\Users\\\\yxie367\\\\Documents\\\\GitHub\\\\Mushrooms\\\\DATA\\\\mushrooms.csv"""'], {}), "(\n 'C:\\\\Users\\\\yxie367\\\\Documents\\\\GitHub\\\\Mushrooms\\\\DATA\\\\mushrooms.csv')\n", (310, 388), True, 'import pandas as pd\n'), ((1241, 1260), 'numpy.arange...
import collections import contextlib import os.path import typing from contextlib import ExitStack from pathlib import Path from typing import BinaryIO, Dict, Optional, Generator, Iterator, Set from mercury_engine_data_structures import formats, dread_data from mercury_engine_data_structures.formats.base_resource impo...
[ "mercury_engine_data_structures.formats.format_for", "mercury_engine_data_structures.formats.pkg.Pkg.parse_stream", "mercury_engine_data_structures.dread_data.name_for_asset_id", "collections.defaultdict", "mercury_engine_data_structures.formats.base_resource.resolve_asset_id", "mercury_engine_data_struct...
[((1300, 1328), 'collections.defaultdict', 'collections.defaultdict', (['set'], {}), '(set)\n', (1323, 1328), False, 'import collections\n'), ((2600, 2626), 'mercury_engine_data_structures.formats.base_resource.resolve_asset_id', 'resolve_asset_id', (['asset_id'], {}), '(asset_id)\n', (2616, 2626), False, 'from mercury...
#!/usr/bin/env python import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import pandas as pd from conversion import read_imgs_masks from os.path import isfile, basename XERR=0.1 ELINEWIDTH=3 CAPSIZE=5 CAPTHICK=3 FMT='cD' def harm_plot(ydata, labels, outPrefix, bshell_b): '...
[ "conversion.read_imgs_masks", "numpy.mean", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "numpy.ones", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.use", "pandas.read_csv", "matplotlib.pyplot.plot", "os.path.isfile", "matplotlib.pyplot.figure", "os.path.basen...
[((60, 81), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (74, 81), False, 'import matplotlib\n'), ((553, 568), 'numpy.shape', 'np.shape', (['ydata'], {}), '(ydata)\n', (561, 568), True, 'import numpy as np\n'), ((640, 653), 'matplotlib.pyplot.figure', 'plt.figure', (['(1)'], {}), '(1)\n', (650,...
""" MIT License Copyright (c) 2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
[ "rpy2.robjects.pandas2ri.activate", "rpy2.robjects.pandas2ri.py2ri", "rpy2.robjects.r.assign", "rpy2.robjects.numpy2ri.py2ri", "pandas.merge", "matplotlib_venn.venn3", "rpy2.robjects.Formula", "rpy2.robjects.packages.importr", "numpy.array", "pandas.DataFrame", "warnings.warn", "pandas.isna", ...
[((1288, 1308), 'rpy2.robjects.pandas2ri.activate', 'pandas2ri.activate', ([], {}), '()\n', (1306, 1308), False, 'from rpy2.robjects import numpy2ri, pandas2ri, Formula\n'), ((1310, 1329), 'rpy2.robjects.numpy2ri.activate', 'numpy2ri.activate', ([], {}), '()\n', (1327, 1329), False, 'from rpy2.robjects import numpy2ri,...
from CGATReport.Tracker import * from CGATReport.Utils import PARAMS as P from IsoformReport import * ############################################################################### # parse params ############################################################################### DATABASE = P.get('', P.get('sql_backend'...
[ "CGATReport.Utils.PARAMS.get" ]
[((367, 396), 'CGATReport.Utils.PARAMS.get', 'P.get', (['"""annotations_database"""'], {}), "('annotations_database')\n", (372, 396), True, 'from CGATReport.Utils import PARAMS as P\n'), ((301, 342), 'CGATReport.Utils.PARAMS.get', 'P.get', (['"""sql_backend"""', '"""sqlite:///./csvdb"""'], {}), "('sql_backend', 'sqlite...
import torch from torch import Tensor from torch.utils.data import Dataset from torchvision import io from pathlib import Path from typing import Tuple from torchvision import transforms as T class CelebAMaskHQ(Dataset): CLASSES = [ 'background', 'skin', 'nose', 'eye_g', 'l_eye', 'r_eye', 'l_brow', 'r_br...
[ "torchvision.transforms.Resize", "torch.tensor", "semseg.utils.visualize.visualize_dataset_sample", "pathlib.Path" ]
[((449, 745), 'torch.tensor', 'torch.tensor', (['[[0, 0, 0], [204, 0, 0], [76, 153, 0], [204, 204, 0], [51, 51, 255], [204, \n 0, 204], [0, 255, 255], [255, 204, 204], [102, 51, 0], [255, 0, 0], [\n 102, 204, 0], [255, 255, 0], [0, 0, 153], [0, 0, 204], [255, 51, 153],\n [0, 204, 204], [0, 51, 0], [255, 153, 5...
import sys import table_gen import doc_gen import graph_gen import array_gen import os def main(argv): outdir = './sf1_dataset_output/' if os.path.exists(outdir): os.system("rm -rf "+outdir) os.mkdir(outdir) earthquake_dirpath = argv[1] shelter_dirpath = argv[2] gps_dirpath = argv[3] ...
[ "os.path.exists", "table_gen.shelter_gen", "array_gen.finedust_gen", "table_gen.gps_gen", "doc_gen.site_gen", "os.mkdir", "array_gen.finedust_idx_gen", "graph_gen.roadnetwork_gen", "os.system", "table_gen.earthquake_gen" ]
[((148, 170), 'os.path.exists', 'os.path.exists', (['outdir'], {}), '(outdir)\n', (162, 170), False, 'import os\n'), ((212, 228), 'os.mkdir', 'os.mkdir', (['outdir'], {}), '(outdir)\n', (220, 228), False, 'import os\n'), ((510, 562), 'table_gen.earthquake_gen', 'table_gen.earthquake_gen', (['earthquake_dirpath', 'outdi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # SOURCE: https://github.com/mozilla/bleach # SOURCE: https://bleach.readthedocs.io/en/latest/clean.html#allowed-protocols-protocols # pip install bleach import bleach # List of allowed protocols print('List of allowed protocols:', bleach.san...
[ "bleach.clean" ]
[((388, 450), 'bleach.clean', 'bleach.clean', (['"""<a href="smb://more_text">allowed protocol</a>"""'], {}), '(\'<a href="smb://more_text">allowed protocol</a>\')\n', (400, 450), False, 'import bleach\n'), ((505, 608), 'bleach.clean', 'bleach.clean', (['"""<a href="smb://more_text">allowed protocol</a>"""'], {'protoco...
import symro import symro.src.handlers.metaentitybuilder as eb from symro.src.parsing.amplparser import AMPLParser from symro.test.test_util import * # Scripts # ---------------------------------------------------------------------------------------------------------------------- FIXED_DIM_SCRIPT = """ set I = {1, 2...
[ "symro.read_ampl", "symro.src.parsing.amplparser.AMPLParser", "symro.src.handlers.metaentitybuilder.build_sub_meta_entity" ]
[((1442, 1529), 'symro.read_ampl', 'symro.read_ampl', ([], {'script_literal': 'FIXED_DIM_SCRIPT', 'working_dir_path': 'SCRIPT_DIR_PATH'}), '(script_literal=FIXED_DIM_SCRIPT, working_dir_path=\n SCRIPT_DIR_PATH)\n', (1457, 1529), False, 'import symro\n'), ((1829, 1914), 'symro.read_ampl', 'symro.read_ampl', ([], {'sc...
import boto3 import uuid import json import os def lambda_handler(event, context): record = event['Records'][0] s3bucket = record['s3']['bucket']['name'] s3object = record['s3']['object']['key'] print(s3object.split(".")[0].split("-")[2]) if s3object.split(".")[0].split("-")[2] ...
[ "boto3.client", "uuid.uuid4" ]
[((464, 490), 'boto3.client', 'boto3.client', (['"""transcribe"""'], {}), "('transcribe')\n", (476, 490), False, 'import boto3\n'), ((971, 997), 'boto3.client', 'boto3.client', (['"""transcribe"""'], {}), "('transcribe')\n", (983, 997), False, 'import boto3\n'), ((432, 444), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n'...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 10 14:12:28 2022 @author: 1517suj """ from model import Yolov1 import torch import torch.optim as optim import torchvision.transforms as T import cv2 from utils import ( non_max_suppression, mean_average_precision, intersection_over_unio...
[ "utils.cellboxes_to_boxes", "torch.unsqueeze", "utils.plot_image", "utils.non_max_suppression", "torch.load", "model.Yolov1", "cv2.cvtColor", "torchvision.transforms.Resize", "torchvision.transforms.ToTensor", "cv2.imread" ]
[((593, 642), 'model.Yolov1', 'Yolov1', ([], {'split_size': '(7)', 'num_boxes': '(2)', 'num_classes': '(20)'}), '(split_size=7, num_boxes=2, num_classes=20)\n', (599, 642), False, 'from model import Yolov1\n'), ((997, 1013), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (1007, 1013), False, 'import cv2\n'), (...
import pathlib from setuptools import setup # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() setup( name="satisfy-calc", version="1.1.3", description="Command line crafting tree visualizer for Sat...
[ "setuptools.setup", "pathlib.Path" ]
[((193, 849), 'setuptools.setup', 'setup', ([], {'name': '"""satisfy-calc"""', 'version': '"""1.1.3"""', 'description': '"""Command line crafting tree visualizer for Satisfactory Game by CoffeeStain Studios"""', 'long_description': 'README', 'long_description_content_type': '"""text/markdown"""', 'url': '"""https://git...
from TestOutput import LogManager class Auth_Test: def __init__(self): self.logger = LogManager('AuthTest') self.logger.writeTestEvent('AuthTest', 'Test Started') if __name__ == "__main__": Auth_Test()
[ "TestOutput.LogManager" ]
[((90, 112), 'TestOutput.LogManager', 'LogManager', (['"""AuthTest"""'], {}), "('AuthTest')\n", (100, 112), False, 'from TestOutput import LogManager\n')]
""" Takes the MNIST dataset as input (images and labels separated) and creates a new dataset only with 0's and 1's """ import numpy as np DATA_PATH = "data/raw/" OUTPUT_PATH = "data/processed/mnist/" X = np.loadtxt(DATA_PATH + "mnist2500_X.txt") labels = np.loadtxt(DATA_PATH + "mnist2500_labels.txt") X_new = [] labe...
[ "numpy.loadtxt", "numpy.savetxt" ]
[((206, 247), 'numpy.loadtxt', 'np.loadtxt', (["(DATA_PATH + 'mnist2500_X.txt')"], {}), "(DATA_PATH + 'mnist2500_X.txt')\n", (216, 247), True, 'import numpy as np\n'), ((257, 303), 'numpy.loadtxt', 'np.loadtxt', (["(DATA_PATH + 'mnist2500_labels.txt')"], {}), "(DATA_PATH + 'mnist2500_labels.txt')\n", (267, 303), True, ...
from __future__ import print_function import os import sys import pcbnew import numpy as np import pprint def inch_to_nanometer(value): return (value*25.4)*1e6 def nanometer_to_inch(value): return value/(25.4*1.e6) def nm_to_mm(value): return value*1.e-6 def mm_to_nm(value): return value*1.e6 def...
[ "pcbnew.LoadBoard", "os.path.join", "pprint.PrettyPrinter", "os.path.split" ]
[((1101, 1127), 'pcbnew.LoadBoard', 'pcbnew.LoadBoard', (['filename'], {}), '(filename)\n', (1117, 1127), False, 'import pcbnew\n'), ((1804, 1827), 'os.path.split', 'os.path.split', (['filename'], {}), '(filename)\n', (1817, 1827), False, 'import os\n'), ((1892, 1928), 'os.path.join', 'os.path.join', (['pathname', 'new...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. import sys import iotc from iotc import IOTConnectType, IOTLogLevel from random import randint import base64 import hmac import hashlib gIsMicroPython = ('implementation' in dir(sys)) and ('name' in dir(sys.implementation)) and (sys.imp...
[ "iotc.Device", "iotc.connect", "iotc.isConnected", "base64.b64decode", "iotc.doNext", "iotc.on", "iotc.setLogLevel", "sys.exit", "random.randint" ]
[((944, 1023), 'iotc.Device', 'iotc.Device', (['scopeId', 'deviceKey', 'deviceId', 'IOTConnectType.IOTC_CONNECT_SYMM_KEY'], {}), '(scopeId, deviceKey, deviceId, IOTConnectType.IOTC_CONNECT_SYMM_KEY)\n', (955, 1023), False, 'import iotc\n'), ((1024, 1075), 'iotc.setLogLevel', 'iotc.setLogLevel', (['IOTLogLevel.IOTC_LOGG...
import random import copy import time from numba import jit from array_creator import create_test_set from measure import get_elapsed_data @get_elapsed_data def scratch_lin_search(test_set): hit = False for key, arr in test_set: for i in arr: if i == key: break @get_elaps...
[ "array_creator.create_test_set" ]
[((489, 517), 'array_creator.create_test_set', 'create_test_set', (['size', 'trial'], {}), '(size, trial)\n', (504, 517), False, 'from array_creator import create_test_set\n')]
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst # Use "distribute" - the setuptools fork that supports python 3. from distribute_setup import use_setuptools use_setuptools() from distutils.command import sdist import glob import os import sys from setuptools import setup, find_p...
[ "distribute_setup.use_setuptools", "astropy.setup_helpers.wrap_build_ext", "setuptools.find_packages", "setuptools.setup", "os.path.join", "astropy.setup_helpers.update_package_files", "astropy.setup_helpers.get_debug_option", "astropy.setup_helpers.setup_test_command", "astropy.setup_helpers.adjust...
[((196, 212), 'distribute_setup.use_setuptools', 'use_setuptools', ([], {}), '()\n', (210, 212), False, 'from distribute_setup import use_setuptools\n'), ((1168, 1199), 'astropy.setup_helpers.adjust_compiler', 'setup_helpers.adjust_compiler', ([], {}), '()\n', (1197, 1199), False, 'from astropy import setup_helpers\n')...
import _config import _utils CONFIG_PATH = "config.toml" def main(): config = _config.read(CONFIG_PATH) for path_name in [x.in_ for x in config.directorios]: _utils.list_jpg_files_in_dir(path_name) if __name__ == "__main__": main()
[ "_config.read", "_utils.list_jpg_files_in_dir" ]
[((86, 111), '_config.read', '_config.read', (['CONFIG_PATH'], {}), '(CONFIG_PATH)\n', (98, 111), False, 'import _config\n'), ((178, 217), '_utils.list_jpg_files_in_dir', '_utils.list_jpg_files_in_dir', (['path_name'], {}), '(path_name)\n', (206, 217), False, 'import _utils\n')]
import time class SocketWrap(object): def __init__(self, sock, ip=None, port=None, host="", target=""): self._sock = sock self.ip = ip self.port = port self.host = host self.target = target self.recved_data = 0 self.recved_times = 0 self.create_time...
[ "time.time" ]
[((323, 334), 'time.time', 'time.time', ([], {}), '()\n', (332, 334), False, 'import time\n')]
import pytest from bigxml.handler_marker import _ATTR_MARKER, xml_handle_element, xml_handle_text from bigxml.nodes import XMLText def test_one_maker_element(): @xml_handle_element("abc", "def") def fct(arg): return arg * 6 assert getattr(fct, _ATTR_MARKER, None) == (("abc", "def"),) assert ...
[ "bigxml.handler_marker.xml_handle_text", "bigxml.handler_marker.xml_handle_element", "pytest.raises" ]
[((169, 201), 'bigxml.handler_marker.xml_handle_element', 'xml_handle_element', (['"""abc"""', '"""def"""'], {}), "('abc', 'def')\n", (187, 201), False, 'from bigxml.handler_marker import _ATTR_MARKER, xml_handle_element, xml_handle_text\n'), ((1360, 1392), 'bigxml.handler_marker.xml_handle_element', 'xml_handle_elemen...
""" This example demonstrates SQL Schema generation for each DB type supported. """ from tortoise import fields from tortoise.fields import SET_NULL from tortoise.models import Model class Tournament(Model): tid = fields.SmallIntField(pk=True) name = fields.CharField(max_length=100, description="Tournament n...
[ "tortoise.fields.BigIntField", "tortoise.fields.CharField", "tortoise.fields.DecimalField", "tortoise.fields.DatetimeField", "tortoise.fields.ManyToManyField", "tortoise.fields.IntField", "tortoise.fields.ForeignKeyField", "tortoise.fields.SmallIntField", "tortoise.fields.TextField" ]
[((221, 250), 'tortoise.fields.SmallIntField', 'fields.SmallIntField', ([], {'pk': '(True)'}), '(pk=True)\n', (241, 250), False, 'from tortoise import fields\n'), ((262, 337), 'tortoise.fields.CharField', 'fields.CharField', ([], {'max_length': '(100)', 'description': '"""Tournament name"""', 'index': '(True)'}), "(max...
# Copyright (c) 2014 Rackspace, 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 agreed to in wr...
[ "uuid.uuid1", "zaqar.tests.functional.helpers.create_message_body_v1_1", "ddt.data", "zaqar.tests.functional.helpers.create_zaqar_headers" ]
[((1621, 1647), 'ddt.data', 'ddt.data', (['{}', "{'limit': 2}"], {}), "({}, {'limit': 2})\n", (1629, 1647), False, 'import ddt\n'), ((2800, 2828), 'ddt.data', 'ddt.data', (['{}', "{'grace': 100}"], {}), "({}, {'grace': 100})\n", (2808, 2828), False, 'import ddt\n'), ((5737, 5810), 'ddt.data', 'ddt.data', (['(1000000000...
from xmlrpc.client import Boolean import boto3 import logging from datetime import date, datetime from botocore.exceptions import ClientError import json from json_datetime_serializer import json_datetime_serializer from kms_client import kmsClient from search_kms_using_account_id import search_kms_using_account_id fro...
[ "logging.getLogger", "logging.basicConfig", "json.loads", "xmlrpc.client.Boolean", "json.dumps", "kms_client.kmsClient" ]
[((355, 374), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (372, 374), False, 'import logging\n'), ((375, 469), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s: %(levelname)s: %(message)s"""'}), "(level=logging.INFO, format=\n '%(asctime)s: %(leve...
# Author: <NAME> # Date: July 2011 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ "unittest.main", "twisted.internet.defer.returnValue", "unittest.skipUnless" ]
[((976, 1039), 'unittest.skipUnless', 'unittest.skipUnless', (['have_twisted', '"""twisted module not present"""'], {}), "(have_twisted, 'twisted module not present')\n", (995, 1039), False, 'import unittest\n'), ((1707, 1722), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1720, 1722), False, 'import unittest\n'...
# Generated by Django 3.0.6 on 2020-06-14 05:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Color', fields=[ ...
[ "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((334, 427), '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", (350, 427), False, 'from django.db import migrations, models\...
# ipop-project # Copyright 2016, University of Florida # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
[ "logging.basicConfig", "logging.getLogger", "logging.debug", "logging.Formatter", "logging.handlers.RotatingFileHandler", "logging.warning", "logging.log", "os.path.isdir", "os.mkdir", "logging.addLevelName", "logging.info", "logging.error" ]
[((3104, 3138), 'logging.addLevelName', 'logging.addLevelName', (['(5)', '"""PKTDUMP"""'], {}), "(5, 'PKTDUMP')\n", (3124, 3138), False, 'import logging\n'), ((1880, 2010), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""[%(asctime)s.%(msecs)03d] %(levelname)s:\n%(message)s\n"""', 'datefmt': '"""%H:%M...
# Generated by Django 3.1.3 on 2020-12-13 08:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0010_auto_20201212_2058'), ] operations = [ migrations.AddField( model_name='watch', name='slug', ...
[ "django.db.models.SlugField" ]
[((329, 372), 'django.db.models.SlugField', 'models.SlugField', ([], {'default': '(1)', 'editable': '(False)'}), '(default=1, editable=False)\n', (345, 372), False, 'from django.db import migrations, models\n')]
from django.contrib import admin from .models import Writer, Record admin.site.register(Writer) admin.site.register(Record)
[ "django.contrib.admin.site.register" ]
[((69, 96), 'django.contrib.admin.site.register', 'admin.site.register', (['Writer'], {}), '(Writer)\n', (88, 96), False, 'from django.contrib import admin\n'), ((97, 124), 'django.contrib.admin.site.register', 'admin.site.register', (['Record'], {}), '(Record)\n', (116, 124), False, 'from django.contrib import admin\n...
from pykalman import KalmanFilter import numpy as np kf = KalmanFilter(transition_matrices=np.array([[1.0, 0.0, 0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0, 0.0, 1.0], ...
[ "numpy.array", "numpy.eye" ]
[((899, 939), 'numpy.array', 'np.array', (['[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]'], {}), '([0.0, 0.0, 0.0, 0.0, 0.0, 0.0])\n', (907, 939), True, 'import numpy as np\n'), ((954, 976), 'numpy.eye', 'np.eye', (['(6)'], {'dtype': 'float'}), '(6, dtype=float)\n', (960, 976), True, 'import numpy as np\n'), ((92, 304), 'numpy.array...
from api.models import Payroll class Payrolls(object): def __init__(self, cursor): """ :param cursor: MySQLdb.cursor.Cursor """ self.cursor = cursor cursor.execute('SET NAMES utf8;') cursor.execute('SET CHARACTER SET utf8;') cursor.execute('SET character_set...
[ "api.models.Payroll" ]
[((413, 438), 'api.models.Payroll', 'Payroll', (['*payroll_db_data'], {}), '(*payroll_db_data)\n', (420, 438), False, 'from api.models import Payroll\n')]
"""-------------------------------------------------------------------- COPYRIGHT 2014 Stanley Innovation Inc. Software License Agreement: 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 m...
[ "rospy.logerr", "socket.socket", "utils.m32", "sys.exit", "os.system" ]
[((2103, 2151), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_DGRAM'], {}), '(socket.AF_INET, socket.SOCK_DGRAM)\n', (2116, 2151), False, 'import socket\n'), ((2568, 2579), 'utils.m32', 'm32', (['rx_dat'], {}), '(rx_dat)\n', (2571, 2579), False, 'from utils import m32\n'), ((2640, 2715), 'rospy.log...
#!/usr/bin/env python # Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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...
[ "getopt.getopt", "os.path.join", "os.mkdir", "sys.exit", "random.randint" ]
[((2243, 2262), 'os.mkdir', 'os.mkdir', (['directory'], {}), '(directory)\n', (2251, 2262), False, 'import os\n'), ((2486, 2530), 'os.path.join', 'os.path.join', (['"""."""', 'directory', '"""resource.txt"""'], {}), "('.', directory, 'resource.txt')\n", (2498, 2530), False, 'import os\n'), ((2776, 2804), 'getopt.getopt...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.13.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import gzip import numpy as np import...
[ "numpy.mean", "numpy.median", "gzip.open", "numpy.percentile", "matplotlib.pyplot.subplots" ]
[((2511, 2583), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(3)'], {'figsize': '(16, 9)', 'dpi': '(300)', 'squeeze': '(False)', 'sharey': '(True)'}), '(1, 3, figsize=(16, 9), dpi=300, squeeze=False, sharey=True)\n', (2523, 2583), True, 'import matplotlib.pyplot as plt\n'), ((865, 912), 'gzip.open', 'gzip.op...
import json import pandas as pd import random df = pd.read_csv("experiment\stimuli_creation\maze_lexemes.csv") states = ["California","Alabama","Alaska","Arizona","Arkansas","Connecticut","Colorado","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Ma...
[ "random.choice", "random.shuffle", "pandas.read_csv" ]
[((52, 113), 'pandas.read_csv', 'pd.read_csv', (['"""experiment\\\\stimuli_creation\\\\maze_lexemes.csv"""'], {}), "('experiment\\\\stimuli_creation\\\\maze_lexemes.csv')\n", (63, 113), True, 'import pandas as pd\n'), ((697, 719), 'random.shuffle', 'random.shuffle', (['states'], {}), '(states)\n', (711, 719), False, 'i...
from pyfasta import Fasta def writebed(probelist, outbedfile): '''probe list format: chr\tstart\tend ''' outio = open(outbedfile, 'w') for pbnow in probelist: print(pbnow, file=outio) outio.close() def writefa(genomefile, bedfile, outfile): fastafile = Fasta(genomefile...
[ "pyfasta.Fasta" ]
[((304, 321), 'pyfasta.Fasta', 'Fasta', (['genomefile'], {}), '(genomefile)\n', (309, 321), False, 'from pyfasta import Fasta\n')]
import rclpy from rclpy.action import ActionClient from rclpy.node import Node from action_tutorials_interfaces.action import Fibonacci class FibonacciActionClient(Node): def __init__(self): super().__init__('fibonacci_action_client') self._action_client = ActionClient(self, Fibonacci, 'fibonacc...
[ "rclpy.spin_until_future_complete", "rclpy.init", "action_tutorials_interfaces.action.Fibonacci.Goal", "rclpy.action.ActionClient" ]
[((560, 581), 'rclpy.init', 'rclpy.init', ([], {'args': 'args'}), '(args=args)\n', (570, 581), False, 'import rclpy\n'), ((674, 729), 'rclpy.spin_until_future_complete', 'rclpy.spin_until_future_complete', (['action_client', 'future'], {}), '(action_client, future)\n', (706, 729), False, 'import rclpy\n'), ((281, 323),...
from web import app from glob import glob app.run( debug=True, host='0.0.0.0', port=5000, extra_files=glob('./web/templates/**.html') )
[ "glob.glob" ]
[((119, 150), 'glob.glob', 'glob', (['"""./web/templates/**.html"""'], {}), "('./web/templates/**.html')\n", (123, 150), False, 'from glob import glob\n')]
""" Django settings for addr project. Generated by 'django-admin startproject' using Django 1.11.29. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os f...
[ "os.getenv", "os.path.join", "os.environ.get", "dotenv.load_dotenv", "os.path.abspath", "datetime.timedelta" ]
[((754, 779), 'dotenv.load_dotenv', 'load_dotenv', (['"""/addr/.env"""'], {}), "('/addr/.env')\n", (765, 779), False, 'from dotenv import load_dotenv\n'), ((793, 823), 'os.getenv', 'os.getenv', (['"""DJANGO_SECRET_KEY"""'], {}), "('DJANGO_SECRET_KEY')\n", (802, 823), False, 'import os\n'), ((916, 937), 'os.getenv', 'os...
from bs4 import BeautifulSoup import requests import pymongo from splinter import Browser from flask import Flask, render_template, redirect from flask_pymongo import PyMongo import pandas as pd def init_browser(): executable_path = {"executable_path": "chromedriver"} return Browser("chrome", **execu...
[ "bs4.BeautifulSoup", "splinter.Browser", "pandas.read_html" ]
[((295, 347), 'splinter.Browser', 'Browser', (['"""chrome"""'], {'headless': '(False)'}), "('chrome', **executable_path, headless=False)\n", (302, 347), False, 'from splinter import Browser\n'), ((523, 557), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (536, 557)...
""" Tests the DQM Server class """ import json import os import threading import pytest import requests import qcfractal.interface as ptl from qcfractal import FractalServer, FractalSnowflake, FractalSnowflakeHandler from qcfractal.testing import ( await_true, find_open_port, pristine_loop, test_serv...
[ "qcfractal.testing.test_server.get_address", "requests.post", "qcfractal.interface.FractalClient", "qcfractal.interface.data.get_molecule", "qcfractal.FractalSnowflakeHandler", "requests.get", "qcfractal.testing.await_true" ]
[((550, 580), 'qcfractal.interface.FractalClient', 'ptl.FractalClient', (['test_server'], {}), '(test_server)\n', (567, 580), True, 'import qcfractal.interface as ptl\n'), ((1327, 1394), 'requests.post', 'requests.post', (['storage_api_addr'], {'json': "{'meta': {}, 'data': storage}"}), "(storage_api_addr, json={'meta'...
import argparse import os import os.path as osp import cv2 import numpy as np from scipy.stats import multivariate_normal from scipy.stats import norm import matplotlib # matplotlib.use('agg') from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import subprocess import shutil import chainer from ch...
[ "net_200x200.Conv_Siam_VAE", "os.listdir", "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "os.path.join", "numpy.swapaxes", "os.remove", "matplotlib.pyplot.figure", "matplotlib.pyplot.close", "data_generator.DataGenerator", "matplotlib.pyplot.scatter", "matplotlib.pyplot.cm.get_cmap", "...
[((1128, 1166), 'numpy.swapaxes', 'np.swapaxes', (['train_b0[train_ind]', '(1)', '(3)'], {}), '(train_b0[train_ind], 1, 3)\n', (1139, 1166), True, 'import numpy as np\n'), ((1176, 1214), 'numpy.swapaxes', 'np.swapaxes', (['train_b1[train_ind]', '(1)', '(3)'], {}), '(train_b1[train_ind], 1, 3)\n', (1187, 1214), True, 'i...
from gurobipy import * from itertools import combinations from time import localtime, strftime, time import config from fibonew2 import ( AK2exp, InitMatNew, MatroidCompatible, Resol2m, bi, bs, disjoint, rankfinder, ib, sb) from timing import endlog, log def CheckOneAK(mbases,gset,rnk): ''' We check ...
[ "fibonew2.MatroidCompatible", "fibonew2.sb", "fibonew2.InitMatNew", "timing.endlog", "timing.log", "fibonew2.Resol2m", "fibonew2.rankfinder", "time.time" ]
[((718, 724), 'time.time', 'time', ([], {}), '()\n', (722, 724), False, 'from time import localtime, strftime, time\n'), ((729, 749), 'timing.log', 'log', (['"""Start Program"""'], {}), "('Start Program')\n", (732, 749), False, 'from timing import endlog, log\n'), ((7020, 7033), 'timing.endlog', 'endlog', (['start'], {...
#!/usr/bin/env python import pytest import os import sys import logging logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) from pathlib import Path from dselib.thread import initTLS initTLS() from constants import CONST from dselib.path import normalizePath from dselib.dir impo...
[ "logging.basicConfig", "logging.getLogger", "dselib.module.LoadModuleFromPackage", "pathlib.Path", "dselib.thread.initTLS", "dselib.module.LoadModulePath", "dselib.dir.GetDSEExtDirectory", "pytest.main", "dselib.module.LoadModulePath2", "dselib.module.LoadModule" ]
[((73, 94), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (92, 94), False, 'import logging\n'), ((104, 131), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (121, 131), False, 'import logging\n'), ((223, 232), 'dselib.thread.initTLS', 'initTLS', ([], {}), '()\n', (230, 23...
from haversine import haversine def loadOrder(fileName): print("Loading order from " + fileName + "...") order = [] # open the file with open(fileName) as infile: # read line by line for line in infile: # remove newline character from the end...
[ "haversine.haversine" ]
[((1610, 1671), 'haversine.haversine', 'haversine', (['(90.0, 0.0)', '(trip[0].latitude, trip[0].longitude)'], {}), '((90.0, 0.0), (trip[0].latitude, trip[0].longitude))\n', (1619, 1671), False, 'from haversine import haversine\n'), ((2123, 2233), 'haversine.haversine', 'haversine', (['(currentGift.latitude, currentGif...
from xml.etree import ElementTree as ET import io import os.path import sys import gpxpy import builtins def find_all_tags(fp, tags, progress_callback=None): parser = ET.XMLPullParser(("start", "end")) root = None while True: chunk = fp.read(1024 * 1024) if not chunk: break ...
[ "xml.etree.ElementTree.XMLPullParser", "builtins.open", "io.TextIOWrapper" ]
[((174, 208), 'xml.etree.ElementTree.XMLPullParser', 'ET.XMLPullParser', (["('start', 'end')"], {}), "(('start', 'end'))\n", (190, 208), True, 'from xml.etree import ElementTree as ET\n'), ((3616, 3674), 'io.TextIOWrapper', 'io.TextIOWrapper', (['xml_file'], {'encoding': '"""UTF-8"""', 'newline': 'None'}), "(xml_file, ...
# utils/test_kronecker.py """Tests for rom_operator_inference.utils._kronecker.""" import pytest import numpy as np import rom_operator_inference as opinf # Index generation for fast self-product kronecker evaluation ================= def test_kron2c_indices(n_tests=100): """Test utils._kronecker.kron2c_indices...
[ "rom_operator_inference.utils.kron3c", "numpy.prod", "numpy.allclose", "rom_operator_inference.utils.kron2c", "numpy.random.random", "numpy.kron", "numpy.array", "numpy.random.randint", "rom_operator_inference.utils.expand_cubic", "rom_operator_inference.utils.kron3c_indices", "numpy.empty_like"...
[((338, 367), 'rom_operator_inference.utils.kron2c_indices', 'opinf.utils.kron2c_indices', (['(4)'], {}), '(4)\n', (364, 367), True, 'import rom_operator_inference as opinf\n'), ((654, 683), 'rom_operator_inference.utils.kron2c_indices', 'opinf.utils.kron2c_indices', (['(3)'], {}), '(3)\n', (680, 683), True, 'import ro...
# # GADANN - GPU Accelerated Deep Artificial Neural Network # # Copyright (C) 2014 <NAME> (<EMAIL>) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including w...
[ "logging.getLogger" ]
[((1244, 1271), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1261, 1271), False, 'import logging\n')]
# -*- coding: utf-8 -*- import redis import os import telebot import math import random import threading from telebot import types from emoji import emojize from pymongo import MongoClient token = os.environ['TELEGRAM_TOKEN'] bot = telebot.TeleBot(token) admins=[441399484] games={} client1=os.environ['database'] clie...
[ "threading.Timer", "telebot.TeleBot", "telebot.types.InlineKeyboardButton", "telebot.types.InlineKeyboardMarkup", "pymongo.MongoClient", "random.randint" ]
[((232, 254), 'telebot.TeleBot', 'telebot.TeleBot', (['token'], {}), '(token)\n', (247, 254), False, 'import telebot\n'), ((323, 343), 'pymongo.MongoClient', 'MongoClient', (['client1'], {}), '(client1)\n', (334, 343), False, 'from pymongo import MongoClient\n'), ((2202, 2245), 'threading.Timer', 'threading.Timer', (['...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Time: 2021-10-13 8:30 下午 Author: huayang Subject: """ import os import sys import json import doctest from typing import * from collections import defaultdict from torch.nn import functional as F # noqa from huaytools.pytorch.modules.loss.mean_squared_error import...
[ "torch.nn.functional.cosine_similarity", "huaytools.pytorch.modules.loss.mean_squared_error.mean_squared_error_loss", "doctest.testmod" ]
[((1024, 1059), 'torch.nn.functional.cosine_similarity', 'F.cosine_similarity', (['x1', 'x2'], {'dim': '(-1)'}), '(x1, x2, dim=-1)\n', (1043, 1059), True, 'from torch.nn import functional as F\n'), ((1078, 1124), 'huaytools.pytorch.modules.loss.mean_squared_error.mean_squared_error_loss', 'mean_squared_error_loss', (['...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 1 12:48:08 2020 @author: smith """ import spacy from gensim.test.utils import common_texts, get_tmpfile from gensim.models import Word2Vec from gensim.models.phrases import Phrases, Phraser import os import multiprocessing import csv import re impo...
[ "logging.basicConfig", "numpy.mean", "seaborn.regplot", "sklearn.decomposition.PCA", "numpy.set_printoptions", "numpy.std", "os.path.join", "sklearn.manifold.TSNE", "seaborn.set_style", "numpy.append", "numpy.empty", "pandas.read_excel", "pandas.DataFrame", "pandas.concat", "matplotlib.p...
[((569, 594), 'seaborn.set_style', 'sns.set_style', (['"""darkgrid"""'], {}), "('darkgrid')\n", (582, 594), True, 'import seaborn as sns\n'), ((624, 738), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s - %(asctime)s: %(message)s"""', 'datefmt': '"""%H:%M:%S"""', 'level': 'logging.INFO'}...
import setuptools __author__ = 'serena' try: import multiprocessing # noqa except ImportError: pass setuptools.setup( setup_requires=['pbr==2.0.0'], pbr=True)
[ "setuptools.setup" ]
[((113, 170), 'setuptools.setup', 'setuptools.setup', ([], {'setup_requires': "['pbr==2.0.0']", 'pbr': '(True)'}), "(setup_requires=['pbr==2.0.0'], pbr=True)\n", (129, 170), False, 'import setuptools\n')]
import os import re import html import unidecode import torch HTML_CLEANER_REGEX = re.compile('<.*?>') def clean_html(text): """remove html div tags""" return re.sub(HTML_CLEANER_REGEX, ' ', text) def binarize_labels(labels, hard=True): """If hard, binarizes labels to values of 0 & 1. If soft thresholds...
[ "re.sub", "unidecode.unidecode", "html.unescape", "re.compile" ]
[((85, 104), 're.compile', 're.compile', (['"""<.*?>"""'], {}), "('<.*?>')\n", (95, 104), False, 'import re\n'), ((170, 207), 're.sub', 're.sub', (['HTML_CLEANER_REGEX', '""" """', 'text'], {}), "(HTML_CLEANER_REGEX, ' ', text)\n", (176, 207), False, 'import re\n'), ((1118, 1137), 'html.unescape', 'html.unescape', (['t...
# -*- coding: utf-8 -*- """ Sphinx configuration for nexson. Largely based on <NAME>'s conf.py in DendroPy. """ import sys import os import time from sphinx.ext import autodoc from nexson import __version__ as PROJECT_VERSION # -- Sphinx Hackery ------------------------------------------------ # Following allows f...
[ "time.strftime" ]
[((4155, 4174), 'time.strftime', 'time.strftime', (['"""%Y"""'], {}), "('%Y')\n", (4168, 4174), False, 'import time\n')]
from winrt.windows.media.control import GlobalSystemMediaTransportControlsSessionManager from winrt.windows.storage.streams import DataReader, Buffer, InputStreamOptions async def get_current_session(): """ current_session.try_play_async() current_session.try_pause_async() current_session.try_toggle_p...
[ "winrt.windows.storage.streams.Buffer", "winrt.windows.storage.streams.DataReader.from_buffer", "winrt.windows.media.control.GlobalSystemMediaTransportControlsSessionManager.request_async" ]
[((1054, 1069), 'winrt.windows.storage.streams.Buffer', 'Buffer', (['(5000000)'], {}), '(5000000)\n', (1060, 1069), False, 'from winrt.windows.storage.streams import DataReader, Buffer, InputStreamOptions\n'), ((1237, 1267), 'winrt.windows.storage.streams.DataReader.from_buffer', 'DataReader.from_buffer', (['buffer'], ...
from django.conf import settings from django_webtest import WebTest from evap.evaluation.models import Course from evap.evaluation.models import UserProfile from evap.rewards.models import SemesterActivation from evap.rewards.models import RewardPointRedemptionEvent from evap.rewards.tools import reward_points_of_user ...
[ "evap.evaluation.models.Course.objects.get", "evap.staff.tests.lastform", "model_mommy.mommy.make", "evap.rewards.models.SemesterActivation.objects.get", "evap.evaluation.models.UserProfile.objects.get", "evap.rewards.models.RewardPointRedemptionEvent.objects.count", "django.core.urlresolvers.reverse", ...
[((2441, 2470), 'evap.evaluation.models.UserProfile.objects.get', 'UserProfile.objects.get', ([], {'pk': '(5)'}), '(pk=5)\n', (2464, 2470), False, 'from evap.evaluation.models import UserProfile\n'), ((2486, 2504), 'evap.staff.tests.lastform', 'lastform', (['response'], {}), '(response)\n', (2494, 2504), False, 'from e...
from unittest import TestCase from ddipy.constants import MISSING_PARAMETER from ddipy.ddi_utils import BadRequest from ddipy.seo_client import SeoClient class TestSeoClient(TestCase): def test_seo_home(self): client = SeoClient() res = client.get_seo_home() assert len(res.graph) > 0 ...
[ "ddipy.seo_client.SeoClient" ]
[((235, 246), 'ddipy.seo_client.SeoClient', 'SeoClient', ([], {}), '()\n', (244, 246), False, 'from ddipy.seo_client import SeoClient\n'), ((366, 377), 'ddipy.seo_client.SeoClient', 'SeoClient', ([], {}), '()\n', (375, 377), False, 'from ddipy.seo_client import SeoClient\n'), ((498, 509), 'ddipy.seo_client.SeoClient', ...
import re from textwrap import indent import mistune from jinja2 import Template from .directives.injection import InjectionDirective from .directives.renvoi import RenvoiDirective from .directives.section import SectionDirective from .directives.question import QuestionDirective from .directives.toc import Directive...
[ "textwrap.indent", "jinja2.Template", "re.compile" ]
[((760, 949), 're.compile', 're.compile', (['"""^\n (?P<before>.*?)\n (?:\\\\s*\\\\{\\\\.(?P<class>[\\\\w\\\\- ]+?)\\\\}\\\\s*)\n (?P<after>.*)\n $\n """', '(re.MULTILINE | re.VERBOSE)'], {}), '(\n """^\n (?P<before>.*?)\n (?:\\\\s*\\\\{\\\\.(?...
from datetime import datetime import pytest from intents import Sys from intents.connectors._experimental.snips import entities from intents.connectors._experimental.snips import prediction_format as pf def test_date_mapping_from_service(): mapping = entities.DateMapping() snips_date_result = { 'inpu...
[ "datetime.datetime", "intents.Sys.Date", "intents.connectors._experimental.snips.prediction_format.from_dict", "intents.connectors._experimental.snips.entities.DateMapping", "pytest.warns" ]
[((258, 280), 'intents.connectors._experimental.snips.entities.DateMapping', 'entities.DateMapping', ([], {}), '()\n', (278, 280), False, 'from intents.connectors._experimental.snips import entities\n'), ((949, 980), 'intents.connectors._experimental.snips.prediction_format.from_dict', 'pf.from_dict', (['snips_date_res...
import pytest from django.core.management import call_command @pytest.mark.django_db def test_common_runperiodic(): call_command('runperiodic')
[ "django.core.management.call_command" ]
[((122, 149), 'django.core.management.call_command', 'call_command', (['"""runperiodic"""'], {}), "('runperiodic')\n", (134, 149), False, 'from django.core.management import call_command\n')]
#!/usr/bin/env python3 # # horizon.py - by <NAME> - 2019-12-18 # # Example Python program for Astronomy Engine: # https://github.com/cosinekitty/astronomy # # This is a more advanced example. It shows how to use coordinate # transforms and a binary search to find the two azimuths where the # eclipti...
[ "astro_demo_common.ParseArgs", "astronomy.Spherical", "astronomy.RotateVector", "astronomy.Rotation_ECL_HOR", "astronomy.HorizonFromVector", "astronomy.VectorFromSphere" ]
[((707, 756), 'astronomy.Spherical', 'astronomy.Spherical', (['(0.0)', 'ecliptic_longitude', '(1.0)'], {}), '(0.0, ecliptic_longitude, 1.0)\n', (726, 756), False, 'import astronomy\n'), ((1015, 1054), 'astronomy.VectorFromSphere', 'astronomy.VectorFromSphere', (['eclip', 'time'], {}), '(eclip, time)\n', (1041, 1054), F...