code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
'''Cube puzzles - five typical 3x3x3 3D puzzles. (c) <NAME>, 2019 a demo script for the sceneKit wrapper package for Pythonista See the README.md for details. ''' import sceneKit as scn import ui import Gestures from data import * from hud import * import manual import selector import setup class MainViewControl...
[ "ui.get_window_size", "sceneKit.clearCache", "Gestures.Gestures", "selector.SelectorStage" ]
[((881, 897), 'sceneKit.clearCache', 'scn.clearCache', ([], {}), '()\n', (895, 897), True, 'import sceneKit as scn\n'), ((1002, 1022), 'ui.get_window_size', 'ui.get_window_size', ([], {}), '()\n', (1020, 1022), False, 'import ui\n'), ((1097, 1116), 'Gestures.Gestures', 'Gestures.Gestures', ([], {}), '()\n', (1114, 1116...
# Copyright 2010-2011 <NAME> <<EMAIL>> # # This file is part of Poezio. # # Poezio is free software: you can redistribute it and/or modify # it under the terms of the zlib license. See the COPYING file. """ Starting point of poezio. Launches both the Connection and Gui """ import sys import os import signal import l...
[ "logging.getLogger", "poezio.config.check_create_cache_dir", "poezio.config.run_cmdline_args", "poezio.theming.update_themes_dir", "sys.exit", "poezio.config.post_logging_setup", "poezio.roster.create_roster", "poezio.config.setup_logging", "poezio.config.check_create_log_dir", "poezio.logger.crea...
[((1149, 1186), 'sys.stdout.write', 'sys.stdout.write', (['"""\x1b]0;poezio\x07"""'], {}), "('\\x1b]0;poezio\\x07')\n", (1165, 1186), False, 'import sys\n'), ((1191, 1209), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (1207, 1209), False, 'import sys\n'), ((1258, 1290), 'poezio.config.check_create_config_d...
# 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, ...
[ "backend.svd", "numpy.prod", "autodiff.tensordot", "tensors.quimb_tensors.gauge_transform_mps", "backend.transpose", "backend.reshape", "copy.deepcopy", "numpy.core.einsumfunc._parse_einsum_input", "tensors.quimb_tensors.rand_mps", "autodiff.hessian", "backend.einsum", "graph_ops.graph_transfo...
[((1067, 1075), 'attr.s', 'attr.s', ([], {}), '()\n', (1073, 1075), False, 'import attr\n'), ((3390, 3398), 'attr.s', 'attr.s', ([], {}), '()\n', (3396, 3398), False, 'import attr\n'), ((6226, 6234), 'attr.s', 'attr.s', ([], {}), '()\n', (6232, 6234), False, 'import attr\n'), ((1615, 1624), 'attr.ib', 'attr.ib', ([], {...
# -*- test-case-name: twisted.test.test_strports -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # """Port description language This module implements a description mini-language for ports, and provides functions to parse it and to use it to directly construct appropriate networ...
[ "twisted.internet.ssl.DefaultOpenSSLContextFactory" ]
[((2059, 2118), 'twisted.internet.ssl.DefaultOpenSSLContextFactory', 'ssl.DefaultOpenSSLContextFactory', (['privateKey', 'certKey'], {}), '(privateKey, certKey, **kw)\n', (2091, 2118), False, 'from twisted.internet import ssl\n')]
import copy as cp from qubiter.adv_applications.MeanHamil import * from qubiter.device_specific.Qubiter_to_RigettiPyQuil import * from qubiter.device_specific.RigettiTools import * import qubiter.utilities_gen as utg from openfermion.ops import QubitOperator from pyquil.quil import Program, Pragma from pyquil.gates ...
[ "pyquil.api.WavefunctionSimulator", "pyquil.quil.Pragma", "qubiter.utilities_gen.preface", "pyquil.quil.Program" ]
[((3053, 3062), 'pyquil.quil.Program', 'Program', ([], {}), '()\n', (3060, 3062), False, 'from pyquil.quil import Program, Pragma\n'), ((3157, 3198), 'pyquil.quil.Pragma', 'Pragma', (['"""INITIAL_REWIRING"""', '[\'"PARTIAL"\']'], {}), '(\'INITIAL_REWIRING\', [\'"PARTIAL"\'])\n', (3163, 3198), False, 'from pyquil.quil i...
"""Private module for the DataIO class.""" import json import logging import warnings from collections import OrderedDict from copy import deepcopy from datetime import datetime from pathlib import Path from typing import Tuple import numpy as np import pandas as pd try: import pyarrow as pa except ImportError: ...
[ "logging.getLogger", "collections.OrderedDict", "numpy.unique", "pathlib.Path", "datetime.datetime.strptime", "json.dumps", "copy.deepcopy", "warnings.warn", "pyarrow.feather.write_feather" ]
[((2264, 2291), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2281, 2291), False, 'import logging\n'), ((18900, 18923), 'copy.deepcopy', 'deepcopy', (['self.timedata'], {}), '(self.timedata)\n', (18908, 18923), False, 'from copy import deepcopy\n'), ((23141, 23154), 'collections.Ordered...
#!/usr/bin/python # -*- coding: utf-8 -*- #pyqt_sw23_MouseEvent.py import sys from PyQt5.QtCore import (Qt, QTimer, QRect) from PyQt5.QtWidgets import (QWidget, QPushButton, QApplication, QLabel) from PyQt5.QtGui import QPainter, QColor, QFont from PyQt5.QtGui import QPixmap, QKeyEvent class Ui(QWidget): #statisc...
[ "PyQt5.QtGui.QPixmap", "PyQt5.QtGui.QPainter", "PyQt5.QtWidgets.QApplication" ]
[((2591, 2613), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (2603, 2613), False, 'from PyQt5.QtWidgets import QWidget, QPushButton, QApplication, QLabel\n'), ((1805, 1815), 'PyQt5.QtGui.QPainter', 'QPainter', ([], {}), '()\n', (1813, 1815), False, 'from PyQt5.QtGui import QPainte...
from typing import List, Dict, Callable, Union, Optional import abc import types import logging from functools import partial from contextlib import ExitStack from common_pyutil.functional import first, maybe_then def partial_or_func_name(x: Callable, describe: bool = False): return maybe_then(x, [partial, types....
[ "common_pyutil.functional.maybe_then", "contextlib.ExitStack" ]
[((290, 424), 'common_pyutil.functional.maybe_then', 'maybe_then', (['x', '[partial, types.FunctionType]', "[lambda x: ('partial ' if describe else '') + x.func.__name__, lambda x: x.\n __name__]"], {}), "(x, [partial, types.FunctionType], [lambda x: ('partial ' if\n describe else '') + x.func.__name__, lambda x:...
import discord from discord.ext import commands class NIT(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_message(self, message): if message.author.bot: return if message.guild is None: return if messag...
[ "discord.ext.commands.Cog.listener", "discord.Embed" ]
[((133, 156), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (154, 156), False, 'from discord.ext import commands\n'), ((623, 698), 'discord.Embed', 'discord.Embed', ([], {'description': 'f"""{message.author.mention}->{ch.mention}を作成しました"""'}), "(description=f'{message.author.mention}->...
import reader with open("./scraper/samples/example_game.pgn") as my_file: data = my_file.read() game1 = reader.Game(data) print(game1.ai_player())
[ "reader.Game" ]
[((110, 127), 'reader.Game', 'reader.Game', (['data'], {}), '(data)\n', (121, 127), False, 'import reader\n')]
#!/usr/bin/env python import roslib roslib.load_manifest('crazyflie_control') import rospy import sys from geometry_msgs.msg import Vector3 from nav_msgs.msg import Odometry from crazyflie_driver.msg import RPYT import dynamic_reconfigure.server from crazyflie_control.cfg import CrazyflieControlConfig from math imp...
[ "rospy.Publisher", "geometry_msgs.msg.Vector3", "numpy.transpose", "rospy.is_shutdown", "rospy.init_node", "rospy.get_param", "rospy.get_rostime", "roslib.load_manifest", "rospy.Time", "rospy.Rate", "numpy.matrix", "rospy.Subscriber", "crazyflie_driver.msg.RPYT", "rospy.loginfo" ]
[((37, 78), 'roslib.load_manifest', 'roslib.load_manifest', (['"""crazyflie_control"""'], {}), "('crazyflie_control')\n", (57, 78), False, 'import roslib\n'), ((641, 653), 'rospy.Time', 'rospy.Time', ([], {}), '()\n', (651, 653), False, 'import rospy\n'), ((814, 850), 'rospy.init_node', 'rospy.init_node', (['"""crazyfl...
# Generated by Django 3.2.3 on 2021-05-24 15:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Mobiles', '0004_payment_email'), ] operations = [ migrations.AddField( model_name='payment', name='address', ...
[ "django.db.models.CharField", "django.db.models.IntegerField" ]
[((331, 386), 'django.db.models.CharField', 'models.CharField', ([], {'default': '"""user_adress"""', 'max_length': '(255)'}), "(default='user_adress', max_length=255)\n", (347, 386), False, 'from django.db import migrations, models\n'), ((505, 558), 'django.db.models.CharField', 'models.CharField', ([], {'default': '"...
## data folder: D:\work\project\ITA Refresh\Session4 Oil Prediction # -*- coding: utf-8 -*- from __future__ import print_function import time import warnings import numpy as np import time import matplotlib.pyplot as plt from numpy import newaxis from keras.layers.core import Dense, Activation, Dropout from keras.la...
[ "numpy.insert", "numpy.reshape", "matplotlib.pyplot.savefig", "matplotlib.pyplot.show", "keras.layers.core.Activation", "keras.layers.recurrent.LSTM", "matplotlib.pyplot.plot", "keras.models.Sequential", "numpy.array", "matplotlib.pyplot.figure", "keras.layers.core.Dense", "keras.layers.core.D...
[((384, 417), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (407, 417), False, 'import warnings\n'), ((1208, 1224), 'numpy.array', 'np.array', (['result'], {}), '(result)\n', (1216, 1224), True, 'import numpy as np\n'), ((1315, 1339), 'numpy.random.shuffle', 'np.random.sh...
""" Generic support for objects with full-featured Parameters and messaging. """ import copy import re import sys import inspect import random import numbers import operator from collections import defaultdict, namedtuple, OrderedDict from operator import itemgetter,attrgetter from types import FunctionType from func...
[ "logging.getLogger", "operator.attrgetter", "collections.OrderedDict", "collections.namedtuple", "logging.StreamHandler", "copy.deepcopy", "logging.Formatter", "re.match", "functools.wraps", "inspect.getargspec", "collections.defaultdict", "functools.partial", "logging.addLevelName", "oper...
[((776, 816), 'logging.addLevelName', 'logging.addLevelName', (['VERBOSE', '"""VERBOSE"""'], {}), "(VERBOSE, 'VERBOSE')\n", (796, 816), False, 'import logging\n'), ((16146, 16192), 'collections.namedtuple', 'namedtuple', (['"""PInfo"""', '"""inst cls name pobj what"""'], {}), "('PInfo', 'inst cls name pobj what')\n", (...
import os import glob import shutil import dotbot import dotbot.util import textwrap from dotbot.util.common import on_permitted_os class Link(dotbot.Plugin): ''' Symbolically links dotfiles. ''' _directive = 'link' def can_handle(self, directive): return directive == self._directive ...
[ "textwrap.fill", "os.path.islink", "os.remove", "dotbot.util.common.on_permitted_os", "os.path.exists", "os.readlink", "os.path.normpath", "os.path.isdir", "os.unlink", "glob.glob", "os.path.expanduser", "os.path.relpath", "os.path.dirname", "os.makedirs", "os.path.expandvars", "os.pat...
[((8352, 8367), 'glob.glob', 'glob.glob', (['path'], {}), '(path)\n', (8361, 8367), False, 'import glob\n'), ((9269, 9293), 'os.path.expanduser', 'os.path.expanduser', (['path'], {}), '(path)\n', (9287, 9293), False, 'import os\n'), ((10105, 10129), 'os.path.expanduser', 'os.path.expanduser', (['path'], {}), '(path)\n'...
from . import * from beastx.events import register def evaluate(commands): interpreter = BrainfuckInterpreter(commands) while interpreter.available(): interpreter.step() return interpreter.output.read() __all__ = ( 'BrainfuckInterpreter' ) class IOStream: def __init__(self, data=None)...
[ "beastx.events.register" ]
[((4106, 4128), 'beastx.events.register', 'register', ([], {'pattern': '"""bf"""'}), "(pattern='bf')\n", (4114, 4128), False, 'from beastx.events import register\n'), ((4482, 4505), 'beastx.events.register', 'register', ([], {'pattern': '"""rbf"""'}), "(pattern='rbf')\n", (4490, 4505), False, 'from beastx.events import...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 22 16:12:00 2018 @author: dataquanty """ from flask import Flask, request, redirect, url_for, flash, jsonify from textsearch import TextSearch import json """ Flask API that returns the n closest match of a text query Takes as input a json query ...
[ "flask.Flask", "textsearch.TextSearch", "flask.request.get_json", "json.load", "flask.jsonify" ]
[((2891, 2906), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (2896, 2906), False, 'from flask import Flask, request, redirect, url_for, flash, jsonify\n'), ((3088, 3106), 'flask.request.get_json', 'request.get_json', ([], {}), '()\n', (3104, 3106), False, 'from flask import Flask, request, redirect, url_...
# Copyright (c) 2017 Intel Corporation. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. from chroma_agent.lib.shell import AgentShell def fail_node(args): # force a manual failover by failing a node AgentShell.try_run(["sync"]) A...
[ "chroma_agent.lib.shell.AgentShell.try_run" ]
[((286, 314), 'chroma_agent.lib.shell.AgentShell.try_run', 'AgentShell.try_run', (["['sync']"], {}), "(['sync'])\n", (304, 314), False, 'from chroma_agent.lib.shell import AgentShell\n'), ((319, 347), 'chroma_agent.lib.shell.AgentShell.try_run', 'AgentShell.try_run', (["['sync']"], {}), "(['sync'])\n", (337, 347), Fals...
from PPPForgivenessSDK.client import Client # to run file 'read_forgiveness_requests.py', use valid token and slug associated with a valid forgiveness request client = Client( access_token='{{YOUR_TOKEN_HERE}}', vendor_key='{{YOUR_VENDOR_KEY}}', environment='sandbox' ) forgiveness_api = client.forgiveness...
[ "PPPForgivenessSDK.client.Client" ]
[((169, 272), 'PPPForgivenessSDK.client.Client', 'Client', ([], {'access_token': '"""{{YOUR_TOKEN_HERE}}"""', 'vendor_key': '"""{{YOUR_VENDOR_KEY}}"""', 'environment': '"""sandbox"""'}), "(access_token='{{YOUR_TOKEN_HERE}}', vendor_key='{{YOUR_VENDOR_KEY}}',\n environment='sandbox')\n", (175, 272), False, 'from PPPF...
""" Generate a fully specified benchmark configuration file, given a lightweight specification and a complete source of benchmark data. Specification File ------------------ Score hierarchy input intended to be as easy to construct as possible, relying on automatic inference of unspecified weights, benchmark configs, ...
[ "yaml.full_load", "argparse.ArgumentParser", "yaml.dump", "collections.defaultdict", "json.load" ]
[((6566, 6610), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (6589, 6610), False, 'import argparse\n'), ((4499, 4527), 'collections.defaultdict', 'defaultdict', (['rec_defaultdict'], {}), '(rec_defaultdict)\n', (4510, 4527), False, 'from collections ...
r"""undocumented 这个页面的代码很大程度上参考(复制粘贴)了https://github.com/huggingface/pytorch-pretrained-BERT的代码, 如果你发现该代码对你 有用,也请引用一下他们。 """ __all__ = [ "BertModel", ] import copy import json import math import os import torch from torch import nn import numpy as np from ...io.file_utils import _get_file_name_base_on_postf...
[ "torch.nn.Dropout", "torch.nn.Tanh", "math.sqrt", "copy.deepcopy", "numpy.sin", "torch.arange", "torch.nn.LayerNorm", "os.path.isdir", "torch.matmul", "torch.zeros_like", "torch.nn.Embedding", "json.loads", "torch.ones_like", "torch.is_tensor", "numpy.cos", "torch.nn.Softmax", "numpy...
[((5139, 5167), 'copy.deepcopy', 'copy.deepcopy', (['self.__dict__'], {}), '(self.__dict__)\n', (5152, 5167), False, 'import copy\n'), ((5461, 5490), 'os.path.isdir', 'os.path.isdir', (['json_file_path'], {}), '(json_file_path)\n', (5474, 5490), False, 'import os\n'), ((5873, 5889), 'torch.sigmoid', 'torch.sigmoid', ([...
# # Copyright 2021 (c) Microsoft Corporation # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this script and associated documentation files (the "script"), to deal # in the script without restriction, including without limitation the rights # to use, copy, modify, m...
[ "fileinput.input", "time.sleep", "sys.exit" ]
[((1768, 1778), 'sys.exit', 'sys.exit', ([], {}), '()\n', (1776, 1778), False, 'import sys\n'), ((3515, 3525), 'sys.exit', 'sys.exit', ([], {}), '()\n', (3523, 3525), False, 'import sys\n'), ((1991, 2027), 'fileinput.input', 'fileinput.input', ([], {'files': '"""roleGet.txt"""'}), "(files='roleGet.txt')\n", (2006, 2027...
import h5py import numpy as np import sys def save_activity(activity, network_params, filename, folder_index, base_path, activity_key='activity',dim=2): filepath = base_path + 'pattern_formation/data{}d/'.format(dim) full_name = filepath + filename f = h5py.File(full_name,'a') f.create_dataset(folder_index + act...
[ "numpy.max", "h5py.File" ]
[((258, 283), 'h5py.File', 'h5py.File', (['full_name', '"""a"""'], {}), "(full_name, 'a')\n", (267, 283), False, 'import h5py\n'), ((751, 776), 'h5py.File', 'h5py.File', (['full_name', '"""a"""'], {}), "(full_name, 'a')\n", (760, 776), False, 'import h5py\n'), ((843, 858), 'numpy.max', 'np.max', (['indices'], {}), '(in...
#!/usr/bin/env python import os from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.cluster import KMeans from generators import flatten1 cachepath = "/home/ben/python/opinml/cache/" def get_cached_texts(cachepath): for line in open(os.path.join(cachepath, "urlindex.inf")): loc = ...
[ "sklearn.cluster.KMeans", "os.path.exists", "sklearn.feature_extraction.text.TfidfVectorizer", "os.path.join" ]
[((476, 513), 'sklearn.feature_extraction.text.TfidfVectorizer', 'TfidfVectorizer', ([], {'stop_words': '"""english"""'}), "(stop_words='english')\n", (491, 513), False, 'from sklearn.feature_extraction.text import TfidfVectorizer\n'), ((636, 702), 'sklearn.cluster.KMeans', 'KMeans', ([], {'n_clusters': 'ksize', 'init'...
import pandas as pd import matplotlib.pyplot as plt import numpy as np colors = ['r', 'g', 'b', 'c'] run_to_label = { 0: '$k=0$', 1: '$k=4$', 2: '$k=1$', 3: '$k=4$ only' } fig, ax = plt.subplots(nrows=1, ncols=2, num='k_moment') # fig.suptitle('k_moment', fontsize=20) # source for i in range(4): ...
[ "matplotlib.pyplot.subplots", "pandas.read_csv", "matplotlib.pyplot.show" ]
[((200, 246), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'nrows': '(1)', 'ncols': '(2)', 'num': '"""k_moment"""'}), "(nrows=1, ncols=2, num='k_moment')\n", (212, 246), True, 'import matplotlib.pyplot as plt\n'), ((1294, 1304), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (1302, 1304), True, 'import ...
# Default locale mapping for the Facebook JS SDK # The list of supported locales is at # https://www.facebook.com/translations/FacebookLocales.xml import os from django.utils.translation import get_language, to_locale def _build_locale_table(filename_or_file): """ Parses the FacebookLocales.xml file and buil...
[ "xml.dom.minidom.parse", "django.utils.translation.to_locale", "os.path.join", "os.path.realpath", "django.utils.translation.get_language" ]
[((630, 653), 'xml.dom.minidom.parse', 'parse', (['filename_or_file'], {}), '(filename_or_file)\n', (635, 653), False, 'from xml.dom.minidom import parse\n'), ((1494, 1547), 'os.path.join', 'os.path.join', (['exec_dir', '"""data"""', '"""FacebookLocales.xml"""'], {}), "(exec_dir, 'data', 'FacebookLocales.xml')\n", (150...
import pymysql pymysql.install_as_MySQLdb() # 因为MySQLdb只适用于Python2.x的版本,Python3.x的版本中使用PyMySQL替代MySQLdb
[ "pymysql.install_as_MySQLdb" ]
[((16, 44), 'pymysql.install_as_MySQLdb', 'pymysql.install_as_MySQLdb', ([], {}), '()\n', (42, 44), False, 'import pymysql\n')]
from copy import deepcopy try: import rospy from ros_panda_controller.msg import AgentActions ready_for_real_world = True missing_module = None except ImportError as e: missing_module = e.name ready_for_real_world = False class Arm: def __init__(self): # check if everything is re...
[ "copy.deepcopy" ]
[((1080, 1111), 'copy.deepcopy', 'deepcopy', (['self._joint_positions'], {}), '(self._joint_positions)\n', (1088, 1111), False, 'from copy import deepcopy\n'), ((1469, 1501), 'copy.deepcopy', 'deepcopy', (['self._joint_velocities'], {}), '(self._joint_velocities)\n', (1477, 1501), False, 'from copy import deepcopy\n'),...
# -*- coding: utf-8 -*- ''' unit tests for the script engine ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import skipIf, TestCase from tests.support.mock import...
[ "salt.engines.script._get_serializer", "salt.engines.script._read_stdout", "tests.support.unit.skipIf", "tests.support.mock.patch" ]
[((496, 527), 'tests.support.unit.skipIf', 'skipIf', (['NO_MOCK', 'NO_MOCK_REASON'], {}), '(NO_MOCK, NO_MOCK_REASON)\n', (502, 527), False, 'from tests.support.unit import skipIf, TestCase\n'), ((1177, 1206), 'salt.engines.script._get_serializer', 'script._get_serializer', (['"""bad"""'], {}), "('bad')\n", (1199, 1206)...
""" MARS compiler backend - responsible for taking program events emitted by the driver and converting them into code. """ import logging from ..backend_utils import FunctionStack from .common32 import Common32Backend from .. import types from ..util import mangle_label LOGGER = logging.getLogger('spc.mars_mips') cl...
[ "logging.getLogger" ]
[((282, 316), 'logging.getLogger', 'logging.getLogger', (['"""spc.mars_mips"""'], {}), "('spc.mars_mips')\n", (299, 316), False, 'import logging\n')]
#! /usr/bin/python3 import os import sys sys.path.append('/home/ubuntu/RecSys') sys.path.append('/home/ubuntu/RecSys/Web') os.environ['DJANGO_SETTINGS_MODULE']='Web.settings' import django django.setup() from mainsite.models import Movie f = open("omdbMovies.txt", encoding="ISO-8859-1") f2 = open("mlLinks.csv") first_l...
[ "django.setup", "sys.path.append" ]
[((41, 79), 'sys.path.append', 'sys.path.append', (['"""/home/ubuntu/RecSys"""'], {}), "('/home/ubuntu/RecSys')\n", (56, 79), False, 'import sys\n'), ((80, 122), 'sys.path.append', 'sys.path.append', (['"""/home/ubuntu/RecSys/Web"""'], {}), "('/home/ubuntu/RecSys/Web')\n", (95, 122), False, 'import sys\n'), ((189, 203)...
import logging from collections import defaultdict from datetime import datetime from math import isnan from timeit import default_timer as timer import gtfs_kit from django.contrib.gis.db import models from django.contrib.gis.geos import LineString, Point from django.db import transaction from django.utils import tim...
[ "logging.getLogger", "gtfs_kit.calendar.get_dates", "django.db.transaction.atomic", "datetime.datetime.strptime", "timeit.default_timer", "parler.utils.context.switch_language", "gtfs.models.Shape.objects.create", "gtfs_kit.datestr_to_date", "django.utils.timezone.now", "gtfs_kit.compute_trip_acti...
[((4438, 4454), 'gtfs.importers.gtfs_feed_reader.GTFSFeedReader', 'GTFSFeedReader', ([], {}), '()\n', (4452, 4454), False, 'from gtfs.importers.gtfs_feed_reader import GTFSFeedReader\n'), ((4645, 4662), 'collections.defaultdict', 'defaultdict', (['dict'], {}), '(dict)\n', (4656, 4662), False, 'from collections import d...
# -*- coding: utf-8 -*- """ Created on Fri Dec 18 22:59:59 2020 @author: CS Check the read-me file for a in-depth summary of the problem """ import numpy as np import sys sys.path.append('..') import TrussAnalysis as ta class environment: """ The enviroment will act as a container for the data in the probl...
[ "numpy.abs", "TrussAnalysis.plotTruss", "numpy.array", "numpy.sum", "TrussAnalysis.runTrussAnalysis", "sys.path.append" ]
[((174, 195), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (189, 195), False, 'import sys\n'), ((2180, 2277), 'TrussAnalysis.runTrussAnalysis', 'ta.runTrussAnalysis', (['Areas', 'Forces', 'nodeIds', 'xNodeCoords', 'yNodeCoords', 'Connectivity', 'trussMat'], {}), '(Areas, Forces, nodeIds, xNodeC...
#!/usr/bin/env python # Created by "Thieu" at 20:22, 12/06/2020 ----------% # Email: <EMAIL> % # Github: https://github.com/thieu1995 % # --------------------------------------------------% import numpy as np from copy import deepcopy from mealpy.optimizer import Optimizer class BaseSMA...
[ "numpy.abs", "numpy.log10", "copy.deepcopy", "numpy.zeros", "numpy.random.uniform", "numpy.arctanh" ]
[((3792, 3841), 'numpy.arctanh', 'np.arctanh', (['(-((epoch + 1) / (self.epoch + 1)) + 1)'], {}), '(-((epoch + 1) / (self.epoch + 1)) + 1)\n', (3802, 3841), True, 'import numpy as np\n'), ((8079, 8128), 'numpy.arctanh', 'np.arctanh', (['(-((epoch + 1) / (self.epoch + 1)) + 1)'], {}), '(-((epoch + 1) / (self.epoch + 1))...
import json dic={ "a": 1, "a": 2, "a": 3, "a": 4, "b": 1, "b": 2 } with open('unique_keys.json','w') as data: json.dump(dic,data,indent=2)
[ "json.dump" ]
[((143, 173), 'json.dump', 'json.dump', (['dic', 'data'], {'indent': '(2)'}), '(dic, data, indent=2)\n', (152, 173), False, 'import json\n')]
""" McAfee Command Line AntiVirus Python Wrapper. This module contains system independent code for executing and processing the results of the McAfee Command Line AV Scanner. It is originally targetted to linux but should be compatible with windows also with minimal modifications. """ import logging import os impo...
[ "logging.getLogger", "os.path.exists", "xml.etree.cElementTree.fromstring", "re.compile", "subprocess.Popen", "os.path.join", "os.path.isdir", "tempfile.NamedTemporaryFile", "re.sub", "assemblyline.al.common.av_result.AvScanResult" ]
[((644, 695), 'logging.getLogger', 'logging.getLogger', (['"""assemblyline.svc.mcafee.common"""'], {}), "('assemblyline.svc.mcafee.common')\n", (661, 695), False, 'import logging\n'), ((4977, 5005), 're.compile', 're.compile', (['"""&#x[0-9][0-9];"""'], {}), "('&#x[0-9][0-9];')\n", (4987, 5005), False, 'import re\n'), ...
import re with open("prob4_input.txt", 'r') as f: rawdata = f.readlines() fullset = set(["byr","iyr","eyr","hgt","hcl","ecl","pid"]) valid_count = 0 valid_data = [] newdata = {} for line in rawdata: if line == "\n": if len(fullset.difference(newdata.keys())) == 0: valid_count += 1 ...
[ "re.search" ]
[((983, 1013), 're.search', 're.search', (['"""#[0-9a-f]{6,6}"""', 'v'], {}), "('#[0-9a-f]{6,6}', v)\n", (992, 1013), False, 'import re\n'), ((1214, 1240), 're.search', 're.search', (['"""[0-9]{9,9}"""', 'v'], {}), "('[0-9]{9,9}', v)\n", (1223, 1240), False, 'import re\n'), ((702, 730), 're.search', 're.search', (['"""...
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-02-02 20:14 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('formfactory', '0003_formfieldgroup_show_title'), ] operations = [ migrations.Remove...
[ "django.db.migrations.RemoveField" ]
[((303, 360), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""form"""', 'name': '"""post_to"""'}), "(model_name='form', name='post_to')\n", (325, 360), False, 'from django.db import migrations\n')]
""" SC101 Baby Names Project Adapted from <NAME>'s Baby Names assignment by <NAME>. FILE: Babygraphics.py NAME: <NAME> """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
[ "babygraphicsgui.make_gui", "babynames.read_files", "tkinter.Tk" ]
[((7034, 7065), 'babynames.read_files', 'babynames.read_files', (['FILENAMES'], {}), '(FILENAMES)\n', (7054, 7065), False, 'import babynames\n'), ((7116, 7128), 'tkinter.Tk', 'tkinter.Tk', ([], {}), '()\n', (7126, 7128), False, 'import tkinter\n'), ((7173, 7270), 'babygraphicsgui.make_gui', 'gui.make_gui', (['top', 'CA...
#!/usr/bin/env python """ Install.py tool to download, unpack, build, and link to the plumed2 library used to automate the steps described in the README file in this dir """ from __future__ import print_function import sys, os, subprocess, shutil from argparse import ArgumentParser sys.path.append('..') from install...
[ "subprocess.check_output", "os.path.exists", "install_helpers.fullpath", "argparse.ArgumentParser", "install_helpers.checkmd5sum", "os.path.join", "os.symlink", "shutil.rmtree", "os.path.isfile", "install_helpers.geturl", "os.path.isdir", "sys.exit", "os.path.islink", "sys.path.append", ...
[((286, 307), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (301, 307), False, 'import sys, os, subprocess, shutil\n'), ((386, 475), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'prog': '"""Install.py"""', 'description': '"""LAMMPS library build wrapper script"""'}), "(prog='Install.py', d...
from sqlalchemy import Column, Integer, String, ForeignKeyConstraint from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declared_attr from .general import pop_periode class MxTunjanganKinerja: __tablename__ = 'tunjangan_kinerja' @declared_attr def job_level_id(cls): re...
[ "sqlalchemy.orm.relationship", "sqlalchemy.String", "sqlalchemy.Column" ]
[((325, 358), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (331, 358), False, 'from sqlalchemy import Column, Integer, String, ForeignKeyConstraint\n'), ((539, 570), 'sqlalchemy.Column', 'Column', (['Integer'], {'nullable': '(False)'}), '(Integer, nullable=Fa...
from random import randint import json import time import requests import vk # Настройки with open('keys.json', 'r') as file: VK_API_ACCESS_TOKEN = json.loads(file.read())['vk']['token'] with open('sets.json', 'r') as file: sets = json.loads(file.read()) GROUP_ID = sets['vk']['group'] SERVER_LINK = sets['serve...
[ "requests.post", "vk.Session", "time.sleep", "vk.API", "random.randint" ]
[((407, 451), 'vk.Session', 'vk.Session', ([], {'access_token': 'VK_API_ACCESS_TOKEN'}), '(access_token=VK_API_ACCESS_TOKEN)\n', (417, 451), False, 'import vk\n'), ((458, 491), 'vk.API', 'vk.API', (['session'], {'v': 'VK_API_VERSION'}), '(session, v=VK_API_VERSION)\n', (464, 491), False, 'import vk\n'), ((883, 896), 't...
import environ root = environ.Path(__file__) - 2 env = environ.Env() environ.Env.read_env() BASE_DIR = root() SECRET_KEY = env.str('SECRET_KEY') DEBUG = env.bool('DEBUG', default=False) TEMPLATE_DEBUG = DEBUG DATABASES = {'default': env.db('DATABASE_URL')} CACHES = {'default': env.cache('REDIS_CACHE_URL')} STATI...
[ "environ.Path", "environ.Env", "environ.Env.read_env" ]
[((56, 69), 'environ.Env', 'environ.Env', ([], {}), '()\n', (67, 69), False, 'import environ\n'), ((70, 92), 'environ.Env.read_env', 'environ.Env.read_env', ([], {}), '()\n', (90, 92), False, 'import environ\n'), ((23, 45), 'environ.Path', 'environ.Path', (['__file__'], {}), '(__file__)\n', (35, 45), False, 'import env...
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator from sklearn.datasets import load_iris from sklearn.decomposition import PCA iris = load_iris() pca = PCA(n_components=2) X_pca = pca.fit_transform(iris.data) colors = ['navy', 'turquoise', 'darkorange'] plt.figure(figsize=(...
[ "sklearn.datasets.load_iris", "sklearn.decomposition.PCA", "matplotlib.pyplot.plot", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure", "numpy.zeros", "matplotlib.ticker.MaxNLocator", "numpy.cumsum", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplo...
[((178, 189), 'sklearn.datasets.load_iris', 'load_iris', ([], {}), '()\n', (187, 189), False, 'from sklearn.datasets import load_iris\n'), ((197, 216), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': '(2)'}), '(n_components=2)\n', (200, 216), False, 'from sklearn.decomposition import PCA\n'), ((300, 326), 'ma...
import os import sys from setuptools import setup, find_packages readme_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'README.rst')) try: long_description = open(readme_file).read() except IOError as err: sys.stderr.write("[ERROR] Cannot find file specified as " "long_description...
[ "os.path.dirname", "setuptools.find_packages", "sys.stderr.write", "sys.exit" ]
[((110, 135), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (125, 135), False, 'import os\n'), ((237, 341), 'sys.stderr.write', 'sys.stderr.write', (["('[ERROR] Cannot find file specified as long_description (%s)\\n' % readme_file)"], {}), "(\n '[ERROR] Cannot find file specified as long_...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import re from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from lck.dja...
[ "logging.getLogger", "django.db.models.Sum", "django.utils.translation.ugettext_lazy", "lck.django.choices.Choices.Group", "ralph_assets.models_assets.Asset.objects.select_related", "re.compile", "django.db.models.ForeignKey", "django.db.models.IntegerField", "ralph.discovery.models_device.Device.ob...
[((776, 803), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (793, 803), False, 'import logging\n'), ((1035, 1077), 're.compile', 're.compile', (['"""^([1-9][A,B]?|1[0-6][A,B]?)$"""'], {}), "('^([1-9][A,B]?|1[0-6][A,B]?)$')\n", (1045, 1077), False, 'import re\n'), ((11376, 11462), 'django...
# -*- coding: UTF-8 -*- from django.http import HttpResponseRedirect from datetime import datetime from django.core.urlresolvers import reverse from meregistro.shortcuts import my_render from apps.seguridad.decorators import login_required, credential_required from apps.seguridad.models import Usuario, Perfil from app...
[ "apps.seguridad.decorators.credential_required", "apps.postitulos.forms.NormativaPostituloForm", "apps.postitulos.models.EstadoNormativaPostitulo.objects.filter", "django.core.urlresolvers.reverse", "meregistro.shortcuts.my_render", "apps.postitulos.forms.NormativaPostituloFormFilters", "apps.postitulos...
[((564, 618), 'apps.seguridad.decorators.credential_required', 'credential_required', (['"""tit_normativa_nacional_consulta"""'], {}), "('tit_normativa_nacional_consulta')\n", (583, 618), False, 'from apps.seguridad.decorators import login_required, credential_required\n'), ((1638, 1688), 'apps.seguridad.decorators.cre...
from typing import Dict from datetime import timedelta as td import copy from pyot.utils.logging import Logger LOGGER = Logger(__name__) class ExpirationManager: shared: Dict[str, int] = { "account_v1_by_puuid": 0, "account_v1_by_riot_id": 0, "account_v1_active_shard": 0, } al...
[ "datetime.timedelta", "pyot.utils.logging.Logger", "copy.deepcopy" ]
[((123, 139), 'pyot.utils.logging.Logger', 'Logger', (['__name__'], {}), '(__name__)\n', (129, 139), False, 'from pyot.utils.logging import Logger\n'), ((3417, 3446), 'copy.deepcopy', 'copy.deepcopy', (['self.all[game]'], {}), '(self.all[game])\n', (3430, 3446), False, 'import copy\n'), ((1807, 1821), 'datetime.timedel...
"""Python module for COVID-19 Survival-Convolution Death Model. In this module we focus on predicting the number of deaths with a similar approach to modeling the number of infections. """ from typing import Optional, Sequence, Text, Tuple import numpy as np import tensorflow as tf import piecewise_linear_infection_mo...
[ "numpy.ones", "tensorflow.keras.backend.set_floatx", "tensorflow.range", "tensorflow.constant", "tensorflow.matmul", "tensorflow.reshape", "numpy.pad" ]
[((343, 381), 'tensorflow.keras.backend.set_floatx', 'tf.keras.backend.set_floatx', (['"""float64"""'], {}), "('float64')\n", (370, 381), True, 'import tensorflow as tf\n'), ((1548, 1577), 'numpy.ones', 'np.ones', (['[self._n_weights, 1]'], {}), '([self._n_weights, 1])\n', (1555, 1577), True, 'import numpy as np\n'), (...
# simple rendering window for multiple video sources import cv2 import pygame as gui import numpy import math class GUI: def __init__(self, resolution): gui.init() self.display = gui.display.set_mode(resolution, gui.RESIZABLE) gui.display.set_caption("CustomALPR Viewer") self.cloc...
[ "pygame.display.set_caption", "math.ceil", "pygame.init", "pygame.quit", "pygame.event.get", "pygame.display.set_mode", "pygame.display.get_surface", "pygame.time.Clock", "pygame.display.update", "pygame.surfarray.make_surface", "pygame.transform.scale" ]
[((168, 178), 'pygame.init', 'gui.init', ([], {}), '()\n', (176, 178), True, 'import pygame as gui\n'), ((202, 249), 'pygame.display.set_mode', 'gui.display.set_mode', (['resolution', 'gui.RESIZABLE'], {}), '(resolution, gui.RESIZABLE)\n', (222, 249), True, 'import pygame as gui\n'), ((258, 302), 'pygame.display.set_ca...
"""Training script. usage: train.py [options] options: --inner_learning_rate=ilr Learning rate of inner loop [default: 1e-3] --outer_learning_rate=olr Learning rate of outer loop [default: 1e-4] --batch_size=bs Size of task to train with [default: 4] --inner_epochs=ie Amount o...
[ "numpy.random.normal", "tensorboardX.SummaryWriter", "torch.mean", "torch.load", "os.path.isfile", "torch.cat", "torch.tensor", "torch.cuda.is_available", "numpy.concatenate", "torch.save", "torch.no_grad", "torch.autograd.Variable", "docopt.docopt", "torch.rand" ]
[((1173, 1201), 'torch.mean', 'torch.mean', (['(inputs * targets)'], {}), '(inputs * targets)\n', (1183, 1201), False, 'import torch\n'), ((1284, 1333), 'torch.rand', 'torch.rand', (['real_batch.shape[0]', '(1)'], {'device': 'device'}), '(real_batch.shape[0], 1, device=device)\n', (1294, 1333), False, 'import torch\n')...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Tube transfer related resources """ from everest.resources.base import Member from everest.resources.descriptors import collection_attribute from everest.res...
[ "everest.resources.descriptors.member_attribute", "everest.resources.descriptors.collection_attribute" ]
[((840, 871), 'everest.resources.descriptors.member_attribute', 'member_attribute', (['ITube', '"""tube"""'], {}), "(ITube, 'tube')\n", (856, 871), False, 'from everest.resources.descriptors import member_attribute\n'), ((890, 928), 'everest.resources.descriptors.member_attribute', 'member_attribute', (['IRack', '"""so...
import ctypes import sys import traceback from ._k4arecordTypes import * from ..k4a._k4atypes import * record_dll = None def setup_library(module_k4arecord_path): global record_dll try: record_dll = ctypes.CDLL(module_k4arecord_path) except Exception as e: print("Failed to load library", e) sys.exit(1) d...
[ "ctypes.POINTER", "sys.exit", "traceback.print_stack", "ctypes.CDLL" ]
[((16349, 16379), 'ctypes.POINTER', 'ctypes.POINTER', (['ctypes.c_uint8'], {}), '(ctypes.c_uint8)\n', (16363, 16379), False, 'import ctypes\n'), ((208, 242), 'ctypes.CDLL', 'ctypes.CDLL', (['module_k4arecord_path'], {}), '(module_k4arecord_path)\n', (219, 242), False, 'import ctypes\n'), ((735, 764), 'ctypes.POINTER', ...
# Copyright 2022 The Casdoor Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ "flask.session.keys", "functools.wraps", "flask.jsonify" ]
[((720, 728), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n', (725, 728), False, 'from functools import wraps\n'), ((791, 805), 'flask.session.keys', 'session.keys', ([], {}), '()\n', (803, 805), False, 'from flask import redirect, request, session, jsonify\n'), ((878, 906), 'flask.jsonify', 'jsonify', (["{'status': ...
from cogent3 import DNA, make_table __author__ = "<NAME>" __copyright__ = "Copyright 2016-2020, <NAME>, <NAME>" __credits__ = ["<NAME>"] __license__ = "BSD-3" __version__ = "0.3" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" MUTATION_COMPLEMENTS = { "CtoG": "GtoC", "CtoA": "GtoT"...
[ "cogent3.make_table" ]
[((2005, 2067), 'cogent3.make_table', 'make_table', ([], {'header': "(table.header[:] + ['strand'])", 'rows': 'new_data'}), "(header=table.header[:] + ['strand'], rows=new_data)\n", (2015, 2067), False, 'from cogent3 import DNA, make_table\n'), ((901, 943), 'cogent3.make_table', 'make_table', ([], {'header': 'table.hea...
from scdn.model_config import Modelconfig, Modelpara from scdn.main_computation import update_p, select_lamu from scdn.data_preprocess import data_prepare from functools import partial import numpy as np import multiprocessing as mp import os from sys import getsizeof import six from six.moves import cPickle as pkl imp...
[ "os.path.exists", "scdn.main_computation.select_lamu", "os.makedirs", "six.moves.cPickle.load", "matplotlib.pyplot.close", "scdn.data_preprocess.data_prepare", "scdn.main_computation.update_p", "matplotlib.pyplot.subplots", "matplotlib.pyplot.subplots_adjust" ]
[((4995, 5214), 'scdn.main_computation.select_lamu', 'select_lamu', (['lam', 'mu', 'mu_1', 'mu_2', 'lam_1', 'folder_name[ind1]', "(folder_name[ind1] + 'para/')", 'precomp_dir[ind1]', 'val_data_dir', 'val_precomp_dir'], {'num_cores': 'num_cores', 'tol': 'tol', 'max_iter': 'max_iter', 'init': '(True)', 'saved': '(False)'...
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import os from servicecatalog_factory import constants from betterboto import client as betterboto_client import yaml def extract_from_ssm(target): with betterboto_client.ClientContextManager("ssm") ...
[ "os.path.exists", "yaml.safe_dump", "os.makedirs", "os.path.sep.join", "betterboto.client.ClientContextManager" ]
[((274, 319), 'betterboto.client.ClientContextManager', 'betterboto_client.ClientContextManager', (['"""ssm"""'], {}), "('ssm')\n", (312, 319), True, 'from betterboto import client as betterboto_client\n'), ((2979, 3019), 'os.path.sep.join', 'os.path.sep.join', (["[target, 'portfolios']"], {}), "([target, 'portfolios']...
import boto3 import os from tqdm import tqdm import logging SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") ROOT_DIR = f"{SCRIPT_DIR}/" MODELS_BUCKET_NAME = os.environ.get("MODELS_BUCKET_NA...
[ "os.path.exists", "boto3.Session", "os.environ.get", "os.path.join", "os.path.abspath", "os.system", "logging.info" ]
[((138, 173), 'os.environ.get', 'os.environ.get', (['"""AWS_ACCESS_KEY_ID"""'], {}), "('AWS_ACCESS_KEY_ID')\n", (152, 173), False, 'import os\n'), ((198, 237), 'os.environ.get', 'os.environ.get', (['"""AWS_SECRET_ACCESS_KEY"""'], {}), "('AWS_SECRET_ACCESS_KEY')\n", (212, 237), False, 'import os\n'), ((288, 324), 'os.en...
import logging from searchzone.tasks.helper import timestamp_now, check_dot_end LOGGER = logging.getLogger(__name__) def email(appsearch, queue): while True: domain = queue.get() local_time = timestamp_now() if check_dot_end(domain): domain = domain[:-1] body = {'id':...
[ "logging.getLogger", "searchzone.tasks.helper.timestamp_now", "searchzone.tasks.helper.check_dot_end" ]
[((91, 118), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (108, 118), False, 'import logging\n'), ((216, 231), 'searchzone.tasks.helper.timestamp_now', 'timestamp_now', ([], {}), '()\n', (229, 231), False, 'from searchzone.tasks.helper import timestamp_now, check_dot_end\n'), ((243, 264...
PRJ_PATH = "/home/junkyul/conda2/gmid2" import sys sys.path.append(PRJ_PATH) import os from pprint import PrettyPrinter pp = PrettyPrinter(indent=4) from gmid2.basics.uai_files import read_mmap, read_vo, read_sum, read_mixed, write_vo from gmid2.basics.undirected_network import PrimalGraph, call_variable_ordering fro...
[ "gmid2.basics.uai_files.read_mixed", "gmid2.basics.uai_files.read_vo", "time.time", "gmid2.inference.pgm_gdd.PgmGDD", "os.getcwd", "pprint.PrettyPrinter", "gmid2.basics.graphical_model.GraphicalModel", "gmid2.inference.bucket.mini_bucket_tree_decomposition", "sys.path.append", "gmid2.inference.buc...
[((51, 76), 'sys.path.append', 'sys.path.append', (['PRJ_PATH'], {}), '(PRJ_PATH)\n', (66, 76), False, 'import sys\n'), ((126, 149), 'pprint.PrettyPrinter', 'PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (139, 149), False, 'from pprint import PrettyPrinter\n'), ((745, 784), 'gmid2.basics.uai_files.read_mixed...
from typing import Generic, TypeVar K = TypeVar('K') V = TypeVar('V') class MultiMap(Generic[K, V], dict[K, list[V]]): def add(self, key: K, value: V): if (values := self.get(key)) is not None: values.append(value) else: self[key] = [value]
[ "typing.TypeVar" ]
[((41, 53), 'typing.TypeVar', 'TypeVar', (['"""K"""'], {}), "('K')\n", (48, 53), False, 'from typing import Generic, TypeVar\n'), ((58, 70), 'typing.TypeVar', 'TypeVar', (['"""V"""'], {}), "('V')\n", (65, 70), False, 'from typing import Generic, TypeVar\n')]
""" takes a json file and creates a go file with the types needed to marshal and unmarshal the data in the json. It make several assumtions which can be configured via env, see bellow """ import argparse import json def get_config_from_args(): """ Reads the arguments and returns a config used by the rest of t...
[ "json.load", "argparse.ArgumentParser" ]
[((351, 414), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Parse converter cli args"""'}), "(description='Parse converter cli args')\n", (374, 414), False, 'import argparse\n'), ((3662, 3674), 'json.load', 'json.load', (['f'], {}), '(f)\n', (3671, 3674), False, 'import json\n')]
# Generated by Django 3.2.8 on 2021-10-22 20:06 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='horarioMedico', fields=[ ('id_horario_medic...
[ "django.db.models.AutoField", "django.db.models.TimeField" ]
[((324, 375), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)', 'serialize': '(False)'}), '(primary_key=True, serialize=False)\n', (340, 375), False, 'from django.db import migrations, models\n'), ((410, 428), 'django.db.models.TimeField', 'models.TimeField', ([], {}), '()\n', (426, 428),...
from .molsect import MoleculesSection import re from ..listviews import REListView _re_directive = re.compile(r'\[ +([a-zA-Z0-9_]+) +\]') _re_includes = re.compile(r'\#include .+') _re_defines = re.compile(r'\#define .+') class Topology: def __init__(self, fname=None): self.unparsed = [] self.nam...
[ "re.compile" ]
[((100, 139), 're.compile', 're.compile', (['"""\\\\[ +([a-zA-Z0-9_]+) +\\\\]"""'], {}), "('\\\\[ +([a-zA-Z0-9_]+) +\\\\]')\n", (110, 139), False, 'import re\n'), ((154, 181), 're.compile', 're.compile', (['"""\\\\#include .+"""'], {}), "('\\\\#include .+')\n", (164, 181), False, 'import re\n'), ((196, 222), 're.compil...
import cv2 import numpy as np import os import pathlib import qrcode import shutil import socket import tempfile import threading from flask import Flask, render_template, jsonify from mss import mss from PIL import Image def capture(upload_folder): sct = mss() mon = sct.monitors[1] full_filename = os.pat...
[ "flask.render_template", "flask.Flask", "cv2.imshow", "os.remove", "mss.mss", "pathlib.Path", "tempfile.NamedTemporaryFile", "cv2.waitKey", "os.path.isfile", "PIL.Image.frombytes", "cv2.resize", "cv2.imread", "cv2.namedWindow", "qrcode.QRCode", "socket.socket", "os.path.join", "os.ge...
[((1524, 1560), 'os.path.join', 'os.path.join', (['"""static"""', '"""screenimgs"""'], {}), "('static', 'screenimgs')\n", (1536, 1560), False, 'import os\n'), ((1567, 1582), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (1572, 1582), False, 'from flask import Flask, render_template, jsonify\n'), ((262, 26...
import os import json from kubecfg.render_jsonnet import RenderJsonnet from kubecfg.commands.command_base import CommandBase, LoadVariables class JsonnetCmd(CommandBase): name = 'jsonnet' help_message = "Resolve a jsonnet file with the kubecfgstd available" def __init__(self, options): super(Json...
[ "json.dumps", "os.path.basename", "kubecfg.render_jsonnet.RenderJsonnet" ]
[((1012, 1053), 'kubecfg.render_jsonnet.RenderJsonnet', 'RenderJsonnet', ([], {'manifestpath': 'self.filepath'}), '(manifestpath=self.filepath)\n', (1025, 1053), False, 'from kubecfg.render_jsonnet import RenderJsonnet\n'), ((1065, 1096), 'os.path.basename', 'os.path.basename', (['self.filepath'], {}), '(self.filepath)...
from django.apps import AppConfig from logux import settings from logux.utils import autodiscover class LoguxConfig(AppConfig): """ Logux app conf """ name = 'logux' verbose_name = 'Logux' def ready(self): # check if all required settings is defined settings.get_config() # im...
[ "logux.settings.get_config", "logux.utils.autodiscover" ]
[((286, 307), 'logux.settings.get_config', 'settings.get_config', ([], {}), '()\n', (305, 307), False, 'from logux import settings\n'), ((403, 417), 'logux.utils.autodiscover', 'autodiscover', ([], {}), '()\n', (415, 417), False, 'from logux.utils import autodiscover\n')]
# Copyright 2016 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, s...
[ "google.cloud.logging_v2.types.CreateSinkRequest", "google.cloud.logging_v2.types.UpdateSinkRequest", "google.cloud.logging_v2.types.LogMetric", "google.cloud.logging_v2.types.LogSink.to_dict", "google.cloud.logging_v2.types.LogSink", "google.cloud.logging_v2._helpers.entry_from_resource", "google.cloud...
[((21453, 21481), 'google.protobuf.json_format.ParseDict', 'ParseDict', (['mapping', 'entry_pb'], {}), '(mapping, entry_pb)\n', (21462, 21481), False, 'from google.protobuf.json_format import ParseDict\n'), ((21493, 21513), 'google.cloud.logging_v2.types.LogEntry', 'LogEntryPB', (['entry_pb'], {}), '(entry_pb)\n', (215...
from prometheus_client import Gauge from prometheus_client import Counter from prometheus_client import Histogram run_time = Gauge(name='qontract_reconcile_last_run_seconds', documentation='Last run duration in seconds', labelnames=['integration', 'shards', 'shard_id']) run_status =...
[ "prometheus_client.Counter", "prometheus_client.Gauge" ]
[((127, 281), 'prometheus_client.Gauge', 'Gauge', ([], {'name': '"""qontract_reconcile_last_run_seconds"""', 'documentation': '"""Last run duration in seconds"""', 'labelnames': "['integration', 'shards', 'shard_id']"}), "(name='qontract_reconcile_last_run_seconds', documentation=\n 'Last run duration in seconds', l...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('facilities', 'update_export_facilities_material_view'), ] operations = [ migrations.AddField( model_name='facili...
[ "django.db.models.DateField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((378, 514), 'django.db.models.CharField', 'models.CharField', ([], {'help_text': "b'The license number given to the hospital by the regulator'", 'max_length': '(100)', 'null': '(True)', 'blank': '(True)'}), "(help_text=\n b'The license number given to the hospital by the regulator',\n max_length=100, null=True,...
from django.conf import settings from django.conf.urls import include, url from dj_core.utils import get_app_submodules def _admin_urls(): if not settings.DJCORE.ADMIN_ENABLED: return [] from django.contrib import admin return [url(r'^backend/django-admin/', admin.site.urls)] def _djdt_urls(): ...
[ "django.conf.urls.url", "django.conf.urls.include", "django.conf.urls.static.static", "dj_core.utils.get_app_submodules", "django.contrib.staticfiles.urls.staticfiles_urlpatterns" ]
[((674, 735), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (680, 735), False, 'from django.conf.urls.static import static\n'), ((907, 935), 'dj_core.utils.get_app_submodules', 'get_app_submodu...
"""Summary info about tickets.""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI.command import SLCommand as SLCommand from SoftLayer.CLI import environment from SoftLayer.CLI import formatting @click.command(cls=SLCommand) @environment.pass_env def cli(env): """Summary info abou...
[ "SoftLayer.CLI.formatting.Table", "click.command" ]
[((231, 259), 'click.command', 'click.command', ([], {'cls': 'SLCommand'}), '(cls=SLCommand)\n', (244, 259), False, 'import click\n'), ((618, 655), 'SoftLayer.CLI.formatting.Table', 'formatting.Table', (["['Status', 'count']"], {}), "(['Status', 'count'])\n", (634, 655), False, 'from SoftLayer.CLI import formatting\n')...
import matplotlib.colors as colors import matplotlib.gridspec as gridspec from pyfinch.analysis import * from pyfinch.analysis import * from pyfinch.database.load import DBInfo, ProjectLoader from util import save from util.draw import * from pyfinch.analysis import pre_motor_win_size # parameters rec_yloc = 0.05 re...
[ "matplotlib.colors.SymLogNorm", "pyfinch.database.load.ProjectLoader", "matplotlib.gridspec.GridSpec", "pyfinch.database.load.DBInfo" ]
[((1055, 1066), 'pyfinch.database.load.DBInfo', 'DBInfo', (['row'], {}), '(row)\n', (1061, 1066), False, 'from pyfinch.database.load import DBInfo, ProjectLoader\n'), ((815, 830), 'pyfinch.database.load.ProjectLoader', 'ProjectLoader', ([], {}), '()\n', (828, 830), False, 'from pyfinch.database.load import DBInfo, Proj...
from utils.data_loader import DataLoader import tensorflow as tf import numpy as np import configs.configs as configs from models.autoencoder import Autoencoder import time FLAGS = tf.app.flags.FLAGS tf.flags.DEFINE_string("db_fname", "./data/patches_32x32_2k.h5", "Path to database file used for training") tf.flags....
[ "tensorflow.flags.DEFINE_string", "models.autoencoder.Autoencoder", "tensorflow.flags.DEFINE_boolean", "tensorflow.gfile.IsDirectory", "utils.data_loader.DataLoader", "tensorflow.gfile.MakeDirs", "tensorflow.flags.DEFINE_integer", "time.time", "tensorflow.app.run" ]
[((203, 314), 'tensorflow.flags.DEFINE_string', 'tf.flags.DEFINE_string', (['"""db_fname"""', '"""./data/patches_32x32_2k.h5"""', '"""Path to database file used for training"""'], {}), "('db_fname', './data/patches_32x32_2k.h5',\n 'Path to database file used for training')\n", (225, 314), True, 'import tensorflow as...
from typing import Any, Optional, Union from typing_extensions import Literal from machine import Pin, ADC as _ADC, PWM as _PWM import numpy as np import micropython from bdsim.blocks.discrete import ZOH from bdsim.blocks.io import ADC, PWM from bdsim.blockdiagram import block from bdsim.components import Block, Cloc...
[ "machine.Pin" ]
[((1079, 1143), 'machine.Pin', 'Pin', (['pin', 'Pin.IN', "(Pin.PULL_UP if pull == 'up' else Pin.PULL_DOWN)"], {}), "(pin, Pin.IN, Pin.PULL_UP if pull == 'up' else Pin.PULL_DOWN)\n", (1082, 1143), False, 'from machine import Pin, ADC as _ADC, PWM as _PWM\n'), ((1743, 1760), 'machine.Pin', 'Pin', (['pin', 'Pin.OUT'], {})...
import codecs from pathlib import Path from setuptools import setup, find_packages from src import VERSION this_dir = Path(__file__).parent with codecs.open(str(this_dir / "README.md"), encoding="utf-8") as ld_file: long_description = ld_file.read() with codecs.open(str(this_dir / "LICENSE"), encoding="utf-8") ...
[ "setuptools.find_packages", "pathlib.Path" ]
[((121, 135), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (125, 135), False, 'from pathlib import Path\n'), ((505, 555), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['test', 'tests', 'test.*']"}), "(exclude=['test', 'tests', 'test.*'])\n", (518, 555), False, 'from setuptools import se...
# -*- coding: utf-8 -*- r""" :mod:`ganground.metric.kernel` -- Kernel function definitions ============================================================= .. module:: kernel :platform: Unix :synopsis: Helper functions for Maximum Mean Discrepancy, plus kernel function definitions. """ from abc import abstra...
[ "logging.getLogger", "torch.equal", "torch.cat", "torch.norm", "torch.finfo", "torch.triu_indices", "torch.arange" ]
[((471, 498), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (488, 498), False, 'import logging\n'), ((4863, 4882), 'torch.equal', 'torch.equal', (['cx', 'cy'], {}), '(cx, cy)\n', (4874, 4882), False, 'import torch\n'), ((3171, 3265), 'torch.triu_indices', 'torch.triu_indices', (['cp_cq_l...
""" The geography bits of TileStache. A Projection defines the relationship between the rendered tiles and the underlying geographic data. Generally, just one popular projection is used for most web maps, "spherical mercator". Built-in projections: - spherical mercator - WGS84 Example use projection in a layer defin...
[ "ModestMaps.Geo.deriveTransformation", "ModestMaps.Geo.LinearProjection.__init__", "ModestMaps.Core.Coordinate", "ModestMaps.Core.Point", "math.log", "ModestMaps.Geo.Location", "ModestMaps.Geo.MercatorProjection.__init__" ]
[((1714, 1779), 'ModestMaps.Geo.deriveTransformation', 'deriveTransformation', (['(-pi)', 'pi', '(0)', '(0)', 'pi', 'pi', '(1)', '(0)', '(-pi)', '(-pi)', '(0)', '(1)'], {}), '(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)\n', (1734, 1779), False, 'from ModestMaps.Geo import deriveTransformation, MercatorProjection, Line...
# Generated by Django 3.2.3 on 2021-05-31 23:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('awards', '0003_comments'), ] operations = [ migrations.AddField( model_name='website', name='description', ...
[ "django.db.models.TextField" ]
[((329, 356), 'django.db.models.TextField', 'models.TextField', ([], {'null': '(True)'}), '(null=True)\n', (345, 356), False, 'from django.db import migrations, models\n')]
import os import numpy as np import pandas as pd import tensorflow as tf from PIL import Image from matplotlib import pyplot as plt from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util from tqdm import tqdm CWD_PATH = '/home/ubuntu/rue/object_detector/...
[ "tensorflow.Graph", "os.listdir", "PIL.Image.open", "tensorflow.gfile.GFile", "tensorflow.Session", "os.path.join", "tensorflow.GraphDef", "object_detection.utils.label_map_util.convert_label_map_to_categories", "numpy.expand_dims", "pandas.DataFrame", "tensorflow.import_graph_def", "object_de...
[((356, 414), 'os.path.join', 'os.path.join', (['CWD_PATH', '"""export/frozen_inference_graph.pb"""'], {}), "(CWD_PATH, 'export/frozen_inference_graph.pb')\n", (368, 414), False, 'import os\n'), ((432, 483), 'os.path.join', 'os.path.join', (['CWD_PATH', '"""openimage_label_map.pbtxt"""'], {}), "(CWD_PATH, 'openimage_la...
from __future__ import print_function import re,os,sys d=dict( _UNDER400=""" <center><img width=400 src="https://www.lahc.edu/pageunderconstruction.png"></center> """ ) print(re.compile(r'\b(' + '|'.join(d.keys()) + r')\b') .sub(lambda x: d[x.group()], sys.stdin.read()))
[ "sys.stdin.read" ]
[((261, 277), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (275, 277), False, 'import re, os, sys\n')]
"""Utilities for timing. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import signal import time class TimeoutException(Exception): """Exception for timeout. """ pass class Timeout(): """Timeout class using ALARM s...
[ "signal.signal", "datetime.datetime.fromtimestamp", "time.time", "signal.alarm" ]
[((853, 864), 'time.time', 'time.time', ([], {}), '()\n', (862, 864), False, 'import time\n'), ((424, 483), 'signal.signal', 'signal.signal', (['signal.SIGALRM', 'self.raise_timeout_exception'], {}), '(signal.SIGALRM, self.raise_timeout_exception)\n', (437, 483), False, 'import signal\n'), ((492, 514), 'signal.alarm', ...
""" tests.test_rss ~~~~~~~~~~~~~~ :copyright: 2016 by <NAME> :license: BSD, see LICENSE.rst for details """ import pytest import lxml.etree from lxml.builder import E import atomrss.rss from tests.utils import RecordingLogger, wrap_recording_logger @pytest.fixture def feed_title(): return 'RSS ...
[ "tests.utils.RecordingLogger", "lxml.builder.E", "tests.utils.wrap_recording_logger", "pytest.raises" ]
[((3381, 3398), 'tests.utils.RecordingLogger', 'RecordingLogger', ([], {}), '()\n', (3396, 3398), False, 'from tests.utils import RecordingLogger, wrap_recording_logger\n'), ((6767, 6784), 'tests.utils.RecordingLogger', 'RecordingLogger', ([], {}), '()\n', (6782, 6784), False, 'from tests.utils import RecordingLogger, ...
import paddle from paddle.autograd import PyLayer class EntmaxBisectFunction(PyLayer): @classmethod def _gp(cls, x, alpha): return x ** (alpha - 1) @classmethod def _gp_inv(cls, y, alpha): return y ** (1 / (alpha - 1)) @classmethod def _p(cls, X, alpha): return cls._g...
[ "paddle.randn", "paddle.clip", "paddle.where", "paddle.to_tensor", "paddle.zeros", "paddle.log" ]
[((4283, 4309), 'paddle.randn', 'paddle.randn', (['(3, 4, 5, 6)'], {}), '((3, 4, 5, 6))\n', (4295, 4309), False, 'import paddle\n'), ((4054, 4092), 'paddle.to_tensor', 'paddle.to_tensor', (['alpha'], {'dtype': 'X.dtype'}), '(alpha, dtype=X.dtype)\n', (4070, 4092), False, 'import paddle\n'), ((326, 347), 'paddle.clip', ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
[ "pulumi.getter", "pulumi.set", "pulumi.get" ]
[((2679, 2711), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""endpointId"""'}), "(name='endpointId')\n", (2692, 2711), False, 'import pulumi\n'), ((3156, 3205), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""clientIPPreservationEnabled"""'}), "(name='clientIPPreservationEnabled')\n", (3169, 3205), False, 'im...
""" Amatino API Python Bindings Transaction Module Author: <EMAIL> """ from datetime import datetime from amatino.entity import Entity from amatino.global_unit import GlobalUnit from amatino.custom_unit import CustomUnit from amatino.entry import Entry from amatino.side import Side from amatino.denomination import Deno...
[ "amatino.global_unit.GlobalUnit.retrieve", "amatino.side.Side", "amatino.internal.data_package.DataPackage.from_object", "amatino.internal.url_parameters.UrlParameters", "amatino.internal.immutable.Immutable", "amatino.internal.api_request.ApiRequest", "amatino.internal.am_time.AmatinoTime", "amatino....
[((1073, 1106), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': '"""Transaction"""'}), "('T', bound='Transaction')\n", (1080, 1106), False, 'from typing import TypeVar, Optional, Type, Any, List, Dict\n'), ((2794, 2832), 'amatino.internal.immutable.Immutable', 'Immutable', (['(lambda s: s._entity.session)'], {}), ...
import discord from discord.ext import commands import datetime import json import time import os import typing import re import asyncpg import functools import strgen import asyncio from colormap import rgb2hex, hex2rgb from emoji import UNICODE_EMOJI from jishaku.paginators import PaginatorInterface, PaginatorEmbedIn...
[ "discord.ext.commands.has_permissions", "fire.push.pushover", "PIL.Image.new", "strgen.StringGenerator", "io.BytesIO", "discord.ext.commands.group", "PIL.ImageDraw.Draw", "discord.Color.default", "discord.ext.commands.command", "os.remove", "discord.ext.commands.Cog.listener", "os.path.exists"...
[((640, 666), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (664, 666), False, 'import datetime\n'), ((756, 770), 'json.load', 'json.load', (['cfg'], {}), '(cfg)\n', (765, 770), False, 'import json\n'), ((11541, 11564), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), ...
"""Feed: Countries Revision ID: 4250dfa822a4 Revises: <PASSWORD> Create Date: 2014-12-10 22:24:01.089932 """ # revision identifiers, used by Alembic. revision = '4250dfa822a4' down_revision = '<PASSWORD>' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column from csv import reader...
[ "findaconf.models.Country.__table__.delete", "findaconf.models.Continent.query.filter_by", "sqlalchemy.sql.column", "alembic.op.bulk_insert", "csv.reader" ]
[((1849, 1884), 'alembic.op.bulk_insert', 'op.bulk_insert', (['country_table', 'data'], {}), '(country_table, data)\n', (1863, 1884), False, 'from alembic import op\n'), ((1710, 1737), 'sqlalchemy.sql.column', 'column', (['"""alpha2"""', 'sa.String'], {}), "('alpha2', sa.String)\n", (1716, 1737), False, 'from sqlalchem...
import json import jsonschema import os from nose.tools import assert_raises from jsonschema.exceptions import ValidationError dir_this = os.path.dirname(__file__) schema_file = os.path.join(dir_this, '../resources/statements_schema.json') with open(schema_file, 'r') as f: schema = json.loads(f.read()) valid_agen...
[ "nose.tools.assert_raises", "os.path.dirname", "jsonschema.validate", "os.path.join" ]
[((139, 164), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (154, 164), False, 'import os\n'), ((179, 240), 'os.path.join', 'os.path.join', (['dir_this', '"""../resources/statements_schema.json"""'], {}), "(dir_this, '../resources/statements_schema.json')\n", (191, 240), False, 'import os\n'...
from keras.callbacks import ModelCheckpoint, TensorBoard from keras.optimizers import Adam from transformer_keras import get_or_create, save_config from transformer_keras.custom.callbacks import SGDRScheduler, LRFinder, WatchScheduler, LRSchedulerPerStep from transformer_keras.data_loader import DataLoader if __name_...
[ "keras.optimizers.Adam", "keras.callbacks.ModelCheckpoint", "transformer_keras.custom.callbacks.LRFinder", "keras.callbacks.TensorBoard", "transformer_keras.custom.callbacks.SGDRScheduler", "transformer_keras.save_config", "transformer_keras.data_loader.DataLoader" ]
[((777, 885), 'transformer_keras.data_loader.DataLoader', 'DataLoader', ([], {'src_dictionary_path': 'src_dict_path', 'tgt_dictionary_path': 'tgt_dict_path', 'batch_size': 'batch_size'}), '(src_dictionary_path=src_dict_path, tgt_dictionary_path=\n tgt_dict_path, batch_size=batch_size)\n', (787, 885), False, 'from tr...
import json import os import unittest import random import boto from moto import mock_s3 from simpleflow import constants, format from simpleflow.storage import push_content @mock_s3 class TestFormat(unittest.TestCase): def setUp(self): pass def tearDown(self): # reset jumbo fields bucket ...
[ "simpleflow.format.decode", "simpleflow.storage.push_content", "simpleflow.format.result", "json.dumps", "boto.connect_s3", "simpleflow.format.identity", "simpleflow.format.encode", "simpleflow.format.reason", "random.randint" ]
[((549, 566), 'boto.connect_s3', 'boto.connect_s3', ([], {}), '()\n', (564, 566), False, 'import boto\n'), ((801, 825), 'random.randint', 'random.randint', (['(10)', '(1000)'], {}), '(10, 1000)\n', (815, 825), False, 'import random\n'), ((1030, 1054), 'random.randint', 'random.randint', (['(10)', '(1000)'], {}), '(10, ...
""" Evaluates the performance on the UKP ASPECT Corpus with hierachical clustering. Greedy hierachical clustering. Merges two clusters if the pairwise mean cluster similarity is larger than a threshold. Merges clusters with highest similarity first Uses dev set to determine the threshold for supervised systems """ imp...
[ "numpy.mean", "sklearn.cluster.AgglomerativeClustering", "sklearn.metrics.f1_score", "sklearn.metrics.pairwise.cosine_similarity", "numpy.where", "os.path.join", "collections.defaultdict", "csv.reader" ]
[((1520, 1638), 'sklearn.cluster.AgglomerativeClustering', 'AgglomerativeClustering', ([], {'n_clusters': 'None', 'affinity': '"""precomputed"""', 'linkage': '"""average"""', 'distance_threshold': 'threshold'}), "(n_clusters=None, affinity='precomputed', linkage=\n 'average', distance_threshold=threshold)\n", (1543,...
#!/usr/bin/env python3 from sys import stderr, exit import re,random from TALinputs import TALinput from multilanguage import Env, Lang, TALcolors from magic_indexes_lib import * # METADATA OF THIS TAL_SERVICE: args_list = [ ('r', str), ('representation', str) ] ENV =Env(args_list) TAc =TALcolors(ENV) LANG=...
[ "multilanguage.Env", "multilanguage.TALcolors" ]
[((280, 294), 'multilanguage.Env', 'Env', (['args_list'], {}), '(args_list)\n', (283, 294), False, 'from multilanguage import Env, Lang, TALcolors\n'), ((300, 314), 'multilanguage.TALcolors', 'TALcolors', (['ENV'], {}), '(ENV)\n', (309, 314), False, 'from multilanguage import Env, Lang, TALcolors\n')]
# -*- coding: utf-8 -*- """ Created on Mon Jul 24 11:38:01 2017 @author: sajid """ import numpy as np import numexpr as ne import pyfftw import dask.array as da ''' contains functions propTF, propFF, prop1FT, propIR ''' __all__ = ['propTF', 'prop1FT', 'propFF', 'propIR'] ''' Prop...
[ "pyfftw.interfaces.numpy_fft.fftshift", "numpy.fft.ifft2", "numpy.fft.fftfreq", "pyfftw.interfaces.numpy_fft.ifftshift", "dask.array.meshgrid", "numpy.fft.fft2", "numpy.linspace", "numpy.meshgrid", "numpy.fft.ifftshift", "numexpr.evaluate", "numpy.fft.fftshift", "numpy.shape" ]
[((800, 811), 'numpy.shape', 'np.shape', (['u'], {}), '(u)\n', (808, 811), True, 'import numpy as np\n'), ((996, 1067), 'numexpr.evaluate', 'ne.evaluate', (['"""exp(-1j*(2*pi*z/wavel)*sqrt(1-wavel**2*(FX**2+FY**2)))*u"""'], {}), "('exp(-1j*(2*pi*z/wavel)*sqrt(1-wavel**2*(FX**2+FY**2)))*u')\n", (1007, 1067), True, 'impo...
# Generated by Django 2.1.1 on 2019-04-19 12:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
[ "django.db.models.FloatField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((247, 304), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (278, 304), False, 'from django.db import migrations, models\n'), ((436, 529), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
from __future__ import print_function import logging import numpy as np from optparse import OptionParser # import sys from time import time import matplotlib.pyplot as plt import os import argparse as ap # from sklearn.datasets import fetch_20newsgroups from sklearn.feature_extraction.text import TfidfVectorizer fro...
[ "sklearn.metrics.classification_report", "sklearn.feature_selection.SelectKBest", "numpy.array", "numpy.argsort", "argparse.Namespace", "sklearn.feature_extraction.text.HashingVectorizer", "matplotlib.pyplot.barh", "numpy.asarray", "numpy.max", "matplotlib.pyplot.yticks", "sklearn.metrics.confus...
[((575, 667), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s %(levelname)s %(message)s"""'}), "(level=logging.INFO, format=\n '%(asctime)s %(levelname)s %(message)s')\n", (594, 667), False, 'import logging\n'), ((720, 734), 'optparse.OptionParser', 'OptionParse...
from ops.survey.engine.etreehandler import EtreeTagHandler, enforce from ops.survey.engine.launcher import plugin_launcher import ops.survey.engine.launcher class TaskTagHandler(EtreeTagHandler, ): def validate(self): return self.__process(validate=True) def process(self): return self.__proc...
[ "ops.survey.engine.etreehandler.enforce", "ops.survey.engine.launcher.plugin_launcher" ]
[((475, 545), 'ops.survey.engine.etreehandler.enforce', 'enforce', (['(module is not None)', '"""module attribute is required for <task>"""'], {}), "(module is not None, 'module attribute is required for <task>')\n", (482, 545), False, 'from ops.survey.engine.etreehandler import EtreeTagHandler, enforce\n'), ((1079, 12...
from taskplus.core.actions import CancelTaskRequest def test_cancel_task_request(): task_id = 1 request = CancelTaskRequest(task_id) assert request.task_id == task_id assert request.is_valid() def test_cancel_task_without_id(): task_id = None request = CancelTaskRequest(task_id) assert...
[ "taskplus.core.actions.CancelTaskRequest" ]
[((116, 142), 'taskplus.core.actions.CancelTaskRequest', 'CancelTaskRequest', (['task_id'], {}), '(task_id)\n', (133, 142), False, 'from taskplus.core.actions import CancelTaskRequest\n'), ((282, 308), 'taskplus.core.actions.CancelTaskRequest', 'CancelTaskRequest', (['task_id'], {}), '(task_id)\n', (299, 308), False, '...
from eval_actions import ActionsEvaluator evaluator = ActionsEvaluator() gold = "[send link] fhfhf [okay] fjfjfjfjf" pred = "[send link] [send link] fhfhf fjfjfjfjf" print(evaluator.compute_tp_fp_fn(gold, pred))
[ "eval_actions.ActionsEvaluator" ]
[((55, 73), 'eval_actions.ActionsEvaluator', 'ActionsEvaluator', ([], {}), '()\n', (71, 73), False, 'from eval_actions import ActionsEvaluator\n')]
# Generated by Django 3.0.7 on 2020-06-18 12:14 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("polls", "0001_initial"),...
[ "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((450, 543), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...