code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" TODO: What kind of syntax is handled in the Preview "language" type? Raw? """ import keyword import wx import wx.stc as stc if wx.Platform == '__WXMSW__': faces = { 'times': 'Times New Roman', 'mono' : 'Courier New', 'helv' : 'Arial', 'other': 'Comic Sans MS', ...
[ "wx.stc.StyledTextCtrl.__init__" ]
[((1059, 1122), 'wx.stc.StyledTextCtrl.__init__', 'stc.StyledTextCtrl.__init__', (['self', 'parent', 'ID', 'pos', 'size', 'style'], {}), '(self, parent, ID, pos, size, style)\n', (1086, 1122), True, 'import wx.stc as stc\n')]
import alignments import re import read import binaryIO import math import os import preprocess import time class Compressor: aligned = None # 0 - zlib # 1 - lzma # 2 - bz2 compressMethod = 0 covSize = 0 totalSize = 0 def __init__(self, frag_len_cutoff): if self.compressMetho...
[ "re.search", "binaryIO.writeChroms", "binaryIO.writeJunctionsList", "binaryIO.writeCrossBundleBucket", "binaryIO.writeList", "binaryIO.valToBinary", "binaryIO.writeVal", "binaryIO.writeCrossBundleBucketNames", "alignments.Alignments", "preprocess.Preprocessor", "binaryIO.writeClusters", "binar...
[((992, 1067), 'preprocess.Preprocessor', 'preprocess.Preprocessor', (['samFilename', 'frag_len_z_cutoff', 'split_diff_strands'], {}), '(samFilename, frag_len_z_cutoff, split_diff_strands)\n', (1015, 1067), False, 'import preprocess\n'), ((1981, 2060), 'alignments.Alignments', 'alignments.Alignments', (['self.chromosom...
import sys import csv import glob import argparse parser = argparse.ArgumentParser() parser.add_argument("lp_files", help="The label pair need to be converted") parser.add_argument("dir2pubmed", help="The directory to the place for pubmed articles") parser.add_argument('out_path', help="The path to store finaltraining ...
[ "csv.writer", "glob.glob", "argparse.ArgumentParser" ]
[((59, 84), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (82, 84), False, 'import argparse\n'), ((389, 413), 'glob.glob', 'glob.glob', (['args.lp_files'], {}), '(args.lp_files)\n', (398, 413), False, 'import glob\n'), ((691, 727), 'csv.writer', 'csv.writer', (['out_file'], {'delimiter': '"""\...
""" Copyright (c) 2017-2020 ABBYY Production 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 wr...
[ "neoml.Utils.check_input_layers" ]
[((1934, 1968), 'neoml.Utils.check_input_layers', 'check_input_layers', (['input_layer', '(1)'], {}), '(input_layer, 1)\n', (1952, 1968), False, 'from neoml.Utils import check_input_layers\n')]
#! /usr/bin/env python # Copyright 2018 The Yawn Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
[ "tensorflow.estimator.RunConfig", "argparse.ArgumentParser", "data.stochastic_quantized_sine_wave.get_numpy_data", "model.wavenet_model.WaveNetModel", "tensorflow.logging.set_verbosity", "numpy.diff", "tensorflow.estimator.inputs.numpy_input_fn", "numpy.array", "numpy.random.randint", "tensorflow....
[((1939, 1986), 'data.stochastic_quantized_sine_wave.get_numpy_data', 'get_numpy_data', (['(2000)', 'quantization'], {'scale': 'scale'}), '(2000, quantization, scale=scale)\n', (1953, 1986), False, 'from data.stochastic_quantized_sine_wave import get_numpy_data\n'), ((2092, 2324), 'model.wavenet_model.WaveNetModel', 'W...
""" Created on June 19th, 2017 @author: rouxpn """ from __future__ import division, print_function, unicode_literals, absolute_import import warnings warnings.simplefilter('default', DeprecationWarning) import os import re from decimal import Decimal class DecayParser(): """ Parses the PHISICS xml decay file an...
[ "os.path.exists", "re.match", "warnings.simplefilter", "re.sub", "os.remove" ]
[((150, 202), 'warnings.simplefilter', 'warnings.simplefilter', (['"""default"""', 'DeprecationWarning'], {}), "('default', DeprecationWarning)\n", (171, 202), False, 'import warnings\n'), ((2020, 2074), 're.sub', 're.sub', (['"""(.*?)(\\\\w+)(-)(\\\\d+M?)"""', '"""\\\\1\\\\2\\\\4"""', 'line[0]'], {}), "('(.*?)(\\\\w+)...
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import Select import unittest import re import sys import os # first thing first. We have to create product, just to make sure there is atleast 1 product available # to assign endpoints to when crea...
[ "unittest.TestSuite", "selenium.webdriver.chrome.options.Options", "selenium.webdriver.Chrome", "os.path.join", "os.path.realpath", "sys.exit", "unittest.TextTestRunner", "re.search" ]
[((430, 456), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (446, 456), False, 'import os\n'), ((6343, 6363), 'unittest.TestSuite', 'unittest.TestSuite', ([], {}), '()\n', (6361, 6363), False, 'import unittest\n'), ((6825, 6882), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {...
""" Class :py:class:`CMWDBMain` is a QWidget for calibman =========================================================== Usage :: See test_CMWDBMain() at the end See: - :class:`CMWDBMain` - :class:`CMWMainTabs` - :class:`CMConfigParameters` - `graphqt documentation <https://lcls-psana.github.io/grap...
[ "logging.getLogger", "psana.graphqt.CMConfigParameters.cp.cdb_hsplitter2.setValue", "logging.basicConfig", "psana.graphqt.CMConfigParameters.cp.cdb_hsplitter0.value", "psana.graphqt.CMWDBTree.CMWDBTree", "psana.graphqt.CMWDBDocs.CMWDBDocs", "psana.graphqt.CMWDBDocEditor.CMWDBDocEditor", "PyQt5.QtWidge...
[((449, 476), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (466, 476), False, 'import logging\n'), ((939, 976), 'PyQt5.QtWidgets.QWidget.__init__', 'QWidget.__init__', (['self'], {'parent': 'parent'}), '(self, parent=parent)\n', (955, 976), False, 'from PyQt5.QtWidgets import QApplicati...
import inspect from collections import defaultdict from typing import Dict, List, NamedTuple from .core import PluginFinder, PluginSpec from .discovery import PackagePathPluginFinder class EntryPoint(NamedTuple): name: str value: str group: str EntryPointDict = Dict[str, List[str]] def discover_entry...
[ "inspect.getmodule", "collections.defaultdict" ]
[((782, 799), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (793, 799), False, 'from collections import defaultdict\n'), ((812, 828), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (823, 828), False, 'from collections import defaultdict\n'), ((1198, 1229), 'inspect.getmodule...
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_dataloader.ipynb (unless otherwise specified). __all__ = ['MNIST_NORMALIZATION', 'AmbiguousMNIST', 'FastMNIST', 'DirtyMNIST'] # Cell import os from typing import IO, Any, Callable, Dict, List, Optional, Tuple, Union from urllib.error import URLError import torch from t...
[ "torch.utils.data.ConcatDataset", "os.makedirs", "os.path.join", "torchvision.datasets.utils.download_url", "torch.randn_like", "torchvision.transforms.Normalize" ]
[((554, 585), 'torchvision.transforms.Normalize', 'Normalize', (['(0.1307,)', '(0.3081,)'], {}), '((0.1307,), (0.3081,))\n', (563, 585), False, 'from torchvision.transforms import Compose, Normalize, ToTensor\n'), ((9926, 9989), 'torch.utils.data.ConcatDataset', 'torch.utils.data.ConcatDataset', (['[mnist_dataset, amni...
#!/usr/bin/python # TrueRNG Read - Simple Example # <NAME> # 8/21/2016 # # Requires Python 2.7, pyserial # On Linux - may need to be root or set /dev/tty port permissions to 666 # # Python 2.7.xx is available here: https://www.python.org/ # Install Pyserial package with: python -m pip install pyserial import serial...
[ "serial.tools.list_ports.comports", "serial.Serial", "time.time" ]
[((701, 722), 'serial.tools.list_ports.comports', 'list_ports.comports', ([], {}), '()\n', (720, 722), False, 'from serial.tools import list_ports\n'), ((1686, 1730), 'serial.Serial', 'serial.Serial', ([], {'port': 'rng_com_port', 'timeout': '(10)'}), '(port=rng_com_port, timeout=10)\n', (1699, 1730), False, 'import se...
from io import BytesIO import matplotlib.pyplot as plt from user_database import data, MONTHS, get_city_temperature, get_city_humidity, CITIES def get_main_image(): """Rendering the scatter chart""" yearly_temp = [] yearly_hum = [] for city in data: yearly_temp.append(sum(get_city_temperature...
[ "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.clf", "io.BytesIO", "matplotlib.pyplot.plot", "matplotlib.pyplot.twinx", "user_database.data.get", "user_database.get_city_temperature", "user_database.get_city_humidity", "matplotlib.pyplot.y...
[((396, 405), 'matplotlib.pyplot.clf', 'plt.clf', ([], {}), '()\n', (403, 405), True, 'import matplotlib.pyplot as plt\n'), ((410, 457), 'matplotlib.pyplot.scatter', 'plt.scatter', (['yearly_hum', 'yearly_temp'], {'alpha': '(0.5)'}), '(yearly_hum, yearly_temp, alpha=0.5)\n', (421, 457), True, 'import matplotlib.pyplot ...
"""Represent a class to generate a meme.""" from PIL import Image, ImageDraw, ImageFont from os import makedirs from random import randint from textwrap import fill class MemeGenerator: """ A class to generate a meme. The following responsibilities are defined under this class: - Loading of an image...
[ "PIL.Image.open", "os.makedirs", "PIL.ImageFont.truetype", "textwrap.fill", "PIL.ImageDraw.Draw", "random.randint" ]
[((832, 872), 'os.makedirs', 'makedirs', (['self.output_dir'], {'exist_ok': '(True)'}), '(self.output_dir, exist_ok=True)\n', (840, 872), False, 'from os import makedirs\n'), ((1815, 1835), 'PIL.Image.open', 'Image.open', (['img_path'], {}), '(img_path)\n', (1825, 1835), False, 'from PIL import Image, ImageDraw, ImageF...
import json from flask import jsonify, request, make_response, render_template from flask.blueprints import Blueprint from app.daos import tenant_dao from app.firebase_utils import * from app.services import user_service from app.user_dao import user_dao users_bp = Blueprint("users_bp", __name__) @users_bp....
[ "app.user_dao.user_dao.update_user", "app.services.user_service.response", "app.user_dao.user_dao.get_users", "flask.blueprints.Blueprint", "app.user_dao.user_dao.create_user", "app.user_dao.user_dao.get_one", "app.services.user_service.url_args_to_query_params_dict", "flask.request.headers.get" ]
[((275, 306), 'flask.blueprints.Blueprint', 'Blueprint', (['"""users_bp"""', '__name__'], {}), "('users_bp', __name__)\n", (284, 306), False, 'from flask.blueprints import Blueprint\n'), ((2040, 2078), 'app.services.user_service.response', 'user_service.response', ([], {'status_code': '(403)'}), '(status_code=403)\n', ...
#/usr/bin/env python import codecs import os import sys from setuptools import setup, find_packages if 'publish' in sys.argv: os.system('python setup.py sdist upload') sys.exit() read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read() # Dynamically calculate the version based on redator.VERSIO...
[ "setuptools.find_packages", "os.path.dirname", "sys.exit", "os.system", "codecs.open" ]
[((134, 175), 'os.system', 'os.system', (['"""python setup.py sdist upload"""'], {}), "('python setup.py sdist upload')\n", (143, 175), False, 'import os\n'), ((180, 190), 'sys.exit', 'sys.exit', ([], {}), '()\n', (188, 190), False, 'import sys\n'), ((1104, 1119), 'setuptools.find_packages', 'find_packages', ([], {}), ...
"""Evaluate outcome (+CATE) of datasets""" from scipy.stats import spearmanr import numpy as np def safe_spearmanr(arr_a, arr_b): "Compute the spearman-R correlation, but 0 if all equal" if np.all(arr_a[0] == arr_a) or np.all(arr_b[0] == arr_b): return 0 return spearmanr(arr_a, arr_b).correlation...
[ "scipy.stats.spearmanr", "numpy.all" ]
[((201, 226), 'numpy.all', 'np.all', (['(arr_a[0] == arr_a)'], {}), '(arr_a[0] == arr_a)\n', (207, 226), True, 'import numpy as np\n'), ((230, 255), 'numpy.all', 'np.all', (['(arr_b[0] == arr_b)'], {}), '(arr_b[0] == arr_b)\n', (236, 255), True, 'import numpy as np\n'), ((285, 308), 'scipy.stats.spearmanr', 'spearmanr'...
import dht class DHT22Sensor: provides = ["temperature", "humidity"] def __init__(self, port): self._sensor = dht.DHT22(port) def readout(self): self._sensor.measure() return {"temperature": self._sensor.temperature(), "humidity": self._sensor.humidity()}
[ "dht.DHT22" ]
[((129, 144), 'dht.DHT22', 'dht.DHT22', (['port'], {}), '(port)\n', (138, 144), False, 'import dht\n')]
# -*- coding: utf-8 -*- """ Breadcrumb resolving ==================== """ try: from django.core.urlresolvers import Resolver404, get_resolver except ImportError: from django.urls import Resolver404, get_resolver from autobreadcrumbs.registry import breadcrumbs_registry class BreadcrumbRessource(object): ...
[ "django.urls.get_resolver", "autobreadcrumbs.registry.breadcrumbs_registry.get_title", "autobreadcrumbs.registry.breadcrumbs_registry.has_title" ]
[((1291, 1317), 'django.urls.get_resolver', 'get_resolver', (['root_urlconf'], {}), '(root_urlconf)\n', (1303, 1317), False, 'from django.urls import Resolver404, get_resolver\n'), ((5314, 5350), 'autobreadcrumbs.registry.breadcrumbs_registry.get_title', 'breadcrumbs_registry.get_title', (['name'], {}), '(name)\n', (53...
#!/usr/bin/env python # -*- coding: utf-8 -*- from BlockDataWrapper import BlockDataWrapper from BlockInputsWrapper import BlockInputsWrapper from BlockLinkerWrapper import BlockLinkerWrapper from BlockRandomWrapper import BlockRandomWrapper from BlockVoterWrapper import BlockVoterWrapper from BlockForwardWrapper imp...
[ "BlockDataWrapper.BlockDataWrapper", "BlockRandomWrapper.BlockRandomWrapper", "BlockVoterWrapper.BlockVoterWrapper", "BlockForwardWrapper.BlockForwardWrapper", "BlockDistributeWrapper.BlockDistributeWrapper", "BlockTriggerWrapper.BlockTriggerWrapper", "BlockLinkerWrapper.BlockLinkerWrapper", "BlockInp...
[((664, 690), 'BlockDataWrapper.BlockDataWrapper', 'BlockDataWrapper', (['self.url'], {}), '(self.url)\n', (680, 690), False, 'from BlockDataWrapper import BlockDataWrapper\n'), ((734, 762), 'BlockInputsWrapper.BlockInputsWrapper', 'BlockInputsWrapper', (['self.url'], {}), '(self.url)\n', (752, 762), False, 'from Block...
#!/usr/bin/python __author__ = 'kilroy' # (c) 2014, WasHere Consulting, Inc. # Written for Infinite Skills # need pycrypto package from Crypto.Cipher import AES # need PIL and stepic packages import Image, stepic import binascii # key has to be 16, 24 or 32 bytes long cryptObj = AES.new("This is my key42", AES.MODE...
[ "binascii.b2a_base64", "Image.open", "Crypto.Cipher.AES.new", "binascii.a2b_base64", "stepic.decode", "stepic.encode" ]
[((284, 345), 'Crypto.Cipher.AES.new', 'AES.new', (['"""This is my key42"""', 'AES.MODE_CBC', '"""16 character vec"""'], {}), "('This is my key42', AES.MODE_CBC, '16 character vec')\n", (291, 345), False, 'from Crypto.Cipher import AES\n'), ((597, 628), 'binascii.b2a_base64', 'binascii.b2a_base64', (['ciphertext'], {})...
"""Finance Database view""" __docformat__ = "numpy" import os import pandas as pd from tabulate import tabulate from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.etf import financedatabase_model from gamestonk_terminal.helper_funcs import export_data def display_etf_by_name( name: str,...
[ "gamestonk_terminal.etf.financedatabase_model.get_etfs_by_description", "tabulate.tabulate", "gamestonk_terminal.etf.financedatabase_model.get_etfs_by_category", "gamestonk_terminal.etf.financedatabase_model.get_etfs_by_name", "pandas.DataFrame", "os.path.abspath" ]
[((689, 733), 'gamestonk_terminal.etf.financedatabase_model.get_etfs_by_name', 'financedatabase_model.get_etfs_by_name', (['name'], {}), '(name)\n', (727, 733), False, 'from gamestonk_terminal.etf import financedatabase_model\n'), ((2048, 2106), 'gamestonk_terminal.etf.financedatabase_model.get_etfs_by_description', 'f...
import random import torch import numpy as np import time import os from model.net import Net from model.loss import Loss from torch.autograd import Variable import itertools import pandas as pd from main.dataset import LunaDataSet from torch.utils.data import DataLoader from configs import VAL_PCT, TOTAL_EPOCHS, DEFA...
[ "numpy.mean", "os.makedirs", "torch.utils.data.DataLoader", "random.Random", "pandas.read_csv", "torch.load", "numpy.asarray", "os.path.join", "model.net.Net", "numpy.sum", "torch.cuda.is_available", "model.loss.Loss", "time.time", "glob.glob", "main.dataset.LunaDataSet" ]
[((726, 737), 'time.time', 'time.time', ([], {}), '()\n', (735, 737), False, 'import time\n'), ((1470, 1501), 'numpy.asarray', 'np.asarray', (['metrics', 'np.float32'], {}), '(metrics, np.float32)\n', (1480, 1501), True, 'import numpy as np\n'), ((1967, 1978), 'time.time', 'time.time', ([], {}), '()\n', (1976, 1978), F...
import json from typing import Any, Dict import requests def lambda_handler(event: Dict[str, Any], context: Dict[str, Any]) -> Dict[str, Any]: print(f"request: {json.dumps(event)}") uuid_message = get_uuid_message() return { "statusCode": 200, "headers": {"Content-Type": "text/plain"}, ...
[ "json.dumps", "requests.get" ]
[((402, 442), 'requests.get', 'requests.get', (['"""https://httpbin.org/uuid"""'], {}), "('https://httpbin.org/uuid')\n", (414, 442), False, 'import requests\n'), ((168, 185), 'json.dumps', 'json.dumps', (['event'], {}), '(event)\n', (178, 185), False, 'import json\n')]
#!/usr/bin/python3 """Plot histograms of images. Possible nans and infinities are ignored.""" import argparse from collections import OrderedDict import logging import numpy as np import pylab as pl from scipy import interpolate import dwi.files import dwi.util def parse_args(): """Parse command-line argument...
[ "logging.basicConfig", "numpy.mean", "numpy.histogram", "collections.OrderedDict", "argparse.ArgumentParser", "pylab.plot", "pylab.savefig", "numpy.asarray", "logging.warning", "numpy.any", "pylab.close", "pylab.figure", "numpy.isfinite", "scipy.interpolate.spline", "numpy.percentile", ...
[((334, 378), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (357, 378), False, 'import argparse\n'), ((1056, 1069), 'numpy.asarray', 'np.asarray', (['a'], {}), '(a)\n', (1066, 1069), True, 'import numpy as np\n'), ((1346, 1387), 'numpy.histogram', 'np...
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): """Creates and saves a new user""" if not email: raise ValueError('No valid email provided') ...
[ "django.db.models.EmailField", "django.db.models.CharField", "django.db.models.BooleanField" ]
[((827, 873), 'django.db.models.EmailField', 'models.EmailField', ([], {'max_length': '(255)', 'unique': '(True)'}), '(max_length=255, unique=True)\n', (844, 873), False, 'from django.db import models\n'), ((889, 921), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)'}), '(max_length=255)\n'...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Alex # @Date: 2015-11-16 19:15:59 # @Last Modified by: Alex # @Last Modified time: 2015-12-28 22:28:23 from django.db import models from Inventationery.core.models import TimeStampedModel from Inventationery.apps.Customer.models import CustomerModel from Inve...
[ "django.db.models.DateField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.DecimalField", "django.db.models.PositiveIntegerField", "Inventationery.core.models.Countries.objects.values", "django.db.models.PositiveSmallIntegerField", "...
[((609, 650), 'Inventationery.core.models.Countries.objects.values', 'Countries.objects.values', (['"""currency_code"""'], {}), "('currency_code')\n", (633, 650), False, 'from Inventationery.core.models import Countries\n'), ((2264, 2329), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(45)', 'd...
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ "official.benchmark.owner_utils.Owner", "official.vision.segmentation.unet_main.extract_params", "tensorflow.keras.mixed_precision.experimental.Policy", "official.vision.segmentation.unet_model.build_unet_model", "official.vision.segmentation.unet_main.create_distribution_strategy", "os.path.join", "ten...
[((5102, 5138), 'official.benchmark.owner_utils.Owner', 'owner_utils.Owner', (['"""tf-model-garden"""'], {}), "('tf-model-garden')\n", (5119, 5138), False, 'from official.benchmark import owner_utils\n'), ((5483, 5521), 'official.benchmark.owner_utils.Owner', 'owner_utils.Owner', (['"""tf-graph-compiler"""'], {}), "('t...
try: import subprocess32 as sp except ModuleNotFoundError: import subprocess as sp import shlex def run_command(cmd): p = sp.run(shlex.split(cmd), stdout=sp.PIPE, stderr=sp.PIPE) return p.stdout, p.stderr
[ "shlex.split" ]
[((142, 158), 'shlex.split', 'shlex.split', (['cmd'], {}), '(cmd)\n', (153, 158), False, 'import shlex\n')]
from tletools import TLE import matplotlib.pyplot as plt import numpy as np import math from math import * import sys import datetime as dt import tleToKeplerianElements as ttke # uses TLE to return the current distance of the satellite to the focus def distanceToCentralBody(tle, curr_trueA): lan, argp, inc, ecc,...
[ "tleToKeplerianElements.tleToKepler" ]
[((337, 358), 'tleToKeplerianElements.tleToKepler', 'ttke.tleToKepler', (['tle'], {}), '(tle)\n', (353, 358), True, 'import tleToKeplerianElements as ttke\n')]
from tf_models.utils import train, save_model def train_and_save(name: str, corpus: str, pos_label: str, root: str = ""): print("Start training {}...".format(name)) mlp_model, _, vec = train(corpus, pos_label, root) save_model(mlp_model, vec, name, root) if __name__ == "__main__": # Train intent mo...
[ "tf_models.utils.train", "tf_models.utils.save_model" ]
[((196, 226), 'tf_models.utils.train', 'train', (['corpus', 'pos_label', 'root'], {}), '(corpus, pos_label, root)\n', (201, 226), False, 'from tf_models.utils import train, save_model\n'), ((231, 269), 'tf_models.utils.save_model', 'save_model', (['mlp_model', 'vec', 'name', 'root'], {}), '(mlp_model, vec, name, root)\...
"""empty message Revision ID: f1896d92dddc Revises: <PASSWORD> Create Date: 2020-08-21 22:08:42.863607 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgrade(): # ### command...
[ "alembic.op.drop_column", "sqlalchemy.Date" ]
[((817, 863), 'alembic.op.drop_column', 'op.drop_column', (['"""total_savings_log"""', '"""created"""'], {}), "('total_savings_log', 'created')\n", (831, 863), False, 'from alembic import op\n'), ((868, 910), 'alembic.op.drop_column', 'op.drop_column', (['"""savings_goals"""', '"""created"""'], {}), "('savings_goals', ...
import subprocess commit_sha_base = 'c855573fd1acadf2dd3b1cdc1e4581cd49c77f05' cmake_command = 'cmake -S . -B cmake_build -DTFM_PLATFORM=arm/mps2/an521 \ -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake \ -DCMAKE_BUILD_TYPE=Release \ -DTFM_PROFILE=profile_small'...
[ "subprocess.Popen" ]
[((701, 793), 'subprocess.Popen', 'subprocess.Popen', (['command'], {'shell': '(True)', 'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.STDOUT'}), '(command, shell=True, stdout=subprocess.PIPE, stderr=\n subprocess.STDOUT)\n', (717, 793), False, 'import subprocess\n')]
from collections import defaultdict import copy class CooSparseMatrix: def _prepare_coords(self, coords): i, j = tuple(map(int, coords)) if 0 > i or i >= self.Shape[0] or 0 > j or j >= self.Shape[1]: raise TypeError return i, j def __get_copy(self): return copy.dee...
[ "copy.copy", "collections.defaultdict", "copy.deepcopy" ]
[((312, 331), 'copy.deepcopy', 'copy.deepcopy', (['self'], {}), '(self)\n', (325, 331), False, 'import copy\n'), ((399, 416), 'collections.defaultdict', 'defaultdict', (['dict'], {}), '(dict)\n', (410, 416), False, 'from collections import defaultdict\n'), ((2360, 2384), 'copy.deepcopy', 'copy.deepcopy', (['self.data']...
# coding=utf-8 # """ Copyright (c) 2020, <NAME>. All rights reserved. license: BSD 3-Clause License, see LICENSE for more details. """ from zm.pyutils import struct class AnyStrKey(object): """ Any amount of string keys""" __slots__ = () def __eq__(self, other): if not isinstance(other, AnyStr...
[ "zm.pyutils.struct" ]
[((1114, 1147), 'zm.pyutils.struct', 'struct', (['"""ConfNode"""', '"""val, traits"""'], {}), "('ConfNode', 'val, traits')\n", (1120, 1147), False, 'from zm.pyutils import struct\n')]
from __future__ import absolute_import import logging log = logging.getLogger(__name__) from ..message import Message from . import register @register class ok_1(Message): ''' Define the ``OK`` message (revision 1) for acknowledging successful handling of a previous message. The ``content`` fragment of ...
[ "logging.getLogger" ]
[((61, 88), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (78, 88), False, 'import logging\n')]
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Copies the liblouis braille translation tables to a destination.''' import liblouis_list_tables import optparse import os import sh...
[ "os.path.exists", "liblouis_list_tables.GetTableFiles", "os.makedirs", "optparse.OptionParser", "os.utime", "os.unlink", "shutil.copy", "os.path.basename", "os.link" ]
[((937, 979), 'optparse.OptionParser', 'optparse.OptionParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (958, 979), False, 'import optparse\n'), ((2052, 2142), 'liblouis_list_tables.GetTableFiles', 'liblouis_list_tables.GetTableFiles', (['args[0]', 'options.directories', 'options.extra_files'], {})...
# -*- coding: utf-8 -*_ # # Copyright (c) 2020, Pureport, Inc. # All Rights Reserved from __future__ import absolute_import from click import ( option, Choice ) from pureport_client.helpers import format_date from pureport_client.commands import ( CommandBase, AccountsMixin ) EVENT_TYPES = ('USER_L...
[ "click.option", "click.Choice", "pureport_client.helpers.format_date" ]
[((2079, 2164), 'click.option', 'option', (['"""-pn"""', '"""--page_number"""'], {'type': 'int', 'help': '"""The page number for pagination."""'}), "('-pn', '--page_number', type=int, help='The page number for pagination.'\n )\n", (2085, 2164), False, 'from click import option, Choice\n'), ((2165, 2241), 'click.opti...
import os from tqdm import tqdm import numpy as np import pandas as pd import os import pdb import cv2 import time import json import torch import random import scipy import logging import traceback import numpy as np from datetime import datetime # from config import HOME from tensorboard_logger import log_value, log...
[ "logging.getLogger", "os.path.exists", "logging.StreamHandler", "matplotlib.pyplot.plot", "os.path.join", "tensorboard_logger.log_images", "random.seed", "time.time", "matplotlib.pyplot.close", "datetime.datetime.now", "matplotlib.pyplot.figure", "numpy.random.seed", "os.mkdir", "matplotli...
[((366, 391), 'matplotlib.pyplot.switch_backend', 'plt.switch_backend', (['"""agg"""'], {}), "('agg')\n", (384, 391), True, 'from matplotlib import pyplot as plt\n'), ((668, 691), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (689, 691), False, 'import logging\n'), ((705, 732), 'logging.getLogger'...
#!/usr/bin/env python import logging import sys import imp import os from flask import Flask, request, abort, g app = Flask(__name__) @app.route('/healthz', methods=['GET']) def healthz(): return "", 200, { 'Content-Type': 'text/plain' } def configure_logging(logLevel): global app root = logging.getLog...
[ "logging.getLogger", "logging.Formatter", "logging.StreamHandler", "flask.Flask" ]
[((121, 136), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (126, 136), False, 'from flask import Flask, request, abort, g\n'), ((306, 325), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (323, 325), False, 'import logging\n'), ((363, 396), 'logging.StreamHandler', 'logging.StreamHandler', ([...
#!/usr/bin/env python3 """Design probes for genome capture. This is the main executable of CATCH for probe design. """ import argparse import importlib import logging import os import random from catch import coverage_analysis from catch import probe from catch.filter import adapter_filter from catch.filter import d...
[ "logging.getLogger", "catch.utils.seq_io.write_probe_fasta", "catch.coverage_analysis.Analyzer", "catch.filter.near_duplicate_filter.NearDuplicateFilterWithMinHash", "catch.utils.version.get_version", "random.choices", "catch.filter.reverse_complement_filter.ReverseComplementFilter", "catch.filter.n_e...
[((816, 843), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (833, 843), False, 'import logging\n'), ((12299, 13067), 'catch.filter.set_cover_filter.SetCoverFilter', 'set_cover_filter.SetCoverFilter', ([], {'mismatches': 'args.mismatches', 'lcf_thres': 'args.lcf_thres', 'island_of_exact_m...
""" Module that contains some example filters """ import numpy as np import matplotlib.pyplot as plt from graph import Node, Edge, Graph from resistor import Resistor from capacitor import Capacitor from diode import Diode from opamp import Opamp from wire import Wire from units import Units from filter import Filte...
[ "capacitor.Capacitor", "diode.Diode", "resistor.Resistor", "opamp.Opamp", "filter.Filter", "graph.Graph", "graph.Edge", "graph.Node", "wire.Wire" ]
[((548, 555), 'graph.Graph', 'Graph', ([], {}), '()\n', (553, 555), False, 'from graph import Node, Edge, Graph\n'), ((646, 695), 'graph.Node', 'Node', (['graph'], {'fixed': '(True)', 'source': '(True)', 'label': '"""Vin"""'}), "(graph, fixed=True, source=True, label='Vin')\n", (650, 695), False, 'from graph import Nod...
from imageai.Prediction import ImagePrediction import cv2 import os import time import RPi.GPIO as gpio def my_prediction(img_path, prob): result = {} execution_path = os.getcwd() prediction = ImagePrediction() prediction.setModelTypeAsResNet() prediction.setModelPath(os.path.join(execution_path, "...
[ "cv2.imwrite", "imageai.Prediction.ImagePrediction", "RPi.GPIO.setup", "RPi.GPIO.setwarnings", "os.path.join", "os.getcwd", "cv2.imshow", "cv2.destroyAllWindows", "cv2.VideoCapture", "RPi.GPIO.input", "cv2.waitKey", "RPi.GPIO.setmode" ]
[((177, 188), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (186, 188), False, 'import os\n'), ((206, 223), 'imageai.Prediction.ImagePrediction', 'ImagePrediction', ([], {}), '()\n', (221, 223), False, 'from imageai.Prediction import ImagePrediction\n'), ((837, 856), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}),...
import re import csv import nltk """docstring for twitterClean""" def __init__(self): super(twitterClean, self).__init__() def renameUser(corpus): _new = [] for _temp in corpus: _temp = re.sub( r'(^|[^@\w])@(\w{1,15})\b','',_temp) _new.append(_temp) retu...
[ "re.sub", "csv.reader" ]
[((231, 278), 're.sub', 're.sub', (['"""(^|[^@\\\\w])@(\\\\w{1,15})\\\\b"""', '""""""', '_temp'], {}), "('(^|[^@\\\\w])@(\\\\w{1,15})\\\\b', '', _temp)\n", (237, 278), False, 'import re\n'), ((411, 439), 're.sub', 're.sub', (['"""#(\\\\w+)"""', '""""""', '_temp'], {}), "('#(\\\\w+)', '', _temp)\n", (417, 439), False, '...
from beem.utils import formatTimeString, resolve_authorperm, construct_authorperm, addTzInfo from beem.nodelist import NodeList from beem.comment import Comment from beem import Steem from beem.account import Account from beem.instance import set_shared_steem_instance from beem.blockchain import Blockchain import time ...
[ "steemrewarding.config_storage.ConfigurationDB", "time.sleep", "beem.nodelist.NodeList", "steemrewarding.utils.upvote_comment_without_check", "steemrewarding.post_storage.PostsTrx", "datetime.timedelta", "steemrewarding.broadcast_vote_storage.BroadcastVoteTrx", "beem.utils.resolve_authorperm", "stee...
[((1880, 1891), 'time.time', 'time.time', ([], {}), '()\n', (1889, 1891), False, 'import time\n'), ((1901, 1935), 'dataset.connect', 'dataset.connect', (['databaseConnector'], {}), '(databaseConnector)\n', (1916, 1935), False, 'import dataset\n'), ((2081, 2093), 'steemrewarding.post_storage.PostsTrx', 'PostsTrx', (['db...
from typing import Iterable, Any import unittest from zensols.persist import ReadOnlyStash, PreemptiveStash class RangeStash(ReadOnlyStash): def __init__(self, n: int, end: int = None): super().__init__() self.n = n self.end = end self.keyed = False self.loaded = False ...
[ "zensols.persist.PreemptiveStash" ]
[((985, 1009), 'zensols.persist.PreemptiveStash', 'PreemptiveStash', (['self.rs'], {}), '(self.rs)\n', (1000, 1009), False, 'from zensols.persist import ReadOnlyStash, PreemptiveStash\n')]
from sqlite3 import connect ##<NAME> def show_menu(): print("\n------") print ("MENU:") print ("_____") print ("1. Add a student") print ("2. Find a student") print ("3. Add a course") print ("4. Find a course") print ("5. Enroll a student") print ("6. Find Course(s) of a Student") ...
[ "sqlite3.connect" ]
[((418, 440), 'sqlite3.connect', 'connect', (['"""training.db"""'], {}), "('training.db')\n", (425, 440), False, 'from sqlite3 import connect\n'), ((772, 794), 'sqlite3.connect', 'connect', (['"""training.db"""'], {}), "('training.db')\n", (779, 794), False, 'from sqlite3 import connect\n'), ((1097, 1119), 'sqlite3.con...
import numpy as np from scipy.ndimage import convolve, maximum_filter def gauss2d(sigma, fsize): """ Create a 2D Gaussian filter Args: sigma: width of the Gaussian filter fsize: (w, h) dimensions of the filter Returns: *normalized* Gaussian filter as (h, w) np.array """ m,...
[ "numpy.logical_and", "scipy.ndimage.convolve", "numpy.exp", "numpy.array", "numpy.sum", "numpy.nonzero", "scipy.ndimage.maximum_filter", "numpy.meshgrid", "numpy.zeros_like", "numpy.arange" ]
[((339, 369), 'numpy.arange', 'np.arange', (['(-m / 2 + 0.5)', '(m / 2)'], {}), '(-m / 2 + 0.5, m / 2)\n', (348, 369), True, 'import numpy as np\n'), ((378, 408), 'numpy.arange', 'np.arange', (['(-n / 2 + 0.5)', '(n / 2)'], {}), '(-n / 2 + 0.5, n / 2)\n', (387, 408), True, 'import numpy as np\n'), ((422, 452), 'numpy.m...
from builtins import range from builtins import object import numpy as np from comp411.layers import * from comp411.layer_utils import * class ThreeLayerNet(object): """ A three-layer fully-connected neural network with Leaky ReLU nonlinearity and softmax loss that uses a modular layer design. We assume ...
[ "numpy.hstack", "numpy.sum", "builtins.range", "numpy.zeros", "numpy.random.randn" ]
[((2953, 2976), 'numpy.zeros', 'np.zeros', (['hidden_dim[0]'], {}), '(hidden_dim[0])\n', (2961, 2976), True, 'import numpy as np\n'), ((3005, 3028), 'numpy.zeros', 'np.zeros', (['hidden_dim[1]'], {}), '(hidden_dim[1])\n', (3013, 3028), True, 'import numpy as np\n'), ((3057, 3078), 'numpy.zeros', 'np.zeros', (['num_clas...
import os from socket import * from time import ctime HOST = '' PORT = 9733 BUFSIZ = 1024 ADDR = (HOST, PORT) tcpSerSock = socket(AF_INET, SOCK_STREAM) tcpSerSock.bind(ADDR) tcpSerSock.listen(32) while True: print('waiting for connection...') tcpCliSock, addr = tcpSerSock.accept() print ('...
[ "os.path.exists", "os.remove" ]
[((426, 459), 'os.path.exists', 'os.path.exists', (["(filename + '.csv')"], {}), "(filename + '.csv')\n", (440, 459), False, 'import os\n'), ((576, 609), 'os.path.exists', 'os.path.exists', (["(filename + '.pdf')"], {}), "(filename + '.pdf')\n", (590, 609), False, 'import os\n'), ((722, 767), 'os.path.exists', 'os.path...
# SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>> # # SPDX-License-Identifier: MIT import setuptools setuptools.setup( name="pico-wizard", version="0.1.0", author="<NAME>", author_email="<EMAIL>", description="A Post Installation COnfiguration tool", long_description="A Post Installation COnfigu...
[ "setuptools.find_packages" ]
[((878, 904), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (902, 904), False, 'import setuptools\n')]
import torch import torch.nn as nn import torch.nn.functional as F from ..decoder import ConvDecoder from ..encoder import build_encoder from ..modules import conv, deconv from ..similarity import CorrelationLayer from ..utils import warp from .build import MODEL_REGISTRY @MODEL_REGISTRY.register() class PWCNet(nn.M...
[ "torch.nn.functional.leaky_relu", "torch.nn.ModuleList", "torch.nn.Sequential", "torch.stack", "torch.nn.init.kaiming_normal_", "torch.nn.Conv2d", "torch.nn.functional.interpolate", "torch.cat" ]
[((997, 1012), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (1010, 1012), True, 'import torch.nn as nn\n'), ((1088, 1103), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (1101, 1103), True, 'import torch.nn as nn\n'), ((1908, 1923), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (1921...
# -*- coding: utf-8 -*- import pathlib from setuptools import setup def read(file_name): file_path = pathlib.Path(__file__).parent / file_name return file_path.read_text('utf-8') setup( name='cibopath', version='0.1.0', author='<NAME>', author_email='<EMAIL>', maintainer='<NAME>', ...
[ "pathlib.Path" ]
[((109, 131), 'pathlib.Path', 'pathlib.Path', (['__file__'], {}), '(__file__)\n', (121, 131), False, 'import pathlib\n')]
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTestCase(TestCase): def test_create_user_with_email_successful(self): """Test creating a new user with email is successful""" email = "<EMAIL>" password = "<PASSWORD>" user = get_user_model...
[ "django.contrib.auth.get_user_model" ]
[((306, 322), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (320, 322), False, 'from django.contrib.auth import get_user_model\n'), ((679, 695), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (693, 695), False, 'from django.contrib.auth import get_user_model\n'), (...
# coding: utf-8 import matplotlib import matplotlib.pyplot as plt import matplotlib.ticker as mticker import numpy as np def card_num_distribution(): """Plot `Std-CardNumDistribution.png`.""" total = np.fromstring('12 14 12 12 13 12 12 12 12 12 12 14 12', sep=' ') jb = np.fromstring('0 6 6 6 6 8 9 11 11 ...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.xticks", "numpy.arange", "matplotlib.ticker.PercentFormatter", "matplotlib.pyplot.gca", "matplotlib.pyplot.plot", "matplotlib.pyplot.bar", "matplotlib.rc", "matplotlib.pyplot.ylim", "numpy.fromstring", "matplotlib.pyplot.legend", "matplotlib.pyplot....
[((210, 274), 'numpy.fromstring', 'np.fromstring', (['"""12 14 12 12 13 12 12 12 12 12 12 14 12"""'], {'sep': '""" """'}), "('12 14 12 12 13 12 12 12 12 12 12 14 12', sep=' ')\n", (223, 274), True, 'import numpy as np\n'), ((285, 339), 'numpy.fromstring', 'np.fromstring', (['"""0 6 6 6 6 8 9 11 11 10 7 3 2"""'], {'sep'...
"""Test hyperparameter tuning.""" import pytest from nbaspa.model.tasks import ( LifelinesTuning, SegmentData, SurvivalData, XGBoostTuning, ) @pytest.fixture(scope="module") def survivaldata(data): """Create survival data for the hyperparameter tuning.""" pre = SurvivalData() df = pre.run...
[ "nbaspa.model.tasks.SegmentData", "nbaspa.model.tasks.LifelinesTuning", "nbaspa.model.tasks.SurvivalData", "nbaspa.model.tasks.XGBoostTuning", "pytest.fixture" ]
[((162, 192), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (176, 192), False, 'import pytest\n'), ((289, 303), 'nbaspa.model.tasks.SurvivalData', 'SurvivalData', ([], {}), '()\n', (301, 303), False, 'from nbaspa.model.tasks import LifelinesTuning, SegmentData, SurvivalData,...
from domain.import_object import * from modules.defaultmodule import DefaultModule from domain.financialReports import FinancialPowerPlantReport from domain.powerplant import PowerPlant from domain.cashflow import CashFlow from domain.technologies import * import logging class CreatingFinancialReports(DefaultModule): ...
[ "domain.financialReports.FinancialPowerPlantReport" ]
[((1384, 1432), 'domain.financialReports.FinancialPowerPlantReport', 'FinancialPowerPlantReport', (['plant.name', 'self.reps'], {}), '(plant.name, self.reps)\n', (1409, 1432), False, 'from domain.financialReports import FinancialPowerPlantReport\n')]
import pandas as pd def main(): load_path = "data/2_road_usages.csv" save_path = "data/3_road_usages.csv" df = pd.read_csv(load_path) street_names = df.nimi.unique() points_to_drop = [] for street in street_names: points = df[df['nimi'] == street].piste.unique() if len(poin...
[ "pandas.read_csv" ]
[((126, 148), 'pandas.read_csv', 'pd.read_csv', (['load_path'], {}), '(load_path)\n', (137, 148), True, 'import pandas as pd\n')]
# -*- coding: utf-8 -*- from application.files.parsers.dsv import parse_csv, lines from application.files.parsers import ParseError import unittest from cStringIO import StringIO from hamcrest import assert_that, only_contains, is_, contains class ParseCsvTestCase(unittest.TestCase): def test_parse_csv(self):...
[ "cStringIO.StringIO", "hamcrest.is_", "application.files.parsers.dsv.parse_csv", "hamcrest.only_contains", "hamcrest.contains" ]
[((4325, 4342), 'cStringIO.StringIO', 'StringIO', (['content'], {}), '(content)\n', (4333, 4342), False, 'from cStringIO import StringIO\n'), ((386, 407), 'application.files.parsers.dsv.parse_csv', 'parse_csv', (['csv_stream'], {}), '(csv_stream)\n', (395, 407), False, 'from application.files.parsers.dsv import parse_c...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Policy...
[ "warnings.warn", "pulumi.ResourceOptions" ]
[((10083, 10158), 'warnings.warn', 'warnings.warn', (['"""explicit use of __name__ is deprecated"""', 'DeprecationWarning'], {}), "('explicit use of __name__ is deprecated', DeprecationWarning)\n", (10096, 10158), False, 'import warnings\n'), ((10241, 10340), 'warnings.warn', 'warnings.warn', (['"""explicit use of __op...
# Execution time : 0.440223 seconds # Solution Explanation # We can simplily iterate through all the 4-digits numbers # Then generate all the permutation of this number and check # if the desirable sequence, distinct from the given one, is found import time width = 40 import itertools import math def solution(): ...
[ "math.sqrt", "time.time" ]
[((913, 924), 'time.time', 'time.time', ([], {}), '()\n', (922, 924), False, 'import time\n'), ((1035, 1046), 'time.time', 'time.time', ([], {}), '()\n', (1044, 1046), False, 'import time\n'), ((390, 402), 'math.sqrt', 'math.sqrt', (['p'], {}), '(p)\n', (399, 402), False, 'import math\n')]
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Unit test for Hotlist creation servlet.""" from __future__ import print_function from __futu...
[ "testing.fake.UserService", "features.hotlistcreate.HotlistCreate", "testing.fake.PostData", "mox.Mox", "testing.fake.FeaturesService", "testing.testing_helpers.MakeMonorailRequest", "testing.fake.ProjectService", "framework.permissions.GetPermissions", "testing.fake.IssueService" ]
[((772, 809), 'testing.testing_helpers.MakeMonorailRequest', 'testing_helpers.MakeMonorailRequest', ([], {}), '()\n', (807, 809), False, 'from testing import testing_helpers\n'), ((1120, 1185), 'features.hotlistcreate.HotlistCreate', 'hotlistcreate.HotlistCreate', (['"""req"""', '"""res"""'], {'services': 'self.service...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # [Grove - 12 Key Capacitive I2C Touch Sensor V2] # (http://wiki.seeedstudio.com/Grove-12_Key_Capacitive_I2C_Touch_Sensor_V2-MPR121/) on I2C2 # [Grove – Speaker](http://wiki.seeedstudio.com/Grove-Speaker/) # on UART2 # [Grove - Chainable RGB LED X 2](http://wiki.seeedstud...
[ "wave.open", "time.sleep", "Captouch.MPR121", "RGBLed.P981X", "pyaudio.PyAudio" ]
[((782, 803), 'wave.open', 'wave.open', (['file', '"""rb"""'], {}), "(file, 'rb')\n", (791, 803), False, 'import wave\n'), ((837, 854), 'pyaudio.PyAudio', 'pyaudio.PyAudio', ([], {}), '()\n', (852, 854), False, 'import pyaudio\n'), ((1847, 1854), 'RGBLed.P981X', 'P981X', ([], {}), '()\n', (1852, 1854), False, 'from RGB...
import glob, codecs #configfiles = glob.glob(r'C:\Users\sam\Desktop\**\*.txt', recursive=True) #fn="ojcpp/company/amazon_memo.txt" for fn in glob.glob("ojcpp/company/*.cpp",recursive=True): print(fn) ret=True try: data = open(fn, "r", encoding="gbk").read() open(fn, "w", encoding...
[ "glob.glob" ]
[((149, 197), 'glob.glob', 'glob.glob', (['"""ojcpp/company/*.cpp"""'], {'recursive': '(True)'}), "('ojcpp/company/*.cpp', recursive=True)\n", (158, 197), False, 'import glob, codecs\n')]
from pathlib import Path from typing import List import torch from transformers import AutoModel, AutoTokenizer from interprete.src.models.model import Model, ModelOutput from interprete.src.models.utils import to_cpu class GraphCodeBertModel(Model): def __init__(self, args=[], type="GraphCodeBert"): su...
[ "transformers.AutoModel.from_pretrained", "pathlib.Path", "interprete.src.models.model.ModelOutput", "torch.tensor", "torch.cuda.is_available", "transformers.AutoTokenizer.from_pretrained", "torch.no_grad", "torch.cat" ]
[((464, 523), 'transformers.AutoTokenizer.from_pretrained', 'AutoTokenizer.from_pretrained', (['f"""{path}/graphcodebert-base"""'], {}), "(f'{path}/graphcodebert-base')\n", (493, 523), False, 'from transformers import AutoModel, AutoTokenizer\n'), ((540, 595), 'transformers.AutoModel.from_pretrained', 'AutoModel.from_p...
import pygame from src.entities import Player from src.utils import DialogBox from src.map import MapManager class Game: def __init__(self): super().__init__() # creer la fenetre du jeu self.screen = pygame.display.set_mode((1280, 720)) pygame.display.set_caption("Irale - Le je...
[ "src.utils.DialogBox", "pygame.event.get", "pygame.display.set_mode", "pygame.display.flip", "pygame.time.Clock", "pygame.key.get_pressed", "src.entities.Player", "pygame.display.set_caption", "src.map.MapManager" ]
[((234, 270), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(1280, 720)'], {}), '((1280, 720))\n', (257, 270), False, 'import pygame\n'), ((279, 330), 'pygame.display.set_caption', 'pygame.display.set_caption', (['"""Irale - Le jeux video"""'], {}), "('Irale - Le jeux video')\n", (305, 330), False, 'import p...
from gym.envs.registration import register from malpi.dkwm.gym_envs.dkwm_env import DKWMEnv register( id='dkwm-v0', entry_point='malpi.dkwm.gym_envs:DKWMEnv', )
[ "gym.envs.registration.register" ]
[((94, 159), 'gym.envs.registration.register', 'register', ([], {'id': '"""dkwm-v0"""', 'entry_point': '"""malpi.dkwm.gym_envs:DKWMEnv"""'}), "(id='dkwm-v0', entry_point='malpi.dkwm.gym_envs:DKWMEnv')\n", (102, 159), False, 'from gym.envs.registration import register\n')]
#!/bin/python3 import sys import math def isPrime(n): if n==2 or n==3 or n==5 or n==7 or n==11 or n==13 or n==13 or n==17 or n==19: return True upperLimit = math.ceil(math.sqrt(n))+1 for i in range(2,upperLimit): if n%i==0: return False return True t = int(input().strip())...
[ "math.sqrt" ]
[((185, 197), 'math.sqrt', 'math.sqrt', (['n'], {}), '(n)\n', (194, 197), False, 'import math\n'), ((468, 480), 'math.sqrt', 'math.sqrt', (['n'], {}), '(n)\n', (477, 480), False, 'import math\n')]
"""Support for OPCUA""" import logging import voluptuous as vol from opcua import Client, ua from homeassistant.const import ( ATTR_STATE, CONF_URL, CONF_NAME, CONF_TIMEOUT, CONF_USERNAME, CONF_PASSWORD, EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_START, ) import homeassistant.hel...
[ "logging.getLogger", "voluptuous.Required", "voluptuous.Any", "opcua.Client", "opcua.ua.Variant", "voluptuous.Optional" ]
[((758, 785), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (775, 785), False, 'import logging\n'), ((827, 849), 'voluptuous.Required', 'vol.Required', (['CONF_URL'], {}), '(CONF_URL)\n', (839, 849), True, 'import voluptuous as vol\n'), ((870, 915), 'voluptuous.Optional', 'vol.Optional',...
import threading import traceback import logging import requests from json.decoder import JSONDecodeError from ping3 import ping logging.basicConfig(level=logging.INFO) GATEWAY_IP = "192.168.100.1" STATIC_IP_MIN = 200 STATIC_IP_MAX = 254 lastDot = GATEWAY_IP.rfind(".") ipAddressBase = GATEWAY_IP[0:lastDot+1] threadL...
[ "logging.basicConfig", "traceback.format_exc", "logging.debug", "threading.Lock", "ping3.ping", "requests.get", "threading.Thread", "logging.info", "logging.error" ]
[((130, 169), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (149, 169), False, 'import logging\n'), ((326, 342), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (340, 342), False, 'import threading\n'), ((873, 949), 'logging.debug', 'logging.debug', (['""...
#! /usr/bin/python3 # # Copyright (c) 2020 <NAME> <<EMAIL>> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. #...
[ "sys.stdin.readlines", "fcntl.fcntl", "time.sleep" ]
[((6410, 6423), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (6420, 6423), False, 'import time\n'), ((6559, 6596), 'fcntl.fcntl', 'fcntl.fcntl', (['sys.stdin', 'fcntl.F_GETFL'], {}), '(sys.stdin, fcntl.F_GETFL)\n', (6570, 6596), False, 'import fcntl\n'), ((6603, 6662), 'fcntl.fcntl', 'fcntl.fcntl', (['sys.stdin'...
#!/bin/python3 ''' USAGE: $ python warranty.py list.txt 1. Set "apikey" to the API key obtained from Dell TechDirect. 2. Create file with serial numbers, one per line, no line endings ''' import time import requests import fileinput import sys fileName = sys.argv[1] api_url = 'https://sandbo...
[ "requests.post", "time.sleep" ]
[((1165, 1178), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1175, 1178), False, 'import time\n'), ((760, 813), 'requests.post', 'requests.post', (['api_url'], {'headers': 'headers', 'data': 'payload'}), '(api_url, headers=headers, data=payload)\n', (773, 813), False, 'import requests\n')]
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, "README.rst")) as f: long_description = f.read() setup( ...
[ "os.path.dirname", "os.path.join", "distutils.core.setup" ]
[((312, 1251), 'distutils.core.setup', 'setup', ([], {'name': '"""py-heat-magic"""', 'version': '"""0.0.2"""', 'description': '"""py-heat as IPython magic"""', 'long_description': 'long_description', 'url': '"""https://github.com/csurfer/pyheatmagic"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'licen...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Some simple tests for the autopaths package. You can run this file like this: ipython -i -- ~/repos/autopaths/test/test_file_path.py """ # Built-in modules # import os, inspect # Get current directory (works always) # file_name = os.path.abspath((inspect.stack()...
[ "os.path.abspath", "autopaths.dir_path.DirectoryPath", "inspect.stack" ]
[((646, 672), 'autopaths.dir_path.DirectoryPath', 'DirectoryPath', (['dummy_files'], {}), '(dummy_files)\n', (659, 672), False, 'from autopaths.dir_path import DirectoryPath\n'), ((357, 383), 'os.path.abspath', 'os.path.abspath', (['file_name'], {}), '(file_name)\n', (372, 383), False, 'import os, inspect\n'), ((305, 3...
from rdflib import plugin from rdflib import store plugin.register( "SQLAlchemy", store.Store, "rdflib_sqlalchemy.store", "SQLAlchemy", )
[ "rdflib.plugin.register" ]
[((52, 139), 'rdflib.plugin.register', 'plugin.register', (['"""SQLAlchemy"""', 'store.Store', '"""rdflib_sqlalchemy.store"""', '"""SQLAlchemy"""'], {}), "('SQLAlchemy', store.Store, 'rdflib_sqlalchemy.store',\n 'SQLAlchemy')\n", (67, 139), False, 'from rdflib import plugin\n')]
import difflib import discord from discord.ext import commands from discord.ext.commands import CommandNotFound intents = discord.Intents.all() client = commands.Bot(command_prefix="+", intents=intents, help_command=None) @client.event async def on_ready(): print("Bot Online") @client.event async def on_comma...
[ "discord.ext.commands.Bot", "discord.Embed", "difflib.get_close_matches", "discord.Intents.all" ]
[((124, 145), 'discord.Intents.all', 'discord.Intents.all', ([], {}), '()\n', (143, 145), False, 'import discord\n'), ((155, 223), 'discord.ext.commands.Bot', 'commands.Bot', ([], {'command_prefix': '"""+"""', 'intents': 'intents', 'help_command': 'None'}), "(command_prefix='+', intents=intents, help_command=None)\n", ...
import asyncio import logging import time from typing import Optional, List from hummingbot.core.data_type.user_stream_tracker_data_source import \ UserStreamTrackerDataSource from hummingbot.logger import HummingbotLogger from hummingbot.connector.exchange.bitfinex.bitfinex_order_book import BitfinexOrderBook fro...
[ "logging.getLogger", "time.time", "hummingbot.connector.exchange.bitfinex.bitfinex_websocket.BitfinexWebsocket", "asyncio.sleep" ]
[((855, 882), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (872, 882), False, 'import logging\n'), ((2625, 2636), 'time.time', 'time.time', ([], {}), '()\n', (2634, 2636), False, 'import time\n'), ((2392, 2427), 'asyncio.sleep', 'asyncio.sleep', (['self.MESSAGE_TIMEOUT'], {}), '(self.ME...
""" Auth route """ import requests from fastapi import APIRouter, HTTPException from fastapi.param_functions import Depends from sqlalchemy.orm import Session from config.database import get_database from config.logger import logger from config.settings import settings from server.controllers.auth import get_departme...
[ "requests.post", "fastapi.HTTPException", "config.logger.logger.error", "server.controllers.auth.sign_jwt", "config.logger.logger.info", "fastapi.APIRouter", "config.logger.logger.debug", "server.controllers.auth.get_department_id", "fastapi.param_functions.Depends" ]
[((385, 410), 'fastapi.APIRouter', 'APIRouter', ([], {'prefix': '"""/auth"""'}), "(prefix='/auth')\n", (394, 410), False, 'from fastapi import APIRouter, HTTPException\n'), ((510, 531), 'fastapi.param_functions.Depends', 'Depends', (['get_database'], {}), '(get_database)\n', (517, 531), False, 'from fastapi.param_funct...
import os import re import argparse from collections import defaultdict _AFR_COMPONENTS = [ 'demos', 'freertos_kernel', os.path.join('libraries','abstractions','ble_hal'), os.path.join('libraries','abstractions','common_io'), os.path.join('libraries','abstractions','pkcs11'), os.path.join('lib...
[ "argparse.ArgumentParser", "os.path.join", "collections.defaultdict", "os.path.relpath", "os.walk", "re.search" ]
[((134, 186), 'os.path.join', 'os.path.join', (['"""libraries"""', '"""abstractions"""', '"""ble_hal"""'], {}), "('libraries', 'abstractions', 'ble_hal')\n", (146, 186), False, 'import os\n'), ((190, 244), 'os.path.join', 'os.path.join', (['"""libraries"""', '"""abstractions"""', '"""common_io"""'], {}), "('libraries',...
import logging from pytorch_lightning.callbacks.base import Callback __all__ = ["Speed"] logger = logging.getLogger(__name__) class Speed(Callback): r""" Training speed callback, require 'simple' or 'advanced' profiler. """ def on_train_batch_end( self, trainer, pl_module, outputs, batch...
[ "logging.getLogger" ]
[((101, 128), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (118, 128), False, 'import logging\n')]
''' Created on Apr 18, 2018 @author: msanchez ''' from scraper.RequestScraper import RequestScraper from scraper.HTMLFilter import HTMLFilter from scraper.NewsFilter import NewsFilter from scraper.utilities.WebUtilities import WebUtilities class Scraper(object): ''' Full scrap operation. Downloads the request wit...
[ "scraper.RequestScraper.RequestScraper", "scraper.HTMLFilter.HTMLFilter", "scraper.utilities.WebUtilities.WebUtilities", "scraper.NewsFilter.NewsFilter" ]
[((1013, 1027), 'scraper.utilities.WebUtilities.WebUtilities', 'WebUtilities', ([], {}), '()\n', (1025, 1027), False, 'from scraper.utilities.WebUtilities import WebUtilities\n'), ((1150, 1171), 'scraper.HTMLFilter.HTMLFilter', 'HTMLFilter', (['html_tags'], {}), '(html_tags)\n', (1160, 1171), False, 'from scraper.HTMLF...
# -*- coding: utf-8 -*- from django import template from mezzanine.conf import settings from mezzanine_faq.models import FaqPage register = template.Library() @register.inclusion_tag('includes/faqlist.html') def faq_list(**kwargs): page = FaqPage.objects.get(**kwargs) return { 'page': page, ...
[ "mezzanine_faq.models.FaqPage.objects.get", "django.template.Library" ]
[((142, 160), 'django.template.Library', 'template.Library', ([], {}), '()\n', (158, 160), False, 'from django import template\n'), ((247, 276), 'mezzanine_faq.models.FaqPage.objects.get', 'FaqPage.objects.get', ([], {}), '(**kwargs)\n', (266, 276), False, 'from mezzanine_faq.models import FaqPage\n'), ((498, 527), 'me...
#!/usr/bin/env python3 """ Quick script to read all training schools from data file and write them out again to e.g. update the formatting. """ import argparse from hsf_website_helpers.events.event import EventDatabase from hsf_website_helpers.util.cli import add_website_home_option def get_parser() -> argparse.Ar...
[ "hsf_website_helpers.events.event.EventDatabase.from_file", "hsf_website_helpers.util.cli.add_website_home_option", "argparse.ArgumentParser", "hsf_website_helpers.events.event.EventDatabase" ]
[((497, 535), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'd'}), '(description=d)\n', (520, 535), False, 'import argparse\n'), ((540, 571), 'hsf_website_helpers.util.cli.add_website_home_option', 'add_website_home_option', (['parser'], {}), '(parser)\n', (563, 571), False, 'from hsf_websi...
# a module that wraps some of the S3 commands import boto3 from botocore.exceptions import ClientError from boto3.s3.transfer import S3Transfer import re import os # check for existance of bucket def list_bucket(bucket_name, region): s3 = boto3.resource('s3', region) bucket = s3.Bucket(bucket_name) object_...
[ "boto3.client", "os.makedirs", "re.compile", "boto3.s3.transfer.S3Transfer", "boto3.resource" ]
[((244, 272), 'boto3.resource', 'boto3.resource', (['"""s3"""', 'region'], {}), "('s3', region)\n", (258, 272), False, 'import boto3\n'), ((1017, 1045), 'boto3.resource', 'boto3.resource', (['"""s3"""', 'region'], {}), "('s3', region)\n", (1031, 1045), False, 'import boto3\n'), ((1408, 1436), 'boto3.resource', 'boto3.r...
from django.urls import path from . import views app_name = "app" urlpatterns = [ path('', views.index, name="index"), path('posts/', views.posts, name="posts"), path('categories/', views.categories, name="categories"), path('comments/', views.comments, name="comments"), path('users/', views.user...
[ "django.urls.path" ]
[((89, 124), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (93, 124), False, 'from django.urls import path\n'), ((130, 171), 'django.urls.path', 'path', (['"""posts/"""', 'views.posts'], {'name': '"""posts"""'}), "('posts/', views.posts, name='pos...
#!/usr/bin/env python # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # import cellranger.analysis.io as analysis_io import cellranger.analysis.constants as analysis_constants import cellranger.h5_constants as h5_constants import cellranger.io as cr_io import cellranger.analysis.stats as analysis_stats ...
[ "cellranger.analysis.io.load_h5_iter", "numpy.sqrt", "cellranger.analysis.io.save_matrix_csv", "numpy.argsort", "numpy.array", "numpy.arange", "numpy.where", "cellranger.io.makedirs", "numpy.empty", "numpy.random.seed", "numpy.ceil", "collections.namedtuple", "cellranger.analysis.stats.norma...
[((790, 922), 'collections.namedtuple', 'collections.namedtuple', (['"""PCA"""', "['transformed_pca_matrix', 'components', 'variance_explained', 'dispersion',\n 'features_selected']"], {}), "('PCA', ['transformed_pca_matrix', 'components',\n 'variance_explained', 'dispersion', 'features_selected'])\n", (812, 922)...
#!/usr/bin/env python """ -------------------------------------------------------- IMPORT_IWORX reads and converts various IWORX datafiles into a FieldTrip-type data structure. Use as data, event = import_iworx(filename) where the filename should point to a .mat or .txt datafile. data has the followin...
[ "os.path.join", "os.path.splitext", "os.path.split" ]
[((630, 653), 'os.path.split', 'os.path.split', (['filename'], {}), '(filename)\n', (643, 653), False, 'import os\n'), ((726, 752), 'os.path.splitext', 'os.path.splitext', (['filename'], {}), '(filename)\n', (742, 752), False, 'import os\n'), ((1158, 1197), 'os.path.join', 'os.path.join', (['path', "(name[:-10] + '.mat...
import arcpy import pandas as pd from sklearn.feature_extraction.text import CountVectorizer from sklearn.naive_bayes import MultinomialNB input_csv = arcpy.GetParameterAsText(0) test_string = arcpy.GetParameterAsText(1) df = pd.read_csv(input_csv) target = df['is_there_an_emotion_directed_at_a_brand_or_product'] tex...
[ "pandas.read_csv", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.naive_bayes.MultinomialNB", "arcpy.GetParameterAsText", "pandas.notnull" ]
[((152, 179), 'arcpy.GetParameterAsText', 'arcpy.GetParameterAsText', (['(0)'], {}), '(0)\n', (176, 179), False, 'import arcpy\n'), ((194, 221), 'arcpy.GetParameterAsText', 'arcpy.GetParameterAsText', (['(1)'], {}), '(1)\n', (218, 221), False, 'import arcpy\n'), ((228, 250), 'pandas.read_csv', 'pd.read_csv', (['input_c...
#!/usr/bin/env python # -*- coding: utf-8 -*- import gg from ggconfig import config ############################################################################## # CONTENT SNIPPETS ############################################################################## def test_logo_url(): assert gg.logo_url(config) == 'h...
[ "gg.html_opening_boilerplate", "gg.html_tag_block", "gg.scan_posts", "gg.inline_style", "gg.about_and_social_icons", "gg.footer_navigation", "gg.logo_url", "gg.posts_index", "gg.pagetitle", "gg.inline_javascript", "gg.opengraph", "gg.post_header", "gg.meta", "gg.html_closing_boilerplate", ...
[((803, 890), 'gg.meta', 'gg.meta', (['"""oz"""', '"""Nice text!"""', '"""__draft__, foo, __inline__, bar, tags, __no_header__"""'], {}), "('oz', 'Nice text!',\n '__draft__, foo, __inline__, bar, tags, __no_header__')\n", (810, 890), False, 'import gg\n'), ((1091, 1131), 'gg.meta', 'gg.meta', (['"""oz"""', '"""Nice ...
from typing import TYPE_CHECKING, Any, ClassVar, Optional from urllib.parse import quote as _uriquote if TYPE_CHECKING: from dis_snek.models.discord.snowflake import Snowflake_Type __all__ = ["Route"] class Route: BASE: ClassVar[str] = "https://discord.com/api/v9" path: str params: dict[str, str | ...
[ "urllib.parse.quote" ]
[((1828, 1840), 'urllib.parse.quote', '_uriquote', (['v'], {}), '(v)\n', (1837, 1840), True, 'from urllib.parse import quote as _uriquote\n')]
# udi dataset process module # modiflied from nuscenes_dataset.py import json import pickle import time import random from copy import deepcopy from functools import partial from pathlib import Path import subprocess import fire import numpy as np import os from second.core import box_np_ops from second.core import...
[ "subprocess.check_output", "json.loads", "os.listdir", "pickle.dump", "fire.Fire", "pathlib.Path", "json.dumps", "udi_eval.Box", "pickle.load", "numpy.array", "numpy.concatenate", "json.load", "pyquaternion.Quaternion", "json.dump", "second.utils.progress_bar.progress_bar_iter" ]
[((9955, 9982), 'os.listdir', 'os.listdir', (['lidar_root_path'], {}), '(lidar_root_path)\n', (9965, 9982), False, 'import os\n'), ((10004, 10023), 'second.utils.progress_bar.progress_bar_iter', 'prog_bar', (['filenames'], {}), '(filenames)\n', (10012, 10023), True, 'from second.utils.progress_bar import progress_bar_i...
#!/usr/bin/env python """ Configure folder for Multicolor testing. Hazen 01/18 """ import argparse import inspect import numpy import os import pickle import subprocess import storm_analysis import storm_analysis.sa_library.parameters as parameters import storm_analysis.sa_library.sa_h5py as saH5Py import storm_anal...
[ "storm_analysis.simulator.camera.SCMOS", "storm_analysis.simulator.drift.DriftFromFile", "numpy.array", "numpy.arange", "storm_analysis.simulator.simulate.Simulate", "storm_analysis.sa_library.sa_h5py.loadLocalizations", "storm_analysis.simulator.psf.GaussianPSF", "inspect.getfile", "storm_analysis....
[((832, 860), 'storm_analysis.sa_library.parameters.ParametersSCMOS', 'parameters.ParametersSCMOS', ([], {}), '()\n', (858, 860), True, 'import storm_analysis.sa_library.parameters as parameters\n'), ((1922, 1958), 'storm_analysis.sa_library.parameters.ParametersMultiplaneArb', 'parameters.ParametersMultiplaneArb', ([]...
from django.test import TestCase from django.urls import reverse from django_netjsongraph.tests import CreateGraphObjectsMixin from django_netjsongraph.tests.base.test_admin import TestAdminMixin from openwisp_users.tests.utils import TestOrganizationMixin from openwisp_utils.tests.utils import TestMultitenantAdminMix...
[ "django.urls.reverse" ]
[((3659, 3704), 'django.urls.reverse', 'reverse', (['"""admin:topology_topology_changelist"""'], {}), "('admin:topology_topology_changelist')\n", (3666, 3704), False, 'from django.urls import reverse\n'), ((4040, 4078), 'django.urls.reverse', 'reverse', (['"""admin:topology_topology_add"""'], {}), "('admin:topology_top...
import csv def read_regressor_examples(num_of_features, num_of_decisions, file_path): xs = [] ys = [] with open(file_path, mode='r', encoding='utf-8') as file: reader = csv.reader(file, delimiter=' ') for row in reader: x = [float(value) for value in row[0 : num_of_features]]...
[ "csv.reader" ]
[((192, 223), 'csv.reader', 'csv.reader', (['file'], {'delimiter': '""" """'}), "(file, delimiter=' ')\n", (202, 223), False, 'import csv\n')]
''' utils.py General utility functions: unit conversions, great-circle distances, CSV queries, platform-independent web browsing. ''' import csv import math import webbrowser # UNIT CONVERSIONS MPS_TO_KTS = 1.944 class units: def mps_to_kts(mps): return mps*MPS_TO_KTS def enforceTwoDigi...
[ "csv.DictReader", "math.floor", "math.sqrt", "webbrowser.open", "math.radians", "math.cos", "math.modf", "math.sin" ]
[((3056, 3070), 'math.modf', 'math.modf', (['deg'], {}), '(deg)\n', (3065, 3070), False, 'import math\n'), ((3796, 3814), 'math.radians', 'math.radians', (['lat1'], {}), '(lat1)\n', (3808, 3814), False, 'import math\n'), ((3830, 3848), 'math.radians', 'math.radians', (['lon1'], {}), '(lon1)\n', (3842, 3848), False, 'im...
from flask import Flask from flask import request, render_template, redirect from datetime import datetime from pymongo import MongoClient import html import random import json import ast from flask.ext.pymongo import PyMongo from flask import make_response, request, current_app from functools import update_wrapper app...
[ "flask.render_template", "flask.Flask", "json.dumps", "flask.redirect", "pymongo.MongoClient", "flask.ext.pymongo.PyMongo" ]
[((323, 338), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (328, 338), False, 'from flask import Flask\n'), ((348, 360), 'flask.ext.pymongo.PyMongo', 'PyMongo', (['app'], {}), '(app)\n', (355, 360), False, 'from flask.ext.pymongo import PyMongo\n'), ((484, 515), 'pymongo.MongoClient', 'MongoClient', (['"...
# -*- coding: utf-8 -*- """ Created on Wed Jul 28 13:31:06 2021 @author: user24 """ ''' Suchi wo nyuryoku only accepts integer end shuryou creates a graph as image ''' import matplotlib.pyplot as plt cnt = 0 Y = [] while True: ans = input("数値を入力してください \n-->") if ans == "end": break try: ...
[ "matplotlib.pyplot.plot", "matplotlib.pyplot.savefig", "matplotlib.pyplot.show" ]
[((504, 557), 'matplotlib.pyplot.plot', 'plt.plot', (['X', 'Y'], {'marker': '"""o"""', 'color': '"""r"""', 'linestyle': '"""--"""'}), "(X, Y, marker='o', color='r', linestyle='--')\n", (512, 557), True, 'import matplotlib.pyplot as plt\n'), ((558, 581), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""test.png"""'], {...
from flanexport import FlanExport, timeout_after import os import ast try: from boto.sqs import connection from boto.sqs.message import Message except: pass class AWSSQS(FlanExport): def __init__(self, meta, config): name = self.__class__.__name__ super().__init__(name, meta, config)...
[ "boto.sqs.connection.SQSConnection", "flanexport.timeout_after", "ast.literal_eval", "boto.sqs.message.Message", "os._exit" ]
[((327, 344), 'flanexport.timeout_after', 'timeout_after', (['(10)'], {}), '(10)\n', (340, 344), False, 'from flanexport import FlanExport, timeout_after\n'), ((2625, 2642), 'flanexport.timeout_after', 'timeout_after', (['(10)'], {}), '(10)\n', (2638, 2642), False, 'from flanexport import FlanExport, timeout_after\n'),...
import numpy as np import scipy.spatial as spatial def bilinear_interpolate(img, coords): """ Interpolates over every image channel http://en.wikipedia.org/wiki/Bilinear_interpolation :param img: max 3 channel image :param coords: 2 x _m_ array. 1st row = xcoords, 2nd row = ycoords :returns: array of interp...
[ "matplotlib.pyplot.imshow", "numpy.ones", "numpy.int32", "numpy.min", "numpy.max", "matplotlib.pyplot.subplot", "numpy.zeros", "numpy.linalg.inv", "functools.partial", "locator.weighted_average_points", "blender.weighted_average", "scipy.spatial.Delaunay", "numpy.vstack", "blender.mask_fro...
[((381, 397), 'numpy.int32', 'np.int32', (['coords'], {}), '(coords)\n', (389, 397), True, 'import numpy as np\n'), ((906, 926), 'numpy.min', 'np.min', (['points[:, 0]'], {}), '(points[:, 0])\n', (912, 926), True, 'import numpy as np\n'), ((970, 990), 'numpy.min', 'np.min', (['points[:, 1]'], {}), '(points[:, 1])\n', (...
from setuptools import setup, find_packages from distutils.core import setup from Cython.Build import cythonize setup(name="mcmc", ext_modules=cythonize("./src/koleksyon/mcmc.pyx"))
[ "Cython.Build.cythonize" ]
[((144, 181), 'Cython.Build.cythonize', 'cythonize', (['"""./src/koleksyon/mcmc.pyx"""'], {}), "('./src/koleksyon/mcmc.pyx')\n", (153, 181), False, 'from Cython.Build import cythonize\n')]
import face_embedding import argparse import cv2 import numpy as np parser = argparse.ArgumentParser(description='face model test') # general parser.add_argument('--image-size', default='112,112', help='') parser.add_argument('--model', default='../models/model-r34-amf/model,0', help='path to load model.') parser.add_...
[ "face_embedding.FaceModel", "cv2.imread", "argparse.ArgumentParser", "numpy.square" ]
[((78, 132), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""face model test"""'}), "(description='face model test')\n", (101, 132), False, 'import argparse\n'), ((718, 748), 'face_embedding.FaceModel', 'face_embedding.FaceModel', (['args'], {}), '(args)\n', (742, 748), False, 'import fac...