code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import io import asyncio import threading import queue import logging from starlette import concurrency logger = logging.getLogger('vaex.file.async') class WriteStream(io.RawIOBase): '''File like object that has a sync write API, and a generator as consumer. This is useful for letting 1 thread write t...
[ "logging.getLogger", "queue.Queue" ]
[((116, 152), 'logging.getLogger', 'logging.getLogger', (['"""vaex.file.async"""'], {}), "('vaex.file.async')\n", (133, 152), False, 'import logging\n'), ((577, 600), 'queue.Queue', 'queue.Queue', (['queue_size'], {}), '(queue_size)\n', (588, 600), False, 'import queue\n')]
import warnings from pyansys._version import __version__ from pyansys.archive import Archive, write_cmblock, write_nblock, save_as_archive from pyansys.binary_reader import * from pyansys.cyclic_reader import * from pyansys.binary_reader import FullReader from pyansys.cellquality import * from pyansys.convert import ...
[ "pyansys.ansys.check_valid_ansys" ]
[((659, 684), 'pyansys.ansys.check_valid_ansys', 'ansys.check_valid_ansys', ([], {}), '()\n', (682, 684), False, 'from pyansys import ansys\n')]
from random import randint import os from locust import HttpLocust, TaskSet, task MAX_TIME = int(os.environ.get("MAX_TIME", 2000)) print(f"Response time should not be higher than {MAX_TIME} ms") class APITasks(TaskSet): def on_start(self): for i in range(1, 6): book = { "Tit...
[ "locust.task", "os.environ.get", "random.randint" ]
[((100, 132), 'os.environ.get', 'os.environ.get', (['"""MAX_TIME"""', '(2000)'], {}), "('MAX_TIME', 2000)\n", (114, 132), False, 'import os\n'), ((750, 758), 'locust.task', 'task', (['(10)'], {}), '(10)\n', (754, 758), False, 'from locust import HttpLocust, TaskSet, task\n'), ((906, 913), 'locust.task', 'task', (['(5)'...
import unittest from katas.kyu_7.sum_squares_of_numbers_in_list_that_may_contain_more_lists \ import SumSquares class SumSquaresTestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual(SumSquares([1, 2, 3]), 14) def test_equal_2(self): self.assertEqual(SumSquares([[1, 2], 3]...
[ "katas.kyu_7.sum_squares_of_numbers_in_list_that_may_contain_more_lists.SumSquares" ]
[((217, 238), 'katas.kyu_7.sum_squares_of_numbers_in_list_that_may_contain_more_lists.SumSquares', 'SumSquares', (['[1, 2, 3]'], {}), '([1, 2, 3])\n', (227, 238), False, 'from katas.kyu_7.sum_squares_of_numbers_in_list_that_may_contain_more_lists import SumSquares\n'), ((298, 321), 'katas.kyu_7.sum_squares_of_numbers_i...
import numpy as np import pybullet as p import pybullet_data as pd import pybullet_utils.bullet_client as bc from gym import spaces try: from .. import Environment from .robots import get_robot from .tasks import get_task except ImportError: from karolos.environments import Environment from karolos...
[ "pybullet.resetDebugVisualizerCamera", "pybullet.getPhysicsEngineParameters", "pybullet_data.getDataPath", "karolos.environments.robot_task_environments.tasks.get_task", "gym.spaces.Dict", "time.sleep", "karolos.environments.robot_task_environments.robots.get_robot", "pybullet_utils.bullet_client.Bull...
[((3306, 3422), 'pybullet.resetDebugVisualizerCamera', 'p.resetDebugVisualizerCamera', ([], {'cameraDistance': '(1.5)', 'cameraYaw': '(70)', 'cameraPitch': '(-27)', 'cameraTargetPosition': '(0, 0, 0)'}), '(cameraDistance=1.5, cameraYaw=70, cameraPitch=\n -27, cameraTargetPosition=(0, 0, 0))\n', (3334, 3422), True, '...
from typing import Any from graphscale.grapple.graphql_printer import print_graphql_defs from graphscale.grapple.parser import parse_grapple def assert_graphql_def(snapshot: Any, graphql: str) -> None: result = print_graphql_defs(parse_grapple(graphql)) snapshot.assert_match(result) def test_basic_type(sna...
[ "graphscale.grapple.parser.parse_grapple" ]
[((237, 259), 'graphscale.grapple.parser.parse_grapple', 'parse_grapple', (['graphql'], {}), '(graphql)\n', (250, 259), False, 'from graphscale.grapple.parser import parse_grapple\n')]
from datetime import timedelta from openprocurement.auctions.core.utils import ( get_now ) def auction_patch_field_mode(test_case): auth = test_case.app.authorization # auth as administrator test_case.app.authorization = ('Basic', ('administrator', '')) new_mode = 'test' request_data = {"d...
[ "openprocurement.auctions.core.utils.get_now", "datetime.timedelta" ]
[((919, 928), 'openprocurement.auctions.core.utils.get_now', 'get_now', ([], {}), '()\n', (926, 928), False, 'from openprocurement.auctions.core.utils import get_now\n'), ((931, 949), 'datetime.timedelta', 'timedelta', ([], {'days': '(42)'}), '(days=42)\n', (940, 949), False, 'from datetime import timedelta\n')]
# Generated by Django 2.2.6 on 2020-03-09 16:49 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('yatranepal', '0027_auto_20200224_0041'), ] operations = [ migrations.AlterField( model_name='status', ...
[ "datetime.datetime", "django.db.migrations.DeleteModel" ]
[((499, 544), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""Transportation"""'}), "(name='Transportation')\n", (521, 544), False, 'from django.db import migrations, models\n'), ((577, 626), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""TransportationTy...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
[ "logging.getLogger", "logging.StreamHandler", "google.cloud.bigquery.ArrayQueryParameter", "google.cloud.bigquery.job.CopyJobConfig", "google.cloud.logging.Client", "getpass.getuser", "google.cloud.bigquery.table.TableReference", "argparse.ArgumentParser", "functools.wraps", "socket.gethostname", ...
[((1574, 1597), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (1592, 1597), False, 'import os\n'), ((1618, 1651), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (1639, 1651), False, 'import logging\n'), ((2044, 2059), 'google.cloud.logging.Client', ...
# -*- coding: utf-8 -*- ''' Created on 2017. 6. 12. @author: HyechurnJang ''' import re class Network: @classmethod def isIP(cls, ip): kv = re.match('\s*(?P<ip>\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?)', ip) if kv != None: return kv.group('ip') return None @clas...
[ "re.match" ]
[((171, 256), 're.match', 're.match', (['"""\\\\s*(?P<ip>\\\\d\\\\d?\\\\d?\\\\.\\\\d\\\\d?\\\\d?\\\\.\\\\d\\\\d?\\\\d?\\\\.\\\\d\\\\d?\\\\d?)"""', 'ip'], {}), "('\\\\s*(?P<ip>\\\\d\\\\d?\\\\d?\\\\.\\\\d\\\\d?\\\\d?\\\\.\\\\d\\\\d?\\\\d?\\\\.\\\\d\\\\d?\\\\d?)',\n ip)\n", (179, 256), False, 'import re\n'), ((368, 453...
#!/usr/bin/python3 """ Parser for gfycat site. For now, it can only parse direct links to videos. By default, it only downloads .webm format. """ from urllib.request import urlopen from selenium import webdriver from bs4 import BeautifulSoup __author__ = 'petarGitNik' __copyright__ = 'Copyright (c) 2017 petarGitN...
[ "urllib.request.urlopen" ]
[((713, 730), 'urllib.request.urlopen', 'urlopen', (['self.url'], {}), '(self.url)\n', (720, 730), False, 'from urllib.request import urlopen\n')]
# -*- coding: utf-8 -*- # test_nabsH.py # This module provides the tests for the nabsH function. # Copyright 2014 <NAME> # This file is part of python-deltasigma. # # python-deltasigma is a 1:1 Python replacement of Richard Schreier's # MATLAB delta sigma toolbox (aka "delsigma"), upon which it is heavily based. # The ...
[ "numpy.allclose", "deltasigma.evalTF", "numpy.exp", "numpy.linspace", "deltasigma.nabsH" ]
[((1001, 1048), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * np.pi)'], {'num': 'N', 'endpoint': '(True)'}), '(0, 2 * np.pi, num=N, endpoint=True)\n', (1012, 1048), True, 'import numpy as np\n'), ((1059, 1075), 'numpy.exp', 'np.exp', (['(1.0j * w)'], {}), '(1.0j * w)\n', (1065, 1075), True, 'import numpy as np\n'), (...
import pytest from web3.module import ( Module, ) # --- inherit from `web3.module.Module` class --- # @pytest.fixture(scope='module') def module1(): class Module1(Module): a = 'a' @property def b(self): return 'b' return Module1 @pytest.fixture(scope='module') def ...
[ "pytest.fixture" ]
[((111, 141), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (125, 141), False, 'import pytest\n'), ((285, 315), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (299, 315), False, 'import pytest\n'), ((459, 489), 'pytest.fixture', 'p...
import sys import pytest import torch import torch.nn as nn sys.path.append("..") from torch_runner import EarlyStopping, AverageMeter TEST_SCORE = 100 @pytest.fixture def model(): return nn.Sequential(nn.Linear(8, 8, bias=False)) @pytest.fixture def optimizer(model): return torch.optim.Adam(model.paramet...
[ "torch_runner.AverageMeter", "torch_runner.EarlyStopping", "sys.path.append", "torch.nn.Linear" ]
[((61, 82), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (76, 82), False, 'import sys\n'), ((367, 381), 'torch_runner.AverageMeter', 'AverageMeter', ([], {}), '()\n', (379, 381), False, 'from torch_runner import EarlyStopping, AverageMeter\n'), ((832, 847), 'torch_runner.EarlyStopping', 'EarlyS...
import random from cbas.cbas_base import CBASBaseTest from Jython_tasks.task import CreateDatasetsTask, DropDatasetsTask, \ CreateSynonymsTask, DropSynonymsTask, DropDataversesTask, \ CreateCBASIndexesTask, DropCBASIndexesTask, CreateUDFTask, DropUDFTask from cbas_utils.cbas_utils_v2 import BackupUtils from re...
[ "random.choice", "Jython_tasks.task.CreateSynonymsTask", "Jython_tasks.task.CreateUDFTask", "Jython_tasks.task.CreateDatasetsTask", "Jython_tasks.task.DropUDFTask", "Jython_tasks.task.CreateCBASIndexesTask", "urllib.quote", "Jython_tasks.task.DropDatasetsTask", "Jython_tasks.task.DropCBASIndexesTask...
[((2141, 2193), 'cbas_utils.cbas_utils_v2.BackupUtils', 'BackupUtils', (['self.cluster.servers[0]', 'self.cbas_node'], {}), '(self.cluster.servers[0], self.cbas_node)\n', (2152, 2193), False, 'from cbas_utils.cbas_utils_v2 import BackupUtils\n'), ((5734, 6028), 'Jython_tasks.task.CreateDatasetsTask', 'CreateDatasetsTas...
# ----------------------------------------------------------------------------- # Copyright (c) <NAME>. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- """Schema service...
[ "click.option", "osducli.click_cli.command_with_output", "click.command", "osducli.cliclient.CliOsduClient" ]
[((544, 559), 'click.command', 'click.command', ([], {}), '()\n', (557, 559), False, 'import click\n'), ((561, 631), 'click.option', 'click.option', (['"""-k"""', '"""--kind"""'], {'required': '(True)', 'help': '"""Kind of the schema"""'}), "('-k', '--kind', required=True, help='Kind of the schema')\n", (573, 631), Fal...
from setuptools import setup setup(name='pymongo_smart_auth', version='1.2.1', description='This package extends PyMongo to provide built-in smart authentication.', url='https://github.com/PLPeeters/PyMongo-Smart-Auth', author='<NAME>', author_email='<EMAIL>', license='MIT', p...
[ "setuptools.setup" ]
[((30, 436), 'setuptools.setup', 'setup', ([], {'name': '"""pymongo_smart_auth"""', 'version': '"""1.2.1"""', 'description': '"""This package extends PyMongo to provide built-in smart authentication."""', 'url': '"""https://github.com/PLPeeters/PyMongo-Smart-Auth"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAI...
#!/usr/bin/env python3 """ script for merging separate fastq files into an interleaved fastq file """ import sys import os import itertools import gzip def fq_merge(R1, R2): """ merge separate fastq files """ c = itertools.cycle([1, 2, 3, 4]) for r1, r2 in zip(R1, R2): n = next(c) ...
[ "itertools.chain", "itertools.cycle", "gzip.open" ]
[((232, 261), 'itertools.cycle', 'itertools.cycle', (['[1, 2, 3, 4]'], {}), '([1, 2, 3, 4])\n', (247, 261), False, 'import itertools\n'), ((695, 714), 'gzip.open', 'gzip.open', (['R1', '"""rt"""'], {}), "(R1, 'rt')\n", (704, 714), False, 'import gzip\n'), ((716, 735), 'gzip.open', 'gzip.open', (['R2', '"""rt"""'], {}),...
from django.utils.translation import get_language from django import template from django.utils.safestring import mark_safe register = template.Library() LANG_TO_FLAG = { 'da': 'flag-icon-dk', 'en': 'flag-icon-gb', 'pl': 'flag-icon-pl', } @register.simple_tag def language_flag(lang=None): if not lan...
[ "django.template.Library", "django.utils.translation.get_language" ]
[((136, 154), 'django.template.Library', 'template.Library', ([], {}), '()\n', (152, 154), False, 'from django import template\n'), ((338, 352), 'django.utils.translation.get_language', 'get_language', ([], {}), '()\n', (350, 352), False, 'from django.utils.translation import get_language\n')]
from builtins import str from builtins import zip #!/usr/bin/env python from nipype.interfaces.base import ( CommandLine, CommandLineInputSpec, TraitedSpec, File, Directory, ) from nipype.interfaces.base import traits, isdefined, BaseInterface from nipype.interfaces.utility import Merge, Split, Fu...
[ "csv.DictWriter", "collections.OrderedDict", "nipype.interfaces.utility.Function", "RF12BRAINSCutWrapper.RF12BRAINSCutWrapper", "nipype.interfaces.utility.Merge", "os.path.abspath", "builtins.str", "SimpleITK.WriteImage", "builtins.zip", "SimpleITK.ReadImage", "nipype.interfaces.utility.Identity...
[((2327, 2370), 'SimpleITK.WriteImage', 'sitk.WriteImage', (['labelImage', 'LabelImageName'], {}), '(labelImage, LabelImageName)\n', (2342, 2370), True, 'import SimpleITK as sitk\n'), ((2381, 2414), 'SimpleITK.LabelStatisticsImageFilter', 'sitk.LabelStatisticsImageFilter', ([], {}), '()\n', (2412, 2414), True, 'import ...
""" JoystickXL Example #6 - HOTAS (Hands On Throttle And Stick) Stick Component. Tested on an Adafruit Grand Central M4 Express, but should work on other CircuitPython boards with a sufficient quantity/type of pins. * Stick buttons are on pins D22-D37 * Stick axes are on pins A8-A11 * Stick hat switches are on pins D...
[ "joystick_xl.joystick.Joystick", "joystick_xl.inputs.Hat", "joystick_xl.inputs.Button", "busio.UART", "joystick_xl.inputs.Axis", "struct.unpack_from" ]
[((854, 914), 'busio.UART', 'busio.UART', (['board.TX', 'board.RX'], {'baudrate': '(115200)', 'timeout': '(0.1)'}), '(board.TX, board.RX, baudrate=115200, timeout=0.1)\n', (864, 914), False, 'import busio\n'), ((1260, 1270), 'joystick_xl.joystick.Joystick', 'Joystick', ([], {}), '()\n', (1268, 1270), False, 'from joyst...
""" Module contains tasks to be executed asynchronously by Celery worker nodes. """ from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.auth import get_user_model from django.urls import reverse from django.utils.translation import gettext as _ from edd.notify.backend impor...
[ "django.contrib.auth.get_user_model", "django.utils.translation.gettext", "celery.utils.log.get_task_logger", "edd.notify.backend.RedisBroker", "celery.shared_task", "django.urls.reverse" ]
[((501, 526), 'celery.utils.log.get_task_logger', 'get_task_logger', (['__name__'], {}), '(__name__)\n', (516, 526), False, 'from celery.utils.log import get_task_logger\n'), ((530, 552), 'celery.shared_task', 'shared_task', ([], {'bind': '(True)'}), '(bind=True)\n', (541, 552), False, 'from celery import shared_task\n...
# Generated by Django 2.2 on 2021-09-14 07:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('waterApp', '0015_auto_20210914_1323'), ] operations = [ migrations.RemoveField( model_name='gwmonitoringkobo', name='i...
[ "django.db.models.DateField", "django.db.migrations.RemoveField", "django.db.models.IntegerField" ]
[((234, 298), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""gwmonitoringkobo"""', 'name': '"""id"""'}), "(model_name='gwmonitoringkobo', name='id')\n", (256, 298), False, 'from django.db import migrations, models\n'), ((452, 490), 'django.db.models.DateField', 'models.DateField',...
import json import logging import random from pathlib import Path from discord.ext import commands from bot.bot import Bot log = logging.getLogger(__name__) NAMES = json.loads(Path("bot/resources/pride/drag_queen_names.json").read_text("utf8")) class DragNames(commands.Cog): """Gives a random drag queen name!...
[ "logging.getLogger", "random.choice", "discord.ext.commands.command", "pathlib.Path" ]
[((132, 159), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (149, 159), False, 'import logging\n'), ((330, 401), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""dragname"""', 'aliases': "('dragqueenname', 'queenme')"}), "(name='dragname', aliases=('dragqueenname', '...
# -*- coding: utf-8 -*- # ็Žฏๅขƒ็ฎก็†่ทฏๅพ„ # Created: 2016-7-22 # Copyright: (c) 2016<<EMAIL>> from django.conf.urls import url from . import views # ๆ‰€ๆœ‰ๅŸบ็ก€ๆจกๅ—็ฎก็†็š„url้…็ฝฎ urlpatterns = [ url(r'^VerList/$', views.get_versions), url(r'^VerDetail/$', views.get_ver), url(r'^newVer/$', views.add_ver), url(r'^updateVer...
[ "django.conf.urls.url" ]
[((181, 218), 'django.conf.urls.url', 'url', (['"""^VerList/$"""', 'views.get_versions'], {}), "('^VerList/$', views.get_versions)\n", (184, 218), False, 'from django.conf.urls import url\n'), ((225, 259), 'django.conf.urls.url', 'url', (['"""^VerDetail/$"""', 'views.get_ver'], {}), "('^VerDetail/$', views.get_ver)\n",...
from __future__ import print_function from time import sleep from smartcard.CardMonitoring import CardMonitor, CardObserver from smartcard.util import toHexString # a simple card observer that prints inserted/removed cards class PrintObserver(CardObserver): """A simple card observer that is notified when ca...
[ "smartcard.CardMonitoring.CardMonitor", "smartcard.util.toHexString", "time.sleep", "sys.stdin.read" ]
[((835, 848), 'smartcard.CardMonitoring.CardMonitor', 'CardMonitor', ([], {}), '()\n', (846, 848), False, 'from smartcard.CardMonitoring import CardMonitor, CardObserver\n'), ((931, 940), 'time.sleep', 'sleep', (['(10)'], {}), '(10)\n', (936, 940), False, 'from time import sleep\n'), ((1165, 1182), 'sys.stdin.read', 's...
from pathlib import Path from importlib import import_module from collections import defaultdict def noop(*args, **kwargs): pass def get_puzzle(day, nostrip=False, nolines=False): target = Path.cwd() / "inputs" / f"day{day:02}.txt" if not target.exists(): return None text = target.read_text()...
[ "pathlib.Path.cwd", "collections.defaultdict", "importlib.import_module" ]
[((620, 646), 'collections.defaultdict', 'defaultdict', (['(lambda : noop)'], {}), '(lambda : noop)\n', (631, 646), False, 'from collections import defaultdict\n'), ((1357, 1398), 'importlib.import_module', 'import_module', (['f""".{package}"""', '"""solutions"""'], {}), "(f'.{package}', 'solutions')\n", (1370, 1398), ...
#!/usr/bin/env python3 from astroquery.mast import Observations obs = Observations.query_criteria( dataproduct_type=['image'], project='HST', instrument_name='ACS/WFC', filters='F555W', calib_level=3, ) print("Observations: ", len(obs)) products = Observations.get_product_list(obs) print("Produc...
[ "astroquery.mast.Observations.filter_products", "astroquery.mast.Observations.get_product_list", "astroquery.mast.Observations.query_criteria", "astroquery.mast.Observations.download_products" ]
[((72, 205), 'astroquery.mast.Observations.query_criteria', 'Observations.query_criteria', ([], {'dataproduct_type': "['image']", 'project': '"""HST"""', 'instrument_name': '"""ACS/WFC"""', 'filters': '"""F555W"""', 'calib_level': '(3)'}), "(dataproduct_type=['image'], project='HST',\n instrument_name='ACS/WFC', fil...
#!/usr/bin/env python3 import sys import gzip import argparse import logging import Levenshtein def load_barcodes(args): bcs = {} with open(args.barcodes) as f: for line in f: fields = line.rstrip('\n').split('\t') index, adapter = fields[0], fields[1] bcs[index] = bcs.get(index, []) + [adapter] return ...
[ "logging.basicConfig", "argparse.ArgumentParser", "gzip.open", "Levenshtein.distance", "logging.info" ]
[((739, 767), 'gzip.open', 'gzip.open', (['args.index1', '"""rt"""'], {}), "(args.index1, 'rt')\n", (748, 767), False, 'import gzip\n'), ((774, 802), 'gzip.open', 'gzip.open', (['args.index2', '"""rt"""'], {}), "(args.index2, 'rt')\n", (783, 802), False, 'import gzip\n'), ((809, 837), 'gzip.open', 'gzip.open', (['args....
# ====================================================================== # Created by <NAME>, <NAME>, <NAME> 11/2021 # ====================================================================== import numpy as np from parameters import * from variables import * import equations #======================================...
[ "numpy.copy", "numpy.zeros", "numpy.empty", "equations.f_ctt" ]
[((1628, 1646), 'numpy.zeros', 'np.zeros', (['N', 'float'], {}), '(N, float)\n', (1636, 1646), True, 'import numpy as np\n'), ((2530, 2548), 'numpy.empty', 'np.empty', (['M', 'float'], {}), '(M, float)\n', (2538, 2548), True, 'import numpy as np\n'), ((2579, 2590), 'numpy.zeros', 'np.zeros', (['s'], {}), '(s)\n', (2587...
from setuptools import setup, find_packages from setuptools.dist import Distribution import sys import sysconfig if sys.version_info < (3, 0): sys.exit('Sorry, Python < 3.0 is not supported') class BinaryDistribution(Distribution): """Distribution which always forces a binary package with platform name""" ...
[ "setuptools.find_packages", "sysconfig.get_config_var", "sys.exit" ]
[((148, 196), 'sys.exit', 'sys.exit', (['"""Sorry, Python < 3.0 is not supported"""'], {}), "('Sorry, Python < 3.0 is not supported')\n", (156, 196), False, 'import sys\n'), ((531, 546), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (544, 546), False, 'from setuptools import setup, find_packages\n'), (...
# standard imports from landsat_metadata import landsat_metadata from dnppy import core import math import os import arcpy if arcpy.CheckExtension('Spatial')=='Available': arcpy.CheckOutExtension('Spatial') arcpy.env.overwriteOutput = True __all__=['toa_reflectance_8', # complete 'toa_re...
[ "landsat_metadata.landsat_metadata", "arcpy.ExecuteError", "arcpy.CheckExtension", "dnppy.core.enf_list", "arcpy.CheckOutExtension", "arcpy.AddError", "os.path.split", "math.cos", "dnppy.core.create_outname", "arcpy.Raster", "os.path.abspath", "arcpy.sa.SetNull", "math.sin" ]
[((127, 158), 'arcpy.CheckExtension', 'arcpy.CheckExtension', (['"""Spatial"""'], {}), "('Spatial')\n", (147, 158), False, 'import arcpy\n'), ((177, 211), 'arcpy.CheckOutExtension', 'arcpy.CheckOutExtension', (['"""Spatial"""'], {}), "('Spatial')\n", (200, 211), False, 'import arcpy\n'), ((1144, 1168), 'dnppy.core.enf_...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ "google.oauth2.service_account.Credentials.from_service_account_info", "google.auth.transport.mtls.default_client_cert_source", "google.api_core.operation.from_gapic", "re.compile", "google.cloud.certificate_manager_v1.types.certificate_manager.GetDnsAuthorizationRequest", "google.auth.exceptions.MutualTL...
[((2426, 2439), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (2437, 2439), False, 'from collections import OrderedDict\n'), ((5058, 5177), 're.compile', 're.compile', (['"""(?P<name>[^.]+)(?P<mtls>\\\\.mtls)?(?P<sandbox>\\\\.sandbox)?(?P<googledomain>\\\\.googleapis\\\\.com)?"""'], {}), "(\n '(?P<name...
from fastapi.testclient import TestClient import mock import json from .main import app client = TestClient(app) def test_read_main(): response = client.get("/") assert response.status_code == 200 assert response.json() == {"Hello": "Challenge"} class TestMostCommon(): def _side_effect(self, input, ...
[ "fastapi.testclient.TestClient", "mock.patch" ]
[((98, 113), 'fastapi.testclient.TestClient', 'TestClient', (['app'], {}), '(app)\n', (108, 113), False, 'from fastapi.testclient import TestClient\n'), ((745, 786), 'mock.patch', 'mock.patch', (['"""app.routers.get_api_results"""'], {}), "('app.routers.get_api_results')\n", (755, 786), False, 'import mock\n'), ((1574,...
from datetime import datetime import logging import os import requests logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO) if __name__ == "__main__": slack_bot_token = os.getenv("SLACK_BOT_TOKEN") rest_url = os.getenv("CB_REST_URL") slack_channel = os.getenv("SLACK_CHANNEL") ...
[ "logging.basicConfig", "os.getenv", "datetime.datetime.utcnow", "requests.get", "logging.info" ]
[((73, 149), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s: %(message)s"""', 'level': 'logging.INFO'}), "(format='%(levelname)s: %(message)s', level=logging.INFO)\n", (92, 149), False, 'import logging\n'), ((202, 230), 'os.getenv', 'os.getenv', (['"""SLACK_BOT_TOKEN"""'], {}), "('SLACK...
import os import argparse import logging from . import QtWidgets, QtCore from .log import setupLogging from .server.application import startServerGuiApplication from .server.core import startServer from .client import Client from .gui import widgetDialog from .gui.instruments import ParameterManagerGui setupLogging(a...
[ "logging.getLogger", "os.path.abspath", "argparse.ArgumentParser" ]
[((413, 450), 'logging.getLogger', 'logging.getLogger', (['"""instrumentserver"""'], {}), "('instrumentserver')\n", (430, 450), False, 'import logging\n'), ((845, 913), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Starting the instrumentserver"""'}), "(description='Starting the instrum...
# -*- coding:utf-8 -*- """ Twilio Phone Call API. https://www.twilio.com/ Author: HuangTao Date: 2018/12/04 Email: <EMAIL> """ from quant.utils.http_client import AsyncHttpRequests class Twilio: """ Twilio Phone Call API. """ BASE_URL = "https://api.twilio.com" @classmethod async def call_p...
[ "quant.utils.http_client.AsyncHttpRequests.fetch" ]
[((1080, 1127), 'quant.utils.http_client.AsyncHttpRequests.fetch', 'AsyncHttpRequests.fetch', (['"""POST"""', 'url'], {'body': 'data'}), "('POST', url, body=data)\n", (1103, 1127), False, 'from quant.utils.http_client import AsyncHttpRequests\n')]
import main import glob import PIL.Image import os def crawling(keyword): _skip = False _threads = 4 _google = True _naver = False _full = True _face = False _limit = 10 _no_gui = _full _keyword = keyword print('Options - skip:{}, threads:{}, google:{}, naver:{}, full_resolutio...
[ "main.AutoCrawler", "glob.glob" ]
[((477, 668), 'main.AutoCrawler', 'main.AutoCrawler', ([], {'skip_already_exist': '_skip', 'n_threads': '_threads', 'do_google': '_google', 'do_naver': '_naver', 'full_resolution': '_full', 'face': '_face', 'no_gui': '_no_gui', 'limit': '_limit', 'keyword': '_keyword'}), '(skip_already_exist=_skip, n_threads=_threads, ...
import numpy as np import pandas as pd from sklearn.linear_model import Lasso from oolearning.model_wrappers.HyperParamsBase import HyperParamsBase from oolearning.model_wrappers.ModelExceptions import MissingValueError from oolearning.model_wrappers.ModelWrapperBase import ModelWrapperBase from oolearning.model_wrapp...
[ "oolearning.model_wrappers.ModelExceptions.MissingValueError", "numpy.isnan", "sklearn.linear_model.Lasso" ]
[((1624, 1701), 'sklearn.linear_model.Lasso', 'Lasso', ([], {'alpha': "param_dict['alpha']", 'fit_intercept': '(True)', 'random_state': 'self._seed'}), "(alpha=param_dict['alpha'], fit_intercept=True, random_state=self._seed)\n", (1629, 1701), False, 'from sklearn.linear_model import Lasso\n'), ((1511, 1530), 'oolearni...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE ่“้ฒธๅŸบ็ก€ๅนณๅฐ available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE ่“้ฒธๅŸบ็ก€ๅนณๅฐ is licensed under the MIT License. License for BK-BASE ่“้ฒธๅŸบ็ก€ๅนณๅฐ: ---------------------------------------------...
[ "json.loads", "jobnavi.api.jobnavi_api.JobNaviApi", "common.decorators.params_valid", "rest_framework.response.Response", "common.decorators.list_route", "jobnavi.exception.exceptions.InterfaceError" ]
[((1979, 2020), 'common.decorators.params_valid', 'params_valid', ([], {'serializer': 'CommonSerializer'}), '(serializer=CommonSerializer)\n', (1991, 2020), False, 'from common.decorators import params_valid, list_route\n'), ((2917, 2958), 'common.decorators.params_valid', 'params_valid', ([], {'serializer': 'CommonSer...
import asyncio import discord import timeit import code.get as get import urllib import urllib.request as urllib2 import bs4 import aiohttp import random import requests import os import logging import imgurpython from bs4 import BeautifulSoup from discord.ext import commands from imgurpython import Imgu...
[ "logging.getLogger", "aiohttp.ClientSession", "code.misc_shitpost.shitpost", "random.choice", "os.path.exists", "random.randint", "code.bot.getPrefix", "urllib.request.urlopen", "os.path.isfile", "os.mkdir", "code.misc_savage.savage", "code.misc_pickup.pickup", "discord.ext.commands.command"...
[((729, 756), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (746, 756), False, 'import logging\n'), ((946, 981), 'discord.ext.commands.command', 'commands.command', ([], {'pass_context': '(True)'}), '(pass_context=True)\n', (962, 981), False, 'from discord.ext import commands\n'), ((1176...
try: import ujson as json except: import json from exception import RainradarException filePath="config.json" class Config: def __init__(self): self.config = { 'ssid':'change_me', 'password':'<PASSWORD>', 'plz':'change_me' } def readConfig(...
[ "json.load", "exception.RainradarException", "json.dumps", "json.dump" ]
[((880, 906), 'json.dump', 'json.dump', (['self.config', 'fp'], {}), '(self.config, fp)\n', (889, 906), False, 'import json\n'), ((453, 488), 'exception.RainradarException', 'RainradarException', (['"""ERR CONF FILE"""'], {}), "('ERR CONF FILE')\n", (471, 488), False, 'from exception import RainradarException\n'), ((57...
# app.py to run covid API # created by Russell on 3/6/21 from covid_package.libs.aggregate_data import fetch_latest_data_date from covid_package.api.get_latest_date import get_latest_date from covid_package.api.get_country_data import get_country_data, get_level_1_data, get_l2_keys_data, get_l2_date_data from covid_pa...
[ "flask.request.args.get", "covid_package.libs.valid_keys.fetch_l2_keys", "flask.Flask", "covid_package.libs.valid_keys.valid_fields", "flask_swagger.swagger", "covid_package.api.get_country_data.get_l2_date_data", "sys.path.append", "covid_package.libs.valid_keys.fetch_l0_keys", "covid_package.libs....
[((723, 748), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (738, 748), False, 'import os\n'), ((749, 777), 'sys.path.append', 'sys.path.append', (['CURRENT_DIR'], {}), '(CURRENT_DIR)\n', (764, 777), False, 'import sys\n'), ((826, 870), 'os.path.join', 'os.path.join', (['CURRENT_DIR', '"""da...
import numpy as np import sys import os import keras from keras.optimizers import Adam, RMSprop, SGD from keras.callbacks import ModelCheckpoint import InvasiveModelsFactory import data_config import utils from Models.VggFullPatchesModel import * from Models.VggFullSampleModel import * from Models.ResNet50PatchesModel ...
[ "utils.clear_or_mkdir", "keras.callbacks.ModelCheckpoint", "tensorflow.Session", "os.path.join", "InvasiveModelsFactory.getInvasiveModel", "keras.optimizers.SGD", "tensorflow.ConfigProto", "keras.backend.backend" ]
[((530, 546), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (544, 546), True, 'import tensorflow as tf\n'), ((834, 874), 'InvasiveModelsFactory.getInvasiveModel', 'InvasiveModelsFactory.getInvasiveModel', ([], {}), '()\n', (872, 874), False, 'import InvasiveModelsFactory\n'), ((2179, 2214), 'os.path.joi...
# from ConfigParser import ConfigParser from Queue import Queue from threading import Thread from game.message.C.C_CHECK_VERSION import C_CHECK_VERSION from game.message.opcodes_database import OpcodesDatabase from game.tracker import Tracker class MessagesHandler(Thread): def __init__(self): Th...
[ "threading.Thread.__init__", "game.tracker.Tracker", "game.message.C.C_CHECK_VERSION.C_CHECK_VERSION", "game.message.opcodes_database.OpcodesDatabase", "Queue.Queue" ]
[((318, 339), 'threading.Thread.__init__', 'Thread.__init__', (['self'], {}), '(self)\n', (333, 339), False, 'from threading import Thread\n'), ((395, 402), 'Queue.Queue', 'Queue', ([], {}), '()\n', (400, 402), False, 'from Queue import Queue\n'), ((458, 475), 'game.message.opcodes_database.OpcodesDatabase', 'OpcodesDa...
# Generated by Django 2.2.3 on 2019-08-20 11:24 from django.conf import settings from django.db import migrations, models import django_ilmoitin.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("django_ilmoitin", "0001_ini...
[ "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((224, 281), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (255, 281), False, 'from django.db import migrations, models\n'), ((495, 632), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'hel...
# Copyright 2014 CloudFounders NV # # 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 writ...
[ "ovs.dal.dataobject.DataObject.__init__", "ovs.dal.structures.Property", "ovs.dal.structures.Relation", "ovs.extensions.storageserver.storagedriver.MetadataServerClient.load" ]
[((1117, 1210), 'ovs.dal.structures.Property', 'Property', (['"""number"""', 'int'], {'doc': '"""The number of the service in case there are more than one"""'}), "('number', int, doc=\n 'The number of the service in case there are more than one')\n", (1125, 1210), False, 'from ovs.dal.structures import Property, Rel...
import os import pytest from projectile.project import Project, ProjectExistsError def test_create_project(project_folder): p1 = Project('1', project_folder, 'pdf') p2 = Project('2', project_folder, 'pdf') p1_ = Project('1', project_folder, 'pdf') def test_create_folder(project_folder): Project('1...
[ "os.path.join", "projectile.project.Project", "pytest.raises" ]
[((137, 172), 'projectile.project.Project', 'Project', (['"""1"""', 'project_folder', '"""pdf"""'], {}), "('1', project_folder, 'pdf')\n", (144, 172), False, 'from projectile.project import Project, ProjectExistsError\n'), ((182, 217), 'projectile.project.Project', 'Project', (['"""2"""', 'project_folder', '"""pdf"""']...
# Kepler Challenge import os, sys from numpy import cross, pi, sqrt from numpy.linalg import norm from time import sleep from datetime import datetime, timezone from kepler import pvt2kepler, prop, kepler2pvt from timeout import timeout, TimeoutError time = int(os.getenv("TIMEOUT",60*3)) def render_intro(vec): a...
[ "kepler.prop", "os.getenv", "datetime.datetime.strptime", "kepler.pvt2kepler", "time.sleep", "timeout.timeout", "sys.exit", "kepler.kepler2pvt", "sys.stdout.flush", "sys.stdout.write" ]
[((2477, 2490), 'timeout.timeout', 'timeout', (['time'], {}), '(time)\n', (2484, 2490), False, 'from timeout import timeout, TimeoutError\n'), ((264, 292), 'os.getenv', 'os.getenv', (['"""TIMEOUT"""', '(60 * 3)'], {}), "('TIMEOUT', 60 * 3)\n", (273, 292), False, 'import os, sys\n'), ((991, 999), 'time.sleep', 'sleep', ...
# Copyright (C) 2021 The Xaya developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Utilities for running Xaya X connected to an Ethereum node from Python, e.g. for integration tests. """ from xayagametest import xaya ...
[ "logging.getLogger", "os.path.exists", "os.getenv", "eth_account.messages.encode_defunct", "web3.Web3.HTTPProvider", "subprocess.Popen", "os.path.join", "time.sleep", "json.load", "jsonrpclib.ServerProxy", "os.mkdir", "shutil.rmtree", "os.path.abspath", "eth_account.Account.create" ]
[((934, 958), 'os.path.join', 'os.path.join', (['path', 'name'], {}), '(path, name)\n', (946, 958), False, 'import os\n'), ((893, 918), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (908, 918), False, 'import os\n'), ((1143, 1167), 'os.path.exists', 'os.path.exists', (['fileName'], {}), '(fi...
##Copyright (c) 2014 - 2020, The Trustees of Indiana University. ## ##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 a...
[ "keras.optimizers.Adam", "math.ceil", "EnvCNN.Data.train_model_util.create_output_directory", "EnvCNN.Data.train_model_util.get_class_weight", "os.path.join", "EnvCNN.Data.train_model_util.print_training_history", "h5py.File", "EnvCNN.Data.models.vgg", "keras.callbacks.EarlyStopping", "EnvCNN.Data...
[((807, 818), 'time.time', 'time.time', ([], {}), '()\n', (816, 818), False, 'import time\n'), ((872, 922), 'EnvCNN.Data.train_model_util.create_output_directory', 'train_model_util.create_output_directory', (['"""output"""'], {}), "('output')\n", (912, 922), True, 'import EnvCNN.Data.train_model_util as train_model_ut...
import pickle import sys import dill from pathos.pools import ProcessPool id_number, num_cores = sys.argv[1:3] with open('data_{}.pkl'.format(id_number), 'rb') as fp: func, args_set = dill.load(fp) pool = ProcessPool(nodes=int(num_cores)) results = list(pool.imap(func, *zip(*args_set))) # results = [ # func...
[ "pickle.dump", "dill.load" ]
[((190, 203), 'dill.load', 'dill.load', (['fp'], {}), '(fp)\n', (199, 203), False, 'import dill\n'), ((417, 441), 'pickle.dump', 'pickle.dump', (['results', 'fp'], {}), '(results, fp)\n', (428, 441), False, 'import pickle\n')]
import threading import time from crontab import CronTab __author__ = 'Omry_Nachman' def noop(*arg): return False class RepeatingTask(object): def __init__(self, id, condition_handler, get_next_interval, kill_switch=noop, log=noop): self.condition_handler = condition_handler self.get_next_i...
[ "threading.Timer", "time.localtime", "crontab.CronTab", "time.sleep" ]
[((724, 763), 'threading.Timer', 'threading.Timer', (['interval', 'self.execute'], {}), '(interval, self.execute)\n', (739, 763), False, 'import threading\n'), ((1440, 1456), 'time.localtime', 'time.localtime', ([], {}), '()\n', (1454, 1456), False, 'import time\n'), ((3043, 3060), 'time.sleep', 'time.sleep', (['(0.001...
import unittest import solution class TestQ(unittest.TestCase): def test_case_0(self): self.assertEqual(solution.caesarCipher('middle-Outz', 2), 'okffng-Qwvb') def test_case_1(self): self.assertEqual( solution.caesarCipher('Always-Look-on-the-Bright-Side-of-Life', 5), ...
[ "unittest.main", "solution.caesarCipher" ]
[((405, 420), 'unittest.main', 'unittest.main', ([], {}), '()\n', (418, 420), False, 'import unittest\n'), ((119, 158), 'solution.caesarCipher', 'solution.caesarCipher', (['"""middle-Outz"""', '(2)'], {}), "('middle-Outz', 2)\n", (140, 158), False, 'import solution\n'), ((241, 307), 'solution.caesarCipher', 'solution.c...
#%% from sklearn.ensemble import RandomForestRegressor regressors = [ RandomForestRegressor(n_estimators=10, criterion="mae"), RandomForestRegressor(n_estimators=50, min_samples_leaf=2), RandomForestRegressor(), ] # Above we have a single classification machine learning method called Random Fo...
[ "sklearn.ensemble.RandomForestRegressor", "sklearn.model_selection.train_test_split", "itertools.product", "sklearn.datasets.load_boston", "sklearn.metrics.mean_squared_error" ]
[((1976, 2013), 'sklearn.datasets.load_boston', 'datasets.load_boston', ([], {'return_X_y': '(True)'}), '(return_X_y=True)\n', (1996, 2013), False, 'from sklearn import datasets\n'), ((2061, 2098), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.2)'}), '(X, y, test_size=0....
from collections import Counter from datetime import datetime, timezone from psycopg2 import sql from .tables import Table class Request(Table): """ Database table to log the requests the application makes Attributes: id (int): id of the document url_id (int): foreign key to the url tab...
[ "collections.Counter", "datetime.datetime.now" ]
[((4447, 4456), 'collections.Counter', 'Counter', ([], {}), '()\n', (4454, 4456), False, 'from collections import Counter\n'), ((3123, 3152), 'datetime.datetime.now', 'datetime.now', ([], {'tz': 'timezone.utc'}), '(tz=timezone.utc)\n', (3135, 3152), False, 'from datetime import datetime, timezone\n')]
# 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 to in writing, ...
[ "tempfile.TemporaryDirectory", "random.choice", "json.load", "time.time", "random.randint", "json.dump" ]
[((790, 821), 'random.choice', 'random.choice', (['string.printable'], {}), '(string.printable)\n', (803, 821), False, 'import random\n'), ((1074, 1139), 'random.choice', 'random.choice', (["['scheduled', 'in-progress', 'success', 'failure']"], {}), "(['scheduled', 'in-progress', 'success', 'failure'])\n", (1087, 1139)...
# The MIT License (MIT) # # 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, me...
[ "gc.collect", "displayio.Bitmap", "displayio.Palette" ]
[((10185, 10231), 'displayio.Bitmap', 'displayio.Bitmap', (['self._width', 'self._height', '(2)'], {}), '(self._width, self._height, 2)\n', (10201, 10231), False, 'import displayio\n'), ((10255, 10275), 'displayio.Palette', 'displayio.Palette', (['(2)'], {}), '(2)\n', (10272, 10275), False, 'import displayio\n'), ((106...
from main import ParseArticle prse=ParseArticle(); n=input('Write currency name: ') prse.collectingInform(n)
[ "main.ParseArticle" ]
[((36, 50), 'main.ParseArticle', 'ParseArticle', ([], {}), '()\n', (48, 50), False, 'from main import ParseArticle\n')]
from csv_reader import * from glob import glob import matplotlib.pyplot as plt from scipy.signal import savgol_filter from scipy import optimize from math import * import numpy as np TRM_TIME = 0 TRM_DOWN_NORM = 2 TRM_DOWN_SMOOTH = 3 TRM_UP_NORM = 6 TRM_UP_SMOOTH = 7 path_origami_03_01V_g = '../Paper1_data/Data/Figur...
[ "matplotlib.pyplot.subplots", "glob.glob", "matplotlib.pyplot.show" ]
[((5592, 5607), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)'], {}), '(1)\n', (5604, 5607), True, 'import matplotlib.pyplot as plt\n'), ((6389, 6399), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (6397, 6399), True, 'import matplotlib.pyplot as plt\n'), ((2006, 2054), 'glob.glob', 'glob', (['"""../Or...
""" This file contains Numba-accelerated functions used in the main detections. """ import numpy as np from numba import jit __all__ = [] ############################################################################# # NUMBA JIT UTILITY FUNCTIONS #######################################################################...
[ "numba.jit", "numpy.sqrt" ]
[((330, 383), 'numba.jit', 'jit', (['"""float64(float64[:], float64[:])"""'], {'nopython': '(True)'}), "('float64(float64[:], float64[:])', nopython=True)\n", (333, 383), False, 'from numba import jit\n'), ((758, 811), 'numba.jit', 'jit', (['"""float64(float64[:], float64[:])"""'], {'nopython': '(True)'}), "('float64(f...
import balanced balanced.configure('ak-test-1o9QKwUCrwstHWO5sGxICtIJdQXFTjnrV') dispute = balanced.Dispute.fetch('/disputes/DT7be1ZNkz2SkA9rhBqxynrA')
[ "balanced.configure", "balanced.Dispute.fetch" ]
[((17, 80), 'balanced.configure', 'balanced.configure', (['"""ak-test-1o9QKwUCrwstHWO5sGxICtIJdQXFTjnrV"""'], {}), "('ak-test-1o9QKwUCrwstHWO5sGxICtIJdQXFTjnrV')\n", (35, 80), False, 'import balanced\n'), ((92, 152), 'balanced.Dispute.fetch', 'balanced.Dispute.fetch', (['"""/disputes/DT7be1ZNkz2SkA9rhBqxynrA"""'], {}),...
from django.db import models from django.contrib.auth.models import User from django.utils import timezone ##################################################################### class BlogPost(models.Model): ''' Defines the content of the blog posts. ''' uid= models.AutoField(primary_key = True , db...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.ImageField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((280, 329), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)', 'db_index': '(True)'}), '(primary_key=True, db_index=True)\n', (296, 329), False, 'from django.db import models\n'), ((346, 378), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)'}), '(max_length=2...
from django.contrib import admin from users.models import User class UserAdmin(admin.ModelAdmin): list_display = [ "pk", "id", "fullname", "age", "created_at", "updated_at" ] admin.site.register(User)
[ "django.contrib.admin.site.register" ]
[((193, 218), 'django.contrib.admin.site.register', 'admin.site.register', (['User'], {}), '(User)\n', (212, 218), False, 'from django.contrib import admin\n')]
#!/usr/bin/python """ Name create_ami.py - Create '.ami' file for fluxus network software SYNOPSIS create_ami.py [--snp] <Fasta file> <data> DESCRIPTION Fluxus network .ami file format: ============================================================ ;1.0 <- Unknown CH1;CH2...
[ "Bio.AlignIO.read", "argparse.ArgumentParser", "sys.exit" ]
[((3710, 3797), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Create \'.ami\' file for fluxus next software"""'}), '(description=\n "Create \'.ami\' file for fluxus next software")\n', (3733, 3797), False, 'import argparse\n'), ((4289, 4321), 'Bio.AlignIO.read', 'AlignIO.read', (['ar...
# --------------------------------------------------------------- # layers.py # Set-up time: 2021/1/3 15:14 # Copyright (c) 2020 ICT # Licensed under The MIT License [see LICENSE for details] # Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT # Contact: <EMAIL> [OR] <EMAIL> # ------------------------------------...
[ "torch.nn.GroupNorm", "torch.nn.functional.softmax", "torch.nn.Dropout", "torch.nn.ReLU", "torch.nn.Sequential", "torch.sigmoid", "torch.sin", "math.log", "torch.cos", "torch.arange", "torch.matmul", "torch.sum", "torch.nn.Linear", "torch.zeros", "torch.cat" ]
[((703, 794), 'torch.nn.Linear', 'nn.Linear', (['self.head_config.rnn_size', 'self.attention_config.att_hidden_size'], {'bias': '(False)'}), '(self.head_config.rnn_size, self.attention_config.att_hidden_size,\n bias=False)\n', (712, 794), True, 'import torch.nn as nn\n'), ((813, 876), 'torch.nn.Linear', 'nn.Linear',...
''' IndexPage.py Lib Written By <NAME> Version 20190420v1 ''' # import buildin pkgs import os from flask_restful import Resource from flask_login import login_required from flask import render_template, Response ## import priviate pkgs from app.models.User import User from app import login_manager ## glo...
[ "flask.render_template", "app.models.User.User.getUser" ]
[((562, 583), 'app.models.User.User.getUser', 'User.getUser', (['user_id'], {}), '(user_id)\n', (574, 583), False, 'from app.models.User import User\n'), ((455, 484), 'flask.render_template', 'render_template', (['"""Index.html"""'], {}), "('Index.html')\n", (470, 484), False, 'from flask import render_template, Respon...
import json import re import requests from rich.console import Console LOGIN_URL = "https://www.headspace.com/login" AUTH_URL = "https://auth.headspace.com/co/authenticate" BEARER_TOKEN_URL = "https://auth.headspace.com/authorize" session = requests.Session() console = Console() headers = { "User-Agent": "Mozil...
[ "rich.console.Console", "re.findall", "json.dumps", "requests.Session" ]
[((244, 262), 'requests.Session', 'requests.Session', ([], {}), '()\n', (260, 262), False, 'import requests\n'), ((273, 282), 'rich.console.Console', 'Console', ([], {}), '()\n', (280, 282), False, 'from rich.console import Console\n'), ((697, 745), 're.findall', 're.findall', (['""""clientId":"(.+?)","""', 'response.t...
import file_management as fm import binary_conversion as bc import pytest import datetime PROPER_DATA = r'00100011 00100000 01000010 01111001 01110100 01100101 00101101 01100011 01101111 01101101 01110000 01101001 01101100 01100101 01100100' IMPROPER_DATA = r'00100012 00100000 01000010 01111001 01110100 01100101 00101...
[ "datetime.datetime.now", "binary_conversion.BinConverter", "file_management.BinFile", "pytest.raises" ]
[((704, 721), 'binary_conversion.BinConverter', 'bc.BinConverter', ([], {}), '()\n', (719, 721), True, 'import binary_conversion as bc\n'), ((994, 1011), 'binary_conversion.BinConverter', 'bc.BinConverter', ([], {}), '()\n', (1009, 1011), True, 'import binary_conversion as bc\n'), ((1021, 1033), 'file_management.BinFil...
from project_RL.linear_monte_carlo.monte_carlo_agent import LinearMonteCarlo from project_RL.parsing import linear_parse_observation_to_state from project_RL.play import play from gym_minigrid.wrappers import * from time import time def train(env, hyperparameters): """ Train a sarsa lambda agent in the re...
[ "project_RL.play.play", "project_RL.parsing.linear_parse_observation_to_state", "time.time", "project_RL.linear_monte_carlo.monte_carlo_agent.LinearMonteCarlo" ]
[((480, 621), 'project_RL.linear_monte_carlo.monte_carlo_agent.LinearMonteCarlo', 'LinearMonteCarlo', (['env', "hyperparameters['learning_rate']", "hyperparameters['n_zero']", "hyperparameters['gamma']", "hyperparameters['min_eps']"], {}), "(env, hyperparameters['learning_rate'], hyperparameters[\n 'n_zero'], hyperp...
from __future__ import annotations import ipaddress import datetime import enum import re from typing import Optional, List from sqlalchemy import Column, Integer, Unicode, String, UniqueConstraint from sqlalchemy import Enum, DateTime, Boolean from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship...
[ "sqlalchemy.orm.relationship", "re.compile", "sqlalchemy.Unicode", "sqlalchemy.ForeignKey", "sqlalchemy.UniqueConstraint", "sqlalchemy.String", "sqlalchemy.Enum", "sqlalchemy.Column" ]
[((1812, 1865), 'sqlalchemy.Column', 'Column', (['Integer'], {'autoincrement': '(True)', 'primary_key': '(True)'}), '(Integer, autoincrement=True, primary_key=True)\n', (1818, 1865), False, 'from sqlalchemy import Column, Integer, Unicode, String, UniqueConstraint\n'), ((1980, 2000), 'sqlalchemy.orm.relationship', 'rel...
# Generated by Django 3.1.13 on 2021-10-03 21:19 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('token', '0002_load_data'), ('account', '0001_initial'), ] operations = [ migrations.AddField( ...
[ "django.db.models.DateTimeField", "django.db.migrations.AlterUniqueTogether", "django.db.migrations.RemoveField" ]
[((695, 792), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether', ([], {'name': '"""accounttokens"""', 'unique_together': "{('account', 'token')}"}), "(name='accounttokens', unique_together={(\n 'account', 'token')})\n", (725, 792), False, 'from django.db import migrations, models\n'), ((83...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import discord from discord.ext import commands import kiwi_config from .scpUtils import UTC_TIME __real_owner__ = '<mi id>' class Info: def __init__(self, bot): self.bot = bot @commands.command(description="Informaciรณn sobre kcalcular") async d...
[ "discord.Embed", "discord.ext.commands.command" ]
[((251, 310), 'discord.ext.commands.command', 'commands.command', ([], {'description': '"""Informaciรณn sobre kcalcular"""'}), "(description='Informaciรณn sobre kcalcular')\n", (267, 310), False, 'from discord.ext import commands\n'), ((2978, 3022), 'discord.ext.commands.command', 'commands.command', ([], {'alias': "['Ki...
# -*- coding: utf-8 -*- from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime default_args = { 'owner': 'afroot01' } dag = DAG( 'kd01_news_process', default_args=default_args, catchup=False, schedule_interval='*/20 * * * *', start_date=d...
[ "datetime.datetime", "airflow.operators.bash_operator.BashOperator" ]
[((490, 634), 'airflow.operators.bash_operator.BashOperator', 'BashOperator', ([], {'task_id': '"""update_cluster_id"""', 'bash_command': '"""sh /usr/lib/carter/kd_news_process/scripts/step1/updateClusterId.sh """', 'dag': 'dag'}), "(task_id='update_cluster_id', bash_command=\n 'sh /usr/lib/carter/kd_news_process/sc...
import asyncio from typing import Set from rap.client import Client from rap.client.model import Request from rap.client.processor.base import BaseProcessor from rap.common.conn import Connection class CheckConnProcessor(BaseProcessor): def __init__(self) -> None: self.conn_set: Set[Connection] = set() ...
[ "logging.basicConfig", "rap.client.Client", "asyncio.get_event_loop" ]
[((635, 691), 'rap.client.Client', 'Client', (['"""example"""', "[{'ip': 'localhost', 'port': '9000'}]"], {}), "('example', [{'ip': 'localhost', 'port': '9000'}])\n", (641, 691), False, 'from rap.client import Client\n'), ((1042, 1165), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""[%(asctime)s %(le...
import ctypes import numpy as np from devito.tools.utils import prod __all__ = ['numpy_to_ctypes', 'numpy_to_mpitypes', 'numpy_view_offsets'] def numpy_to_ctypes(dtype): """Map numpy types to ctypes types.""" return {np.int32: ctypes.c_int, np.float32: ctypes.c_float, np.int64: ctype...
[ "devito.tools.utils.prod", "numpy.byte_bounds" ]
[((1848, 1872), 'devito.tools.utils.prod', 'prod', (['base.shape[i + 1:]'], {}), '(base.shape[i + 1:])\n', (1852, 1872), False, 'from devito.tools.utils import prod\n'), ((1404, 1425), 'numpy.byte_bounds', 'np.byte_bounds', (['array'], {}), '(array)\n', (1418, 1425), True, 'import numpy as np\n'), ((1431, 1451), 'numpy...
from kubric.logging import get_logger logger = get_logger() logger.debug("debug") logger.info("info") logger.warning("warning") logger.error("error")
[ "kubric.logging.get_logger" ]
[((48, 60), 'kubric.logging.get_logger', 'get_logger', ([], {}), '()\n', (58, 60), False, 'from kubric.logging import get_logger\n')]
from __future__ import division import matplotlib.pyplot as plt import numpy from . import deck # create a deck d = deck.deck() balanced = [] points = [] num = int(1e4) steps = num // 10 for i in range(num): if (i+1) % steps == 0: print("%d of %d" % (i+1, num)) d.shuffle(7) d.cut() h1, h2,...
[ "numpy.histogram2d", "numpy.array", "matplotlib.pyplot.figure", "matplotlib.pyplot.draw" ]
[((640, 652), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (650, 652), True, 'import matplotlib.pyplot as plt\n'), ((973, 985), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (983, 985), True, 'import matplotlib.pyplot as plt\n'), ((1271, 1290), 'numpy.array', 'numpy.array', (['points'], {})...
from project import main from project.tables import profile from datetime import datetime from typing import List async def get_profile(profile_id: str): db = main.get_db() query = (""" SELECT id, name, profile_img, description, phone_number ...
[ "project.main.get_db" ]
[((164, 177), 'project.main.get_db', 'main.get_db', ([], {}), '()\n', (175, 177), False, 'from project import main\n'), ((575, 588), 'project.main.get_db', 'main.get_db', ([], {}), '()\n', (586, 588), False, 'from project import main\n'), ((824, 837), 'project.main.get_db', 'main.get_db', ([], {}), '()\n', (835, 837), ...
# Generated by Django 2.1.7 on 2019-03-25 16:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cont...
[ "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.PositiveIntegerField", "django.db.models.DateTimeField", "django.db.models.Q", "django.db.migrations.swappable_dependency" ]
[((247, 304), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (278, 304), False, 'from django.db import migrations, models\n'), ((497, 590), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
import sys sys.path.append("../") from api.metrics.community import CommunityMetrics from api.utils.testing import create_test_db def test_population(): population_table = [ { "area_number": 1, "period_end_year": 2019, "segment": "all", "value": 13000 ...
[ "api.metrics.community.CommunityMetrics", "api.utils.testing.create_test_db", "sys.path.append" ]
[((11, 33), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (26, 33), False, 'import sys\n'), ((636, 740), 'api.utils.testing.create_test_db', 'create_test_db', ([], {'scripts': "['./pipeline/load/population.sql']", 'tables': "{'population': population_table}"}), "(scripts=['./pipeline/load/popu...
import json import os import tensorflow as tf def get_list_by_feature_list(feature_list, dims_dict): rst = [] for k in feature_list: rst.append(dims_dict[k]) return rst def read_json(file_path): with open(file_path, "r") as file: data = json.load(file) return data def print_pr...
[ "os.path.exists", "tensorflow.equal", "os.makedirs", "tensorflow.zeros_like", "tensorflow.ones_like", "json.load" ]
[((274, 289), 'json.load', 'json.load', (['file'], {}), '(file)\n', (283, 289), False, 'import json\n'), ((465, 484), 'os.path.exists', 'os.path.exists', (['pth'], {}), '(pth)\n', (479, 484), False, 'import os\n'), ((494, 510), 'os.makedirs', 'os.makedirs', (['pth'], {}), '(pth)\n', (505, 510), False, 'import os\n'), (...
from setuptools import setup, find_packages setup( name='django-ru-fields', version=__import__('django_ru_fields').VERSION, description='specific russian fields', author='<NAME>', author_email='<EMAIL>', url='https://github.com/suvitorg/django-ru-fields', packages=find_packages(exclude=['do...
[ "setuptools.find_packages" ]
[((294, 346), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['docs', 'examples', 'tests']"}), "(exclude=['docs', 'examples', 'tests'])\n", (307, 346), False, 'from setuptools import setup, find_packages\n')]
from bokeh.plotting import figure from bokeh.io import output_file, show,export_png import numpy as np from scipy.stats import norm def h(x): return 750*x/(5+745*x) F = figure(title='P(S|+) as a function of population incidence if 25% false negatives and .5% false positives',toolbar_location=None) x=np.linspace(0...
[ "bokeh.io.export_png", "numpy.linspace", "bokeh.plotting.figure" ]
[((175, 315), 'bokeh.plotting.figure', 'figure', ([], {'title': '"""P(S|+) as a function of population incidence if 25% false negatives and .5% false positives"""', 'toolbar_location': 'None'}), "(title=\n 'P(S|+) as a function of population incidence if 25% false negatives and .5% false positives'\n , toolbar_lo...
# # Copyright (C) [2020] Futurewei Technologies, Inc. # # FORCE-RISCV is 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 # # THIS SOFTWARE IS PRO...
[ "shared.sys_utils.SysUtils.exec_content", "shared.msg_utils.Msg.lout", "shared.control_item.ControlItem", "sys.exc_info", "shared.task_controller.TaskController", "shared.msg_utils.Msg.blank", "shared.msg_utils.Msg.set_label" ]
[((2363, 2396), 'shared.sys_utils.SysUtils.exec_content', 'SysUtils.exec_content', (['my_content'], {}), '(my_content)\n', (2384, 2396), False, 'from shared.sys_utils import SysUtils\n'), ((2485, 2499), 'sys.exc_info', 'sys.exc_info', ([], {}), '()\n', (2497, 2499), False, 'import sys\n'), ((2637, 2648), 'shared.msg_ut...
''' Implementation of GPHMC - Gaussian Process HMC ''' import numpy from sklearn.gaussian_process import GaussianProcessRegressor from pypuffin.decorators import accepts from pypuffin.numeric.mcmc.base import MCMCBase from pypuffin.sklearn.gaussian_process import gradient_of_mean, gradient_of_std from pypuffin.types...
[ "numpy.mean", "pypuffin.sklearn.gaussian_process.gradient_of_mean", "pypuffin.sklearn.gaussian_process.gradient_of_std", "numpy.asarray", "pypuffin.decorators.accepts" ]
[((1140, 1216), 'pypuffin.decorators.accepts', 'accepts', (['object', 'Callable', 'GaussianProcessRegressor', 'Callable', 'numpy.ndarray'], {}), '(object, Callable, GaussianProcessRegressor, Callable, numpy.ndarray)\n', (1147, 1216), False, 'from pypuffin.decorators import accepts\n'), ((2303, 2331), 'numpy.asarray', '...
import argparse import fnmatch import os import pathlib import sys import textwrap import yaml def write_header(output): header=''' ### # This file is automatically generated by {}. Do not edit! ### ''' output.write(textwrap.dedent(header.format(os.path.basename(__file__))).lstrip()) outp...
[ "argparse.FileType", "os.listdir", "argparse.ArgumentParser", "yaml.dump", "os.access", "os.path.join", "yaml.load", "os.getcwd", "os.path.isdir", "fnmatch.fnmatch", "os.path.basename", "sys.exit" ]
[((3840, 3945), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Generate swagger protocol specification from YAML definitions"""'}), "(description=\n 'Generate swagger protocol specification from YAML definitions')\n", (3863, 3945), False, 'import argparse\n'), ((4455, 4480), 'os.path....
import argparse import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim from sklearn import datasets from torch.distributions import MultivariateNormal from torchvision import datasets, transforms from datasets import DatasetMoons from models import CouplingLayer, NormalizingFlo...
[ "models.NormalizingFlowModel", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "argparse.ArgumentParser", "torch.eye", "datasets.DatasetMoons", "torch.no_grad", "matplotlib.pyplot.figure", "torch.zeros", "torch.sum", "models.CouplingLayer", "matplotlib.pyplot.scatter", "matplotlib.py...
[((375, 402), 'torch.cuda.current_device', 'torch.cuda.current_device', ([], {}), '()\n', (400, 402), False, 'import torch\n'), ((565, 579), 'datasets.DatasetMoons', 'DatasetMoons', ([], {}), '()\n', (577, 579), False, 'from datasets import DatasetMoons\n'), ((713, 747), 'models.NormalizingFlowModel', 'NormalizingFlowM...
from django.conf import settings from django.db import models from ndh.models import Links, NamedModel, TimeStampedModel class Chan(TimeStampedModel, NamedModel, Links): pass class Message(TimeStampedModel): chan = models.ForeignKey(Chan, on_delete=models.CASCADE) user = models.ForeignKey(settings.AUTH...
[ "django.db.models.TextField", "django.db.models.ForeignKey" ]
[((228, 277), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Chan'], {'on_delete': 'models.CASCADE'}), '(Chan, on_delete=models.CASCADE)\n', (245, 277), False, 'from django.db import models\n'), ((289, 358), 'django.db.models.ForeignKey', 'models.ForeignKey', (['settings.AUTH_USER_MODEL'], {'on_delete': 'models...
from core.ai import behaviors from core.ai.personalities import Personality from services import echo class Peekaboo(Personality): """ Just a Test AI for the sneak. """ @classmethod def get_behavior(cls, host, last_behavior, short_term_state): from bfgame.game.manager import game l...
[ "services.echo.system_echo", "core.ai.behaviors.Wait" ]
[((652, 675), 'core.ai.behaviors.Wait', 'behaviors.Wait', (['host', '(1)'], {}), '(host, 1)\n', (666, 675), False, 'from core.ai import behaviors\n'), ((430, 453), 'core.ai.behaviors.Wait', 'behaviors.Wait', (['host', '(1)'], {}), '(host, 1)\n', (444, 453), False, 'from core.ai import behaviors\n'), ((535, 565), 'servi...
#!/usr/bin/env python # coding:utf-8 import os import argparse header_msg = { 'py': ("#!/usr/bin/env python\n" "# coding:utf-8\n"), 'c': ("#include <stdio.h>\n\n" "int main (void)\n" "{\n return 0;\n}\n"), 'scm': ";;;\n", "html": "<!DOCTYPE HTML>", 'm': '', '...
[ "os.path.dirname", "os.path.exists", "argparse.ArgumentParser" ]
[((485, 626), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""\n A simple script for add header message when create a new file.\n """'}), '(description=\n """\n A simple script for add header message when create a new file.\n """\n )\n', (...
import os import sys import json def get_appdata(): if sys.platform != 'win32': raise OSError('This only works on Windows.') else: return os.getenv('APPDATA') def get_api_keys(): appdata = get_appdata() directory = appdata + '\\cassandra' json_config = directory + '\\api_keys.jso...
[ "json.load", "os.path.exists", "os.getenv" ]
[((330, 355), 'os.path.exists', 'os.path.exists', (['directory'], {}), '(directory)\n', (344, 355), False, 'import os\n'), ((164, 184), 'os.getenv', 'os.getenv', (['"""APPDATA"""'], {}), "('APPDATA')\n", (173, 184), False, 'import os\n'), ((418, 433), 'json.load', 'json.load', (['file'], {}), '(file)\n', (427, 433), Fa...
import re from pathlib import Path import numpy as np from pandas import read_csv from models.Function import FunctionType, Function from type_replacement import normalize_type from args import DATABASE_PATH # Extract function name from DemangledName column name_re = re.compile(r'::(~?\w+)\(*?') def extract_name_...
[ "models.Function.Function", "re.compile" ]
[((272, 301), 're.compile', 're.compile', (['"""::(~?\\\\w+)\\\\(*?"""'], {}), "('::(~?\\\\w+)\\\\(*?')\n", (282, 301), False, 'import re\n'), ((2394, 2430), 'models.Function.Function', 'Function', ([], {'class_name': 'class_name'}), '(class_name=class_name, **s)\n', (2402, 2430), False, 'from models.Function import Fu...
# Classification # SVM # -*- coding: utf-8 -*- ### ๊ธฐ๋ณธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ import pandas as pd import seaborn as sns ''' [Step 1] ๋ฐ์ดํ„ฐ ์ค€๋น„/ ๊ธฐ๋ณธ ์„ค์ • ''' # load_dataset ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„์œผ๋กœ ๋ณ€ํ™˜ df = sns.load_dataset('titanic') # IPython ๋””์Šคํ”Œ๋ ˆ์ด ์„ค์ • - ์ถœ๋ ฅํ•  ์—ด์˜ ๊ฐœ์ˆ˜ ํ•œ๋„ ๋Š˜๋ฆฌ๊ธฐ pd.set_option('display.max_columns', 15) ''' [Step 2] ๋ฐ์ดํ„ฐ ํƒ์ƒ‰/ ์ „์ฒ˜๋ฆฌ ''...
[ "sklearn.metrics.confusion_matrix", "sklearn.model_selection.train_test_split", "seaborn.load_dataset", "sklearn.metrics.classification_report", "pandas.set_option", "sklearn.preprocessing.StandardScaler", "pandas.get_dummies", "pandas.concat", "sklearn.metrics.accuracy_score", "sklearn.svm.SVC" ]
[((182, 209), 'seaborn.load_dataset', 'sns.load_dataset', (['"""titanic"""'], {}), "('titanic')\n", (198, 209), True, 'import seaborn as sns\n'), ((250, 290), 'pandas.set_option', 'pd.set_option', (['"""display.max_columns"""', '(15)'], {}), "('display.max_columns', 15)\n", (263, 290), True, 'import pandas as pd\n'), (...
#!/usr/bin/python # -*- coding: utf-8 -*- """ The setup file for installing the library """ import os from setuptools import find_packages from setuptools import setup from twitchstream import __version__ as VERSION version = VERSION here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((258, 283), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (273, 283), False, 'import os\n'), ((1554, 1569), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1567, 1569), False, 'from setuptools import find_packages\n'), ((308, 340), 'os.path.join', 'os.path.join', (['here', ...
""" question_infrastructure_3.py Copyright 2008 <NAME> This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hop...
[ "w3af.core.controllers.wizard.question.question.__init__", "w3af.core.data.options.opt_factory.opt_factory", "w3af.core.data.options.option_list.OptionList" ]
[((1083, 1117), 'w3af.core.controllers.wizard.question.question.__init__', 'question.__init__', (['self', 'w3af_core'], {}), '(self, w3af_core)\n', (1100, 1117), False, 'from w3af.core.controllers.wizard.question import question\n'), ((1551, 1599), 'w3af.core.data.options.opt_factory.opt_factory', 'opt_factory', (['sel...
#!/usr/bin/env python #---------------------------------------- # This script processes all experiments # given by the user and outputs then in a pandas table #---------------------------------------- #---------------------------------------- # Author: <NAME> <<EMAIL>> # Copyright: Copyright 2019, <NAME> # License: MI...
[ "os.path.getsize", "os.listdir", "argparse.ArgumentParser", "os.path.join", "os.path.isfile", "pandas.DataFrame", "re.findall", "os.walk", "re.search" ]
[((1070, 1136), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Process DeSyDe experiments."""'}), "(description='Process DeSyDe experiments.')\n", (1093, 1136), False, 'import argparse\n'), ((2189, 2207), 'os.walk', 'os.walk', (['"""TDN-NoC"""'], {}), "('TDN-NoC')\n", (2196, 2207), False...
import datetime import random import statistics from typing import Dict, List, Any, Union, Set, Tuple import sys from sqlalchemy.ext.declarative import declarative_base, declared_attr from app import db from werkzeug.security import generate_password_hash, check_password_hash from time import time from flask import cur...
[ "app.db.Column" ]
[((368, 406), 'app.db.Column', 'db.Column', (['db.String'], {'primary_key': '(True)'}), '(db.String, primary_key=True)\n', (377, 406), False, 'from app import db\n'), ((419, 437), 'app.db.Column', 'db.Column', (['db.Text'], {}), '(db.Text)\n', (428, 437), False, 'from app import db\n'), ((456, 474), 'app.db.Column', 'd...
# main/views.py from django.contrib import messages from django.shortcuts import render from django.views.generic import DetailView from django.views.generic.list import ListView from django.views.generic.edit import FormView from django.views.generic import TemplateView from main.models import ( Post, Catego...
[ "django.shortcuts.render", "main.models.Contact", "main.models.Post.objects.filter", "django.contrib.messages.success" ]
[((971, 1027), 'main.models.Post.objects.filter', 'Post.objects.filter', ([], {'categories__slug__contains': 'category'}), '(categories__slug__contains=category)\n', (990, 1027), False, 'from main.models import Post, Category, Project, Contact\n'), ((1128, 1180), 'django.shortcuts.render', 'render', (['request', '"""pa...
from collections import defaultdict from cs251tk.common import group_by as group def format_collected_data(records, group_by: str, formatter, debug): """Turn the list of recordings into a list of nicely-formatted results. `grouped_records` will be a list of pairs: (assignment, recordings), where `assignm...
[ "collections.defaultdict" ]
[((930, 947), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (941, 947), False, 'from collections import defaultdict\n')]