code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python2 # -*- coding: utf-8 -*- u"""Downloads notes from the TEK web. @author: <NAME> """ import requests from bs4 import BeautifulSoup import os.path import wget import ssl ssl._create_default_https_context = ssl._create_unverified_context url_root = 'https://teknet.tek.fi/arkisto.lehti/content/' url ...
[ "bs4.BeautifulSoup", "requests.get", "wget.download" ]
[((355, 386), 'requests.get', 'requests.get', (['url'], {'verify': '(False)'}), '(url, verify=False)\n', (367, 386), False, 'import requests\n'), ((401, 430), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.text', '"""lxml"""'], {}), "(r.text, 'lxml')\n", (414, 430), False, 'from bs4 import BeautifulSoup\n'), ((772, 822), '...
import json from django.shortcuts import render, HttpResponse from django.views import View # FBV def users(request): # if request.method == "GET": # pass user_list = ['smalle', 'aezocn'] return HttpResponse(json.dumps(user_list)) class MyBaseView(object): # 装饰器作用(拦截器) def dispatch(self,...
[ "django.shortcuts.HttpResponse", "json.dumps" ]
[((1675, 1718), 'django.shortcuts.HttpResponse', 'HttpResponse', (['"""test_contenttypes_create..."""'], {}), "('test_contenttypes_create...')\n", (1687, 1718), False, 'from django.shortcuts import render, HttpResponse\n'), ((2008, 2049), 'django.shortcuts.HttpResponse', 'HttpResponse', (['"""test_contenttypes_list..."...
from pcf.core import State from pcf.particle.aws.dynamodb.dynamodb_table import DynamoDB #example dynamodb dynamodb_example_json = { "pcf_name": "pcf_dynamodb", # Required "flavor": "dynamodb_table", # Required "aws_resource": { # Refer to https://boto3.readthedocs.io/en/latest/reference/service...
[ "pcf.particle.aws.dynamodb.dynamodb_table.DynamoDB" ]
[((1820, 1851), 'pcf.particle.aws.dynamodb.dynamodb_table.DynamoDB', 'DynamoDB', (['dynamodb_example_json'], {}), '(dynamodb_example_json)\n', (1828, 1851), False, 'from pcf.particle.aws.dynamodb.dynamodb_table import DynamoDB\n'), ((2196, 2227), 'pcf.particle.aws.dynamodb.dynamodb_table.DynamoDB', 'DynamoDB', (['dynam...
# ---------------------------------------------------------------------- # noc.core.script.metrics tests # ---------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- ...
[ "noc.core.script.metrics.scale", "noc.core.script.metrics.invert0", "noc.core.script.metrics.percent_invert", "noc.core.script.metrics.is1", "noc.core.script.metrics.percent_usage", "noc.core.script.metrics.convert_percent_str", "noc.core.script.metrics.subtract", "pytest.mark.parametrize", "noc.cor...
[((547, 721), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""value,total,expected"""', '[(10.0, 0, 100.0), (10.0, None, 100.0), (1.0, 10.0, 10.0), (5.0, 10.0, 50.0\n ), (9.0, 10.0, 90.0), (10.0, 10.0, 100.0)]'], {}), "('value,total,expected', [(10.0, 0, 100.0), (10.0,\n None, 100.0), (1.0, 10.0, 10.0...
import urllib.parse import base64 from urllib.parse import unquote from urllib.parse import quote tempEmail = input('Registered Email: ').encode('UTF-8') suffix = input ('Suffix Added: ').encode('UTF-8') adminEmail = input('Admin Email: ').encode('UTF-8') saml_dec = base64.b64decode(unquote(input('SAML...
[ "base64.b64encode" ]
[((446, 472), 'base64.b64encode', 'base64.b64encode', (['saml_dec'], {}), '(saml_dec)\n', (462, 472), False, 'import base64\n')]
from operator import attrgetter from typing import List from meadow.models import Book def search_by_title(title: str) -> List[Book]: if not title: return list(filter(attrgetter("is_approved"), Book.objects.all())) title = title.lower() books = [] for book in Book.objects.all(): if ...
[ "meadow.models.Book.objects.all", "operator.attrgetter", "meadow.models.Book.objects.get" ]
[((289, 307), 'meadow.models.Book.objects.all', 'Book.objects.all', ([], {}), '()\n', (305, 307), False, 'from meadow.models import Book\n'), ((479, 507), 'meadow.models.Book.objects.get', 'Book.objects.get', ([], {'id': 'book_id'}), '(id=book_id)\n', (495, 507), False, 'from meadow.models import Book\n'), ((182, 207),...
import random from functools import lru_cache from hypothesis import core class Settings: def __init__(self) -> None: self.seed = random.getrandbits(128) # type: int self.unicode_enabled = True # type: bool self.enable_color = True # type: bool @property ...
[ "functools.lru_cache", "random.seed", "random.getrandbits" ]
[((546, 566), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(1)'}), '(maxsize=1)\n', (555, 566), False, 'from functools import lru_cache\n'), ((145, 168), 'random.getrandbits', 'random.getrandbits', (['(128)'], {}), '(128)\n', (163, 168), False, 'import random\n'), ((524, 542), 'random.seed', 'random.seed', (['...
from hookup import db from hookup.models import Page, User import getpass DEFAULT_SITES = ["facebook", "twitter", "netflix", "github"] def create_superuser(): username = input("Username: ") password = getpass.getpass("Password ") user = User(username=username, password=password) user.save() def regis...
[ "hookup.db.create_all", "getpass.getpass", "hookup.models.Page", "hookup.models.User", "hookup.models.User.query.first" ]
[((211, 239), 'getpass.getpass', 'getpass.getpass', (['"""Password """'], {}), "('Password ')\n", (226, 239), False, 'import getpass\n'), ((251, 293), 'hookup.models.User', 'User', ([], {'username': 'username', 'password': 'password'}), '(username=username, password=password)\n', (255, 293), False, 'from hookup.models ...
from __future__ import annotations import re from typing import Callable, TypeVar, Any, Sequence, Mapping, MutableMapping, Iterable, Optional from datetime import datetime, date as dt_date, time as dt_time from time import time as t_time, sleep from unicodedata import normalize from string import Formatter from dateuti...
[ "dateutil.parser.parse", "time.sleep", "time.time", "typing.TypeVar", "re.sub" ]
[((447, 459), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (454, 459), False, 'from typing import Callable, TypeVar, Any, Sequence, Mapping, MutableMapping, Iterable, Optional\n'), ((2218, 2226), 'time.time', 't_time', ([], {}), '()\n', (2224, 2226), True, 'from time import time as t_time, sleep\n'), ((82...
import csv import glob from biothings.utils.dataload import list_split, dict_sweep, unlist, value_convert_to_number VALID_COLUMN_NO = 245 '''this parser is for dbNSFP v3.5a beta2 downloaded from https://sites.google.com/site/jpopgen/dbNSFP''' # convert one snp to json def _map_line_to_json(df, version, include_gnom...
[ "biothings.utils.dataload.value_convert_to_number", "csv.reader", "glob.glob" ]
[((19083, 19120), 'csv.reader', 'csv.reader', (['open_file'], {'delimiter': '"""\t"""'}), "(open_file, delimiter='\\t')\n", (19093, 19120), False, 'import csv\n'), ((20401, 20421), 'glob.glob', 'glob.glob', (['path_glob'], {}), '(path_glob)\n', (20410, 20421), False, 'import glob\n'), ((18769, 18806), 'biothings.utils....
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import json import codecs import fnmatch import logging import itertools import bs4 from tqdm import tqdm def recursive_iglob(rootdir='.', pattern='*'): """Recursive version of iglob. Taken from https://gist.github.com/whophil/2a999bcaf0ebfbd...
[ "fnmatch.filter", "tqdm.tqdm", "argparse.ArgumentParser", "logging.basicConfig", "codecs.open", "os.path.join", "os.walk", "json.dumps", "logging.info", "os.path.isfile", "bs4.BeautifulSoup", "re.sub", "argparse.FileType" ]
[((383, 399), 'os.walk', 'os.walk', (['rootdir'], {}), '(rootdir)\n', (390, 399), False, 'import os\n'), ((743, 784), 'bs4.BeautifulSoup', 'bs4.BeautifulSoup', (['content', '"""html.parser"""'], {}), "(content, 'html.parser')\n", (760, 784), False, 'import bs4\n'), ((1357, 1397), 're.sub', 're.sub', (['"""\\\\| The Jap...
#!/usr/bin/env python3 # Copyright (C) 2019 <NAME> <<EMAIL>> # Released under the MIT license (see COPYING.MIT for the terms) import argparse import subprocess import sys CONTAINER_MODEL = 'model' CONTAINER_DEMO = 'demo' IMAGE_MODEL = 'phytecorg/aidemo-customvision-model:0.4.1' IMAGE_DEMO = 'phytecorg/aidemo-customvi...
[ "subprocess.run", "argparse.ArgumentParser" ]
[((396, 492), 'subprocess.run', 'subprocess.run', (["['docker', 'ps', '--format={{.Names}}']"], {'check': '(True)', 'stdout': 'subprocess.PIPE'}), "(['docker', 'ps', '--format={{.Names}}'], check=True, stdout=\n subprocess.PIPE)\n", (410, 492), False, 'import subprocess\n'), ((822, 928), 'subprocess.run', 'subproces...
# Generated by Django 3.2.4 on 2021-06-13 15:48 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), ] ope...
[ "django.db.models.TextField", "django.db.migrations.swappable_dependency", "django.db.models.ManyToManyField", "django.db.models.BigAutoField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.ImageField", "django.db.models.DecimalField"...
[((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'), ((437, 533), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '...
from __future__ import absolute_import from __future__ import print_function import os,time,cv2,sys,math import tensorflow as tf import numpy as np import time, datetime import argparse import random import os, sys import subprocess from utils import utils, helpers from builders import fusion_model_builde...
[ "argparse.ArgumentParser", "tensorflow.trainable_variables", "tensorflow.train.AdamOptimizer", "tensorflow.ConfigProto", "numpy.around", "utils.utils.prepare_data_multiexposure", "numpy.mean", "tensorflow.summary.merge", "utils.utils.count_params", "os.path.join", "argparse.ArgumentTypeError", ...
[((1599, 1624), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1622, 1624), False, 'import argparse\n'), ((4663, 4679), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (4677, 4679), True, 'import tensorflow as tf\n'), ((4770, 4795), 'tensorflow.Session', 'tf.Session', ([], {'conf...
# -*- coding: utf-8 -*- """ Created on Mon Dec 7 14:43:38 2020 @author: dukel """ #%% import numpy as np import pandas as pd import socket ls = ['192.168.3.11', '172.16.58.3', '192.168.127.12', '172.16.17.32', '172.16.58.3', '192.168.127.12', '172.16.31.10', '192.168.3.11'...
[ "pandas.DataFrame", "socket.gethostbyaddr", "socket.gethostbyname" ]
[((1378, 1428), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'ls2', 'columns': "['ip', 'hostname']"}), "(data=ls2, columns=['ip', 'hostname'])\n", (1390, 1428), True, 'import pandas as pd\n'), ((824, 848), 'socket.gethostbyaddr', 'socket.gethostbyaddr', (['ip'], {}), '(ip)\n', (844, 848), False, 'import socket\n')...
""" The command worker for Signed Tag. Designed to process incoming signed messages from UTIM. It checks the input data structure (should contain two TLV elements: message and signature) and verifies elements lengths. In case everything is correct it calls uHost's decrypt() method and passing there the dev-id of the U...
[ "logging.debug" ]
[((2244, 2281), 'logging.debug', 'logging.debug', (['"""Length1: %d"""', 'length1'], {}), "('Length1: %d', length1)\n", (2257, 2281), False, 'import logging\n'), ((2290, 2338), 'logging.debug', 'logging.debug', (['"""Value1: %s"""', '[x for x in value1]'], {}), "('Value1: %s', [x for x in value1])\n", (2303, 2338), Fal...
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check class Contrastive(function.Function): """Contrastive loss function.""" def __init__(self, margin, use_cudnn=True): self.margin = float(margin) self.use_cudnn = use_cudnn def check_ty...
[ "chainer.utils.type_check.expect", "chainer.cuda.get_array_module" ]
[((449, 708), 'chainer.utils.type_check.expect', 'type_check.expect', (['(x0_type.dtype == numpy.float32)', '(x1_type.dtype == numpy.float32)', '(x0_type.shape == x1_type.shape)', '(x0_type.shape[0] == x1_type.shape[0])', '(x1_type.shape[0] == y_type.shape[0])', '(x0_type.ndim == 2)', '(x1_type.ndim == 2)', '(y_type.nd...
#!/usr/bin/env python3 import os from os.path import splitext import fiona import rasterio import numpy as np from rasterio.warp import calculate_default_transform, reproject, Resampling from pyproj.crs import CRS def getDriver(fileName): driverDictionary = {'.gpkg' : 'GPKG','.geojson' : 'GeoJSON','.shp' : 'ESRI...
[ "rasterio.open", "os.remove", "fiona.open", "rasterio.band", "os.path.exists", "os.system", "rasterio.warp.calculate_default_transform", "pyproj.crs.CRS.from_epsg", "os.environ.get", "geopandas.GeoDataFrame", "os.path.splitext", "rasterio.crs.CRS.from_user_input", "rasterio.crs.CRS.from_stri...
[((1414, 1432), 'os.system', 'os.system', (['command'], {}), '(command)\n', (1423, 1432), False, 'import os\n'), ((1687, 1709), 'geopandas.read_file', 'gp.read_file', (['wbd_gpkg'], {}), '(wbd_gpkg)\n', (1699, 1709), True, 'import geopandas as gp\n'), ((1720, 1740), 'geopandas.GeoDataFrame', 'gp.GeoDataFrame', (['wbd']...
""" Template to run ase to do a contrained optimization using Gaussian KinBot needs to pass to the template: 1. A label for the calculation 2. The number of cores 3. The kwargs for Gaussian 4. The atom vector 5. The geometry 6. The Gaussian command """ import os, sys, re import numpy as np import ase from ase imp...
[ "ase.calculators.gaussian.Gaussian", "ase.db.connect", "ase.optimize.pcobfgs.PCOBFGS", "ase.Atoms" ]
[((549, 567), 'ase.calculators.gaussian.Gaussian', 'Gaussian', ([], {}), '(**kwargs)\n', (557, 567), False, 'from ase.calculators.gaussian import Gaussian\n'), ((604, 639), 'ase.Atoms', 'Atoms', ([], {'symbols': 'atom', 'positions': 'geom'}), '(symbols=atom, positions=geom)\n', (609, 639), False, 'from ase import Atoms...
from django.contrib import admin from .models import Video # Register your models here. admin.site.register(Video) class VideoAdmin(admin.ModelAdmin): list_display = ('aid','name', 'tags', 'url', 'cover', 'desc', 'add_time')
[ "django.contrib.admin.site.register" ]
[((89, 115), 'django.contrib.admin.site.register', 'admin.site.register', (['Video'], {}), '(Video)\n', (108, 115), False, 'from django.contrib import admin\n')]
"""Added additional file attributes Revision ID: <KEY> Revises: 826d7777c67c Create Date: 2022-01-14 16:32:28.259435 """ import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "826d7777c67c" branch_labels =...
[ "sqlalchemy.DateTime", "sqlalchemy.dialects.postgresql.TIMESTAMP", "alembic.op.drop_column", "sqlalchemy.String", "sqlalchemy.Integer" ]
[((766, 813), 'alembic.op.drop_column', 'op.drop_column', (['"""fileinfo"""', '"""registration_date"""'], {}), "('fileinfo', 'registration_date')\n", (780, 813), False, 'from alembic import op\n'), ((1143, 1177), 'alembic.op.drop_column', 'op.drop_column', (['"""fileinfo"""', '"""size"""'], {}), "('fileinfo', 'size')\n...
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ "os.getcwd", "os.environ.copy", "shlex.split" ]
[((843, 854), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (852, 854), False, 'import os\n'), ((787, 804), 'os.environ.copy', 'os.environ.copy', ([], {}), '()\n', (802, 804), False, 'import os\n'), ((1040, 1056), 'shlex.split', 'shlex.split', (['cmd'], {}), '(cmd)\n', (1051, 1056), False, 'import shlex\n')]
from typing import List, Tuple import torch from torch import nn from torch import Tensor from convlstm import ConvLSTM, HiddenState class ConvLSTMAutoencoder(nn.Module): """ This model is an implementation of the 'autoencoder' convolutional LSTM model proposed in 'Convolutional LSTM Network: A Machine ...
[ "convlstm.ConvLSTM", "torch.stack" ]
[((1592, 1782), 'convlstm.ConvLSTM', 'ConvLSTM', ([], {'input_size': 'input_size', 'input_dim': 'input_dim', 'hidden_dim': 'hidden_dim', 'kernel_size': 'kernel_size', 'num_layers': 'self.num_layers', 'batch_first': '(False)', 'bias': 'bias', 'mode': 'ConvLSTM.SEQUENCE'}), '(input_size=input_size, input_dim=input_dim, h...
# %% from sklearn.preprocessing import MinMaxScaler, LabelEncoder from sklearn.model_selection import train_test_split from sklearn.metrics import confusion_matrix from xgboost import XGBClassifier import pandas as pd # %% data = pd.read_csv("../data/iris.csv") X = data.drop("class", axis=1) y = data["class"] X_tra...
[ "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.MinMaxScaler", "sklearn.preprocessing.LabelEncoder", "xgboost.XGBClassifier", "sklearn.metrics.confusion_matrix" ]
[((233, 264), 'pandas.read_csv', 'pd.read_csv', (['"""../data/iris.csv"""'], {}), "('../data/iris.csv')\n", (244, 264), True, 'import pandas as pd\n'), ((350, 405), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.33)', 'random_state': '(42)'}), '(X, y, test_size=0.33, rand...
# # Copyright 2011 Twitter, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
[ "inspect.isroutine", "pycascading.pipe.DecoratedFunction.decorate_function" ]
[((2572, 2633), 'pycascading.pipe.DecoratedFunction.decorate_function', 'DecoratedFunction.decorate_function', (['function_or_callabledict'], {}), '(function_or_callabledict)\n', (2607, 2633), False, 'from pycascading.pipe import DecoratedFunction\n'), ((2888, 2914), 'inspect.isroutine', 'inspect.isroutine', (['args[0]...
import package_to_document import pyDocStr import os print(pyDocStr.__file__) current_path = os.getcwd() print(current_path) pyDocStr.build_docstrings_package( "./pyDocStr/package_to_document", new_package_path="./pyDocStr/package_documented", subpackages=True, level_logger='debug...
[ "os.getcwd", "pyDocStr.build_docstrings_package" ]
[((96, 107), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (105, 107), False, 'import os\n'), ((128, 293), 'pyDocStr.build_docstrings_package', 'pyDocStr.build_docstrings_package', (['"""./pyDocStr/package_to_document"""'], {'new_package_path': '"""./pyDocStr/package_documented"""', 'subpackages': '(True)', 'level_logger...
import types import json from io import StringIO from collections import OrderedDict from defusedxml import ElementTree as ET from django.core.serializers.json import DjangoJSONEncoder from django.http.response import HttpResponseBase from django.template.loader import get_template from django.utils.encoding import ...
[ "django.utils.module_loading.import_string", "io.StringIO", "json.dump", "json.loads", "pyston.utils.helpers.serialized_data_to_python", "django.utils.html.format_html", "pyston.utils.helpers.UniversalBytesIO", "django.utils.xmlutils.SimplerXMLGenerator", "collections.OrderedDict", "django.utils.e...
[((954, 967), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (965, 967), False, 'from collections import OrderedDict\n'), ((6359, 6378), 'defusedxml.ElementTree.fromstring', 'ET.fromstring', (['data'], {}), '(data)\n', (6372, 6378), True, 'from defusedxml import ElementTree as ET\n'), ((7239, 7255), 'json....
# -*- coding: utf-8 -*- """ Created on Sun Jul 15 22:20:52 2018 @author: Srinivas """ import numpy as np X = np.arange(1, 1000) Y = X[(X % 3 == 0) | (X % 5 == 0)] Z = sum(Y) print(Z)
[ "numpy.arange" ]
[((121, 139), 'numpy.arange', 'np.arange', (['(1)', '(1000)'], {}), '(1, 1000)\n', (130, 139), True, 'import numpy as np\n')]
from plenum.server.replica import Replica from plenum.test import waits from plenum.test.delayers import cDelay, chk_delay from plenum.test.helper import sdk_send_random_requests, assertExp, incoming_3pc_msgs_count from stp_core.loop.eventually import eventually nodeCount = 4 CHK_FREQ = 5 # LOG_SIZE in checkpoints c...
[ "plenum.test.delayers.chk_delay", "plenum.test.helper.assertExp", "plenum.test.waits.expectedTransactionExecutionTime", "plenum.test.helper.sdk_send_random_requests", "plenum.test.delayers.cDelay" ]
[((1268, 1339), 'plenum.test.helper.sdk_send_random_requests', 'sdk_send_random_requests', (['looper', 'sdk_pool_handle', 'sdk_wallet_client', '(1)'], {}), '(looper, sdk_pool_handle, sdk_wallet_client, 1)\n', (1292, 1339), False, 'from plenum.test.helper import sdk_send_random_requests, assertExp, incoming_3pc_msgs_cou...
from mpi4py import MPI import numpy as np import mpids.MPInumpy as mpi_np if __name__ == "__main__": #Capture default communicator, MPI process rank, and number of MPI processes comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() note = "Note: creation routines are using their de...
[ "mpids.MPInumpy.arange" ]
[((640, 663), 'mpids.MPInumpy.arange', 'mpi_np.arange', (['(size * 5)'], {}), '(size * 5)\n', (653, 663), True, 'import mpids.MPInumpy as mpi_np\n')]
from discord.ext import commands from peony import PeonyClient from datetime import datetime import discord import asyncio import json from lxml import html import html as htmlc import traceback class Twitter: """ Twitter stream commands """ def __init__(self, bot): self.bot = bot self.tweetso...
[ "json.dump", "json.load", "html.unescape", "discord.Embed", "datetime.datetime.strptime", "discord.ext.commands.group", "peony.PeonyClient", "discord.ext.commands.is_owner" ]
[((4798, 4900), 'discord.ext.commands.group', 'commands.group', ([], {'aliases': "['tweet', 'tweets', 'checkdelay', 'twstatus']", 'invoke_without_command': '(True)'}), "(aliases=['tweet', 'tweets', 'checkdelay', 'twstatus'],\n invoke_without_command=True)\n", (4812, 4900), False, 'from discord.ext import commands\n'...
""" Unit test for table_suppression module Original Issues: DC-1360 As part of the controlled tier, some table data will be entirely suppressed. When suppression happens, the table needs to maintain it’s expected schema, but drop all of its data. Apply table suppression to note, location, provider, and care_site ta...
[ "cdr_cleaner.cleaning_rules.table_suppression.TableSuppression", "cdr_cleaner.cleaning_rules.table_suppression.TABLE_SUPPRESSION_QUERY.render" ]
[((1378, 1445), 'cdr_cleaner.cleaning_rules.table_suppression.TableSuppression', 'TableSuppression', (['self.project_id', 'self.dataset_id', 'self.sandbox_id'], {}), '(self.project_id, self.dataset_id, self.sandbox_id)\n', (1394, 1445), False, 'from cdr_cleaner.cleaning_rules.table_suppression import TableSuppression, ...
# -*- coding: utf-8 -*- """ Created on Tue Apr 26 22:00:03 2016 @author: Sirindil """ import os import sys import time import shlex import random import string import struct import time import platform import subprocess import ctypes from ctypes import windll, byref, wintypes, Structure, c_ulong from ctypes.wintypes i...
[ "sys.stdout.write", "win32api.SetCursorPos", "winsound.PlaySound", "ctypes.create_string_buffer", "sys.stdout.flush", "ctypes.windll.kernel32.GetConsoleScreenBufferInfo", "win32api.mouse_event", "random.gauss", "ctypes.WinDLL", "random.randint", "ctypes.byref", "ctypes.sizeof", "shlex.split"...
[((666, 710), 'ctypes.WinDLL', 'ctypes.WinDLL', (['"""user32"""'], {'use_last_error': '(True)'}), "('user32', use_last_error=True)\n", (679, 710), False, 'import ctypes\n'), ((3082, 3103), 'ctypes.POINTER', 'ctypes.POINTER', (['INPUT'], {}), '(INPUT)\n', (3096, 3103), False, 'import ctypes\n'), ((928, 957), 'win32api.S...
"""Application class definition""" import asyncio import logging import signal from collections import namedtuple import uvloop from .factories import create_message_sink, create_message_source, \ create_router from .exceptions import MessageSinkError LOGGER = logging.getLogger(__name__) #: Represents a messag...
[ "asyncio.get_event_loop", "collections.namedtuple", "uvloop.EventLoopPolicy", "asyncio.wait", "logging.getLogger" ]
[((269, 296), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (286, 296), False, 'import logging\n'), ((378, 437), 'collections.namedtuple', 'namedtuple', (['"""SourceMessagePair"""', "['source_name', 'message']"], {}), "('SourceMessagePair', ['source_name', 'message'])\n", (388, 437), Fal...
if __package__: from pluGET.utils.consoleoutput import consoleTitle, clearConsole, printMainMenu from pluGET.utils.utilities import check_requirements from pluGET.handlers.handle_input import createInputLists, getInput from pluGET.handlers.handle_config import checkConfig else: from utils.consoleout...
[ "utils.utilities.check_requirements", "handlers.handle_input.createInputLists", "utils.consoleoutput.printMainMenu", "utils.consoleoutput.clearConsole", "utils.consoleoutput.consoleTitle", "handlers.handle_input.getInput", "handlers.handle_config.checkConfig" ]
[((566, 580), 'utils.consoleoutput.consoleTitle', 'consoleTitle', ([], {}), '()\n', (578, 580), False, 'from utils.consoleoutput import consoleTitle, clearConsole, printMainMenu\n'), ((585, 599), 'utils.consoleoutput.clearConsole', 'clearConsole', ([], {}), '()\n', (597, 599), False, 'from utils.consoleoutput import co...
from pygame import * from .game_object import * from .player import * from .spawner import * from .decoration import * from .label import * from .shared import * from .enemy import * from .tiled import * from .collision_manager ...
[ "threading.Thread", "time.sleep" ]
[((3029, 3042), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (3039, 3042), False, 'import time\n'), ((3002, 3020), 'threading.Thread', 'Thread', ([], {'target': 'App'}), '(target=App)\n', (3008, 3020), False, 'from threading import Thread\n')]
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants.base.payload import Payload from pants.base.payload_field import PrimitiveFiel...
[ "pants.base.payload_field.PrimitiveField", "pants.base.payload.Payload" ]
[((1333, 1342), 'pants.base.payload.Payload', 'Payload', ([], {}), '()\n', (1340, 1342), False, 'from pants.base.payload import Payload\n'), ((1402, 1442), 'pants.base.payload_field.PrimitiveField', 'PrimitiveField', (['dependencies_archive_url'], {}), '(dependencies_archive_url)\n', (1416, 1442), False, 'from pants.ba...
"""Wrapper for Torch Dataset class to enable contrastive training """ import torch from torch import Tensor from torch.utils.data import Dataset from torchaudio_augmentations import Compose from typing import Tuple, List class ContrastiveDataset(Dataset): def __init__(self, dataset: Dataset, input_shape: List[int...
[ "torch.split", "torch.cat" ]
[((1049, 1088), 'torch.split', 'torch.split', (['audio', 'audio_length'], {'dim': '(1)'}), '(audio, audio_length, dim=1)\n', (1060, 1088), False, 'import torch\n'), ((1105, 1126), 'torch.cat', 'torch.cat', (['batch[:-1]'], {}), '(batch[:-1])\n', (1114, 1126), False, 'import torch\n'), ((2194, 2231), 'torch.split', 'tor...
from __future__ import print_function import sys sys.path.insert(1,"../../../") from tests import pyunit_utils import h2o def h2olog_and_echo(): """ Python API test: h2o.log_and_echo(message=u'') """ try: h2o.log_and_echo("Testing h2o.log_and_echo") except Exception as e: assert Fal...
[ "h2o.log_and_echo", "tests.pyunit_utils.standalone_test", "sys.path.insert" ]
[((49, 80), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../../../"""'], {}), "(1, '../../../')\n", (64, 80), False, 'import sys\n'), ((402, 447), 'tests.pyunit_utils.standalone_test', 'pyunit_utils.standalone_test', (['h2olog_and_echo'], {}), '(h2olog_and_echo)\n', (430, 447), False, 'from tests import pyunit_ut...
# -*- coding:utf-8 -*- # ------------------------ # written by <NAME> # 2018-10 # ------------------------ import math import torch def get_IoU(ground_truth, region): # xmin, ymin, xmax, ymax x1 = max(ground_truth[0], region[0]) y1 = max(ground_truth[1], region[1]) x2 = min(ground_truth[2], region[0]...
[ "torch.FloatTensor" ]
[((1507, 1542), 'torch.FloatTensor', 'torch.FloatTensor', (['[tx, ty, tw, th]'], {}), '([tx, ty, tw, th])\n', (1524, 1542), False, 'import torch\n'), ((1555, 1590), 'torch.FloatTensor', 'torch.FloatTensor', (['[dx, dy, dw, dh]'], {}), '([dx, dy, dw, dh])\n', (1572, 1590), False, 'import torch\n')]
#/usr/bin/python2 """ udev service for USB transfer USB data to zeromq pull server via tcp required pull socket: tcp://localhost:6372 Author: <NAME>. <<EMAIL>> Python version: 2.7 """ import argparse import os import signal import struct import sys import time import usb1 as _usb1 import zmq as _zmq import hardware f...
[ "argparse.ArgumentParser", "usb1.USBContext", "logger.getLogger", "time.sleep", "hardware.getIdFromProductName", "os._exit", "sys.exit", "signal.signal", "zmq.Context" ]
[((358, 383), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (381, 383), False, 'import argparse\n'), ((472, 491), 'logger.getLogger', 'getLogger', (['"""usb2mq"""'], {}), "('usb2mq')\n", (481, 491), False, 'from logger import getLogger\n'), ((770, 784), 'zmq.Context', '_zmq.Context', ([], {}),...
from typing import List, Dict, Any from torch_tensorrt import _enums import torch_tensorrt.ts from torch_tensorrt import logging import torch from enum import Enum class _IRType(Enum): """Enum to set the minimum required logging level to print a message to stdout """ ts = 0 fx = 1 def _module_ir(modul...
[ "torch_tensorrt.logging.log", "torch.jit.script" ]
[((2054, 2242), 'torch_tensorrt.logging.log', 'logging.log', (['"""Module was provided as a torch.nn.Module, trying to script the module with torch.jit.script. In the event of a failure please preconvert your module to TorchScript"""'], {}), "(\n 'Module was provided as a torch.nn.Module, trying to script the module...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: <NAME> email: <EMAIL> GitHub: phuycke """ #%% import matplotlib.pyplot as plt import mne import numpy as np import os import pandas as pd import seaborn as sns from scipy import ndimage from matplotlib import ticker...
[ "numpy.sum", "seaborn.regplot", "matplotlib.pyplot.figure", "numpy.mean", "numpy.arange", "os.path.join", "numpy.nanmean", "matplotlib.ticker.ScalarFormatter", "numpy.meshgrid", "numpy.zeros_like", "matplotlib.pyplot.close", "numpy.max", "numpy.log10", "seaborn.set_context", "seaborn.set...
[((607, 634), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 9)'}), '(figsize=(10, 9))\n', (617, 634), True, 'import matplotlib.pyplot as plt\n'), ((642, 666), 'matplotlib.gridspec.GridSpec', 'gridspec.GridSpec', (['(2)', '(13)'], {}), '(2, 13)\n', (659, 666), False, 'from matplotlib import ticker, rc...
import sys from setuptools import setup, find_packages # pylint: disable=no-name-in-module,import-error def dependencies(file): with open(file) as f: return f.read().splitlines() setup( name='log_symbols', packages=find_packages(exclude=('tests', 'examples')), version='0.0.14', license=...
[ "setuptools.find_packages" ]
[((240, 284), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "('tests', 'examples')"}), "(exclude=('tests', 'examples'))\n", (253, 284), False, 'from setuptools import setup, find_packages\n')]
""" 日期修改 """ import os import cv2 import numpy as np import matplotlib.pyplot as plt np.set_printoptions(threshold=np.inf) root_dir = '/media/xiayule/bdcp/other' def modify_date(): img_path = os.path.join(root_dir, '3.jpg') img = cv2.imread(img_path) # _, img1 = cv2.threshold(img, 150, 200, cv2.THRESH_BI...
[ "numpy.set_printoptions", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "cv2.cvtColor", "cv2.waitKey", "cv2.destroyAllWindows", "numpy.zeros", "numpy.ones", "cv2.imread", "cv2.inRange", "numpy.array", "numpy.exp", "numpy.linspace", "cv2.imshow", "os.path.join", "cv2.namedWindow" ...
[((85, 122), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': 'np.inf'}), '(threshold=np.inf)\n', (104, 122), True, 'import numpy as np\n'), ((199, 230), 'os.path.join', 'os.path.join', (['root_dir', '"""3.jpg"""'], {}), "(root_dir, '3.jpg')\n", (211, 230), False, 'import os\n'), ((241, 261), 'cv2.im...
"""User fixtures""" # pylint: disable=unused-argument, redefined-outer-name from io import BytesIO import pytest from PIL import Image from rest_framework.test import APIClient from rest_framework_jwt.settings import api_settings from open_discussions.factories import UserFactory from sites.factories import Authentic...
[ "io.BytesIO", "open_discussions.factories.UserFactory.create", "PIL.Image.new", "sites.factories.AuthenticatedSiteFactory.create", "pytest.fixture", "rest_framework.test.APIClient" ]
[((791, 807), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (805, 807), False, 'import pytest\n'), ((1095, 1111), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1109, 1111), False, 'import pytest\n'), ((1246, 1262), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1260, 1262), False, 'import pytes...
#!/usr/bin/env python import rospy from ros.rosPathFinderServer import RosPathFinderServer if __name__ == '__main__': server = RosPathFinderServer() rospy.spin()
[ "rospy.spin", "ros.rosPathFinderServer.RosPathFinderServer" ]
[((133, 154), 'ros.rosPathFinderServer.RosPathFinderServer', 'RosPathFinderServer', ([], {}), '()\n', (152, 154), False, 'from ros.rosPathFinderServer import RosPathFinderServer\n'), ((159, 171), 'rospy.spin', 'rospy.spin', ([], {}), '()\n', (169, 171), False, 'import rospy\n')]
""" This files mimics keras.dataset download's function. For parallel and distributed training, we need to account for multiple processes (one per GPU) per agent. For more information on data in Determined, read our data-access tutorial. """ import gzip import tempfile import numpy as np from tensorflow.python.ker...
[ "tensorflow.python.keras.utils.data_utils.get_file", "tempfile.mkdtemp", "gzip.open" ]
[((740, 758), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (756, 758), False, 'import tempfile\n'), ((1735, 1753), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (1751, 1753), False, 'import tempfile\n'), ((1071, 1096), 'gzip.open', 'gzip.open', (['paths[0]', '"""rb"""'], {}), "(paths[0], 'rb')\...
""" :mod:`zsl.tasks.asl.sum_task` ----------------------------- Created on 22.12.2012 ..moduleauthor:: <NAME> """ from __future__ import unicode_literals from builtins import object from injector import inject from zsl import Zsl from zsl.task.task_data import TaskData from zsl.task.task_decorator import json_inpu...
[ "injector.inject" ]
[((365, 380), 'injector.inject', 'inject', ([], {'app': 'Zsl'}), '(app=Zsl)\n', (371, 380), False, 'from injector import inject\n')]
#- # ========================================================================== # Copyright (C) 1995 - 2006 Autodesk, Inc. and/or its licensors. All # rights reserved. # # The coded instructions, statements, computer programs, and/or related # material (collectively the "Data") in these files contain unpublished # inf...
[ "maya.OpenMaya.MGlobal.getActiveSelectionList", "maya.OpenMaya.MObject", "maya.OpenMaya.MScriptUtil", "maya.OpenMaya.MItSelectionList", "maya.OpenMaya.MPlug", "maya.OpenMayaMPx.MFnPlugin", "maya.OpenMaya.MIntArray", "polyModifier.polyModifierNode.__init__", "polyModifier.polyModifierCmd.__init__", ...
[((2204, 2228), 'maya.OpenMaya.MTypeId', 'OpenMaya.MTypeId', (['(552979)'], {}), '(552979)\n', (2220, 2228), True, 'import maya.OpenMaya as OpenMaya\n'), ((1989, 2014), 'sys.stderr.write', 'sys.stderr.write', (['fullMsg'], {}), '(fullMsg)\n', (2005, 2014), False, 'import sys\n'), ((2016, 2054), 'maya.OpenMaya.MGlobal.d...
from cosymlib.shape import maps import numpy as np import sys def plot_minimum_distortion_path_shape(shape_label1, shape_label2, num_points=20, output=sys.stdout, show_plot=True): import matplotlib.pyplot as plt path = get_shape_path(shape_label1, shape_label2, num_points) shape_map_txt = " {:6} {:6}\n"...
[ "cosymlib.shape.maps.get_shape_map", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "numpy.argmax", "matplotlib.pyplot.axes", "matplotlib.pyplot.scatter", "matplotlib.pyplot.text", "numpy.array", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((764, 822), 'cosymlib.shape.maps.get_shape_map', 'maps.get_shape_map', (['shape_label1', 'shape_label2', 'num_points'], {}), '(shape_label1, shape_label2, num_points)\n', (782, 822), False, 'from cosymlib.shape import maps\n'), ((1337, 1347), 'matplotlib.pyplot.axes', 'plt.axes', ([], {}), '()\n', (1345, 1347), True,...
import asyncio from pycallgraph2 import PyCallGraph from pycallgraph2.output import GraphvizOutput async def gen_1(): for value in range(0, 10): await asyncio.sleep(1) # Could be a slow HTTP request yield value async def gen_2(it): async for value in it: await asyncio.sleep(1) # Cou...
[ "pycallgraph2.output.GraphvizOutput", "pycallgraph2.PyCallGraph", "asyncio.sleep" ]
[((666, 682), 'pycallgraph2.output.GraphvizOutput', 'GraphvizOutput', ([], {}), '()\n', (680, 682), False, 'from pycallgraph2.output import GraphvizOutput\n'), ((729, 757), 'pycallgraph2.PyCallGraph', 'PyCallGraph', ([], {'output': 'graphviz'}), '(output=graphviz)\n', (740, 757), False, 'from pycallgraph2 import PyCall...
from core.enum.menu_type import MenuType from ui.shell.menu_factory import MenuFactory class CarRental: def __init__(self): self.done = False self.ui = MenuFactory.get(MenuType.MAIN) self.prev_ui = self.ui def change_ui(self, menu_type: MenuType): self.prev_ui = self.ui ...
[ "ui.shell.menu_factory.MenuFactory.get" ]
[((174, 204), 'ui.shell.menu_factory.MenuFactory.get', 'MenuFactory.get', (['MenuType.MAIN'], {}), '(MenuType.MAIN)\n', (189, 204), False, 'from ui.shell.menu_factory import MenuFactory\n'), ((332, 358), 'ui.shell.menu_factory.MenuFactory.get', 'MenuFactory.get', (['menu_type'], {}), '(menu_type)\n', (347, 358), False,...
#!/usr/bin/python2.7 # -*- coding:utf-8 -*- # Author: NetworkRanger # Date: 2018/11/2 下午9:23 # 1.2 TensorFlow 如何工作 import tensorflow as tf # 1. 导入/生成样本数据集。 # 2. 转换和归一化数据。 # data = tf.nn.batch_norm_with_global_normalization(...) # 3. 划分样本数据集为训练样本集、测试样本集和验证样本集。 # 4. 设置机器学习参数(超参数)。 learning_rate = 0.01 batch_size =...
[ "tensorflow.constant" ]
[((368, 383), 'tensorflow.constant', 'tf.constant', (['(42)'], {}), '(42)\n', (379, 383), True, 'import tensorflow as tf\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 13 17:38:37 2018 @author: simao """ import numpy as np from scipy import stats def onehotencoder(tind, *args): if len(args) == 0: maxclasses = max(tind)+1 elif len(args) == 1: maxclasses = args[0] else: raise Not...
[ "numpy.random.uniform", "scipy.stats.mode", "numpy.argmax", "numpy.zeros", "numpy.arange" ]
[((346, 383), 'numpy.zeros', 'np.zeros', (['(tind.shape[0], maxclasses)'], {}), '((tind.shape[0], maxclasses))\n', (354, 383), True, 'import numpy as np\n'), ((555, 592), 'numpy.zeros', 'np.zeros', (['(tind.shape[0], maxclasses)'], {}), '((tind.shape[0], maxclasses))\n', (563, 592), True, 'import numpy as np\n'), ((763...
from django.test import TestCase from django.contrib.auth import get_user_model from model_mommy import mommy from rolepermissions.roles import AbstractUserRole from rolepermissions.checkers import has_role, has_permission, has_object_permission from rolepermissions.permissions import register_object_checker class...
[ "rolepermissions.checkers.has_role", "django.contrib.auth.get_user_model", "rolepermissions.permissions.register_object_checker", "rolepermissions.checkers.has_permission", "rolepermissions.checkers.has_object_permission" ]
[((2825, 2850), 'rolepermissions.permissions.register_object_checker', 'register_object_checker', ([], {}), '()\n', (2848, 2850), False, 'from rolepermissions.permissions import register_object_checker\n'), ((820, 836), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (834, 836), False, 'from d...
import re fh = open('data.txt') def sumNums(line): """ Sum a numbers found in a line """ s = 0 nums = re.findall('[0-9]+', line) for num in nums: s += int(num) return s s = 0 for line in fh: s += sumNums(line.rstrip()) print ("Sum of numbers in file:\t %d" % s)
[ "re.findall" ]
[((125, 151), 're.findall', 're.findall', (['"""[0-9]+"""', 'line'], {}), "('[0-9]+', line)\n", (135, 151), False, 'import re\n')]
import numpy as np import matplotlib.pyplot as plt from matplotlib import rc from scipy.optimize import curve_fit import matplotlib.colors as mcolors #Write with LaTeX rc('text', usetex=True) rc('font', family='serif') def func(x, a, b): return (a * x) + b # Data B1 = np.array([9.38, 12.46, 15.57]) dB1 = np.arra...
[ "matplotlib.rc", "matplotlib.pyplot.show", "scipy.optimize.curve_fit", "numpy.array", "numpy.linspace", "numpy.diag", "matplotlib.pyplot.subplots" ]
[((169, 192), 'matplotlib.rc', 'rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (171, 192), False, 'from matplotlib import rc\n'), ((193, 219), 'matplotlib.rc', 'rc', (['"""font"""'], {'family': '"""serif"""'}), "('font', family='serif')\n", (195, 219), False, 'from matplotlib import rc\n'), ((2...
import os import numpy as np import logging from ..base import float_, int_ from .util import dataset_home, download, checksum, archive_extract, checkpoint log = logging.getLogger(__name__) _URL = 'http://ai.stanford.edu/~acoates/stl10/stl10_binary.tar.gz' _SHA1 = 'b22ebbd7f3c4384ebc9ba3152939186d3750b902' class ...
[ "numpy.load", "numpy.fromfile", "numpy.array", "numpy.reshape", "numpy.savez", "os.path.join", "logging.getLogger" ]
[((165, 192), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (182, 192), False, 'import logging\n'), ((796, 833), 'os.path.join', 'os.path.join', (['dataset_home', 'self.name'], {}), '(dataset_home, self.name)\n', (808, 833), False, 'import os\n'), ((859, 899), 'os.path.join', 'os.path.jo...
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.immunization_evaluation_dose_status_codes import ( ImmunizationEvaluationDoseStatusCodes as ImmunizationEvaluationDoseStatusCodes_, ) __all__ = ["ImmunizationEv...
[ "pathlib.Path" ]
[((380, 394), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (384, 394), False, 'from pathlib import Path\n')]
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 21:46:14 2021 @author: Raj """ import sidpy as sid from sidpy.sid import Reader from sidpy.sid import Dimension import os import numpy as np import h5py from pyNSID.io.hdf_io import write_nsid_dataset from pyNSID.io.hdf_io import create_indexed_group, write_simple_a...
[ "h5py.File", "pyNSID.io.hdf_io.write_simple_attrs", "os.path.basename", "pyNSID.io.hdf_io.write_nsid_dataset", "os.path.realpath", "os.path.dirname", "numpy.zeros", "pyNSID.io.hdf_io.create_indexed_group", "os.path.exists", "numpy.split", "sidpy.Dataset.from_array", "numpy.arange", "numpy.ar...
[((1882, 1909), 'os.path.realpath', 'os.path.realpath', (['self.path'], {}), '(self.path)\n', (1898, 1909), False, 'import os\n'), ((1930, 1956), 'os.path.dirname', 'os.path.dirname', (['full_path'], {}), '(full_path)\n', (1945, 1956), False, 'import os\n'), ((1996, 2023), 'os.path.basename', 'os.path.basename', (['sel...
from django.urls import resolve, set_urlconf from routes.falcon import falcon_router from routes.sanic import sanic_router from routes.werkzeug import werkzeug_router from routes.yrouter import y_router def bench(): y_router.match("/") y_router.match("/articles/2020/") y_router.match("/articles/2015/") ...
[ "routes.sanic.sanic_router.get", "routes.falcon.falcon_router.find", "routes.yrouter.y_router.match", "django.urls.set_urlconf", "django.urls.resolve", "routes.werkzeug.werkzeug_router.match" ]
[((223, 242), 'routes.yrouter.y_router.match', 'y_router.match', (['"""/"""'], {}), "('/')\n", (237, 242), False, 'from routes.yrouter import y_router\n'), ((247, 280), 'routes.yrouter.y_router.match', 'y_router.match', (['"""/articles/2020/"""'], {}), "('/articles/2020/')\n", (261, 280), False, 'from routes.yrouter im...
#! /usr/bin/env python # Script to export users from an existing system import os, os.path import sys import tarfile # Must be run as root. if not os.geteuid() == 0: sys.exit('This script must be run as root (or sudo)!') def info_message(txtmessage): print(txtmessage, end='') def ok_message(): print("...
[ "os.remove", "os.path.basename", "os.path.exists", "tarfile.open", "os.geteuid", "sys.exit" ]
[((2811, 2843), 'os.path.exists', 'os.path.exists', (['"""passwd_mig.txt"""'], {}), "('passwd_mig.txt')\n", (2825, 2843), False, 'import os, os.path\n'), ((2880, 2911), 'os.path.exists', 'os.path.exists', (['"""group_mig.txt"""'], {}), "('group_mig.txt')\n", (2894, 2911), False, 'import os, os.path\n'), ((2947, 2979), ...
# Some pygame helper functions for simple image display # and sound effect playback # <NAME> July 2017 # Version 1.0 import pygame surface = None def setup(width=800, height=600, title=''): ''' Sets up the pygame environment ''' global window_size global back_color global text_color glob...
[ "pygame.transform.smoothscale", "pygame.event.get", "pygame.display.set_mode", "pygame.mixer.init", "pygame.mixer.pre_init", "pygame.init", "pygame.display.flip", "pygame.font.Font", "pygame.image.load", "pygame.display.set_caption", "pygame.mixer.Sound" ]
[((627, 665), 'pygame.mixer.pre_init', 'pygame.mixer.pre_init', ([], {'frequency': '(44100)'}), '(frequency=44100)\n', (648, 665), False, 'import pygame\n'), ((670, 683), 'pygame.init', 'pygame.init', ([], {}), '()\n', (681, 683), False, 'import pygame\n'), ((728, 747), 'pygame.mixer.init', 'pygame.mixer.init', ([], {}...
# -*- coding: utf-8 -*- from codecs import open from os import path from setuptools import setup, find_packages import openkongqi as okq # local path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst')) as fd: long_description = fd....
[ "os.path.dirname", "os.path.join", "setuptools.find_packages" ]
[((173, 195), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (185, 195), False, 'from os import path\n'), ((256, 285), 'os.path.join', 'path.join', (['here', '"""README.rst"""'], {}), "(here, 'README.rst')\n", (265, 285), False, 'from os import path\n'), ((693, 733), 'setuptools.find_packages', ...
import sys,math import numpy as np import scipy.sparse.linalg as slin from scipy.sparse import coo_matrix, csr_matrix, csc_matrix from svddenseblock import * from mytools.ioutil import myreadfile from os.path import expanduser home = expanduser("~") def loadtensor2matricization(tensorfile, sumout=[], mtype=coo_matrix...
[ "numpy.array", "mytools.ioutil.myreadfile", "os.path.expanduser" ]
[((234, 249), 'os.path.expanduser', 'expanduser', (['"""~"""'], {}), "('~')\n", (244, 249), False, 'from os.path import expanduser\n'), ((499, 527), 'mytools.ioutil.myreadfile', 'myreadfile', (['tensorfile', '"""rb"""'], {}), "(tensorfile, 'rb')\n", (509, 527), False, 'from mytools.ioutil import myreadfile\n'), ((621, ...
# ---------------------------------------------------------------------------------- # # Calculating Word Frequencies # ---------------------------------------------------------------------------------- import pandas as pd import numpy as np import matplotlib.pyplot as plt from text.dataHandling import DataHand...
[ "text.vocabCounter.vocabCounter", "text.dataHandling.DataHandling" ]
[((547, 561), 'text.dataHandling.DataHandling', 'DataHandling', ([], {}), '()\n', (559, 561), False, 'from text.dataHandling import DataHandling\n'), ((967, 1027), 'text.vocabCounter.vocabCounter', 'vocabCounter', ([], {'rawData': 'data', 'start': 'start', 'end': 'end', 'step': '(86400)'}), '(rawData=data, start=start,...
# -*- coding: UTF-8 -*-# from __future__ import unicode_literals, print_function import datetime import pytz from django.utils.translation import ugettext_lazy as _, ugettext from rest_framework import serializers from rest_framework.exceptions import APIException from django.conf import settings from validate_email ...
[ "scheduler.models.ScheduledAction", "validate_email.validate_email", "dataops.pandas_db.execute_select_on_table", "rest_framework.serializers.CharField", "pytz.timezone", "django.utils.translation.ugettext", "django.utils.translation.ugettext_lazy" ]
[((637, 701), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'source': '"""item_column_name"""', 'required': '(False)'}), "(source='item_column_name', required=False)\n", (658, 701), False, 'from rest_framework import serializers\n'), ((1723, 1740), 'scheduler.models.ScheduledAction', 'Scheduled...
from fanstatic import Library, Resource import js.angular import js.fullcalendar library = Library('angular-ui-calendar', 'resources') angular_ui_calendar = Resource( library, 'calendar.js', depends=[js.angular.angular, js.fullcalendar.fullcalendar])
[ "fanstatic.Library", "fanstatic.Resource" ]
[((92, 135), 'fanstatic.Library', 'Library', (['"""angular-ui-calendar"""', '"""resources"""'], {}), "('angular-ui-calendar', 'resources')\n", (99, 135), False, 'from fanstatic import Library, Resource\n'), ((159, 256), 'fanstatic.Resource', 'Resource', (['library', '"""calendar.js"""'], {'depends': '[js.angular.angula...
import sys import os import numpy as np from sklearn import metrics from .model import SmileGAN from .utils import highest_matching_clustering, consensus_clustering, parse_validation_data from .clustering import Smile_GAN_train __author__ = "<NAME>" __copyright__ = "Copyright 2019-2020 The CBICA & SBIA Lab" __credits_...
[ "numpy.median", "numpy.std", "numpy.mean", "numpy.array", "sklearn.metrics.adjusted_rand_score", "os.path.join", "numpy.delete" ]
[((1793, 1822), 'numpy.median', 'np.median', (['model_aris'], {'axis': '(1)'}), '(model_aris, axis=1)\n', (1802, 1822), True, 'import numpy as np\n'), ((1876, 1901), 'numpy.delete', 'np.delete', (['median_aris', 'j'], {}), '(median_aris, j)\n', (1885, 1901), True, 'import numpy as np\n'), ((2263, 2282), 'numpy.mean', '...
import numpy as np import pandas as pd import io import re import warnings from scipy.stats import skew, skewtest from scipy.stats import rankdata from .plot_1var import * # from plot_1var import * # for local testing only from IPython.display import HTML def print_list(l, br=', '): o = '' for e in l: ...
[ "pandas.DataFrame", "fuzzywuzzy.fuzz.ratio", "io.StringIO", "fuzzywuzzy.fuzz.partial_ratio", "fuzzywuzzy.fuzz.token_sort_ratio", "warnings.simplefilter", "numpy.log", "numpy.datetime_as_string", "scipy.stats.rankdata", "numpy.timedelta64", "numpy.where", "pandas.Series", "fuzzywuzzy.fuzz.tok...
[((5613, 5660), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'RuntimeWarning'], {}), "('ignore', RuntimeWarning)\n", (5634, 5660), False, 'import warnings\n'), ((5883, 5896), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (5894, 5896), False, 'import io\n'), ((6257, 6289), 'pandas.DataFrame', 'p...
"""Definition of all runner classes.""" import multiprocessing import os import time import warnings from typing import List, Optional from .abstract_runner import AbstractRunner from .util import start_process class SingleRunner(AbstractRunner): """Runner in a Single Machine. The runner submits the jobs i...
[ "warnings.warn", "time.sleep", "os.system", "multiprocessing.cpu_count" ]
[((1254, 1330), 'warnings.warn', 'warnings.warn', (['f"""Too many workers requested. Limiting them to {num_workers}"""'], {}), "(f'Too many workers requested. Limiting them to {num_workers}')\n", (1267, 1330), False, 'import warnings\n'), ((1072, 1099), 'multiprocessing.cpu_count', 'multiprocessing.cpu_count', ([], {})...
"""GitLab merge requests collector.""" from typing import cast from collector_utilities.functions import match_string_or_regular_expression from collector_utilities.type import URL, Value from source_model import Entities, Entity, SourceResponses from .base import GitLabBase class GitLabMergeRequests(GitLabBase): ...
[ "collector_utilities.functions.match_string_or_regular_expression" ]
[((2443, 2502), 'collector_utilities.functions.match_string_or_regular_expression', 'match_string_or_regular_expression', (['target_branch', 'branches'], {}), '(target_branch, branches)\n', (2477, 2502), False, 'from collector_utilities.functions import match_string_or_regular_expression\n')]
import io import os import sys from tempfile import mktemp def get_ipython_capture(): try: # This will work inside IPython but not outside it. name = get_ipython().__class__.__name__ if name.startswith('ZMQ'): from IPython.utils.capture import capture_output return ...
[ "sys.platform.startswith", "os.remove", "os.dup2", "os.dup", "io.open", "tempfile.mktemp" ]
[((1591, 1610), 'os.dup', 'os.dup', (['self.fileno'], {}), '(self.fileno)\n', (1597, 1610), False, 'import os\n'), ((1635, 1643), 'tempfile.mktemp', 'mktemp', ([], {}), '()\n', (1641, 1643), False, 'from tempfile import mktemp\n'), ((1670, 1716), 'io.open', 'io.open', (['self.tmp_path', '"""w+"""'], {'encoding': '"""ut...
import logging from pathlib import Path from sys import argv import var import telethon.utils from telethon import TelegramClient from telethon import events,Button import os from var import Var from . import beast from telethon.tl import functions from beastx.Configs import Config from telethon.tl.functi...
[ "os.path.basename", "telethon.TelegramClient", "pathlib.Path", "os.path.splitext", "glob.glob", "telethon.tl.functions.channels.JoinChannelRequest", "telethon.Button.url", "logging.getLogger" ]
[((1182, 1209), 'logging.getLogger', 'logging.getLogger', (['"""beastx"""'], {}), "('beastx')\n", (1199, 1209), False, 'import logging\n'), ((3482, 3497), 'glob.glob', 'glob.glob', (['path'], {}), '(path)\n', (3491, 3497), False, 'import glob\n'), ((3774, 3789), 'glob.glob', 'glob.glob', (['path'], {}), '(path)\n', (37...
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='The Aim is to predict forest fire before it happens based on dataset that contains tree observations from four areas of the Roosevelt National Forest in Colorado. All observations are ...
[ "setuptools.find_packages" ]
[((81, 96), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (94, 96), False, 'from setuptools import find_packages, setup\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import collections from refinery.units import arg, Unit class xfcc(Unit): """ The cross frame chunk count unit! It computes the number of times a chunk occurs across several frames of input. It consumes all frames in the current and counts the number of time...
[ "collections.defaultdict", "refinery.units.arg.switch", "refinery.units.arg" ]
[((994, 1022), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (1017, 1022), False, 'import collections\n'), ((700, 757), 'refinery.units.arg', 'arg', ([], {'help': '"""The variable which is used as the accumulator"""'}), "(help='The variable which is used as the accumulator')\n", (703, ...
# -*- coding: utf-8 -*- __author__ = '<NAME>' __email__ = '<EMAIL>' __version__ = '0.1.0' from anime_search.base import AnimeSearch plugin = AnimeSearch()
[ "anime_search.base.AnimeSearch" ]
[((145, 158), 'anime_search.base.AnimeSearch', 'AnimeSearch', ([], {}), '()\n', (156, 158), False, 'from anime_search.base import AnimeSearch\n')]
# Generated by Django 2.2.7 on 2019-11-20 09:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rr', '0049_statistics'), ] operations = [ migrations.AlterModelOptions( name='statistics', options={'ordering': ['-d...
[ "django.db.models.TextField", "django.db.migrations.AlterModelOptions", "django.db.models.URLField" ]
[((222, 307), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""statistics"""', 'options': "{'ordering': ['-date']}"}), "(name='statistics', options={'ordering': ['-date']}\n )\n", (250, 307), False, 'from django.db import migrations, models\n'), ((453, 514), 'django.db.mode...
# Author: <NAME> # Datetime:2021/7/3 # Copyright belongs to the author. # Please indicate the source for reprinting. import platform import os from distutils.sysconfig import get_python_lib from qpt.kernel.qlog import Logging def init_wrapper(var=True): def i_wrapper(func): if var: @propert...
[ "os.path.abspath", "qpt.kernel.qinterpreter.PipTools", "os.environ.copy", "qpt.kernel.qlog.Logging.debug", "distutils.sysconfig.get_python_lib", "os.environ.get", "platform.system", "platform.machine", "os.path.join", "os.getenv" ]
[((4290, 4311), 'os.getenv', 'os.getenv', (['"""QPT_MODE"""'], {}), "('QPT_MODE')\n", (4299, 4311), False, 'import os\n'), ((3794, 3811), 'os.environ.copy', 'os.environ.copy', ([], {}), '()\n', (3809, 3811), False, 'import os\n'), ((1253, 1271), 'platform.machine', 'platform.machine', ([], {}), '()\n', (1269, 1271), Fa...
import os import allel import h5py import numpy as np import sys import time from fvTools import * if not len(sys.argv) in [13,15]: sys.exit("usage:\npython makeFeatureVecsForChrArmFromVcf_ogSHIC.py chrArmFileName chrArm chrLen targetPop winSize numSubWins maskFileName sampleToPopFileName ancestralArmFaFileName st...
[ "numpy.extract", "allel.read_vcf", "time.clock", "sys.stderr.write", "allel.GenotypeArray", "sys.exit" ]
[((2142, 2172), 'allel.read_vcf', 'allel.read_vcf', (['chrArmFileName'], {}), '(chrArmFileName)\n', (2156, 2172), False, 'import allel\n'), ((2223, 2279), 'numpy.extract', 'np.extract', (['(chroms == chrArm)', "chrArmFile['variants/POS']"], {}), "(chroms == chrArm, chrArmFile['variants/POS'])\n", (2233, 2279), True, 'i...
# python getting_pixels.py --image obama.jpg # import the necessary packages import argparse from collections import defaultdict import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("--image", required=True, help="path to input image") args = va...
[ "cv2.waitKey", "cv2.imread", "cv2.imshow", "argparse.ArgumentParser" ]
[((211, 236), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (234, 236), False, 'import argparse\n'), ((471, 496), 'cv2.imread', 'cv2.imread', (["args['image']"], {}), "(args['image'])\n", (481, 496), False, 'import cv2\n'), ((524, 553), 'cv2.imshow', 'cv2.imshow', (['"""Original"""', 'image'],...
# Copyright 2011 OpenStack Foundation # Copyright 2011 Nebula, 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/...
[ "keystoneclient.exceptions.ValidationError", "keystoneclient.base.getid", "keystoneclient.i18n._", "debtcollector.removals.remove" ]
[((17591, 17705), 'debtcollector.removals.remove', 'removals.remove', ([], {'message': "('Use %s.create instead.' % deprecation_msg)", 'version': '"""3.9.0"""', 'removal_version': '"""4.0.0"""'}), "(message='Use %s.create instead.' % deprecation_msg, version\n ='3.9.0', removal_version='4.0.0')\n", (17606, 17705), F...
import time import uuid from pathlib import Path from flask import Blueprint, abort, jsonify, request, url_for from src import logger from src.api.helpers import add bp = Blueprint("api", __name__) @bp.route("/ping") def ping(): return jsonify({"status": "success", "message": "pong"}) @bp.route("/add", metho...
[ "flask.jsonify", "flask.Blueprint", "src.api.helpers.add.delay", "src.logger.info" ]
[((174, 200), 'flask.Blueprint', 'Blueprint', (['"""api"""', '__name__'], {}), "('api', __name__)\n", (183, 200), False, 'from flask import Blueprint, abort, jsonify, request, url_for\n'), ((245, 294), 'flask.jsonify', 'jsonify', (["{'status': 'success', 'message': 'pong'}"], {}), "({'status': 'success', 'message': 'po...
import io import json from copy import deepcopy import GetAwayUsers import demistomock as demisto def util_load_json(path): with io.open(path, mode='r', encoding='utf-8') as f: return json.loads(f.read()) away_user_data = util_load_json('test_data/away_user.json') def test_script_valid(mocker): ...
[ "copy.deepcopy", "GetAwayUsers.main", "io.open" ]
[((611, 635), 'copy.deepcopy', 'deepcopy', (['away_user_data'], {}), '(away_user_data)\n', (619, 635), False, 'from copy import deepcopy\n'), ((797, 803), 'GetAwayUsers.main', 'main', ([], {}), '()\n', (801, 803), False, 'from GetAwayUsers import main\n'), ((1653, 1677), 'copy.deepcopy', 'deepcopy', (['away_user_data']...
import os from datetime import datetime import jinja2 from flask import Flask, redirect, render_template from raven.contrib.flask import Sentry from werkzeug.middleware.proxy_fix import ProxyFix from config import load_django from api import (admin_api, copy_study_api, dashboard_api, data_access_api, data_pipeline_a...
[ "raven.contrib.flask.Sentry", "flask.redirect", "flask.Flask", "jinja2.FileSystemLoader", "libs.admin_authentication.is_logged_in", "werkzeug.middleware.proxy_fix.ProxyFix", "libs.security.set_secret_key", "jinja2.ChoiceLoader", "datetime.datetime.now", "os.getenv" ]
[((699, 751), 'flask.Flask', 'Flask', (['__name__'], {'static_folder': "(directory + '/static')"}), "(__name__, static_folder=directory + '/static')\n", (704, 751), False, 'from flask import Flask, redirect, render_template\n'), ((756, 775), 'libs.security.set_secret_key', 'set_secret_key', (['app'], {}), '(app)\n', (7...
#!/usr/bin/env python from misc.common import parse_play_args from misc.config import load_config from rl_server.server.agent import run_agent from rl_server.server.run_agents import get_algo_and_agent_config args = parse_play_args() config = load_config(args.config) algo_config, agent_config = get_algo_and_agent_co...
[ "misc.common.parse_play_args", "misc.config.load_config", "rl_server.server.agent.run_agent", "rl_server.server.run_agents.get_algo_and_agent_config" ]
[((218, 235), 'misc.common.parse_play_args', 'parse_play_args', ([], {}), '()\n', (233, 235), False, 'from misc.common import parse_play_args\n'), ((245, 269), 'misc.config.load_config', 'load_config', (['args.config'], {}), '(args.config)\n', (256, 269), False, 'from misc.config import load_config\n'), ((299, 377), 'r...
import os import unittest from eco_parser import EcoParser, ParseError SCHEDULE_WITH_TABLE = ( "http://www.legislation.gov.uk/uksi/2017/1067/schedule/1/made/data.xml" ) SCHEDULE_WITHOUT_TABLE = ( "http://www.legislation.gov.uk/uksi/2017/477/schedule/1/made/data.xml" ) ARTICLE_WITHOUT_TABLE = ( "http://www...
[ "os.path.abspath", "os.path.join" ]
[((1477, 1502), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (1492, 1502), False, 'import os\n'), ((1540, 1581), 'os.path.join', 'os.path.join', (['dirname', 'fixtures[self.url]'], {}), '(dirname, fixtures[self.url])\n', (1552, 1581), False, 'import os\n')]
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ "nsx_common.nsx_search", "cloudify.exceptions.NonRecoverableError", "nsx_common.nsx_struct_get_list", "nsx_common.nsx_read", "nsx_common.check_raw_result" ]
[((737, 828), 'nsx_common.nsx_search', 'common.nsx_search', (['client_session', '"""body/securityTags/securityTag"""', 'name', '"""securityTag"""'], {}), "(client_session, 'body/securityTags/securityTag', name,\n 'securityTag')\n", (754, 828), True, 'import nsx_common as common\n'), ((1191, 1226), 'nsx_common.check_...
import os from datasets.types.data_split import DataSplit from datasets.SOT.constructor.base_interface import SingleObjectTrackingDatasetConstructor import numpy as np def construct_TrackingNet(constructor: SingleObjectTrackingDatasetConstructor, seed): root_path = seed.root_path data_type = seed.data_split ...
[ "os.path.dirname", "numpy.loadtxt", "os.path.join", "os.listdir" ]
[((1623, 1654), 'os.path.join', 'os.path.join', (['root_path', 'subset'], {}), '(root_path, subset)\n', (1635, 1654), False, 'import os\n'), ((1677, 1712), 'os.path.join', 'os.path.join', (['subset_path', '"""frames"""'], {}), "(subset_path, 'frames')\n", (1689, 1712), False, 'import os\n'), ((1733, 1766), 'os.path.joi...
import logging import os import sys import click from functools import partial from .config import load_config from .models import Snapshot, Table, Base from .operations import ( copy_database, create_database, database_exists, remove_database, rename_database, terminate_database_connections, ...
[ "functools.partial", "os.getpid", "logging.basicConfig", "psutil.pid_exists", "click.echo", "os.fork", "sqlalchemy.create_engine", "sys.exit", "sqlalchemy.orm.sessionmaker", "logging.getLogger" ]
[((528, 555), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (545, 555), False, 'import logging\n'), ((678, 733), 'functools.partial', 'partial', (['terminate_database_connections', 'raw_connection'], {}), '(terminate_database_connections, raw_connection)\n', (685, 733), False, 'from func...
# 利用gevent进行爬虫,python3.8没有匹配的gevent,需要等待 from urllib import request # 使用gevent爬虫,自动,gevent需要安装 import gevent, time from gevent import monkey from http.cookiejar import CookieJar from bs4 import BeautifulSoup monkey.patch_all() # 把当前程序的所有的io操作给我单独的做上标记,必须要加,因为gevent不能urllib中的io操作 def f(url): resp = request.urlop...
[ "urllib.request.Request", "http.cookiejar.CookieJar", "urllib.request.HTTPCookieProcessor", "urllib.request.urlopen", "gevent.monkey.patch_all", "time.time", "urllib.request.urlretrieve", "bs4.BeautifulSoup", "gevent.spawn", "urllib.request.install_opener" ]
[((209, 227), 'gevent.monkey.patch_all', 'monkey.patch_all', ([], {}), '()\n', (225, 227), False, 'from gevent import monkey\n'), ((534, 545), 'time.time', 'time.time', ([], {}), '()\n', (543, 545), False, 'import gevent, time\n'), ((647, 658), 'time.time', 'time.time', ([], {}), '()\n', (656, 658), False, 'import geve...
import pytest from ..width import nonparam_width, gauss_model, radial_profile from .testing_utils import generate_filament_model import numpy as np import numpy.testing as npt from scipy import ndimage as nd def generate_gaussian_profile(pts, width=3.0, amplitude=2.0, background=0.5): return amplitude * np.exp...
[ "numpy.ones_like", "numpy.roll", "numpy.testing.assert_allclose", "numpy.arange", "numpy.exp", "numpy.linspace", "pytest.mark.parametrize", "pytest.mark.xfail" ]
[((1239, 1278), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""theta"""', '[0.0]'], {}), "('theta', [0.0])\n", (1262, 1278), False, 'import pytest\n'), ((1969, 2022), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""cutoff"""', '[10.0, 20.0, 30.0]'], {}), "('cutoff', [10.0, 20.0, 30.0])\n", (199...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/rlessard/packages/omtk/0.4.999/python/omtk/ui/widget_list_influences.ui' # # Created: Tue Feb 20 10:34:53 2018 # by: pyside2-uic running on Qt 2.0.0~alpha0 # # WARNING! All changes made in this file will be lost! from omtk.vendo...
[ "omtk.vendor.Qt.QtWidgets.QVBoxLayout", "omtk.vendor.Qt.QtCompat.translate", "omtk.vendor.Qt.QtWidgets.QCheckBox", "omtk.vendor.Qt.QtWidgets.QHBoxLayout", "omtk.vendor.Qt.QtWidgets.QPushButton", "omtk.vendor.Qt.QtWidgets.QTreeWidget", "omtk.vendor.Qt.QtWidgets.QLineEdit", "omtk.vendor.Qt.QtCore.QMetaO...
[((515, 542), 'omtk.vendor.Qt.QtWidgets.QVBoxLayout', 'QtWidgets.QVBoxLayout', (['Form'], {}), '(Form)\n', (536, 542), False, 'from omtk.vendor.Qt import QtCore, QtGui, QtWidgets, QtCompat\n'), ((694, 717), 'omtk.vendor.Qt.QtWidgets.QHBoxLayout', 'QtWidgets.QHBoxLayout', ([], {}), '()\n', (715, 717), False, 'from omtk....
import urllib from contextlib import suppress from importlib import import_module from urllib.parse import quote from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db.models import CharField, Q from django.db.models.functions import Lower from django.http import Http404 f...
[ "urllib.parse.unquote", "pretalx.common.forms.SearchForm", "importlib.import_module", "django.db.models.functions.Lower", "django.db.models.Q", "contextlib.suppress", "urllib.parse.quote", "django.http.Http404", "django.forms.modelform_factory" ]
[((568, 606), 'importlib.import_module', 'import_module', (['settings.SESSION_ENGINE'], {}), '(settings.SESSION_ENGINE)\n', (581, 606), False, 'from importlib import import_module\n'), ((4412, 4455), 'urllib.parse.unquote', 'urllib.parse.unquote', (["self.request.GET['q']"], {}), "(self.request.GET['q'])\n", (4432, 445...
#!/usr/bin/env python # # overlaydisplaypanel.py - The OverlayDisplayPanel. # # Author: <NAME> <<EMAIL>> """This module provides the :class:`OverlayDisplayPanel` class, a *FSLeyes control* panel which allows the user to change overlay display settings. """ import logging import functools import collections import co...
[ "fsleyes_props.buildGUI", "fsleyes.controls.controlpanel.SettingsPanel.destroy", "fsleyes.controls.controlpanel.SettingsPanel.__init__", "fsleyes.controls.controlpanel.SettingsPanel.setNavOrder", "functools.reduce", "fsleyes.tooltips.properties.get", "fsleyes.strings.properties.get", "collections.Orde...
[((666, 693), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (683, 693), False, 'import logging\n'), ((2825, 2927), 'fsleyes.controls.controlpanel.SettingsPanel.__init__', 'ctrlpanel.SettingsPanel.__init__', (['self', 'parent', 'overlayList', 'displayCtx', 'canvasPanel'], {'kbFocus': '(Tr...
# CASA Next Generation Infrastructure # Copyright (C) 2021 AUI, Inc. Washington DC, USA # # This program 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, either version 3 of the License, or # (at your opt...
[ "matplotlib.pyplot.title", "psutil.virtual_memory", "numpy.sum", "casatools.quanta", "numpy.clip", "numpy.arange", "os.path.join", "numpy.unique", "multiprocessing.cpu_count", "pandas.DataFrame", "os.path.expanduser", "dask.distributed.Client", "numpy.prod", "casacore.tables.default_ms", ...
[((1379, 1436), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'FutureWarning'}), "('ignore', category=FutureWarning)\n", (1402, 1436), False, 'import warnings\n'), ((2192, 2255), 'dask.config.set', 'dask.config.set', (["{'distributed.scheduler.allowed-failures': 10}"], {}), "({'d...
'''counts2table.py - wrap various differential expression tools ============================================================= :Tags: Python Purpose ------- This script provides a convenience wrapper for differential expression analysis for a variety of methods. The aim of this script is to provide a common tabular ...
[ "cgatpipelines.tasks.expression.DEExperiment_Sleuth", "pandas.io.parsers.read_csv", "cgatpipelines.tasks.R.R_with_History", "cgatpipelines.tasks.expression.DEExperiment_DEXSeq", "cgatpipelines.tasks.expression.DEExperiment_edgeR", "cgatcore.experiment.stop", "cgatpipelines.tasks.expression.DEExperiment_...
[((13280, 13331), 'cgatcore.experiment.start', 'E.start', (['parser'], {'argv': 'argv', 'add_output_options': '(True)'}), '(parser, argv=argv, add_output_options=True)\n', (13287, 13331), True, 'import cgatcore.experiment as E\n'), ((21025, 21033), 'cgatcore.experiment.stop', 'E.stop', ([], {}), '()\n', (21031, 21033),...
# Copyright (c) 2016-2020, <NAME> # 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 conditions and the...
[ "urllib.parse.unquote", "os.path.basename", "os.path.isdir", "os.path.exists", "urllib.parse.quote", "os.path.split", "os.path.join", "os.listdir" ]
[((17011, 17023), 'urllib.parse.unquote', 'unquote', (['ref'], {}), '(ref)\n', (17018, 17023), False, 'from urllib.parse import unquote\n'), ((17879, 17903), 'os.path.exists', 'os.path.exists', (['filepath'], {}), '(filepath)\n', (17893, 17903), False, 'import os\n'), ((16015, 16034), 'os.path.split', 'os.path.split', ...
#!/usr/bin/python import requests import requests_cache import time import os from itertools import chain from sys import exit from userExceptions import InvalidType, NotCoinSelected, FiatInvalidType, FiatNotValid class coinMarket: def __init__(self,fiat=""): """ For now will be empty fiat: A s...
[ "os.path.abspath", "os.makedirs", "os.path.exists", "time.time", "requests.get", "os.path.join", "sys.exit" ]
[((1152, 1175), 'os.path.abspath', 'os.path.abspath', (['os.sep'], {}), '(os.sep)\n', (1167, 1175), False, 'import os\n'), ((1195, 1236), 'os.path.join', 'os.path.join', (['root_os', "('tmp' + folderName)"], {}), "(root_os, 'tmp' + folderName)\n", (1207, 1236), False, 'import os\n'), ((1250, 1275), 'os.path.exists', 'o...