code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import numpy from btypes.big_endian import * import gl import gx from OpenGL.GL import * import logging logger = logging.getLogger(__name__) class Header(Struct): magic = ByteString(4) section_size = uint32 shape_count = uint16 __padding__ = Padding(2) shape_offset = uint32 index_offset = uin...
[ "gx.PrimitiveType", "gl.Buffer", "numpy.empty", "numpy.frombuffer", "logging.getLogger", "gl.VertexArray", "numpy.unique" ]
[((114, 141), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (131, 141), False, 'import logging\n'), ((3110, 3150), 'numpy.empty', 'numpy.empty', (['element_count', 'numpy.uint16'], {}), '(element_count, numpy.uint16)\n', (3121, 3150), False, 'import numpy\n'), ((6340, 6356), 'gl.VertexAr...
from django import forms from django.utils.translation import ugettext_lazy as _ from tournament.models import OnlineTournamentRegistration, TournamentApplication, TournamentRegistration class TournamentRegistrationForm(forms.ModelForm): allow_to_save_data = forms.BooleanField(required=True) class Meta: ...
[ "django.forms.BooleanField", "django.utils.translation.ugettext_lazy", "django.forms.Textarea" ]
[((266, 299), 'django.forms.BooleanField', 'forms.BooleanField', ([], {'required': '(True)'}), '(required=True)\n', (284, 299), False, 'from django import forms\n'), ((959, 992), 'django.forms.BooleanField', 'forms.BooleanField', ([], {'required': '(True)'}), '(required=True)\n', (977, 992), False, 'from django import ...
import subprocess import os import re import logging from bold import util import sys import errno import collections logger = logging.getLogger(__name__) _registered_builders = [] class BuilderMeta (type): def __init__ (class_, name, bases, attrs): super(BuilderMeta, class_).__init__(name, bases, attrs) if n...
[ "os.remove", "bold.util.file_hash", "os.stat", "collections.defaultdict", "os.path.isfile", "subprocess.call", "os.path.splitext", "sys.exit", "os.path.split", "logging.getLogger", "re.compile" ]
[((129, 156), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (146, 156), False, 'import logging\n'), ((3626, 3657), 're.compile', 're.compile', (['""": | \\\\\\\\\\\\s+|\\\\s+"""'], {}), "(': | \\\\\\\\\\\\s+|\\\\s+')\n", (3636, 3657), False, 'import re\n'), ((3903, 3935), 'subprocess.cal...
from seleniumrequests import Firefox from selenium import webdriver from wai.scraper import logger def init_driver(interactive): """ Initializes the (Firefox) driver. :param interactive: whether to run in interactive mode (ie displaying the browser), required for when off-campus d...
[ "selenium.webdriver.FirefoxOptions", "seleniumrequests.Firefox", "wai.scraper.logger" ]
[((538, 564), 'selenium.webdriver.FirefoxOptions', 'webdriver.FirefoxOptions', ([], {}), '()\n', (562, 564), False, 'from selenium import webdriver\n'), ((615, 639), 'seleniumrequests.Firefox', 'Firefox', ([], {'options': 'options'}), '(options=options)\n', (622, 639), False, 'from seleniumrequests import Firefox\n'), ...
from pydantic import BaseModel, PrivateAttr import requests import logging from typing import Optional from whendo.core.action import Action, ActionRez, Rez, RezDict from whendo.core.scheduler import Scheduler from whendo.core.server import Server from whendo.core.resolver import ( resolve_action, resolve_sched...
[ "whendo.core.resolver.resolve_rez", "whendo.core.resolver.resolve_program", "whendo.core.resolver.resolve_server", "whendo.core.resolver.resolve_scheduler", "whendo.core.action.ActionRez", "whendo.core.resolver.resolve_action", "whendo.core.action.RezDict", "logging.getLogger", "whendo.core.util.Htt...
[((577, 604), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (594, 604), False, 'import logging\n'), ((2150, 2171), 'whendo.core.resolver.resolve_rez', 'resolve_rez', (['response'], {}), '(response)\n', (2161, 2171), False, 'from whendo.core.resolver import resolve_action, resolve_schedul...
# -*- coding: utf-8 -*- """ :author: 秋荏苒 :copyright: © 2019 by 秋荏苒 <<EMAIL>>. :license: MIT, see LICENSE for more details. """ from contextlib import contextmanager from flask_bootstrap import Bootstrap from flask_debugtoolbar import DebugToolbarExtension from flask_login import LoginManager from flask_mai...
[ "flask_whooshee.Whooshee", "flask_mail.Mail", "flask_moment.Moment", "flask_migrate.Migrate", "flask_wtf.CSRFProtect", "flask_ckeditor.CKEditor", "flask_login.LoginManager", "flask_bootstrap.Bootstrap", "flask_debugtoolbar.DebugToolbarExtension" ]
[((871, 879), 'flask_moment.Moment', 'Moment', ([], {}), '()\n', (877, 879), False, 'from flask_moment import Moment\n'), ((892, 903), 'flask_bootstrap.Bootstrap', 'Bootstrap', ([], {}), '()\n', (901, 903), False, 'from flask_bootstrap import Bootstrap\n'), ((911, 917), 'flask_mail.Mail', 'Mail', ([], {}), '()\n', (915...
import argparse import torch import torch.nn.functional as F import librosa import numpy import tqdm import soundfile as sf from net import UpsampleNet from net import WaveNet from dataset import MuLaw from dataset import Preprocess import pytorch_lightning as pl class WavenetLightningModule(pl.LightningModule): ...
[ "numpy.random.choice", "dataset.Preprocess", "argparse.ArgumentParser", "torch.zeros_like", "dataset.MuLaw", "net.UpsampleNet", "torch.nn.functional.softmax", "torch.Tensor", "net.WaveNet", "soundfile.write", "torch.zeros", "torch.no_grad" ]
[((777, 802), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (800, 802), False, 'import argparse\n'), ((1593, 1651), 'torch.zeros', 'torch.zeros', (['(1, model.a_channels, 1)'], {'dtype': 'torch.float32'}), '((1, model.a_channels, 1), dtype=torch.float32)\n', (1604, 1651), False, 'import torch\...
#!/usr/bin/env python3 # # Copyright (c) 2016 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, mer...
[ "logging.getLogger" ]
[((1183, 1216), 'logging.getLogger', 'logging.getLogger', (['"""start_server"""'], {}), "('start_server')\n", (1200, 1216), False, 'import logging\n')]
# Generated by Django 3.1.8 on 2021-05-20 10:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('business_register', '0104_auto_20210519_1401'), ] operations = [ migrations.AddField( model_name='vehicle', name='ad...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.PositiveSmallIntegerField" ]
[((354, 478), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""', 'help_text': '"""additional info about the vehicle"""', 'verbose_name': '"""additional info"""'}), "(blank=True, default='', help_text=\n 'additional info about the vehicle', verbose_name='additional info')\...
# 評価関数による評価 import numpy as np import copy from .generator import Generator from .standard_data import StandardData from .leave_one_out import LeaveOneOut from prediction import Prediction class CrossValidation(object): def __init__(self, data, design_variables, objective_variables): # CrossValidation を使...
[ "copy.deepcopy", "numpy.count_nonzero", "numpy.zeros", "numpy.ones", "numpy.argsort", "numpy.append", "numpy.max", "numpy.min", "numpy.array", "numpy.any", "prediction.Prediction" ]
[((738, 767), 'copy.deepcopy', 'copy.deepcopy', (['individual_set'], {}), '(individual_set)\n', (751, 767), False, 'import copy\n'), ((1151, 1195), 'numpy.array', 'np.array', (['self._data[0:, 0:design_variables]'], {}), '(self._data[0:, 0:design_variables])\n', (1159, 1195), True, 'import numpy as np\n'), ((1213, 1262...
# Generated by Django 3.2.4 on 2021-06-10 23:41 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ExampleModel', fields=[ ...
[ "django.db.models.ImageField", "django.db.models.ForeignKey", "django.db.models.AutoField" ]
[((341, 434), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (357, 434), False, 'from django.db import migrations, models\...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ "proto.RepeatedField", "proto.MapField", "proto.module", "proto.Field" ]
[((761, 1355), 'proto.module', 'proto.module', ([], {'package': '"""google.area120.tables.v1alpha1"""', 'manifest': "{'View', 'GetTableRequest', 'ListTablesRequest', 'ListTablesResponse',\n 'GetWorkspaceRequest', 'ListWorkspacesRequest',\n 'ListWorkspacesResponse', 'GetRowRequest', 'ListRowsRequest',\n 'ListRo...
import contextlib import os.path import posixpath import pytest import frontend_editables from frontend_editables._utils import uniq @contextlib.contextmanager def nullcontext(): yield @pytest.fixture def errorcontext(request): if request.node.callspec.id == "multiple-indirect-package": yield pyte...
[ "frontend_editables.install", "pytest.raises" ]
[((686, 803), 'frontend_editables.install', 'frontend_editables.install', (['[frontend_editables.PthFileInstaller]', '"""test_pth_file"""', 'output_directory', 'dummy_paths'], {}), "([frontend_editables.PthFileInstaller],\n 'test_pth_file', output_directory, dummy_paths)\n", (712, 803), False, 'import frontend_edita...
import pandas as pd import os import plotly.graph_objects as go import numpy as np from dotenv import load_dotenv load_dotenv() MAPBOX_TOKEN = os.getenv("MAPBOX_TOKEN") MAPBOX_STYLE_URL = os.getenv("MAPBOX_STYLE_URL") FAMILY = "PT Sans" def map_graph(all_reports_df,big_bubble_size=2, small_bubble_size=0.01): ""...
[ "dotenv.load_dotenv", "plotly.graph_objects.layout.mapbox.Center", "os.getenv", "plotly.graph_objects.scattermapbox.Marker" ]
[((115, 128), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (126, 128), False, 'from dotenv import load_dotenv\n'), ((145, 170), 'os.getenv', 'os.getenv', (['"""MAPBOX_TOKEN"""'], {}), "('MAPBOX_TOKEN')\n", (154, 170), False, 'import os\n'), ((190, 219), 'os.getenv', 'os.getenv', (['"""MAPBOX_STYLE_URL"""'], {...
import flask import subprocess from functools import lru_cache from ..authenticated_blueprint_preparator import AuthenticatedBlueprintPreparator from ..map_styles import app as map_styles static = __path__[0] + '/static' template = './templates' app = AuthenticatedBlueprintPreparator('vis', __name__, template_folder=t...
[ "flask.render_template", "functools.lru_cache", "flask.request.args.get", "flask.current_app.serve_static_file" ]
[((661, 673), 'functools.lru_cache', 'lru_cache', (['(1)'], {}), '(1)\n', (670, 673), False, 'from functools import lru_cache\n'), ((609, 658), 'flask.current_app.serve_static_file', 'flask.current_app.serve_static_file', (['static', 'path'], {}), '(static, path)\n', (644, 658), False, 'import flask\n'), ((1342, 1383),...
# -*- coding: utf-8 -*- import numpy as np from typing import Callable from scipy.integrate import nquad from .entropy import coupled_entropy def shannon_entropy(density_func: Callable[..., np.ndarray], dim: int = 1, support: list = [[-np.inf, np.inf]], root...
[ "numpy.array", "scipy.integrate.nquad" ]
[((2476, 2490), 'numpy.array', 'np.array', (['args'], {}), '(args)\n', (2484, 2490), True, 'import numpy as np\n'), ((2646, 2688), 'scipy.integrate.nquad', 'nquad', (['un_normalized_density_func', 'support'], {}), '(un_normalized_density_func, support)\n', (2651, 2688), False, 'from scipy.integrate import nquad\n'), ((...
# vi: set shiftwidth=4 tabstop=4 expandtab: import datetime import itertools def get_image_from_file(file_path="../../resources/year2019_day8_input.txt"): with open(file_path) as f: return [l.strip() for l in f][0] def grouper(iterable, n, fillvalue=None): "Collect data into non-overlapping fixed-le...
[ "itertools.zip_longest", "datetime.datetime.now" ]
[((435, 484), 'itertools.zip_longest', 'itertools.zip_longest', (['*args'], {'fillvalue': 'fillvalue'}), '(*args, fillvalue=fillvalue)\n', (456, 484), False, 'import itertools\n'), ((1503, 1526), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1524, 1526), False, 'import datetime\n'), ((1573, 1596)...
from django.test import TestCase from unittest.mock import MagicMock, patch from someapp.models import Invoice from datetime import datetime from cached_fields.exceptions import UnauthorisedChange # Create your tests here. class TestTriggers(TestCase): def test_calculationOccursOnCreationTrigger(self): ...
[ "someapp.models.Invoice.objects.create" ]
[((332, 376), 'someapp.models.Invoice.objects.create', 'Invoice.objects.create', ([], {'quantity': '(2)', 'amount': '(3)'}), '(quantity=2, amount=3)\n', (354, 376), False, 'from someapp.models import Invoice\n'), ((497, 541), 'someapp.models.Invoice.objects.create', 'Invoice.objects.create', ([], {'quantity': '(2)', 'a...
from ctapipe.utils.datasets import get_example_simtelarray_file from ctapipe.io.hessio import hessio_event_source from ctapipe.core import Container from ctapipe.io.containers import RawData from ctapipe.io.containers import MCShowerData, CentralTriggerData from ctapipe.reco.cleaning import tailcuts_clean from ctapipe...
[ "numpy.abs", "argparse.ArgumentParser", "numpy.sum", "ctapipe.core.Container", "pyhessio.get_mc_shower_altitude", "ctapipe.io.containers.MCShowerData", "pyhessio.get_pedestal", "ctapipe.io.CameraGeometry.guess", "ctapipe.calib.array.muon_ring_finder.chaudhuri_kundu_circle_fit", "ctapipe.coordinate...
[((816, 856), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (835, 856), False, 'import logging\n'), ((1541, 1606), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Perform simple Hillas Reco"""'}), "(description='Perform simple H...
from wsgitest import expect @expect.Body('hello') def test_empty_chunks(env, start_response): start_response('200 ok', []) yield 'he' yield '' yield 'llo' @expect.Body('hello') def test_empty_chunks2(env, start_response): start_response('200 ok', []) return ['', '', 'hello'] @expect.Body('hel...
[ "wsgitest.expect.Status", "wsgitest.expect.Header", "wsgitest.expect.Body", "wsgitest.expect.ServerError" ]
[((30, 50), 'wsgitest.expect.Body', 'expect.Body', (['"""hello"""'], {}), "('hello')\n", (41, 50), False, 'from wsgitest import expect\n'), ((174, 194), 'wsgitest.expect.Body', 'expect.Body', (['"""hello"""'], {}), "('hello')\n", (185, 194), False, 'from wsgitest import expect\n'), ((304, 351), 'wsgitest.expect.Body', ...
from collections import defaultdict from dataclasses import dataclass import numpy as np from sim.faas import FunctionReplica @dataclass class ResourceWindow: replica: FunctionReplica cpu: float class MetricsServer: """ contains methods to obtain metrics - offers query functions for resources (fun...
[ "collections.defaultdict" ]
[((519, 536), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (530, 536), False, 'from collections import defaultdict\n')]
import os import modules.file_utils as file_utils from .base_instance import BaseInstance class Dataset(BaseInstance): def __init__(self, content, path): self.directory = path.split(".json")[0] + "/" if "files" in content: self.files = content["files"] content.pop("files", N...
[ "os.mkdir", "modules.file_utils.unzip", "modules.file_utils.download", "modules.file_utils.delete" ]
[((419, 443), 'os.mkdir', 'os.mkdir', (['self.directory'], {}), '(self.directory)\n', (427, 443), False, 'import os\n'), ((578, 611), 'modules.file_utils.delete', 'file_utils.delete', (['self.directory'], {}), '(self.directory)\n', (595, 611), True, 'import modules.file_utils as file_utils\n'), ((624, 652), 'modules.fi...
# Generated by Django 2.2.3 on 2019-07-16 18:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('about', '0005_auto_20190716_1429'), ] operations = [ migrations.AddField( model_name='project', name='...
[ "django.db.models.ImageField", "django.db.models.SlugField" ]
[((345, 372), 'django.db.models.SlugField', 'models.SlugField', ([], {'null': '(True)'}), '(null=True)\n', (361, 372), False, 'from django.db import migrations, models\n'), ((498, 564), 'django.db.models.ImageField', 'models.ImageField', ([], {'blank': '(True)', 'default': '"""default.jpg"""', 'upload_to': '""""""'}), ...
from __future__ import absolute_import, unicode_literals import unittest from fluent.runtime import FluentBundle from fluent.runtime.errors import FluentReferenceError from ..utils import dedent_ftl class TestVariants(unittest.TestCase): def setUp(self): self.ctx = FluentBundle(['en-US'], use_isolatin...
[ "fluent.runtime.FluentBundle", "fluent.runtime.errors.FluentReferenceError" ]
[((284, 328), 'fluent.runtime.FluentBundle', 'FluentBundle', (["['en-US']"], {'use_isolating': '(False)'}), "(['en-US'], use_isolating=False)\n", (296, 328), False, 'from fluent.runtime import FluentBundle\n'), ((1325, 1367), 'fluent.runtime.errors.FluentReferenceError', 'FluentReferenceError', (['"""Unknown variant: c...
""" Support for inheritance of fields down an XBlock hierarchy. """ from django.utils import timezone from xblock.core import XBlockMixin from xblock.fields import Boolean, Dict, Float, Integer, List, Scope, String from xblock.runtime import KeyValueStore, KvsFieldData from xmodule.fields import Date, Timedelta from...
[ "xmodule.partitions.partitions.UserPartition.from_json", "xmodule.fields.Timedelta", "django.utils.timezone.now", "xblock.fields.Boolean", "xmodule.fields.Date" ]
[((1115, 1229), 'xblock.fields.Boolean', 'Boolean', ([], {'help': '"""Whether this module contributes to the final course grade"""', 'scope': 'Scope.settings', 'default': '(False)'}), "(help='Whether this module contributes to the final course grade',\n scope=Scope.settings, default=False)\n", (1122, 1229), False, '...
from flask import Flask, render_template from .config import app_config from .db import db, setup_db, setup_migrate from .auth.login import setup_login_manager def create_app(config_name): app = Flask(__name__, instance_relative_config=True, static_folder="../public", template_folder="../public") app.config.f...
[ "flask.Flask", "flask.render_template" ]
[((201, 307), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)', 'static_folder': '"""../public"""', 'template_folder': '"""../public"""'}), "(__name__, instance_relative_config=True, static_folder='../public',\n template_folder='../public')\n", (206, 307), False, 'from flask import Flask,...
import json from taskit.application.models.task import Task from taskit.application.repositories.errors import EntityNotFoundError from taskit.application.repositories.task_repository import TaskRepository from taskit.infrastructure.data.json import json_serialize class JsonTaskRepository(TaskRepository): def __i...
[ "json.dump", "taskit.application.models.task.Task", "json.load", "taskit.application.repositories.errors.EntityNotFoundError" ]
[((1120, 1137), 'taskit.application.models.task.Task', 'Task', ([], {}), '(**task_dict)\n', (1124, 1137), False, 'from taskit.application.models.task import Task\n'), ((479, 491), 'json.load', 'json.load', (['f'], {}), '(f)\n', (488, 491), False, 'import json\n'), ((760, 802), 'json.dump', 'json.dump', (['data', 'f'], ...
from expungeservice.models.expungement_result import ChargeEligibilityStatus from expungeservice.models.record import Record, Question from expungeservice.models.record_summary import RecordSummary, CountyBalance from typing import Dict, List, Tuple from datetime import date class RecordSummarizer: @staticmethod ...
[ "expungeservice.models.record_summary.RecordSummary" ]
[((3407, 3610), 'expungeservice.models.record_summary.RecordSummary', 'RecordSummary', ([], {'record': 'record', 'questions': 'questions', 'cases_sorted': 'cases_sorted', 'eligible_charges_by_date': 'eligible_charges_by_date', 'total_charges': 'total_charges', 'county_balances': 'county_balances_list'}), '(record=recor...
# Copyright (c) 2021, <NAME> and Contributors # See license.txt import frappe import random import unittest from accounting.accounting.doctype.account.account import Account class TestAccount(unittest.TestCase): def setUp(self): frappe.set_user("Administrator") def tearDown(self): frappe.db....
[ "frappe.db.exists", "frappe.db.delete", "random.randint", "frappe.set_user" ]
[((244, 276), 'frappe.set_user', 'frappe.set_user', (['"""Administrator"""'], {}), "('Administrator')\n", (259, 276), False, 'import frappe\n'), ((310, 337), 'frappe.db.delete', 'frappe.db.delete', (['"""Account"""'], {}), "('Account')\n", (326, 337), False, 'import frappe\n'), ((495, 538), 'frappe.db.exists', 'frappe....
# coding: utf-8 from setuptools import setup, find_packages setup( name='Flask-Mistune', version='0.1.1', url='https://github.com/ellisonleao/flask-mistune/', license='MIT', author=u'<NAME>', author_email='<EMAIL>', description=u'A interface between the Flask web framework and the Mistune' ...
[ "setuptools.find_packages" ]
[((379, 394), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (392, 394), False, 'from setuptools import setup, find_packages\n')]
import firebase_admin from firebase_admin import credentials, messaging, firestore import datetime from constants import ONGOING, PRODUCTS_PER_PAGE from exceptions import InvalidRequest, UnprocessableRequest cred = credentials.Certificate("key.json") app = firebase_admin.initialize_app(cred) db = firestore.client() ...
[ "firebase_admin.initialize_app", "firebase_admin.credentials.Certificate", "firebase_admin.firestore.client", "exceptions.InvalidRequest" ]
[((216, 251), 'firebase_admin.credentials.Certificate', 'credentials.Certificate', (['"""key.json"""'], {}), "('key.json')\n", (239, 251), False, 'from firebase_admin import credentials, messaging, firestore\n'), ((258, 293), 'firebase_admin.initialize_app', 'firebase_admin.initialize_app', (['cred'], {}), '(cred)\n', ...
import logging import webbrowser from datetime import datetime import pandas as pd import wx import wx.grid import wx.dataview as dv from Common.GUIText import Datasets as GUIText from Common.GUIText import Filtering as FilteringGUIText import Common.Constants as Constants import Common.Objects.Datasets as Datasets ...
[ "wx.Menu", "wx.TextDataObject", "wx.dataview.DataViewTextRenderer", "wx.TheClipboard.SetData", "wx.TheClipboard.Close", "wx.grid.GridTableBase.__init__", "wx.grid.GridCellAttr", "Common.Objects.Utilities.Datasets.DatasetTypeLabel", "wx.TheClipboard.Open", "wx.Font", "wx.dataview.DataViewCtrl.__i...
[((859, 892), 'wx.dataview.PyDataViewModel.__init__', 'dv.PyDataViewModel.__init__', (['self'], {}), '(self)\n', (886, 892), True, 'import wx.dataview as dv\n'), ((4546, 4624), 'wx.dataview.DataViewCtrl.__init__', 'dv.DataViewCtrl.__init__', (['self', 'parent'], {'style': '(dv.DV_MULTIPLE | dv.DV_ROW_LINES)'}), '(self,...
#!/usr/bin/evn python # -*- coding: utf-8 -*- # python version 2.7.6 from Tkinter import * from tkintertable import TableCanvas, TableModel data = {'rec1': {'col1': 99, 'col2': 108, 'label': 'rec1'}, 'rec2': {'col1': 90, 'col2': 79, 'label': 'rec2'}, 'rec3': {'col1': 88, 'col2': 90, 'label': 'rec3'}} #创建一个表格 ...
[ "tkintertable.TableCanvas", "tkintertable.TableModel" ]
[((381, 399), 'tkintertable.TableCanvas', 'TableCanvas', (['frame'], {}), '(frame)\n', (392, 399), False, 'from tkintertable import TableCanvas, TableModel\n'), ((505, 517), 'tkintertable.TableModel', 'TableModel', ([], {}), '()\n', (515, 517), False, 'from tkintertable import TableCanvas, TableModel\n'), ((551, 582), ...
from libs.can import CANSocket from libs.myactuator import MyActuator from time import perf_counter, sleep import numpy as np # import getpass # password = getpass.getpass() # the serial port of device # you may find one by examing /dev/ folder, # this is usually devices ttyACM # os.system(f"sudo slcand -o -c -s8 /d...
[ "matplotlib.pyplot.show", "numpy.zeros", "time.perf_counter", "time.sleep", "libs.can.CANSocket", "numpy.sin", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "libs.myactuator.MyActuator" ]
[((526, 562), 'libs.can.CANSocket', 'CANSocket', ([], {'serial_port': 'serial_device'}), '(serial_port=serial_device)\n', (535, 562), False, 'from libs.can import CANSocket\n'), ((589, 616), 'libs.myactuator.MyActuator', 'MyActuator', ([], {'can_bus': 'can_bus'}), '(can_bus=can_bus)\n', (599, 616), False, 'from libs.my...
import time import pathlib import numpy as np import json from .logging import logger # Timing and Performance def timing_info(method): def wrapper(*args, **kw): start_time = time.time() result = method(*args, **kw) end_time = time.time() logger.info(f"timing_info: {method.__name__}...
[ "json.dump", "json.load", "time.time", "pathlib.Path", "numpy.asscalar" ]
[((570, 581), 'time.time', 'time.time', ([], {}), '()\n', (579, 581), False, 'import time\n'), ((188, 199), 'time.time', 'time.time', ([], {}), '()\n', (197, 199), False, 'import time\n'), ((256, 267), 'time.time', 'time.time', ([], {}), '()\n', (265, 267), False, 'import time\n'), ((1567, 1621), 'json.dump', 'json.dum...
#!/usr/bin/env python # -*- coding: utf-8 -*- # 3rd party imports import numpy as np import xarray as xr __author__ = "<NAME>" __email__ = "<EMAIL>" __copyright__ = "Copyright 2020-2021" __license__ = "MIT" __version__ = "2.3.7" __status__ = "Prototype" def feeps_sector_spec(inp_alle): r"""Creates sector-spectr...
[ "numpy.where", "numpy.nanmean", "numpy.arange", "xarray.Dataset" ]
[((1784, 1804), 'xarray.Dataset', 'xr.Dataset', (['out_dict'], {}), '(out_dict)\n', (1794, 1804), True, 'import xarray as xr\n'), ((1408, 1456), 'numpy.nanmean', 'np.nanmean', (['sensor_data[c_start:spin, :]'], {'axis': '(1)'}), '(sensor_data[c_start:spin, :], axis=1)\n', (1418, 1456), True, 'import numpy as np\n'), ((...
from tornado import web import json from utils.w3_hdis import purchaseContent PUBLIC_KEY="<KEY>" PRIVATE_KEY="0xcc9da801e2338bbf9fe025e06fe55eb5a055651d270483b2161e8f9b011ba3c1" class PurchaseHandler(web.RequestHandler): def get(self): student_public_key = self.get_argument('public_key', PUBLIC_KEY) ...
[ "utils.w3_hdis.purchaseContent", "json.dumps" ]
[((528, 596), 'utils.w3_hdis.purchaseContent', 'purchaseContent', (['content_id', 'student_private_key', 'student_public_key'], {}), '(content_id, student_private_key, student_public_key)\n', (543, 596), False, 'from utils.w3_hdis import purchaseContent\n'), ((616, 648), 'json.dumps', 'json.dumps', (["{'msg': 'Purchase...
#!/usr/bin/env python2.7 import matplotlib import matplotlib.pyplot as plt import rospy from std_msgs.msg import Int32 import numpy as np from matplotlib.animation import FuncAnimation import random from mpl_toolkits.mplot3d import Axes3D class Visualiser: def __init__(self): # self.fig, self.ax = plt.su...
[ "matplotlib.pyplot.show", "rospy.Subscriber", "matplotlib.pyplot.plot", "random.randint", "std_msgs.msg.Int32", "rospy.Publisher", "rospy.Rate", "matplotlib.animation.FuncAnimation", "rospy.loginfo", "rospy.is_shutdown", "rospy.init_node", "matplotlib.pyplot.subplots" ]
[((1066, 1097), 'rospy.init_node', 'rospy.init_node', (['"""Camera_Lidar"""'], {}), "('Camera_Lidar')\n", (1081, 1097), False, 'import rospy\n'), ((1123, 1177), 'rospy.Subscriber', 'rospy.Subscriber', (['"""/counter"""', 'Int32', 'vis.odom_callback'], {}), "('/counter', Int32, vis.odom_callback)\n", (1139, 1177), False...
import numpy as np import cv2 import os def handsegment(frame): hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) #lower, upper = boundaries[0] #lower = np.array(lower, dtype="uint8") #upper = np.array(upper, dtype="uint8") lower = np.array([0, 48, 80], dtype="uint8") upper = np.array([20, 255, 255]...
[ "cv2.bitwise_not", "cv2.bitwise_and", "cv2.cvtColor", "cv2.waitKey", "cv2.imshow", "numpy.ones", "cv2.VideoCapture", "numpy.array", "cv2.destroyAllWindows", "cv2.inRange", "os.listdir", "cv2.resize" ]
[((75, 113), 'cv2.cvtColor', 'cv2.cvtColor', (['frame', 'cv2.COLOR_BGR2HSV'], {}), '(frame, cv2.COLOR_BGR2HSV)\n', (87, 113), False, 'import cv2\n'), ((248, 284), 'numpy.array', 'np.array', (['[0, 48, 80]'], {'dtype': '"""uint8"""'}), "([0, 48, 80], dtype='uint8')\n", (256, 284), True, 'import numpy as np\n'), ((297, 3...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models # Create your models here. class EquipmentCategories(models.Model): categories = models.CharField(max_length=32, verbose_name="大类") image = models.CharField(max_length=64, verbose_name="图片名称") redirect = models...
[ "django.db.models.ManyToManyField", "django.db.models.BigIntegerField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.DateTimeField", "django.db.models.IntegerField", "django.db.models.DateField", "django.db.models.UUIDField" ]
[((183, 233), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(32)', 'verbose_name': '"""大类"""'}), "(max_length=32, verbose_name='大类')\n", (199, 233), False, 'from django.db import models\n'), ((246, 298), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(64)', 'verbose_name...
import socket import struct import threading from typing import Callable, List from PyQt5.QtCore import QThread, Qt, pyqtSignal import time class QConnector(QThread): onPress = pyqtSignal(int) onRelease = pyqtSignal(int) def __init__(self, parent=None, timeout=60, debug=False) -> None: super()._...
[ "PyQt5.QtCore.pyqtSignal", "threading.Thread", "socket.socket", "struct.unpack", "time.time_ns" ]
[((184, 199), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['int'], {}), '(int)\n', (194, 199), False, 'from PyQt5.QtCore import QThread, Qt, pyqtSignal\n'), ((216, 231), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['int'], {}), '(int)\n', (226, 231), False, 'from PyQt5.QtCore import QThread, Qt, pyqtSignal\n'), ((400, 468)...
""" 'Reclustering module' - clustering searched TRF tandem repeats to group together similar TRs Input arguments:blast_run, makedb,threads, word_size, trf_file,outdir,abund_f,log_file - blast_run - path to the BLAST - makedb - path to the makeblastsdb - threads - number of threads - word-size - word length for BLAST ...
[ "Bio.SeqIO.parse", "Bio.SeqIO.write", "warnings.filterwarnings", "bin.helpers.help_functions.getLog", "networkx.connected_components", "networkx.Graph", "networkx.number_connected_components" ]
[((2554, 2609), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'UserWarning'}), "('ignore', category=UserWarning)\n", (2577, 2609), False, 'import warnings\n'), ((3137, 3169), 'bin.helpers.help_functions.getLog', 'getLog', (['log_file', '"""Reclustering"""'], {}), "(log_file, 'Rec...
import os import struct from enum import Enum from typing import Optional import numpy as np import torch from hivemind.utils import DHTExpiration, MPFuture, get_dht_time, get_logger logger = get_logger(__name__) class AveragingStage(Enum): IDLE = 0 # still initializing LOOKING_FOR_GROUP = 1 # running de...
[ "os.getpid", "numpy.isfinite", "hivemind.utils.get_logger", "torch.zeros", "hivemind.utils.get_dht_time" ]
[((195, 215), 'hivemind.utils.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (205, 215), False, 'from hivemind.utils import DHTExpiration, MPFuture, get_dht_time, get_logger\n'), ((3946, 3965), 'numpy.isfinite', 'np.isfinite', (['weight'], {}), '(weight)\n', (3957, 3965), True, 'import numpy as np\n'), ...
"""Serial transceiver class and utilities.""" import sys import logging from logging import NullHandler from enum import Enum, auto from crcmod.predefined import Crc import serial import serial.tools.list_ports from .configuration import validateConfig LOG = logging.getLogger(__name__) LOG.addHandler(NullHandler()) # ...
[ "serial.Serial", "serial.tools.list_ports.comports", "logging.getLogger", "logging.NullHandler", "enum.auto", "crcmod.predefined.Crc" ]
[((260, 287), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (277, 287), False, 'import logging\n'), ((303, 316), 'logging.NullHandler', 'NullHandler', ([], {}), '()\n', (314, 316), False, 'from logging import NullHandler\n'), ((453, 459), 'enum.auto', 'auto', ([], {}), '()\n', (457, 459)...
#!/usr/bin/env python3 from setuptools import setup setup(name="owoe", version="0.0.1a", description="A wrapper for weeb.sh", license="MIT", packages=["owoe"], zip_safe=False)
[ "setuptools.setup" ]
[((54, 181), 'setuptools.setup', 'setup', ([], {'name': '"""owoe"""', 'version': '"""0.0.1a"""', 'description': '"""A wrapper for weeb.sh"""', 'license': '"""MIT"""', 'packages': "['owoe']", 'zip_safe': '(False)'}), "(name='owoe', version='0.0.1a', description='A wrapper for weeb.sh',\n license='MIT', packages=['owo...
#! /usr/bin/env python3 import matplotlib matplotlib.use('agg') import sys from SWEET import * p = JobGeneration() p.compile.compiler = 'intel' p.compile.program = 'swe_sphere' p.compile.fortran_source = 'enable' p.compile.plane_or_sphere = 'sphere' p.compile.plane_spectral_space = 'disable' p.compile.plane_spectr...
[ "matplotlib.use", "sys.exit" ]
[((43, 64), 'matplotlib.use', 'matplotlib.use', (['"""agg"""'], {}), "('agg')\n", (57, 64), False, 'import matplotlib\n'), ((1650, 1661), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1658, 1661), False, 'import sys\n')]
import altair import pandas as pd from vizno.report import Report chart = ( altair.Chart( pd.DataFrame( { "a": ["A", "B", "C", "D", "E", "F", "G", "H", "I"], "b": [28, 55, 43, 91, 81, 53, 19, 87, 52], } ) ) .mark_bar() .encode(x="...
[ "pandas.DataFrame", "vizno.report.Report" ]
[((338, 428), 'vizno.report.Report', 'Report', ([], {'title': '"""My Altair"""', 'datetime': '"""The datetime"""', 'description': '"""a very basic report"""'}), "(title='My Altair', datetime='The datetime', description=\n 'a very basic report')\n", (344, 428), False, 'from vizno.report import Report\n'), ((104, 217)...
"""Tests for the :mod:`campy.util.note` module.""" from campy.util.note import OCTAVE_MIN, OCTAVE_MAX, Note import os TEST_PLATFORM = 'CAMPY_TEST_PLATFORM' in os.environ def test_pitch_contains_rest(): assert Note.Pitch.R in Note.Pitch def test_pitch_contains_all_pitches(): assert Note.Pitch.A in Note.Pitc...
[ "campy.util.note.Note", "campy.util.note.Note.from_line", "campy.util.note.Note.rest" ]
[((594, 618), 'campy.util.note.Note', 'Note', (['(1)', 'Note.Pitch.C', '(4)'], {}), '(1, Note.Pitch.C, 4)\n', (598, 618), False, 'from campy.util.note import OCTAVE_MIN, OCTAVE_MAX, Note\n'), ((850, 897), 'campy.util.note.Note', 'Note', (['(1)', 'Note.Pitch.C', '(4)', 'Note.Accidental.SHARP'], {}), '(1, Note.Pitch.C, 4...
# -- coding: utf-8 -- __all__ = ('WindowsBalloonTip', 'balloon_tip') import time import ctypes from plyer.platforms.win.libs import win_api_defs from plyer.compat import PY2 from threading import RLock WS_OVERLAPPED = 0x00000000 WS_SYSMENU = 0x00080000 WM_DESTROY = 2 CW_USEDEFAULT = 8 LR_LOADFROMFILE = 16 LR_DEFA...
[ "plyer.platforms.win.libs.win_api_defs.get_WNDCLASSEXW", "plyer.platforms.win.libs.win_api_defs.UpdateWindow", "plyer.platforms.win.libs.win_api_defs.DestroyWindow", "plyer.platforms.win.libs.win_api_defs.RegisterClassExW", "plyer.platforms.win.libs.win_api_defs.DestroyIcon", "threading.RLock", "plyer.p...
[((749, 756), 'threading.RLock', 'RLock', ([], {}), '()\n', (754, 756), False, 'from threading import RLock\n'), ((1140, 1170), 'plyer.platforms.win.libs.win_api_defs.get_WNDCLASSEXW', 'win_api_defs.get_WNDCLASSEXW', ([], {}), '()\n', (1168, 1170), False, 'from plyer.platforms.win.libs import win_api_defs\n'), ((1464, ...
""" ObservationBuilder objects are objects that can be passed to environments designed for customizability. The ObservationBuilder-derived custom classes implement 2 functions, reset() and get() or get(handle). + `reset()` is called after each environment reset (i.e. at the beginning of a new episode), to allow for pr...
[ "numpy.count_nonzero", "numpy.zeros", "numpy.append", "numpy.min", "flatland.core.grid.grid_utils.coordinate_to_position", "numpy.where", "collections.namedtuple", "src.utils.assign_priority", "numpy.delete" ]
[((1542, 1615), 'collections.namedtuple', 'collections.namedtuple', (['"""Node"""', '"""cell_position agent_direction is_target"""'], {}), "('Node', 'cell_position agent_direction is_target')\n", (1564, 1615), False, 'import collections\n'), ((5979, 6025), 'numpy.zeros', 'np.zeros', (['self.max_prediction_depth'], {'dt...
from django.test import TestCase import time import json from datetime import timedelta from urlparse import urlsplit, urlunsplit from django.contrib.auth import get_user_model, authenticate from django.core import mail from django.core.management import call_command from django.core.urlresolvers import reverse, resolv...
[ "django.contrib.gis.geos.Point", "json.loads", "django.core.urlresolvers.reverse", "django.test.Client", "django.contrib.auth.get_user_model", "json.dumps", "time.sleep" ]
[((527, 543), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (541, 543), False, 'from django.contrib.auth import get_user_model, authenticate\n'), ((656, 664), 'django.test.Client', 'Client', ([], {}), '()\n', (662, 664), False, 'from django.test import Client, TestCase\n'), ((1224, 1232), 'd...
from flask import render_template from flask.views import MethodView from flask_login import login_required from sqlalchemy import func from nanumlectures.common import is_admin_role from nanumlectures.database import db_session from nanumlectures.models import Library, Roundtable, RoundtableAndLibrary class Dashboa...
[ "flask.render_template", "sqlalchemy.func.distinct", "nanumlectures.models.RoundtableAndLibrary.query.filter", "nanumlectures.database.db_session.query" ]
[((854, 943), 'nanumlectures.models.RoundtableAndLibrary.query.filter', 'RoundtableAndLibrary.query.filter', (['(RoundtableAndLibrary.roundtable == main_roundtable)'], {}), '(RoundtableAndLibrary.roundtable ==\n main_roundtable)\n', (887, 943), False, 'from nanumlectures.models import Library, Roundtable, Roundtable...
""" Implimentation of Density-Based Clustering Validation "DBCV" """ import numpy as np from scipy.spatial.distance import cdist from scipy.sparse.csgraph import minimum_spanning_tree from scipy.sparse import csgraph from tqdm import tqdm class DBCV: def __init__(self, samples: np.ndarray, labels: np.ndarray, di...
[ "scipy.spatial.distance.cdist", "numpy.sum", "numpy.unique", "numpy.transpose", "scipy.sparse.csgraph.minimum_spanning_tree", "numpy.shape", "numpy.max", "numpy.min", "numpy.where", "numpy.array", "numpy.concatenate", "scipy.sparse.csgraph.dijkstra" ]
[((1571, 1592), 'scipy.sparse.csgraph.dijkstra', 'csgraph.dijkstra', (['mst'], {}), '(mst)\n', (1587, 1592), False, 'from scipy.sparse import csgraph\n'), ((2807, 2852), 'scipy.spatial.distance.cdist', 'cdist', (['samples', 'samples'], {'metric': 'dist_function'}), '(samples, samples, metric=dist_function)\n', (2812, 2...
import socket import time import os port = int(os.environ["POSTGRES_PORT"]) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print('Ждем пока поднимется postgres') while True: try: s.connect(('database', port)) s.close() break except socket.error as ex: time.sleep(0.1)
[ "socket.socket", "time.sleep" ]
[((81, 130), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (94, 130), False, 'import socket\n'), ((301, 316), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (311, 316), False, 'import time\n')]
from ParsedInput import ParsedInput class ParsingLayer(object): """Parses XML input into an IndexedDict tree structure and makes it available through the parsedInput member.""" def __init__(self,rawInput): """ @param rawInput: RawInput object containing XML input to be parsed """ self.parsedInput = ParsedIn...
[ "ParsedInput.ParsedInput" ]
[((312, 333), 'ParsedInput.ParsedInput', 'ParsedInput', (['rawInput'], {}), '(rawInput)\n', (323, 333), False, 'from ParsedInput import ParsedInput\n')]
import os import re from subprocess import Popen, PIPE import select from threading import Timer try: import unittest2 as unittest except ImportError: import unittest from pyhessian.client import HessianProxy SUPPORT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), 'support')) TEST_JAR = os.pat...
[ "subprocess.Popen", "os.path.dirname", "pyhessian.client.HessianProxy", "os.path.join", "re.compile" ]
[((314, 367), 'os.path.join', 'os.path.join', (['SUPPORT_DIR', '"""hessian-test-servlet.jar"""'], {}), "(SUPPORT_DIR, 'hessian-test-servlet.jar')\n", (326, 367), False, 'import os\n'), ((386, 426), 're.compile', 're.compile', (['"""Listening on port: (\\\\d+)$"""'], {}), "('Listening on port: (\\\\d+)$')\n", (396, 426)...
from __future__ import absolute_import from requests import * # noqa from requests.packages.urllib3.util import Retry from requests.adapters import HTTPAdapter from requests import Session as _Session DEFAULT_CONNECT_TIMEOUT = None DEFAULT_READ_TIMEOUT = None DEFAULT_RETRY_ARGS = {} def set_default_timeout(timeout...
[ "requests.adapters.HTTPAdapter", "requests.packages.urllib3.util.Retry" ]
[((3214, 3241), 'requests.packages.urllib3.util.Retry', 'Retry', ([], {}), '(**DEFAULT_RETRY_ARGS)\n', (3219, 3241), False, 'from requests.packages.urllib3.util import Retry\n'), ((3518, 3548), 'requests.adapters.HTTPAdapter', 'HTTPAdapter', ([], {'max_retries': 'retry'}), '(max_retries=retry)\n', (3529, 3548), False, ...
#!/usr/bin/env python import sys, gzip, argparse #pre: a genepred file, a reference fasta file, an output fasta, optionally 'directionless' will reverse compliment entries on the negative strand #post: writes to the output fasta the sequence of the transcripts in the genepred # produces transcripts in the proper ...
[ "gzip.open", "argparse.ArgumentParser", "seqtools.format.gpd.GPD" ]
[((1132, 1209), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Filter a genepred by transcript length"""'}), "(description='Filter a genepred by transcript length')\n", (1155, 1209), False, 'import sys, gzip, argparse\n'), ((961, 970), 'seqtools.format.gpd.GPD', 'GPD', (['line'], {}), '(...
#!/usr/bin/env python from __future__ import print_function import argparse import os, codecs import time, datetime from six.moves import cPickle from six import text_type import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDef...
[ "argparse.ArgumentParser", "codecs.open", "tensorflow.global_variables_initializer", "model.Model", "tensorflow.Session", "time.time", "tensorflow.ConfigProto", "tensorflow.global_variables", "datetime.timedelta", "six.moves.cPickle.load", "os.path.join", "tensorflow.train.get_checkpoint_state...
[((240, 319), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), '(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n', (263, 319), False, 'import argparse\n'), ((1032, 1043), 'time.time', 'time.time', ([], {}), '()\n', (1041, 1043), False, ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import random import qiniu import base64 import struct import hashlib from PIL import Image from .. import app qn = qiniu.Auth(app.config["QINIU_ACCESS_KEY"], app.config["QINIU_SECRET_KEY"]) def calc_hashkey(data): h = hashlib.sha256(data.read())....
[ "base64.urlsafe_b64encode", "struct.unpack", "random.choice", "struct.pack", "PIL.Image.open", "qiniu.Auth" ]
[((183, 257), 'qiniu.Auth', 'qiniu.Auth', (["app.config['QINIU_ACCESS_KEY']", "app.config['QINIU_SECRET_KEY']"], {}), "(app.config['QINIU_ACCESS_KEY'], app.config['QINIU_SECRET_KEY'])\n", (193, 257), False, 'import qiniu\n'), ((355, 371), 'PIL.Image.open', 'Image.open', (['data'], {}), '(data)\n', (365, 371), False, 'f...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, getdate from frappe.core.doctype.communication.comment import add_info_comment def se...
[ "frappe.db.exists", "frappe.utils.getdate", "frappe.utils.cstr", "frappe.db.get_default", "frappe.utils.nestedset.get_root_of", "frappe.get_doc", "frappe.get_single", "frappe._" ]
[((462, 514), 'frappe.get_doc', 'frappe.get_doc', (['"""Global Defaults"""', '"""Global Defaults"""'], {}), "('Global Defaults', 'Global Defaults')\n", (476, 514), False, 'import frappe\n'), ((808, 841), 'frappe.get_doc', 'frappe.get_doc', (['"""System Settings"""'], {}), "('System Settings')\n", (822, 841), False, 'im...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test Network Number Discovery ----------------------------- """ import unittest from bacpypes.debugging import bacpypes_debugging, ModuleLogger, btox, xtob from bacpypes.core import deferred from bacpypes.comm import Client, Server, bind from bacpypes.pdu import PDU...
[ "bacpypes.core.deferred", "bacpypes.pdu.Address", "bacpypes.pdu.LocalBroadcast" ]
[((8512, 8553), 'bacpypes.core.deferred', 'deferred', (['tnet.iut1.nse.network_number_is'], {}), '(tnet.iut1.nse.network_number_is)\n', (8520, 8553), False, 'from bacpypes.core import deferred\n'), ((11114, 11155), 'bacpypes.core.deferred', 'deferred', (['tnet.iut1.nse.network_number_is'], {}), '(tnet.iut1.nse.network_...
# -*- coding: utf-8 -*- import os from djangoplus import test from django.conf import settings def parametrized(dec): def layer(*args, **kwargs): def repl(f): return dec(f, *args, **kwargs) return repl return layer @parametrized def testcase(func, title, username=settings.DEFAUL...
[ "os.path.join" ]
[((872, 913), 'os.path.join', 'os.path.join', (['settings.BASE_DIR', '"""videos"""'], {}), "(settings.BASE_DIR, 'videos')\n", (884, 913), False, 'import os\n')]
import os, re from typing import List from json import JSONEncoder from .response_builder import ResponseBuilder class Scam: def __init__(self, name: str, ocr: List[str], title: List[str], body: List[str], blackList: List[str], ...
[ "re.sub", "re.escape" ]
[((2985, 3045), 're.sub', 're.sub', (['escaped', "('**' + sawWords + '**')", 'builder.TestGrounds'], {}), "(escaped, '**' + sawWords + '**', builder.TestGrounds)\n", (2991, 3045), False, 'import os, re\n'), ((1106, 1157), 're.sub', 're.sub', (['escaped', "('_' + x + '_')", 'builder.TestGrounds'], {}), "(escaped, '_' + ...
from briefmetrics.lib.service import registry as service_registry from celery.utils.log import get_task_logger from briefmetrics import api from briefmetrics import model from .setup import celery log = get_task_logger(__name__) @celery.task(ignore_result=True) def stripe_webhook(ga_tracking_id, stripe_account_id...
[ "celery.utils.log.get_task_logger", "briefmetrics.model.Account.get_by", "briefmetrics.api.account.query_service" ]
[((207, 232), 'celery.utils.log.get_task_logger', 'get_task_logger', (['__name__'], {}), '(__name__)\n', (222, 232), False, 'from celery.utils.log import get_task_logger\n'), ((441, 501), 'briefmetrics.model.Account.get_by', 'model.Account.get_by', ([], {'id': 'stripe_account_id', 'service': '"""stripe"""'}), "(id=stri...
#!/usr/bin/env python import os import sys import setuptools from distutils.core import setup, Extension # https://github.com/pypa/packaging-problems/issues/84 # no sensible way to include header files by default headers = ['biteopt.h','biternd.h','spheropt.h','biteaux.h'] def get_c_sources(files, include_headers=Fals...
[ "distutils.core.setup" ]
[((634, 866), 'distutils.core.setup', 'setup', ([], {'name': '"""biteopt"""', 'version': '"""0.2.3"""', 'description': '"""Python Wrapper for Aleksey Vaneev\'s BiteOpt"""', 'author': '"""leonidk"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/leonidk/biteopt"""', 'py_modules': '[]', 'ext_modules': '...
import numpy as np import scipy import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 16}) def plot_results(title, ylim=None, xlim=None, whether_save=True): plt.figure(figsize=(6,4)) for method in ('lh_sgpr', 'lh_vhgpr', 'seq_vhgpr'): results = np.load('data/' + method + '.npy', ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.xlim", "numpy.load", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "numpy.std", "matplotlib.pyplot.figure", "matplotlib.pyplot.rcParams.update", "numpy.mean", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig"...
[((64, 102), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 16}"], {}), "({'font.size': 16})\n", (83, 102), True, 'import matplotlib.pyplot as plt\n'), ((180, 206), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(6, 4)'}), '(figsize=(6, 4))\n', (190, 206), True, 'import matplo...
from usaddress import tag, RepeatedLabelError import string from .constants import ( DIRECTIONAL_ABBREVIATIONS, STATE_ABBREVIATIONS, STREET_NAME_ABBREVIATIONS, STREET_NAME_POST_ABBREVIATIONS, OCCUPANCY_TYPE_ABBREVIATIONS, STREET_TYPE_CODES, DIRECTION_CODES, EXTENSION_CODES ) ...
[ "re.split" ]
[((3523, 3547), 're.split', 're.split', (['"""-|\\\\s"""', 'words'], {}), "('-|\\\\s', words)\n", (3531, 3547), False, 'import re\n')]
import itertools from copy import deepcopy from unittest.mock import patch import jsonpath_rw import pytest from mongoengine_migrate.actions import CreateField from mongoengine_migrate.exceptions import SchemaError from mongoengine_migrate.graph import MigrationPolicy from mongoengine_migrate.schema import Schema @...
[ "unittest.mock.patch.object", "copy.deepcopy", "jsonpath_rw.parse", "mongoengine_migrate.actions.CreateField.build_object", "pytest.raises", "pytest.mark.parametrize", "mongoengine_migrate.schema.Schema.Document", "mongoengine_migrate.actions.CreateField" ]
[((7331, 7426), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""document_type"""', "('Document1', 'Document_new', 'Document_unknown')"], {}), "('document_type', ('Document1', 'Document_new',\n 'Document_unknown'))\n", (7354, 7426), False, 'import pytest\n'), ((8253, 8329), 'pytest.mark.parametrize', 'pyt...
# SPDX-FileCopyrightText: 2019 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT """Simple rainbow example for 30-pixel NeoPixel strip""" import digitalio import board from rainbowio import colorwheel import neopixel NUM_PIXELS = 30 # NeoPixel strip length (in pixels) enable = digitalio.DigitalInOut(b...
[ "neopixel.NeoPixel", "digitalio.DigitalInOut", "rainbowio.colorwheel" ]
[((296, 329), 'digitalio.DigitalInOut', 'digitalio.DigitalInOut', (['board.D10'], {}), '(board.D10)\n', (318, 329), False, 'import digitalio\n'), ((405, 458), 'neopixel.NeoPixel', 'neopixel.NeoPixel', (['board.D5', 'NUM_PIXELS'], {'brightness': '(1)'}), '(board.D5, NUM_PIXELS, brightness=1)\n', (422, 458), False, 'impo...
# Generated by Django 2.2.19 on 2021-12-11 20:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('posts', '0002_auto_20211211_1641'), ] operations = [ migrations.RenameField( model_name='group...
[ "django.db.models.ForeignKey", "django.db.migrations.RenameField" ]
[((267, 362), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""group"""', 'old_name': '"""descriptions"""', 'new_name': '"""description"""'}), "(model_name='group', old_name='descriptions',\n new_name='description')\n", (289, 362), False, 'from django.db import migrations, models...
# Generated by Django 3.2.3 on 2021-05-21 01:24 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', ...
[ "django.db.models.ManyToManyField" ]
[((358, 436), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'related_name': '"""followings"""', 'to': 'settings.AUTH_USER_MODEL'}), "(related_name='followings', to=settings.AUTH_USER_MODEL)\n", (380, 436), False, 'from django.db import migrations, models\n')]
from io import StringIO import locan.constants from locan.locan_io import load_thunderstorm_file from locan.locan_io.locdata.thunderstorm_io import load_thunderstorm_header def test_get_correct_column_names_from_Thunderstorm_header(): columns = load_thunderstorm_header( path=locan.ROOT_DIR / "tests/test_...
[ "locan.locan_io.load_thunderstorm_file", "io.StringIO", "locan.locan_io.locdata.thunderstorm_io.load_thunderstorm_header" ]
[((252, 350), 'locan.locan_io.locdata.thunderstorm_io.load_thunderstorm_header', 'load_thunderstorm_header', ([], {'path': "(locan.ROOT_DIR / 'tests/test_data/Thunderstorm_dstorm_data.csv')"}), "(path=locan.ROOT_DIR /\n 'tests/test_data/Thunderstorm_dstorm_data.csv')\n", (276, 350), False, 'from locan.locan_io.locda...
from collections import defaultdict import numpy as np from sklearn.model_selection import train_test_split class Samples: def __init__(self, x, y): self.x = x self.y = y class Data: def __init__(self, train, test, build_probs, name): self.train = train self.test = test ...
[ "collections.defaultdict", "sklearn.model_selection.train_test_split", "numpy.transpose" ]
[((764, 812), 'sklearn.model_selection.train_test_split', 'train_test_split', (['samples', 'labels'], {'test_size': '(0.2)'}), '(samples, labels, test_size=0.2)\n', (780, 812), False, 'from sklearn.model_selection import train_test_split\n'), ((7049, 7070), 'collections.defaultdict', 'defaultdict', (['np.array'], {}), ...
# Package import import docker # Local import import config from misc import common_helpers as common import monitoring.prometheus_targets as monitoring_targets docker_client = docker.from_env() cadvisor_name = '%s.cadvisor' % config.BASE_NAME def start(): '''Starts cadvisor container''' cadvisor = docker_c...
[ "docker.from_env", "monitoring.prometheus_targets.add", "monitoring.prometheus_targets.remove", "misc.common_helpers.getIpFromContainerAttachedNetwork" ]
[((179, 196), 'docker.from_env', 'docker.from_env', ([], {}), '()\n', (194, 196), False, 'import docker\n'), ((1012, 1099), 'misc.common_helpers.getIpFromContainerAttachedNetwork', 'common.getIpFromContainerAttachedNetwork', (['cadvisor', 'config.MONITORING_NETWORK_NAME'], {}), '(cadvisor, config.\n MONITORING_NETWO...
import torch import numpy as np def gaussian_pdf(x, mu, sigma): return (1 / (sigma * np.sqrt(2 * np.pi))) * torch.exp( (-1 / 2) * torch.square((x - mu) / (sigma)) ) def signed_gaussian_pdf(x, mu, sigma): return ( (1 / (sigma * np.sqrt(2 * np.pi))) * torch.exp((-1 / 2) * torch.squ...
[ "torch.sign", "torch.square", "doctest.testmod", "numpy.sqrt" ]
[((1674, 1691), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (1689, 1691), False, 'import doctest\n'), ((355, 373), 'torch.sign', 'torch.sign', (['(x - mu)'], {}), '(x - mu)\n', (365, 373), False, 'import torch\n'), ((1588, 1601), 'torch.sign', 'torch.sign', (['y'], {}), '(y)\n', (1598, 1601), False, 'import...
import platform from bson.py3compat import string_type from . import errors from .base import BaseObject, ClientOptions from .configure import MontyConfigure from .database import MontyDatabase class MontyClient(BaseObject): def __init__(self, repository=None, document_class=d...
[ "platform.system" ]
[((3108, 3125), 'platform.system', 'platform.system', ([], {}), '()\n', (3123, 3125), False, 'import platform\n')]
import os import sys base_file = os.path.splitext(__file__)[0] box_ids = [] with open(base_file + ".input", "r") as fo: for line in fo: box_ids.append(line.rstrip()) def count_char_occurrences(string): counts = dict() for c in string: if c in counts: counts[c] = counts[c] + 1 else: counts[c]...
[ "os.path.splitext", "sys.exit" ]
[((34, 60), 'os.path.splitext', 'os.path.splitext', (['__file__'], {}), '(__file__)\n', (50, 60), False, 'import os\n'), ((907, 917), 'sys.exit', 'sys.exit', ([], {}), '()\n', (915, 917), False, 'import sys\n')]
# Copyright (C) 2009, <NAME> # Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc. # # 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 2 # of the ...
[ "os.environ.get", "hookutils.find_django_root", "hookutils.django_dottedstring_imports", "os.pathsep.join" ]
[((960, 988), 'os.environ.get', 'os.environ.get', (['"""PYTHONPATH"""'], {}), "('PYTHONPATH')\n", (974, 988), False, 'import os\n'), ((1027, 1070), 'os.pathsep.join', 'os.pathsep.join', (['([python_path] + sys.pathex)'], {}), '([python_path] + sys.pathex)\n', (1042, 1070), False, 'import os\n'), ((1097, 1124), 'os.path...
from qgis.core import QgsPointXY, QgsRectangle, QgsRasterLayer import math import os def get_tile_name(x, y): """ Find which 5km National grid square contains the given point :param x: Easting :param y: Northing :return: tile_name: 5x5 km nation grid tile """ # Ensure grid boundaries are ...
[ "math.atan", "math.sqrt", "qgis.core.QgsRectangle", "math.floor", "os.path.isfile", "qgis.core.QgsRasterLayer", "qgis.core.QgsPointXY" ]
[((705, 727), 'math.floor', 'math.floor', (['(x / 100000)'], {}), '(x / 100000)\n', (715, 727), False, 'import math\n'), ((745, 767), 'math.floor', 'math.floor', (['(y / 100000)'], {}), '(y / 100000)\n', (755, 767), False, 'import math\n'), ((1008, 1029), 'math.floor', 'math.floor', (['(x / 10000)'], {}), '(x / 10000)\...
''' dritte Hausübung - Themen: Zahlenrate spiel random Zahl erstellen - user abfrage - sagen ob zahl goesser oder kleiner ist & versuche anzeigen- user gewinnt wenn er die Zahl errät Lucas 17.01.2022 ''' import random import getpass #greet user and taking upper limit print("╔═══════════════╗") print(" ZAHLENRATEN") pr...
[ "getpass.getuser", "random.randint" ]
[((761, 790), 'random.randint', 'random.randint', (['(1)', 'upperLimit'], {}), '(1, upperLimit)\n', (775, 790), False, 'import random\n'), ((482, 499), 'getpass.getuser', 'getpass.getuser', ([], {}), '()\n', (497, 499), False, 'import getpass\n')]
from django import forms from django.template.loader import get_template from crispy_forms.helper import FormHelper from crispy_forms.layout import Div def make_field_readonly(field): if type(field.widget) in [ forms.widgets.CheckboxSelectMultiple, forms.widgets.CheckboxInput, ]: fiel...
[ "crispy_forms.helper.FormHelper", "django.forms.DateInput", "django.template.loader.get_template" ]
[((1840, 1852), 'crispy_forms.helper.FormHelper', 'FormHelper', ([], {}), '()\n', (1850, 1852), False, 'from crispy_forms.helper import FormHelper\n'), ((1975, 2009), 'django.forms.DateInput', 'forms.DateInput', ([], {'format': '"""%d.%m.%Y"""'}), "(format='%d.%m.%Y')\n", (1990, 2009), False, 'from django import forms\...
import logging import warnings import numpy as np from pytplot import get_data, store_data, options # use nanmean from bottleneck if it's installed, otherwise use the numpy one # bottleneck nanmean is ~2.5x faster try: import bottleneck as bn nanmean = bn.nanmean except ImportError: nanmean = np.nanmean ...
[ "pytplot.store_data", "numpy.abs", "warnings.simplefilter", "logging.basicConfig", "pytplot.get_data", "logging.captureWarnings", "numpy.array", "warnings.catch_warnings", "pytplot.options" ]
[((320, 349), 'logging.captureWarnings', 'logging.captureWarnings', (['(True)'], {}), '(True)\n', (343, 349), False, 'import logging\n'), ((350, 458), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s: %(message)s"""', 'datefmt': '"""%d-%b-%y %H:%M:%S"""', 'level': 'logging.INFO'}), "(format...
# -*- coding: utf-8 -*- """Tests for character entities.""" # Part of Clockwork MUD Server (https://github.com/whutch/cwmud) # :copyright: (c) 2008 - 2017 <NAME> # :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt) from collections import deque import pytest from cwmud.core.attributes import Unse...
[ "cwmud.core.utils.joins", "pytest.fixture", "cwmud.core.world.Room", "pytest.raises", "cwmud.core.characters.Character.all", "cwmud.core.characters.Character", "collections.deque" ]
[((876, 906), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (890, 906), False, 'import pytest\n'), ((1186, 1216), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1200, 1216), False, 'import pytest\n'), ((1444, 1474), 'pytest.fixtur...
import logic.logic as rules from player.player import Player from player.cpu_player import CPUPlayer from copy import copy class GameState: def __init__(self): self.deck = [] self.table = [] self.players = {} self.lied_card = None self.cards_to_take = 0 self.turns_...
[ "logic.logic.check_if_packs_can_be_played", "logic.logic.convert_to_card", "logic.logic.take_cards_punishment", "player.player.Player", "logic.logic.deal_cards", "logic.logic.check_if_pack_on_hand", "logic.logic.nonactive_card_possible_plays", "copy.copy", "player.cpu_player.CPUPlayer", "logic.log...
[((879, 922), 'logic.logic.prepare_deck', 'rules.prepare_deck', ([], {'how_many': 'how_many_decks'}), '(how_many=how_many_decks)\n', (897, 922), True, 'import logic.logic as rules\n'), ((944, 969), 'logic.logic.deal_cards', 'rules.deal_cards', (['deck', '(1)'], {}), '(deck, 1)\n', (960, 969), True, 'import logic.logic ...
# https://www.acmicpc.net/problem/4343 from queue import PriorityQueue from math import sqrt def find(x): if parent[x] < 0: return x parent[x] = find(parent[x]) return parent[x] def merge(x, y): x = find(x) y = find(y) if x == y: return False if parent[x] > parent[y]: ...
[ "queue.PriorityQueue", "math.sqrt" ]
[((1018, 1033), 'queue.PriorityQueue', 'PriorityQueue', ([], {}), '()\n', (1031, 1033), False, 'from queue import PriorityQueue\n'), ((1392, 1437), 'math.sqrt', 'sqrt', (['((n1.x - n2.x) ** 2 + (n1.y - n2.y) ** 2)'], {}), '((n1.x - n2.x) ** 2 + (n1.y - n2.y) ** 2)\n', (1396, 1437), False, 'from math import sqrt\n')]
from orangecontrib.wanys.drivers.AbstractDriver import AbstractDriver from orangecontrib.wanys.drivers.shadow.ShadowDriverData import ShadowDriverData from orangecontrib.wanys.drivers.shadow.ShadowAdapter import ShadowAdapter from orangecontrib.wanys.drivers.DriverSettingAttribute import DriverSettingAttribute from ora...
[ "orangecontrib.wanys.drivers.shadow.ShadowAdapter.ShadowAdapter", "Shadow.Beam", "orangecontrib.wanys.drivers.shadow.ShadowDriverData.ShadowDriverData", "orangecontrib.wanys.drivers.DriverSettingAttribute.DriverSettingAttribute", "orangecontrib.wanys.drivers.DriverSettings.DriverSettings" ]
[((749, 767), 'orangecontrib.wanys.drivers.shadow.ShadowDriverData.ShadowDriverData', 'ShadowDriverData', ([], {}), '()\n', (765, 767), False, 'from orangecontrib.wanys.drivers.shadow.ShadowDriverData import ShadowDriverData\n'), ((951, 966), 'orangecontrib.wanys.drivers.shadow.ShadowAdapter.ShadowAdapter', 'ShadowAdap...
from model.contact_m import Contact from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.ui import Select import re class ContactHelper: def __init__(self, app): self.app = app def home_page(self): wd = self.app.wd wd.find_element_by_link_text("home...
[ "model.contact_m.Contact", "re.search", "selenium.webdriver.support.ui.WebDriverWait" ]
[((3235, 3255), 'selenium.webdriver.support.ui.WebDriverWait', 'WebDriverWait', (['wd', '(5)'], {}), '(wd, 5)\n', (3248, 3255), False, 'from selenium.webdriver.support.ui import WebDriverWait\n'), ((3561, 3581), 'selenium.webdriver.support.ui.WebDriverWait', 'WebDriverWait', (['wd', '(5)'], {}), '(wd, 5)\n', (3574, 358...
import tensorflow as tf import shutil from pathlib import Path import pandas as pd def model(): return tf.keras.applications.MobileNetV2(input_shape=(256, 256, 3), classes=10, weights=None) def data(csv_path="main_dataset.csv", out_path=Path("out")): print(tf.__version__) if not out_path.exists(): ...
[ "tensorflow.keras.preprocessing.image_dataset_from_directory", "tensorflow.one_hot", "pandas.read_csv", "pathlib.Path", "pandas.Categorical", "tensorflow.keras.applications.MobileNetV2", "shutil.copy" ]
[((109, 199), 'tensorflow.keras.applications.MobileNetV2', 'tf.keras.applications.MobileNetV2', ([], {'input_shape': '(256, 256, 3)', 'classes': '(10)', 'weights': 'None'}), '(input_shape=(256, 256, 3), classes=10,\n weights=None)\n', (142, 199), True, 'import tensorflow as tf\n'), ((245, 256), 'pathlib.Path', 'Path...
from django.conf.urls import url from . import views urlpatterns = [ url(r'post/new/$', views.post_new, name='post_new'), url(r'^$', views.post_list, name='post_list'), url(r'^user/dashboard/$', views.dashboard, name='dashboard'), url(r'^user/dashboard/myposts/$', views.dash_post_list, name='dash_post_...
[ "django.conf.urls.url" ]
[((74, 124), 'django.conf.urls.url', 'url', (['"""post/new/$"""', 'views.post_new'], {'name': '"""post_new"""'}), "('post/new/$', views.post_new, name='post_new')\n", (77, 124), False, 'from django.conf.urls import url\n'), ((131, 175), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.post_list'], {'name': '"""post_...
""" Masked Grid for Two Sides of a Fault ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In this example, I demonstrate how to use a surface mesh of a fault in the subsurface to create a data mask on a modeling grid. This is a particularly useful exercise for scenarios where you may want to perform some sort of modeling in a dif...
[ "numpy.sum", "pyvista.examples.downloads._download_file", "pyvista.read", "numpy.zeros", "pyvista.Plotter", "numpy.arange", "numpy.argwhere", "pyvista.UniformGrid", "numpy.repeat" ]
[((656, 713), 'pyvista.examples.downloads._download_file', 'examples.downloads._download_file', (['"""opal_mound_fault.vtk"""'], {}), "('opal_mound_fault.vtk')\n", (689, 713), False, 'from pyvista import examples\n'), ((722, 735), 'pyvista.read', 'pv.read', (['path'], {}), '(path)\n', (729, 735), True, 'import pyvista ...
#! /usr/bin/env python # # # Tool: dumps a candidate waveform to a frame file. # Default GPS time used is boring # Tries to be as close to C as possible -- no interface via pylal/glue # # EXAMPLE # python util_NRWriteFrame.py --group 'Sequence-SXS-All' --param 1 --verbose # python util_NRWriteFrame.py --incl 1.5 ...
[ "argparse.ArgumentParser", "numpy.argmax", "matplotlib.pyplot.figure", "glue.ligolw.table.get_table", "numpy.arange", "matplotlib.get_backend", "RIFT.lalsimutils.hoft_to_frame_data", "RIFT.lalsimutils.frame_data_to_hoft", "numpy.max", "matplotlib.pyplot.show", "RIFT.lalsimutils.ChooseWaveformPar...
[((787, 812), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (810, 812), False, 'import argparse\n'), ((2921, 2955), 'RIFT.lalsimutils.ChooseWaveformParams', 'lalsimutils.ChooseWaveformParams', ([], {}), '()\n', (2953, 2955), True, 'import RIFT.lalsimutils as lalsimutils\n'), ((4288, 4332), 'RI...
from flask_wtf import FlaskForm from app import db from wtforms_alchemy import model_form_factory BaseModelForm = model_form_factory(FlaskForm) # https://wtforms.readthedocs.io/en/stable/fields.html # https://wtforms-alchemy.readthedocs.io/en/latest/introduction.html#differences-with-wtforms-ext-sqlalchemy-model-f...
[ "wtforms_alchemy.model_form_factory" ]
[((117, 146), 'wtforms_alchemy.model_form_factory', 'model_form_factory', (['FlaskForm'], {}), '(FlaskForm)\n', (135, 146), False, 'from wtforms_alchemy import model_form_factory\n')]
import pyspark from pyspark.sql import SparkSession spark = SparkSession.builder.appName('abc').getOrCreate() from pyspark.ml.evaluation import MulticlassClassificationEvaluator from pyspark.ml.classification import LogisticRegression import sklearn import pandas as pd import numpy as np from pyspark.ml.linalg import ...
[ "sklearn.datasets.load_digits", "pyspark.ml.linalg.VectorUDT", "pyspark.ml.classification.LogisticRegression", "pyspark.sql.types.IntegerType", "pyspark.ml.linalg.DenseVector", "sklearn.linear_model.LogisticRegression", "pyspark.sql.SparkSession.builder.appName", "pyspark.ml.evaluation.MulticlassClass...
[((496, 509), 'sklearn.datasets.load_digits', 'load_digits', ([], {}), '()\n', (507, 509), False, 'from sklearn.datasets import load_digits\n'), ((1155, 1173), 'pyspark.sql.types.StructType', 'StructType', (['fields'], {}), '(fields)\n', (1165, 1173), False, 'from pyspark.sql.types import StructType, StructField, Strin...
""" Toxopy (https://github.com/bchaselab/Toxopy) © <NAME>, University of Nebraska at Omaha Licensed under the terms of the MIT license """ import os from scipy.stats import mannwhitneyu import pandas as pd from toxopy import trials, nadlc, roi_behaviors, fwarnings from itertools import combinations def alphaTest(p):...
[ "os.remove", "toxopy.nadlc", "toxopy.trials", "os.getcwd", "pandas.read_csv", "toxopy.roi_behaviors", "scipy.stats.mannwhitneyu", "itertools.combinations" ]
[((809, 816), 'toxopy.nadlc', 'nadlc', ([], {}), '()\n', (814, 816), False, 'from toxopy import trials, nadlc, roi_behaviors, fwarnings\n'), ((818, 826), 'toxopy.trials', 'trials', ([], {}), '()\n', (824, 826), False, 'from toxopy import trials, nadlc, roi_behaviors, fwarnings\n'), ((828, 843), 'toxopy.roi_behaviors', ...
# -*- coding: utf-8 -*- from gerritaction.gerrit.gerrit import Gerrit, GerritException def test_exception(): exception = GerritException("exception") assert str(exception) == "exception" def test_gerrit(): config = { "gerrit": { "host": "http://127.0.0.1", "port": "8080"...
[ "gerritaction.gerrit.gerrit.GerritException", "gerritaction.gerrit.gerrit.Gerrit" ]
[((128, 156), 'gerritaction.gerrit.gerrit.GerritException', 'GerritException', (['"""exception"""'], {}), "('exception')\n", (143, 156), False, 'from gerritaction.gerrit.gerrit import Gerrit, GerritException\n'), ((470, 484), 'gerritaction.gerrit.gerrit.Gerrit', 'Gerrit', (['config'], {}), '(config)\n', (476, 484), Fal...
from django.db import models # Navbar class About(models.Model): title = models.CharField(max_length=200) link = models.CharField(max_length=2000, default="#") is_active = models.BooleanField(default=True) def __str__(self): return self.title class AcademicAffairs(models.Model): title = models.CharField(max_l...
[ "django.db.models.CharField", "django.db.models.DateField", "django.db.models.BooleanField" ]
[((75, 107), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n', (91, 107), False, 'from django.db import models\n'), ((116, 162), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(2000)', 'default': '"""#"""'}), "(max_length=2000, default='#')\n"...
# Copyright 2019 kubeflow.org. # # 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,...
[ "logging.info", "numpy.array", "logging.basicConfig" ]
[((977, 1019), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'SELDON_LOGLEVEL'}), '(level=SELDON_LOGLEVEL)\n', (996, 1019), False, 'import logging\n'), ((1404, 1420), 'numpy.array', 'np.array', (['inputs'], {}), '(inputs)\n', (1412, 1420), True, 'import numpy as np\n'), ((1429, 1495), 'logging.info', 'lo...
from flask import Flask,send_file,render_template app = Flask(__name__) @app.route("/HiVecMap") def returnHtml(): return render_template("HiVecMap.html") if __name__ == '__main__': app.run(host='localhost', port='8888', debug=True)
[ "flask.Flask", "flask.render_template" ]
[((58, 73), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (63, 73), False, 'from flask import Flask, send_file, render_template\n'), ((128, 160), 'flask.render_template', 'render_template', (['"""HiVecMap.html"""'], {}), "('HiVecMap.html')\n", (143, 160), False, 'from flask import Flask, send_file, render...
from random import randint PROGRAM_COUNTER_START: int = 0x200 REGISTERS_NUM: int = 16 STACK_POINTER_START: int = 0x0 BUFFER_WIDTH: int = 64 BUFFER_HEIGHT: int = 32 PROGRAM_COUNTER_STEP: int = 2 class Processor: def __init__(self, memory): self.memory_controller = memory self.memory = memory.ram...
[ "random.randint" ]
[((8415, 8430), 'random.randint', 'randint', (['(0)', '(255)'], {}), '(0, 255)\n', (8422, 8430), False, 'from random import randint\n')]