code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import numpy as np from gym import spaces from gym import Env class ObservedPointEnv(Env): """ point mass on a 2-D plane four tasks: move to (-10, -10), (-10, 10), (10, -10), (10, 10) Problem 1: augment the observation with a one-hot vector encoding the task ID - change the dimension of the obse...
[ "numpy.array", "gym.spaces.Box" ]
[((886, 964), 'gym.spaces.Box', 'spaces.Box', ([], {'low': '(-np.inf)', 'high': 'np.inf', 'shape': '(2 + num_tasks,)', 'dtype': 'np.float32'}), '(low=-np.inf, high=np.inf, shape=(2 + num_tasks,), dtype=np.float32)\n', (896, 964), False, 'from gym import spaces\n'), ((1125, 1185), 'gym.spaces.Box', 'spaces.Box', ([], {'...
# Copyright 2020 Stanford University, Los Alamos National Laboratory # # 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 ...
[ "flexflow.core.flexflow_type.str_to_enum", "flexflow.torch.fx.torch_to_flexflow_str" ]
[((15824, 15855), 'flexflow.torch.fx.torch_to_flexflow_str', 'fx.torch_to_flexflow_str', (['model'], {}), '(model)\n', (15848, 15855), True, 'import flexflow.torch.fx as fx\n'), ((2027, 2056), 'flexflow.core.flexflow_type.str_to_enum', 'str_to_enum', (['OpType', 'items[3]'], {}), '(OpType, items[3])\n', (2038, 2056), F...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ A simple web server which redirects to generate an Anki entry on iOS. """ import argparse import os import sys from urllib.parse import urlencode, quote import argcomplete import bottle import termcolor import jisho from config import Config HERE = os.path.abspath...
[ "bottle.static_file", "termcolor.colored", "argparse.ArgumentParser", "jisho.create_note", "config.Config", "os.path.join", "os.path.dirname", "bottle.view", "argcomplete.autocomplete", "sys.exit", "urllib.parse.urlencode", "jisho.fetch", "bottle.run", "bottle.get" ]
[((417, 450), 'os.path.join', 'os.path.join', (['HERE', '"""config.json"""'], {}), "(HERE, 'config.json')\n", (429, 450), False, 'import os\n'), ((466, 494), 'os.path.join', 'os.path.join', (['HERE', '"""static"""'], {}), "(HERE, 'static')\n", (478, 494), False, 'import os\n'), ((321, 346), 'os.path.dirname', 'os.path....
from __future__ import unicode_literals from utils import CanadianJurisdiction from pupa.scrape import Organization class Oshawa(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/csd:3518013' division_name = 'Oshawa' name = 'Oshawa City Council' url = 'ht...
[ "pupa.scrape.Organization" ]
[((397, 456), 'pupa.scrape.Organization', 'Organization', (['self.name'], {'classification': 'self.classification'}), '(self.name, classification=self.classification)\n', (409, 456), False, 'from pupa.scrape import Organization\n')]
import os from mindware.components.feature_engineering.transformations.base_transformer import Transformer from mindware.components.utils.class_loader import find_components, ThirdPartyComponents """ Load the buildin classifiers. """ generator_directory = os.path.split(__file__)[0] _generator = find_components(__packa...
[ "mindware.components.utils.class_loader.ThirdPartyComponents", "mindware.components.utils.class_loader.find_components", "os.path.split" ]
[((297, 359), 'mindware.components.utils.class_loader.find_components', 'find_components', (['__package__', 'generator_directory', 'Transformer'], {}), '(__package__, generator_directory, Transformer)\n', (312, 359), False, 'from mindware.components.utils.class_loader import find_components, ThirdPartyComponents\n'), (...
import mock from mock import MagicMock from mock import patch import os import sys import unittest sys.path.append(os.path.abspath(os.path.join( os.path.dirname(__file__), '..'))) import metricinga from metricinga import Metric class MetricTestCase(unittest.TestCase): """Run unit tests for the Metric cla...
[ "os.path.dirname", "metricinga.Metric" ]
[((610, 648), 'metricinga.Metric', 'Metric', (['path', 'timestamp', 'value', 'source'], {}), '(path, timestamp, value, source)\n', (616, 648), False, 'from metricinga import Metric\n'), ((866, 932), 'metricinga.Metric', 'Metric', ([], {'path': 'path', 'timestamp': 'timestamp', 'value': 'value', 'source': 'source'}), '(...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- File Name:mnist_softmax Description : softmax 实现 minst 预测 使用了 sklearn 的 one-hot 编码 参考: https://ask.hellobi.com/blog/DataMiner/4897 Email : <EMAIL> Date:18-1-13 """ import matplotlib.pyplot as plt impo...
[ "tensorflow.equal", "tensorflow.nn.softmax", "tensorflow.log", "numpy.mean", "tensorflow.placeholder", "tensorflow.Session", "matplotlib.pyplot.style.use", "tensorflow.matmul", "tensorflow.zeros", "sklearn.model_selection.train_test_split", "tensorflow.train.GradientDescentOptimizer", "matplot...
[((551, 564), 'numpy.zeros', 'np.zeros', (['dim'], {}), '(dim)\n', (559, 564), True, 'import numpy as np\n'), ((736, 787), 'tensorflow.placeholder', 'tf.placeholder', (['data_type'], {'shape': '[None, n_features]'}), '(data_type, shape=[None, n_features])\n', (750, 787), True, 'import tensorflow as tf\n'), ((796, 844),...
"""Test reading c-strings from memory via SB API.""" import os import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestReadMemCString(TestBase): mydir = TestBase.compute_mydir(__file__) NO_DEBUG_INFO_TESTCASE = True def te...
[ "lldb.SBError", "lldbsuite.test.lldbutil.run_to_source_breakpoint", "lldb.SBFileSpec" ]
[((679, 717), 'lldb.SBFileSpec', 'lldb.SBFileSpec', (['self.main_source_path'], {}), '(self.main_source_path)\n', (694, 717), False, 'import lldb\n'), ((822, 924), 'lldbsuite.test.lldbutil.run_to_source_breakpoint', 'lldbutil.run_to_source_breakpoint', (['self', '"""breakpoint here"""', 'self.main_source_spec', 'None',...
import stripe from django.conf import settings from django.contrib.auth.models import User from django.http import Http404 from django.shortcuts import render from django.core.exceptions import ValidationError from rest_framework import status, authentication, permissions from rest_framework.decorators import ( ap...
[ "rest_framework.decorators.permission_classes", "rest_framework.decorators.authentication_classes", "django.core.exceptions.ValidationError", "rest_framework.response.Response", "django.contrib.auth.models.User.objects.get", "rest_framework.decorators.api_view" ]
[((609, 627), 'rest_framework.decorators.api_view', 'api_view', (["['POST']"], {}), "(['POST'])\n", (617, 627), False, 'from rest_framework.decorators import api_view, authentication_classes, permission_classes\n'), ((629, 689), 'rest_framework.decorators.authentication_classes', 'authentication_classes', (['[authentic...
import frappe class ItemVariantsCacheManager: def __init__(self, item_code): self.item_code = item_code def get_item_variants_data(self): val = frappe.cache().hget('item_variants_data', self.item_code) if not val: self.build_cache() return frappe.cache().hget('item_variants_data', self.item_code) de...
[ "frappe.cache", "frappe._dict", "frappe.db.get_all", "frappe.enqueue" ]
[((3711, 3773), 'frappe.enqueue', 'frappe.enqueue', (['build_cache'], {'item_code': 'item_code', 'queue': '"""long"""'}), "(build_cache, item_code=item_code, queue='long')\n", (3725, 3773), False, 'import frappe\n'), ((1132, 1235), 'frappe.db.get_all', 'frappe.db.get_all', (['"""Item Attribute Value"""', "['attribute_v...
"""Utility file to trigger unknown package ingestion.""" import logging import os from collections import namedtuple from typing import Set from requests_futures.sessions import FuturesSession logger = logging.getLogger(__name__) _INGESTION_API_URL = "http://{host}:{port}/{endpoint}".format( host=os.environ.get(...
[ "logging.getLogger", "collections.namedtuple", "requests_futures.sessions.FuturesSession", "os.environ.get" ]
[((204, 231), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (221, 231), False, 'import logging\n'), ((475, 491), 'requests_futures.sessions.FuturesSession', 'FuturesSession', ([], {}), '()\n', (489, 491), False, 'from requests_futures.sessions import FuturesSession\n'), ((502, 547), 'col...
import DOM class UIObject: def getElement(self): return self.element def setElement(self, element): self.element = element def setStyleName(self, style): DOM.setAttribute(self.element, "className", style) class Widget(UIObject): def setParent(self, parent): self.pa...
[ "DOM.setAttribute", "DOM.createButton" ]
[((194, 244), 'DOM.setAttribute', 'DOM.setAttribute', (['self.element', '"""className"""', 'style'], {}), "(self.element, 'className', style)\n", (210, 244), False, 'import DOM\n'), ((719, 737), 'DOM.createButton', 'DOM.createButton', ([], {}), '()\n', (735, 737), False, 'import DOM\n')]
import pygame import os import time import random pygame.font.init() #Fenstergröße WIDTH, HEIGHT = 750, 750 WIN = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Space Attack") #Hintergrund BG = pygame.transform.scale(pygame.image.load(os.path.join("assets","bg_02_h.png")),(WIDTH, HEIGH...
[ "random.choice", "pygame.mask.from_surface", "pygame.event.get", "random.randrange", "pygame.display.set_mode", "os.path.join", "pygame.time.Clock", "pygame.key.get_pressed", "pygame.font.init", "pygame.display.set_caption", "pygame.display.update", "pygame.font.SysFont" ]
[((54, 72), 'pygame.font.init', 'pygame.font.init', ([], {}), '()\n', (70, 72), False, 'import pygame\n'), ((121, 161), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(WIDTH, HEIGHT)'], {}), '((WIDTH, HEIGHT))\n', (144, 161), False, 'import pygame\n'), ((163, 205), 'pygame.display.set_caption', 'pygame.displa...
import torch from argus import Model from argus.utils import deep_detach, deep_to from src.models import resnet from src.models import senet from src.models.feature_extractor import FeatureExtractor from src.models.simple_kaggle import SimpleKaggle from src.models.simple_attention import SimpleAttention from src.mode...
[ "argus.utils.deep_detach", "argus.utils.deep_to", "torch.no_grad" ]
[((1996, 2037), 'argus.utils.deep_to', 'deep_to', (['input', 'device'], {'non_blocking': '(True)'}), '(input, device, non_blocking=True)\n', (2003, 2037), False, 'from argus.utils import deep_detach, deep_to\n'), ((2055, 2097), 'argus.utils.deep_to', 'deep_to', (['target', 'device'], {'non_blocking': '(True)'}), '(targ...
# -*- coding: utf-8 -*- """ Created on Fri Mar 15 21:09:13 2019 @author: <NAME> """ from nltk.corpus import stopwords from pymystem3 import Mystem from string import punctuation #This function lemmatizes and gets rid of punctuation def preprocess_text(text): mystem = Mystem() rs = '' for x in stopwords.w...
[ "pandas.Series", "os.listdir", "nltk.corpus.stopwords.words", "gensim.corpora.Dictionary", "gensim.models.ldamodel.LdaModel", "os.chdir", "pymystem3.Mystem", "gensim.models.TfidfModel" ]
[((1840, 1857), 'gensim.corpora.Dictionary', 'Dictionary', (['files'], {}), '(files)\n', (1850, 1857), False, 'from gensim.corpora import Dictionary\n'), ((2206, 2315), 'gensim.models.ldamodel.LdaModel', 'gensim.models.ldamodel.LdaModel', (['bow_corp'], {'num_topics': '(200)', 'id2word': 'dictionary', 'update_every': '...
import pytest from uint import Uint def test_positive_overflow(): u = Uint(0b11111111, 8) u += 1 assert u.raw == 0b00000000 def test_negative_overflow(): u = Uint(0b00000000, 8) u -= 1 assert u.raw == 0b11111111 def test_logical_shift(): u = Uint(0b10100101, 8) u <<= 1 assert u...
[ "pytest.raises", "uint.Uint" ]
[((76, 88), 'uint.Uint', 'Uint', (['(255)', '(8)'], {}), '(255, 8)\n', (80, 88), False, 'from uint import Uint\n'), ((178, 188), 'uint.Uint', 'Uint', (['(0)', '(8)'], {}), '(0, 8)\n', (182, 188), False, 'from uint import Uint\n'), ((276, 288), 'uint.Uint', 'Uint', (['(165)', '(8)'], {}), '(165, 8)\n', (280, 288), False...
import os import pytest from syntaxerrors import pyparse from syntaxerrors.parser import MultipleParseError srcdir = os.path.dirname(pyparse.__file__) def test_simple(): info = pyparse.CompileInfo("<string>", "exec") p = pyparse.PythonParser() st = p.parse_source(b"x = 1\n", info) def test_parse_all():...
[ "syntaxerrors.pyparse.PythonParser", "syntaxerrors.pyparse.CompileInfo", "os.listdir", "os.path.join", "os.path.dirname" ]
[((120, 153), 'os.path.dirname', 'os.path.dirname', (['pyparse.__file__'], {}), '(pyparse.__file__)\n', (135, 153), False, 'import os\n'), ((185, 224), 'syntaxerrors.pyparse.CompileInfo', 'pyparse.CompileInfo', (['"""<string>"""', '"""exec"""'], {}), "('<string>', 'exec')\n", (204, 224), False, 'from syntaxerrors impor...
#!/usr/bin/env python import sys, os import gdal import numpy as np from gdalconst import GDT_Float32 from osgeo import osr from netCDF4 import Dataset def createImgCAMS(inputPath): driver = gdal.GetDriverByName('GTiff') ncfile = Dataset(inputPath, 'r') data = ncfile.variables['so2_conc'][:] xSi...
[ "os.path.exists", "numpy.amin", "gdal.GetDriverByName", "osgeo.osr.SpatialReference", "netCDF4.Dataset", "sys.exit", "numpy.amax" ]
[((197, 226), 'gdal.GetDriverByName', 'gdal.GetDriverByName', (['"""GTiff"""'], {}), "('GTiff')\n", (217, 226), False, 'import gdal\n'), ((245, 268), 'netCDF4.Dataset', 'Dataset', (['inputPath', '"""r"""'], {}), "(inputPath, 'r')\n", (252, 268), False, 'from netCDF4 import Dataset\n'), ((2320, 2375), 'sys.exit', 'sys.e...
from __future__ import unicode_literals from rest_framework import viewsets, permissions, exceptions from nodeconductor.core.filters import DjangoMappingFilterBackend from nodeconductor.cost_tracking import models, serializers, filters from nodeconductor.structure import models as structure_models class PriceEditPe...
[ "nodeconductor.cost_tracking.models.DefaultPriceListItem.objects.all", "nodeconductor.cost_tracking.models.PriceEstimate.objects.filtered_for_user", "rest_framework.exceptions.MethodNotAllowed", "rest_framework.exceptions.PermissionDenied", "nodeconductor.cost_tracking.models.PriceListItem.objects.all", "...
[((770, 804), 'nodeconductor.cost_tracking.models.PriceEstimate.objects.all', 'models.PriceEstimate.objects.all', ([], {}), '()\n', (802, 804), False, 'from nodeconductor.cost_tracking import models, serializers, filters\n'), ((2324, 2358), 'nodeconductor.cost_tracking.models.PriceListItem.objects.all', 'models.PriceLi...
from printer import Printer, PrinterError from unittest import TestCase class TestPrinter(TestCase): def setUp(self): self.printer = Printer(pages_per_s=2.0, capacity=300) def test_print_within_capacity(self): self.printer.print(25)
[ "printer.Printer" ]
[((147, 185), 'printer.Printer', 'Printer', ([], {'pages_per_s': '(2.0)', 'capacity': '(300)'}), '(pages_per_s=2.0, capacity=300)\n', (154, 185), False, 'from printer import Printer, PrinterError\n')]
from tests import run_main_and_assert FAST_LOCAL_TEST_ARGS = "--exp-name local_test --datasets mnist" \ " --network LeNet --num-tasks 3 --seed 1 --batch-size 32" \ " --nepochs 3" \ " --num-workers 0" \ " --approach mas" def t...
[ "tests.run_main_and_assert" ]
[((353, 394), 'tests.run_main_and_assert', 'run_main_and_assert', (['FAST_LOCAL_TEST_ARGS'], {}), '(FAST_LOCAL_TEST_ARGS)\n', (372, 394), False, 'from tests import run_main_and_assert\n'), ((509, 539), 'tests.run_main_and_assert', 'run_main_and_assert', (['args_line'], {}), '(args_line)\n', (528, 539), False, 'from tes...
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='info-detail-prod']/h1[@class='name']", 'price' : "//div[@class='price-old-sale']/span[@class='price']|//div[@class='pric...
[ "scrapy.linkextractors.LinkExtractor" ]
[((883, 918), 'scrapy.linkextractors.LinkExtractor', 'LinkExtractor', ([], {'allow': "['/san-pham/']"}), "(allow=['/san-pham/'])\n", (896, 918), False, 'from scrapy.linkextractors import LinkExtractor\n'), ((944, 981), 'scrapy.linkextractors.LinkExtractor', 'LinkExtractor', ([], {'allow': "['/chuyen-muc/']"}), "(allow=...
from django.db import models # Create your models here. class Class(models.Model): name = models.CharField(max_length=15) def __str__(self): return self.name class NickClass(models.Model): nick_name = models.CharField(max_length=15) class_id = models.ForeignKey(Class, on_delete=models.CASC...
[ "django.db.models.BigIntegerField", "django.db.models.IntegerField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((97, 128), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(15)'}), '(max_length=15)\n', (113, 128), False, 'from django.db import models\n'), ((227, 258), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(15)'}), '(max_length=15)\n', (243, 258), False, 'from django.db imp...
import io import csv import json import logging import hashlib from django.utils.html import escape from dojo.models import Finding logger = logging.getLogger(__name__) class TwistlockCSVParser(object): def get_field_from_row_or_default(self, row, column, default_value): field = row[column] if ...
[ "logging.getLogger", "io.StringIO", "django.utils.html.escape", "json.loads" ]
[((143, 170), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (160, 170), False, 'import logging\n'), ((398, 411), 'django.utils.html.escape', 'escape', (['field'], {}), '(field)\n', (404, 411), False, 'from django.utils.html import escape\n'), ((2718, 2738), 'io.StringIO', 'io.StringIO', ...
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "argparse.ArgumentParser" ]
[((1882, 1985), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'argparse.RawDescriptionHelpFormatter'}), '(description=__doc__, formatter_class=argparse.\n RawDescriptionHelpFormatter)\n', (1905, 1985), False, 'import argparse\n')]
# -*- coding: utf-8 -*- # Copyright 2018 <NAME> # # 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 appli...
[ "six.moves.urllib.parse.urlencode", "string.Formatter" ]
[((912, 929), 'string.Formatter', 'StringFormatter', ([], {}), '()\n', (927, 929), True, 'from string import Formatter as StringFormatter\n'), ((2140, 2163), 'six.moves.urllib.parse.urlencode', 'urlencode', (['query_kwargs'], {}), '(query_kwargs)\n', (2149, 2163), False, 'from six.moves.urllib.parse import urlencode\n'...
"""Methods for geodetic calculations.""" import os import numpy import srtm import geopy from geopy.distance import GeodesicDistance from gewittergefahr.gg_utils import longitude_conversion as lng_conversion from gewittergefahr.gg_utils import file_system_utils from gewittergefahr.gg_utils import error_checking RADIA...
[ "gewittergefahr.gg_utils.error_checking.assert_is_valid_lat_numpy_array", "numpy.sqrt", "gewittergefahr.gg_utils.error_checking.assert_is_numpy_array_without_nan", "gewittergefahr.gg_utils.error_checking.assert_is_real_numpy_array", "numpy.invert", "numpy.nanmean", "numpy.array", "numpy.arctan2", "n...
[((4674, 4730), 'gewittergefahr.gg_utils.error_checking.assert_is_real_numpy_array', 'error_checking.assert_is_real_numpy_array', (['latitudes_deg'], {}), '(latitudes_deg)\n', (4715, 4730), False, 'from gewittergefahr.gg_utils import error_checking\n'), ((4735, 4804), 'gewittergefahr.gg_utils.error_checking.assert_is_n...
""" This file defines the main object that runs experiments. """ import logging import imp import os import os.path import sys import copy import argparse import threading import time import traceback import matplotlib as mpl sys.path.append('/'.join(str.split(__file__, '/')[:-2])) # Add gps/python to path so that im...
[ "imp.load_source", "time.sleep", "sys.exc_info", "sys.exit", "os.path.exists", "gps.utility.data_logger.DataLogger", "os.listdir", "argparse.ArgumentParser", "gps.agent.ros.agent_ros.AgentROS", "numpy.random.seed", "gps.gui.gps_training_gui.GPSTrainingGUI", "matplotlib.use", "matplotlib.pypl...
[((481, 498), 'matplotlib.use', 'mpl.use', (['"""Qt4Agg"""'], {}), "('Qt4Agg')\n", (488, 498), True, 'import matplotlib as mpl\n'), ((13238, 13316), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Run the Guided Policy Search algorithm."""'}), "(description='Run the Guided Policy Search a...
import asyncio import logging from datetime import datetime, timezone from utils import TwitchHelix, VTBiliDatabase vtlog = logging.getLogger("jobs.twitch") async def find_channel_id(user_id: str, dataset: list): for data in dataset: if data["user_id"] == user_id: return data["id"] async d...
[ "logging.getLogger", "datetime.datetime.strptime" ]
[((126, 158), 'logging.getLogger', 'logging.getLogger', (['"""jobs.twitch"""'], {}), "('jobs.twitch')\n", (143, 158), False, 'import logging\n'), ((2708, 2759), 'datetime.datetime.strptime', 'datetime.strptime', (['start_time', '"""%Y-%m-%dT%H:%M:%SZ"""'], {}), "(start_time, '%Y-%m-%dT%H:%M:%SZ')\n", (2725, 2759), Fals...
# coding=utf-8 # Copyright 2018 The TF-Agents 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...
[ "tf_agents.distributions.masked.MaskedCategorical", "tensorflow.nest.flatten", "tf_agents.trajectories.policy_step.PolicyInfo", "tf_agents.specs.tensor_spec.sample_spec_nest", "tensorflow.zeros_like", "tensorflow.expand_dims", "tensorflow.nest.map_structure", "tf_agents.trajectories.policy_step.Policy...
[((3912, 3957), 'tf_agents.trajectories.policy_step.PolicyStep', 'policy_step.PolicyStep', (['action_', 'policy_state'], {}), '(action_, policy_state)\n', (3934, 3957), False, 'from tf_agents.trajectories import policy_step\n'), ((3057, 3100), 'tf_agents.distributions.masked.MaskedCategorical', 'masked.MaskedCategorica...
# Script Name : nslookup_check.py # Author : <NAME> # Created : 5th January 2012 # Last Modified : # Version : 1.0 # Modifications : # Description : This very simple script opens the file server_list.txt and the does an nslookup for each one to check the DNS entry import subprocess # Import the subp...
[ "subprocess.Popen" ]
[((414, 452), 'subprocess.Popen', 'subprocess.Popen', (["('nslookup ' + server)"], {}), "('nslookup ' + server)\n", (430, 452), False, 'import subprocess\n')]
import pytest from aircraft.deploys.ubuntu.models.v1beta3 import PxeData from aircraft.deploys.ubuntu.models.v1beta3.pxe_data import ( AutoinstallV1InstallerConfigData, LegacyNetbootInstallerConfigData, ) @pytest.fixture def valid_bootfiles_config_data(): return [ { 'client_arch': 7, ...
[ "pytest.raises", "aircraft.deploys.ubuntu.models.v1beta3.PxeData" ]
[((1994, 2019), 'pytest.raises', 'pytest.raises', (['ValueError'], {}), '(ValueError)\n', (2007, 2019), False, 'import pytest\n'), ((2029, 2038), 'aircraft.deploys.ubuntu.models.v1beta3.PxeData', 'PxeData', ([], {}), '()\n', (2036, 2038), False, 'from aircraft.deploys.ubuntu.models.v1beta3 import PxeData\n'), ((2149, 2...
from PyQt5 import QtWidgets, QtGui from .resultviewwindow import ResultViewWindow from ..utils.anisotropy import AnisotropyEvaluator class ShowAnisotropyWindow(ResultViewWindow): anisotropyWidget: AnisotropyEvaluator = None def setupUi(self, Form: QtWidgets.QWidget): self.anisotropyWidget = Anisotro...
[ "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtGui.QIcon" ]
[((385, 408), 'PyQt5.QtWidgets.QVBoxLayout', 'QtWidgets.QVBoxLayout', ([], {}), '()\n', (406, 408), False, 'from PyQt5 import QtWidgets, QtGui\n'), ((692, 729), 'PyQt5.QtGui.QIcon', 'QtGui.QIcon', (['""":/icons/anisotropy.svg"""'], {}), "(':/icons/anisotropy.svg')\n", (703, 729), False, 'from PyQt5 import QtWidgets, Qt...
from time import sleep from pycrunch_trace.client.api import trace def alternative_ways_to_trace(): sleep(0.25) print('You can use Trace object to manually start and stop tracing') print(' Or by applying @trace decorator to the method') print(' See examples bellow') def example_without_decorators():...
[ "pycrunch_trace.client.api.Trace", "pycrunch_trace.client.api.trace", "time.sleep" ]
[((606, 634), 'pycrunch_trace.client.api.trace', 'trace', (['"""this_is_custom_name"""'], {}), "('this_is_custom_name')\n", (611, 634), False, 'from pycrunch_trace.client.api import trace\n'), ((107, 118), 'time.sleep', 'sleep', (['(0.25)'], {}), '(0.25)\n', (112, 118), False, 'from time import sleep\n'), ((383, 390), ...
# This file is part of the P3IV Simulator (https://github.com/fzi-forschungszentrum-informatik/P3IV), # copyright by FZI Forschungszentrum Informatik, licensed under the BSD-3 license (see LICENSE file in main directory) import unittest import numpy as np from p3iv_utils.coordinate_transformation import CoordinateTran...
[ "numpy.ones", "p3iv_visualization.motion.plot_array2d.PlotArray2D", "p3iv_visualization.motion.plot_motion_components.PlotMotionComponents", "numpy.array", "matplotlib.pyplot.figure", "matplotlib.gridspec.GridSpec", "numpy.zeros", "unittest.main", "matplotlib.pyplot.subplot", "matplotlib.pyplot.su...
[((4869, 4884), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4882, 4884), False, 'import unittest\n'), ((717, 735), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(1)'], {}), '(1, 1)\n', (729, 735), True, 'import matplotlib.pyplot as plt\n'), ((748, 776), 'p3iv_visualization.motion.plot_array2d.PlotArr...
from os import stat from typing import List, Set import h5py import kachery_client as kc import numpy as np import spikeextractors as se from .TimeseriesModel_Hdf5.TimeseriesModel_Hdf5 import TimeseriesModel_Hdf5, prepare_timeseries_hdf5_from_recording, set_geom_on_recording class H5RecordingExtractorV1(se.Recordin...
[ "spikeextractors.RecordingExtractor.__init__" ]
[((452, 488), 'spikeextractors.RecordingExtractor.__init__', 'se.RecordingExtractor.__init__', (['self'], {}), '(self)\n', (482, 488), True, 'import spikeextractors as se\n')]
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'login.ui' # # Created by: PyQt5 View code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGu...
[ "PyQt5.QtGui.QFont", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QFrame", "PyQt5.QtGui.QCursor", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QLineEdit", "PyQt5.QtCore.QSize" ]
[((500, 526), 'PyQt5.QtWidgets.QFrame', 'QtWidgets.QFrame', (['ct_login'], {}), '(ct_login)\n', (516, 526), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((952, 986), 'PyQt5.QtWidgets.QLabel', 'QtWidgets.QLabel', (['self.frame_login'], {}), '(self.frame_login)\n', (968, 986), False, 'from PyQt5 import QtCore,...
# Copyright (c) 2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
[ "asyncio.gather" ]
[((1900, 1924), 'asyncio.gather', 'asyncio.gather', (['*futures'], {}), '(*futures)\n', (1914, 1924), False, 'import asyncio\n')]
""" Class :py:class:`FWViewImage` is a FWView for interactive image =============================================================== FWView <- QGraphicsView <- ... <- QWidget Usage :: # Test #----- import sys from psana.graphqt.FWViewImage import * import psana.graphqt.ColorTable as ct app = Q...
[ "psana.graphqt.ColorTable.color_table_rainbow", "PyQt5.QtGui.QPixmap.fromImage", "psana.graphqt.ColorTable.color_table_interpolated", "psana.graphqt.ColorTable.color_table_monochr256", "psana.pyalgos.generic.NDArrGenerators.add_ring", "PyQt5.QtGui.QImage", "sys._getframe", "psana.graphqt.ColorTable.ar...
[((6261, 6282), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (6276, 6282), False, 'import sys\n'), ((8997, 9031), 'sys.exit', 'sys.exit', (["('End of Test %s' % tname)"], {}), "('End of Test %s' % tname)\n", (9005, 9031), False, 'import sys\n'), ((2021, 2079), 'psana.graphqt.ColorTable.color_ta...
import sys import uuid import click from ai.backend.client.session import Session from ai.backend.client.func.group import ( _default_list_fields, _default_detail_fields, ) # from ai.backend.client.output.fields import group_fields from . import admin from ..interaction import ask_yn from ..pretty import prin...
[ "click.argument", "uuid.UUID", "ai.backend.client.session.Session", "click.option", "sys.exit" ]
[((523, 561), 'click.argument', 'click.argument', (['"""id_or_name"""'], {'type': 'str'}), "('id_or_name', type=str)\n", (537, 561), False, 'import click\n'), ((1770, 1884), 'click.option', 'click.option', (['"""-d"""', '"""--domain-name"""'], {'type': 'str', 'default': 'None', 'help': '"""Domain name to list groups be...
"""The action definition for the C4 model toolbox.""" from gaphor.C4Model import c4model, diagramitems from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ( ToolboxDefinition, ToolDef, ToolSection, default_namespace, general_tools, namespace_config, ) from gaphor.diagram.d...
[ "gaphor.core.gettext", "gaphor.diagram.diagramtoolbox.default_namespace", "gaphor.diagram.diagramtools.new_item_factory" ]
[((677, 704), 'gaphor.diagram.diagramtoolbox.default_namespace', 'default_namespace', (['new_item'], {}), '(new_item)\n', (694, 704), False, 'from gaphor.diagram.diagramtoolbox import ToolboxDefinition, ToolDef, ToolSection, default_namespace, general_tools, namespace_config\n'), ((850, 877), 'gaphor.diagram.diagramtoo...
""" One of Ploomber's main goals is to allow writing robust/reliable code in an interactive way. Interactive workflows make people more productive but they might come in detriment of writing high quality code (e.g. developing a pipeline in a single ipynb file). The basic idea for this module is to provide a way to tran...
[ "papermill.translators.PythonTranslator.codify", "inspect.getsourcelines", "inspect.getsourcefile", "pathlib.Path", "ploomber.sources.nb_utils.find_cell_with_tag", "inspect.getmodule", "nbformat.read", "warnings.catch_warnings", "nbformat.write", "ploomber.static_analysis.python.PythonCallableExtr...
[((1991, 2016), 'warnings.catch_warnings', 'warnings.catch_warnings', ([], {}), '()\n', (2014, 2016), False, 'import warnings\n'), ((2022, 2068), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'FutureWarning'], {}), "('ignore', FutureWarning)\n", (2043, 2068), False, 'import warnings\n'), ((11470, ...
import math import tensorflow as tf from .model import Model from .builder import MODELS from .common import ConvNormActBlock from core.layers import build_activation def bottle2neckx(inputs, filters, cardinality, strides=1, scale=4, ...
[ "core.layers.build_activation", "math.floor", "tensorflow.split", "tensorflow.keras.layers.GlobalAvgPool2D", "tensorflow.keras.layers.Dense", "tensorflow.nn.softmax", "tensorflow.keras.layers.AvgPool2D", "tensorflow.io.gfile.GFile", "tensorflow.keras.layers.Lambda", "tensorflow.keras.layers.Dropou...
[((807, 848), 'math.floor', 'math.floor', (['(filters * (base_width / 64.0))'], {}), '(filters * (base_width / 64.0))\n', (817, 848), False, 'import math\n'), ((4093, 4132), 'tensorflow.keras.layers.Add', 'tf.keras.layers.Add', ([], {'name': "(name + '/add')"}), "(name=name + '/add')\n", (4112, 4132), True, 'import ten...
"""OctreeLevelInfo and OctreeLevel classes. """ import logging import math from typing import Dict, List, Optional import numpy as np from ....types import ArrayLike from .octree_chunk import OctreeChunk, OctreeChunkGeom, OctreeLocation from .octree_util import OctreeMetadata LOGGER = logging.getLogger("napari.octre...
[ "logging.getLogger", "numpy.array", "math.ceil", "numpy.minimum" ]
[((289, 323), 'logging.getLogger', 'logging.getLogger', (['"""napari.octree"""'], {}), "('napari.octree')\n", (306, 323), False, 'import logging\n'), ((1044, 1076), 'math.ceil', 'math.ceil', (['(base[0] / scaled_size)'], {}), '(base[0] / scaled_size)\n', (1053, 1076), False, 'import math\n'), ((1097, 1129), 'math.ceil'...
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
[ "pennylane.math.unstack", "pennylane.math.stack", "pennylane.math.ndim" ]
[((3943, 3960), 'pennylane.math.stack', 'qml.math.stack', (['x'], {}), '(x)\n', (3957, 3960), True, 'import pennylane as qml\n'), ((3509, 3525), 'pennylane.math.ndim', 'qml.math.ndim', (['p'], {}), '(p)\n', (3522, 3525), True, 'import pennylane as qml\n'), ((3588, 3607), 'pennylane.math.unstack', 'qml.math.unstack', ([...
# -*- coding: utf-8 -*- from io import BytesIO, BufferedReader from pytest import raises from unittest.mock import Mock from watson.di.container import IocContainer from watson.events import types from watson.http.messages import Request, Response from watson.http import sessions from watson.framework import controller...
[ "unittest.mock.Mock", "tests.watson.framework.support.SampleRestController", "tests.watson.framework.support.SampleActionController", "tests.watson.framework.support.sample_environ", "io.BytesIO", "watson.http.messages.Request.from_environ", "watson.framework.controllers.FlashMessagesContainer", "wats...
[((711, 734), 'watson.framework.controllers.HttpMixin', 'controllers.HttpMixin', ([], {}), '()\n', (732, 734), False, 'from watson.framework import controllers\n'), ((943, 966), 'watson.framework.controllers.HttpMixin', 'controllers.HttpMixin', ([], {}), '()\n', (964, 966), False, 'from watson.framework import controll...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
[ "desktop.conf.LOCAL_FILESYSTEMS.keys", "desktop.lib.apputil.has_hadoop", "hadoop.cluster.get_all_hdfs" ]
[((1138, 1150), 'desktop.lib.apputil.has_hadoop', 'has_hadoop', ([], {}), '()\n', (1148, 1150), False, 'from desktop.lib.apputil import has_hadoop\n'), ((1246, 1275), 'desktop.conf.LOCAL_FILESYSTEMS.keys', 'conf.LOCAL_FILESYSTEMS.keys', ([], {}), '()\n', (1273, 1275), False, 'from desktop import conf\n'), ((1194, 1208)...
# --------------------------------------------------------- # Tensorflow MPC-GAN Implementation # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # --------------------------------------------------------- import os import time import collections import numpy as np import matplotlib.pyplot ...
[ "model.MPCGAN", "utils.threshold_by_otsu", "utils.dice_coefficient_in_train", "utils.remain_in_mask", "numpy.mod", "utils.AUC_ROC", "utils.crop_to_original", "tensorflow.Session", "numpy.asarray", "matplotlib.pyplot.close", "numpy.stack", "matplotlib.gridspec.GridSpec", "os.path.isdir", "t...
[((630, 654), 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), '()\n', (652, 654), True, 'import tensorflow as tf\n'), ((676, 692), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (690, 692), True, 'import tensorflow as tf\n'), ((764, 793), 'tensorflow.Session', 'tf.Session', ([], {'c...
import matplotlib.pyplot as plt import networkx as nx class TreeNode(object): def __init__(self, name, so_labels, st_predicate, score, subj_tracklet, obj_tracklet, duration): self.name = name self.so_labels = so_labels self.score = score self.id = '{}_{}_{}_{}_{}'.format(name, st_p...
[ "networkx.Graph", "matplotlib.pyplot.show", "networkx.draw_networkx" ]
[((4824, 4834), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (4832, 4834), True, 'import networkx as nx\n'), ((4889, 4953), 'networkx.draw_networkx', 'nx.draw_networkx', (['G'], {'with_labels': '(True)', 'font_size': '(10)', 'node_size': '(5)'}), '(G, with_labels=True, font_size=10, node_size=5)\n', (4905, 4953), Tr...
import copy import pygame import numpy class Direction: left = 0 right = 1 up = 2 down = 3 current_direction = 1 def __init__(self): self.left = 0 self.right = 1 self.up = 2 self.down = 3 class Snake: head = [0,0] # [0] for x-cordiantes , [1] for ...
[ "pygame.draw.rect", "copy.deepcopy" ]
[((1785, 1853), 'pygame.draw.rect', 'pygame.draw.rect', (['screen', 'BLUE', '[self.head[0], self.head[1], 20, 20]'], {}), '(screen, BLUE, [self.head[0], self.head[1], 20, 20])\n', (1801, 1853), False, 'import pygame\n'), ((1913, 2001), 'pygame.draw.rect', 'pygame.draw.rect', (['screen', 'BLACK', '[apple_cordinates[0], ...
# -*- coding: utf-8 -*- # # Copyright 2015 <NAME> # # 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 agree...
[ "logging.getLogger", "kraken.lib.segmentation.extract_polygons", "shapely.ops.split", "albumentations.MedianBlur", "torch.LongTensor", "albumentations.Blur", "torchvision.transforms.Lambda", "albumentations.HueSaturationValue", "numpy.array", "torch.nn.functional.pad", "torchvision.transforms.Pa...
[((1979, 2006), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1996, 2006), False, 'import logging\n'), ((5975, 6009), 'torchvision.transforms.Compose', 'transforms.Compose', (['out_transforms'], {}), '(out_transforms)\n', (5993, 6009), False, 'from torchvision import transforms\n'), ((8...
import os import numpy as np from time import time import igibson import pybullet as p import logging from igibson.objects.cube import Cube from igibson.objects.visual_marker import VisualMarker from igibson.objects.articulated_object import ArticulatedObject, RBOObject from igibson.render.profiler import Profiler f...
[ "vl_nav.envs.igibson_env.iGibsonEnv", "vl_nav.tasks.visual_point_nav_random_task.VisualPointNavRandomTask", "igibson.render.profiler.Profiler", "vl_nav.tasks.visual_point_nav_fixed_task.VisualPointNavFixedTask", "vl_nav.objects.igibson_object.iGisbonObject", "os.path.join", "logging.info" ]
[((1061, 1115), 'os.path.join', 'os.path.join', (['igibson.vlnav_config_path', 'yaml_filename'], {}), '(igibson.vlnav_config_path, yaml_filename)\n', (1073, 1115), False, 'import os\n'), ((1126, 1272), 'vl_nav.envs.igibson_env.iGibsonEnv', 'iGibsonEnv', ([], {'config_file': 'config_filename', 'mode': 'mode', 'action_ti...
# Standard modules # Third-Party modules import regex import requests # Project modules import datastore regional_endpoints = ['br1', 'eun1', 'euw1', 'jp1', 'kr', 'la1', 'la2', 'na1', 'oc1', 'tr1', 'ru', 'pbe1'] APP_RL_TYPE = 'X-App-Rate-Limit' METHOD_RL_TYPE = 'X-Method-Rate-Limit' class Er...
[ "requests.get", "datastore.get_redis_connection", "regex.match", "datastore.get_riot_api_key" ]
[((918, 950), 'datastore.get_redis_connection', 'datastore.get_redis_connection', ([], {}), '()\n', (948, 950), False, 'import datastore\n'), ((1949, 1981), 'datastore.get_redis_connection', 'datastore.get_redis_connection', ([], {}), '()\n', (1979, 1981), False, 'import datastore\n'), ((651, 705), 'regex.match', 'rege...
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
[ "polyaxon_sdk.api_client.ApiClient", "polyaxon_sdk.exceptions.ApiTypeError", "six.iteritems", "polyaxon_sdk.exceptions.ApiValueError" ]
[((4431, 4472), 'six.iteritems', 'six.iteritems', (["local_var_params['kwargs']"], {}), "(local_var_params['kwargs'])\n", (4444, 4472), False, 'import six\n'), ((9895, 9936), 'six.iteritems', 'six.iteritems', (["local_var_params['kwargs']"], {}), "(local_var_params['kwargs'])\n", (9908, 9936), False, 'import six\n'), (...
# pylint: disable=redefined-outer-name,protected-access,missing-function-docstring """In this module we configure our awesome-panel.org app and serve it using the awesome_panel.application framework. The awesome_panel.application framework provides - Templates: One or more Templates to layout your app(s). A tem...
[ "platform.system", "panel.serve", "os.getenv" ]
[((1062, 1099), 'os.getenv', 'os.getenv', (['"""BOKEH_ADDRESS"""', '"""0.0.0.0"""'], {}), "('BOKEH_ADDRESS', '0.0.0.0')\n", (1071, 1099), False, 'import os\n'), ((1175, 1192), 'platform.system', 'platform.system', ([], {}), '()\n', (1190, 1192), False, 'import platform\n'), ((1216, 1273), 'panel.serve', 'pn.serve', (['...
# -*- coding: utf-8 -*- import opencc import argparse def convert_file(input_file, output_file, config='t2s'): """ 简繁转换 :param input_file: 输入文件路径 :param output_file: 输出文件路径 :param config: 配置文件, config in ['s2t', 't2s', 's2tw', 'tw2s', 's2hk', 'hk2s', 's2twp', 'tw2sp', 't2tw', 't2hk'], 参...
[ "opencc.convert", "argparse.ArgumentParser" ]
[((830, 855), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (853, 855), False, 'import argparse\n'), ((734, 772), 'opencc.convert', 'opencc.convert', (['line', 'f"""{config}.json"""'], {}), "(line, f'{config}.json')\n", (748, 772), False, 'import opencc\n')]
# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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...
[ "neo4j.TrustAll", "neo4j.GraphDatabase.driver", "ssl.SSLContext", "pytest.mark.parametrize", "neo4j.TrustSystemCAs", "pytest.raises", "neo4j.TrustCustomCAs", "pytest.warns" ]
[((1022, 1098), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""protocol"""', "('bolt://', 'bolt+s://', 'bolt+ssc://')"], {}), "('protocol', ('bolt://', 'bolt+s://', 'bolt+ssc://'))\n", (1045, 1098), False, 'import pytest\n'), ((1100, 1193), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""host""...
import numpy as np import scmodes def test_simulate_pois_rank1(): x, eta = scmodes.dataset.simulate_pois(n=30, p=60, rank=1) assert x.shape == (30, 60) assert eta.shape == (30, 60) assert (x >= 0).all() assert (~np.isclose(np.linalg.svd(eta, compute_uv=False, full_matrices=False), 0)).sum() == 1 def test_si...
[ "numpy.linalg.svd", "numpy.ma.is_masked", "scmodes.dataset.simulate_pois", "scmodes.dataset.simulate_pois_size" ]
[((78, 127), 'scmodes.dataset.simulate_pois', 'scmodes.dataset.simulate_pois', ([], {'n': '(30)', 'p': '(60)', 'rank': '(1)'}), '(n=30, p=60, rank=1)\n', (107, 127), False, 'import scmodes\n'), ((352, 401), 'scmodes.dataset.simulate_pois', 'scmodes.dataset.simulate_pois', ([], {'n': '(30)', 'p': '(60)', 'rank': '(2)'})...
"""empty message Revision ID: c13eb5634222 Revises: Create Date: 2021-12-26 17:35:39.122789 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c13eb5634222' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
[ "alembic.op.drop_table", "sqlalchemy.Text", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Integer", "sqlalchemy.UniqueConstraint", "sqlalchemy.String" ]
[((1426, 1448), 'alembic.op.drop_table', 'op.drop_table', (['"""users"""'], {}), "('users')\n", (1439, 1448), False, 'from alembic import op\n'), ((1453, 1480), 'alembic.op.drop_table', 'op.drop_table', (['"""blog_posts"""'], {}), "('blog_posts')\n", (1466, 1480), False, 'from alembic import op\n'), ((817, 846), 'sqlal...
import json import os import typing import logging from dss.util.aws import ARN from dss.util.aws.clients import stepfunctions # type: ignore from dss.util.aws import send_sns_msg """ The keys used to transfer step function invocation data over SNS to the dss-sfn-* Lambda. dss-sfn starts step function execution and ...
[ "dss.util.aws.ARN.get_region", "dss.util.aws.send_sns_msg", "logging.getLogger", "dss.util.aws.ARN.get_account_id", "dss.util.aws.clients.stepfunctions.get_paginator", "json.dumps", "dss.util.aws.clients.stepfunctions.describe_execution", "dss.util.aws.clients.stepfunctions.start_execution" ]
[((467, 483), 'dss.util.aws.ARN.get_region', 'ARN.get_region', ([], {}), '()\n', (481, 483), False, 'from dss.util.aws import ARN\n'), ((539, 559), 'dss.util.aws.ARN.get_account_id', 'ARN.get_account_id', ([], {}), '()\n', (557, 559), False, 'from dss.util.aws import ARN\n'), ((678, 705), 'logging.getLogger', 'logging....
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-22 17:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content', '0003_remove_imagecontent_form'), ] operations = [ migrations.Alt...
[ "django.db.models.FileField" ]
[((412, 466), 'django.db.models.FileField', 'models.FileField', ([], {'blank': '(True)', 'null': '(True)', 'upload_to': "b''"}), "(blank=True, null=True, upload_to=b'')\n", (428, 466), False, 'from django.db import migrations, models\n')]
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from knowit import know from . import ( assert_expected, id_func, mediafiles ) @pytest.mark.parametrize('media', mediafiles.get_json_media('ffmpeg'), ids=id_func) def test_ffmpeg_provider(ffmpeg, media, options): # Given ...
[ "knowit.know" ]
[((393, 424), 'knowit.know', 'know', (['media.video_path', 'options'], {}), '(media.video_path, options)\n', (397, 424), False, 'from knowit import know\n'), ((706, 737), 'knowit.know', 'know', (['media.video_path', 'options'], {}), '(media.video_path, options)\n', (710, 737), False, 'from knowit import know\n')]
"""Making all kind of plots to visualize real, simulated or both data.""" import datetime import warnings from abc import ABC, abstractmethod from typing import Optional import matplotlib import matplotlib.lines as mLines import matplotlib.pyplot as plt import matplotlib.patches as mPatches from matplotlib.gridspec i...
[ "disease_spread_model.data_processing.real_data.RealData.get_starting_deaths_by_hand", "disease_spread_model.data_processing.real_data.RealData.day_to_date", "matplotlib.colors.to_rgba", "scipy.signal.savgol_filter", "disease_spread_model.data_processing.real_data.RealData.date_to_day", "seaborn.set_style...
[((1328, 1350), 'seaborn.set_style', 'sns.set_style', (['"""ticks"""'], {}), "('ticks')\n", (1341, 1350), True, 'import seaborn as sns\n'), ((1359, 1382), 'seaborn.set_context', 'sns.set_context', (['"""talk"""'], {}), "('talk')\n", (1374, 1382), True, 'import seaborn as sns\n'), ((1435, 1462), 'matplotlib.pyplot.figur...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
[ "logging.getLogger", "os.path.exists", "datetime.datetime.fromtimestamp", "math.ceil", "re.compile", "json.dump", "os.path.split", "json.load", "os.path.isdir", "os.path.abspath", "glob.glob" ]
[((1533, 1560), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1550, 1560), False, 'import logging\n'), ((14038, 14067), 're.compile', 're.compile', (['"""\\\\033\\\\[[0-9]+m"""'], {}), "('\\\\033\\\\[[0-9]+m')\n", (14048, 14067), False, 'import re\n'), ((13929, 13955), 'json.dump', 'jso...
# Generated by Django 3.1.13 on 2021-08-30 09:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("products", "0007_projectairfiles")] operations = [ migrations.AddField( model_name="projectairfiles", name="archive", ...
[ "django.db.models.BooleanField" ]
[((328, 362), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (347, 362), False, 'from django.db import migrations, models\n')]
#! /usr/bin/env python3 import argparse import subprocess import os from dataclasses import dataclass from pathlib import Path from capo.C.build import build as build_capo from capo.C.build import clean as clean_capo from hal.build import build as build_hal from hal.build import clean as clean_hal from mules.build imp...
[ "capo.C.build.clean", "hal.build.clean", "argparse.ArgumentParser", "capo.C.build.build", "subprocess.run", "hal.build.build", "os.chdir", "mules.build.clean", "mules.build.build" ]
[((456, 474), 'os.chdir', 'os.chdir', (['"""capo/C"""'], {}), "('capo/C')\n", (464, 474), False, 'import os\n'), ((480, 492), 'capo.C.build.build', 'build_capo', ([], {}), '()\n', (490, 492), True, 'from capo.C.build import build as build_capo\n'), ((497, 514), 'os.chdir', 'os.chdir', (['"""../.."""'], {}), "('../..')\...
# coding=utf-8 # Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ "numpy.random.normal", "numpy.abs", "tempfile.TemporaryDirectory", "learned_optimization.population.mutators.winner_take_all_genetic.WinnerTakeAllGenetic", "absl.testing.parameterized.parameters", "absl.testing.absltest.main", "numpy.random.seed" ]
[((955, 991), 'absl.testing.parameterized.parameters', 'parameterized.parameters', (['(1,)', '(3,)'], {}), '((1,), (3,))\n', (979, 991), False, 'from absl.testing import parameterized\n'), ((4329, 4344), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (4342, 4344), False, 'from absl.testing import absl...
from typing import Iterable, Optional import math from processfiles.timing import TimeTracker from processfiles.base import BaseProcessTracker import itertools class ObjectProcessTracker(BaseProcessTracker): def __init__(self, objs: Iterable, restart=False, completed_list_path: str = '_completed.txt'): ...
[ "itertools.islice", "math.ceil", "processfiles.timing.TimeTracker" ]
[((598, 637), 'processfiles.timing.TimeTracker', 'TimeTracker', (['None'], {'restart': 'self.restart'}), '(None, restart=self.restart)\n', (609, 637), False, 'from processfiles.timing import TimeTracker\n'), ((770, 798), 'math.ceil', 'math.ceil', (['(num_items / chunk)'], {}), '(num_items / chunk)\n', (779, 798), False...
import matplotlib.pyplot as plt import networkx as nx import re class Decomposition(object): def __init__(self, decomposition_list): self.decomposition_list = [str(step) for step in decomposition_list] def _get_graph_edges(self): edges = [] for i, step in enumerate(self.decomposition...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.clf", "networkx.spring_layout", "networkx.DiGraph", "networkx.draw_networkx", "matplotlib.pyplot.axis", "re.findall", "matplotlib.pyplot.show" ]
[((1608, 1638), 'networkx.spring_layout', 'nx.spring_layout', (['graph'], {'k': '(0.5)'}), '(graph, k=0.5)\n', (1624, 1638), True, 'import networkx as nx\n'), ((1643, 1717), 'networkx.draw_networkx', 'nx.draw_networkx', (['graph'], {'pos': 'pos', 'arrows': '(True)', 'with_labels': '(True)'}), '(graph, pos=pos, arrows=T...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Iterable, List, Tuple import torch accelerator_lowering_supported = True try: from accelerators.pytorch.lib.glow_decorator import accelerator except ImportError: accelerator_lowering_supported = F...
[ "pytext.utils.usage.log_accelerator_feature_usage", "torch_glow.CompilationSpec", "glow.fb.nnpi.lowering.split.FxNetSplitterSettings", "pytext.config.ExportConfig", "torch_glow.CompilationGroup", "torch_glow.input_specs_from_tensors", "accelerators.pytorch.lib.glow_decorator.accelerator.model2trace_path...
[((4112, 4493), 'accelerators.pytorch.lib.glow_decorator.accelerator', 'accelerator', (["[('NNPI', {'NNPI_IceCores': '12', 'NNPINumParallelChunks': '12',\n 'NNPIUseGeluLUT': 'true', 'glow:ConvertToFP16': 'true'}), (\n 'NNPI:throughput_optimized', {'NNPI_IceCores': '4',\n 'NNPINumParallelChunks': '4', 'NNPIUseG...
import csv name = input('Enter your name: ') email = input('Enter your email: ') print('You just entered %s, %s, is it correct?'%(name, email)) save = input('Save to CSV? ') if save == 'yes': file = open('results.csv', 'a') csv_writer = csv.writer(file) csv_writer.writerow([name, email])
[ "csv.writer" ]
[((243, 259), 'csv.writer', 'csv.writer', (['file'], {}), '(file)\n', (253, 259), False, 'import csv\n')]
import os import json from pathlib import Path from copy import deepcopy from typing import Union, Any try: import nbconvert except ImportError: nbconvert = None from nbmanips.notebook_base import NotebookBase from nbmanips.selector import is_new_slide, has_slide_type, has_output_type from nbmanips.utils imp...
[ "nbmanips.utils.write_ipynb", "nbmanips.utils.get_ipynb_name", "nbmanips.utils.read_dbc", "nbconvert.writers.files.FilesWriter", "pathlib.Path", "json.dumps", "os.path.splitext", "nbmanips.utils.dict_to_ipynb", "pygments.lexers.get_lexer_by_name", "os.path.split", "nbmanips.utils.read_ipynb", ...
[((5291, 5314), 'json.dumps', 'json.dumps', (['self.raw_nb'], {}), '(self.raw_nb)\n', (5301, 5314), False, 'import json\n'), ((5440, 5466), 'nbmanips.utils.dict_to_ipynb', 'dict_to_ipynb', (['self.raw_nb'], {}), '(self.raw_nb)\n', (5453, 5466), False, 'from nbmanips.utils import write_ipynb, dict_to_ipynb, get_ipynb_na...
from Crypto.Util.number import * import requests import json import codecs import base64 def rsapq(p:int , q:int , e:int , ct:int) -> int: p = int(p) q = int(q) e = int(e) ct = int(ct) def egcd(a, b): if a == 0: return (b, 0, 1) else: g, y, x = egcd(b % a, a) return ...
[ "json.loads", "base64.b64decode", "base64.b32decode", "codecs.decode" ]
[((551, 569), 'json.loads', 'json.loads', (['n.text'], {}), '(n.text)\n', (561, 569), False, 'import json\n'), ((757, 789), 'codecs.decode', 'codecs.decode', (['hex_string', '"""hex"""'], {}), "(hex_string, 'hex')\n", (770, 789), False, 'import codecs\n'), ((995, 1016), 'base64.b64decode', 'base64.b64decode', (['txt'],...
from __future__ import print_function from datetime import datetime import inspect import os import socket import sys import threading import uuid import gridengine from gridengine import schedulers # ---------------------------------------------------------------------------- # JOB DISPATCHER # ---------------------...
[ "socket.gethostbyname", "zmq.Context", "threading.Lock", "gridengine.serializer.dumps", "datetime.datetime.now", "zmq.Poller", "threading.Thread", "socket.gethostname" ]
[((870, 883), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (881, 883), False, 'import zmq\n'), ((905, 925), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (923, 925), False, 'import socket\n'), ((940, 976), 'socket.gethostbyname', 'socket.gethostbyname', (['self.host_name'], {}), '(self.host_name)\n',...
r""" Elements of Hecke modular forms spaces AUTHORS: - <NAME> (2013): initial version """ # **************************************************************************** # Copyright (C) 2013-2014 <NAME> <<EMAIL>> # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Fr...
[ "sage.functions.other.sqrt", "sage.lfunctions.dokchitser.Dokchitser", "sage.rings.all.ZZ" ]
[((12760, 12881), 'sage.lfunctions.dokchitser.Dokchitser', 'Dokchitser', ([], {'conductor': 'conductor', 'gammaV': 'gammaV', 'weight': 'weight', 'eps': 'eps', 'poles': 'poles', 'residues': 'residues', 'prec': 'num_prec'}), '(conductor=conductor, gammaV=gammaV, weight=weight, eps=eps,\n poles=poles, residues=residues...
import datetime from sqlmodel import Field, Relationship, SQLModel class User(SQLModel, table=True): __tablename__ = "users" id: int = Field(primary_key=True) create_at: datetime.datetime = Field(default_factory=lambda: datetime.datetime.utcnow()) user_name: str password: str alias: str
[ "datetime.datetime.utcnow", "sqlmodel.Field" ]
[((146, 169), 'sqlmodel.Field', 'Field', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (151, 169), False, 'from sqlmodel import Field, Relationship, SQLModel\n'), ((235, 261), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (259, 261), False, 'import datetime\n')]
import json import phonenumbers from django import forms from django.contrib import messages from django.core import validators from django.core.exceptions import FieldDoesNotExist, ValidationError from django.http import HttpResponse from django.shortcuts import redirect from django.utils import six from django.utils...
[ "django.utils.six.text_type", "django.utils.translation.ugettext_lazy", "django.forms.CharField", "django.utils.six.moves.map", "phonenumber_field.phonenumber.PhoneNumber.from_string", "oscar.core.utils.safe_referrer" ]
[((2122, 2149), 'oscar.core.utils.safe_referrer', 'safe_referrer', (['request', '"""."""'], {}), "(request, '.')\n", (2135, 2149), False, 'from oscar.core.utils import safe_referrer\n'), ((2206, 2233), 'oscar.core.utils.safe_referrer', 'safe_referrer', (['request', '"""."""'], {}), "(request, '.')\n", (2219, 2233), Fal...
""" Module to import sensor data to a postgres database. """ from __app__.crop.db import connect_db, session_open, session_close from __app__.crop.ingress_adv import insert_advanticsys_data from __app__.crop.constants import( CONST_ADVANTICSYS, SQL_ENGINE, SQL_DBNAME, ) from __app__.crop.utils import m...
[ "__app__.crop.db.connect_db", "__app__.crop.db.session_open", "__app__.crop.utils.make_conn_string", "__app__.crop.structure.DataUploadLogClass", "__app__.crop.db.session_close", "__app__.crop.sensors.find_sensor_type_id", "__app__.crop.ingress_adv.insert_advanticsys_data" ]
[((994, 1050), '__app__.crop.utils.make_conn_string', 'make_conn_string', (['SQL_ENGINE', 'user', 'password', 'host', 'port'], {}), '(SQL_ENGINE, user, password, host, port)\n', (1010, 1050), False, 'from __app__.crop.utils import make_conn_string\n'), ((1136, 1174), '__app__.crop.db.connect_db', 'connect_db', (['conne...
# -*- coding: utf-8 -*- from .exceptions import FlexipyException from main import Flexipy from config import Config class Pokladna(Flexipy): def __init__(self, conf=Config()): Flexipy.__init__(self, config=conf) def get_all_pokladni_doklady(self, query=None, detail='summary'): d = self.get_all_records('poklad...
[ "config.Config", "main.Flexipy.__init__" ]
[((169, 177), 'config.Config', 'Config', ([], {}), '()\n', (175, 177), False, 'from config import Config\n'), ((182, 217), 'main.Flexipy.__init__', 'Flexipy.__init__', (['self'], {'config': 'conf'}), '(self, config=conf)\n', (198, 217), False, 'from main import Flexipy\n')]
# Copyright (c) 2014, <NAME>. Please see the AUTHORS file for details. # All rights reserved. Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file.) import sublime import sublime_plugin from subprocess import check_output from subprocess import Popen import glob import js...
[ "os.path.exists", "json.loads", "Dart.sublime_plugin_lib.path.pushd", "sublime.status_message", "Dart.sublime_plugin_lib.PluginLogger", "Dart.lib.sdk.SDK", "Dart.sublime_plugin_lib.collections.CircularArray", "Dart.sublime_plugin_lib.sublime.after", "json.dumps", "os.path.join", "os.path.split",...
[((775, 797), 'Dart.sublime_plugin_lib.PluginLogger', 'PluginLogger', (['__name__'], {}), '(__name__)\n', (787, 797), False, 'from Dart.sublime_plugin_lib import PluginLogger\n'), ((1493, 1498), 'Dart.lib.sdk.SDK', 'SDK', ([], {}), '()\n', (1496, 1498), False, 'from Dart.lib.sdk import SDK\n'), ((1708, 1723), 'json.loa...
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
[ "weakref.WeakKeyDictionary", "textwrap.dedent", "os.path.join", "functools.wraps", "tempfile.mkdtemp", "shutil.rmtree", "io.StringIO" ]
[((3777, 3804), 'weakref.WeakKeyDictionary', 'weakref.WeakKeyDictionary', ([], {}), '()\n', (3802, 3804), False, 'import weakref\n'), ((3053, 3091), 'os.path.join', 'os.path.join', (['custom_log_dir', 'filename'], {}), '(custom_log_dir, filename)\n', (3065, 3091), False, 'import os\n'), ((3218, 3239), 'functools.wraps'...
from io import StringIO import unittest from unittest.mock import patch from aws_account_janitor.logging import log class LoggingTests(unittest.TestCase): def test_log(self): with patch('sys.stdout', new=StringIO()) as fake_out: log('foo') self.assertEqual('foo\n', fake_out.getva...
[ "io.StringIO", "aws_account_janitor.logging.log" ]
[((257, 267), 'aws_account_janitor.logging.log', 'log', (['"""foo"""'], {}), "('foo')\n", (260, 267), False, 'from aws_account_janitor.logging import log\n'), ((220, 230), 'io.StringIO', 'StringIO', ([], {}), '()\n', (228, 230), False, 'from io import StringIO\n')]
from importlib.metadata import entry_points import edgedb from fastapi import FastAPI, HTTPException, status, Request, APIRouter from fastapi.exception_handlers import http_exception_handler from starlette.middleware.sessions import SessionMiddleware from .config import get_settings def get_edgedb_pool(request: Req...
[ "edgedb.create_async_pool", "importlib.metadata.entry_points", "fastapi.FastAPI", "fastapi.HTTPException" ]
[((421, 475), 'fastapi.FastAPI', 'FastAPI', ([], {'debug': 'settings.debug', 'title': 'settings.app_name'}), '(debug=settings.debug, title=settings.app_name)\n', (428, 475), False, 'from fastapi import FastAPI, HTTPException, status, Request, APIRouter\n'), ((1062, 1076), 'importlib.metadata.entry_points', 'entry_point...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.core import mail from django.urls import reverse from django.utils.encoding import smart_str from misago.acl.testutils import override_acl from misago.categories.models import Category from misag...
[ "django.contrib.auth.get_user_model", "misago.threads.models.ThreadParticipant.objects.get", "misago.acl.testutils.override_acl", "misago.categories.models.Category.objects.private_threads", "django.utils.encoding.smart_str", "django.urls.reverse" ]
[((437, 453), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (451, 453), False, 'from django.contrib.auth import get_user_model\n'), ((613, 647), 'misago.categories.models.Category.objects.private_threads', 'Category.objects.private_threads', ([], {}), '()\n', (645, 647), False, 'from misago....
import sys import tempfile import numpy as np from dffml.record import Record from dffml.high_level.ml import score from dffml.source.source import Sources from dffml.source.memory import MemorySource, MemorySourceConfig from dffml.feature import Feature, Features from dffml.util.asynctestcase import AsyncTestCase im...
[ "tempfile.TemporaryDirectory", "sklearn.datasets.make_blobs", "dffml.high_level.ml.score", "dffml.feature.Feature", "dffml.feature.Features", "numpy.concatenate", "dffml.source.memory.MemorySourceConfig" ]
[((10059, 10127), 'sklearn.datasets.make_blobs', 'make_blobs', ([], {'n_samples': '(80)', 'centers': '(8)', 'n_features': '(4)', 'random_state': '(2020)'}), '(n_samples=80, centers=8, n_features=4, random_state=2020)\n', (10069, 10127), False, 'from sklearn.datasets import make_blobs\n'), ((10160, 10207), 'numpy.concat...
import numpy as np import scipy as sp from sklearn.gaussian_process import GaussianProcessRegressor import matplotlib.pyplot as plt class PostProcessing: """ This class contains the methods for visualizing the results of the DIC analysis. **Input:** * **analysis_obj** (`object`) Object of the ...
[ "matplotlib.pyplot.imshow", "sklearn.gaussian_process.GaussianProcessRegressor", "scipy.ndimage.gaussian_filter", "numpy.sqrt", "matplotlib.pyplot.colorbar", "numpy.max", "matplotlib.pyplot.close", "numpy.array", "matplotlib.pyplot.figure", "numpy.min", "numpy.meshgrid", "numpy.shape", "matp...
[((4302, 4328), 'numpy.array', 'np.array', (['strain_matrix_11'], {}), '(strain_matrix_11)\n', (4310, 4328), True, 'import numpy as np\n'), ((4353, 4379), 'numpy.array', 'np.array', (['strain_matrix_22'], {}), '(strain_matrix_22)\n', (4361, 4379), True, 'import numpy as np\n'), ((4404, 4430), 'numpy.array', 'np.array',...
# - How to extract other text data pieces from one webpage. from bs4 import BeautifulSoup import requests url = "https://boston.craigslist.org/search/sof" response = requests.get(url) #print(response) data = response.text soup = BeautifulSoup(data,'html.parser') titles =soup.find_all("a",{"class":"resul...
[ "bs4.BeautifulSoup", "requests.get" ]
[((174, 191), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (186, 191), False, 'import requests\n'), ((243, 277), 'bs4.BeautifulSoup', 'BeautifulSoup', (['data', '"""html.parser"""'], {}), "(data, 'html.parser')\n", (256, 277), False, 'from bs4 import BeautifulSoup\n')]
import gc import pytorch_lightning as pl import torch from pytorch_lightning.callbacks import LearningRateMonitor from sklearn.model_selection import StratifiedKFold from torch.utils.data import DataLoader from utils import seed, DatasetPreparer, Data, Model, WarmRestartCallback seed() dp = DatasetPrepa...
[ "pytorch_lightning.callbacks.ModelCheckpoint", "utils.Data", "utils.Model", "sklearn.model_selection.StratifiedKFold", "utils.seed", "utils.WarmRestartCallback", "pytorch_lightning.Trainer", "gc.collect", "utils.DatasetPreparer", "torch.cuda.empty_cache", "pytorch_lightning.callbacks.LearningRat...
[((293, 299), 'utils.seed', 'seed', ([], {}), '()\n', (297, 299), False, 'from utils import seed, DatasetPreparer, Data, Model, WarmRestartCallback\n'), ((308, 346), 'utils.DatasetPreparer', 'DatasetPreparer', (['"""Train.csv"""', '"""Images"""'], {}), "('Train.csv', 'Images')\n", (323, 346), False, 'from utils import ...
""" Here the structure of the network is made in pytorch """ from typing import List, Union, Optional import torch import os from logger import logger import torch.nn as nn import torch.nn.functional as F import numpy as np from scipy.stats import norm class Encoder(nn.Module): """ Encodes the data using a CN...
[ "torch.distributions.normal.Normal", "logger.logger.error", "torch.nn.BatchNorm2d", "torch.nn.Sigmoid", "os.path.exists", "numpy.histogram", "torch.nn.Flatten", "numpy.linspace", "numpy.empty", "torch.zeros_like", "torch.randn", "logger.logger.info", "torch.nn.LeakyReLU", "numpy.digitize",...
[((3540, 3579), 'torch.distributions.normal.Normal', 'torch.distributions.normal.Normal', (['(0)', '(1)'], {}), '(0, 1)\n', (3573, 3579), False, 'import torch\n'), ((3852, 3884), 'numpy.zeros', 'np.zeros', (['(z_dim, self.num_bins)'], {}), '((z_dim, self.num_bins))\n', (3860, 3884), True, 'import numpy as np\n'), ((489...
# # This file is part of apacheconfig software. # # Copyright (c) 2018-2020, <NAME> <<EMAIL>> # License: https://github.com/etingof/apacheconfig/LICENSE.rst # try: import unittest2 as unittest except ImportError: import unittest suite = unittest.TestLoader().loadTestsFromNames( ['tests.integration.__main_...
[ "unittest.TextTestRunner", "unittest.TestLoader" ]
[((247, 268), 'unittest.TestLoader', 'unittest.TestLoader', ([], {}), '()\n', (266, 268), False, 'import unittest\n'), ((408, 444), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (431, 444), False, 'import unittest\n')]
import gdown import os from zipfile import ZipFile demos = { "Sawyer_chair_agne_0007_00XX.zip": "1-lVTCH4oPq22cLC4Mmia9AKqzDIIVDO0", 'Sawyer_table_dockstra_0279_00XX': '1QAchFmYpQGqa6zaZ2QeZH5ET-iuyerU0', "Sawyer_bench_bjursta_0210_00XX.zip": "12b8_j1mC8-pgotjARF1aTcqH2T7FNHNF", "Sawyer_table_bjorkudde...
[ "os.path.exists", "os.makedirs", "zipfile.ZipFile", "gdown.download", "os.path.join" ]
[((879, 905), 'os.path.join', 'os.path.join', (['"""demos"""', 'key'], {}), "('demos', key)\n", (891, 905), False, 'import os\n'), ((913, 936), 'os.path.exists', 'os.path.exists', (['outfile'], {}), '(outfile)\n', (927, 936), False, 'import os\n'), ((1001, 1042), 'gdown.download', 'gdown.download', (['url', 'outfile'],...
# Copyright 2019 The FastEstimator 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 appl...
[ "fastestimator.util.traceability_util.traceable", "albumentations.augmentations.transforms.RandomGridShuffle" ]
[((991, 1002), 'fastestimator.util.traceability_util.traceable', 'traceable', ([], {}), '()\n', (1000, 1002), False, 'from fastestimator.util.traceability_util import traceable\n'), ((2756, 2806), 'albumentations.augmentations.transforms.RandomGridShuffle', 'RandomGridShuffleAlb', ([], {'grid': 'grid', 'always_apply': ...
# -*- coding: utf-8 -*- """ Created on Thu Aug 19 08:55:28 2021 Purpose of the script: The purpose of the script is to load informations from files created by both the Quality Control of Nergica and the lidar installed on Nergica's site. The informations is extracted for heights and the year selected a the top...
[ "matplotlib.pyplot.grid", "pandas.read_csv", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.legend", "matplotlib.pyplot.xlabel", "numpy.arange", "pickle.load", "matplotlib.pyplot.yticks", "matplotlib.pyplot.tight_layout", "pandas.DataFrame", "matplotlib.pyplot.ylim"...
[((5515, 5564), 'glob.glob', 'glob.glob', (['(str_pathDirectory_CQ + str_filesFilter)'], {}), '(str_pathDirectory_CQ + str_filesFilter)\n', (5524, 5564), False, 'import glob\n'), ((5931, 5979), 'glob.glob', 'glob.glob', (["(str_pathDirectory_CQ + '*mmv1*Baroh*')"], {}), "(str_pathDirectory_CQ + '*mmv1*Baroh*')\n", (594...
from socket import gethostbyname from random import randint # proxy: https://luminati.io/ def get_luminati_session(username, password): """Returns a new sticky Luminati Proxy Session.""" port = 22225 ip = gethostbyname("zproxy.lum-superproxy.io") session_id = randint(1000, 9999) return ( ...
[ "socket.gethostbyname", "random.randint" ]
[((221, 262), 'socket.gethostbyname', 'gethostbyname', (['"""zproxy.lum-superproxy.io"""'], {}), "('zproxy.lum-superproxy.io')\n", (234, 262), False, 'from socket import gethostbyname\n'), ((281, 300), 'random.randint', 'randint', (['(1000)', '(9999)'], {}), '(1000, 9999)\n', (288, 300), False, 'from random import rand...
# Generated by Django 3.1.4 on 2020-12-09 14:25 from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import paperclip.models class Migration(migrations.Migration): initial = True dependencies = [ ('cont...
[ "django.db.models.FloatField", "django.db.models.ForeignKey", "django.db.models.FileField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.PositiveIntegerField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.models.CharFie...
[((373, 430), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (404, 430), False, 'from django.db import migrations, models\n'), ((563, 656), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
# Copyright (c) OpenMMLab. All rights reserved. import math import os.path as osp import tempfile from mmocr.datasets.ocr_dataset import OCRDataset def _create_dummy_ann_file(ann_file): ann_info1 = 'sample1.jpg hello' ann_info2 = 'sample2.jpg world' with open(ann_file, 'w') as fw: for ann_info i...
[ "tempfile.TemporaryDirectory", "os.path.join", "math.isclose", "mmocr.datasets.ocr_dataset.OCRDataset" ]
[((614, 643), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (641, 643), False, 'import tempfile\n'), ((683, 722), 'os.path.join', 'osp.join', (['tmp_dir.name', '"""fake_data.txt"""'], {}), "(tmp_dir.name, 'fake_data.txt')\n", (691, 722), True, 'import os.path as osp\n'), ((837, 878), '...
""" Alternate namespace for aiotoolz such that all functions are curried Currying provides implicit partial evaluation of all functions Example: Get usually requires two arguments, an index and a collection >>> from aiotoolz.curried import get >>> get(0, ('a', 'b')) 'a' When we use it in higher ...
[ "aiotoolz.curry" ]
[((1112, 1147), 'aiotoolz.curry', 'aiotoolz.curry', (['aiotoolz.accumulate'], {}), '(aiotoolz.accumulate)\n', (1126, 1147), False, 'import aiotoolz\n'), ((1156, 1186), 'aiotoolz.curry', 'aiotoolz.curry', (['aiotoolz.assoc'], {}), '(aiotoolz.assoc)\n', (1170, 1186), False, 'import aiotoolz\n'), ((1198, 1231), 'aiotoolz....
# Solution of; # Project Euler Problem 526: Largest prime factors of consecutive numbers # https://projecteuler.net/problem=526 # # Let f(n) be the largest prime factor of n. Let g(n) = f(n) + f(n+1) + f(n+2) # + f(n+3) + f(n+4) + f(n+5) + f(n+6) + f(n+7) + f(n+8), the sum of the # largest prime factor of each of ni...
[ "timed.caller" ]
[((682, 716), 'timed.caller', 'timed.caller', (['dummy', 'n', 'i', 'prob_id'], {}), '(dummy, n, i, prob_id)\n', (694, 716), False, 'import timed\n')]
import matplotlib.pyplot as plt import os import pandas as pd import geopandas as gpd import numpy as np import networkx as nx def map_setup(n_communities, area, small_network=False): # directory of data areas = ['London', 'UK'] if area not in areas: raise ValueError("Invalid area name. Expect...
[ "os.path.join", "networkx.Graph", "numpy.array", "numpy.nanmax", "matplotlib.pyplot.axis", "matplotlib.pyplot.subplots" ]
[((1124, 1134), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (1132, 1134), True, 'import networkx as nx\n'), ((1299, 1332), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)'], {'figsize': '(15, 15)'}), '(1, figsize=(15, 15))\n', (1311, 1332), True, 'import matplotlib.pyplot as plt\n'), ((1363, 1378), 'matplotlib...
import file_helper import shutil import os import re import yaml import json # # The `specification` folder in the azure-rest-api-specs repo contains the folder hierarchy for the swagger specs # # specification # |-service1 (e.g. `cdn` or `compute`) # | |-common # | |-quickstart-tem...
[ "os.path.exists", "re.compile", "json.dumps", "os.scandir", "yaml.load", "file_helper.copy_file_ensure_paths", "file_helper.copy_child_folder_if_exists", "os.path.isfile", "re.search" ]
[((3636, 3697), 're.compile', 're.compile', (['"""openapi-type: [a-z\\\\-]+\ntag: ([a-z\\\\-0-9]*)"""'], {}), '("""openapi-type: [a-z\\\\-]+\ntag: ([a-z\\\\-0-9]*)""")\n', (3646, 3697), False, 'import re\n'), ((3719, 3771), 're.compile', 're.compile', (['"""### Tag: (package-[0-9]{4}-[0-9]{2}.*)"""'], {}), "('### Tag: ...