code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Unit tests related to 'Shipments' (https://www.easypost.com/docs/api#shipments). import time import easypost import pytest @pytest.mark.vcr() def test_shipment_creation(): # We create a shipment and assert on values saved. # create a to address and a from address to_address = easypost.Address.create(...
[ "easypost.Parcel.create", "easypost.CustomsInfo.create", "easypost.requests_session.close", "time.sleep", "easypost.CustomsItem.create", "pytest.mark.vcr", "easypost.Address.create", "easypost.Shipment.create" ]
[((130, 147), 'pytest.mark.vcr', 'pytest.mark.vcr', ([], {}), '()\n', (145, 147), False, 'import pytest\n'), ((3025, 3042), 'pytest.mark.vcr', 'pytest.mark.vcr', ([], {}), '()\n', (3040, 3042), False, 'import pytest\n'), ((296, 466), 'easypost.Address.create', 'easypost.Address.create', ([], {'name': '"""<NAME>"""', 's...
# Generated by Django 3.2.7 on 2021-09-20 23:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pathways', '0002_auto_20210920_1834'), ] operations = [ migrations.AddField( model_name='major', name='common_course...
[ "django.db.models.JSONField" ]
[((346, 373), 'django.db.models.JSONField', 'models.JSONField', ([], {'null': '(True)'}), '(null=True)\n', (362, 373), False, 'from django.db import migrations, models\n')]
"""empty message Revision ID: d0f197979bd9 Revises: 84dec6c29c48 Create Date: 2020-11-07 12:47:44.131900 """ import sqlalchemy_utils from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '84dec6c29c48' branch_labels = None depends_on = None def ...
[ "sqlalchemy.String", "alembic.op.drop_column" ]
[((617, 661), 'alembic.op.drop_column', 'op.drop_column', (['"""mailbox"""', '"""generic_subject"""'], {}), "('mailbox', 'generic_subject')\n", (631, 661), False, 'from alembic import op\n'), ((455, 475), 'sqlalchemy.String', 'sa.String', ([], {'length': '(78)'}), '(length=78)\n', (464, 475), True, 'import sqlalchemy a...
import json import sys import csv import argparse import time import subprocess import pingparsing # defined in parameters.py from parameters import ( filters, number_rules, iterations, iface, bandwidth, seed, ipnets, ping_interval, ping_count, ) from k8s import benchmark_pod_tmp...
[ "json.loads", "string.Template", "argparse.ArgumentParser", "subprocess.run", "csv.writer", "time.sleep", "pingparsing.PingParsing" ]
[((361, 411), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Test egress performance"""'], {}), "('Test egress performance')\n", (384, 411), False, 'import argparse\n'), ((694, 773), 'subprocess.run', 'subprocess.run', (['cmd'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE', 'shell': '(True)'})...
#Written by <NAME> import numpy as np import lc3asm #2^16 16bit memory address's memory = np.uint16([0]*0xFFFF) #registers reg = np.uint16([0]*8) pc = np.int16(0x0200) psr = 0xFFFC halt = True #special memory ptrs kbsr_ptr = 0xFE00 kbdr_ptr = 0xFE02 dsr_ptr = 0xFE04 ddr_ptr = 0xFE06 mcr_ptr = 0xFF...
[ "lc3asm.loadFile", "numpy.int16", "lc3asm.asm", "numpy.uint16", "lc3asm.out.items" ]
[((101, 123), 'numpy.uint16', 'np.uint16', (['([0] * 65535)'], {}), '([0] * 65535)\n', (110, 123), True, 'import numpy as np\n'), ((142, 160), 'numpy.uint16', 'np.uint16', (['([0] * 8)'], {}), '([0] * 8)\n', (151, 160), True, 'import numpy as np\n'), ((165, 178), 'numpy.int16', 'np.int16', (['(512)'], {}), '(512)\n', (...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Power by <NAME> 2019-01-10 22:41:49 import os import pickle import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as uData from networks import VDN from datasets import DenoisingDatasets from loss import los...
[ "utils.batch_PSNR", "torch.optim.lr_scheduler.MultiStepLR", "torch.nn.utils.clip_grad_norm_", "datasets.DenoisingDatasets.BenchmarkTest", "torch.exp", "sys.exit", "torchvision.utils.make_grid", "datasets.DenoisingDatasets.BenchmarkTrain", "tensorboardX.SummaryWriter", "torch.set_grad_enabled", "...
[((563, 613), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'Warning'], {'lineno': '(0)'}), "('ignore', Warning, lineno=0)\n", (584, 613), False, 'import warnings\n'), ((622, 632), 'options.set_opts', 'set_opts', ([], {}), '()\n', (630, 632), False, 'from options import set_opts\n'), ((1812, 1839)...
# -*- coding: utf-8 -*- import pytest from girder.exceptions import AccessException from girder.models.setting import Setting from girder.models.user import User from girder.settings import SettingKey from pytest_girder.assertions import assertStatus, assertStatusOk def testInitializeOtp(user): # The logic for t...
[ "girder.utility._cache.rateLimitBuffer.invalidate", "pytest_girder.assertions.assertStatusOk", "passlib.totp.TOTP.from_uri", "pytest_girder.assertions.assertStatus", "girder.models.setting.Setting", "pytest.raises", "girder.models.user.User" ]
[((1358, 1380), 'passlib.totp.TOTP.from_uri', 'TOTP.from_uri', (['totpUri'], {}), '(totpUri)\n', (1371, 1380), False, 'from passlib.totp import TOTP\n'), ((3842, 3865), 'pytest_girder.assertions.assertStatus', 'assertStatus', (['resp', '(400)'], {}), '(resp, 400)\n', (3854, 3865), False, 'from pytest_girder.assertions ...
'''Entry point and command line parsing for ig.''' from __future__ import print_function import argparse import logging import os import sys from ig import colors, graph, serve, walk def setup_logging(): '''Sets up the root logger.''' handler = logging.StreamHandler(sys.stderr) formatter = logging.Form...
[ "logging.getLogger", "ig.walk.walk", "logging.StreamHandler", "argparse.ArgumentParser", "logging.Formatter", "ig.serve.Server", "os.getcwd", "sys.exit", "ig.graph.Graph" ]
[((258, 291), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stderr'], {}), '(sys.stderr)\n', (279, 291), False, 'import logging\n'), ((308, 356), 'logging.Formatter', 'logging.Formatter', (['"""[%(levelname)s] %(message)s"""'], {}), "('[%(levelname)s] %(message)s')\n", (325, 356), False, 'import logging\n'),...
from math import floor from roofeus.utils import sub_vectors, add_vectors, mul_vector_by_scalar, has_intersection, calc_intersection, Polygon from roofeus.utils import calc_vector_lineal_combination_params, calculate_vertex_groups from roofeus.utils import size_vector, get_polygon_subtriangle_for_index from roofeus.mod...
[ "roofeus.utils.Polygon", "roofeus.utils.calc_intersection", "roofeus.utils.sub_vectors", "roofeus.utils.get_polygon_subtriangle_for_index", "roofeus.utils.calculate_vertex_groups", "roofeus.models.RFVertexData", "roofeus.utils.add_vectors", "roofeus.models.RFProjected2dVertex", "roofeus.utils.has_in...
[((1437, 1468), 'roofeus.utils.calculate_vertex_groups', 'calculate_vertex_groups', (['target'], {}), '(target)\n', (1460, 1468), False, 'from roofeus.utils import calc_vector_lineal_combination_params, calculate_vertex_groups\n'), ((2083, 2111), 'roofeus.utils.sub_vectors', 'sub_vectors', (['g[1].uvs', 'o.uvs'], {}), ...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ "logging.getLogger", "logging.StreamHandler", "threading.current_thread", "logging.Formatter", "collections.defaultdict" ]
[((1234, 1264), 'collections.defaultdict', '_collections.defaultdict', (['list'], {}), '(list)\n', (1258, 1264), True, 'import collections as _collections\n'), ((1279, 1366), 'logging.Formatter', '_logging.Formatter', (['"""%(threadName)-6.6s %(asctime)s %(levelname)-4.4s %(message)s"""'], {}), "(\n '%(threadName)-6...
## @file # Trim files preprocessed by compiler # # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import os import sys import time import logging import struct import datetime import argparse import platform from ...
[ "logging.getLogger", "os.path.exists", "collections.OrderedDict", "logging.StreamHandler", "os.path.isabs", "argparse.ArgumentParser", "datetime.datetime.utcnow", "logging.Formatter", "struct.pack", "os.path.normpath", "platform.system", "sys.exit" ]
[((1329, 1360), 'logging.getLogger', 'logging.getLogger', (['"""tool_error"""'], {}), "('tool_error')\n", (1346, 1360), False, 'import logging\n'), ((1380, 1412), 'logging.Formatter', 'logging.Formatter', (['"""%(message)s"""'], {}), "('%(message)s')\n", (1397, 1412), False, 'import logging\n'), ((1878, 1911), 'logging...
from django.http import HttpResponse def set_cookies(request): resp = HttpResponse('set cookies successfully') resp.set_cookie('uname', 'giaoid673248932', 60) return resp def get_cookies(request): uname = request.COOKIES.get('uname', 'default value') result = f'uname is {uname}' return HttpR...
[ "django.http.HttpResponse" ]
[((76, 116), 'django.http.HttpResponse', 'HttpResponse', (['"""set cookies successfully"""'], {}), "('set cookies successfully')\n", (88, 116), False, 'from django.http import HttpResponse\n'), ((315, 335), 'django.http.HttpResponse', 'HttpResponse', (['result'], {}), '(result)\n', (327, 335), False, 'from django.http ...
from selenium import webdriver import time from selenium.webdriver.common.by import By from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver import ActionChains import pyautogui driver = webdriver.Chrome(ChromeDriverManager().install()) driver.get('https://formy-project.herokuapp.com/fileup...
[ "webdriver_manager.chrome.ChromeDriverManager", "pyautogui.write", "pyautogui.press", "time.sleep" ]
[((419, 509), 'pyautogui.write', 'pyautogui.write', (['"""C:\\\\Users\\\\Moldoveanu\\\\Desktop\\\\New Text Document.txt"""'], {'interval': '(0.1)'}), "('C:\\\\Users\\\\Moldoveanu\\\\Desktop\\\\New Text Document.txt',\n interval=0.1)\n", (434, 509), False, 'import pyautogui\n'), ((506, 531), 'pyautogui.press', 'pyaut...
# path should be a .json file produced by https://github.com/Tyrrrz/DiscordChatExporter # deadnames should be a dictionary of strings to replace, going from the string to replace to the string you want from secret import path, deadnames import json with open(path) as f: content = json.load(f) message_lengths = ...
[ "json.load", "secret.deadnames.keys" ]
[((288, 300), 'json.load', 'json.load', (['f'], {}), '(f)\n', (297, 300), False, 'import json\n'), ((547, 563), 'secret.deadnames.keys', 'deadnames.keys', ([], {}), '()\n', (561, 563), False, 'from secret import path, deadnames\n')]
# Copyright (c) 2012, 2013, 2014 <NAME> <<EMAIL>> # Copyright 2020 The Matrix.org Foundation C.I.C. # # 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/LICE...
[ "os.dup2", "signal.signal", "atexit.register", "os.close", "fcntl.flock", "os.open", "os.path.isfile", "os.chdir", "os.umask", "os._exit", "os.getpid", "sys.exit", "os.fork", "os.setsid", "os.remove" ]
[((1150, 1174), 'os.path.isfile', 'os.path.isfile', (['pid_file'], {}), '(pid_file)\n', (1164, 1174), False, 'import os\n'), ((2139, 2148), 'os.fork', 'os.fork', ([], {}), '()\n', (2146, 2148), False, 'import os\n'), ((2909, 2920), 'os.setsid', 'os.setsid', ([], {}), '()\n', (2918, 2920), False, 'import os\n'), ((3191,...
import pymongo import os import sys from config import Config class useMongo(): def __init__(self): self.client = pymongo.MongoClient(Config.config()["mongoConnect"]) self.db = self.client['bfxtest'] def mongofindone(self, token={}, collectionName="account"): collection = self...
[ "config.Config.config" ]
[((148, 163), 'config.Config.config', 'Config.config', ([], {}), '()\n', (161, 163), False, 'from config import Config\n')]
import pickle import pandas as pd import numpy as np import xgboost as xgb from sklearn.feature_extraction import DictVectorizer from sklearn.model_selection import train_test_split output_file = 'model.bin' print('Reading data') df_raw = pd.read_csv('survey.csv') print('Wrangling Data') string_columns = df...
[ "pickle.dump", "xgboost.train", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.feature_extraction.DictVectorizer", "numpy.log1p" ]
[((250, 275), 'pandas.read_csv', 'pd.read_csv', (['"""survey.csv"""'], {}), "('survey.csv')\n", (261, 275), True, 'import pandas as pd\n'), ((3187, 3247), 'sklearn.model_selection.train_test_split', 'train_test_split', (['df'], {'test_size': 'prop_test', 'random_state': 'seed'}), '(df, test_size=prop_test, random_state...
import threading import time SLEEP = 4 TICK = 0.1 class ThreadTaskA(threading.Thread): name = 'Task A' counter = 0 def __init__(self, event): super(ThreadTaskA, self).__init__() self.event = event def run(self): print('thread {} started'.format(self.name)) while not ...
[ "time.sleep" ]
[((353, 369), 'time.sleep', 'time.sleep', (['TICK'], {}), '(TICK)\n', (363, 369), False, 'import time\n')]
# # Benchmark a "1+1+1D DFN" potential pair pouch cell model in PyBaMM # import pybamm from benchmark import benchmark # file to save times to filename = "potential_pair.pkl" # number of finite volumes in current colector domain (must be 1 or >2) npts = [1, 3, 4, 8, 16, 32, 64, 128, 256, 512] # number of repeated s...
[ "benchmark.benchmark", "pybamm.lithium_ion.DFN" ]
[((378, 448), 'pybamm.lithium_ion.DFN', 'pybamm.lithium_ion.DFN', ([], {'options': "{'thermal': 'lumped'}", 'name': '"""1+1D DFN"""'}), "(options={'thermal': 'lumped'}, name='1+1D DFN')\n", (400, 448), False, 'import pybamm\n'), ((508, 646), 'pybamm.lithium_ion.DFN', 'pybamm.lithium_ion.DFN', ([], {'options': "{'curren...
from django import forms from django.contrib import admin from django.contrib.sites.admin import SiteAdmin from django.contrib.sites.models import Site from django.db.models import JSONField from django.forms.widgets import Textarea from django.utils.translation import gettext_lazy as _ from parler.admin import Transla...
[ "django.contrib.admin.register", "django.utils.translation.gettext_lazy" ]
[((2298, 2318), 'django.contrib.admin.register', 'admin.register', (['User'], {}), '(User)\n', (2312, 2318), False, 'from django.contrib import admin\n'), ((2479, 2502), 'django.contrib.admin.register', 'admin.register', (['Project'], {}), '(Project)\n', (2493, 2502), False, 'from django.contrib import admin\n'), ((262...
import os from unittest import TestCase # most of the features of this script are already tested indirectly when # running vensim and xmile integration tests _root = os.path.dirname(__file__) class TestErrors(TestCase): def test_canonical_file_not_found(self): from pysd.tools.benchmarking import runner...
[ "warnings.catch_warnings", "os.path.join", "os.path.dirname", "pandas.DataFrame", "pysd.tools.benchmarking.assert_frames_close" ]
[((168, 193), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (183, 193), False, 'import os\n'), ((6339, 6392), 'pandas.DataFrame', 'pd.DataFrame', (["{'a': [1, 2], 'b': [3, 4], 'd': [6, 7]}"], {}), "({'a': [1, 2], 'b': [3, 4], 'd': [6, 7]})\n", (6351, 6392), True, 'import pandas as pd\n'), ((...
#from dataset import VoiceDataset, FaceDataset from network import VoiceEmbedNet, Generator from utils import get_collate_fn import os SAVE_DIR = 'pretrained_models/' NUM_EPOCH = 49999 if not os.path.exists(SAVE_DIR): os.makedirs(SAVE_DIR) NETWORKS_PARAMETERS = { 'SAVE_DIR': SAVE_DIR, # VOICE EMBED...
[ "os.path.exists", "os.makedirs" ]
[((194, 218), 'os.path.exists', 'os.path.exists', (['SAVE_DIR'], {}), '(SAVE_DIR)\n', (208, 218), False, 'import os\n'), ((224, 245), 'os.makedirs', 'os.makedirs', (['SAVE_DIR'], {}), '(SAVE_DIR)\n', (235, 245), False, 'import os\n')]
from squall.router import RootRouter, Router def test_sub_router(): v1_router = Router(prefix="/v1") user_router = Router(prefix="/user") user_router.add_api_route( "/some/prefix(?P<some>[^/]+)/item/(?P<item>[^/]+)/(?P<more>[^/]+)-suffix", methods=["GET", "POST"], endpoint=lambda *...
[ "squall.router.RootRouter", "squall.router.Router" ]
[((86, 106), 'squall.router.Router', 'Router', ([], {'prefix': '"""/v1"""'}), "(prefix='/v1')\n", (92, 106), False, 'from squall.router import RootRouter, Router\n'), ((125, 147), 'squall.router.Router', 'Router', ([], {'prefix': '"""/user"""'}), "(prefix='/user')\n", (131, 147), False, 'from squall.router import RootR...
""" Functions and objects for working with LC-MS data Objects ------- Chromatogram MSSpectrum Roi """ import numpy as np import pandas as pd import pyopenms from scipy.interpolate import interp1d from typing import Optional, Iterable, Tuple, Union, List, Callable from . import peaks from . import validation import b...
[ "numpy.hstack", "scipy.interpolate.interp1d", "numpy.argsort", "numpy.array", "numpy.nanmean", "pyopenms.OnDiscMSExperiment", "numpy.arange", "pyopenms.MzMLFile", "pyopenms.MSExperiment", "numpy.searchsorted", "numpy.where", "numpy.diff", "numpy.linspace", "numpy.vstack", "pandas.DataFra...
[((23814, 23857), 'collections.namedtuple', 'namedtuple', (['"""TempRoi"""', "['mz', 'sp', 'scan']"], {}), "('TempRoi', ['mz', 'sp', 'scan'])\n", (23824, 23857), False, 'from collections import namedtuple\n'), ((3203, 3235), 'numpy.zeros', 'np.zeros', (['(mz.size, end - start)'], {}), '((mz.size, end - start))\n', (321...
# Generated by Django 3.0.4 on 2020-08-30 10:31 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('analyzer', '0003_auto_20200830_1327'), ] operations = [ migrations.RemoveField( model_name='uploadimage', name='post', ...
[ "django.db.migrations.RemoveField" ]
[((228, 289), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""uploadimage"""', 'name': '"""post"""'}), "(model_name='uploadimage', name='post')\n", (250, 289), False, 'from django.db import migrations\n')]
# -*- coding: utf-8 -*- import copy import json import logging import weakref from collections import namedtuple import jsonschema from gevent.queue import Full from ws4py.websocket import WebSocket as _WebSocket from h import storage from h.streamer.filter import FILTER_SCHEMA, SocketFilter log = logging.getLogger...
[ "logging.getLogger", "json.loads", "collections.namedtuple", "weakref.WeakSet", "json.dumps", "jsonschema.validate", "copy.deepcopy", "h.streamer.filter.SocketFilter.set_filter", "h.storage.expand_uri" ]
[((303, 330), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (320, 330), False, 'import logging\n'), ((505, 549), 'collections.namedtuple', 'namedtuple', (['"""Message"""', "['socket', 'payload']"], {}), "('Message', ['socket', 'payload'])\n", (515, 549), False, 'from collections import n...
#!/usr/bin/env python3 import matplotlib.pyplot as plt import numpy as np gmm = __import__('11-gmm').gmm if __name__ == '__main__': np.random.seed(11) a = np.random.multivariate_normal([30, 40], [[75, 5], [5, 75]], size=10000) b = np.random.multivariate_normal([5, 25], [[16, 10], [10, 16]], size=750) c...
[ "matplotlib.pyplot.show", "numpy.random.multivariate_normal", "numpy.random.seed", "matplotlib.pyplot.scatter", "numpy.concatenate", "numpy.random.shuffle" ]
[((137, 155), 'numpy.random.seed', 'np.random.seed', (['(11)'], {}), '(11)\n', (151, 155), True, 'import numpy as np\n'), ((164, 235), 'numpy.random.multivariate_normal', 'np.random.multivariate_normal', (['[30, 40]', '[[75, 5], [5, 75]]'], {'size': '(10000)'}), '([30, 40], [[75, 5], [5, 75]], size=10000)\n', (193, 235...
""" Splits the given Manga Volume CBZ into the CBZs of the individual chapters """ import re import shutil import zipfile from collections import defaultdict from operator import attrgetter from pathlib import Path root = Path("/path/to/volumes/") output = root / "chapters" CHAP_PAT = re.compile(r"c(?P<num>\d{3})") ...
[ "operator.attrgetter", "zipfile.ZipFile", "re.compile", "pathlib.Path", "collections.defaultdict", "shutil.rmtree" ]
[((225, 250), 'pathlib.Path', 'Path', (['"""/path/to/volumes/"""'], {}), "('/path/to/volumes/')\n", (229, 250), False, 'from pathlib import Path\n'), ((289, 319), 're.compile', 're.compile', (['"""c(?P<num>\\\\d{3})"""'], {}), "('c(?P<num>\\\\d{3})')\n", (299, 319), False, 'import re\n'), ((417, 434), 'collections.defa...
# Generated by Django 2.0.6 on 2018-06-13 15:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Attendance', fields=[ ...
[ "django.db.models.DateField", "django.db.models.TextField", "django.db.models.TimeField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.CharField" ]
[((2139, 2226), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""meetup.Meetup"""'}), "(on_delete=django.db.models.deletion.CASCADE, to=\n 'meetup.Meetup')\n", (2156, 2226), False, 'from django.db import migrations, models\n'), ((2347, 2436), 'djan...
# coding: utf-8 # std lib import json from logging import getLogger import shlex from subprocess import Popen, PIPE # django from django.conf import settings # create logger logger = getLogger("joplin_web.command") """ Joplin wrapper for joplin terminal command # run # 1) joplin use notebook to point on ...
[ "logging.getLogger", "subprocess.Popen", "json.loads", "shlex.split" ]
[((185, 216), 'logging.getLogger', 'getLogger', (['"""joplin_web.command"""'], {}), "('joplin_web.command')\n", (194, 216), False, 'from logging import getLogger\n'), ((1564, 1580), 'shlex.split', 'shlex.split', (['cmd'], {}), '(cmd)\n', (1575, 1580), False, 'import shlex\n'), ((1596, 1633), 'subprocess.Popen', 'Popen'...
import argparse import copy import math import numpy as np import pygame from pygame.locals import * from timeit import default_timer as timer import traceback import os from minos.lib import common from minos.config.sim_args import parse_sim_args from minos.lib.Simulator import Simulator from minos.lib.util.ActionTrac...
[ "minos.lib.util.VideoWriter.VideoWriter", "pygame.init", "pygame.quit", "math.sqrt", "time.sleep", "math.cos", "copy.copy", "argparse.ArgumentParser", "pygame.display.set_mode", "pygame.display.flip", "pygame.draw.rect", "minos.lib.util.StateSet.StateSet", "minos.lib.common.attach_exit_handl...
[((2154, 2204), 'pygame.draw.rect', 'pygame.draw.rect', (['display_surf', '(0, 0, 0)', 'area', '(0)'], {}), '(display_surf, (0, 0, 0), area, 0)\n', (2170, 2204), False, 'import pygame\n'), ((2785, 2829), 'math.sqrt', 'math.sqrt', (['(dir[0] * dir[0] + dir[1] * dir[1])'], {}), '(dir[0] * dir[0] + dir[1] * dir[1])\n', (2...
# -*- coding: utf-8 -*- import gym from gym import error, envs from gym.envs import registration from gym.envs.classic_control import cartpole from gym.envs.registration import EnvSpec, EnvSpecTree class ArgumentEnv(gym.Env): def __init__(self, arg1, arg2, arg3): self.arg1 = arg1 self.arg2 = arg2 ...
[ "gym.envs.make", "gym.register", "gym.envs.spec", "gym.envs.registration.EnvSpecTree", "gym.envs.registration.EnvSpec", "gym.envs.registration.EnvRegistry", "gym.make" ]
[((347, 491), 'gym.register', 'gym.register', ([], {'id': '"""test.ArgumentEnv-v0"""', 'entry_point': '"""tests.envs.test_registration:ArgumentEnv"""', 'kwargs': "{'arg1': 'arg1', 'arg2': 'arg2'}"}), "(id='test.ArgumentEnv-v0', entry_point=\n 'tests.envs.test_registration:ArgumentEnv', kwargs={'arg1': 'arg1',\n '...
from abc import abstractmethod, abstractproperty import os from pathlib import Path import collections.abc import logging import pkg_resources import uuid from urllib.parse import urlparse from typing import Set, List import threading import numpy as np from frozendict import frozendict import pyarrow as pa import v...
[ "logging.getLogger", "vaex.encoding.set_object", "frozendict.frozendict", "vaex.encoding.register", "numpy.asanyarray", "numpy.array", "vaex.file.fingerprint", "numpy.ma.isMaskedArray", "vaex.encoding.set_object_spec", "vaex.encoding.get_object_spec", "vaex.array_types.to_numpy", "pathlib.Path...
[((553, 586), 'logging.getLogger', 'logging.getLogger', (['"""vaex.dataset"""'], {}), "('vaex.dataset')\n", (570, 586), False, 'import logging\n'), ((746, 762), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (760, 762), False, 'import threading\n'), ((905, 933), 'vaex.encoding.register', 'encoding.register', (['...
# Generated by Django 3.2.12 on 2022-02-28 11:47 from django.db import migrations, models def forwards(apps, schema_editor): ApplicationEventSchedule = apps.get_model( "applications", "ApplicationEventSchedule" ) db_alias = schema_editor.connection.alias # At the time of writing, PRIORITY_HI...
[ "django.db.migrations.RunPython", "django.db.models.IntegerField" ]
[((1390, 1446), 'django.db.migrations.RunPython', 'migrations.RunPython', (['forwards', 'backwards'], {'elidable': '(True)'}), '(forwards, backwards, elidable=True)\n', (1410, 1446), False, 'from django.db import migrations, models\n'), ((1251, 1343), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'choic...
from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.floatlayout import FloatLayout from kivy.uix.popup import Popup from kivy.uix.screenmanager import ScreenManager , Screen from kivy.lang import Builder from kivy.properties import ObjectProperty from kivy.config import Config Config.set...
[ "kivy.config.Config.set", "kivy.lang.Builder.load_file", "kivy.properties.ObjectProperty" ]
[((310, 368), 'kivy.config.Config.set', 'Config.set', (['"""input"""', '"""mouse"""', '"""mouse,multitouch_on_demand"""'], {}), "('input', 'mouse', 'mouse,multitouch_on_demand')\n", (320, 368), False, 'from kivy.config import Config\n'), ((834, 860), 'kivy.lang.Builder.load_file', 'Builder.load_file', (['"""my.kv"""'],...
import pandas as pd from util.exceptions import DataFrameTypeError ''' NAME: apply_max_abs_scaling PARAMS: - df: the DataFrame containing the data DESCRIPTION: RETURN: the manipulated DataFrame ''' def apply_max_abs_scaling(df): if not isinstance(df, pd.DataFrame): raise DataFrameTypeError('df', df) f...
[ "util.exceptions.DataFrameTypeError", "sklearn.preprocessing.StandardScaler", "sklearn.preprocessing.RobustScaler", "sklearn.preprocessing.Normalizer", "sklearn.preprocessing.MinMaxScaler", "sklearn.preprocessing.MaxAbsScaler" ]
[((286, 314), 'util.exceptions.DataFrameTypeError', 'DataFrameTypeError', (['"""df"""', 'df'], {}), "('df', df)\n", (304, 314), False, 'from util.exceptions import DataFrameTypeError\n'), ((664, 692), 'util.exceptions.DataFrameTypeError', 'DataFrameTypeError', (['"""df"""', 'df'], {}), "('df', df)\n", (682, 692), False...
from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, ConversationHandler, CallbackQueryHandler) from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ParseMode import requests import json import os def get_env_variable(var_name): """ Get the environment ...
[ "json.loads", "requests.post", "telegram.InlineKeyboardMarkup", "telegram.InlineKeyboardButton", "telegram.ext.Filters.regex", "telegram.ext.MessageHandler", "telegram.ext.CallbackQueryHandler", "telegram.ext.CommandHandler" ]
[((5164, 5199), 'requests.post', 'requests.post', (["(basepath + 'loggers')"], {}), "(basepath + 'loggers')\n", (5177, 5199), False, 'import requests\n'), ((5444, 5474), 'telegram.InlineKeyboardMarkup', 'InlineKeyboardMarkup', (['keyboard'], {}), '(keyboard)\n', (5464, 5474), False, 'from telegram import InlineKeyboard...
import connexion import six from sqlalchemy import exc from sqlalchemy.sql.functions import mode from openapi_server.models.error import Error # noqa: E501 from openapi_server.models.menu_item import MenuItem # noqa: E501 from openapi_server import util from openapi_server.database import models from sqlalchemy.exc...
[ "openapi_server.database.models.Cart.add_item", "openapi_server.database.models.Cart.query_by_host", "connexion.request.get_json", "openapi_server.database.models.Cart.delete_item_by_id", "openapi_server.models.error.Error", "openapi_server.database.models.db.session.rollback" ]
[((1357, 1426), 'openapi_server.database.models.Cart.delete_item_by_id', 'models.Cart.delete_item_by_id', (['connexion.request.remote_addr', 'item_id'], {}), '(connexion.request.remote_addr, item_id)\n', (1386, 1426), False, 'from openapi_server.database import models\n'), ((1802, 1858), 'openapi_server.database.models...
''' Created on Dec 22, 2016 @author: safdar ''' from operations.undistorter import Undistorter from operations.thresholder import Thresholder from operations.perspectivetransformer import PerspectiveTransformer from operations.lanefiller import LaneFiller from operations.showoriginal import ShowOriginal from operation...
[ "operations.showoriginal.ShowOriginal", "operations.vehicledetection.vehicletracker.VehicleTracker", "operations.thresholder.Thresholder", "operations.statswriter.StatsWriter", "operations.perspectivetransformer.PerspectiveTransformer", "operations.lanefiller.LaneFiller", "operations.lanefinder.LaneFind...
[((1711, 1731), 'operations.showoriginal.ShowOriginal', 'ShowOriginal', (['config'], {}), '(config)\n', (1723, 1731), False, 'from operations.showoriginal import ShowOriginal\n'), ((1794, 1813), 'operations.statswriter.StatsWriter', 'StatsWriter', (['config'], {}), '(config)\n', (1805, 1813), False, 'from operations.st...
#!/usr/bin/python 'coded by l314ck_h4ck3l2 ' import os import sys import re import threading from socket import socket , gethostbyname , gethostbyaddr , AF_INET , SOCK_STREAM blue = '\033[34m' green = '\033[32m' red = '\033[31m' yellow = '\033[33m' error = '\033[91m' cyan = '\033[36m' bold = "\033[;1m" reset = "\...
[ "socket.gethostbyname", "socket.socket", "socket.gethostbyaddr", "sys.exit", "os.system", "re.search" ]
[((1270, 1298), 'socket.socket', 'socket', (['AF_INET', 'SOCK_STREAM'], {}), '(AF_INET, SOCK_STREAM)\n', (1276, 1298), False, 'from socket import socket, gethostbyname, gethostbyaddr, AF_INET, SOCK_STREAM\n'), ((1856, 1866), 'sys.exit', 'sys.exit', ([], {}), '()\n', (1864, 1866), False, 'import sys\n'), ((1884, 1911), ...
## import skeleton process from PhysicsTools.PatAlgos.patTemplate_cfg import * #process.Tracer = cms.Service("Tracer") process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff") patAlgosToolsTask.add(process.patCandidatesTask) process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff...
[ "PhysicsTools.PatAlgos.tools.metTools.addMETCollection" ]
[((515, 583), 'PhysicsTools.PatAlgos.tools.metTools.addMETCollection', 'addMETCollection', (['process'], {'labelName': '"""patMETPF"""', 'metSource': '"""pfMetT1"""'}), "(process, labelName='patMETPF', metSource='pfMetT1')\n", (531, 583), False, 'from PhysicsTools.PatAlgos.tools.metTools import addMETCollection\n')]
import json from random import randint import boto3 import folium import requests from django.http import HttpResponseNotAllowed from django.shortcuts import render from . import forms, models from good_neighbor_halloween.settings import ( GCP_KEY, MAP_LAT, MAP_LNG, MAPQUEST_KEY, AWS_ACCESS_KEY_I...
[ "django.shortcuts.render", "boto3.client", "django.http.HttpResponseNotAllowed", "json.dumps", "requests.get", "folium.Map", "folium.Marker" ]
[((2123, 2170), 'django.shortcuts.render', 'render', (['request', '"""trick_or_treating/index.html"""'], {}), "(request, 'trick_or_treating/index.html')\n", (2129, 2170), False, 'from django.shortcuts import render\n'), ((2209, 2261), 'django.shortcuts.render', 'render', (['request', '"""trick_or_treating/contact_us.ht...
import numpy as np import matplotlib.pyplot as plt def kalman_xy(x, P, measurement, R, motion = np.matrix('0. 0. 0. 0.').T, Q = np.matrix(np.eye(4))): """ Parameters: x: initial state 4-tuple of location and velocity: (x0, x1, x0_dot, x1_dot) P: initial uncertainty conva...
[ "numpy.eye", "numpy.random.random", "matplotlib.pyplot.plot", "numpy.linspace", "numpy.matrix", "matplotlib.pyplot.show" ]
[((2070, 2095), 'numpy.linspace', 'np.linspace', (['(0.0)', '(10.0)', 'N'], {}), '(0.0, 10.0, N)\n', (2081, 2095), True, 'import numpy as np\n'), ((2239, 2277), 'matplotlib.pyplot.plot', 'plt.plot', (['observed_x', 'observed_y', '"""ro"""'], {}), "(observed_x, observed_y, 'ro')\n", (2247, 2277), True, 'import matplotli...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.insert(1,"../../") from tests import pyunit_utils import h2o import pandas as pd def pubdev_6603(): hf = h2o.H2OFrame(pd.DataFrame([{'a': 1, 'b': 2}, {'a': 3, 'b': 4}])) s1, s2 = hf.split_frame(ratios=[0.5], seed=1) h2o.remove([hf, s1, s2...
[ "sys.path.insert", "h2o.remove", "pandas.DataFrame", "tests.pyunit_utils.standalone_test", "h2o.ls" ]
[((58, 86), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../../"""'], {}), "(1, '../../')\n", (73, 86), False, 'import sys\n'), ((298, 322), 'h2o.remove', 'h2o.remove', (['[hf, s1, s2]'], {}), '([hf, s1, s2])\n', (308, 322), False, 'import h2o\n'), ((384, 425), 'tests.pyunit_utils.standalone_test', 'pyunit_utils....
"""Core compute functions, for profiles, geometry, and basis vectors/jacobians.""" import numpy as np from desc.backend import jnp from desc.compute import data_index def check_derivs(key, R_transform=None, Z_transform=None, L_transform=None): """Check if Transforms can compute required derivatives of R, Z, lam...
[ "desc.backend.jnp.abs", "desc.backend.jnp.sum", "desc.backend.jnp.zeros", "desc.backend.jnp.cos", "desc.backend.jnp.ones_like", "desc.backend.jnp.sin", "desc.backend.jnp.sqrt", "desc.backend.jnp.cross", "desc.backend.jnp.array" ]
[((1786, 1827), 'desc.backend.jnp.sum', 'jnp.sum', (['(a * b)'], {'axis': 'axis', 'keepdims': '(False)'}), '(a * b, axis=axis, keepdims=False)\n', (1793, 1827), False, 'from desc.backend import jnp\n'), ((2169, 2195), 'desc.backend.jnp.cross', 'jnp.cross', (['a', 'b'], {'axis': 'axis'}), '(a, b, axis=axis)\n', (2178, 2...
#!/usr/bin/env python3 import builtins class Print(object): __true_print = builtins.print __sham_print_args = () __sham_print_kwargs = {} @staticmethod def __sham_print(*args, **kwargs): return Print.__true_print(*(*Print.__sham_print_args, *args), **{**Print.__sham_print_kwargs, **kwargs}) @staticmethod d...
[ "builtins.print" ]
[((359, 389), 'builtins.print', 'builtins.print', (['*args', '*kwargs'], {}), '(*args, *kwargs)\n', (373, 389), False, 'import builtins\n')]
import os import argparse import pyautogui import time parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", help="absolute path to store screenshot.", default=r"./images") parser.add_argument("-t", "--type", help="h (in hour) or m (in minutes) or s (in seconds)", default='h') parser.add_argument("-f...
[ "argparse.ArgumentParser", "time.strftime", "os.path.join", "time.sleep", "os.path.isdir", "os.mkdir", "time.localtime" ]
[((65, 90), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (88, 90), False, 'import argparse\n'), ((595, 619), 'os.path.isdir', 'os.path.isdir', (['args.path'], {}), '(args.path)\n', (608, 619), False, 'import os\n'), ((633, 652), 'os.mkdir', 'os.mkdir', (['args.path'], {}), '(args.path)\n', (6...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import platform from lab.environments import LocalEnvironment, BaselSlurmEnvironment from lab.reports import Attribute from prostlab.experiment import ProstExperiment from prostlab.reports.absolute import AbsoluteReport from ipc_benchmarks import * def is_running_on_...
[ "platform.node", "prostlab.experiment.ProstExperiment", "lab.environments.BaselSlurmEnvironment", "lab.environments.LocalEnvironment" ]
[((921, 1020), 'prostlab.experiment.ProstExperiment', 'ProstExperiment', ([], {'suites': 'SUITES', 'environment': 'ENV', 'num_runs': 'NUM_RUNS', 'time_per_step': 'TIME_PER_STEP'}), '(suites=SUITES, environment=ENV, num_runs=NUM_RUNS,\n time_per_step=TIME_PER_STEP)\n', (936, 1020), False, 'from prostlab.experiment im...
import datetime from flask_admin.contrib.sqla import ModelView from src.www.orm import db class User(db.Model): __tablename__ = 'user' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(200)) password = db.Column(db.String(200)) email = db.Column(db.String(200), unique=True) ...
[ "src.www.orm.db.Column", "src.www.orm.db.String" ]
[((150, 189), 'src.www.orm.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (159, 189), False, 'from src.www.orm import db\n'), ((211, 225), 'src.www.orm.db.String', 'db.String', (['(200)'], {}), '(200)\n', (220, 225), False, 'from src.www.orm import db\n'), ((25...
# -*- coding: utf-8 -*- import scrapy import json from locations.hourstudy import inputoutput class KrogerSpider(scrapy.Spider): name = "kroger" allowed_domains = ["www.kroger.com"] start_urls = ( 'https://www.kroger.com/stores?address=37.7578595,-79.76804&includeThirdPartyFuel=true&maxResults=50...
[ "locations.hourstudy.inputoutput" ]
[((4207, 4232), 'locations.hourstudy.inputoutput', 'inputoutput', ([], {}), '(**properties)\n', (4218, 4232), False, 'from locations.hourstudy import inputoutput\n')]
import os import pandas as pd import datetime import random import math from .models import GaugeLocation,GaugeReading def generateWL(year,month,days,max_val,min_val,gauge_id): times=[] readings=[] for d in days: D1=datetime.datetime(year,month,d,6) times.append(D1) wl=float(random...
[ "datetime.datetime", "math.ceil", "datetime.datetime.now", "os.path.dirname", "random.randint" ]
[((2819, 2843), 'math.ceil', 'math.ceil', (['(max_val * 100)'], {}), '(max_val * 100)\n', (2828, 2843), False, 'import math\n'), ((3001, 3025), 'math.ceil', 'math.ceil', (['(min_val * 100)'], {}), '(min_val * 100)\n', (3010, 3025), False, 'import math\n'), ((3058, 3091), 'datetime.datetime', 'datetime.datetime', (['yea...
""" Avoid already-imported warning cause of we are importing this package from run wrapper for loading config. You can see documentation here: https://docs.pytest.org/en/latest/reference.html under section PYTEST_DONT_REWRITE """ # Use the new python 3.7 dataclass decorator, which provides an object similar # to a nam...
[ "dataclasses.fields", "os.path.join", "yaml.safe_load", "os.path.abspath", "dataclasses.field" ]
[((546, 596), 'os.path.join', 'os.path.join', (['THIS_DIR', '"""conf/default_config.yaml"""'], {}), "(THIS_DIR, 'conf/default_config.yaml')\n", (558, 596), False, 'import os\n'), ((497, 522), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (512, 522), False, 'import os\n'), ((641, 668), 'datac...
import dash_mantine_components as dmc component = dmc.Button("Click to open the app", fullWidth=True, variant="outline")
[ "dash_mantine_components.Button" ]
[((51, 121), 'dash_mantine_components.Button', 'dmc.Button', (['"""Click to open the app"""'], {'fullWidth': '(True)', 'variant': '"""outline"""'}), "('Click to open the app', fullWidth=True, variant='outline')\n", (61, 121), True, 'import dash_mantine_components as dmc\n')]
#!/usr/bin/env python import sys, subprocess, platform, socket import itertools, collections try: from pathlib2 import Path except ImportError: from pathlib import Path import clckwrkbdgr.xdg as xdg dirs = [ xdg.XDG_CONFIG_HOME, xdg.XDG_DATA_HOME, Path().home()/'.local'/'share', Path().home()/'.local', ] f...
[ "pathlib.Path", "subprocess.Popen", "itertools.product", "platform.system", "socket.gethostname" ]
[((652, 716), 'subprocess.Popen', 'subprocess.Popen', (["['crontab']"], {'stdin': 'subprocess.PIPE', 'shell': '(True)'}), "(['crontab'], stdin=subprocess.PIPE, shell=True)\n", (668, 716), False, 'import sys, subprocess, platform, socket\n'), ((365, 382), 'platform.system', 'platform.system', ([], {}), '()\n', (380, 382...
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2018 <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 t...
[ "os.makedirs", "argparse.ArgumentParser", "datetime.datetime.strptime", "shutil.copytree", "os.path.dirname", "datetime.datetime.now", "os.path.isdir", "add_parser.parse", "os.path.basename", "shutil.rmtree", "jinja2.FileSystemLoader", "commonmark.commonmark", "glob.glob", "re.search" ]
[((2476, 2501), 'os.path.dirname', 'os.path.dirname', (['filename'], {}), '(filename)\n', (2491, 2501), False, 'import os\n'), ((3158, 3222), 're.search', 're.search', (['"""^(?:(\\\\d\\\\d\\\\d\\\\d-\\\\d\\\\d-\\\\d\\\\d)-)?(.+)$"""', 'date_slug'], {}), "('^(?:(\\\\d\\\\d\\\\d\\\\d-\\\\d\\\\d-\\\\d\\\\d)-)?(.+)$', dat...
''' Convert a table with one or more columns of taxids to NC ids ''' import sys import os import re try: resultsF = sys.argv[1] except: sys.exit( sys.argv[0] + " <results file (tab separated)>") hostT = '/home3/redwards/phage/host_analysis/all_host_taxid.txt' if not os.path.exists(hostT): sys.exit(ho...
[ "sys.stdout.write", "os.path.exists", "sys.stderr.write", "sys.exit" ]
[((282, 303), 'os.path.exists', 'os.path.exists', (['hostT'], {}), '(hostT)\n', (296, 303), False, 'import os\n'), ((309, 402), 'sys.exit', 'sys.exit', (["(hostT +\n ' does not exist. This is just a two column table of NC id and taxid\\n')"], {}), "(hostT +\n ' does not exist. This is just a two column table of N...
import os, sys, inspect sys.path.insert(1, os.path.join(sys.path[0], '..')) from core.bounds import WSR_mu_plus from core.concentration import get_tlambda, get_lhat_from_table, get_lhat_from_table_binarysearch import numpy as np from scipy.optimize import brentq from tqdm import tqdm import pdb def get_coco_example_l...
[ "core.concentration.get_lhat_from_table_binarysearch", "core.concentration.get_tlambda", "os.path.join", "numpy.argmax", "numpy.linspace", "numpy.zeros", "numpy.concatenate", "numpy.random.uniform", "numpy.load", "numpy.random.shuffle" ]
[((43, 74), 'os.path.join', 'os.path.join', (['sys.path[0]', '""".."""'], {}), "(sys.path[0], '..')\n", (55, 74), False, 'import os, sys, inspect\n'), ((684, 703), 'numpy.load', 'np.load', (['fname_loss'], {}), '(fname_loss)\n', (691, 703), True, 'import numpy as np\n'), ((722, 742), 'numpy.load', 'np.load', (['fname_s...
# -*- coding: utf-8 -*- """ Created on Wed Sep 23 19:17:17 2020 @author: djamal """ import numpy as np import struct import os #import pandas as pd class Filetranslation(): def fread(self, fid, n, type): fmt, nbytes = {'uint8': ('B', 1), 'int16':('h', 2), 'int32':('i', 4), 'float32':('f', 4), 'float64':...
[ "numpy.array", "os.path.basename", "numpy.arange" ]
[((3960, 3980), 'numpy.array', 'np.array', (['PackedData'], {}), '(PackedData)\n', (3968, 3980), True, 'import numpy as np\n'), ((4112, 4132), 'numpy.array', 'np.array', (['PackedTime'], {}), '(PackedTime)\n', (4120, 4132), True, 'import numpy as np\n'), ((4210, 4223), 'numpy.arange', 'np.arange', (['NT'], {}), '(NT)\n...
#! /usr/bin/env python3 # # General-purpose Photovoltaic Device Model gpvdm.com - a drift diffusion # base/Shockley-Read-Hall model for 1st, 2nd and 3rd generation solarcells. # The model can simulate OLEDs, Perovskite cells, and OFETs. # # Copyright 2008-2022 <NAME> https://www.gpvdm.com # r.c.i.mackenzie at googlem...
[ "os.path.join", "os.geteuid", "os.getcwd", "os.path.isfile", "shutil.copyfile", "os.unlink", "os.system", "os.path.islink", "os.walk" ]
[((1600, 1613), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (1607, 1613), False, 'import os\n'), ((1531, 1542), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1540, 1542), False, 'import os\n'), ((1973, 1985), 'os.geteuid', 'os.geteuid', ([], {}), '()\n', (1983, 1985), False, 'import os\n'), ((2295, 2324), 'os.path...
from django import forms from django.contrib.auth.forms import UserCreationForm, PasswordResetForm, SetPasswordForm from django.contrib.auth.models import User, Group, Permission from django.core.exceptions import ValidationError from django.utils.translation import gettext, gettext_lazy as _ from django.contrib.auth i...
[ "django.utils.translation.gettext_lazy", "django.core.exceptions.ValidationError", "django.forms.PasswordInput", "django.forms.EmailInput", "django.forms.TextInput" ]
[((1713, 1772), 'django.utils.translation.gettext_lazy', '_', (['"""The password and confirm password fields didn’t match."""'], {}), "('The password and confirm password fields didn’t match.')\n", (1714, 1772), True, 'from django.utils.translation import gettext, gettext_lazy as _\n'), ((539, 626), 'django.forms.Email...
import cocos import sys from est8.backend.definitions import GameDefinition from est8.frontend.game import GameDisplay def main(): director = cocos.director.director director.init(width=1400, height=800) director.window.position = 100, 100 game_definition = GameDefinition.default() game_display ...
[ "cocos.scene.Scene", "est8.frontend.game.GameDisplay", "est8.backend.definitions.GameDefinition.default" ]
[((277, 301), 'est8.backend.definitions.GameDefinition.default', 'GameDefinition.default', ([], {}), '()\n', (299, 301), False, 'from est8.backend.definitions import GameDefinition\n'), ((322, 350), 'est8.frontend.game.GameDisplay', 'GameDisplay', (['game_definition'], {}), '(game_definition)\n', (333, 350), False, 'fr...
''' provide common function ''' import os import json def read_jsonfile(fn, debug=False): ''' specify json filename and return whole json object ''' if debug: print(f'load json from {fn}') if not os.path.exists(fn): print('file not found') return None # read from json f...
[ "json.load", "os.path.exists" ]
[((226, 244), 'os.path.exists', 'os.path.exists', (['fn'], {}), '(fn)\n', (240, 244), False, 'import os\n'), ((389, 404), 'json.load', 'json.load', (['fobj'], {}), '(fobj)\n', (398, 404), False, 'import json\n')]
from rest_framework import serializers from rest_framework.relations import PrimaryKeyRelatedField from rest_framework.fields import SerializerMethodField, IntegerField from core.rest.serializers import BaseSerializer from teams.models import Team, get_current_user, UserTeam from ..models import Snippet, File, Label, ...
[ "teams.models.Team.objects.viewable", "rest_framework.fields.IntegerField", "rest_framework.fields.SerializerMethodField", "rest_framework.serializers.ValidationError", "teams.models.get_current_user" ]
[((410, 455), 'rest_framework.fields.IntegerField', 'IntegerField', ([], {'read_only': '(False)', 'required': '(False)'}), '(read_only=False, required=False)\n', (422, 455), False, 'from rest_framework.fields import SerializerMethodField, IntegerField\n'), ((817, 840), 'rest_framework.fields.SerializerMethodField', 'Se...
import logging from scapy.packet import Packet from scapy.layers.dot11 import RadioTap, Dot11, Dot11Auth from scapy.sendrecv import srp1 def request(bssid: str, sta: str, iface: str, timeout=3) -> Packet: """ Sends an authentication request and returns an authentication response. :param bssid: BSSID of t...
[ "scapy.layers.dot11.Dot11", "scapy.layers.dot11.RadioTap", "scapy.layers.dot11.Dot11Auth", "logging.info", "scapy.sendrecv.srp1" ]
[((586, 659), 'scapy.layers.dot11.Dot11', 'Dot11', ([], {'type': '"""Management"""', 'subtype': '(11)', 'addr1': 'bssid', 'addr2': 'sta', 'addr3': 'bssid'}), "(type='Management', subtype=11, addr1=bssid, addr2=sta, addr3=bssid)\n", (591, 659), False, 'from scapy.layers.dot11 import RadioTap, Dot11, Dot11Auth\n'), ((717...
from setuptools import setup setup( name='MoleculeACE', version='1.0.9', packages=['MoleculeACE', 'MoleculeACE.ML', 'MoleculeACE.CNN', 'MoleculeACE.MLP', 'MoleculeACE.GNN', 'MoleculeACE.GNN.data', 'MoleculeACE.GNN.models', 'MoleculeACE.GNN.models.optimization', 'MoleculeACE.LSTM...
[ "setuptools.setup" ]
[((30, 4625), 'setuptools.setup', 'setup', ([], {'name': '"""MoleculeACE"""', 'version': '"""1.0.9"""', 'packages': "['MoleculeACE', 'MoleculeACE.ML', 'MoleculeACE.CNN', 'MoleculeACE.MLP',\n 'MoleculeACE.GNN', 'MoleculeACE.GNN.data', 'MoleculeACE.GNN.models',\n 'MoleculeACE.GNN.models.optimization', 'MoleculeACE....
import logging from .marmiton import MarmitonScrapper, MarmitonScrapperException, MarmitonUnitCombiner, MarmitonCombinerException from ..models import Recipe def get_items(urls): recipes = [] for url in urls: try: recipe = Recipe.objects.get(url=url) logging.info("Successfully ...
[ "logging.info", "logging.error" ]
[((293, 348), 'logging.info', 'logging.info', (["('Successfully provided cached url ' + url)"], {}), "('Successfully provided cached url ' + url)\n", (305, 348), False, 'import logging\n'), ((493, 523), 'logging.info', 'logging.info', (['f"""Getting {url}"""'], {}), "(f'Getting {url}')\n", (505, 523), False, 'import lo...
#!/usr/bin/env python import numpy as np import rospy import tf import tf_conversions from math import * import geometry_msgs.msg def phoxi_transformation_examples(): # original matrix T_phoxi = np.array([ [-0.034784670752, 0.873298269909, -0.485942546454, 0.594404677631629], [0.979858695089...
[ "tf.transformations.euler_from_quaternion", "tf.transformations.compose_matrix", "numpy.array", "tf.transformations.decompose_matrix", "tf.transformations.concatenate_matrices" ]
[((207, 466), 'numpy.array', 'np.array', (['[[-0.034784670752, 0.873298269909, -0.485942546454, 0.594404677631629], [\n 0.979858695089, -0.065869488303, -0.18851564436, 0.128504467275411], [-\n 0.19663917295, -0.482712484078, -0.853417654714, 1.427249342095321], [\n 0.0, 0.0, 0.0, 1.0]]'], {}), '([[-0.03478467...
"Combine icons into a Python file" import os from wx.tools.img2py import img2py python_file = "../eelbrain/_wxgui/icons.py" # individual files files = {} # name: file # folders that are included entirely folders = [ "actions", "brain", "copy", "documents", "plot", ] # tango files (in `tango` su...
[ "os.path.join", "os.listdir", "wx.tools.img2py.img2py" ]
[((1500, 1623), 'wx.tools.img2py.img2py', 'img2py', (['"""system-icons/eelbrain/eelbrain256.png"""', 'python_file'], {'append': '(False)', 'imgName': '"""eelbrain256"""', 'icon': '(False)'}), "('system-icons/eelbrain/eelbrain256.png', python_file, append=False,\n imgName='eelbrain256', icon=False, **kwargs)\n", (150...
""" Solver D3Q6 for the advection equation on the 3D-torus d_t(u) + cx d_x(u) + cy d_y(u) + c_z d_z(u) = 0, t > 0, 0 < x,y,z < 1, u(t=0,x,y,z) = u0(x,y,z), u(t,x=0,y,z) = u(t,x=1,y,z) 0 < y,z < 1, u(t,x,y=0,z) = u(t,x,y=1,z) 0 < x,z < 1, u(t,x,y,z=0) = u(t,x,y,z=1) 0 < x,y < 1, the solution is u(t,x,y,z) = ...
[ "six.moves.range", "numpy.ones", "pylbm.Simulation", "pylbm.H5File", "sympy.symbols" ]
[((459, 491), 'sympy.symbols', 'sp.symbols', (['"""u, X, Y, Z, lambda"""'], {}), "('u, X, Y, Z, lambda')\n", (469, 491), True, 'import sympy as sp\n'), ((576, 641), 'pylbm.H5File', 'pylbm.H5File', (['sol.domain.mpi_topo', '"""advection"""', '"""./advection"""', 'im'], {}), "(sol.domain.mpi_topo, 'advection', './advecti...
#!/usr/bin/python from __future__ import division, print_function # require python 3.5 for aiohttp import sys if sys.hexversion < 0x03050000: sys.exit("Python 3.5 or newer is required to run this program.") import numpy as np import json from io import BytesIO import asyncio from aiohttp import web, WSMsgType fro...
[ "aiohttp.web.run_app", "json.loads", "json.JSONEncoder.default", "asyncio.sleep", "sys.byteorder.upper", "aiohttp.web.put", "base64.b64encode", "aiohttp.web.Response", "asyncio.Lock", "io.BytesIO", "aiohttp.web.Application", "gzip.GzipFile", "sys.exit", "aiohttp.web.get", "traceback.prin...
[((147, 211), 'sys.exit', 'sys.exit', (['"""Python 3.5 or newer is required to run this program."""'], {}), "('Python 3.5 or newer is required to run this program.')\n", (155, 211), False, 'import sys, base64\n'), ((19261, 19270), 'io.BytesIO', 'BytesIO', ([], {}), '()\n', (19268, 19270), False, 'from io import BytesIO...
"""Configuration via UI for the integration.""" from __future__ import annotations from datetime import datetime from typing import Optional, Dict, Any from homeassistant import config_entries from homeassistant.core import callback import homeassistant.helpers.config_validation as cv import voluptuous as vol from ....
[ "voluptuous.Required", "voluptuous.Schema", "datetime.datetime.now", "homeassistant.helpers.config_validation.multi_select", "voluptuous.Optional" ]
[((1372, 1386), 'voluptuous.Schema', 'vol.Schema', (['{}'], {}), '({})\n', (1382, 1386), True, 'import voluptuous as vol\n'), ((2425, 2467), 'voluptuous.Optional', 'vol.Optional', (['CONF_ALARM_LABEL'], {'default': '""""""'}), "(CONF_ALARM_LABEL, default='')\n", (2437, 2467), True, 'import voluptuous as vol\n'), ((2756...
#!/usr/bin/python # -*- coding: UTF-8 -*- # 通过logstash的endpoint api(http)获取plugin的输出信息 from urllib import request from urllib import error import time port = int(input("输入端口号:")) ''' {"host":"node14","version":"5.3.0","http_address":"127.0.0.1:9600","id":"c0453696-9e73-41a4-ab1f-d023aed55305","name":"node14", "pip...
[ "urllib.request.urlopen", "time.sleep" ]
[((2375, 2390), 'time.sleep', 'time.sleep', (['inc'], {}), '(inc)\n', (2385, 2390), False, 'import time\n'), ((1778, 1803), 'urllib.request.urlopen', 'request.urlopen', (['full_url'], {}), '(full_url)\n', (1793, 1803), False, 'from urllib import request\n')]
from django.db import models from django.utils.text import slugify from django.utils.timezone import now from django.urls import reverse class Nfq(models.Model): name = models.CharField(max_length=100) level = models.IntegerField(null=True) def __str__(self): return self.name class Program_Cata...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.FileField", "django.db.models.DateTimeField", "django.db.models.BooleanField", "django.db.models.SlugField", "django.db.models.ImageField", "django.db.models.DecimalField", "django.db.mo...
[((175, 207), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (191, 207), False, 'from django.db import models\n'), ((220, 250), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'null': '(True)'}), '(null=True)\n', (239, 250), False, 'from django.db im...
"""EMRContainersBackend class with methods for supported APIs.""" from datetime import datetime from boto3 import Session from moto.core import BaseBackend, BaseModel, ACCOUNT_ID from moto.core.utils import iso_8601_datetime_without_milliseconds from .utils import random_cluster_id, get_partition, paginated_list # S...
[ "datetime.datetime.today", "boto3.Session" ]
[((5846, 5855), 'boto3.Session', 'Session', ([], {}), '()\n', (5853, 5855), False, 'from boto3 import Session\n'), ((6007, 6016), 'boto3.Session', 'Session', ([], {}), '()\n', (6014, 6016), False, 'from boto3 import Session\n'), ((6203, 6212), 'boto3.Session', 'Session', ([], {}), '()\n', (6210, 6212), False, 'from bot...
# Copyright 2019 DeepMind Technologies Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ "open_spiel.python.rl_environment.TimeStep" ]
[((2879, 3001), 'open_spiel.python.rl_environment.TimeStep', 'rl_environment.TimeStep', ([], {'observations': 'self._obs', 'rewards': 'rewards', 'discounts': 'self._env._discounts', 'step_type': 'step_type'}), '(observations=self._obs, rewards=rewards, discounts=\n self._env._discounts, step_type=step_type)\n', (290...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
[ "tensorflow.compat.v1.matmul", "language.common.layers.common_layers.ffnn", "tensorflow.compat.v1.variable_scope", "tensorflow.compat.v1.reduce_sum", "language.common.utils.tensor_utils.shape", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.expand_dims" ]
[((2782, 2841), 'tensorflow.compat.v1.matmul', 'tf.matmul', (['projected_emb1', 'projected_emb2'], {'transpose_b': '(True)'}), '(projected_emb1, projected_emb2, transpose_b=True)\n', (2791, 2841), True, 'import tensorflow.compat.v1 as tf\n'), ((3117, 3152), 'tensorflow.compat.v1.matmul', 'tf.matmul', (['attention_weigh...
# coding: utf-8 import datetime import json import os import re import sys import time from socket import error as SocketError import emoji import neologdn from requests_oauthlib import OAuth1Session DIALOG_CNT = 3 class TweetData: def __init__(self, id, text, status_id): self.cnt = 0 self.ids ...
[ "json.loads", "neologdn.normalize", "requests_oauthlib.OAuth1Session", "time.sleep", "datetime.datetime.now", "os.path.isdir", "os.mkdir", "re.sub", "sys.stdout.flush" ]
[((912, 932), 'json.loads', 'json.loads', (['res.text'], {}), '(res.text)\n', (922, 932), False, 'import json\n'), ((4315, 4376), 're.sub', 're.sub', (['"""https?://[\\\\w/:%#\\\\$&\\\\?\\\\(\\\\)~\\\\.=\\\\+\\\\-…]+"""', '""""""', 's'], {}), "('https?://[\\\\w/:%#\\\\$&\\\\?\\\\(\\\\)~\\\\.=\\\\+\\\\-…]+', '', s)\n", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------------------------------------- @Name: __init__.py @Desc: @Author: <EMAIL> @Create: 2020.05.24 15:31 ------------------------------------------------------------------------------- @Change: 2...
[ "flask.Blueprint" ]
[((451, 478), 'flask.Blueprint', 'Blueprint', (['"""auth"""', '__name__'], {}), "('auth', __name__)\n", (460, 478), False, 'from flask import Blueprint\n')]
import FWCore.ParameterSet.Config as cms process = cms.Process("WRITE") process.source = cms.Source("EmptySource", numberEventsInLuminosityBlock = cms.untracked.uint32(4)) process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(20)) process.out = cms.OutputModule("PoolOutputModule", fileName = cms.untra...
[ "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.EndPath", "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.untracked.uint32", "FWCore.ParameterSet.Config.Process" ]
[((52, 72), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""WRITE"""'], {}), "('WRITE')\n", (63, 72), True, 'import FWCore.ParameterSet.Config as cms\n'), ((365, 389), 'FWCore.ParameterSet.Config.EndPath', 'cms.EndPath', (['process.out'], {}), '(process.out)\n', (376, 389), True, 'import FWCore.ParameterSet....
from st2common.runners.base_action import Action import paho.mqtt.publish as publish import paho.mqtt.client as paho class PublishAction(Action): def __init__(self, config): super(PublishAction, self).__init__(config) # Sensor/Action Mismatch self._config = self.config self._clie...
[ "paho.mqtt.publish.single" ]
[((1939, 2172), 'paho.mqtt.publish.single', 'publish.single', (['topic'], {'payload': 'message', 'qos': 'qos', 'retain': 'retain', 'hostname': 'self._hostname', 'port': 'self._port', 'client_id': 'self._client_id', 'keepalive': '(60)', 'auth': 'self._auth_payload', 'tls': 'self._ssl_payload', 'protocol': 'self._protoco...
#!/usr/bin/python #### # Automated measurement script for vector controller (Full voltage sweept) # Python 3.X # # Instruments: # 1) Agilent 8722ES Vector Network Analyzer # 2) Keysight B2962A Power Source # 3) Tektronix PS2520G Power Source # # Required driver: # 1) National Instruments 48...
[ "datetime.datetime.now", "visa.ResourceManager", "time.sleep" ]
[((1491, 1514), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1512, 1514), False, 'import datetime\n'), ((1563, 1585), 'visa.ResourceManager', 'visa.ResourceManager', ([], {}), '()\n', (1583, 1585), False, 'import visa\n'), ((3406, 3419), 'time.sleep', 'time.sleep', (['(4)'], {}), '(4)\n', (3416,...
import copy from django.http import HttpResponseBadRequest from django.contrib.sitemaps import views as django_sitemaps_views def custom_sitemap_index(request, sitemaps, section=None, template_name='sitemap.xml', content_type='application/xml'): platform = request.GET.get('platform', None) platform_in = reque...
[ "django.http.HttpResponseBadRequest", "django.contrib.sitemaps.views.sitemap", "copy.deepcopy" ]
[((696, 719), 'copy.deepcopy', 'copy.deepcopy', (['sitemaps'], {}), '(sitemaps)\n', (709, 719), False, 'import copy\n'), ((899, 991), 'django.contrib.sitemaps.views.sitemap', 'django_sitemaps_views.sitemap', (['request', 'sitemaps_copy', 'None', 'template_name', 'content_type'], {}), '(request, sitemaps_copy, None, tem...
from distutils.core import setup from setuptools import setup, find_packages setup( name = 'moonmask', packages = find_packages(), version = '1.9', license='MIT', description = 'Gets moon visualizations courtesy of Ernie Wright and uses them for artistic collages', author = '<NAME>', author...
[ "setuptools.find_packages" ]
[((123, 138), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (136, 138), False, 'from setuptools import setup, find_packages\n')]
from jmetal.algorithm.singleobjective.simulated_annealing import SimulatedAnnealing from jmetal.operator import BitFlipMutation from jmetal.problem import OneMax from jmetal.util.solution import print_function_values_to_file, print_variables_to_file from jmetal.util.termination_criterion import StoppingByEvaluations i...
[ "jmetal.util.termination_criterion.StoppingByEvaluations", "jmetal.problem.OneMax", "jmetal.operator.BitFlipMutation" ]
[((360, 387), 'jmetal.problem.OneMax', 'OneMax', ([], {'number_of_bits': '(1024)'}), '(number_of_bits=1024)\n', (366, 387), False, 'from jmetal.problem import OneMax\n'), ((496, 553), 'jmetal.operator.BitFlipMutation', 'BitFlipMutation', ([], {'probability': '(1.0 / problem.number_of_bits)'}), '(probability=1.0 / probl...
# Copyright (c) 2014-2017 esotericnonsense (<NAME>) # Distributed under the MIT software license, see the accompanying # file COPYING or https://opensource.org/licenses/mit-license.php import datetime import curses import asyncio import view from util import isoformatseconds class WalletView(view.View): _mode_na...
[ "datetime.datetime.utcfromtimestamp", "curses.color_pair" ]
[((694, 714), 'curses.color_pair', 'curses.color_pair', (['(1)'], {}), '(1)\n', (711, 714), False, 'import curses\n'), ((730, 750), 'curses.color_pair', 'curses.color_pair', (['(3)'], {}), '(3)\n', (747, 750), False, 'import curses\n'), ((769, 789), 'curses.color_pair', 'curses.color_pair', (['(5)'], {}), '(5)\n', (786...
import os,requests,json,logging from urllib.parse import parse_qsl class aliyunhttpfc: def __init__(self,environ,start_response): self.environ = environ self.log = logging.getLogger() self.type = environ['CONTENT_TYPE'] self.env = dict(os.environ) self.star...
[ "logging.getLogger", "urllib.parse.parse_qsl", "json.loads" ]
[((193, 212), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (210, 212), False, 'import os, requests, json, logging\n'), ((1562, 1578), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (1572, 1578), False, 'import os, requests, json, logging\n'), ((1705, 1720), 'urllib.parse.parse_qsl', 'parse_qsl',...
# -*- coding: utf-8 -*- """ Module with information about the supported geofiletypes. """ import ast import csv from dataclasses import dataclass import enum from pathlib import Path from typing import List, Optional, Union geofiletypes = {} @dataclass class GeofileTypeInfo: """ Class with properties of a G...
[ "csv.register_dialect", "csv.DictReader", "enum.auto", "pathlib.Path", "ast.literal_eval" ]
[((1898, 1909), 'enum.auto', 'enum.auto', ([], {}), '()\n', (1907, 1909), False, 'import enum\n'), ((1924, 1935), 'enum.auto', 'enum.auto', ([], {}), '()\n', (1933, 1935), False, 'import enum\n'), ((1947, 1958), 'enum.auto', 'enum.auto', ([], {}), '()\n', (1956, 1958), False, 'import enum\n'), ((1972, 1983), 'enum.auto...
import os import random import shutil from pathlib import Path from subprocess import DEVNULL, check_call from typing import List import orjson import typer from sauronlab.core import SauronlabResources, logger MAIN_DIR = os.environ.get("SAURONLAB_DIR", Path.home() / ".sauronlab") cli = typer.Typer() class Install...
[ "random.randint", "subprocess.check_call", "sauronlab.core.SauronlabResources.path", "pathlib.Path.home", "typer.Typer", "typer.prompt", "typer.echo", "sauronlab.extras.video_caches.VideoCache", "shutil.copy", "sauronlab.core.logger.notice", "typer.style", "pocketutils.tools.filesys_tools.File...
[((291, 304), 'typer.Typer', 'typer.Typer', ([], {}), '()\n', (302, 304), False, 'import typer\n'), ((257, 268), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (266, 268), False, 'from pathlib import Path\n'), ((6417, 6432), 'typer.echo', 'typer.echo', (['msg'], {}), '(msg)\n', (6427, 6432), False, 'import typer\n...
"""Implementation of TRPO Algorithm.""" from rllib.algorithms.trpo import TRPO from rllib.value_function import NNValueFunction from .actor_critic_agent import ActorCriticAgent class TRPOAgent(ActorCriticAgent): """Implementation of the TRPO Agent. References ---------- <NAME>., <NAME>., <NAME>., <N...
[ "rllib.value_function.NNValueFunction.default" ]
[((1127, 1163), 'rllib.value_function.NNValueFunction.default', 'NNValueFunction.default', (['environment'], {}), '(environment)\n', (1150, 1163), False, 'from rllib.value_function import NNValueFunction\n')]
''' Features for interacting with Ripple's Neuroport neural recording system ''' import time import fnmatch import os from riglib import bmi from riglib.bmi import extractor from .neural_sys_features import CorticalData, CorticalBMI from riglib import ripple class RelayRipple(object): '''Sends full data directly...
[ "riglib.source.MultiChanDataSource", "comedi.comedi_dio_bitfield2", "os.path.join", "time.sleep", "riglib.sink.sinks.register", "comedi.comedi_open", "fnmatch.filter", "os.stat", "riglib.sink.sinks.start", "riglib.source.DataSource", "os.walk" ]
[((602, 631), 'riglib.sink.sinks.start', 'sink.sinks.start', (['self.ni_out'], {}), '(self.ni_out)\n', (618, 631), False, 'from riglib import sink\n'), ((3860, 3873), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (3870, 3873), False, 'import time\n'), ((6960, 6996), 'riglib.sink.sinks.register', 'sink.sinks.regis...
# Copyright 2018 AT&T Intellectual Property. All other rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
[ "shipyard_airflow.plugins.armada_validate_design.ArmadaValidateDesignOperator", "shipyard_airflow.plugins.deckhand_validate_site.DeckhandValidateSiteDesignOperator", "shipyard_airflow.plugins.promenade_validate_site_design.PromenadeValidateSiteDesignOperator", "shipyard_airflow.plugins.drydock_validate_design...
[((1959, 2120), 'shipyard_airflow.plugins.deckhand_validate_site.DeckhandValidateSiteDesignOperator', 'DeckhandValidateSiteDesignOperator', ([], {'task_id': '"""deckhand_validate_site_design"""', 'shipyard_conf': 'config_path', 'main_dag_name': 'parent_dag_name', 'retries': '(1)', 'dag': 'dag'}), "(task_id='deckhand_va...
import ledshim class Leds(object): def __init__(self): self.count = 24 def set_one(self, led_number, color): ledshim.set_pixel(led_number, *color) def set_range(self, a_range, color): ledshim.set_multiple_pixels(a_range, color) def set_all(self, color): l...
[ "ledshim.clear", "ledshim.show", "ledshim.set_all", "ledshim.set_pixel", "ledshim.set_multiple_pixels" ]
[((142, 179), 'ledshim.set_pixel', 'ledshim.set_pixel', (['led_number', '*color'], {}), '(led_number, *color)\n', (159, 179), False, 'import ledshim\n'), ((233, 276), 'ledshim.set_multiple_pixels', 'ledshim.set_multiple_pixels', (['a_range', 'color'], {}), '(a_range, color)\n', (260, 276), False, 'import ledshim\n'), (...
import numpy as np import re import pandas as pd import networkx as nx from cloudvolume import CloudVolume, Skeleton from io import StringIO import os from brainlit.utils.util import ( check_type, check_size, ) from sklearn.metrics import pairwise_distances_argmin_min import warnings class NeuronTrace: ""...
[ "brainlit.utils.util.check_type", "numpy.array", "numpy.divide", "numpy.arange", "numpy.mean", "re.split", "numpy.int64", "sklearn.metrics.pairwise_distances_argmin_min", "networkx.DiGraph", "numpy.concatenate", "warnings.warn", "io.StringIO", "numpy.round", "cloudvolume.CloudVolume", "o...
[((2585, 2606), 'brainlit.utils.util.check_type', 'check_type', (['path', 'str'], {}), '(path, str)\n', (2595, 2606), False, 'from brainlit.utils.util import check_type, check_size\n'), ((2704, 2733), 'brainlit.utils.util.check_type', 'check_type', (['read_offset', 'bool'], {}), '(read_offset, bool)\n', (2714, 2733), F...
#!/usr/bin/env python3 from setuptools import find_namespace_packages, setup setup( name="covid_graphs", version="1.0", description="COVID-19 graph plotting", install_requires=[ "click", "click_pathlib", "dash", "Flask", "numpy", "pandas", "proto...
[ "setuptools.find_namespace_packages" ]
[((453, 478), 'setuptools.find_namespace_packages', 'find_namespace_packages', ([], {}), '()\n', (476, 478), False, 'from setuptools import find_namespace_packages, setup\n')]
""" Find chessboards in both frames of a stereo feed """ import logging from pathlib import Path import click import cv2 as cv import numpy as np from rakali import VideoPlayer from rakali.annotate import add_frame_labels from rakali.camera.chessboard import ChessboardFinder from rakali.stereo.reader import StereoCam...
[ "logging.basicConfig", "logging.getLogger", "rakali.video.writer.get_stereo_writer", "cv2.imwrite", "rakali.VideoPlayer", "pathlib.Path", "click.option", "rakali.video.go", "numpy.hstack", "rakali.annotate.add_frame_labels", "click.version_option", "rakali.stereo.reader.StereoCamera", "rakal...
[((403, 443), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (422, 443), False, 'import logging\n'), ((454, 481), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (471, 481), False, 'import logging\n'), ((568, 590), 'click.version_...
#!/bin/bash from __future__ import print_function import swampyer import time import sys import logging logging.basicConfig(stream=sys.stdout, level=1) try: client = swampyer.WAMPClient( url="ws://localhost:8282/ws", uri_base="com.example.wamp.api", ).sta...
[ "logging.basicConfig", "swampyer.WAMPClient", "time.sleep" ]
[((108, 155), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'level': '(1)'}), '(stream=sys.stdout, level=1)\n', (127, 155), False, 'import logging\n'), ((539, 553), 'time.sleep', 'time.sleep', (['(60)'], {}), '(60)\n', (549, 553), False, 'import time\n'), ((175, 262), 'swampyer.WAMPClient'...
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart fromaddr = "" toaddr = "" msg = MIMEMultipart() msg['From'] = fromaddr msg['To'] = toaddr msg['Subject'] = '1234' msg.attach(MIMEText(html, 'html')) server = smtplib.SMTP(address,port) server.login(username,password) ...
[ "email.mime.multipart.MIMEMultipart", "email.mime.text.MIMEText", "smtplib.SMTP" ]
[((133, 148), 'email.mime.multipart.MIMEMultipart', 'MIMEMultipart', ([], {}), '()\n', (146, 148), False, 'from email.mime.multipart import MIMEMultipart\n'), ((260, 287), 'smtplib.SMTP', 'smtplib.SMTP', (['address', 'port'], {}), '(address, port)\n', (272, 287), False, 'import smtplib\n'), ((226, 248), 'email.mime.tex...
import asyncio from collections import deque from enum import Enum, unique from stp_core.common.log import getlogger from plenum.common.config_util import getConfig logger = getlogger() class StatsPublisher: """ Class to send data to TCP port which runs stats collecting service """ def __init__(sel...
[ "collections.deque", "asyncio.streams.open_connection", "asyncio.Lock", "asyncio.get_event_loop", "stp_core.common.log.getlogger" ]
[((176, 187), 'stp_core.common.log.getlogger', 'getlogger', ([], {}), '()\n', (185, 187), False, 'from stp_core.common.log import getlogger\n'), ((552, 559), 'collections.deque', 'deque', ([], {}), '()\n', (557, 559), False, 'from collections import deque\n'), ((581, 605), 'asyncio.get_event_loop', 'asyncio.get_event_l...
from time import strftime, gmtime, time, sleep from typing import Optional, Dict from pandas import DataFrame, Series from sagemaker import Session, get_execution_role from sagemaker.feature_store.feature_definition import \ FeatureDefinition, FeatureTypeEnum from sagemaker.feature_store.feature_group import Featu...
[ "sagemaker.feature_store.feature_group.FeatureGroup", "sagemaker.get_execution_role", "time.sleep", "time.gmtime", "sagemaker.Session", "time.time", "sagemaker.feature_store.feature_definition.FeatureDefinition" ]
[((2363, 2372), 'sagemaker.Session', 'Session', ([], {}), '()\n', (2370, 2372), False, 'from sagemaker import Session, get_execution_role\n'), ((2489, 2590), 'sagemaker.feature_store.feature_group.FeatureGroup', 'FeatureGroup', ([], {'name': 'group_name', 'sagemaker_session': 'session', 'feature_definitions': 'feature_...
#!/usr/bin/env python # pylint: disable=abstract-method,arguments-differ from collections import defaultdict import os from tornado.ioloop import IOLoop from tornado.options import define, options, parse_command_line from tornado.web import RequestHandler, Application import six from plop.callgraph import CallGraph ...
[ "os.listdir", "tornado.options.parse_command_line", "six.itervalues", "os.path.join", "tornado.ioloop.IOLoop.instance", "os.path.dirname", "collections.defaultdict", "plop.callgraph.CallGraph.load", "tornado.options.define", "tornado.web.Application", "os.path.abspath", "six.iteritems" ]
[((321, 349), 'tornado.options.define', 'define', (['"""port"""'], {'default': '(8888)'}), "('port', default=8888)\n", (327, 349), False, 'from tornado.options import define, options, parse_command_line\n'), ((350, 380), 'tornado.options.define', 'define', (['"""debug"""'], {'default': '(False)'}), "('debug', default=F...