code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
import hashlib from pathlib import Path from rlbot import gateway_util from rlbot.agents.standalone.standalone_bot_config import StandaloneBotConfig from rlbot.matchconfig.match_config import PlayerConfig, MatchConfig, MutatorConfig, FLATBUFFER_MAX_INT from rlbot.parsing.bot_config_bundle import BotConfigBundle from r...
[ "rlbot.gateway_util.find_existing_process", "rlbot.matchconfig.match_config.MatchConfig", "rlbot.matchconfig.match_config.PlayerConfig", "rlbot.setup_manager.SetupManager", "rlbot.matchconfig.match_config.MutatorConfig" ]
[((1831, 1845), 'rlbot.matchconfig.match_config.PlayerConfig', 'PlayerConfig', ([], {}), '()\n', (1843, 1845), False, 'from rlbot.matchconfig.match_config import PlayerConfig, MatchConfig, MutatorConfig, FLATBUFFER_MAX_INT\n'), ((2395, 2408), 'rlbot.matchconfig.match_config.MatchConfig', 'MatchConfig', ([], {}), '()\n'...
from allennlp import pretrained from functools import lru_cache from typing import Dict, List @lru_cache(maxsize=1) def get_coref_model(): return pretrained.neural_coreference_resolution_lee_2017() def coref(file): model = get_coref_model() results = model.predict(document=file) return results def...
[ "functools.lru_cache", "allennlp.pretrained.neural_coreference_resolution_lee_2017" ]
[((97, 117), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(1)'}), '(maxsize=1)\n', (106, 117), False, 'from functools import lru_cache\n'), ((152, 203), 'allennlp.pretrained.neural_coreference_resolution_lee_2017', 'pretrained.neural_coreference_resolution_lee_2017', ([], {}), '()\n', (201, 203), False, 'from ...
#!/usr/bin/env python3 import re ids = set(open('metagenomes.txt').read().splitlines()) regex = re.compile(r'\/samples\/(\d+)\/(.+)\n') for line in open('mash/mash-files.txt'): match = regex.search(line) if match: sample_id, sketch = match.groups() if sample_id in ids: print('mv m...
[ "re.compile" ]
[((99, 142), 're.compile', 're.compile', (['"""\\\\/samples\\\\/(\\\\d+)\\\\/(.+)\\\\n"""'], {}), "('\\\\/samples\\\\/(\\\\d+)\\\\/(.+)\\\\n')\n", (109, 142), False, 'import re\n')]
from urllib import request, error import socket # HTTPError是URLError的子类 # time out 无法用HTTPError捕捉 # 注意并不是reason属性每次返回的都是字符串类型,如timeout返回的是socket.timeout的实例 try: response = request.urlopen('http://www.jd123.com/test.html') except error.HTTPError as e: print(type(e.reason)) print('三个属性:' + e.reason, e.code,...
[ "urllib.request.urlopen" ]
[((178, 227), 'urllib.request.urlopen', 'request.urlopen', (['"""http://www.jd123.com/test.html"""'], {}), "('http://www.jd123.com/test.html')\n", (193, 227), False, 'from urllib import request, error\n'), ((352, 403), 'urllib.request.urlopen', 'request.urlopen', (['"""https://baidu.com"""'], {'timeout': '(1e-05)'}), "...
from sys import exit def digit_size(num): return len(str(num)) def print_board(rep): print_frame() for row in range(board_dimensions[0], 0, -1): print(f'{" " * (max_number_size - digit_size(row))}{row}|', *rep[row - 1], '|') print_frame() line = ' ' * (max_number_size + cell_size + 1)...
[ "sys.exit" ]
[((6409, 6415), 'sys.exit', 'exit', ([], {}), '()\n', (6413, 6415), False, 'from sys import exit\n')]
from stack import is_empty, top, push, pop def next_largest_element(arr): stack = [] result = [] for i in range(len(arr)-1, -1, -1): while (not is_empty(stack) and (top(stack) >= arr[i])): pop(stack) if is_empty(stack): result.append(-1) else: r...
[ "stack.top", "stack.push", "stack.pop", "stack.is_empty" ]
[((246, 261), 'stack.is_empty', 'is_empty', (['stack'], {}), '(stack)\n', (254, 261), False, 'from stack import is_empty, top, push, pop\n'), ((353, 372), 'stack.push', 'push', (['stack', 'arr[i]'], {}), '(stack, arr[i])\n', (357, 372), False, 'from stack import is_empty, top, push, pop\n'), ((223, 233), 'stack.pop', '...
from hypothesis import given from tests.utils import (BoundPortedLeavesPair, are_bound_ported_leaves_equal, pickle_round_trip) from . import strategies @given(strategies.leaves_pairs) def test_round_trip(leaves_pair: BoundPortedLeavesPair) -> None: bound, ported ...
[ "hypothesis.given", "tests.utils.pickle_round_trip" ]
[((206, 236), 'hypothesis.given', 'given', (['strategies.leaves_pairs'], {}), '(strategies.leaves_pairs)\n', (211, 236), False, 'from hypothesis import given\n'), ((376, 400), 'tests.utils.pickle_round_trip', 'pickle_round_trip', (['bound'], {}), '(bound)\n', (393, 400), False, 'from tests.utils import BoundPortedLeave...
#lda technique to extract keywords import gensim from gensim.utils import simple_preprocess from gensim.parsing.preprocessing import STOPWORDS from nltk.stem import WordNetLemmatizer, SnowballStemmer from nltk.stem.porter import * import numpy as np import pandas as pd import nltk #nltk.download('wordnet') stemmer = Sn...
[ "gensim.models.LdaMulticore", "nltk.stem.WordNetLemmatizer", "nltk.stem.SnowballStemmer", "gensim.corpora.Dictionary", "gensim.utils.simple_preprocess" ]
[((318, 344), 'nltk.stem.SnowballStemmer', 'SnowballStemmer', (['"""english"""'], {}), "('english')\n", (333, 344), False, 'from nltk.stem import WordNetLemmatizer, SnowballStemmer\n'), ((1100, 1131), 'gensim.corpora.Dictionary', 'gensim.corpora.Dictionary', (['data'], {}), '(data)\n', (1125, 1131), False, 'import gens...
from django.core.exceptions import ObjectDoesNotExist from data_importers.addresshelpers import format_polling_station_address from data_importers.base_importers import BaseCsvStationsCsvAddressesImporter from data_finder.helpers import geocode_point_only, PostcodeError from uk_geo_utils.geocoders import AddressBaseGeo...
[ "data_finder.helpers.geocode_point_only", "uk_geo_utils.geocoders.AddressBaseGeocoder", "data_importers.addresshelpers.format_polling_station_address" ]
[((2218, 2263), 'data_importers.addresshelpers.format_polling_station_address', 'format_polling_station_address', (['address_parts'], {}), '(address_parts)\n', (2248, 2263), False, 'from data_importers.addresshelpers import format_polling_station_address\n'), ((1391, 1426), 'data_finder.helpers.geocode_point_only', 'ge...
from typing import Awaitable, TypeVar, Any import asyncio T = TypeVar("T") async def zero(): return async def from_result(value: Any): return value def get_awaiter(value: Awaitable[T]) -> Awaitable[T]: return value def get_result(value: Awaitable[T]) -> T: return asyncio.run(value) __all__ = ...
[ "typing.TypeVar", "asyncio.run" ]
[((63, 75), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (70, 75), False, 'from typing import Awaitable, TypeVar, Any\n'), ((289, 307), 'asyncio.run', 'asyncio.run', (['value'], {}), '(value)\n', (300, 307), False, 'import asyncio\n')]
import os import sys import yaml import json import logging import random from pathlib import Path import numpy as np import torch def init_seed(seed=100): os.environ['PYTHONHASHSEED'] = str(seed) random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) ...
[ "numpy.random.seed", "logging.FileHandler", "torch.manual_seed", "logging.StreamHandler", "logging.Formatter", "torch.cuda.manual_seed_all", "pathlib.Path", "random.seed", "logging.getLogger" ]
[((210, 227), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (221, 227), False, 'import random\n'), ((232, 252), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (246, 252), True, 'import numpy as np\n'), ((257, 280), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (27...
import numpy as np # # Note: the names of these parameters do matter for posterior_table creation. # So does the extra comma in singletons. # # normal: mu, sd # uniform: lower, upper, testval # ImpactParameter: testval priordict = { 'period': ('Normal', 7.20280608, 0.01), # Holczer+16 't0': ('Normal', 120.790531, 0....
[ "numpy.log" ]
[((505, 519), 'numpy.log', 'np.log', (['(0.0018)'], {}), '(0.0018)\n', (511, 519), True, 'import numpy as np\n'), ((1235, 1251), 'numpy.log', 'np.log', (['(2.606418)'], {}), '(2.606418)\n', (1241, 1251), True, 'import numpy as np\n')]
from hachoir.core.tools import makePrintable from hachoir.regex import RegexEmpty, parse, createString class Pattern: """ Abstract class used to define a pattern used in pattern matching """ def __init__(self, user): self.user = user class StringPattern(Pattern): """ Static string p...
[ "doctest.testmod", "hachoir.core.tools.makePrintable", "hachoir.regex.parse", "hachoir.regex.createString", "hachoir.regex.RegexEmpty", "sys.exit" ]
[((4955, 4972), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (4970, 4972), False, 'import doctest\n'), ((478, 511), 'hachoir.core.tools.makePrintable', 'makePrintable', (['self.text', '"""ASCII"""'], {}), "(self.text, 'ASCII')\n", (491, 511), False, 'from hachoir.core.tools import makePrintable\n'), ((761, 7...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ ...
[ "django.utils.translation.ugettext_lazy", "ralph.scan.util.get_pending_changes", "bob.menu.MenuItem", "django.core.exceptions.ImproperlyConfigured" ]
[((1717, 1809), 'bob.menu.MenuItem', 'MenuItem', (['"""Core"""'], {'name': '"""module_core"""', 'fugue_icon': '"""fugue-processor"""', 'view_name': '"""ventures"""'}), "('Core', name='module_core', fugue_icon='fugue-processor',\n view_name='ventures')\n", (1725, 1809), False, 'from bob.menu import MenuItem\n'), ((35...
import argparse import difflib import os import tempfile from edgelist_mapper.bin.run import main as run_main FIXTURE_PATH = os.path.realpath("tests/.fixtures") def get_file_diffs(file1, file2): text1 = open(file1).readlines() text2 = open(file2).readlines() return list(difflib.unified_diff(text1, text2...
[ "tempfile.TemporaryDirectory", "os.path.realpath", "edgelist_mapper.bin.run.main", "os.path.join", "difflib.unified_diff" ]
[((127, 162), 'os.path.realpath', 'os.path.realpath', (['"""tests/.fixtures"""'], {}), "('tests/.fixtures')\n", (143, 162), False, 'import os\n'), ((363, 402), 'os.path.join', 'os.path.join', (['FIXTURE_PATH', '"""cities-s1"""'], {}), "(FIXTURE_PATH, 'cities-s1')\n", (375, 402), False, 'import os\n'), ((287, 321), 'dif...
from PySide.QtCore import * from PySide.QtGui import * from .browserUi import Ui_MainWindow import sys,time from dedalus import * from dedalus.ui import ApplicationWindow,AsyncReceiver,background,TagFilterModel,ResourceListModel,requests import dedalus.ui.tagger.app import subprocess,os.path class AppMainWindow(Appl...
[ "dedalus.ui.ApplicationWindow.__init__", "dedalus.ui.background.setApp", "dedalus.ui.TagFilterModel", "dedalus.ui.ResourceListModel", "dedalus.ui.requests.resourceList", "dedalus.ui.requests.tagCloud", "subprocess.call", "dedalus.ui.requests.rename", "dedalus.ui.requests.removeList", "sys.exit" ]
[((5847, 5869), 'dedalus.ui.background.setApp', 'background.setApp', (['app'], {}), '(app)\n', (5864, 5869), False, 'from dedalus.ui import ApplicationWindow, AsyncReceiver, background, TagFilterModel, ResourceListModel, requests\n'), ((5983, 5993), 'sys.exit', 'sys.exit', ([], {}), '()\n', (5991, 5993), False, 'import...
from sensors import temperature_pressure_humidity import subprocess data = temperature_pressure_humidity.read() print(data) subprocess.call('./mvlog_to_copy_of_log.sh') with open("current_reading", "w") as outfile: outfile.write(str(data) + "\n") subprocess.call('./log.sh')
[ "subprocess.call", "sensors.temperature_pressure_humidity.read" ]
[((77, 113), 'sensors.temperature_pressure_humidity.read', 'temperature_pressure_humidity.read', ([], {}), '()\n', (111, 113), False, 'from sensors import temperature_pressure_humidity\n'), ((126, 170), 'subprocess.call', 'subprocess.call', (['"""./mvlog_to_copy_of_log.sh"""'], {}), "('./mvlog_to_copy_of_log.sh')\n", (...
import ast def isEmpty(value): if value: return False else: return True def isNotEmpty(value): if not value: return False else: return True def stringToDict(param): if isNotEmpty(param) or param != '': return ast.literal_eval(param) def stringToDictLis...
[ "ast.literal_eval" ]
[((275, 298), 'ast.literal_eval', 'ast.literal_eval', (['param'], {}), '(param)\n', (291, 298), False, 'import ast\n'), ((878, 901), 'ast.literal_eval', 'ast.literal_eval', (['param'], {}), '(param)\n', (894, 901), False, 'import ast\n')]
import torch import warnings import torch.nn.functional as F import math class CpBatchNorm2d(torch.nn.BatchNorm2d): def __init__(self, *args, **kwargs): super(CpBatchNorm2d, self).__init__(*args, **kwargs) def forward(self, input): self._check_input_dim(input) if input.requires_grad: ...
[ "torch.nn.functional.batch_norm", "math.fabs", "torch.autograd.grad", "torch.enable_grad", "warnings.warn", "torch.no_grad" ]
[((1673, 1761), 'warnings.warn', 'warnings.warn', (['"""None of the inputs have requires_grad=True. Gradients will be None"""'], {}), "(\n 'None of the inputs have requires_grad=True. Gradients will be None')\n", (1686, 1761), False, 'import warnings\n'), ((2524, 2634), 'torch.autograd.grad', 'torch.autograd.grad', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from zillowdb.packages.sfm.mongoengine_mate import mongoengine, ExtendedDocument from crawl_zillow import zilo_urlencoder class StatusCode(object): todo = 0 failed_to_crawl = 1 # http error crawled_but_has_error = 2 # html parse error finished = 3 # crawl...
[ "zillowdb.packages.sfm.mongoengine_mate.mongoengine.StringField", "zillowdb.packages.sfm.mongoengine_mate.mongoengine.DictField", "zillowdb.packages.sfm.mongoengine_mate.mongoengine.IntField", "crawl_trulia.htmlparser.htmlparser.get_house_detail", "crawl_trulia.urlencoder.urlencoder.by_address_city_and_zipc...
[((659, 700), 'zillowdb.packages.sfm.mongoengine_mate.mongoengine.StringField', 'mongoengine.StringField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (682, 700), False, 'from zillowdb.packages.sfm.mongoengine_mate import mongoengine, ExtendedDocument\n'), ((711, 736), 'zillowdb.packages.sfm.mongoengine_ma...
# James' CloudBot Plugins https://github.com/gtwy/CloudBot-Plugins # # This script watches Twitter feeds & posts the tweets to IRC # # Requirements: # * python-twitter API https://github.com/bear/python-twitter from datetime import datetime import time import html from sqlalchemy import Table, Co...
[ "cloudbot.hook.periodic", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Column", "cloudbot.hook.on_start", "sqlalchemy.String", "twitter.Api", "datetime.datetime.now" ]
[((878, 893), 'cloudbot.hook.on_start', 'hook.on_start', ([], {}), '()\n', (891, 893), False, 'from cloudbot import hook\n'), ((1786, 1801), 'cloudbot.hook.on_start', 'hook.on_start', ([], {}), '()\n', (1799, 1801), False, 'from cloudbot import hook\n'), ((2168, 2185), 'cloudbot.hook.periodic', 'hook.periodic', (['(60)...
import os import sys import yaml import traceback import transaction import json from eldam.elasticdatamanager import ElasticDataManager ["172.16.17.32:9200", "172.16.17.32:9200"], "test" if __name__ == "__main__": test_name = "Update" configpath = os.path.abspath('./edm.yml') if os.path.exists('./edm.yml')...
[ "transaction.commit", "os.path.abspath", "yaml.load", "traceback.print_exc", "os.path.exists", "json.dumps", "eldam.elasticdatamanager.ElasticDataManager", "sys.exit" ]
[((1941, 1954), 'sys.exit', 'sys.exit', (['ret'], {}), '(ret)\n', (1949, 1954), False, 'import sys\n'), ((293, 320), 'os.path.exists', 'os.path.exists', (['"""./edm.yml"""'], {}), "('./edm.yml')\n", (307, 320), False, 'import os\n'), ((261, 289), 'os.path.abspath', 'os.path.abspath', (['"""./edm.yml"""'], {}), "('./edm...
import socket from flask import Flask, jsonify app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" @app.route('/info') def info(): return jsonify(dict( container=socket.gethostname(), version=1, node='')) if __name__ == "__main__": app.run(host='0.0.0.0')
[ "socket.gethostname", "flask.Flask" ]
[((55, 70), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (60, 70), False, 'from flask import Flask, jsonify\n'), ((205, 225), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (223, 225), False, 'import socket\n')]
# Copyright (c) 2018-2019 <NAME> # License: MIT License from ezdxf.lldxf.types import DXFVertex def test_init(): v = DXFVertex(10, (1, 2, 3)) assert v.value == (1.0, 2.0, 3.0) def test_clone(): v = DXFVertex(10, (1, 2, 3)) v2 = v.clone() assert v2.code == v.code assert v2.value == v.value ...
[ "ezdxf.lldxf.types.DXFVertex" ]
[((123, 147), 'ezdxf.lldxf.types.DXFVertex', 'DXFVertex', (['(10)', '(1, 2, 3)'], {}), '(10, (1, 2, 3))\n', (132, 147), False, 'from ezdxf.lldxf.types import DXFVertex\n'), ((214, 238), 'ezdxf.lldxf.types.DXFVertex', 'DXFVertex', (['(10)', '(1, 2, 3)'], {}), '(10, (1, 2, 3))\n', (223, 238), False, 'from ezdxf.lldxf.typ...
from django.conf import settings import factory import factory.fuzzy from symposion.conference.models import Section, Conference def get_conference(): conference, _ = Conference.objects.get_or_create(id=settings.CONFERENCE_ID) return conference class SectionFactory(factory.DjangoModelFactory): class Me...
[ "symposion.conference.models.Conference.objects.get_or_create", "factory.fuzzy.FuzzyText" ]
[((174, 233), 'symposion.conference.models.Conference.objects.get_or_create', 'Conference.objects.get_or_create', ([], {'id': 'settings.CONFERENCE_ID'}), '(id=settings.CONFERENCE_ID)\n', (206, 233), False, 'from symposion.conference.models import Section, Conference\n'), ((448, 473), 'factory.fuzzy.FuzzyText', 'factory...
import torch import numpy as np from models.explainer import MolDQN from models.explainer.ReplayMemory import ReplayMemory class Agent(object): def __init__(self, num_input, num_output, device, lr, replay_buffer_size ): ...
[ "numpy.random.uniform", "torch.stack", "torch.argmax", "numpy.random.randint", "models.explainer.MolDQN", "models.explainer.ReplayMemory.ReplayMemory", "torch.no_grad", "torch.abs", "torch.tensor" ]
[((696, 728), 'models.explainer.ReplayMemory.ReplayMemory', 'ReplayMemory', (['replay_buffer_size'], {}), '(replay_buffer_size)\n', (708, 728), False, 'from models.explainer.ReplayMemory import ReplayMemory\n'), ((1305, 1345), 'torch.stack', 'torch.stack', (['[S for S, *_ in experience]'], {}), '([S for S, *_ in experi...
from homeserver.voice_control.snowboydecoder import HotwordDetector, play_audio_file import sys import signal from multiprocessing import Process, Event class MyProcess(Process): def __init__(self, **kvargs ): Process.__init__(self, **kvargs) self.exit = Event() def run(self): wh...
[ "multiprocessing.Event", "multiprocessing.Process.__init__", "homeserver.voice_control.snowboydecoder.HotwordDetector" ]
[((229, 261), 'multiprocessing.Process.__init__', 'Process.__init__', (['self'], {}), '(self, **kvargs)\n', (245, 261), False, 'from multiprocessing import Process, Event\n'), ((282, 289), 'multiprocessing.Event', 'Event', ([], {}), '()\n', (287, 289), False, 'from multiprocessing import Process, Event\n'), ((1156, 120...
from django.views.generic import FormView from .models import Enemy, Hero, Feature, Price, Testimonial, OtherImage from django.urls import reverse_lazy from django.contrib import messages from .forms import ContactForm class IndexView(FormView): template_name = 'index.html' form_class = ContactForm succes...
[ "django.urls.reverse_lazy", "django.contrib.messages.success", "django.contrib.messages.error" ]
[((328, 349), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""index"""'], {}), "('index')\n", (340, 349), False, 'from django.urls import reverse_lazy\n'), ((1003, 1060), 'django.contrib.messages.success', 'messages.success', (['self.request', '"""Email sent successfully"""'], {}), "(self.request, 'Email sent success...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.utils.timezone import model_utils.fields from django.conf import settings from django.db import migrations, models import waldur_core.core.fields class Migration(migrations.Migration): replaces = [('logging', '0001_squashed_0003_email...
[ "django.db.models.OneToOneField", "django.db.models.URLField", "django.db.migrations.swappable_dependency", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.EmailFiel...
[((1051, 1108), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (1082, 1108), False, 'from django.db import migrations, models\n'), ((1280, 1373), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '...
""" License: NASA Open Source Agreement 1.3 """ import os import sys import logging from io import StringIO class ENVIHeader(object): """Manipulates ENVI header files Allows for updating ENVI header files. """ def __init__(self, envi_header_filename): """Object initialization ...
[ "io.StringIO" ]
[((2186, 2196), 'io.StringIO', 'StringIO', ([], {}), '()\n', (2194, 2196), False, 'from io import StringIO\n')]
# -*- coding: utf-8 -*- from __future__ import division __author__ = 'Kris,QQ:1209304692。QQ群:知尔MOOC,760196377' from django.shortcuts import render from django.views.generic.base import View from pure_pagination import Paginator, PageNotAnInteger from django.http import HttpResponse from django.db.models import...
[ "django.http.HttpResponse", "operation.models.UserStudy.objects.filter", "operation.models.UserFavorite.objects.filter", "django.db.models.Q", "organization.models.Teacher.objects.get", "operation.models.UserComment.objects.filter", "pure_pagination.Paginator", "django.shortcuts.render" ]
[((3600, 3643), 'pure_pagination.Paginator', 'Paginator', (['all_courses', '(30)'], {'request': 'request'}), '(all_courses, 30, request=request)\n', (3609, 3643), False, 'from pure_pagination import Paginator, PageNotAnInteger\n'), ((3740, 4100), 'django.shortcuts.render', 'render', (['request', '"""mooc/course-list.ht...
# Demo showcasing the training of an MLP with a single hidden layer using # Unscented Kalman Filtering (UKF). # In this demo, we consider the latent state to be the weights of an MLP. # The observed state at time t is the output of the MLP as influenced by the weights # at time t-1 and the covariate x[t]. # The ...
[ "matplotlib.pyplot.suptitle", "jsl.demos.ekf_mlp.MLP", "jax.random.PRNGKey", "jsl.demos.ekf_mlp.plot_mlp_prediction", "jax.random.normal", "jsl.nlds.unscented_kalman_filter.filter", "matplotlib.pyplot.subplots", "jax.numpy.sin", "functools.partial", "jax.vmap", "matplotlib.pyplot.show", "jax.n...
[((1154, 1166), 'jax.random.PRNGKey', 'PRNGKey', (['(314)'], {}), '(314)\n', (1161, 1166), False, 'from jax.random import PRNGKey, split, normal\n'), ((1211, 1224), 'jax.random.split', 'split', (['key', '(3)'], {}), '(key, 3)\n', (1216, 1224), False, 'from jax.random import PRNGKey, split, normal\n'), ((1336, 1358), 'j...
import sys import os.path #sys.path.append(os.path.join(os.path.dirname(__file__), r'C:\Users\Simeon\PycharmProjects\car_scraper_packages')) from car_scraper.car_scraping_1 import Carscraper #import boto3 import psycopg2 from sqlalchemy import create_engine import os import pandas as pd class DataHandling: def ...
[ "sqlalchemy.create_engine", "pandas.read_csv", "car_scraper.car_scraping_1.Carscraper", "psycopg2.connect" ]
[((362, 374), 'car_scraper.car_scraping_1.Carscraper', 'Carscraper', ([], {}), '()\n', (372, 374), False, 'from car_scraper.car_scraping_1 import Carscraper\n'), ((1038, 1151), 'psycopg2.connect', 'psycopg2.connect', (['f"""dbname=postgres user=postgres password={self.PASSWORD} host=172.16.17.32 port=5432"""'], {}), "(...
from abc import ABC, abstractmethod from functools import partial from typing import ( Any, Callable, Generic, Type, ) from p2p.protocol import ( BaseRequest, Command, TRequestPayload, ) from trinity.utils.decorators import classproperty from .managers import ExchangeManager from .normaliz...
[ "functools.partial" ]
[((2385, 2436), 'functools.partial', 'partial', (['payload_validator', 'request.command_payload'], {}), '(payload_validator, request.command_payload)\n', (2392, 2436), False, 'from functools import partial\n')]
import logging from app import app from models import setup # noqa # initialize model configurations from routes import setup # noqa # initialize route configurations app.logger.setLevel(logging.INFO)
[ "app.app.logger.setLevel" ]
[((171, 204), 'app.app.logger.setLevel', 'app.logger.setLevel', (['logging.INFO'], {}), '(logging.INFO)\n', (190, 204), False, 'from app import app\n')]
#!/usr/bin/env python import sys, os, json, zlib, string, gzip LOW_GAMENUM=int(sys.argv[2]) HIGH_GAMENUM=int(sys.argv[3]) expected_gamenums = set(range(LOW_GAMENUM, HIGH_GAMENUM+1)) i = 0 garchive = sys.argv[1] infd = gzip.open(garchive, 'rb') for line in infd: item = json.loads(line) ...
[ "sys.stdout.write", "sys.stdout.flush", "gzip.open", "json.loads" ]
[((233, 258), 'gzip.open', 'gzip.open', (['garchive', '"""rb"""'], {}), "(garchive, 'rb')\n", (242, 258), False, 'import sys, os, json, zlib, string, gzip\n'), ((294, 310), 'json.loads', 'json.loads', (['line'], {}), '(line)\n', (304, 310), False, 'import sys, os, json, zlib, string, gzip\n'), ((436, 457), 'sys.stdout....
import requests class NewRelicException(Exception): pass class NewRelicDeploymentException(NewRelicException): pass class Deployment(object): ENDPOINT = 'https://api.newrelic.com/v2/applications/%(app_id)s/deployments.json' def __init__(self, api_key, app_id, user): self.__api_key = api_k...
[ "requests.post" ]
[((1086, 1150), 'requests.post', 'requests.post', (['self.endpoint'], {'headers': 'self.headers', 'json': 'payload'}), '(self.endpoint, headers=self.headers, json=payload)\n', (1099, 1150), False, 'import requests\n')]
# # (C) Copyright 2003-2011 <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOU...
[ "ssl.SSLError", "logging.getLogger" ]
[((1583, 1621), 'logging.getLogger', 'logging.getLogger', (['"""pyxmpp2.streamtls"""'], {}), "('pyxmpp2.streamtls')\n", (1600, 1621), False, 'import logging\n'), ((7082, 7125), 'ssl.SSLError', 'SSLError', (['"""Certificate verification failed"""'], {}), "('Certificate verification failed')\n", (7090, 7125), False, 'fro...
import fitz import random from classes.Brief import get_my_brief from utils.upload.get_ocr_status import get_ocr_status from utils.misc.get_file_name_from_path import get_file_name_from_path from utils.cases.get_name_of_case import get_name_of_case def get_case_data_from_single_file(request, amount_of_brief_pages):...
[ "utils.upload.get_ocr_status.get_ocr_status", "random.randrange", "classes.Brief.get_my_brief", "fitz.open", "utils.misc.get_file_name_from_path.get_file_name_from_path", "utils.cases.get_name_of_case.get_name_of_case" ]
[((390, 410), 'fitz.open', 'fitz.open', (['case_path'], {}), '(case_path)\n', (399, 410), False, 'import fitz\n'), ((495, 520), 'utils.upload.get_ocr_status.get_ocr_status', 'get_ocr_status', (['open_case'], {}), '(open_case)\n', (509, 520), False, 'from utils.upload.get_ocr_status import get_ocr_status\n'), ((2989, 30...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 12 21:11:41 2017 @author: bbradt """ import sys import json import os """ Python Versioning for Convenience """ def pyversion(): """ return python version """ if sys.version_info[0] < 3: return 2 return 3 def py3(): """...
[ "os.path.isdir", "sys.stdout.write", "os.walk", "json.load" ]
[((1391, 1414), 'os.path.isdir', 'os.path.isdir', (['some_dir'], {}), '(some_dir)\n', (1404, 1414), False, 'import os\n'), ((1486, 1503), 'os.walk', 'os.walk', (['some_dir'], {}), '(some_dir)\n', (1493, 1503), False, 'import os\n'), ((633, 653), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (642, 653)...
import math import graph as gr def push(u, v, flows, excess, capacities): d = min (excess[u], capacities[u][v] - flows[u][v]) flows[u][v] += d flows[v][u] = - flows[u][v] excess[u] -= d excess[v] += d def lift(u, h, flows, capacities): d = math.inf for i in range(len(flows)): if capacities[u][i] - flows[u][i...
[ "graph.GraphWeighted" ]
[((1608, 1699), 'graph.GraphWeighted', 'gr.GraphWeighted', (['[(0, 1, 2), (1, 2, 3), (2, 3, 2), (0, 2, 5), (0, 3, 4), (1, 4, 7)]', '(5)'], {}), '([(0, 1, 2), (1, 2, 3), (2, 3, 2), (0, 2, 5), (0, 3, 4), (1,\n 4, 7)], 5)\n', (1624, 1699), True, 'import graph as gr\n')]
""" .. Dstl (c) Crown Copyright 2019 Inspection strategies are used by reporters to create attribute_readers for given objects when none are specified. """ from noisify.attribute_readers import DictValue, ObjectAttribute def dictionary_lookup(unknown_dictionary, attribute_faults=None): """ Generates attribute...
[ "noisify.attribute_readers.DictValue", "noisify.attribute_readers.ObjectAttribute" ]
[((586, 632), 'noisify.attribute_readers.DictValue', 'DictValue', (['identifier'], {'faults': 'attribute_faults'}), '(identifier, faults=attribute_faults)\n', (595, 632), False, 'from noisify.attribute_readers import DictValue, ObjectAttribute\n'), ((1052, 1103), 'noisify.attribute_readers.ObjectAttribute', 'ObjectAttr...
from django.contrib.auth.models import User from rest_framework import authentication from rest_framework import exceptions class SimpleAuthentication(authentication.BaseAuthentication): def authenticate(self, request): username = request.META.get('X_USERNAME') if not username: return ...
[ "rest_framework.exceptions.AuthenticationFailed", "django.contrib.auth.models.User.objects.get" ]
[((358, 393), 'django.contrib.auth.models.User.objects.get', 'User.objects.get', ([], {'username': 'username'}), '(username=username)\n', (374, 393), False, 'from django.contrib.auth.models import User\n'), ((446, 493), 'rest_framework.exceptions.AuthenticationFailed', 'exceptions.AuthenticationFailed', (['"""No such u...
from gym.envs.registration import register from .ieee34 import IEEE34BusSystem from .ieee123 import IEEE123BusSystem from .ieee123_ddpg import IEEE123BusSystemDDPG # from systems.environment_ieee34_ddpg import Environment_IEEE34_DDPG # from systems.environment_cigre_mv import Environment_CIGRE_MV # from systems.environ...
[ "gym.envs.registration.register" ]
[((435, 545), 'gym.envs.registration.register', 'register', ([], {'id': '"""ieee34-v0"""', 'entry_point': '"""multiagent_powergrid.ieee34:IEEE34BusSystem"""', 'max_episode_steps': '(24)'}), "(id='ieee34-v0', entry_point=\n 'multiagent_powergrid.ieee34:IEEE34BusSystem', max_episode_steps=24)\n", (443, 545), False, 'f...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup try: from sphinx.setup_command import BuildDoc DOC_CMD_CLASS = {'doc': BuildDoc} except ImportError: print('WARNING - No documentation can be managed before Sphinx installed') DOC_CMD_CLASS = {} # Setup function, settings are ...
[ "setuptools.setup" ]
[((333, 400), 'setuptools.setup', 'setup', ([], {'cmdclass': 'DOC_CMD_CLASS', 'version': '"""{{ cookiecutter.version }}"""'}), "(cmdclass=DOC_CMD_CLASS, version='{{ cookiecutter.version }}')\n", (338, 400), False, 'from setuptools import setup\n')]
import numpy import re def IsFloat(text): if text is None: return False try: float(text) return True except ValueError: return False def RemoveTrailingZeros(x): ret = x ret = re.sub('\.0*$', '', ret) ret = re.sub('(\.[1-9]*)0+$', '\\1', ret) return ret def HumanizeFloat(x, n=2): if...
[ "numpy.average", "re.sub" ]
[((205, 230), 're.sub', 're.sub', (['"""\\\\.0*$"""', '""""""', 'ret'], {}), "('\\\\.0*$', '', ret)\n", (211, 230), False, 'import re\n'), ((238, 274), 're.sub', 're.sub', (['"""(\\\\.[1-9]*)0+$"""', '"""\\\\1"""', 'ret'], {}), "('(\\\\.[1-9]*)0+$', '\\\\1', ret)\n", (244, 274), False, 'import re\n'), ((5431, 5460), 'n...
import functools from typing import Union, Sequence, Tuple import tensorflow as tf ################################################################################ @tf.function def read_images(input_im: tf.Tensor, target_im: tf.Tensor, image_size: Tuple[int, int]) -> Tuple[tf.Tensor,...
[ "tensorflow.image.flip_left_right", "functools.partial", "tensorflow.random.uniform", "tensorflow.stack", "tensorflow.data.Dataset.zip", "tensorflow.data.Dataset.list_files", "tensorflow.io.read_file", "tensorflow.image.resize", "tensorflow.image.decode_jpeg", "tensorflow.image.convert_image_dtype...
[((349, 374), 'tensorflow.io.read_file', 'tf.io.read_file', (['input_im'], {}), '(input_im)\n', (364, 374), True, 'import tensorflow as tf\n'), ((390, 432), 'tensorflow.image.decode_jpeg', 'tf.image.decode_jpeg', (['input_im'], {'channels': '(3)'}), '(input_im, channels=3)\n', (410, 432), True, 'import tensorflow as tf...
# # Copyright 2020 DreamWorks Animation L.L.C. # # 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 agre...
[ "Qt.QtCore.Signal", "Qt.QtCore.Slot", "logging.basicConfig", "xml.sax.saxutils.escape", "Qt.QtCore.QFileInfo", "Qt.QtCore.QFile.exists", "logging.getLogger" ]
[((927, 954), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (944, 954), False, 'import logging\n'), ((955, 976), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (974, 976), False, 'import logging\n'), ((1329, 1340), 'Qt.QtCore.Signal', 'Signal', (['int'], {}), '(int)\n', ...
import torch import distributed_utils as linklink class Distributed(object): """Decorator for Distributed tensor range""" def __init__(self, func): self._func = func def sync(data_min, data_max): linklink.allreduce(data_min, reduce_op=linklink.allreduceOp_t.Min) linkli...
[ "distributed_utils.allreduce", "distributed_utils.get_world_size", "torch.zeros_like" ]
[((1003, 1028), 'distributed_utils.get_world_size', 'linklink.get_world_size', ([], {}), '()\n', (1026, 1028), True, 'import distributed_utils as linklink\n'), ((1033, 1064), 'distributed_utils.allreduce', 'linklink.allreduce', (['tensor.data'], {}), '(tensor.data)\n', (1051, 1064), True, 'import distributed_utils as l...
import unittest from io import StringIO from time import sleep, time from unittest import mock from twisted.trial.unittest import SkipTest from scrapy.utils import trackref class Foo(trackref.object_ref): pass class Bar(trackref.object_ref): pass class TrackrefTestCase(unittest.TestCase): def setUp...
[ "scrapy.utils.trackref.get_oldest", "scrapy.utils.trackref.iter_all", "scrapy.utils.trackref.live_refs.clear", "time.time", "unittest.mock.patch", "time.sleep", "scrapy.utils.trackref.format_live_refs", "scrapy.utils.trackref.print_live_refs", "twisted.trial.unittest.SkipTest" ]
[((876, 923), 'unittest.mock.patch', 'mock.patch', (['"""sys.stdout"""'], {'new_callable': 'StringIO'}), "('sys.stdout', new_callable=StringIO)\n", (886, 923), False, 'from unittest import mock\n'), ((1084, 1131), 'unittest.mock.patch', 'mock.patch', (['"""sys.stdout"""'], {'new_callable': 'StringIO'}), "('sys.stdout',...
"""Unit tests for pyatv.convert.""" import unittest from pyatv import exceptions from pyatv.dmap.daap import media_kind, playstate, ms_to_s from pyatv.const import MediaType, DeviceState # These are extracted from iTunes, see for instance: # http://www.blooming.no/wp-content/uploads/2013/03/ITLibMediaItem.h # and al...
[ "pyatv.dmap.daap.media_kind", "pyatv.dmap.daap.playstate", "pyatv.dmap.daap.ms_to_s" ]
[((1518, 1548), 'pyatv.dmap.daap.media_kind', 'media_kind', (['MEDIA_KIND_UNKNOWN'], {}), '(MEDIA_KIND_UNKNOWN)\n', (1528, 1548), False, 'from pyatv.dmap.daap import media_kind, playstate, ms_to_s\n'), ((1619, 1650), 'pyatv.dmap.daap.media_kind', 'media_kind', (['MEDIA_KIND_UNKNOWN2'], {}), '(MEDIA_KIND_UNKNOWN2)\n', (...
#!/usr/bin/env python # modelFuncs.py: functions to train and evaluate LVMs # Author: <NAME> # Date: 2017/02/01 # import the modules import sys import GPy import numpy as np from sklearn.decomposition import PCA ################################################################################ # Functions for model t...
[ "sys.stdout.write", "numpy.zeros", "numpy.where", "sklearn.decomposition.PCA", "GPy.kern.RBF", "GPy.models.BayesianGPLVM", "GPy.models.GPLVM", "numpy.atleast_2d" ]
[((506, 528), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': 'qDim'}), '(n_components=qDim)\n', (509, 528), False, 'from sklearn.decomposition import PCA\n'), ((996, 1018), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': 'qDim'}), '(n_components=qDim)\n', (999, 1018), False, 'from sklearn.decomposi...
# ** -- coding: utf-8 -- ** # !/usr/bin/env python # # Copyright (c) 2011 darkdarkfruit <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limi...
[ "unittest.main", "os.path.abspath", "adaptpath.adaptpath.get_package_path_from_path", "sys.path.insert", "os.path.split" ]
[((1381, 1406), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (1396, 1406), False, 'import os\n'), ((1457, 1480), 'os.path.split', 'os.path.split', (['abs_path'], {}), '(abs_path)\n', (1470, 1480), False, 'import os\n'), ((1499, 1523), 'os.path.split', 'os.path.split', (['TEST_PATH'], {}), '...
import asyncio import cmdtools from cmdtools.ext.command import CommandWrapper, Command wrapper = CommandWrapper() @wrapper.command(name='ping') def ping(): print("Pong!") @wrapper.command(name='say', aliases=["echo", ]) def say(*text_): if text_: text = " ".join(text_) else: raise cmdt...
[ "cmdtools.ext.command.CommandWrapper", "cmdtools.MissingRequiredArgument", "cmdtools.Cmd" ]
[((99, 115), 'cmdtools.ext.command.CommandWrapper', 'CommandWrapper', ([], {}), '()\n', (113, 115), False, 'from cmdtools.ext.command import CommandWrapper, Command\n'), ((316, 367), 'cmdtools.MissingRequiredArgument', 'cmdtools.MissingRequiredArgument', (['"""invoke"""', '"""text_"""'], {}), "('invoke', 'text_')\n", (...
import argparse import cmd from rich import print from rich.emoji import Emoji from rich.panel import Panel from cmdict.myDict import myDictionary print("Starting...") d = myDictionary() welcome = Panel( """ :100: Memorize thousands of english words in [blink]command line[/blink]! :sleeping: [blu...
[ "cmd.Cmd.__init__", "rich.panel.Panel", "argparse.ArgumentParser", "rich.print", "cmdict.myDict.myDictionary" ]
[((150, 170), 'rich.print', 'print', (['"""Starting..."""'], {}), "('Starting...')\n", (155, 170), False, 'from rich import print\n'), ((175, 189), 'cmdict.myDict.myDictionary', 'myDictionary', ([], {}), '()\n', (187, 189), False, 'from cmdict.myDict import myDictionary\n'), ((200, 605), 'rich.panel.Panel', 'Panel', ([...
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.http import JsonResponse from django.utils import timezone from keypit.kpis import stats class UserRoleMixin(LoginRequiredMixin): def admin_roles(self): return [] def owner_roles(self): return [] ...
[ "keypit.kpis.stats.unit_stats", "django.utils.timezone.localtime", "keypit.kpis.stats.get_data_periods", "django.http.JsonResponse" ]
[((2177, 2225), 'keypit.kpis.stats.get_data_periods', 'stats.get_data_periods', ([], {'period': '"""year"""'}), "(period='year', **filters)\n", (2199, 2225), False, 'from keypit.kpis import stats\n'), ((2848, 2901), 'keypit.kpis.stats.unit_stats', 'stats.unit_stats', ([], {'period': 'period', 'year': 'year'}), '(period...
from app import app from flask import jsonify @app.route('/api/tarefas', methods=["POST"]) def api_tarefas_post(): return jsonify() @app.route('/api/tarefas', methods=["GET"]) def api_tarefas_get(): json = {"teste": "conteúdo teste"} return jsonify(json)
[ "app.app.route", "flask.jsonify" ]
[((49, 92), 'app.app.route', 'app.route', (['"""/api/tarefas"""'], {'methods': "['POST']"}), "('/api/tarefas', methods=['POST'])\n", (58, 92), False, 'from app import app\n'), ((141, 183), 'app.app.route', 'app.route', (['"""/api/tarefas"""'], {'methods': "['GET']"}), "('/api/tarefas', methods=['GET'])\n", (150, 183), ...
""" Email: <EMAIL> Date: 2018/10/29 """ import pandas as pd import numpy as np import torch from torch import nn, optim from dnn import MLP, Titanic from torch.utils.data import DataLoader from collections import Counter import xgboost as xgb from catboost import CatBoostClassifier from sklearn.metrics import accurac...
[ "lightgbm.LGBMClassifier", "torch.optim.lr_scheduler.StepLR", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.metrics.accuracy_score", "dnn.MLP", "sklearn.neural_network.MLPClassifier", "torch.device", "catboost.CatBoostClassifier", "torch.no_grad", "numpy.round", "pand...
[((1194, 1259), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X_train', 'y_train'], {'test_size': '(0.3)', 'random_state': '(0)'}), '(X_train, y_train, test_size=0.3, random_state=0)\n', (1210, 1259), False, 'from sklearn.model_selection import train_test_split, KFold\n'), ((1277, 1327), 'sklearn.m...
import bar def func_in_foo(): a = bar.func_in_bar() return a
[ "bar.func_in_bar" ]
[((40, 57), 'bar.func_in_bar', 'bar.func_in_bar', ([], {}), '()\n', (55, 57), False, 'import bar\n')]
# -*- encoding: utf8 -*- # ------------------------------------------------------------------------------ # # major windows: # # MainWindow # ===================================================================== # | mainSplitter ...
[ "os.path.dirname", "time.sleep", "PyQt5.QtGui.QPixmap", "linguistica.gui.main_window.MainWindow", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QSplashScreen" ]
[((2690, 2712), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (2702, 2712), False, 'from PyQt5.QtWidgets import QApplication, QSplashScreen\n'), ((3399, 3425), 'PyQt5.QtGui.QPixmap', 'QPixmap', (['splash_image_path'], {}), '(splash_image_path)\n', (3406, 3425), False, 'from PyQt5.Q...
#!/usr/bin/env python # -*- coding:UTF-8 -*- # @Time : 2018/10/20 21:41 # @email : <EMAIL> # @fileName : setup.py __author__ = 'ChenLiang.Miao' #--+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--# from distutils.core import setup from...
[ "Cython.Build.cythonize" ]
[((399, 458), 'Cython.Build.cythonize', 'cythonize', (['"""D:\\\\MCL\\\\python\\\\MCLPlayer\\\\source\\\\UI\\\\QSS.py"""'], {}), "('D:\\\\MCL\\\\python\\\\MCLPlayer\\\\source\\\\UI\\\\QSS.py')\n", (408, 458), False, 'from Cython.Build import cythonize\n')]
from abc import ABC, abstractmethod import torch import torch.nn as nn from torchsummary import summary from collections import OrderedDict import os class BaseModel(nn.Module, ABC): r""" BaseModel with basic functionalities for checkpointing and restoration. """ def __init__(self): super().__...
[ "torch.nn.Dropout", "torch.nn.ConvTranspose3d", "torch.cat", "torch.device", "torch.nn.MaxPool3d", "torch.no_grad", "os.path.join", "torch.nn.Conv3d", "torch.load", "os.path.exists", "torch.nn.Linear", "os.path.basename", "torch.nn.InstanceNorm3d", "torch.rand", "torch.nn.AdaptiveAvgPool...
[((4209, 4233), 'torch.nn.AdaptiveAvgPool3d', 'nn.AdaptiveAvgPool3d', (['sz'], {}), '(sz)\n', (4229, 4233), True, 'import torch.nn as nn\n'), ((4252, 4276), 'torch.nn.AdaptiveMaxPool3d', 'nn.AdaptiveMaxPool3d', (['sz'], {}), '(sz)\n', (4272, 4276), True, 'import torch.nn as nn\n'), ((4626, 4663), 'torch.nn.MaxPool3d', ...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ "eclcli.common.utils.get_item_properties" ]
[((1335, 1421), 'eclcli.common.utils.get_item_properties', 'utils.get_item_properties', (['s', 'columns'], {'formatters': "{'Metadata': utils.format_dict}"}), "(s, columns, formatters={'Metadata': utils.\n format_dict})\n", (1360, 1421), False, 'from eclcli.common import utils\n')]
import angr from angr.state_plugins.plugin import SimStatePlugin import claripy from collections import namedtuple from kalm import utils # All sizes are in bytes, and all offsets are in bits class HeapPlugin(SimStatePlugin): FRACS_NAME = "_fracs" Metadata = namedtuple('MapsMemoryMetadata', ['count', 'size',...
[ "kalm.utils.definitely_true", "claripy.BVV", "collections.namedtuple", "kalm.utils.base_index_offset" ]
[((270, 334), 'collections.namedtuple', 'namedtuple', (['"""MapsMemoryMetadata"""', "['count', 'size', 'fractions']"], {}), "('MapsMemoryMetadata', ['count', 'size', 'fractions'])\n", (280, 334), False, 'from collections import namedtuple\n'), ((2953, 3014), 'kalm.utils.base_index_offset', 'utils.base_index_offset', ([...
from typing import List, Optional, Sequence import numpy as np import pandas as pd from pydantic import BaseModel, validator class RefDataCfg(BaseModel): """Validation model for reference data configuration.""" bins: Optional[List] weights: Optional[List[float]] labels: Optional[List] distributi...
[ "numpy.sum", "numpy.testing.assert_almost_equal", "pandas.isnull", "numpy.cumsum", "pydantic.validator", "numpy.interp" ]
[((339, 359), 'pydantic.validator', 'validator', (['"""weights"""'], {}), "('weights')\n", (348, 359), False, 'from pydantic import BaseModel, validator\n'), ((612, 642), 'pydantic.validator', 'validator', (['"""distribution_type"""'], {}), "('distribution_type')\n", (621, 642), False, 'from pydantic import BaseModel, ...
"""Remove unique constraint from username Revision ID: <KEY> Revises: 6d9c67a35dad Create Date: 2019-11-07 03:20:49.588022 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "6d9c67a35dad" branch_labels = None depends_on = None def upgrad...
[ "alembic.op.create_unique_constraint", "alembic.op.drop_constraint" ]
[((395, 458), 'alembic.op.drop_constraint', 'op.drop_constraint', (['"""user_username_key"""', '"""user"""'], {'type_': '"""unique"""'}), "('user_username_key', 'user', type_='unique')\n", (413, 458), False, 'from alembic import op\n'), ((583, 653), 'alembic.op.create_unique_constraint', 'op.create_unique_constraint', ...
# Generated by Django 2.2.5 on 2021-06-07 04:51 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ft', '0003_user_password_reset_token'), ] operations = [ migrations.RemoveField( model_name='user', name='password_reset_tok...
[ "django.db.migrations.RemoveField" ]
[((229, 299), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""user"""', 'name': '"""password_reset_token"""'}), "(model_name='user', name='password_reset_token')\n", (251, 299), False, 'from django.db import migrations\n')]
import os RUN_COMMAND = r""" xvfb-run -as "-screen 0 1024x768x24 -ac" ./bin/x86_64/mpview \ -input_house ${DATA_DIR}/${HID}/house_segmentations/*.house \ -input_scene $DATA_DIR/$HID/matterport_mesh/*/*.obj \ -input_mesh ${DATA_DIR}/${HID}/house_segmentations/*.ply \ -input_categories ${METADATA} \ ...
[ "os.listdir" ]
[((2546, 2592), 'os.listdir', 'os.listdir', (['"""/datasets01/mp3d/073118/v1/scans"""'], {}), "('/datasets01/mp3d/073118/v1/scans')\n", (2556, 2592), False, 'import os\n')]
import time import numpy as np import pandas as pd from selenium import webdriver from selenium.webdriver.chrome.options import Options URLS_PATH = "./data/urls_transferwise.csv" CHROMEDRIVER_PATH = "./drivers/chromedriver" # connect to chrome webdriver options = Options() options.add_argument('--headless') # option...
[ "pandas.DataFrame", "selenium.webdriver.chrome.options.Options", "pandas.read_csv", "time.sleep", "pandas.Series", "selenium.webdriver.Chrome" ]
[((267, 276), 'selenium.webdriver.chrome.options.Options', 'Options', ([], {}), '()\n', (274, 276), False, 'from selenium.webdriver.chrome.options import Options\n'), ((399, 451), 'selenium.webdriver.Chrome', 'webdriver.Chrome', (['CHROMEDRIVER_PATH'], {'options': 'options'}), '(CHROMEDRIVER_PATH, options=options)\n', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('homePage', '0002_character_line'), ] operations = [ migrations.CreateModel( name='AssyrianChar', fie...
[ "django.db.models.TextField", "django.db.migrations.RemoveField", "django.db.models.ForeignKey", "django.db.models.PositiveSmallIntegerField", "django.db.migrations.DeleteModel", "django.db.models.AutoField" ]
[((877, 936), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""character"""', 'name': '"""Sign"""'}), "(model_name='character', name='Sign')\n", (899, 936), False, 'from django.db import models, migrations\n'), ((981, 1021), 'django.db.migrations.DeleteModel', 'migrations.DeleteMode...
# -------------------------------------------------------- # DenseCap-Tensorflow # Written by InnerPeace # This file is adapted from <NAME>'s work # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written b...
[ "yaml.load", "os.makedirs", "os.path.dirname", "os.path.exists", "numpy.array", "easydict.EasyDict", "ast.literal_eval", "os.path.join" ]
[((919, 926), 'easydict.EasyDict', 'edict', ([], {}), '()\n', (924, 926), True, 'from easydict import EasyDict as edict\n'), ((1022, 1029), 'easydict.EasyDict', 'edict', ([], {}), '()\n', (1027, 1029), True, 'from easydict import EasyDict as edict\n'), ((5808, 5815), 'easydict.EasyDict', 'edict', ([], {}), '()\n', (581...
import asyncio import datetime import logging from logging.handlers import TimedRotatingFileHandler import os import gzip from collections import OrderedDict, UserList from copy import deepcopy from dataclasses import dataclass from enum import Enum from functools import partial from itertools import chain from threadi...
[ "functools.partial", "os.remove", "copy.deepcopy", "gzip.open", "os.makedirs", "logging.basicConfig", "asyncio.get_event_loop", "logging.error", "os.rename", "types.MethodType", "os.path.exists", "asyncio.ensure_future", "datetime.datetime.now", "logging.Formatter", "logging.handlers.Tim...
[((967, 1004), 'os.path.join', 'os.path.join', (['log_folder', 'logger_name'], {}), '(log_folder, logger_name)\n', (979, 1004), False, 'import os\n'), ((1081, 1111), 'logging.getLogger', 'logging.getLogger', (['logger_name'], {}), '(logger_name)\n', (1098, 1111), False, 'import logging\n'), ((1347, 1390), 'logging.hand...
import os import dateparser import requests import pandas as pd from bs4 import BeautifulSoup from utils import ( get_timestr, load_sources, write_sources, load_datafile, write_datafile, ) def fmt_date(datestr): fmt = dateparser.parse( str(datestr), date_formats=[ "...
[ "pandas.DataFrame", "utils.write_sources", "utils.write_datafile", "utils.get_timestr", "os.path.basename", "pandas.merge", "utils.load_sources", "pandas.read_excel", "pandas.to_datetime", "requests.get", "bs4.BeautifulSoup", "pandas.concat", "utils.load_datafile" ]
[((577, 590), 'utils.get_timestr', 'get_timestr', ([], {}), '()\n', (588, 590), False, 'from utils import get_timestr, load_sources, write_sources, load_datafile, write_datafile\n'), ((1037, 1066), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'columns'}), '(columns=columns)\n', (1049, 1066), True, 'import panda...
#!/usr/bin/python # -*- coding: utf-8 -*- """ MIT License Copyright (c) 2013-2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without...
[ "SaveDialog.SaveDialog.initConections", "IconController.IconController", "PyQt4.QtGui.QLineEdit", "PyQt4.QtGui.QIcon", "PyQt4.QtGui.QComboBox", "logging.info", "TransController.tr", "SaveDialog.SaveDialog.initUi", "PyQt4.QtGui.QPixmap" ]
[((1668, 1691), 'SaveDialog.SaveDialog.initUi', 'SaveDialog.initUi', (['self'], {}), '(self)\n', (1685, 1691), False, 'from SaveDialog import SaveDialog\n'), ((1709, 1752), 'logging.info', 'logging.info', (['"""initializing UI components."""'], {}), "('initializing UI components.')\n", (1721, 1752), False, 'import logg...
""" .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | ...
[ "os.mkdir", "benedict.load_yaml_str", "os.path.exists", "datetime.datetime.now", "os.path.isfile", "shutil.move", "os.path.join", "os.listdir" ]
[((2247, 2272), 'os.listdir', 'os.listdir', (['LOG_FILES_DIR'], {}), '(LOG_FILES_DIR)\n', (2257, 2272), False, 'import os\n'), ((4734, 4777), 'benedict.load_yaml_str', 'benedict.load_yaml_str', (['logging_config_YAML'], {}), '(logging_config_YAML)\n', (4756, 4777), False, 'import benedict\n'), ((1791, 1805), 'datetime....
from dataclasses import dataclass from dietr.database import database @dataclass class Allergy: id: int name: str class AllergyModel: def add_allergy(self, name): """Add an allergy to the database.""" query = '''INSERT INTO allergies (name) VALUES (%s)''' dat...
[ "dietr.database.database.commit", "dietr.database.database.fetch", "dietr.database.database.fetch_all" ]
[((317, 345), 'dietr.database.database.commit', 'database.commit', (['query', 'name'], {}), '(query, name)\n', (332, 345), False, 'from dietr.database import database\n'), ((519, 545), 'dietr.database.database.commit', 'database.commit', (['query', 'id'], {}), '(query, id)\n', (534, 545), False, 'from dietr.database im...
""" Define different signals for progress updates """ from PySide2.QtCore import QObject, Signal from vsutillib.pyqt import DualProgressBar, QFormatLabel class Progress(QObject): """ Progress class to connect Signals to DualProgressBar and QFormatLabel classes Args: parent (QWidget): parent wid...
[ "PySide2.QtCore.Signal" ]
[((571, 579), 'PySide2.QtCore.Signal', 'Signal', ([], {}), '()\n', (577, 579), False, 'from PySide2.QtCore import QObject, Signal\n'), ((601, 612), 'PySide2.QtCore.Signal', 'Signal', (['int'], {}), '(int)\n', (607, 612), False, 'from PySide2.QtCore import QObject, Signal\n'), ((631, 647), 'PySide2.QtCore.Signal', 'Sign...
"""Test ``dynamodb_serialise``.""" # TODO: more comprehensive testing import dynamodb_serialise def test_deserialisation(): assert dynamodb_serialise.deserialise( {"M": {"foo": {"N": "42"}, "bar": {"B": "c3BhbQ=="}}} ) == {'foo': 42, 'bar': b'spam'} def test_serialisation(): assert dynamodb_se...
[ "dynamodb_serialise.serialise", "dynamodb_serialise.deserialise" ]
[((139, 228), 'dynamodb_serialise.deserialise', 'dynamodb_serialise.deserialise', (["{'M': {'foo': {'N': '42'}, 'bar': {'B': 'c3BhbQ=='}}}"], {}), "({'M': {'foo': {'N': '42'}, 'bar': {'B':\n 'c3BhbQ=='}}})\n", (169, 228), False, 'import dynamodb_serialise\n'), ((309, 388), 'dynamodb_serialise.serialise', 'dynamodb_s...
"""Wrapper for the Spades assembler.""" import os import shutil from os.path import join import psutil from .base import BaseAssembler class SpadesAssembler(BaseAssembler): """Wrapper for the Spades assembler.""" def __init__(self, args, cxn, log): """Build the assembler.""" super().__init...
[ "os.cpu_count", "psutil.virtual_memory", "os.path.join", "shutil.move" ]
[((518, 556), 'os.path.join', 'join', (["self.state['iter_dir']", '"""spades"""'], {}), "(self.state['iter_dir'], 'spades')\n", (522, 556), False, 'from os.path import join\n'), ((1684, 1721), 'shutil.move', 'shutil.move', (['src', "self.file['output']"], {}), "(src, self.file['output'])\n", (1695, 1721), False, 'impor...
# -*- coding: utf-8 -*- import logging from threading import Lock from requests import Session, utils from requests.exceptions import Timeout class Request(object): _instance = None _initialized = False _lock = Lock() def __new__(cls, *args, **kwargs): # override method to implement singleto...
[ "threading.Lock", "requests.utils.get_environ_proxies", "requests.Session", "logging.getLogger" ]
[((226, 232), 'threading.Lock', 'Lock', ([], {}), '()\n', (230, 232), False, 'from threading import Lock\n'), ((753, 780), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (770, 780), False, 'import logging\n'), ((808, 817), 'requests.Session', 'Session', ([], {}), '()\n', (815, 817), False...
""" Test for file IO """ from pathlib import Path import numpy as np import pytest import biorbd def test_load_model(): biorbd.Model("../../models/pyomecaman.bioMod") def test_dof_ranges(): m = biorbd.Model("../../models/pyomecaman.bioMod") pi = 3.14159265358979323846 # Pelvis QRanges = m.seg...
[ "numpy.testing.assert_almost_equal", "biorbd.Model", "biorbd.SpatialVector", "numpy.array", "biorbd.currentLinearAlgebraBackend" ]
[((128, 174), 'biorbd.Model', 'biorbd.Model', (['"""../../models/pyomecaman.bioMod"""'], {}), "('../../models/pyomecaman.bioMod')\n", (140, 174), False, 'import biorbd\n'), ((208, 254), 'biorbd.Model', 'biorbd.Model', (['"""../../models/pyomecaman.bioMod"""'], {}), "('../../models/pyomecaman.bioMod')\n", (220, 254), Fa...
from lxml import etree ns = { "alto": "http://www.loc.gov/standards/alto/ns-v2#" } class ALTOResource(object): def __init__(self, xmldoc, image_resolution): self.xmldoc = xmldoc unit = xmldoc.xpath('/alto:alto/alto:Description/alto:MeasurementUnit', namespaces=ns)[0].text xres = image...
[ "lxml.etree.QName" ]
[((2052, 2073), 'lxml.etree.QName', 'etree.QName', (['node.tag'], {}), '(node.tag)\n', (2063, 2073), False, 'from lxml import etree\n')]
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\situations\complex\scarecrow_situation.py # Compiled at: 2018-05-15 00:33:09 # Size of source mod 2*...
[ "services.sim_info_manager", "interactions.utils.loot.LootActions.TunableReference", "event_testing.resolver.SingleObjectResolver", "situations.situation_job.SituationJob.TunableReference", "_functools.partial", "situations.situation_complex.TunableInteractionOfInterest", "_sims4_collections.frozendict"...
[((1356, 1531), 'role.role_state.RoleState.TunableReference', 'RoleState.TunableReference', ([], {'description': '"""\n The role the Sim has while in this state.\n \n This is the initial state.\n """'}), '(description=\n """\n The role the Sim has while in this ...
import numpy import warnings from scipy.interpolate import interp1d from sklearn.exceptions import ConvergenceWarning from sklearn.utils import check_random_state from ..metrics import dtw_path from ..utils import to_time_series_dataset, ts_size from .utils import _set_weights __author__ = '<NAME> <EMAIL>ain.tavenard...
[ "sklearn.utils.check_random_state", "numpy.average", "numpy.zeros", "numpy.linalg.norm", "numpy.linspace", "numpy.diag", "warnings.warn", "numpy.nanmean" ]
[((1286, 1329), 'numpy.zeros', 'numpy.zeros', (['(barycenter_size, X.shape[-1])'], {}), '((barycenter_size, X.shape[-1]))\n', (1297, 1329), False, 'import numpy\n'), ((10219, 10249), 'numpy.zeros', 'numpy.zeros', (['list_v_k[0].shape'], {}), '(list_v_k[0].shape)\n', (10230, 10249), False, 'import numpy\n'), ((11195, 11...
import os import sys import zipfile # TODO mozliwosc wskazania konkretnego pliku/katalogu z procedurami w name # TODO default paths - smash proc dir, local dir, local proc dir, zip files? paths = ['./proc'] def get(name): n = name+'.smash' for p in paths: if p.endswith('.zip'): z=zipfile.ZipFile(p) if n in...
[ "os.path.join", "zipfile.ZipFile", "os.listdir" ]
[((291, 309), 'zipfile.ZipFile', 'zipfile.ZipFile', (['p'], {}), '(p)\n', (306, 309), False, 'import zipfile\n'), ((382, 395), 'os.listdir', 'os.listdir', (['p'], {}), '(p)\n', (392, 395), False, 'import os\n'), ((406, 424), 'os.path.join', 'os.path.join', (['p', 'n'], {}), '(p, n)\n', (418, 424), False, 'import os\n')...
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ "absl.testing.absltest.main", "jax.vmap", "jax.lax.tie_in", "jax.core.Primitive", "jax.random.normal", "jax.numpy.dot", "jax.numpy.arange", "oryx.core.state.api.init", "jax.random.PRNGKey", "oryx.core.state.module.assign", "jax.numpy.ones", "jax.numpy.zeros", "oryx.core.state.api.spec" ]
[((1059, 1093), 'jax.core.Primitive', 'jax_core.Primitive', (['"""training_add"""'], {}), "('training_add')\n", (1077, 1093), True, 'from jax import core as jax_core\n'), ((7881, 7896), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (7894, 7896), False, 'from absl.testing import absltest\n'), ((1606, ...
import argparse import subprocess import setup_utils import os import sys if sys.version_info[0] < 3: raise Exception('Must be using Python 3. Current=' + str(sys.version_info)) description = """ This is a simple python script to start the different tasks (e.g., test, publish, linters...). We use this so that w...
[ "os.remove", "argparse.ArgumentParser", "os.rename", "setup_utils.get_project_name", "subprocess.call", "os.path.join" ]
[((3459, 3507), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'description'}), '(description=description)\n', (3482, 3507), False, 'import argparse\n'), ((687, 717), 'setup_utils.get_project_name', 'setup_utils.get_project_name', ([], {}), '()\n', (715, 717), False, 'import setup_utils\n'),...
import unittest from features.stochastic_ray_tracing.main import STRRelaxRender class TestSTRRelaxRender(unittest.TestCase): def test_render(self): test = STRRelaxRender() test.render()
[ "features.stochastic_ray_tracing.main.STRRelaxRender" ]
[((169, 185), 'features.stochastic_ray_tracing.main.STRRelaxRender', 'STRRelaxRender', ([], {}), '()\n', (183, 185), False, 'from features.stochastic_ray_tracing.main import STRRelaxRender\n')]
from django.shortcuts import render from rest_framework.response import Response from rest_framework import generics, status from workrecords.models import Work, PersonChoises from django.contrib.auth import get_user_model from workrecords.serializers import WorkSerializer, WorkCreateSerializer from Users.serializers i...
[ "workrecords.models.PersonChoises.objects.get", "workrecords.models.PersonChoises.objects.all", "Users.utils.getStats.calculate_stats", "django.contrib.auth.get_user_model", "rest_framework.response.Response", "workrecords.models.Work.objects.all" ]
[((971, 989), 'workrecords.models.Work.objects.all', 'Work.objects.all', ([], {}), '()\n', (987, 989), False, 'from workrecords.models import Work, PersonChoises\n'), ((1485, 1526), 'Users.utils.getStats.calculate_stats', 'getStats.calculate_stats', (['serializer.data'], {}), '(serializer.data)\n', (1509, 1526), False,...
import sys import os g_cnt = 0 def md2pdf(src_name): dst_name = '"' + src_name.replace('.md', '.pdf') + '"' src_name = '"' + src_name + '"' cmd = 'pandoc -N -s --toc --pdf-engine=xelatex -o {} --template=template.tex {}'.format(dst_name, src_name) print(cmd) os.system(cmd) print('finish transf...
[ "os.path.isdir", "os.system", "os.listdir" ]
[((281, 295), 'os.system', 'os.system', (['cmd'], {}), '(cmd)\n', (290, 295), False, 'import os\n'), ((577, 591), 'os.system', 'os.system', (['cmd'], {}), '(cmd)\n', (586, 591), False, 'import os\n'), ((820, 839), 'os.path.isdir', 'os.path.isdir', (['path'], {}), '(path)\n', (833, 839), False, 'import os\n'), ((860, 87...
import unittest import os from programytest.aiml_tests.client import TestClient from programy.config.sections.brain.file import BrainFileConfiguration class BasicTestClient(TestClient): def __init__(self): TestClient.__init__(self) def load_configuration(self, arguments): super(BasicTestClien...
[ "programytest.aiml_tests.client.TestClient.__init__", "os.path.dirname" ]
[((220, 245), 'programytest.aiml_tests.client.TestClient.__init__', 'TestClient.__init__', (['self'], {}), '(self)\n', (239, 245), False, 'from programytest.aiml_tests.client import TestClient\n'), ((433, 458), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (448, 458), False, 'import os\n'), ...
#!python3 """ Demonstration of a trade-reduction strongly-budget-balanced auction for a multi-lateral market with buyers, mediators and sellers (recipe: 1,1,1) Since: 2019-08 Author: <NAME> """ import sys, os; sys.path.insert(0, os.path.abspath('..')) from markets import Market from agents import AgentCategory im...
[ "trade_reduction_protocol.budget_balanced_trade_reduction", "os.path.abspath", "agents.AgentCategory", "trade_reduction_protocol.logger.setLevel" ]
[((435, 489), 'trade_reduction_protocol.logger.setLevel', 'trade_reduction_protocol.logger.setLevel', (['logging.INFO'], {}), '(logging.INFO)\n', (475, 489), False, 'import trade_reduction_protocol\n'), ((233, 254), 'os.path.abspath', 'os.path.abspath', (['""".."""'], {}), "('..')\n", (248, 254), False, 'import sys, os...
"""Main entry point for all pyfgaws tools.""" import logging import sys from typing import Any from typing import Callable from typing import Dict from typing import List import defopt import json from pyfgaws.batch.tools import run_job from pyfgaws.batch.tools import watch_job from pyfgaws.batch import Status from ...
[ "pyfgaws.batch.Status.from_string", "json.loads", "logging.getLogger" ]
[((757, 775), 'json.loads', 'json.loads', (['string'], {}), '(string)\n', (767, 775), False, 'import json\n'), ((1473, 1500), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1490, 1500), False, 'import logging\n'), ((1245, 1263), 'json.loads', 'json.loads', (['string'], {}), '(string)\n',...
from gevent import monkey monkey.patch_all() from gevent.pool import Pool from queue import Queue import schedule import time from core.db.mongo_pool import MongoPool from core.proxy_validate.httpbin_validator import check_proxy from settings import MAX_SCORE, TEST_PROXIES_ASYNC_COUNT, TEST_PROXIES_INTERVAL class...
[ "schedule.run_pending", "gevent.pool.Pool", "core.proxy_validate.httpbin_validator.check_proxy", "gevent.monkey.patch_all", "core.db.mongo_pool.MongoPool", "time.sleep", "schedule.every", "queue.Queue" ]
[((27, 45), 'gevent.monkey.patch_all', 'monkey.patch_all', ([], {}), '()\n', (43, 45), False, 'from gevent import monkey\n'), ((393, 404), 'core.db.mongo_pool.MongoPool', 'MongoPool', ([], {}), '()\n', (402, 404), False, 'from core.db.mongo_pool import MongoPool\n'), ((426, 433), 'queue.Queue', 'Queue', ([], {}), '()\n...
import socket import traceback from Crypto.PublicKey import RSA from PyQt5.QtCore import QThread, pyqtSignal, pyqtSlot from .connection import Address from .exceptions import ConnectionClosed from .message import Message, MessageReader class ServerThread(QThread): """A thread that is responsible for handling inco...
[ "PyQt5.QtCore.pyqtSignal", "socket.socket", "traceback.print_exc", "PyQt5.QtCore.pyqtSlot" ]
[((371, 390), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['Address'], {}), '(Address)\n', (381, 390), False, 'from PyQt5.QtCore import QThread, pyqtSignal, pyqtSlot\n'), ((404, 426), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['RSA.RsaKey'], {}), '(RSA.RsaKey)\n', (414, 426), False, 'from PyQt5.QtCore import QThread, pyq...
# Generated by Django 3.0.4 on 2020-04-15 22:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0009_auto_20200307_1944'), ] operations = [ migrations.RemoveField( model_name='order', name='customer', ...
[ "django.db.migrations.RemoveField", "django.db.migrations.DeleteModel" ]
[((228, 287), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""order"""', 'name': '"""customer"""'}), "(model_name='order', name='customer')\n", (250, 287), False, 'from django.db import migrations\n'), ((332, 390), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], ...
import numpy as np import matplotlib.pyplot as plt from keras.models import load_model from audio import spec2wav, wav2spec, read_wav, write_wav def save_spec(spec, file, invert=False): if invert: spec = np.swapaxes(spec, 0, 1) plt.pcolormesh(spec) plt.ylabel('Frequency') plt.xlabel('Time') ...
[ "keras.models.load_model", "numpy.load", "numpy.nan_to_num", "matplotlib.pyplot.clf", "numpy.swapaxes", "matplotlib.pyplot.pcolormesh", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig" ]
[((248, 268), 'matplotlib.pyplot.pcolormesh', 'plt.pcolormesh', (['spec'], {}), '(spec)\n', (262, 268), True, 'import matplotlib.pyplot as plt\n'), ((273, 296), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""Frequency"""'], {}), "('Frequency')\n", (283, 296), True, 'import matplotlib.pyplot as plt\n'), ((301, 319), 'm...
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import h2o from h2o.estimators import H2OGeneralizedLinearEstimator from h2o.exceptions import H2OTypeError from tests import pyunit_utils def test_glm_params(): H2OGeneralizedLinear...
[ "h2o.H2OFrame.from_python", "tests.pyunit_utils.standalone_test", "h2o.estimators.H2OGeneralizedLinearEstimator" ]
[((300, 331), 'h2o.estimators.H2OGeneralizedLinearEstimator', 'H2OGeneralizedLinearEstimator', ([], {}), '()\n', (329, 331), False, 'from h2o.estimators import H2OGeneralizedLinearEstimator\n'), ((336, 397), 'h2o.estimators.H2OGeneralizedLinearEstimator', 'H2OGeneralizedLinearEstimator', ([], {'nfolds': '(5)', 'seed': ...
# 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, software # distributed under t...
[ "pytorch_lightning.Trainer", "torchdyn.DataControl", "torch.nn.Tanh", "torch.manual_seed", "torchdyn.DepthCat", "torch.cuda.is_available", "torch.nn.Linear", "torch.linspace", "pytest.mark.skip" ]
[((781, 816), 'torch.manual_seed', 'torch.manual_seed', (['(1415112413244349)'], {}), '(1415112413244349)\n', (798, 816), False, 'import torch\n'), ((819, 837), 'pytest.mark.skip', 'pytest.mark.skip', ([], {}), '()\n', (835, 837), False, 'import pytest\n'), ((1538, 1556), 'pytest.mark.skip', 'pytest.mark.skip', ([], {}...
# Should be removed after full split code to cloudify-utilities-plugins-sdk # Copyright (c) 2017-2018 Cloudify Platform Ltd. 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 ...
[ "unittest.main", "mock.call", "mock.mock_open", "mock.patch", "cloudify_terminal_sdk.terminal_connection.RawConnection", "mock.Mock", "mock.MagicMock" ]
[((18036, 18051), 'unittest.main', 'unittest.main', ([], {}), '()\n', (18049, 18051), False, 'import unittest\n'), ((1096, 1107), 'mock.MagicMock', 'MagicMock', ([], {}), '()\n', (1105, 1107), False, 'from mock import MagicMock, patch, mock_open, Mock, call\n'), ((1134, 1165), 'mock.patch', 'patch', (['"""time.sleep"""...