code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import sys import time import subprocess import math import os from appionlib import basicScript from appionlib import apParam from appionlib import apDisplay class TaskLog(basicScript.BasicScript): ''' TaskLog is used by TaskStatusLogger.py on remote cluster host to parse the logfile or result of a task for use...
[ "appionlib.apDisplay.printMsg", "appionlib.apDisplay.printError", "os.path.isfile", "os.path.basename", "os.path.abspath", "os.stat" ]
[((1644, 1687), 'os.path.abspath', 'os.path.abspath', (["self.params['tasklogfile']"], {}), "(self.params['tasklogfile'])\n", (1659, 1687), False, 'import os\n'), ((1845, 1879), 'os.path.basename', 'os.path.basename', (['self.tasklogfile'], {}), '(self.tasklogfile)\n', (1861, 1879), False, 'import os\n'), ((1437, 1511)...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T # # Copyright (c) 2016+ <NAME> + <NAME> # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # Supporting Flat, xxy...
[ "pagebot.getContext", "pagebot.toolbox.units.pt", "pagebot.toolbox.color.color", "vanilla.Window" ]
[((1047, 1096), 'vanilla.Window', 'Window', (['(800, 600)'], {'minSize': '(1, 1)', 'closable': '(True)'}), '((800, 600), minSize=(1, 1), closable=True)\n', (1053, 1096), False, 'from vanilla import Window\n'), ((1120, 1140), 'pagebot.getContext', 'getContext', (['"""Canvas"""'], {}), "('Canvas')\n", (1130, 1140), False...
from typing import Dict import torch import torch.nn as nn import torch.nn.functional as F from snorkel.classification.utils import collect_flow_outputs_by_suffix class SliceCombinerModule(nn.Module): """A module for combining the weighted representations learned by slices. Intended for use with the Multit...
[ "torch.stack", "torch.sum", "torch.nn.functional.softmax", "snorkel.classification.utils.collect_flow_outputs_by_suffix" ]
[((2393, 2456), 'snorkel.classification.utils.collect_flow_outputs_by_suffix', 'collect_flow_outputs_by_suffix', (['output_dict', 'self.slice_ind_key'], {}), '(output_dict, self.slice_ind_key)\n', (2423, 2456), False, 'from snorkel.classification.utils import collect_flow_outputs_by_suffix\n'), ((2884, 2948), 'snorkel....
from nbt.nbt import * import io import gzip def load_compressed_nbt_file(filename): return NBTFile(filename) def load_compressed_nbt_buffer(compressed_buffer): uncompresssed_buffer = gzip.decompress(compressed_buffer) bytes_io = io.BytesIO(uncompresssed_buffer) return load_uncompressed_nbt_buffer(bytes_io) ...
[ "io.BytesIO", "gzip.decompress" ]
[((190, 224), 'gzip.decompress', 'gzip.decompress', (['compressed_buffer'], {}), '(compressed_buffer)\n', (205, 224), False, 'import gzip\n'), ((238, 270), 'io.BytesIO', 'io.BytesIO', (['uncompresssed_buffer'], {}), '(uncompresssed_buffer)\n', (248, 270), False, 'import io\n')]
from types import ModuleType import unittest import importlib import inspect class TestMyCode(unittest.TestCase): """ Test module `my_code.py` on below criteria: - Module is importable. - Module has at least two functions. """ def test_import_module(self): try: user_mudul...
[ "inspect.getmembers", "importlib.import_module" ]
[((577, 611), 'importlib.import_module', 'importlib.import_module', (['"""my_code"""'], {}), "('my_code')\n", (600, 611), False, 'import importlib\n'), ((632, 683), 'inspect.getmembers', 'inspect.getmembers', (['user_mudule', 'inspect.isfunction'], {}), '(user_mudule, inspect.isfunction)\n', (650, 683), False, 'import ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.test import override_settings from django.urls import re_path from rest_framework import serializers from rest_framework.generics import RetrieveUpdateAPIView from rest_framework.permissions import AllowAny fro...
[ "tests.models.SampleModel.objects.create", "django.test.override_settings", "tests.models.SampleModel.objects.all", "rest_framework.reverse.reverse" ]
[((3162, 3474), 'django.test.override_settings', 'override_settings', ([], {'ROOT_URLCONF': '"""tests.test_versioning"""', 'API_VERSION_DEPRECATION_OFFSET': '(1)', 'API_VERSION_OBSOLETE_OFFSET': '(2)', 'MIDDLEWARE': "(settings.MIDDLEWARE + ('drf_tweaks.versioning.DeprecationMiddleware',))", 'MIDDLEWARE_CLASSES': "(sett...
# -*- coding: utf-8 -*- """ python3 ISE.py -i network.txt -s seeds.txt -m IC -t 60 python3 ISE.py -i NetHEPT_fixed.txt -s seeds.txt -m IC -t 60 """ import os import sys import copy import time import random import argparse # import numpy as np import multiprocessing as mp from multiprocessing import Pool from collect...
[ "argparse.ArgumentParser", "random.random", "collections.defaultdict", "multiprocessing.Pool", "os._exit", "functools.partial", "sys.stdout.flush", "time.time" ]
[((452, 469), 'collections.defaultdict', 'defaultdict', (['dict'], {}), '(dict)\n', (463, 469), False, 'from collections import defaultdict\n'), ((1091, 1102), 'time.time', 'time.time', ([], {}), '()\n', (1100, 1102), False, 'import time\n'), ((1855, 1866), 'time.time', 'time.time', ([], {}), '()\n', (1864, 1866), Fals...
# Generated by Django 4.0.2 on 2022-02-26 15:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teach', '0003_alter_tenants_tdate_in'), ] operations = [ migrations.AlterModelOptions( name='tenants', options={'ver...
[ "django.db.migrations.AlterModelOptions", "django.db.migrations.RemoveField", "django.db.models.IntegerField" ]
[((237, 355), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""tenants"""', 'options': "{'verbose_name': 'Tenant', 'verbose_name_plural': 'Tenants'}"}), "(name='tenants', options={'verbose_name':\n 'Tenant', 'verbose_name_plural': 'Tenants'})\n", (265, 355), False, 'from dj...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QLabel, QGridLayout from PyQt5.QtWidgets import QLineEdit, QPushButton, QHBoxLayout class Kalkulator(QWidget): def __init_...
[ "PyQt5.QtGui.QIcon", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QLineEdit" ]
[((2094, 2116), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (2106, 2116), False, 'from PyQt5.QtWidgets import QApplication, QWidget\n'), ((483, 508), 'PyQt5.QtWidgets.QLabel', 'QLabel', (['"""Liczba 1:"""', 'self'], {}), "('Liczba 1:', self)\n", (489, 508), False, 'from PyQt5.QtW...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017, OpenCensus Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
[ "mock.Mock", "opencensus.ext.fastapi.fastapi_middleware.FastAPIMiddleware", "opencensus.trace.execution_context.clear", "fastapi.FastAPI" ]
[((1457, 1474), 'fastapi.FastAPI', 'FastAPI', (['__name__'], {}), '(__name__)\n', (1464, 1474), False, 'from fastapi import FastAPI\n'), ((2033, 2058), 'opencensus.trace.execution_context.clear', 'execution_context.clear', ([], {}), '()\n', (2056, 2058), False, 'from opencensus.trace import execution_context\n'), ((211...
import ast import sys from typing import Generator, Tuple, Type, Any, List if sys.version_info < (3, 8): import importlib_metadata else: import importlib.metadata as importlib_metadata class Visitor(ast.NodeVisitor): def __init__(self) -> None: self.issues: List[Tuple[int, int]] = [] def vis...
[ "importlib.metadata.version" ]
[((890, 926), 'importlib.metadata.version', 'importlib_metadata.version', (['__name__'], {}), '(__name__)\n', (916, 926), True, 'import importlib.metadata as importlib_metadata\n')]
# -*- coding: utf-8 -*- # Copyright (c) 2019, 9t9it and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe def delete_configuration_doc(sales_order, method): """Called when Sales Order is deleted""" configuration_docs = [[item.configuration...
[ "frappe.delete_doc" ]
[((478, 574), 'frappe.delete_doc', 'frappe.delete_doc', (['configuration_doc[0]', 'configuration_doc[1]'], {'force': '(1)', 'ignore_permissions': '(1)'}), '(configuration_doc[0], configuration_doc[1], force=1,\n ignore_permissions=1)\n', (495, 574), False, 'import frappe\n')]
from com.bridgelabz.util import utility class Primepalindrome: def run(self): for i in range(10, 1000): if (utility.Utility().checkPrime(i) == True): if (utility.Utility().checkpalindrome(str(i))==True): print(i) return primepalindrome=Primepa...
[ "com.bridgelabz.util.utility.Utility" ]
[((134, 151), 'com.bridgelabz.util.utility.Utility', 'utility.Utility', ([], {}), '()\n', (149, 151), False, 'from com.bridgelabz.util import utility\n'), ((196, 213), 'com.bridgelabz.util.utility.Utility', 'utility.Utility', ([], {}), '()\n', (211, 213), False, 'from com.bridgelabz.util import utility\n')]
''' apicount.py Show list of APIs and count Purpose ======= This program is used to list all apis in given directory or files Usecases: - Compare API count and API signatures between two sources - API Counts to understand the fundamental complexity of program Usage: usage : apicount...
[ "collections.OrderedDict", "re.compile", "os.path.join", "optparse.OptionParser", "os.getcwd", "os.path.isfile", "os.path.basename", "re.finditer", "os.path.abspath", "re.sub", "re.findall", "os.walk" ]
[((2794, 2819), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (2817, 2819), False, 'import collections\n'), ((2843, 2868), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (2866, 2868), False, 'import collections\n'), ((2922, 2948), 'os.path.abspath', 'os.path.abspath', ...
import lark from elasticsearch_dsl import Q, Text, Keyword, Integer, Field from optimade.models import CHEMICAL_SYMBOLS, ATOMIC_NUMBERS _cmp_operators = {">": "gt", ">=": "gte", "<": "lt", "<=": "lte"} _rev_cmp_operators = {">": "<", ">=": "<=", "<": ">", "<=": "=>"} _has_operators = {"ALL": "must", "ANY": "should"} ...
[ "elasticsearch_dsl.Q" ]
[((7968, 8021), 'elasticsearch_dsl.Q', 'Q', (['"""term"""'], {}), "('term', **{quantity.has_only_quantity.name: value})\n", (7969, 8021), False, 'from elasticsearch_dsl import Q, Text, Keyword, Integer, Field\n'), ((4134, 4183), 'elasticsearch_dsl.Q', 'Q', (['"""range"""'], {}), "('range', **{field: {_cmp_operators[o]:...
"""Callbacks available from R's C-API. The callbacks make available in R's C-API can be specified as Python functions, with the module providing the adapter code that makes it possible.""" from contextlib import contextmanager import logging import typing from rpy2.rinterface_lib import openrlib from rpy2.rinterface_...
[ "logging.getLogger", "rpy2.rinterface_lib.ffi_proxy.callback", "rpy2.rinterface_lib.openrlib.ffi.memmove", "rpy2.rinterface_lib.conversion._cchar_to_str", "rpy2.rinterface_lib.conversion._cchar_to_str_with_maxlen", "rpy2.rinterface_lib.conversion._str_to_cchar" ]
[((394, 421), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (411, 421), False, 'import logging\n'), ((793, 867), 'rpy2.rinterface_lib.ffi_proxy.callback', 'ffi_proxy.callback', (['ffi_proxy._consoleflush_def', 'openrlib._rinterface_cffi'], {}), '(ffi_proxy._consoleflush_def, openrlib._ri...
# -*- coding: utf-8 -*- import os import shutil import datetime def backup_data(data_dir, backup_dir, include_string, keep_days=7): past_day = datetime.datetime.today() + datetime.timedelta(days=-keep_days) past_day_string = past_day.strftime("%Y%m%d") for filename in os.listdir(data_dir): if pa...
[ "os.listdir", "shutil.move", "os.path.join", "datetime.datetime.today", "datetime.timedelta" ]
[((285, 305), 'os.listdir', 'os.listdir', (['data_dir'], {}), '(data_dir)\n', (295, 305), False, 'import os\n'), ((150, 175), 'datetime.datetime.today', 'datetime.datetime.today', ([], {}), '()\n', (173, 175), False, 'import datetime\n'), ((178, 213), 'datetime.timedelta', 'datetime.timedelta', ([], {'days': '(-keep_da...
import os import json import re import zlib from datetime import datetime, timedelta from urllib.parse import urlsplit class DiskCache: """ DiskCache helps store urls and their responses to disk Intialization components: cache_dir (str): abs file path or relative file path for...
[ "os.path.exists", "json.loads", "os.makedirs", "urllib.parse.urlsplit", "datetime.datetime.strptime", "datetime.datetime.utcnow", "json.dumps", "os.path.join", "zlib.compress", "os.path.dirname", "json.load", "re.sub", "datetime.timedelta", "json.dump" ]
[((819, 837), 'datetime.timedelta', 'timedelta', ([], {'days': '(30)'}), '(days=30)\n', (828, 837), False, 'from datetime import datetime, timedelta\n'), ((1118, 1131), 'urllib.parse.urlsplit', 'urlsplit', (['url'], {}), '(url)\n', (1126, 1131), False, 'from urllib.parse import urlsplit\n'), ((1445, 1491), 're.sub', 'r...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import division import os import sys __package__ = "rSGD miscellaneous" __author__ = ["<NAME>", "<NAME>"] __email__ = ['<EMAIL>', '<EMAIL>'] # https://stackoverflow.com/questions/14197009/how-can-i-redirect-print-...
[ "os.path.isfile", "StringIO.StringIO" ]
[((1186, 1207), 'os.path.isfile', 'os.path.isfile', (['_file'], {}), '(_file)\n', (1200, 1207), False, 'import os\n'), ((730, 749), 'StringIO.StringIO', 'StringIO.StringIO', ([], {}), '()\n', (747, 749), False, 'import StringIO\n')]
import re import json import time from django.conf import settings from django.contrib.auth.decorators import login_required from django.db import transaction, IntegrityError from django.shortcuts import get_object_or_404 from django.views.decorators.http import require_safe, require_POST from ide.models.build import...
[ "ide.tasks.build.run_compile.delay", "json.loads", "ide.tasks.git.do_import_github.delay", "ide.tasks.gist.import_gist.delay", "ide.models.project.TemplateProject.objects.get", "ide.tasks.archive.create_archive.delay", "django.db.transaction.atomic", "django.shortcuts.get_object_or_404", "re.match",...
[((842, 903), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Project'], {'pk': 'project_id', 'owner': 'request.user'}), '(Project, pk=project_id, owner=request.user)\n', (859, 903), False, 'from django.shortcuts import get_object_or_404\n'), ((3752, 3813), 'django.shortcuts.get_object_or_404', 'get_objec...
# Tgx22-2- import os import time time.sleep(3.5) print("") time.sleep(2.5) print("Welcome To All Freindes .. ") print("") print("Can You Go To MY GitHub And Give My a Start.. ") time.sleep(2.5) print("") print("Thank you ..❤❤") time.sleep(3.5) print("") time.sleep(2.5) print("By ^_^")
[ "time.sleep" ]
[((34, 49), 'time.sleep', 'time.sleep', (['(3.5)'], {}), '(3.5)\n', (44, 49), False, 'import time\n'), ((60, 75), 'time.sleep', 'time.sleep', (['(2.5)'], {}), '(2.5)\n', (70, 75), False, 'import time\n'), ((179, 194), 'time.sleep', 'time.sleep', (['(2.5)'], {}), '(2.5)\n', (189, 194), False, 'import time\n'), ((229, 24...
from spaceone.core.locator import Locator from spaceone.core.transaction import Transaction class CoreObject(object): def __init__(self, transaction: Transaction = None): if transaction: self.transaction = transaction else: self.transaction = Transaction() self.l...
[ "spaceone.core.locator.Locator", "spaceone.core.transaction.Transaction" ]
[((329, 354), 'spaceone.core.locator.Locator', 'Locator', (['self.transaction'], {}), '(self.transaction)\n', (336, 354), False, 'from spaceone.core.locator import Locator\n'), ((291, 304), 'spaceone.core.transaction.Transaction', 'Transaction', ([], {}), '()\n', (302, 304), False, 'from spaceone.core.transaction impor...
# Generated by Django 2.2.6 on 2020-01-28 10:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0003_auto_20200128_1814'), ] operations = [ migrations.AlterField( model_name='article', name='pub_time', ...
[ "django.db.models.DateTimeField" ]
[((336, 367), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'null': '(True)'}), '(null=True)\n', (356, 367), False, 'from django.db import migrations, models\n')]
from loguru import logger from typing import Union from aiohttp import ClientError from .....data.URL import QIWIWalletURLS from .....connector.aiohttp_connector import Connector from .....data_types.connector.request_type import PUT class UnblockQVCAPI: @classmethod async def unblock_qvc(cls, wallet_api_key...
[ "loguru.logger.warning" ]
[((772, 860), 'loguru.logger.warning', 'logger.warning', (['"""Some error. Maybe range is big then 90 days or card_id not exist."""'], {}), "(\n 'Some error. Maybe range is big then 90 days or card_id not exist.')\n", (786, 860), False, 'from loguru import logger\n')]
#!/usr/bin/python # # Ctrl-C Test: Start a shell, send SIGINT, run a program, # send SIGINT, then exit # # Requires the following commands to be implemented # or otherwise usable: # # sleep, ctrl-c control # import sys, imp, atexit sys.path.append("/home/courses/cs3214/software/pexpect-dpty/"); import pe...
[ "proc_check.count_active_children", "imp.load_source", "pexpect.spawn", "time.sleep", "shellio.success", "sys.path.append", "atexit.register" ]
[((247, 309), 'sys.path.append', 'sys.path.append', (['"""/home/courses/cs3214/software/pexpect-dpty/"""'], {}), "('/home/courses/cs3214/software/pexpect-dpty/')\n", (262, 309), False, 'import sys, imp, atexit\n'), ((586, 629), 'imp.load_source', 'imp.load_source', (['""""""', 'definitions_scriptname'], {}), "('', defi...
from tkinter import * from tkinter import ttk def imprimirEsporte(): ve = cb_esportes.get() print(f'Esporte: {ve}') app = Tk() app.title('BLOCO') app.geometry('500x300') listaEsportes = ['Futebol', 'Vôlei', 'Basquete'] lb_esportes = Label(app, text='Esportes') lb_esportes.pack() cb_esportes = ttk.Combobo...
[ "tkinter.ttk.Combobox" ]
[((309, 348), 'tkinter.ttk.Combobox', 'ttk.Combobox', (['app'], {'values': 'listaEsportes'}), '(app, values=listaEsportes)\n', (321, 348), False, 'from tkinter import ttk\n')]
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('icecream/', include('icecream.urls')), path('', include('homepage.urls')), ]
[ "django.urls.path", "django.urls.include" ]
[((92, 123), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.site.urls)\n", (96, 123), False, 'from django.urls import include, path\n'), ((147, 171), 'django.urls.include', 'include', (['"""icecream.urls"""'], {}), "('icecream.urls')\n", (154, 171), False, 'from django.urls imp...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from colorama import Fore from spotify_ripper.utils import * import os import time import spotify import requests import spotipy import spotipy.client from spotipy.oauth2 import SpotifyClientCredentials client_credentials_sp = None def init_client_cred...
[ "spotipy.Spotify", "spotipy.oauth2.SpotifyClientCredentials", "requests.get" ]
[((443, 469), 'spotipy.oauth2.SpotifyClientCredentials', 'SpotifyClientCredentials', ([], {}), '()\n', (467, 469), False, 'from spotipy.oauth2 import SpotifyClientCredentials\n'), ((502, 572), 'spotipy.Spotify', 'spotipy.Spotify', ([], {'client_credentials_manager': 'client_credentials_manager'}), '(client_credentials_...
""" Adapter for https://github.com/cheat/cheat Cheatsheets are located in `pages/*/` Each cheat sheet is a separate file with extension .md The pages are formatted with a markdown dialect """ # pylint: disable=relative-import,abstract-method import re import os from .git_adapter import GitRepositoryAdapter class ...
[ "re.sub", "os.path.exists", "os.path.join" ]
[((2221, 2284), 'os.path.join', 'os.path.join', (['local_rep', '"""pages"""', 'subdir', "('%s%s' % (topic, ext))"], {}), "(local_rep, 'pages', subdir, '%s%s' % (topic, ext))\n", (2233, 2284), False, 'import os\n'), ((2317, 2341), 'os.path.exists', 'os.path.exists', (['filename'], {}), '(filename)\n', (2331, 2341), Fals...
import numpy as np import tensorflow as tf from flask import Flask, render_template, jsonify, request, make_response, send_from_directory, abort from mnist import module as model from cnocr import CnOcr import mxnet as mx from werkzeug.utils import secure_filename import datetime import random import os import base64 ...
[ "flask.render_template", "flask.Flask", "numpy.array", "werkzeug.utils.secure_filename", "tensorflow.GPUOptions", "flask.jsonify", "os.path.exists", "flask.send_from_directory", "mnist.module.convolutional", "tensorflow.placeholder", "tensorflow.Session", "tensorflow.ConfigProto", "random.ra...
[((931, 972), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {'allow_soft_placement': '(True)'}), '(allow_soft_placement=True)\n', (945, 972), True, 'import tensorflow as tf\n'), ((1003, 1053), 'tensorflow.GPUOptions', 'tf.GPUOptions', ([], {'per_process_gpu_memory_fraction': '(0.7)'}), '(per_process_gpu_memory_fract...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: streamlit/proto/Video.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_databas...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor", "google.protobuf.descriptor.FileDescriptor", "google.protobuf.reflection.GeneratedProtocolMessageType", "google.protobuf.descriptor.EnumValueDescriptor" ]
[((389, 415), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (413, 415), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((433, 1004), 'google.protobuf.descriptor.FileDescriptor', '_descriptor.FileDescriptor', ([], {'name': '"""streamlit/proto/Video....
from setuptools import setup setup( name='flask-jwt-auth', version='1.0.0', author='desun', packages=['apps'], include_package_data=True, install_requires=[ 'flask', ], )
[ "setuptools.setup" ]
[((31, 171), 'setuptools.setup', 'setup', ([], {'name': '"""flask-jwt-auth"""', 'version': '"""1.0.0"""', 'author': '"""desun"""', 'packages': "['apps']", 'include_package_data': '(True)', 'install_requires': "['flask']"}), "(name='flask-jwt-auth', version='1.0.0', author='desun', packages=[\n 'apps'], include_packa...
# %% import os import pickle import matplotlib.pyplot as plt # %% batch_1 = pickle.load(open(r'sucess_rate_22_15_15.pkl', 'rb')) plt.plot(batch_1, label='batch 1') plt.legend() plt.show()
[ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((131, 165), 'matplotlib.pyplot.plot', 'plt.plot', (['batch_1'], {'label': '"""batch 1"""'}), "(batch_1, label='batch 1')\n", (139, 165), True, 'import matplotlib.pyplot as plt\n'), ((166, 178), 'matplotlib.pyplot.legend', 'plt.legend', ([], {}), '()\n', (176, 178), True, 'import matplotlib.pyplot as plt\n'), ((179, 1...
from __future__ import print_function import uhid_freebsd as uhid import os for dev in uhid.enumerate(): print("Device:", dev["device"]) print(" Path:", dev["path"]) print(" VendorId: 0x%04x" % dev["vendor_id"]) print(" ProductId: 0x%04x" % dev["product_id"]) print(" ProductDesc:", dev["produc...
[ "os.close", "uhid_freebsd.get_report_data", "os.open", "uhid_freebsd.enumerate" ]
[((89, 105), 'uhid_freebsd.enumerate', 'uhid.enumerate', ([], {}), '()\n', (103, 105), True, 'import uhid_freebsd as uhid\n'), ((339, 372), 'os.open', 'os.open', (["dev['path']", 'os.O_RDONLY'], {}), "(dev['path'], os.O_RDONLY)\n", (346, 372), False, 'import os\n'), ((383, 410), 'uhid_freebsd.get_report_data', 'uhid.ge...
#!/usr/bin/env python3 import random def bubbleSort(arr): n = len(arr) for i in range(n): i += 1 for j in range(n-1): if arr[j] > arr[j+1]: tmp = arr[j] arr[j] = arr[j+1] arr[j+1] = tmp drawedNumbers = [] while len(drawedNumbers) <...
[ "random.randint" ]
[((337, 358), 'random.randint', 'random.randint', (['(1)', '(49)'], {}), '(1, 49)\n', (351, 358), False, 'import random\n')]
# db에서 원하는 부분 가져오기 - 원하는 데이터만 가져와 한글화가 필요할 때 import os ''' 'oiescraper' 폴더에 db파일이 있음 현재 경로에 db파일이 있으면(현재 경로가 'oiescraper' 폴더라면) 그대로, 없으면 'oiescraper' 폴더로 경로 설정 ''' if 'oie_reports.db' in os.listdir(): # os.listdir(path): path의 하위 폴더 및 파일 리스트. path 넣지 않으면 현재 경로로 설정 con = sqlite3.connect('oie_reports.db')...
[ "os.listdir" ]
[((197, 209), 'os.listdir', 'os.listdir', ([], {}), '()\n', (207, 209), False, 'import os\n')]
from validator.testcases.regex.compat import (COMPAT_REGEXPS, CheapCompatBugPatternTests) from . import build_definition, register_changed_entities TB30_DEFINITION = build_definition(30, thunderbird=True) COMPAT_REGEXPS.extend([ (TB30_DEFINITION, CheapCompatBugPatte...
[ "validator.testcases.regex.compat.CheapCompatBugPatternTests" ]
[((301, 828), 'validator.testcases.regex.compat.CheapCompatBugPatternTests', 'CheapCompatBugPatternTests', (['"""Thunderbird 30"""', "{'log\\\\.lastWeek': 863226, 'log\\\\.twoWeeksAgo': 863226,\n 'filemessageschoosethis\\\\.label': 964425, 'recentfolders\\\\.label': \n 964425, 'protocolNotFound\\\\.title': 973368...
import random from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.naive_bayes import MultinomialNB from sklearn.linear_model import SGDClassifier import re #import regex goo...
[ "sklearn.model_selection.GridSearchCV", "sklearn.feature_extraction.text.TfidfTransformer", "sklearn.linear_model.SGDClassifier", "random.shuffle", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.naive_bayes.MultinomialNB" ]
[((757, 786), 'random.shuffle', 'random.shuffle', (['combined_data'], {}), '(combined_data)\n', (771, 786), False, 'import random\n'), ((1324, 1369), 'sklearn.model_selection.GridSearchCV', 'GridSearchCV', (['text_clf', 'parameters'], {'n_jobs': '(-1)'}), '(text_clf, parameters, n_jobs=-1)\n', (1336, 1369), False, 'fro...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author:yuanlang # creat_time: 2020/7/16 上午10:34 # file: logger.py import logging import os class ColoredFormatter(logging.Formatter): def __init__(self, fmt=None): logging.Formatter.__init__(self, fmt=fmt) def format(self, record): COLORS = { ...
[ "os.path.exists", "logging.StreamHandler", "os.makedirs", "logging.handlers.RotatingFileHandler", "logging.Formatter.format", "os.path.dirname", "logging.Formatter.__init__" ]
[((2556, 2579), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (2577, 2579), False, 'import logging\n'), ((228, 269), 'logging.Formatter.__init__', 'logging.Formatter.__init__', (['self'], {'fmt': 'fmt'}), '(self, fmt=fmt)\n', (254, 269), False, 'import logging\n'), ((909, 947), 'logging.Formatter....
from func import * import getpass import os user = getpass.getuser() print(''' ========================================================== _ ___ ___ ____ _ | |/ / | / _ \ |___ \ | | | ' /| |__ | | | |_ __ __) |___| |__ | < | '_ \| | | | '_ \|__ </ __| '_ \ | . \| | | | |_...
[ "getpass.getuser", "os.path.exists", "os.system" ]
[((52, 69), 'getpass.getuser', 'getpass.getuser', ([], {}), '()\n', (67, 69), False, 'import getpass\n'), ((4705, 4732), 'os.path.exists', 'os.path.exists', (['suidCommand'], {}), '(suidCommand)\n', (4719, 4732), False, 'import os\n'), ((4754, 4791), 'os.system', 'os.system', (["('chmod u+s ' + suidCommand)"], {}), "('...
import psycopg2 conn = psycopg2.connect( database='vital-cat-208.defaultdb', user='asap_verg', password='<PASSWORD>@', sslmode='require', sslrootcert='certs/ca.crt', sslkey='certs/client.maxroach.key', sslcert='certs/client.maxroach.crt', port=26257, host='free-tier.gcp-us-central1....
[ "psycopg2.connect" ]
[((24, 316), 'psycopg2.connect', 'psycopg2.connect', ([], {'database': '"""vital-cat-208.defaultdb"""', 'user': '"""asap_verg"""', 'password': '"""<PASSWORD>@"""', 'sslmode': '"""require"""', 'sslrootcert': '"""certs/ca.crt"""', 'sslkey': '"""certs/client.maxroach.key"""', 'sslcert': '"""certs/client.maxroach.crt"""', ...
# -*- coding: utf-8 -*- # 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...
[ "proto.Field", "proto.module" ]
[((646, 783), 'proto.module', 'proto.module', ([], {'package': '"""google.cloud.aiplatform.v1beta1.schema.predict.params"""', 'manifest': "{'VideoClassificationPredictionParams'}"}), "(package=\n 'google.cloud.aiplatform.v1beta1.schema.predict.params', manifest={\n 'VideoClassificationPredictionParams'})\n", (658...
import ctypes import functools from inspect import iscode from types import FunctionType def surgery(test=True): def surgery_core(f): def get_root_arg_info(f): return {argname: num for num, argname in enumerate(f.__code__.co_varnames[:f.__code__.co_argcount])} def make_closure(f, co_c...
[ "inspect.iscode", "types.FunctionType", "functools.wraps" ]
[((1336, 1354), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (1351, 1354), False, 'import functools\n'), ((1650, 1668), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (1665, 1668), False, 'import functools\n'), ((954, 970), 'inspect.iscode', 'iscode', (['co_const'], {}), '(co_const)\n', (960...
import django_filters from crispy_forms.layout import Layout, Submit, Row, Column, HTML from crispy_forms.helper import FormHelper from django_filters import CharFilter from django import forms from .models import * class OwnerFilter(django_filters.FilterSet): ownername = CharFilter(label='Owner Name', field_na...
[ "django.forms.TextInput" ]
[((368, 416), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form-control'}"}), "(attrs={'class': 'form-control'})\n", (383, 416), False, 'from django import forms\n'), ((545, 593), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form-control'}"}), "(attrs={'class': 'for...
import numpy as np import cv2 # This file is a set of commonly used functions by the viz scripts. It # is not meant to be run on its own def unblockshaped(arr, h, w, rgb=False): if rgb: n, nrows, ncols, nchannels = arr.shape return (arr.reshape(h//nrows, -1, nrows, ncols, nchannels) ...
[ "numpy.sqrt", "numpy.reshape" ]
[((1030, 1052), 'numpy.sqrt', 'np.sqrt', (['grid.shape[0]'], {}), '(grid.shape[0])\n', (1037, 1052), True, 'import numpy as np\n'), ((582, 614), 'numpy.reshape', 'np.reshape', (['img', '(side, side, 3)'], {}), '(img, (side, side, 3))\n', (592, 614), True, 'import numpy as np\n'), ((667, 696), 'numpy.reshape', 'np.resha...
import traceback from api.system.logger import ilogger as logger from api.domain import default_error_message, production_api_operations class API(object): def __init__(self, providers=None): if providers is not None: self.providers = providers() else: from api.interfaces.p...
[ "traceback.format_exc", "api.interfaces.providers.DefaultProviders" ]
[((382, 400), 'api.interfaces.providers.DefaultProviders', 'DefaultProviders', ([], {}), '()\n', (398, 400), False, 'from api.interfaces.providers import DefaultProviders\n'), ((1905, 1927), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (1925, 1927), False, 'import traceback\n'), ((2877, 2899), 'tra...
""" sentry.cache.django ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.core.cache import cache from .base import BaseCache class DjangoCache(BaseCache): def set(...
[ "django.core.cache.cache.delete", "django.core.cache.cache.set", "django.core.cache.cache.get" ]
[((370, 433), 'django.core.cache.cache.set', 'cache.set', (['key', 'value', 'timeout'], {'version': '(version or self.version)'}), '(key, value, timeout, version=version or self.version)\n', (379, 433), False, 'from django.core.cache import cache\n'), ((484, 534), 'django.core.cache.cache.delete', 'cache.delete', (['ke...
from typing import List, Any, Tuple from grid_cell import WalledCell from random import sample class WilsonMaze: """ Generates a maze based on Wilson's algorithm that interprets the maze as a uniform spanning tree of the graph of cells. The algorithm is based on random walks between cells that have their ...
[ "random.sample" ]
[((6451, 6476), 'random.sample', 'sample', (['self.cell_grid', '(1)'], {}), '(self.cell_grid, 1)\n', (6457, 6476), False, 'from random import sample\n'), ((6502, 6516), 'random.sample', 'sample', (['row', '(1)'], {}), '(row, 1)\n', (6508, 6516), False, 'from random import sample\n'), ((6691, 6718), 'random.sample', 'sa...
import renderer,lvl_loader mul=input("multiplayer?(y/n)") online=False if mul=="y": import network online=True def controler(): target = None inp="" while True: inp = input().split(" ") command = inp[0] arg1=inp[1] if command == "move": if arg1 == "up": ...
[ "renderer.get_enemy_from_pos", "renderer.Thread", "renderer.player.move", "renderer.enemies.append", "renderer.enemy", "renderer.enemies.index" ]
[((1996, 2058), 'renderer.enemy', 'renderer.enemy', (['(0, 0, 255)', '(9, 9)', '(renderer.size / 80)', '(20)', '(1)'], {}), '((0, 0, 255), (9, 9), renderer.size / 80, 20, 1)\n', (2010, 2058), False, 'import renderer, lvl_loader\n'), ((2050, 2090), 'renderer.enemies.append', 'renderer.enemies.append', (['renderer.player...
# -*- coding: utf-8 -*- """ 201901, Dr. <NAME>, Beijing & Xinglong, NAOC Light_Curve """ import numpy as np import astropy.io.fits as fits from .utils import loadlist, datestr, logfile, conf, meanclip from .cata import match def offset(ini_file, sci_lst, catalog_suffix, offset_file, ref_id=0, out_path="", l...
[ "numpy.where", "numpy.zeros", "numpy.sqrt", "astropy.io.fits.getdata" ]
[((944, 961), 'numpy.zeros', 'np.zeros', (['(6, nf)'], {}), '((6, nf))\n', (952, 961), True, 'import numpy as np\n'), ((974, 997), 'numpy.zeros', 'np.zeros', (['nf'], {'dtype': 'int'}), '(nf, dtype=int)\n', (982, 997), True, 'import numpy as np\n'), ((1012, 1041), 'astropy.io.fits.getdata', 'fits.getdata', (['catf[ref_...
from fabric.colors import * # noqa from fabric.api import * # noqa from dploy.context import get_context from dploy.commands import pip, manage # noqa from dploy.tasks import django # noqa from dploy.tasks import virtualenv # noqa from dploy.tasks import letsencrypt # noqa from dploy.tasks import cron # noqa from...
[ "dploy.context.get_context" ]
[((712, 725), 'dploy.context.get_context', 'get_context', ([], {}), '()\n', (723, 725), False, 'from dploy.context import get_context\n')]
import requests file_contents=b'{"_type":"location","tid":"ad","acc":67,"batt":81,"conn":"m","lat":42.8171802,"lon":-1.6013,"tst":1510572418}' headers = {'Content-Type': 'application/json'} #print(file_contents) response = requests.post('http://localhost:8000/owntracks/mizamae/', data=file_contents, headers=h...
[ "requests.post" ]
[((233, 332), 'requests.post', 'requests.post', (['"""http://localhost:8000/owntracks/mizamae/"""'], {'data': 'file_contents', 'headers': 'headers'}), "('http://localhost:8000/owntracks/mizamae/', data=\n file_contents, headers=headers)\n", (246, 332), False, 'import requests\n')]
from douyin_spider.utils.common import parse_datetime, get_array_first from douyin_spider.models.video import Video from douyin_spider.models.music import Music from douyin_spider.models.user import User, Star from douyin_spider.models.address import Address def get_video_url(video_list): """ parse video url ...
[ "douyin_spider.models.user.User", "douyin_spider.models.address.Address", "douyin_spider.models.video.Video", "douyin_spider.models.user.Star", "requests.get", "douyin_spider.models.music.Music" ]
[((1408, 1442), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (1420, 1442), False, 'import requests\n'), ((2548, 2912), 'douyin_spider.models.video.Video', 'Video', ([], {'id': 'id', 'like_count': 'like_count', 'comment_count': 'comment_count', 'share_count': 'share_coun...
from typing import Union from boto3.session import Session from common.configuration import S3_ENDPOINT class S3Client: """This is an abstraction for boto3 s3 client """ def __init__(self) -> None: session = Session() if S3_ENDPOINT is None: self.client = session.client('s3')...
[ "boto3.session.Session" ]
[((232, 241), 'boto3.session.Session', 'Session', ([], {}), '()\n', (239, 241), False, 'from boto3.session import Session\n')]
"""Morseus default settings and constants.""" import os from libmorse import UNIT # Basic camera image and color processing options. SECOND = 1000.0 # how much is a second in ms UNIT = float(UNIT) # default morse unit (explicit declare) MAX_FPS = 30 # maximum number of frames per second supported FPS_FACT...
[ "os.path.dirname", "os.path.join" ]
[((1912, 1959), 'os.path.join', 'os.path.join', (['PROJECT', '"""artwork"""', '"""morseus.ico"""'], {}), "(PROJECT, 'artwork', 'morseus.ico')\n", (1924, 1959), False, 'import os\n'), ((1847, 1872), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1862, 1872), False, 'import os\n')]
# This is functions to repick import numpy as np # generate recombined spots def generate_recombined_spots(repeat_cand_spots, repeat_ids, original_cand_spots, original_ids): """Function to re-assemble fitted original candidate spots and repeat candidate spots to perform spot repick to determine relabeli...
[ "numpy.array" ]
[((822, 844), 'numpy.array', 'np.array', (['original_ids'], {}), '(original_ids)\n', (830, 844), True, 'import numpy as np\n')]
import torch import time n = 40000 loop = 1000 ###CPU start_time = time.time() a = torch.ones(n,n) for _ in range(loop): a += a elapsed_time = time.time() - start_time print('CPU time = ',elapsed_time) ###GPU start_time = time.time() b = torch.ones(n,n).cuda() for _ in range(loop): b += b elapsed_time = tim...
[ "time.time", "torch.ones" ]
[((69, 80), 'time.time', 'time.time', ([], {}), '()\n', (78, 80), False, 'import time\n'), ((85, 101), 'torch.ones', 'torch.ones', (['n', 'n'], {}), '(n, n)\n', (95, 101), False, 'import torch\n'), ((230, 241), 'time.time', 'time.time', ([], {}), '()\n', (239, 241), False, 'import time\n'), ((149, 160), 'time.time', 't...
import unittest from robot.parsing.model import TestCaseTable from robot.utils.asserts import assert_equal from robot.writer.aligners import ColumnAligner class TestColumnAligner(unittest.TestCase): def test_counting_column_widths(self): table = TestCaseTable(None) table.set_header(['test cases'...
[ "robot.parsing.model.TestCaseTable", "robot.writer.aligners.ColumnAligner" ]
[((262, 281), 'robot.parsing.model.TestCaseTable', 'TestCaseTable', (['None'], {}), '(None)\n', (275, 281), False, 'from robot.parsing.model import TestCaseTable\n'), ((367, 391), 'robot.writer.aligners.ColumnAligner', 'ColumnAligner', (['(18)', 'table'], {}), '(18, table)\n', (380, 391), False, 'from robot.writer.alig...
from math import * from OpenGL.GLU import * from OpenGL.GL import * from OpenGL.GLUT import * import random import sys #Datatypes class PARTICLES: Xpos = 0.0 Ypos = 0.0 Zpos = 0.0 Xmov = 0.0 Red = 0.0 Green = 0.0 Blue = 0.0 Direction = 0.0 Acceleration = 0.0 Deceleration = 0.0 ...
[ "random.random" ]
[((2368, 2383), 'random.random', 'random.random', ([], {}), '()\n', (2381, 2383), False, 'import random\n'), ((1026, 1041), 'random.random', 'random.random', ([], {}), '()\n', (1039, 1041), False, 'import random\n'), ((1118, 1133), 'random.random', 'random.random', ([], {}), '()\n', (1131, 1133), False, 'import random\...
#!/usr/bin/env python """Examples using MLFlowLoggerCallback and mlflow_mixin. """ import os import tempfile import time import mlflow from ray import tune from ray.tune.integration.mlflow import MLFlowLoggerCallback, mlflow_mixin def evaluation_fn(step, width, height): return (0.1 + width * step / 100)**(-1) +...
[ "ray.tune.report", "argparse.ArgumentParser", "ray.tune.integration.mlflow.MLFlowLoggerCallback", "mlflow.set_tracking_uri", "time.sleep", "mlflow.set_experiment", "mlflow.get_experiment_by_name", "tempfile.gettempdir", "mlflow.get_tracking_uri", "ray.tune.randint" ]
[((1966, 2010), 'mlflow.set_tracking_uri', 'mlflow.set_tracking_uri', (['mlflow_tracking_uri'], {}), '(mlflow_tracking_uri)\n', (1989, 2010), False, 'import mlflow\n'), ((2015, 2069), 'mlflow.set_experiment', 'mlflow.set_experiment', ([], {'experiment_name': '"""mixin_example"""'}), "(experiment_name='mixin_example')\n...
from functools import partial, reduce import copy from collections import namedtuple from functools import partial import sys sys.setrecursionlimit(10**3) #helpers def curry(f): arg_num = f.func_code.co_argcount def wrap(*args): _f = partial(f, *args) if hasattr(f, 't'): _f.t = f...
[ "functools.reduce", "sys.setrecursionlimit", "functools.partial", "copy.deepcopy" ]
[((127, 157), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 3)'], {}), '(10 ** 3)\n', (148, 157), False, 'import sys\n'), ((1956, 1971), 'functools.reduce', 'reduce', (['f', 'x', 'z'], {}), '(f, x, z)\n', (1962, 1971), False, 'from functools import partial, reduce\n'), ((254, 271), 'functools.partial', 'p...
import os from setuptools import setup import tpow as pkg pathname = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'README.rst') desc = open(pathname).read() setup( name = pkg.__name__, version = pkg.__version__, description = desc.split('\n')[1], long_description = desc, auth...
[ "os.path.dirname" ]
[((104, 129), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (119, 129), False, 'import os\n')]
import os import sys import time import json import requests from functools import partial from threading import Thread from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtCore import pyqtSignal from core import Utils, Command import main_gui ''' 【主窗口类】 主窗口类继承自QMainWindow类。 图形程序绝大部分交互都在这里。 ''' class M...
[ "PyQt5.QtWidgets.QMainWindow.__init__", "requests.get", "os.getcwd", "main_gui.Ui_MainWindow", "os.path.isfile", "functools.partial", "PyQt5.QtWidgets.QApplication", "json.load", "threading.Thread", "time.localtime", "core.Command", "json.dump" ]
[((417, 439), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (429, 439), False, 'from PyQt5.QtWidgets import QApplication, QMainWindow\n'), ((448, 482), 'PyQt5.QtWidgets.QMainWindow.__init__', 'QMainWindow.__init__', (['self', 'parent'], {}), '(self, parent)\n', (468, 482), False, '...
from __future__ import division, print_function try: from phenix.program_template import ProgramTemplate except ImportError: from libtbx.program_template import ProgramTemplate import os import libtbx.phil from libtbx.utils import Sorry from libtbx import easy_pickle import mmtbx.ringer.emringer # ================...
[ "os.makedirs", "os.path.splitext", "libtbx.utils.Sorry", "os.path.isdir", "libtbx.easy_pickle.dump" ]
[((2456, 2515), 'libtbx.utils.Sorry', 'Sorry', (['"""Supply a map file or a file with map coefficients."""'], {}), "('Supply a map file or a file with map coefficients.')\n", (2461, 2515), False, 'from libtbx.utils import Sorry\n'), ((4319, 4386), 'libtbx.easy_pickle.dump', 'easy_pickle.dump', (["('%s.pkl' % self.param...
# this will give you orbital information about planets and moons and stuff, it'll be cool import requests import json import os URL = "https://api.le-systeme-solaire.net/rest/bodies/" DIR = os.path.dirname(__file__) DATA_FILE = os.path.join(DIR, "orbits.json") class OrbitInformation: def __init__(self, req=None)...
[ "os.path.dirname", "json.dump", "os.path.join", "requests.get" ]
[((191, 216), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (206, 216), False, 'import os\n'), ((229, 261), 'os.path.join', 'os.path.join', (['DIR', '"""orbits.json"""'], {}), "(DIR, 'orbits.json')\n", (241, 261), False, 'import os\n'), ((475, 502), 'requests.get', 'requests.get', (['f"""{UR...
# -------------------------------------------------------------------------- # This extension adds a dictionary deduplication filter to Ibis templates. # # The filter accepts an input dictionary and returns a copy with duplicate # values marked as aliases. This filter is intended for internal use in the # bundled debug...
[ "ibis.filters.register" ]
[((475, 505), 'ibis.filters.register', 'ibis.filters.register', (['"""dedup"""'], {}), "('dedup')\n", (496, 505), False, 'import ibis\n')]
#////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 # Name : # Author : Avi # Revision : $Revision: #10 $ # # Copyright 2009-2020 ECMWF. # This software is licensed under the terms of the Apache Licence version 2.0 # which can be obtained at http://www.apache.org/licenses/LIC...
[ "ecflow.Edit", "ecflow.Family", "ecflow.Suite", "ecflow.Meter", "ecflow.RepeatDate", "ecflow.RepeatDateList", "ecflow.Defs", "ecflow.Event", "unittest.main", "ecflow.Limit", "ecflow.Task" ]
[((7563, 7578), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7576, 7578), False, 'import unittest\n'), ((1589, 1602), 'ecflow.Edit', 'Edit', ([], {'var': '"""1"""'}), "(var='1')\n", (1593, 1602), False, 'from ecflow import Alias, AttrType, Autocancel, CheckPt, ChildCmdType, Client, Clock, Cron, DState, Date, Da...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
[ "ydk._core._dm_meta_info._MetaInfoClassMember", "ydk._core._dm_meta_info._MetaInfoEnum" ]
[((546, 861), 'ydk._core._dm_meta_info._MetaInfoEnum', '_MetaInfoEnum', (['"""Ncs1KCipherSuitEnum"""', '"""ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_macsec_ea_oper"""', "{'gcm-aes-256': 'GCM_AES_256', 'gcm-aes-128': 'GCM_AES_128',\n 'gcm-aes-xpn-256': 'GCM_AES_XPN_256'}", '"""Cisco-IOS-XR-ncs1k-macsec-ea-oper"""', ...
""" :Copyright: 2014-2022 <NAME> :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from datetime import date from freezegun import freeze_time from byceps.database import generate_uuid from byceps.services.orga import birthday_service from byceps.services.orga.transfer.mod...
[ "byceps.services.orga.transfer.models.Birthday", "byceps.services.orga.birthday_service.sort_users_by_next_birthday", "datetime.date", "freezegun.freeze_time", "byceps.database.generate_uuid" ]
[((430, 455), 'freezegun.freeze_time', 'freeze_time', (['"""1994-09-30"""'], {}), "('1994-09-30')\n", (441, 455), False, 'from freezegun import freeze_time\n'), ((1445, 1468), 'byceps.services.orga.transfer.models.Birthday', 'Birthday', (['date_of_birth'], {}), '(date_of_birth)\n', (1453, 1468), False, 'from byceps.ser...
# encoding: utf-8 """ Tests of fairgraph.electrophysiology module, using a mock Http client which returns data loaded from the files in the test_data directory. """ from fairgraph.base import KGQuery, KGProxy, as_list, Distribution from fairgraph.commons import BrainRegion, CellType, QuantitativeValue from fairgraph.c...
[ "pytest.skip", "fairgraph.electrophysiology.IntraCellularSharpElectrodeExperiment.set_strict_mode", "fairgraph.electrophysiology.PatchedCell.by_name", "fairgraph.commons.BrainRegion", "fairgraph.electrophysiology.PatchedCell.from_uuid", "fairgraph.commons.CellType", "fairgraph.commons.QuantitativeValue"...
[((13452, 13488), 'fairgraph.core.use_namespace', 'use_core_namespace', (['"""neuralactivity"""'], {}), "('neuralactivity')\n", (13470, 13488), True, 'from fairgraph.core import use_namespace as use_core_namespace\n'), ((13489, 13538), 'fairgraph.electrophysiology.use_namespace', 'use_electrophysiology_namespace', (['"...
# -*- coding: utf-8 -*- import datetime from sqlalchemy import Column, Integer, String from sqlalchemy.engine import create_engine from CommonLibrary.Util import parse_config import sqlalchemy import sqlalchemy.orm import sqlalchemy.ext.declarative # 解析配置文件 # config = parse_config() # 与数据库建立链接 # engine = create_engin...
[ "sqlalchemy.orm.sessionmaker", "sqlalchemy.engine.create_engine", "sqlalchemy.Column", "sqlalchemy.ext.declarative.declarative_base" ]
[((574, 685), 'sqlalchemy.engine.create_engine', 'create_engine', (['"""mysql+pymysql://root:jZCLftXDUZrCwT95@192.168.1.158/zidonghua"""'], {'encoding': '"""utf8"""', 'echo': '(False)'}), "('mysql+pymysql://root:jZCLftXDUZrCwT95@192.168.1.158/zidonghua',\n encoding='utf8', echo=False)\n", (587, 685), False, 'from sq...
import json from django.core import serializers from django.http import JsonResponse from django.views.generic import DetailView, FormView from .forms import SearchForm from .models import Post class SearchView(FormView): form_class = SearchForm template_name = 'fetch/search.html' def request_is_ajax(s...
[ "django.core.serializers.serialize", "django.http.JsonResponse" ]
[((1519, 1539), 'django.http.JsonResponse', 'JsonResponse', (['kwargs'], {}), '(kwargs)\n', (1531, 1539), False, 'from django.http import JsonResponse\n'), ((1823, 1855), 'django.http.JsonResponse', 'JsonResponse', (['kwargs'], {'status': '(400)'}), '(kwargs, status=400)\n', (1835, 1855), False, 'from django.http impor...
""" Copyright 2020 The OneFlow 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 applicable law or agr...
[ "oneflow.framework.session_context.GetDefaultSession", "oneflow.framework.scope_util.MakeScope" ]
[((1437, 1472), 'oneflow.framework.session_context.GetDefaultSession', 'session_context.GetDefaultSession', ([], {}), '()\n', (1470, 1472), True, 'import oneflow.framework.session_context as session_context\n'), ((1743, 1778), 'oneflow.framework.session_context.GetDefaultSession', 'session_context.GetDefaultSession', (...
__author__ = 'farooq.sheikh' from setuptools import setup, find_packages setup( name = 'asposeimagingcloud', packages = find_packages(), version = '1.0.0', description = 'Aspose.Imaging Cloud SDK for Python allows you to use Aspose.Imaging APIs in your Python applications', author='<NAME>', au...
[ "setuptools.find_packages" ]
[((130, 145), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (143, 145), False, 'from setuptools import setup, find_packages\n')]
#!/usr/bin/env python3 """pybuild -- build python3 from source (currently for macos) usage: pybuild.py [-h] [-v] {all,framework,shared,static} ... pybuild: builds python from src optional arguments: -h, --help show this help message and exit -v, --version show program's ver...
[ "logging.getLogger", "os.path.exists", "argparse.ArgumentParser", "shutil.move", "os.path.split", "os.chmod", "os.mkdir", "subprocess.call", "subprocess.check_output", "pathlib.Path.cwd", "re.match", "os.path.splitext", "os.path.dirname", "shutil.copyfile", "platform.python_version", "...
[((1039, 1113), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'LOG_LEVEL', 'format': 'LOG_FORMAT', 'stream': 'sys.stdout'}), '(level=LOG_LEVEL, format=LOG_FORMAT, stream=sys.stdout)\n', (1058, 1113), False, 'import logging\n'), ((1139, 1164), 'platform.python_version', 'platform.python_version', ([], {})...
# Copyright 2020 Open Source Robotics Foundation, 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...
[ "os.path.join", "em.Interpreter", "rosidl_runtime_py.get_interface_path", "os.path.isfile", "os.path.dirname", "io.StringIO", "os.strerror" ]
[((3807, 3836), 'rosidl_runtime_py.get_interface_path', 'get_interface_path', (['interface'], {}), '(interface)\n', (3825, 3836), False, 'from rosidl_runtime_py import get_interface_path\n'), ((5500, 5546), 'os.path.join', 'os.path.join', (['file_directory', '"""index-msg.html"""'], {}), "(file_directory, 'index-msg.ht...
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2021 IBM Corp. 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 # https://www.apache.org/licenses/LICENSE-2.0 # # ...
[ "shutil.rmtree", "ruamel.yaml.YAML", "pathlib.Path" ]
[((1195, 1211), 'ruamel.yaml.YAML', 'YAML', ([], {'typ': '"""safe"""'}), "(typ='safe')\n", (1199, 1211), False, 'from ruamel.yaml import YAML\n'), ((3965, 3999), 'pathlib.Path', 'pathlib.Path', (['"""docs/api_reference"""'], {}), "('docs/api_reference')\n", (3977, 3999), False, 'import pathlib\n'), ((3666, 3694), 'shut...
import unittest from app.news import News class NewsTest(unittest.TestCase): ''' Test Class to test the behaviour of the news class ''' def setUp(self): ''' Set up method that will run before every Test ''' self.new_news = News('1234','Politics','Uhuru and Ruto','https...
[ "unittest.main", "app.news.News" ]
[((660, 675), 'unittest.main', 'unittest.main', ([], {}), '()\n', (673, 675), False, 'import unittest\n'), ((274, 568), 'app.news.News', 'News', (['"""1234"""', '"""Politics"""', '"""Uhuru and Ruto"""', '"""https://businesstoday.co.ke/kenyas-wealthiest-families-shots-politics-poverty-imf-forbes-dollar-billionaires/"""'...
import numpy as np import scipy # from sksparse.cholmod import cholesky # It works (from Terminal). from scipy.sparse.linalg import spsolve import time import sys, os sys.path.append(os.path.dirname(sys.path[0])) from elementLibrary import stiffnessMatrix, shapeFunction from otherFunctions import numericalIntegration ...
[ "scipy.sparse.linalg.spsolve", "meshTools.toDC.nodeElementList", "elementLibrary.stiffnessMatrix.triFE", "numpy.delete", "elementLibrary.stiffnessMatrix.quadFE", "elementLibrary.shapeFunction.oneDQuadratic", "elementLibrary.stiffnessMatrix.triQuadFE", "os.path.dirname", "numpy.array", "numpy.zeros...
[((184, 212), 'os.path.dirname', 'os.path.dirname', (['sys.path[0]'], {}), '(sys.path[0])\n', (199, 212), False, 'import sys, os\n'), ((511, 522), 'time.time', 'time.time', ([], {}), '()\n', (520, 522), False, 'import time\n'), ((1499, 1524), 'numpy.array', 'np.array', (['Iglo'], {'dtype': 'int'}), '(Iglo, dtype=int)\n...
import numpy as np def l2_regularization(W, reg_strength): ''' Computes L2 regularization loss on weights and its gradient Arguments: W, np array - weights reg_strength - float value Returns: loss, single value - l2 regularization loss gradient, np.array same shape as W - gra...
[ "numpy.mean", "numpy.abs", "numpy.ones", "numpy.log", "numpy.max", "numpy.exp", "numpy.sum", "numpy.dot", "numpy.random.randn", "numpy.zeros_like", "numpy.arange" ]
[((2301, 2315), 'numpy.mean', 'np.mean', (['value'], {}), '(value)\n', (2308, 2315), True, 'import numpy as np\n'), ((2738, 2770), 'numpy.arange', 'np.arange', (['target_index.shape[0]'], {}), '(target_index.shape[0])\n', (2747, 2770), True, 'import numpy as np\n'), ((621, 634), 'numpy.sum', 'np.sum', (['(W * W)'], {})...
########################################################################## # # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
[ "IECore.Color4f", "IECore.BoolData", "IECore.Group", "IECoreGL.Renderer", "IECoreGL.init", "IECore.M33f", "unittest.main", "IECore.Box2iData", "IECore.StringData", "IECore.Reader.create", "os.path.isdir", "IECore.CubicBasisf.catmullRom", "IECore.ImagePrimitiveEvaluator", "IECore.WorldBlock...
[((1861, 1881), 'IECoreGL.init', 'IECoreGL.init', (['(False)'], {}), '(False)\n', (1874, 1881), False, 'import IECoreGL\n'), ((26678, 26693), 'unittest.main', 'unittest.main', ([], {}), '()\n', (26691, 26693), False, 'import unittest\n'), ((1946, 1971), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file...
from app import app from flask import jsonify def json_error(message): payload = { 'msg': message, } return jsonify(payload) @app.errorhandler(401) def error_401(error): return json_error('unauthorized'), 401 @app.errorhandler(403) def error_403(error): return json_error('access denied'), 4...
[ "app.app.errorhandler", "flask.jsonify" ]
[((146, 167), 'app.app.errorhandler', 'app.errorhandler', (['(401)'], {}), '(401)\n', (162, 167), False, 'from app import app\n'), ((235, 256), 'app.app.errorhandler', 'app.errorhandler', (['(403)'], {}), '(403)\n', (251, 256), False, 'from app import app\n'), ((325, 346), 'app.app.errorhandler', 'app.errorhandler', ([...
#!/usr/bin/env python # This is a draft rewrite of specgen5, the family of scripts (originally # in Ruby, then Python) that are used with the Counter Ontology, Ordered Lists # Ontology and Info Service Ontology. # This version is based on danbri's specgen version (specgen5) and heavily extended # by <NAME> in July 201...
[ "libgroups.Grouping", "getopt.getopt", "libvocab.Vocab", "sys.exit", "libvocab.VocabReport" ]
[((2769, 2802), 'libvocab.Vocab', 'Vocab', (['indexrdfdir', 'ontofile', 'uri'], {}), '(indexrdfdir, ontofile, uri)\n', (2774, 2802), False, 'from libvocab import Vocab, VocabReport\n'), ((2904, 2966), 'libvocab.VocabReport', 'VocabReport', (['spec', 'indir', 'template', 'templatedir', 'specurl', 'name'], {}), '(spec, i...
import numpy as np import torch from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims from rlpyt.models.mlp import MlpModel from rlpyt.utils.collections import namedarraytuple RnnState = namedarraytuple("RnnState", ["h", "c"]) class MujocoLstmModel(torch.nn.Module): def __init__( ...
[ "numpy.prod", "rlpyt.utils.tensor.restore_leading_dims", "rlpyt.models.mlp.MlpModel", "torch.nn.LSTM", "rlpyt.utils.tensor.infer_leading_dims", "torch.nn.Linear", "rlpyt.utils.collections.namedarraytuple" ]
[((208, 247), 'rlpyt.utils.collections.namedarraytuple', 'namedarraytuple', (['"""RnnState"""', "['h', 'c']"], {}), "('RnnState', ['h', 'c'])\n", (223, 247), False, 'from rlpyt.utils.collections import namedarraytuple\n'), ((771, 883), 'rlpyt.models.mlp.MlpModel', 'MlpModel', ([], {'input_size': 'mlp_input_size', 'hidd...
# # SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # 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...
[ "tacotron2.loss_function.Tacotron2Loss", "waveglow.loss_function.WaveGlowLoss" ]
[((925, 940), 'tacotron2.loss_function.Tacotron2Loss', 'Tacotron2Loss', ([], {}), '()\n', (938, 940), False, 'from tacotron2.loss_function import Tacotron2Loss\n'), ((994, 1019), 'waveglow.loss_function.WaveGlowLoss', 'WaveGlowLoss', ([], {'sigma': 'sigma'}), '(sigma=sigma)\n', (1006, 1019), False, 'from waveglow.loss_...
from flask import abort, Flask, request, send_from_directory, send_file import solvers app = Flask(__name__) @app.route("/") def root(): return send_file('index.html') @app.route("/app.js") def js(): return send_file('app.js') @app.route("/favicon.ico") def favicon(): return send_file('favicon.ico')...
[ "flask.send_from_directory", "flask.Flask", "solvers.solve", "solvers.puzzle_list", "flask.abort", "flask.send_file" ]
[((95, 110), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (100, 110), False, 'from flask import abort, Flask, request, send_from_directory, send_file\n'), ((152, 175), 'flask.send_file', 'send_file', (['"""index.html"""'], {}), "('index.html')\n", (161, 175), False, 'from flask import abort, Flask, reque...
from django.urls import path from workbook import views # from accounts.utils import home urlpatterns = [ path("create/", views.create_task, name="create_task"), path("list/", views.manage_all_task, name="manage_all_task"), path("completed/", views.completed_task, name="completed_task"), path("incomp...
[ "django.urls.path" ]
[((112, 166), 'django.urls.path', 'path', (['"""create/"""', 'views.create_task'], {'name': '"""create_task"""'}), "('create/', views.create_task, name='create_task')\n", (116, 166), False, 'from django.urls import path\n'), ((173, 233), 'django.urls.path', 'path', (['"""list/"""', 'views.manage_all_task'], {'name': '"...
import aiopg # project from ddtrace import Pin from ddtrace.contrib.aiopg.patch import patch from ddtrace.contrib.aiopg.patch import unpatch from tests.contrib.asyncio.utils import AsyncioTestCase from tests.contrib.asyncio.utils import mark_asyncio from tests.contrib.config import POSTGRES_CONFIG TEST_PORT = str(PO...
[ "ddtrace.contrib.aiopg.patch.patch", "aiopg.connect", "ddtrace.contrib.aiopg.patch.unpatch", "ddtrace.Pin.get_from" ]
[((515, 522), 'ddtrace.contrib.aiopg.patch.patch', 'patch', ([], {}), '()\n', (520, 522), False, 'from ddtrace.contrib.aiopg.patch import patch\n'), ((664, 673), 'ddtrace.contrib.aiopg.patch.unpatch', 'unpatch', ([], {}), '()\n', (671, 673), False, 'from ddtrace.contrib.aiopg.patch import unpatch\n'), ((751, 783), 'aio...
#! /usr/bin/env python '''Make sure the Riak client is sane''' import unittest from test import BaseTest from simhash_db import Client class RiakTest(BaseTest, unittest.TestCase): '''Test the Riak client''' def make_client(self, name, num_blocks, num_bits): return Client('riak', name, num_blocks, nu...
[ "unittest.main", "simhash_db.Client" ]
[((361, 376), 'unittest.main', 'unittest.main', ([], {}), '()\n', (374, 376), False, 'import unittest\n'), ((285, 327), 'simhash_db.Client', 'Client', (['"""riak"""', 'name', 'num_blocks', 'num_bits'], {}), "('riak', name, num_blocks, num_bits)\n", (291, 327), False, 'from simhash_db import Client\n')]
import requests from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType SERVER = "localhost" URL = "http://%s:8080" % SERVER def before_all(context): __open_browser(context) def __open_browser(context): chrm = context.config.userdata['chromedriver_path'] try: ...
[ "selenium.webdriver.Chrome", "selenium.webdriver.common.proxy.Proxy", "requests.get" ]
[((2057, 2093), 'requests.get', 'requests.get', (["('%s/demo/flyway' % URL)"], {}), "('%s/demo/flyway' % URL)\n", (2069, 2093), False, 'import requests\n'), ((393, 444), 'requests.get', 'requests.get', (['"""http://localhost:8888"""'], {'timeout': '(0.01)'}), "('http://localhost:8888', timeout=0.01)\n", (405, 444), Fal...
from __future__ import print_function import sys import os import time import argparse import random import uuid import base64 import hashlib import json import requests import ecdsa def main(): parser = argparse.ArgumentParser(description="wallet.py --name=[your name] --host=[node host] --port=[node port]") ...
[ "json.loads", "requests.post", "argparse.ArgumentParser", "json.dumps", "requests.get", "time.time" ]
[((212, 322), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""wallet.py --name=[your name] --host=[node host] --port=[node port]"""'}), "(description=\n 'wallet.py --name=[your name] --host=[node host] --port=[node port]')\n", (235, 322), False, 'import argparse\n'), ((838, 899), 'requ...
# tag::imports[] from PySide2.QtWidgets import QApplication, QPushButton # end::imports[] import sys # tag::QApplication[] app = QApplication(sys.argv) # end::MainWindow[] # tag::QWidget[] window = QPushButton("Push Me") window.show() # end::QWidget[] # tag::exec[] app.exec_() # end::exec[]
[ "PySide2.QtWidgets.QApplication", "PySide2.QtWidgets.QPushButton" ]
[((131, 153), 'PySide2.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (143, 153), False, 'from PySide2.QtWidgets import QApplication, QPushButton\n'), ((201, 223), 'PySide2.QtWidgets.QPushButton', 'QPushButton', (['"""Push Me"""'], {}), "('Push Me')\n", (212, 223), False, 'from PySide2.QtW...
# -*- utf-8 -*- # @Time: 2021/5/24 23:34 # @Author: CACode from aestate.dbs import _mysql from aestate.work.Adapter import LanguageAdapter from aestate.work.Config import MySqlConfig from aestate.work.Manage import Pojo class MyAdapter(LanguageAdapter): def __init__(self): self.funcs['love'] = self.love ...
[ "aestate.dbs._mysql.tag.datetimeField", "aestate.dbs._mysql.tag.intField" ]
[((1208, 1297), 'aestate.dbs._mysql.tag.intField', '_mysql.tag.intField', ([], {'primary_key': '(True)', 'auto_field': '(True)', 'is_null': '(False)', 'comment': '"""主键自增"""'}), "(primary_key=True, auto_field=True, is_null=False,\n comment='主键自增')\n", (1227, 1297), False, 'from aestate.dbs import _mysql\n'), ((1381,...
# movida_reg.py.py """A script designed to update the registration messages for a set location""" import json import requests import os import socket from pathlib import Path import sys sys.path.append(str(Path(__file__).absolute().parents[3])) from WP5.KU.definitions import KU_DIR import WP5.KU.SharedResources.loader_...
[ "pathlib.Path", "json.dumps", "os.path.join", "requests.get", "socket.gethostname" ]
[((1454, 1471), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1466, 1471), False, 'import requests\n'), ((1705, 1735), 'requests.get', 'requests.get', (["(url + 'settings')"], {}), "(url + 'settings')\n", (1717, 1735), False, 'import requests\n'), ((393, 413), 'socket.gethostname', 'socket.gethostname', ([...
import importlib import json import platform import subprocess import sys from pathlib import Path from loguru import logger from sc2.game_data import AbilityData, GameData, UnitTypeData, UpgradeData try: from sc2.ids.id_version import ID_VERSION_STRING except ImportError: ID_VERSION_STRING = "4.11.4.78285" ...
[ "loguru.logger.info", "pathlib.Path", "sc2.game_data.UpgradeData", "pathlib.Path.home", "subprocess.run", "platform.system", "importlib.reload", "sc2.game_data.UnitTypeData", "sc2.game_data.AbilityData" ]
[((689, 706), 'platform.system', 'platform.system', ([], {}), '()\n', (704, 706), False, 'import platform\n'), ((7042, 7093), 'importlib.reload', 'importlib.reload', (["sys.modules['sc2.ids.ability_id']"], {}), "(sys.modules['sc2.ids.ability_id'])\n", (7058, 7093), False, 'import importlib\n'), ((7103, 7155), 'importli...
#!/usr/bin/env python from __future__ import print_function # Copyright 2019 <NAME> - juliane.mai(at)uwaterloo.ca # # License # This file is part of the EEE code library for "Computationally inexpensive identification # of noninformative model parameters by sequential screening: Efficient Elementary Effects (EEE)". # ...
[ "raven_templates.RVH.format", "raven_templates.RVP.format", "raven_templates.RVC.format", "os.path.exists", "raven_templates.RVT.format", "argparse.ArgumentParser", "subprocess.Popen", "raven_templates.RVI.format", "numpy.diff", "numpy.max", "pathlib2.Path", "numpy.min", "numpy.shape", "nu...
[((3253, 3682), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.RawDescriptionHelpFormatter', 'description': '"""An example calling sequence to derive model outputs for previously sampled parameter sets stored in an ASCII file (option -i) where some lines might be skipped (optio...
"""Utility methods.""" import os from sklearn.model_selection import train_test_split import _pickle as pickle import config from constants import empty, eos, FN0 def join_ingredients(ingredients_listlist): """Join multiple lists of ingredients with ' , '.""" return [' , '.join(i) for i in ingredients_listli...
[ "sklearn.model_selection.train_test_split", "_pickle.load" ]
[((3593, 3660), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'Y'], {'test_size': 'nb_val_samples', 'random_state': 'seed'}), '(X, Y, test_size=nb_val_samples, random_state=seed)\n', (3609, 3660), False, 'from sklearn.model_selection import train_test_split\n'), ((1896, 1911), '_pickle.load', '...
# -*- coding: utf-8 -*- import argparse import logging from array import array from pathlib import Path import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import LinearSegmentedColormap from pylab import contour, contourf from il2fb.maps.heightmaps.constants import HEIGHT_PACK_FORMAT from i...
[ "logging.getLogger", "pylab.contourf", "array.array", "argparse.ArgumentParser", "pathlib.Path", "matplotlib.pyplot.clf", "il2fb.maps.heightmaps.logging.setup_logging", "numpy.array", "matplotlib.pyplot.figure", "pylab.contour", "matplotlib.pyplot.axis", "matplotlib.colors.LinearSegmentedColor...
[((432, 459), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (449, 459), False, 'import logging\n'), ((1223, 1289), 'matplotlib.colors.LinearSegmentedColormap.from_list', 'LinearSegmentedColormap.from_list', (['"""il2fb-heights"""', 'CMAP_DATA', '(256)'], {}), "('il2fb-heights', CMAP_DATA...
from requests_html import HTMLSession import pandas as pd # Creating a session object that will allow us to send requests to the website. session = HTMLSession() # Extracting the title, description and date of the news article. def scraping(topic): """ The function is scraping the website and extracting the d...
[ "pandas.DataFrame", "requests_html.HTMLSession" ]
[((150, 163), 'requests_html.HTMLSession', 'HTMLSession', ([], {}), '()\n', (161, 163), False, 'from requests_html import HTMLSession\n'), ((2133, 2154), 'pandas.DataFrame', 'pd.DataFrame', (['dataset'], {}), '(dataset)\n', (2145, 2154), True, 'import pandas as pd\n')]
import enum import traceback from quart import Blueprint from mipengine.controller.api.exceptions import BadRequest from mipengine.controller.api.exceptions import BadUserInput from mipengine.node_tasks_DTOs import InsufficientDataError error_handlers = Blueprint("error_handlers", __name__) INSUFFICIENT_DATA_ERROR_...
[ "quart.Blueprint" ]
[((257, 294), 'quart.Blueprint', 'Blueprint', (['"""error_handlers"""', '__name__'], {}), "('error_handlers', __name__)\n", (266, 294), False, 'from quart import Blueprint\n')]