code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import random import string from random import randint class RandomSupport(object): """Simple random data helpers. """ @classmethod def generate_number(cls): """Generate a random number. Returns: int: the number """ return randint(0, 99999999999999) @classmethod def generate_number_between(cls, min...
[ "random.choice", "random.randint" ]
[((241, 267), 'random.randint', 'randint', (['(0)', '(99999999999999)'], {}), '(0, 99999999999999)\n', (248, 267), False, 'from random import randint\n'), ((506, 523), 'random.randint', 'randint', (['min', 'max'], {}), '(min, max)\n', (513, 523), False, 'from random import randint\n'), ((650, 676), 'random.randint', 'r...
# Generated by Django 3.2.3 on 2021-06-10 11:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('site_auth', '0002_auto_2...
[ "django.db.models.OneToOneField", "django.db.migrations.swappable_dependency", "django.db.migrations.RemoveField", "django.db.models.BigAutoField", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.DateField" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((1075, 1136), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_na...
from typing import Union, List, Tuple, Optional, Type from intcode.handlers.io.std import StdIOHandler from intcode.interfaces.base_op import BaseOp from intcode.interfaces.io_handler import BaseIOHandler from intcode.interpreter.opcode_factory import OpFactory from intcode.interpreter.state import MachineState clas...
[ "intcode.handlers.io.std.StdIOHandler", "intcode.interpreter.opcode_factory.OpFactory.get_op" ]
[((2081, 2111), 'intcode.interpreter.opcode_factory.OpFactory.get_op', 'OpFactory.get_op', (['op_code[-2:]'], {}), '(op_code[-2:])\n', (2097, 2111), False, 'from intcode.interpreter.opcode_factory import OpFactory\n'), ((752, 766), 'intcode.handlers.io.std.StdIOHandler', 'StdIOHandler', ([], {}), '()\n', (764, 766), Fa...
import os import time from functools import wraps import typing from aws_xray_sdk.core.context import MISSING_SEGMENT_MSG from aws_xray_sdk.core.exceptions.exceptions import SegmentNotFoundException from aws_xray_sdk.core import xray_recorder, patch from aws_xray_sdk.core.models.subsegment import Subsegment as xray_Su...
[ "aws_xray_sdk.core.patch", "aws_xray_sdk.core.xray_recorder.begin_subsegment", "aws_xray_sdk.core.xray_recorder.get_trace_entity", "time.time", "os.environ.get", "aws_xray_sdk.core.exceptions.exceptions.SegmentNotFoundException", "functools.wraps", "aws_xray_sdk.core.xray_recorder.capture", "aws_xra...
[((381, 408), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (398, 408), False, 'import logging\n'), ((546, 574), 'aws_xray_sdk.core.patch', 'patch', (["('boto3', 'requests')"], {}), "(('boto3', 'requests'))\n", (551, 574), False, 'from aws_xray_sdk.core import xray_recorder, patch\n'), (...
from passlib.context import CryptContext from flask import current_app """ Note on bcrypt Hashing passwords with bcrypt algorithm will require a python bcrypt module. On Mac OSX this may sometime fail due to the absence of libffi. If that is the case, you can install it with homebrew: brew install pkg-config libf...
[ "passlib.context.CryptContext", "flask.current_app.config.get" ]
[((767, 813), 'passlib.context.CryptContext', 'CryptContext', ([], {'schemes': 'schemes', 'default': 'default'}), '(schemes=schemes, default=default)\n', (779, 813), False, 'from passlib.context import CryptContext\n'), ((569, 607), 'flask.current_app.config.get', 'current_app.config.get', (['"""PASSLIB_ALGO"""'], {}),...
from datetime import datetime from typing import List, Optional from sqlalchemy import ( JSON, Boolean, Column, Float, ForeignKey, Integer, PrimaryKeyConstraint, String, Table, ) from sqlalchemy.orm import relationship from sqlalchemy_utils import TSVectorType from dispatch.databas...
[ "sqlalchemy.orm.relationship", "sqlalchemy.ForeignKey", "sqlalchemy.Column", "sqlalchemy_utils.TSVectorType" ]
[((1281, 1314), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (1287, 1314), False, 'from sqlalchemy import JSON, Boolean, Column, Float, ForeignKey, Integer, PrimaryKeyConstraint, String, Table\n'), ((1326, 1340), 'sqlalchemy.Column', 'Column', (['String'], {}...
import copy import functools class unordered_memoized(object): '''Decorator. Caches a function's return value each time it is called. If called later with the same arguments, the cached value is returned (not reevaluated). list arguments are hashed irrespective of the order of items. a deepcopy is...
[ "functools.partial", "copy.deepcopy" ]
[((1171, 1208), 'functools.partial', 'functools.partial', (['self.__call__', 'obj'], {}), '(self.__call__, obj)\n', (1188, 1208), False, 'import functools\n'), ((927, 947), 'copy.deepcopy', 'copy.deepcopy', (['value'], {}), '(value)\n', (940, 947), False, 'import copy\n')]
import os from .g5nr import G5NRFlows from .geostationary import L1bPatches def get_dataset(dataset_name, data_path, size=512, scale_factor=None, frames=2): # Load dataset if dataset_name in ['gmao_osse_7km', 'g5nr', 'g5nr_7km']: dataset_train = G5NRFlows(os.path.join(data_path, 'train'), ...
[ "os.path.join" ]
[((274, 306), 'os.path.join', 'os.path.join', (['data_path', '"""train"""'], {}), "(data_path, 'train')\n", (286, 306), False, 'import os\n'), ((511, 543), 'os.path.join', 'os.path.join', (['data_path', '"""valid"""'], {}), "(data_path, 'valid')\n", (523, 543), False, 'import os\n')]
import re import unicodedata from typing import Generator PATTERN = re.compile(r"[^\w\s]") def pipeline(filename: str) -> Generator[str, None, None]: with open(filename) as fp: for line in fp: line = line.strip() if not line: continue if line[0] == "#":...
[ "unicodedata.normalize", "re.compile" ]
[((69, 92), 're.compile', 're.compile', (['"""[^\\\\w\\\\s]"""'], {}), "('[^\\\\w\\\\s]')\n", (79, 92), False, 'import re\n'), ((528, 562), 'unicodedata.normalize', 'unicodedata.normalize', (['"""NFD"""', 'text'], {}), "('NFD', text)\n", (549, 562), False, 'import unicodedata\n')]
# -*- coding: utf-8 -*- """ Steps of testing of SuperOperator class """ from behave import * import quantarhei as qr import numpy @given('I have a general superoperator S and two operators A and B') def step_given(context): S = qr.qm.TestSuperOperator("dim-3-AOA") A = qr.Hamiltonian(data=[[0.0, 0.1...
[ "numpy.tensordot", "numpy.testing.assert_allclose", "quantarhei.qm.TestSuperOperator", "quantarhei.Hamiltonian", "quantarhei.eigenbasis_of" ]
[((245, 281), 'quantarhei.qm.TestSuperOperator', 'qr.qm.TestSuperOperator', (['"""dim-3-AOA"""'], {}), "('dim-3-AOA')\n", (268, 281), True, 'import quantarhei as qr\n'), ((290, 362), 'quantarhei.Hamiltonian', 'qr.Hamiltonian', ([], {'data': '[[0.0, 0.1, 0.0], [0.1, 1.0, 0.2], [0.0, 0.2, 1.2]]'}), '(data=[[0.0, 0.1, 0.0...
from typing import FrozenSet, List import boto3 import boto3.session from botocore.exceptions import ClientError from mypy_boto3_iam.type_defs import TagTypeDef from keydra.providers.base import BaseProvider from keydra.providers.base import exponential_backoff_retry from keydra.exceptions import DistributionExcepti...
[ "boto3.session.Session", "keydra.providers.base.BaseProvider.validate_spec", "boto3.client", "keydra.logging.get_logger", "keydra.exceptions.RotationException", "keydra.exceptions.DistributionException", "keydra.providers.base.exponential_backoff_retry" ]
[((465, 477), 'keydra.logging.get_logger', 'get_logger', ([], {}), '()\n', (475, 477), False, 'from keydra.logging import get_logger\n'), ((9060, 9088), 'keydra.providers.base.exponential_backoff_retry', 'exponential_backoff_retry', (['(3)'], {}), '(3)\n', (9085, 9088), False, 'from keydra.providers.base import exponen...
from datetime import datetime from io import BytesIO from PIL import Image, ImageDraw from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions from selenium.webdriver.common.by ...
[ "selenium.webdriver.chrome.options.Options", "io.BytesIO", "math.ceil", "selenium.webdriver.Firefox", "os.path.basename", "selenium.webdriver.support.expected_conditions.visibility_of_element_located", "time.sleep", "pyderman.install", "datetime.datetime.strptime", "selenium.webdriver.Chrome", "...
[((4796, 4821), 'selenium.webdriver.support.ui.WebDriverWait', 'WebDriverWait', (['driver', '(15)'], {}), '(driver, 15)\n', (4809, 4821), False, 'from selenium.webdriver.support.ui import WebDriverWait\n'), ((4826, 4839), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (4836, 4839), False, 'import time\n'), ((2340,...
#! /usr/bin/env py.test from mwlib.templ import magics def test_long_running_match(alarm): s = '<div ' + ' c' * 2000 + 'class="error">' alarm(0.01) assert magics.iferror_rx.match(s) def test_long_running_no_match(alarm): s = '<div ' + ' c' * 2000 + 'class="erro">' alarm(0.01) assert not mag...
[ "mwlib.templ.magics.iferror_rx.match" ]
[((170, 196), 'mwlib.templ.magics.iferror_rx.match', 'magics.iferror_rx.match', (['s'], {}), '(s)\n', (193, 196), False, 'from mwlib.templ import magics\n'), ((487, 513), 'mwlib.templ.magics.iferror_rx.match', 'magics.iferror_rx.match', (['s'], {}), '(s)\n', (510, 513), False, 'from mwlib.templ import magics\n'), ((317...
""" The lidar system, data (2 of 2 datasets) ======================================== Generate a chart of more complex data recorded by the lidar system """ import numpy as np import matplotlib.pyplot as plt waveform_2 = np.load('waveform_2.npy') t = np.arange(len(waveform_2)) fig, ax = plt.subplots(figsize=(8, 6)...
[ "numpy.load", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.subplots" ]
[((224, 249), 'numpy.load', 'np.load', (['"""waveform_2.npy"""'], {}), "('waveform_2.npy')\n", (231, 249), True, 'import numpy as np\n'), ((293, 321), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(8, 6)'}), '(figsize=(8, 6))\n', (305, 321), True, 'import matplotlib.pyplot as plt\n'), ((322, 345), 'ma...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
[ "pynd.search.search", "pynd.cli.create_parser", "pynd.cli.setup_logging", "pynd.cli.parse_args", "logging.getLogger" ]
[((724, 747), 'pynd.cli.parse_args', 'cli.parse_args', (['sysargs'], {}), '(sysargs)\n', (738, 747), False, 'from pynd import cli\n'), ((752, 775), 'pynd.cli.setup_logging', 'cli.setup_logging', (['args'], {}), '(args)\n', (769, 775), False, 'from pynd import cli\n'), ((787, 814), 'logging.getLogger', 'logging.getLogge...
import pytest from pheasant.renderers.jupyter.kernel import kernels, output_hook_factory def test_kernel_names(): assert "python" in kernels.kernel_names @pytest.mark.parametrize("language", list(kernels.kernel_names.keys())) def test_get_kernel_name(language): assert kernels.get_kernel_name(language) == k...
[ "pheasant.renderers.jupyter.kernel.kernels.get_kernel", "pheasant.renderers.jupyter.kernel.kernels.get_kernel_name", "pheasant.renderers.jupyter.kernel.output_hook_factory", "pheasant.renderers.jupyter.kernel.kernels.kernel_names.keys", "pytest.raises" ]
[((1439, 1472), 'pheasant.renderers.jupyter.kernel.kernels.get_kernel_name', 'kernels.get_kernel_name', (['"""python"""'], {}), "('python')\n", (1462, 1472), False, 'from pheasant.renderers.jupyter.kernel import kernels, output_hook_factory\n'), ((1486, 1517), 'pheasant.renderers.jupyter.kernel.kernels.get_kernel', 'ke...
# Copyright (c) 2018-2022, NVIDIA Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
[ "numpy.array", "numpy.random.rand", "numpy.zeros" ]
[((2956, 2972), 'numpy.zeros', 'np.zeros', (['(2, 7)'], {}), '((2, 7))\n', (2964, 2972), True, 'import numpy as np\n'), ((1641, 1699), 'numpy.array', 'np.array', (['[[0, 1, 2, 3], [-2, 3, -1, 5]]'], {'dtype': 'np.float32'}), '([[0, 1, 2, 3], [-2, 3, -1, 5]], dtype=np.float32)\n', (1649, 1699), True, 'import numpy as np...
#!/usr/bin/env python import sys from scipy.stats import t from scipy.special import gammaln import numpy as np from numpy import pi,log,sqrt from numpy.linalg import slogdet,inv ################################ ### Multivariate Student's t ### ################################ ### Multivariate Student's t density (lo...
[ "numpy.log", "numpy.linalg.slogdet", "numpy.linalg.inv", "scipy.special.gammaln", "numpy.sqrt" ]
[((1188, 1198), 'numpy.linalg.inv', 'inv', (['Sigma'], {}), '(Sigma)\n', (1191, 1198), False, 'from numpy.linalg import slogdet, inv\n'), ((937, 964), 'scipy.special.gammaln', 'gammaln', (['(nu / 2.0 + d / 2.0)'], {}), '(nu / 2.0 + d / 2.0)\n', (944, 964), False, 'from scipy.special import gammaln\n'), ((963, 980), 'sc...
#Author-syuntoku14 import adsk.core, adsk.fusion, traceback # Maybe copying and pasting is banned # Root component name can not be changed but others can. def copy_body(allOccs, old_comp): bodies = old_comp.bRepBodies transform = adsk.core.Matrix3D.create() occs = allOccs.addNewComponent(transform) ...
[ "traceback.format_exc" ]
[((1589, 1611), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (1609, 1611), False, 'import adsk.core, adsk.fusion, traceback\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # CODE NAME HERE # CODE DESCRIPTION HERE Created on 2020-04-20 at 10:35 @author: cook """ from astropy.io import fits import glob import os # ============================================================================= # Define variables # ========================...
[ "os.path.basename", "astropy.io.fits.open", "glob.glob" ]
[((3635, 3667), 'glob.glob', 'glob.glob', (["(WORKSPACE + '/*.fits')"], {}), "(WORKSPACE + '/*.fits')\n", (3644, 3667), False, 'import glob\n'), ((3767, 3793), 'os.path.basename', 'os.path.basename', (['filename'], {}), '(filename)\n', (3783, 3793), False, 'import os\n'), ((4143, 4162), 'astropy.io.fits.open', 'fits.op...
"""Create the images for the FOOOF documentation.""" import shutil import numpy as np import matplotlib.pyplot as plt from fooof import FOOOF, FOOOFGroup from fooof.sim.gen import gen_power_spectrum from fooof.plts.utils import check_ax from fooof.plts.spectra import plot_spectrum from fooof.utils.download import lo...
[ "matplotlib.pyplot.savefig", "fooof.sim.gen.gen_power_spectrum", "fooof.utils.download.load_fooof_data", "fooof.FOOOF", "shutil.rmtree", "fooof.plts.utils.check_ax", "matplotlib.pyplot.tight_layout", "fooof.FOOOFGroup" ]
[((650, 693), 'fooof.utils.download.load_fooof_data', 'load_fooof_data', (['"""freqs.npy"""'], {'folder': '"""data"""'}), "('freqs.npy', folder='data')\n", (665, 693), False, 'from fooof.utils.download import load_fooof_data\n'), ((709, 755), 'fooof.utils.download.load_fooof_data', 'load_fooof_data', (['"""spectrum.npy...
#!/usr/bin/env python3 from datetime import datetime, timedelta, timezone from dateutil.tz import tzlocal import json import os import subprocess as s import sys if len(sys.argv) > 3: print('You have specified too many arguments') sys.exit() if len(sys.argv) < 3: print('You need to specify the output fil...
[ "subprocess.run", "json.load", "json.dumps", "dateutil.tz.tzlocal", "datetime.timedelta", "datetime.datetime.fromtimestamp", "sys.exit" ]
[((1061, 1123), 'datetime.datetime.fromtimestamp', 'datetime.fromtimestamp', (["(data['start'] // 1000)"], {'tz': 'timezone.utc'}), "(data['start'] // 1000, tz=timezone.utc)\n", (1083, 1123), False, 'from datetime import datetime, timedelta, timezone\n'), ((241, 251), 'sys.exit', 'sys.exit', ([], {}), '()\n', (249, 251...
import numpy as np def tensor2numpy(img_tensor): """ Helper method to transfer image from torch.tensor to numpy.array :param img_tensor: image in torch.tensor format :return: image in numpy.array format """ img = img_tensor.detach().cpu().numpy().transpose(1,2,0) ### not to take grad of img img= np.cl...
[ "numpy.squeeze", "numpy.clip" ]
[((315, 333), 'numpy.clip', 'np.clip', (['img', '(0)', '(1)'], {}), '(img, 0, 1)\n', (322, 333), True, 'import numpy as np\n'), ((441, 456), 'numpy.squeeze', 'np.squeeze', (['img'], {}), '(img)\n', (451, 456), True, 'import numpy as np\n')]
#!/usr/bin/env python """Simple logging radon station logic""" from __future__ import print_function import sys import os import struct import logging from datetime import datetime import pika import json from bluepy.btle import UUID, Peripheral if len(sys.argv) > 1: LOCATION = sys.argv[1] else: LOCATION = 'ba...
[ "bluepy.btle.UUID", "struct.unpack", "pika.ConnectionParameters", "json.dumps", "bluepy.btle.Peripheral", "logging.info", "datetime.datetime.now" ]
[((328, 374), 'logging.info', 'logging.info', (['"""using %s as location"""', 'LOCATION'], {}), "('using %s as location', LOCATION)\n", (340, 374), False, 'import logging\n'), ((413, 464), 'pika.ConnectionParameters', 'pika.ConnectionParameters', ([], {'host': '"""lecole"""', 'port': '(5672)'}), "(host='lecole', port=5...
import asyncio from functools import wraps from unittest import TestCase from unittest.mock import MagicMock class AsyncMock(MagicMock): """ Enable the python3.5 'await' call to a magicmock """ async def __call__(self, *args, **kwargs): return super(AsyncMock, self).__call__(*args, **kwargs)...
[ "functools.wraps", "asyncio.Future" ]
[((358, 374), 'asyncio.Future', 'asyncio.Future', ([], {}), '()\n', (372, 374), False, 'import asyncio\n'), ((585, 596), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (590, 596), False, 'from functools import wraps\n')]
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "upvote.gae.datastore.test_utils.CreateUsers", "webapp2.WSGIApplication", "upvote.gae.lib.testing.basetest.main", "upvote.gae.datastore.test_utils.CreateUser", "upvote.gae.utils.user_utils.UsernameToEmail" ]
[((4456, 4471), 'upvote.gae.lib.testing.basetest.main', 'basetest.main', ([], {}), '()\n', (4469, 4471), False, 'from upvote.gae.lib.testing import basetest\n'), ((962, 1008), 'webapp2.WSGIApplication', 'webapp2.WSGIApplication', ([], {'routes': '[users.ROUTES]'}), '(routes=[users.ROUTES])\n', (985, 1008), False, 'impo...
import os import pandas as pd from pyomo.environ import * # Class to instantiate UC model, with methods to solve the model, update # parameters, and fix variables. # Class to run the UC model using a rolling window approach. Accepts as # arguments data dictionaries describing demand traces, solar traces, ...
[ "os.path.dirname", "os.path.join" ]
[((25159, 25184), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (25174, 25184), False, 'import os\n'), ((25316, 25341), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (25331, 25341), False, 'import os\n'), ((719, 769), 'os.path.join', 'os.path.join', (['input_trace...
from time import sleep import serial # Set serial port usb = serial.Serial('/dev/ttyACM0', 9600, timeout=0, dsrdtr=False) usb.flush() # Waits data configuration usb.write(b"LT E1 RD50 GR0 BL0") # Turn on led tape in red usb.write(b"MT0 E1") # Enables wheel motors sleep(0.1) usb.write(b"MT0 E1...
[ "serial.Serial", "time.sleep" ]
[((62, 122), 'serial.Serial', 'serial.Serial', (['"""/dev/ttyACM0"""', '(9600)'], {'timeout': '(0)', 'dsrdtr': '(False)'}), "('/dev/ttyACM0', 9600, timeout=0, dsrdtr=False)\n", (75, 122), False, 'import serial\n'), ((290, 300), 'time.sleep', 'sleep', (['(0.1)'], {}), '(0.1)\n', (295, 300), False, 'from time import slee...
# Generated by Django 2.1.11 on 2019-10-07 21:57 import apps.article.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("article", "0011_auto_20190506_1719")] operations = [ migrations.AlterField( model_name="article", nam...
[ "django.db.models.CharField" ]
[((349, 476), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(200)', 'validators': '[apps.article.models.vimeo_id_validator]', 'verbose_name': '"""vimeo id"""'}), "(blank=True, max_length=200, validators=[apps.article.\n models.vimeo_id_validator], verbose_name='vimeo id')\...
import logging from Vispa.Views.BoxDecayView import BoxDecayView from Vispa.Gui.WidgetContainer import WidgetContainer class EdmBrowserBoxView(BoxDecayView): """ """ LABEL="BoxView" def createBox(self, widgetParent, container, title, text): widget=BoxDecayView.createBox(self, widgetParent...
[ "Vispa.Views.BoxDecayView.BoxDecayView.createBox", "Vispa.Views.BoxDecayView.BoxDecayView.selection" ]
[((279, 345), 'Vispa.Views.BoxDecayView.BoxDecayView.createBox', 'BoxDecayView.createBox', (['self', 'widgetParent', 'container', 'title', 'text'], {}), '(self, widgetParent, container, title, text)\n', (301, 345), False, 'from Vispa.Views.BoxDecayView import BoxDecayView\n'), ((520, 548), 'Vispa.Views.BoxDecayView.Box...
# -*- coding: utf-8 -*- """ Type resolution and method resolution. """ from __future__ import print_function, division, absolute_import import flypy from flypy import types from flypy.compiler.utils import callmap, jitcallmap from flypy.compiler.special import SETATTR from flypy.compiler.signature import get_remaini...
[ "pykit.ir.Const", "flypy.compiler.typing.resolution.is_method", "flypy.compiler.signature.flatargs", "flypy.typeof", "flypy.compiler.signature.compute_missing", "flypy.compiler.typing.resolution.make_method", "flypy.compiler.utils.callmap", "flypy.runtime.obj.core.extract_tuple_eltypes", "flypy.comp...
[((1160, 1171), 'pykit.ir.OpBuilder', 'OpBuilder', ([], {}), '()\n', (1169, 1171), False, 'from pykit.ir import OpBuilder, Builder, Const, OConst, Function, Op\n'), ((1186, 1199), 'pykit.ir.Builder', 'Builder', (['func'], {}), '(func)\n', (1193, 1199), False, 'from pykit.ir import OpBuilder, Builder, Const, OConst, Fun...
import ctypes, threading, sys import logging from time import sleep from ProcessMemoryHandle import * import BaseAddressOffset from concurrent.futures import ThreadPoolExecutor class Offset: def __init__(self, is_steam: bool): """基址偏移\n is_steam bool:是否为steam版 True 是|False 不是 """ i...
[ "ctypes.WinDLL", "ctypes.c_byte", "logging.error", "threading.Thread", "logging.basicConfig", "ctypes.c_int", "logging.warning", "time.sleep", "ctypes.c_float", "ctypes.c_uint", "ctypes.c_buffer", "ctypes.c_ubyte", "concurrent.futures.ThreadPoolExecutor", "ctypes.c_ulonglong", "sys.exit"...
[((34067, 34174), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s,%(levelname)s,%(module)s,%(funcName)s,%(lineno)d,%(message)s"""'}), "(format=\n '%(asctime)s,%(levelname)s,%(module)s,%(funcName)s,%(lineno)d,%(message)s')\n", (34086, 34174), False, 'import logging\n'), ((24904, 24912), ...
import threading as th from time import sleep x = 0 def increament(): global x x+=1 def threadTask(lock): for i in range(100): lock.acquire() increament() lock.release() def mainTask(): ''' if we are setting it to zero then all value should be 200 if we want to inc...
[ "threading.Lock", "threading.Thread" ]
[((389, 398), 'threading.Lock', 'th.Lock', ([], {}), '()\n', (396, 398), True, 'import threading as th\n'), ((409, 451), 'threading.Thread', 'th.Thread', ([], {'target': 'threadTask', 'args': '(lock,)'}), '(target=threadTask, args=(lock,))\n', (418, 451), True, 'import threading as th\n'), ((461, 503), 'threading.Threa...
from tkinter import * from tkinter import ttk from skills import Stats from skills import Skill root = Tk() root.title("Character Stats") def calculate(*args): str_attr = float(strength.get()) rec_attr = float(recovery.get()) end_attr = float(endurance.get()) vig_attr = float(vigor.get()) foc_attr...
[ "tkinter.ttk.Label", "tkinter.ttk.Entry", "skills.Stats", "tkinter.ttk.Frame", "tkinter.ttk.Button" ]
[((1406, 1442), 'tkinter.ttk.Frame', 'ttk.Frame', (['root'], {'padding': '"""3 3 12 12"""'}), "(root, padding='3 3 12 12')\n", (1415, 1442), False, 'from tkinter import ttk\n'), ((1761, 1813), 'tkinter.ttk.Entry', 'ttk.Entry', (['mainframe'], {'width': '(7)', 'textvariable': 'strength'}), '(mainframe, width=7, textvari...
import os import unittest import shutil from os.path import isfile, isdir from ukbrest.common.utils.external import qctool from tests.utils import get_repository_path from ukbrest.common.genoquery import GenoQuery class UKBQueryTest(unittest.TestCase): def test_query_incl_range_lower_and_upper_limits_at_beginni...
[ "os.path.isdir", "os.path.isfile", "ukbrest.common.utils.external.qctool", "tests.utils.get_repository_path", "shutil.rmtree", "os.listdir" ]
[((564, 581), 'os.path.isfile', 'isfile', (['bgen_file'], {}), '(bgen_file)\n', (570, 581), False, 'from os.path import isfile, isdir\n'), ((601, 618), 'ukbrest.common.utils.external.qctool', 'qctool', (['bgen_file'], {}), '(bgen_file)\n', (607, 618), False, 'from ukbrest.common.utils.external import qctool\n'), ((2301...
import platform import os import fbuild import fbuild.db import fbuild.functools # ------------------------------------------------------------------------------ class UnknownPlatform(fbuild.ConfigFailed): def __init__(self, platform=None): self.platform = platform def __str__(self): if self...
[ "fbuild.builders.find_program", "fbuild.functools.wraps", "platform.system" ]
[((7762, 7790), 'fbuild.functools.wraps', 'fbuild.functools.wraps', (['func'], {}), '(func)\n', (7784, 7790), False, 'import fbuild\n'), ((2501, 2556), 'fbuild.builders.find_program', 'fbuild.builders.find_program', (['ctx', "['uname']"], {'quieter': '(1)'}), "(ctx, ['uname'], quieter=1)\n", (2529, 2556), False, 'impor...
""" This is a sample script published on kaggle, see https://www.kaggle.com/willkoehrsen/start-here-a-gentle-introduction for more information """ import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import Imputer from sklearn.preprocessing import MinMaxScaler, Imputer from s...
[ "sklearn.ensemble.RandomForestClassifier", "warnings.filterwarnings", "pandas.read_csv", "pandas.get_dummies", "sklearn.preprocessing.Imputer", "sklearn.preprocessing.MinMaxScaler", "sklearn.preprocessing.LabelEncoder", "sklearn.preprocessing.PolynomialFeatures", "pandas.concat" ]
[((402, 435), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (425, 435), False, 'import warnings\n'), ((453, 497), 'pandas.read_csv', 'pd.read_csv', (['"""../data/application_train.csv"""'], {}), "('../data/application_train.csv')\n", (464, 497), True, 'import pandas as pd...
from datetime import datetime, timedelta import json import re from subprocess import check_output, Popen from time import sleep import webbrowser import click import requests import tempfile import os import re from .config import config from .handle_trello import ( get_current_working_ticket, get_ticket_re...
[ "tempfile.NamedTemporaryFile", "webbrowser.open", "subprocess.Popen", "os.remove", "click.confirm", "subprocess.check_output", "re.match", "json.dumps", "time.sleep", "requests.delete", "datetime.timedelta", "re.search", "requests.get", "datetime.datetime.now" ]
[((770, 874), 're.match', 're.match', (['""".*github.com/(?P<owner>\\\\S+)/{1}(?P<name>\\\\S+)/pull/{1}(?P<number>\\\\d+).*$"""', 'pr_url'], {}), "(\n '.*github.com/(?P<owner>\\\\S+)/{1}(?P<name>\\\\S+)/pull/{1}(?P<number>\\\\d+).*$'\n , pr_url)\n", (778, 874), False, 'import re\n'), ((3942, 3978), 'webbrowser.op...
import h2o h2o.init() data = h2o.importFolder("../datasets/england/2013-2014/") betsH = data[ range(23, 45, 3) + [48, 49] ] #Columns 23, 26, 29, 32, 35, 38, 41, 44, 48, 49 betsD = data[ range(24, 46, 3) + [50, 51] ] betsA = data[ range(25, 47, 3) + [52, 53] ] abets = data[ range(55, 59) + range(60, 65) ] stats = data...
[ "h2o.importFolder", "h2o.init" ]
[((11, 21), 'h2o.init', 'h2o.init', ([], {}), '()\n', (19, 21), False, 'import h2o\n'), ((30, 80), 'h2o.importFolder', 'h2o.importFolder', (['"""../datasets/england/2013-2014/"""'], {}), "('../datasets/england/2013-2014/')\n", (46, 80), False, 'import h2o\n')]
#!/usr/bin/env python """ Calculates time remaining before **ISS** is overhead. Just configure your location The Python 3 class takes a longitude/latitude and calls the Open Notify (http://open-notify.org) service to forecast the next time the ISS is overhead above the coordinates provided. Created by the Raspberry ...
[ "argparse.ArgumentParser", "logging.basicConfig", "logging.warn", "time.time", "time.sleep", "logging.info", "logging.getLogger" ]
[((1117, 1136), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (1134, 1136), False, 'import logging\n'), ((6037, 6096), 'logging.info', 'logging.info', (['"""Callback initiated: calling open-notify API"""'], {}), "('Callback initiated: calling open-notify API')\n", (6049, 6096), False, 'import logging\n'),...
from django.db import models class AmazonFPSResponse(models.Model): buyerEmail = models.EmailField() buyerName = models.CharField(max_length=75) callerReference = models.CharField(max_length=100) notificationType = models.CharField(max_length=50) operation = models.CharField(max_length=20) paym...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.DateTimeField", "django.db.models.EmailField" ]
[((86, 105), 'django.db.models.EmailField', 'models.EmailField', ([], {}), '()\n', (103, 105), False, 'from django.db import models\n'), ((122, 153), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(75)'}), '(max_length=75)\n', (138, 153), False, 'from django.db import models\n'), ((176, 208), 'd...
import matplotlib.pyplot as plt class Trade: status = 'OPEN' open_price = None close_price = None volume = None open_datetime = None close_datetime = None def __repr__(self): # pragma: no cover return 'Price: {} Volume: {} Status: {}'.format(self.open_price, self.volume, self.sta...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.plot" ]
[((2983, 3038), 'matplotlib.pyplot.plot', 'plt.plot', (['trade_open_datetimes', 'trade_open_prices', '"""g^"""'], {}), "(trade_open_datetimes, trade_open_prices, 'g^')\n", (2991, 3038), True, 'import matplotlib.pyplot as plt\n'), ((3202, 3259), 'matplotlib.pyplot.plot', 'plt.plot', (['trade_close_datetimes', 'trade_clo...
from __future__ import print_function from __future__ import division import torch import torch.nn as nn import torch.optim as optim import numpy as np print("PyTorch Version: ",torch.__version__) import pickle import os import scipy.io as sio import cv2 from model import * from pano import get_ini_cor from pano_op...
[ "pano_opt_gen.optimize_cor_id", "numpy.amin", "numpy.argmax", "scipy.io.loadmat", "torch.cat", "sklearn.metrics.classification_report", "numpy.ones", "numpy.argsort", "os.path.join", "numpy.round", "torch.nn.BCELoss", "shapely.geometry.Polygon", "torch.load", "os.path.exists", "pano.get_...
[((5674, 5686), 'torch.nn.BCELoss', 'nn.BCELoss', ([], {}), '()\n', (5684, 5686), True, 'import torch.nn as nn\n'), ((5700, 5712), 'torch.nn.BCELoss', 'nn.BCELoss', ([], {}), '()\n', (5710, 5712), True, 'import torch.nn as nn\n'), ((1279, 1302), 'torch.load', 'torch.load', (['weight_path'], {}), '(weight_path)\n', (128...
from dataclasses import dataclass from fork.types.blockchain_format.sized_bytes import bytes32 from fork.util.ints import uint32 from fork.util.streamable import Streamable, streamable @dataclass(frozen=True) @streamable class PoolTarget(Streamable): puzzle_hash: bytes32 max_height: uint32 # A max height of...
[ "dataclasses.dataclass" ]
[((189, 211), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (198, 211), False, 'from dataclasses import dataclass\n')]
from pydsa.selection_sort import selection_sort from random import randint def test_selection_sort(): a = b = [randint(1, 100) for i in range(100)] assert selection_sort(a) == sorted(b)
[ "random.randint", "pydsa.selection_sort.selection_sort" ]
[((117, 132), 'random.randint', 'randint', (['(1)', '(100)'], {}), '(1, 100)\n', (124, 132), False, 'from random import randint\n'), ((165, 182), 'pydsa.selection_sort.selection_sort', 'selection_sort', (['a'], {}), '(a)\n', (179, 182), False, 'from pydsa.selection_sort import selection_sort\n')]
"""Process images into timed Morse signals.""" import collections import operator import threading import time from Queue import Queue import libmorse import numpy from PIL import ImageFilter from morseus import settings from morseus.settings import LOGGING class Decoder(object): """Interpret black & white i...
[ "threading.Thread", "libmorse.get_translator_results", "Queue.Queue", "numpy.zeros", "libmorse.AlphabetTranslator", "time.sleep", "threading.Lock", "libmorse.translate_morse", "operator.mul", "collections.deque" ]
[((802, 864), 'libmorse.translate_morse', 'libmorse.translate_morse', ([], {'use_logging': 'LOGGING.USE', 'debug': 'debug'}), '(use_logging=LOGGING.USE, debug=debug)\n', (826, 864), False, 'import libmorse\n'), ((1005, 1021), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (1019, 1021), False, 'import threading\n...
import multiprocessing def nproc(): cores = multiprocessing.cpu_count() nproc = "-j" + str(cores) return(nproc)
[ "multiprocessing.cpu_count" ]
[((49, 76), 'multiprocessing.cpu_count', 'multiprocessing.cpu_count', ([], {}), '()\n', (74, 76), False, 'import multiprocessing\n')]
from flask import request from flask_restful import Resource from tools.prediction_tools import PredictionTools class Classification(Resource): def post(self): data = request.json # getting the data sent tools = PredictionTools() # creating an object of the class we built...
[ "tools.prediction_tools.PredictionTools" ]
[((260, 277), 'tools.prediction_tools.PredictionTools', 'PredictionTools', ([], {}), '()\n', (275, 277), False, 'from tools.prediction_tools import PredictionTools\n')]
import sys import os import time import argparse from pysparkrpc.server.logger import logger, configure_logging PID_PATH = '/var/run/pysparkrpc.pid' def start(args): if status(False): print('Pysparkrpc already running.') else: configure_logging(args.foreground, args.log_level) if arg...
[ "argparse.ArgumentParser", "pysparkrpc.server.logger.configure_logging", "os.kill", "pysparkrpc.server.run", "os.fork", "sys.exit" ]
[((793, 851), 'pysparkrpc.server.run', 'server.run', ([], {'host': 'args.host', 'port': 'args.port', 'auth': 'args.auth'}), '(host=args.host, port=args.port, auth=args.auth)\n', (803, 851), True, 'import pysparkrpc.server as server\n'), ((1681, 1737), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'descrip...
import xml.etree.ElementTree as ET from mmcif.api.DataCategory import DataCategory from mmcif.api.PdbxContainers import DataContainer from mmcif.io.PdbxReader import PdbxReader from mmcif.io.PdbxWriter import PdbxWriter from mmcif.io.IoAdapterCore import IoAdapterCore import sys import os class ConvertXML(object): ...
[ "xml.etree.ElementTree.parse", "mmcif.io.IoAdapterCore.IoAdapterCore", "mmcif.api.DataCategory.DataCategory", "mmcif.io.PdbxWriter.PdbxWriter", "mmcif.api.PdbxContainers.DataContainer", "os.path.exists", "sys.exit" ]
[((603, 618), 'xml.etree.ElementTree.parse', 'ET.parse', (['fname'], {}), '(fname)\n', (611, 618), True, 'import xml.etree.ElementTree as ET\n'), ((2096, 2128), 'mmcif.api.DataCategory.DataCategory', 'DataCategory', (['"""pdbx_vrpt_entity"""'], {}), "('pdbx_vrpt_entity')\n", (2108, 2128), False, 'from mmcif.api.DataCat...
__all__ = ['GhostNet'] import math import torch from torch import nn from torchtoolbox.nn import Activation def make_divisible(v, divisible_by, min_value=None): """ This function is taken from the original tf repo. https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/mobilenet.py...
[ "torch.nn.Dropout", "torch.nn.AdaptiveAvgPool2d", "torch.nn.ReLU", "math.ceil", "torch.nn.Sequential", "torch.nn.Conv2d", "torch.cat", "torchtoolbox.nn.Activation", "torchtoolbox.tools.summary", "torch.nn.BatchNorm2d", "torch.nn.Linear", "torch.rand", "torch.nn.Hardsigmoid", "torch.nn.Iden...
[((12204, 12237), 'torch.rand', 'torch.rand', ([], {'size': '(1, 3, 224, 224)'}), '(size=(1, 3, 224, 224))\n', (12214, 12237), False, 'import torch\n'), ((12242, 12259), 'torchtoolbox.tools.summary', 'summary', (['model', 'x'], {}), '(model, x)\n', (12249, 12259), False, 'from torchtoolbox.tools import summary\n'), ((1...
# -*- coding: utf-8 -*- from __future__ import annotations import time import pytest from pioreactor.background_jobs.base import BackgroundJob from pioreactor.background_jobs.leader.watchdog import WatchDog from pioreactor.background_jobs.monitor import Monitor from pioreactor.config import leader_hostname from pior...
[ "pioreactor.pubsub.publish", "pioreactor.whoami.get_unit_name", "pioreactor.pubsub.collect_all_logs_of_level", "pioreactor.background_jobs.base.BackgroundJob", "time.sleep", "pioreactor.utils.local_intermittent_storage", "pytest.raises", "pioreactor.background_jobs.leader.watchdog.WatchDog", "piorea...
[((1766, 1798), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""hangs"""'}), "(reason='hangs')\n", (1782, 1798), False, 'import pytest\n'), ((748, 763), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (758, 763), False, 'import time\n'), ((804, 819), 'pioreactor.whoami.get_unit_name', 'get_unit_name...
from marshmallow import Schema, fields, EXCLUDE, post_load from gateway.schema.customfeedinfo import CustomFeedInfo from gateway.schema.fields import NoneString, URLField class ExternalFeedInfoSchema(Schema): url = URLField() site_url = URLField(allow_none=True) title = NoneString(allow_none=True) de...
[ "marshmallow.fields.Integer", "marshmallow.fields.DateTime", "marshmallow.fields.Float", "gateway.schema.fields.NoneString", "marshmallow.fields.Boolean", "gateway.schema.fields.URLField", "gateway.schema.customfeedinfo.CustomFeedInfo" ]
[((222, 232), 'gateway.schema.fields.URLField', 'URLField', ([], {}), '()\n', (230, 232), False, 'from gateway.schema.fields import NoneString, URLField\n'), ((248, 273), 'gateway.schema.fields.URLField', 'URLField', ([], {'allow_none': '(True)'}), '(allow_none=True)\n', (256, 273), False, 'from gateway.schema.fields i...
import numpy as np import logging # Scientific import pandas as pd # Base class for all features from transformers.abstract.mixin import AbstractFeature # Default parameters for this feature from .parameters import * # ################################################################## # PERFORMANCE ACCUMULATOR # #...
[ "logging.warning" ]
[((2355, 2429), 'logging.warning', 'logging.warning', (['f"""Argument \'y\' of median transformation will be ignored."""'], {}), '(f"Argument \'y\' of median transformation will be ignored.")\n', (2370, 2429), False, 'import logging\n'), ((4694, 4782), 'logging.warning', 'logging.warning', (['f"""Column \'{col_out}\' i...
import os PAPRIKA_USERNAME = os.environ.get('PAPRIKA_USERNAME', '') PAPRIKA_PASSWORD = os.environ.get('PAPRIKA_PASSWORD', '') RECIPE_CATEGORIES_SLOT = 'recipe_categories' RECIPE_INGREDIENTS_SLOT = 'recipe_ingredients' RECIPE_DIRECTIONS_SLOT = 'recipe_directions' RECIPE_DURATION_SLOT = 'recipe_duration' RECIPE_NAME_L...
[ "os.environ.get" ]
[((31, 69), 'os.environ.get', 'os.environ.get', (['"""PAPRIKA_USERNAME"""', '""""""'], {}), "('PAPRIKA_USERNAME', '')\n", (45, 69), False, 'import os\n'), ((89, 127), 'os.environ.get', 'os.environ.get', (['"""PAPRIKA_PASSWORD"""', '""""""'], {}), "('PAPRIKA_PASSWORD', '')\n", (103, 127), False, 'import os\n')]
# ********************************************************************************************************************** # # brief: Mask R-CNN # Configurations and data loading code for the sun rgbd dataset. # # author: <NAME> # date: 19.04.2020 # # ***************************************************...
[ "sys.path.append", "os.path.abspath", "os.path.join", "numpy.load" ]
[((548, 573), 'os.path.abspath', 'os.path.abspath', (['"""../../"""'], {}), "('../../')\n", (563, 573), False, 'import os\n'), ((594, 619), 'sys.path.append', 'sys.path.append', (['ROOT_DIR'], {}), '(ROOT_DIR)\n', (609, 619), False, 'import sys\n'), ((3123, 3165), 'os.path.join', 'os.path.join', (['dataset_dir', "(subs...
# -*- coding: utf-8 -*- from openprocurement.integrations.edr.tests.base import BaseWebTest from openprocurement.integrations.edr.utils import Db config = { "cache_host": "127.0.0.1", "cache_port": "16379", "cache_db_name": 0 } class TestUtils(BaseWebTest): def test_db_init(self): db = Db(c...
[ "openprocurement.integrations.edr.utils.Db" ]
[((316, 326), 'openprocurement.integrations.edr.utils.Db', 'Db', (['config'], {}), '(config)\n', (318, 326), False, 'from openprocurement.integrations.edr.utils import Db\n'), ((563, 573), 'openprocurement.integrations.edr.utils.Db', 'Db', (['config'], {}), '(config)\n', (565, 573), False, 'from openprocurement.integra...
import asyncio import httpx import base64 import binascii import json import os from Crypto.Cipher import AES from lib import parse_song MODULUS = ("00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7" "b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280" "<KEY>" "575...
[ "asyncio.get_event_loop", "binascii.hexlify", "os.path.exists", "json.dumps", "lib.parse_song", "httpx.AsyncClient", "base64.b64encode", "Crypto.Cipher.AES.new", "os.urandom" ]
[((866, 902), 'Crypto.Cipher.AES.new', 'AES.new', (['key', '(2)', "b'0102030405060708'"], {}), "(key, 2, b'0102030405060708')\n", (873, 902), False, 'from Crypto.Cipher import AES\n'), ((955, 983), 'base64.b64encode', 'base64.b64encode', (['ciphertext'], {}), '(ciphertext)\n', (971, 983), False, 'import base64\n'), ((1...
# -*- mode: python; coding: utf-8 -*- # Copyright 2016-2017 <NAME> <<EMAIL>> and collaborators # Licensed under the MIT License """Various helpers for X-ray analysis that rely on CIAO tools. """ from __future__ import absolute_import, division, print_function, unicode_literals __all__ = str(''' get_region_area count...
[ "pandas.DataFrame", "numpy.abs", "numpy.log", "tempfile.mkdtemp", "numpy.exp", "scipy.special.gammaln", "shutil.rmtree", "numpy.sqrt" ]
[((3667, 3783), 'pandas.DataFrame', 'pd.DataFrame', (["{'elo': [t[0] for t in ebins], 'ehi': [t[1] for t in ebins], 'nsrc':\n srccounts, 'nbkg': bkgcounts}"], {}), "({'elo': [t[0] for t in ebins], 'ehi': [t[1] for t in ebins],\n 'nsrc': srccounts, 'nbkg': bkgcounts})\n", (3679, 3783), True, 'import pandas as pd\n...
# Copyright 2017 Wind River Systems # # 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 w...
[ "json.loads", "sawtooth_sdk.processor.exceptions.InvalidTransaction", "json.dumps", "sawtooth_sdk.processor.exceptions.InternalError", "sawtooth_sdk.protobuf.transaction_pb2.TransactionHeader", "logging.getLogger" ]
[((998, 1025), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1015, 1025), False, 'import logging\n'), ((1578, 1597), 'sawtooth_sdk.protobuf.transaction_pb2.TransactionHeader', 'TransactionHeader', ([], {}), '()\n', (1595, 1597), False, 'from sawtooth_sdk.protobuf.transaction_pb2 import ...
from toontown.town import Street class DDStreet(Street.Street): def enter(self, requestStatus): Street.Street.enter(self, requestStatus) self.loader.hood.setWhiteFog() def exit(self): Street.Street.exit(self) self.loader.hood.setNoFog()
[ "toontown.town.Street.Street.exit", "toontown.town.Street.Street.enter" ]
[((110, 150), 'toontown.town.Street.Street.enter', 'Street.Street.enter', (['self', 'requestStatus'], {}), '(self, requestStatus)\n', (129, 150), False, 'from toontown.town import Street\n'), ((219, 243), 'toontown.town.Street.Street.exit', 'Street.Street.exit', (['self'], {}), '(self)\n', (237, 243), False, 'from toon...
from django.shortcuts import render, redirect from django.contrib.auth.models import User from django.http import HttpResponse from django.conf import settings from django.contrib.auth import login from maps import forms def getUserIdFromUserName(userName): try: user = User.object...
[ "django.shortcuts.render", "django.http.HttpResponse", "django.contrib.auth.models.User.objects.get" ]
[((571, 602), 'django.shortcuts.render', 'render', (['request', '"""landing.html"""'], {}), "(request, 'landing.html')\n", (577, 602), False, 'from django.shortcuts import render, redirect\n'), ((1301, 1339), 'django.shortcuts.render', 'render', (['request', '"""profile-editor.html"""'], {}), "(request, 'profile-editor...
import attr import json class Message: def serialize(self): return json.dumps(attr.asdict(self)).encode() @staticmethod def deserialize(msg_class, value): return msg_class(**json.loads(value.decode("utf8"))) @attr.s class ExampleMessage(Message): id = attr.ib(str) text = attr.ib...
[ "attr.asdict", "attr.ib" ]
[((289, 301), 'attr.ib', 'attr.ib', (['str'], {}), '(str)\n', (296, 301), False, 'import attr\n'), ((313, 325), 'attr.ib', 'attr.ib', (['str'], {}), '(str)\n', (320, 325), False, 'import attr\n'), ((92, 109), 'attr.asdict', 'attr.asdict', (['self'], {}), '(self)\n', (103, 109), False, 'import attr\n')]
import numpy as np import matplotlib.pyplot as plt np.random.seed(19680801) n_bins = 10 x = np.random.randn(1000, 3) print(x.shape) fig, ((ax0, ax1), (ax2, ax3)) = plt.subplots(nrows=2, ncols=2) colors = ['red', 'tan', 'lime'] ax0.hist(x, n_bins, density=True, histtype='bar', color=colors, label=colors) ax0.legend(p...
[ "matplotlib.pyplot.show", "numpy.random.seed", "matplotlib.pyplot.subplots", "numpy.random.randn" ]
[((52, 76), 'numpy.random.seed', 'np.random.seed', (['(19680801)'], {}), '(19680801)\n', (66, 76), True, 'import numpy as np\n'), ((94, 118), 'numpy.random.randn', 'np.random.randn', (['(1000)', '(3)'], {}), '(1000, 3)\n', (109, 118), True, 'import numpy as np\n'), ((166, 196), 'matplotlib.pyplot.subplots', 'plt.subplo...
from flask import render_template from flask_babel import _ from flask_babel import lazy_gettext as _l from wtforms.validators import InputRequired from app.forms import SteuerlotseBaseForm from app.forms.fields import SteuerlotseStringField from app.forms.steps.step import FormStep, DisplayStep from app.forms.validat...
[ "app.forms.validators.ValidIdNr", "flask_babel._", "flask_babel.lazy_gettext", "wtforms.validators.InputRequired" ]
[((490, 523), 'flask_babel.lazy_gettext', '_l', (['"""unlock-code-activation.idnr"""'], {}), "('unlock-code-activation.idnr')\n", (492, 523), True, 'from flask_babel import lazy_gettext as _l\n'), ((602, 642), 'flask_babel.lazy_gettext', '_l', (['"""unlock-code-activation.unlock-code"""'], {}), "('unlock-code-activatio...
# Python modules # 3rd party modules import numpy as np # Our modules def op_rmbadaverages( data, sw, nsd='3', domain='t'): """ USAGE: badAverages, metric = op_rmbadaverages(data, sw, nsd=nsd, domain=domain) DESCRIPTION: Removes motion corrupted averages from a dataset containing multiple ...
[ "numpy.fft.ifft", "numpy.sum", "numpy.logical_and", "numpy.polyfit", "numpy.polyval", "numpy.std", "numpy.median", "numpy.mean", "numpy.arange", "numpy.array", "numpy.exp" ]
[((1365, 1380), 'numpy.arange', 'np.arange', (['nfid'], {}), '(nfid)\n', (1374, 1380), True, 'import numpy as np\n'), ((2392, 2417), 'numpy.polyfit', 'np.polyfit', (['x', 'zmetric', '(2)'], {}), '(x, zmetric, 2)\n', (2402, 2417), True, 'import numpy as np\n'), ((2429, 2448), 'numpy.polyval', 'np.polyval', (['pfit', 'x'...
from __future__ import annotations from librespot import util from librespot.crypto import Packet from librespot.proto.Metadata_pb2 import AudioFile from librespot.structure import Closeable, PacketsReceiver import concurrent.futures import io import logging import queue import struct import threading import typing if...
[ "io.BytesIO", "librespot.util.bytes_to_hex", "threading.Condition", "struct.pack", "queue.Queue", "logging.getLogger" ]
[((583, 628), 'logging.getLogger', 'logging.getLogger', (['"""Librespot:ChannelManager"""'], {}), "('Librespot:ChannelManager')\n", (600, 628), False, 'import logging\n'), ((670, 691), 'threading.Condition', 'threading.Condition', ([], {}), '()\n', (689, 691), False, 'import threading\n'), ((1099, 1111), 'io.BytesIO', ...
#!/usr/bin/env python """ Created by: <NAME> (2017) Description: A parser for parsing genome properties longform files. """ import csv from os.path import basename, splitext from pygenprop.assign import AssignmentCache def parse_genome_property_longform_file(longform_file): """ Parses longform genome proper...
[ "csv.reader", "os.path.basename" ]
[((1482, 1527), 'csv.reader', 'csv.reader', (['interproscan_file'], {'delimiter': '"""\t"""'}), "(interproscan_file, delimiter='\\t')\n", (1492, 1527), False, 'import csv\n'), ((582, 610), 'os.path.basename', 'basename', (['longform_file.name'], {}), '(longform_file.name)\n', (590, 610), False, 'from os.path import bas...
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
[ "threading.RLock" ]
[((882, 899), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (897, 899), False, 'import threading\n')]
""" 云片网发送短信 注意要把服务器的对外ip设置到ip白名单里 """ import json import requests from MxShop_Back.privacy import YUNPIAN_KEY from MxShop_Back.privacy import MY_MOBILE class YunPian(object): """云片网发送短信工具类""" def __init__(self, api_key): """构造器""" self.api_key = api_key # 单条短信接口 self.single_se...
[ "requests.post", "json.loads" ]
[((676, 724), 'requests.post', 'requests.post', (['self.single_send_url'], {'data': 'parmas'}), '(self.single_send_url, data=parmas)\n', (689, 724), False, 'import requests\n'), ((743, 768), 'json.loads', 'json.loads', (['response.text'], {}), '(response.text)\n', (753, 768), False, 'import json\n')]
""" * This file is part of project Creation-of-a-search-engine. It's copyrighted by the contributors * Copyright (c) 2021 lprtk """ """ This module includes the six functions of the motor search. You can reuse these functions for other databases because they are universal with parameters. """ #...
[ "pandas.merge" ]
[((2659, 2722), 'pandas.merge', 'pd.merge', (['df_title1', 'df_title2'], {'on': '"""imdb_title_id"""', 'how': '"""inner"""'}), "(df_title1, df_title2, on='imdb_title_id', how='inner')\n", (2667, 2722), True, 'import pandas as pd\n'), ((9797, 9868), 'pandas.merge', 'pd.merge', (['df_movies_actor', 'df_movies'], {'how': ...
"""API Models for Rate Limit Policy API in Control Plane""" from flask_restx import fields def req_api_model(): """Request API Model for Rate Limit Policies""" return { 'name': fields.String(required=True, description='rate-limit policy name'), 'level': fields.St...
[ "flask_restx.fields.String", "flask_restx.fields.Integer" ]
[((628, 693), 'flask_restx.fields.Integer', 'fields.Integer', ([], {'required': '(True)', 'description': '"""rate-limit policy ID"""'}), "(required=True, description='rate-limit policy ID')\n", (642, 693), False, 'from flask_restx import fields\n'), ((196, 262), 'flask_restx.fields.String', 'fields.String', ([], {'requ...
import datetime import json import logging import requests import boto3 CONFIG_FILE = 'config.json' logger = logging.getLogger('main') logger.setLevel(logging.DEBUG) # debug logs from HTTP requests include the query params, # which may contain access tokens: suppress them. logging.getLogger("requests").setLevel(logg...
[ "json.load", "argparse.ArgumentParser", "boto3.client", "datetime.date.today", "logging.getLogger" ]
[((112, 137), 'logging.getLogger', 'logging.getLogger', (['"""main"""'], {}), "('main')\n", (129, 137), False, 'import logging\n'), ((1893, 1932), 'boto3.client', 'boto3.client', (['"""ssm"""'], {'region_name': 'region'}), "('ssm', region_name=region)\n", (1905, 1932), False, 'import boto3\n'), ((5230, 5255), 'argparse...
""" This file contains functions for plotting the performance of the model for censored data. """ import numpy as np import pandas as pd import seaborn as sns from copy import deepcopy import random from .figureCommon import ( getSetup, subplotLabel, commonAnalyze, pi, T, E2, num_data_point...
[ "pandas.DataFrame", "copy.deepcopy", "numpy.isfinite", "seaborn.regplot", "random.seed", "numpy.linspace" ]
[((543, 557), 'random.seed', 'random.seed', (['(0)'], {}), '(0)\n', (554, 557), False, 'import random\n'), ((793, 807), 'random.seed', 'random.seed', (['(0)'], {}), '(0)\n', (804, 807), False, 'import random\n'), ((1719, 1794), 'numpy.linspace', 'np.linspace', (['min_num_lineages', 'max_num_lineages', 'num_data_points'...
#! /usr/bin/env python3 """Provide wrapper for Ribo-seq workflow. (1) Extract metagene profiles. (2) Estimate metagene profiles Bayes factors. (3) Select periodic fragments and offsets. (4) Optionally, filter non-periodic read lengths from alignment file (BAM) Calls: create-base-genome-profile extract-metage...
[ "pbio.ribo.ribo_filenames.get_models", "argparse.ArgumentParser", "pbio.ribo.ribo_filenames.get_default_models_base", "pbio.misc.utils.get_config_argument", "pbio.ribo.ribo_filenames.get_metagene_profiles_bayes_factors", "pbio.misc.utils.check_keys_exist", "shlex.quote", "pproc.utils.cl_utils.add_file...
[((1152, 1179), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1169, 1179), False, 'import logging\n'), ((1203, 1238), 'pbio.ribo.ribo_filenames.get_default_models_base', 'filenames.get_default_models_base', ([], {}), '()\n', (1236, 1238), True, 'import pbio.ribo.ribo_filenames as filena...
from django.contrib import admin from phonebooks_api import models # Register your models here. admin.site.register(models.Phonebook) admin.site.register(models.userPhonebook)
[ "django.contrib.admin.site.register" ]
[((97, 134), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Phonebook'], {}), '(models.Phonebook)\n', (116, 134), False, 'from django.contrib import admin\n'), ((135, 176), 'django.contrib.admin.site.register', 'admin.site.register', (['models.userPhonebook'], {}), '(models.userPhonebook)\n', (1...
#!/usr/bin/python import itertools, pprint, json, sys def main(): pairs = {} # number of times a pair occurs in the same family size = 0 # number of pan-genome families max_count = 0 # count of the genome with most # of gene families genome_family_count = {} all_genomes = set() # sorted list of...
[ "itertools.combinations", "json.dump" ]
[((1748, 1781), 'json.dump', 'json.dump', (['to_json', 'out'], {'indent': '(4)'}), '(to_json, out, indent=4)\n', (1757, 1781), False, 'import itertools, pprint, json, sys\n'), ((952, 986), 'itertools.combinations', 'itertools.combinations', (['genomes', '(2)'], {}), '(genomes, 2)\n', (974, 986), False, 'import itertool...
# coding=utf-8 import tensorflow as tf import wml_tfutils as wmlt import tfop from object_detection2.standard_names import * import wmodule from object_detection2.datadef import * from object_detection2.config.config import global_cfg from object_detection2.modeling.build import HEAD_OUTPUTS import object_detection2.od...
[ "object_detection2.modeling.build.HEAD_OUTPUTS.register", "tensorflow.meshgrid", "tensorflow.reduce_sum", "tensorflow.maximum", "tensorflow.reshape", "wnnlayer.pixel_nms", "tensorflow.greater_equal", "tensorflow.greater", "tensorflow.split", "tfop.match_by_tag", "tensorflow.add_n", "tensorflow...
[((445, 468), 'object_detection2.modeling.build.HEAD_OUTPUTS.register', 'HEAD_OUTPUTS.register', ([], {}), '()\n', (466, 468), False, 'from object_detection2.modeling.build import HEAD_OUTPUTS\n'), ((1459, 1501), 'basic_tftools.combined_static_and_dynamic_shape', 'btf.combined_static_and_dynamic_shape', (['net'], {}), ...
'''<HANDLER DESCRIPTION>''' import logging import json import os import random import time from iopipe.iopipe import IOpipe from iopipe.contrib.profiler import ProfilerPlugin from iopipe.contrib.trace import TracePlugin if os.environ.get('XRAY_ENABLED', '').lower() == 'true': from aws_xray_sdk.core import xray_r...
[ "random.randint", "iopipe.contrib.trace.TracePlugin", "json.dumps", "os.environ.get", "aws_xray_sdk.core.patch_all", "logging.getLevelName", "iopipe.contrib.profiler.ProfilerPlugin", "logging.getLogger", "iopipe.iopipe.IOpipe" ]
[((395, 430), 'os.environ.get', 'os.environ.get', (['"""LOG_LEVEL"""', '"""INFO"""'], {}), "('LOG_LEVEL', 'INFO')\n", (409, 430), False, 'import os\n'), ((511, 538), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (528, 538), False, 'import logging\n'), ((1170, 1214), 'iopipe.iopipe.IOpipe...
#!/usr/bin/env python import sys target = int(sys.argv[1]) n = 1 x = 0 y = 0 UP = 0 LEFT = 1 DOWN = 2 RIGHT = 3 radius = 1; directions = ['up', 'left', 'down', 'right'] deltas = [(0,1), (-1,0), (0,-1), (1,0)] field = [None]*1024 for i in range(0,1024): field[i] = [None]*1024 field[512][512] = 1 def abs(...
[ "sys.stdout.write", "sys.exit" ]
[((1012, 1023), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1020, 1023), False, 'import sys\n'), ((863, 888), 'sys.stdout.write', 'sys.stdout.write', (['"""---\t"""'], {}), "('---\\t')\n", (879, 888), False, 'import sys\n'), ((931, 983), 'sys.stdout.write', 'sys.stdout.write', (["('%d\\t' % field[px + 512][py + 51...
__author__ = 'tsungyi' #modified by y2863 on December 20th 2021 import numpy as np import datetime import time from collections import defaultdict import pycocotools.mask as maskUtils from pycocotools.cocoeval import COCOeval, Params import copy class MetaGraspeval(COCOeval): def __init__(self, *args, **kwargs): ...
[ "numpy.count_nonzero", "numpy.multiply", "numpy.logical_not", "numpy.zeros", "numpy.ones", "numpy.searchsorted", "time.time", "numpy.argsort", "numpy.cumsum", "pycocotools.cocoeval.COCOeval.accumulate", "numpy.spacing", "numpy.array", "datetime.datetime.now", "numpy.concatenate", "numpy....
[((1281, 1337), 'numpy.argsort', 'np.argsort', (["[g['_ignore'] for g in gt]"], {'kind': '"""mergesort"""'}), "([g['_ignore'] for g in gt], kind='mergesort')\n", (1291, 1337), True, 'import numpy as np\n'), ((1390, 1447), 'numpy.argsort', 'np.argsort', (["[(-d['score']) for d in dt]"], {'kind': '"""mergesort"""'}), "([...
#!/usr/bin/env python3 # file://mkpy3_finder_chart_tpf_overlay_v6.py # <NAME> # SETI Institute def mkpy3_finder_chart_tpf_overlay_v6( ax=None, survey_wcs=None, tpf=None, frame=None, colors=[None, "cornflowerblue", "red"], lws=[0, 3, 4], zorders=[0, 1, 2], verbose=None, ): """ Fun...
[ "argparse.ArgumentParser", "mkpy3.mkpy3_finder_chart_survey_fits_image_get_v1", "matplotlib.pyplot.suptitle", "lightkurve.read", "matplotlib.pyplot.figure", "mkpy3.mkpy3_util_check_file_exists", "matplotlib.pyplot.close", "lightkurve.log.setLevel", "mkpy3.mkpy3_finder_chart_image_show_v1", "os.pat...
[((2011, 2045), 'numpy.zeros', 'np.zeros', (['tpf_data.size'], {'dtype': 'int'}), '(tpf_data.size, dtype=int)\n', (2019, 2045), True, 'import numpy as np\n'), ((3441, 3513), 'numpy.array', 'np.array', (['[[1.0, 1.0], [1.0, -1.0], [-1.0, -1.0], [-1.0, 1], [1.0, 1.0]]'], {}), '([[1.0, 1.0], [1.0, -1.0], [-1.0, -1.0], [-1...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "os.path.isdir", "os.path.dirname", "bigbench.api.util.load_json_task", "bigbench.api.util.load_programmatic_task", "os.path.join", "os.listdir" ]
[((891, 916), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (906, 916), False, 'import os\n'), ((972, 1005), 'os.path.join', 'os.path.join', (['bench_dir', 'task_dir'], {}), '(bench_dir, task_dir)\n', (984, 1005), False, 'import os\n'), ((1024, 1045), 'os.listdir', 'os.listdir', (['task_path...
##### IMPORTING PACKAGES ##### import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from scipy.optimize import minimize from sklearn.preprocessing import PolynomialFeatures # pd.set_option('display.notebook_repr_html', False) # pd.set_option('display.max_columns', None) # pd.s...
[ "scipy.optimize.minimize", "matplotlib.pyplot.show", "numpy.log", "matplotlib.pyplot.scatter", "numpy.round", "numpy.zeros", "numpy.ones", "numpy.isnan", "numpy.square", "sklearn.preprocessing.PolynomialFeatures", "matplotlib.pyplot.contour", "numpy.loadtxt", "numpy.linspace", "matplotlib....
[((1163, 1219), 'numpy.loadtxt', 'np.loadtxt', (['"""LogisticRegressionData1.txt"""'], {'delimiter': '""","""'}), "('LogisticRegressionData1.txt', delimiter=',')\n", (1173, 1219), True, 'import numpy as np\n'), ((1566, 1576), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (1574, 1576), True, 'import matplotlib...
import abc import copy import itertools import logging from typing import ( Any, Callable, Dict, Iterable, Iterator, Mapping, Optional, Sequence, Set, Type, TypeVar, Union ) import numpy as np from smqtk_dataprovider import DataElement from smqtk_descriptors import DescriptorGenerator from smqtk_image_io impo...
[ "smqtk_core.configuration.to_config_dict", "copy.deepcopy", "smqtk_image_io.ImageReader.get_impls", "torch.load", "smqtk_descriptors.utils.pytorch_utils.load_state_dict", "numpy.expand_dims", "numpy.linalg.norm", "itertools.islice", "typing.TypeVar", "smqtk_descriptors.utils.parallel.parallel_map"...
[((575, 602), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (592, 602), False, 'import logging\n'), ((1070, 1122), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': '"""TorchModuleDescriptorGenerator"""'}), "('T', bound='TorchModuleDescriptorGenerator')\n", (1077, 1122), False, 'from ...
""" test punx validate module ISSUES .. note:: Add new issues here with empty brackets, add "*" when issue is fixed. Issues will only be marked "fixed" on GitHub once this branch is merged. Then, this table may be removed. * [ ] #110 all validation tests passing * [*] #95 validate item names in the cla...
[ "h5py.File", "os.path.exists", "pytest.raises", "pytest.mark.parametrize", "os.path.join" ]
[((1461, 1633), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""file_set, xcptn, file_name"""', "[[DEFAULT_NXDL_FILE_SET, FileNotFound, 'no such file'], [\n DEFAULT_NXDL_FILE_SET, HDF5_Open_Error, __file__]]"], {}), "('file_set, xcptn, file_name', [[\n DEFAULT_NXDL_FILE_SET, FileNotFound, 'no such fil...
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # ...
[ "datafinder.persistence.adapters.webdav_.privileges.privileges_mapping.PrivilegeMapper", "webdav.acp.Privilege", "webdav.acp.GrantDeny", "webdav.acp.ACL", "datafinder.persistence.privileges.ace.AccessControlListEntry", "datafinder.persistence.principal_search.principal.Principal", "webdav.acp.ACE" ]
[((2545, 2550), 'webdav.acp.ACL', 'ACL', ([], {}), '()\n', (2548, 2550), False, 'from webdav.acp import ACL, ACE, GrantDeny, Privilege\n'), ((2806, 2811), 'webdav.acp.ACL', 'ACL', ([], {}), '()\n', (2809, 2811), False, 'from webdav.acp import ACL, ACE, GrantDeny, Privilege\n'), ((2962, 3028), 'datafinder.persistence.ad...
# Generated by Django 3.0.8 on 2020-07-15 14:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('radio', '0003_auto_20200715_1405'), ] operations = [ migrations.RenameModel( old_name='SiteConifguration', new_name='SiteCon...
[ "django.db.migrations.RenameModel" ]
[((225, 312), 'django.db.migrations.RenameModel', 'migrations.RenameModel', ([], {'old_name': '"""SiteConifguration"""', 'new_name': '"""SiteConfiguration"""'}), "(old_name='SiteConifguration', new_name=\n 'SiteConfiguration')\n", (247, 312), False, 'from django.db import migrations\n')]
# MIT License # hourglass # Copyright (c) 2022 Ethereal AI # # 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, modif...
[ "spacy.load" ]
[((1295, 1390), 'spacy.load', 'spacy.load', (['"""en_core_web_sm"""'], {'disable': "['attribute_ruler', 'lemmatizer', 'parser', 'tagger']"}), "('en_core_web_sm', disable=['attribute_ruler', 'lemmatizer',\n 'parser', 'tagger'])\n", (1305, 1390), False, 'import spacy\n')]
"""A simple project that is compatible with both 'brotli' C bindings and 'brotlicffi' CFFI bindings """ import sys try: import brotlicffi as brotli except ImportError: import brotli def main(): data = sys.argv[1].encode("utf-8") print(f"Compressing data: {data}") compressor = brotli.Compressor(...
[ "brotli.Decompressor", "brotli.Compressor" ]
[((302, 342), 'brotli.Compressor', 'brotli.Compressor', ([], {'mode': 'brotli.MODE_TEXT'}), '(mode=brotli.MODE_TEXT)\n', (319, 342), False, 'import brotli\n'), ((471, 492), 'brotli.Decompressor', 'brotli.Decompressor', ([], {}), '()\n', (490, 492), False, 'import brotli\n')]
# -*- coding: utf-8 -*- """ Data generation for figure 05c """ import sys sys.path.append("../main/") from ODEdrop import * # Heterogeneity def g(x,y): return 1.2+a*(-np.tanh(50*(x+1.5))+np.tanh(50*(x-1.5))-np.tanh(50*(x-1.75))) # Volume variations def V(t): return ( np.pi*(1+2*np.tanh(2*np.pi*t/100)), np.pi*...
[ "sys.path.append" ]
[((74, 101), 'sys.path.append', 'sys.path.append', (['"""../main/"""'], {}), "('../main/')\n", (89, 101), False, 'import sys\n')]
# -*- coding: utf-8 -*- ''' Generate HTML for add, edit, view The type of the control inclusing `select`, text`, `digits`, ``date`, `number`, `email`, `url`. The last 5 types is defined as in JQuery Validation. ''' import os from . import func_gen_html from .base_crud import CRUD_PATH, INPUT_ARR from .fetch_html_dic...
[ "os.getcwd", "os.mkdir", "os.path.exists" ]
[((524, 535), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (533, 535), False, 'import os\n'), ((5908, 5939), 'os.path.exists', 'os.path.exists', (['the_view_file_4'], {}), '(the_view_file_4)\n', (5922, 5939), False, 'import os\n'), ((7183, 7206), 'os.path.exists', 'os.path.exists', (['out_dir'], {}), '(out_dir)\n', (719...
from robotframework_ls.impl.protocols import ( ICompletionContext, IRobotDocument, ILibraryDoc, IKeywordFound, ) from robocorp_ls_core.lsp import CompletionItemKind from typing import Optional, List, Set, Dict, Any from robotframework_ls.impl.protocols import NodeInfo import os.path from robocorp_ls_cor...
[ "robotframework_ls.impl.ast_utils.get_keyword_name_token", "robocorp_ls_core.lsp.CompletionItem", "robotframework_ls.robot_config.create_convert_keyword_format_func", "robocorp_ls_core.uris.to_fs_path", "robocorp_ls_core.lsp.Position", "robotframework_ls.impl.string_matcher.RobotStringMatcher", "robotfr...
[((7226, 7287), 'robotframework_ls.robot_config.create_convert_keyword_format_func', 'create_convert_keyword_format_func', (['completion_context.config'], {}), '(completion_context.config)\n', (7260, 7287), False, 'from robotframework_ls.robot_config import create_convert_keyword_format_func\n'), ((7351, 7417), 'robotf...
import logging import numpy as np import os import pandas as pd import sqlite3 root_path = os.path.dirname(os.path.realpath(__file__)) runlog = logging.getLogger('runlog') alglog = logging.getLogger('alglog') def drillinginfo(file): """ Reads the production data file in the drillinginfo.com format. :para...
[ "pandas.read_csv", "os.path.realpath", "sqlite3.connect", "numpy.array", "logging.getLogger" ]
[((145, 172), 'logging.getLogger', 'logging.getLogger', (['"""runlog"""'], {}), "('runlog')\n", (162, 172), False, 'import logging\n'), ((182, 209), 'logging.getLogger', 'logging.getLogger', (['"""alglog"""'], {}), "('alglog')\n", (199, 209), False, 'import logging\n'), ((108, 134), 'os.path.realpath', 'os.path.realpat...
import os import time from typing import Any, Dict, Optional from uuid import uuid4 from imagination import service from imagination.decorator.config import Parameter import jwt from oriole.helper.logger_factory import LoggerFactory logger = LoggerFactory.get(__name__) @service.registered(params=[ Parameter(na...
[ "uuid.uuid4", "time.time", "oriole.helper.logger_factory.LoggerFactory.get", "os.getenv", "jwt.decode" ]
[((245, 272), 'oriole.helper.logger_factory.LoggerFactory.get', 'LoggerFactory.get', (['__name__'], {}), '(__name__)\n', (262, 272), False, 'from oriole.helper.logger_factory import LoggerFactory\n'), ((1393, 1507), 'jwt.decode', 'jwt.decode', (['token', 'self.token_secret'], {'issuer': 'self.issuer', 'audience': 'self...
from src.Account import Account from src.Profile import Profile from src.Wallet import Wallet from src.Inventory import Inventory from src.InventoryItem import InventoryItem from src.Item import Item from database.MyDatabase import MyDatabase import csv def load_accounts() -> list: accounts = [] with open("dat...
[ "src.InventoryItem.InventoryItem", "src.Inventory.Inventory", "csv.reader", "csv.writer" ]
[((371, 387), 'csv.reader', 'csv.reader', (['file'], {}), '(file)\n', (381, 387), False, 'import csv\n'), ((894, 910), 'csv.reader', 'csv.reader', (['file'], {}), '(file)\n', (904, 910), False, 'import csv\n'), ((1663, 1679), 'csv.writer', 'csv.writer', (['file'], {}), '(file)\n', (1673, 1679), False, 'import csv\n'), ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import print_function import h2o from tests import pyunit_utils from h2o.estimators.glm import H2OGeneralizedLinearEstimator import random def random_attack(): def cointoss(): return random.randint(0, 1) def attack(family, train, valid,...
[ "random.randint", "random.uniform", "tests.pyunit_utils.standalone_test", "h2o.estimators.glm.H2OGeneralizedLinearEstimator", "random.random", "h2o.H2OFrame", "tests.pyunit_utils.locate" ]
[((3316, 3340), 'random.randint', 'random.randint', (['(1)', '(10000)'], {}), '(1, 10000)\n', (3330, 3340), False, 'import random\n'), ((5494, 5537), 'tests.pyunit_utils.standalone_test', 'pyunit_utils.standalone_test', (['random_attack'], {}), '(random_attack)\n', (5522, 5537), False, 'from tests import pyunit_utils\n...
#! /usr/bin/env python2.6 import matplotlib matplotlib.use('Agg') import denudationRateAnalysis as dra import numpy as np data = dra.read_csv('portengadata.csv') del(data[0]) ksn_vec, area_vec = dra.calculate_ksn_for_data(data,1000000,0.6) np.savez_compressed('ksn_area_data_0_6.npz', ksn_vec = ksn_vec, area_vec = a...
[ "numpy.savez_compressed", "matplotlib.use", "denudationRateAnalysis.read_csv", "denudationRateAnalysis.calculate_ksn_for_data" ]
[((45, 66), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (59, 66), False, 'import matplotlib\n'), ((132, 164), 'denudationRateAnalysis.read_csv', 'dra.read_csv', (['"""portengadata.csv"""'], {}), "('portengadata.csv')\n", (144, 164), True, 'import denudationRateAnalysis as dra\n'), ((198, 244),...
"""Generates some data from random gaussian blobs and renders it""" import matplotlib.pyplot as plt import matplotlib.colors as mcolors import pca3dvis.pcs as pcs import pca3dvis.worker as worker import numpy as np FEATURES = 10 """The embedded space of the generated data. Every later snapshot has one more fe...
[ "numpy.random.uniform", "matplotlib.pyplot.get_cmap", "matplotlib.colors.Normalize", "numpy.random.randn", "pca3dvis.worker.generate", "numpy.zeros", "numpy.ones", "pca3dvis.pcs.get_pc_trajectory" ]
[((2019, 2039), 'matplotlib.pyplot.get_cmap', 'plt.get_cmap', (['"""Set1"""'], {}), "('Set1')\n", (2031, 2039), True, 'import matplotlib.pyplot as plt\n'), ((2667, 2701), 'pca3dvis.pcs.get_pc_trajectory', 'pcs.get_pc_trajectory', (['datas', 'lbls'], {}), '(datas, lbls)\n', (2688, 2701), True, 'import pca3dvis.pcs as pc...
import torch class NoiseManager: def __init__(self, noise, device, trace_model=False): self.device = device self.noise_lut = {} if noise is not None: for i in range(len(noise)): if not None in noise: self.noise_lut[noise[i].size(-1)] = noise[...
[ "torch.randn" ]
[((585, 614), 'torch.randn', 'torch.randn', (['b', '(1)', 'size', 'size'], {}), '(b, 1, size, size)\n', (596, 614), False, 'import torch\n')]