code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python import yaml from collections import defaultdict import re import os import argparse def slugify(value): """ Normalizes string, converts to lowercase, removes non-alpha characters, and converts spaces to hyphens. """ value = re.sub('[^\w\s-]', '', value).strip().lower() v...
[ "os.mkdir", "argparse.ArgumentParser", "os.path.isdir", "yaml.dump", "collections.defaultdict", "re.sub" ]
[((327, 356), 're.sub', 're.sub', (['"""[-\\\\s]+"""', '"""_"""', 'value'], {}), "('[-\\\\s]+', '_', value)\n", (333, 356), False, 'import re\n'), ((420, 581), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Splits up a Ephemeris `get_tool_list` yml file for a Galaxy server into individua...
''' Unit test for pod.py ''' import sys # import unittest sys.path.insert(0, "openpod/") # import hub # class TestHub(unittest.TestCase): # ''' # General tests for the hub.py file # ''' # def test_xbee_flag_set_true(self): # ''' # Check if the xbee flag is set to true. # ''' ...
[ "sys.path.insert" ]
[((60, 90), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""openpod/"""'], {}), "(0, 'openpod/')\n", (75, 90), False, 'import sys\n')]
# I intend to use this as a Variational auto-encoder for the # missing y. # See paper: https://arxiv.org/abs/1312.6114 import torch # Define sizes input_size = 3 output_size = 2 hidden_size = 5 # Create multi-layer perceptron fc1 = torch.nn.Linear(input_size, hidden_size) act_fn = torch.nn.Tanh() fc2 = torch.nn.Line...
[ "torch.ones", "torch.nn.Tanh", "torch.cat", "torch.randn", "torch.nn.Linear" ]
[((235, 275), 'torch.nn.Linear', 'torch.nn.Linear', (['input_size', 'hidden_size'], {}), '(input_size, hidden_size)\n', (250, 275), False, 'import torch\n'), ((285, 300), 'torch.nn.Tanh', 'torch.nn.Tanh', ([], {}), '()\n', (298, 300), False, 'import torch\n'), ((307, 348), 'torch.nn.Linear', 'torch.nn.Linear', (['hidde...
'Format and display the output text.' __author__ = '<NAME>' __copyright__ = 'Copyright 2011 <NAME>' __license__ = 'ISC' __version__ = '0.5.0.0' __status__ = 'Development' import os import re import struct def ioctl_term_size(filed): 'Attempt to find terminal dimensions using an IO Control system call.' try: ...
[ "fcntl.ioctl", "os.ctermid", "struct.unpack", "os.environ.get", "os.close", "re.sub" ]
[((367, 413), 'fcntl.ioctl', 'fcntl.ioctl', (['filed', 'termios.TIOCGWINSZ', '"""1234"""'], {}), "(filed, termios.TIOCGWINSZ, '1234')\n", (378, 413), False, 'import fcntl, termios\n'), ((434, 461), 'struct.unpack', 'struct.unpack', (['"""hh"""', 'packed'], {}), "('hh', packed)\n", (447, 461), False, 'import struct\n'),...
from math import log import operator def createDataSet(): #Funcion que retorna un mequeño dataset dataSet = [[1, 1, 'yes'], [1, 1, 'yes'], [1, 0, 'no'], [0, 1, 'no'], [0, 1, 'no']] labels = ['no surfacing','flippers'] #change to discrete values ...
[ "math.log", "pickle.dump", "pickle.load", "operator.itemgetter" ]
[((7921, 7947), 'pickle.dump', 'pickle.dump', (['inputTree', 'fw'], {}), '(inputTree, fw)\n', (7932, 7947), False, 'import pickle\n'), ((8091, 8106), 'pickle.load', 'pickle.load', (['fr'], {}), '(fr)\n', (8102, 8106), False, 'import pickle\n'), ((1358, 1370), 'math.log', 'log', (['prob', '(2)'], {}), '(prob, 2)\n', (13...
""" gyrodata.py Run one motor with a sinusoidal speed input and an attached gyro. This example shows how use the gyro to measure angular position and velocity by attaching it to the motor shaft. Setup: Connect one large motor to port 'A' Connect the gyro sensor to port number 1. Notes: 1. Remember ther...
[ "pyev3.brick.LegoEV3", "time.perf_counter", "pyev3.utils.plot_line", "numpy.sin", "pyev3.devices.Motor", "pyev3.devices.Gyro", "numpy.gradient" ]
[((1049, 1058), 'pyev3.brick.LegoEV3', 'LegoEV3', ([], {}), '()\n', (1056, 1058), False, 'from pyev3.brick import LegoEV3\n'), ((1067, 1087), 'pyev3.devices.Motor', 'Motor', (['ev3'], {'port': '"""A"""'}), "(ev3, port='A')\n", (1072, 1087), False, 'from pyev3.devices import Gyro, Motor\n'), ((1095, 1139), 'pyev3.device...
""" OpenVINO DL Workbench Class for ORM model describing dataset augmentation job Copyright (c) 2021 Intel Corporation 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....
[ "sqlalchemy.orm.backref", "sqlalchemy.ForeignKey", "sqlalchemy.Column", "json.dumps" ]
[((1774, 1820), 'sqlalchemy.Column', 'Column', (['Boolean'], {'nullable': '(False)', 'default': '(False)'}), '(Boolean, nullable=False, default=False)\n', (1780, 1820), False, 'from sqlalchemy import Column, Integer, ForeignKey, Boolean, Float, Text\n'), ((1841, 1887), 'sqlalchemy.Column', 'Column', (['Boolean'], {'nul...
import numpy as np import pytest from numpy.testing import assert_allclose from pybraw import _pybraw, verify class CapturingCallback(_pybraw.BlackmagicRawCallback): def ReadComplete(self, job, result, frame): self.frame = frame def ProcessComplete(self, job, result, processed_image): self.pr...
[ "numpy.testing.assert_allclose", "numpy.transpose", "pybraw._pybraw.VariantCreateU32", "numpy.array", "pytest.mark.parametrize" ]
[((701, 1005), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""format,max_val,is_planar,channels"""', '[(_pybraw.blackmagicRawResourceFormatBGRAU8, 2 ** 8, False, [2, 1, 0, 3]),\n (_pybraw.blackmagicRawResourceFormatRGBF32Planar, 1, True, [0, 1, 2]),\n (_pybraw.blackmagicRawResourceFormatRGBU16Planar,...
#!/usr/bin/env python3 # Created By r2dr0dn # Hd Video Downloader For PornHub # Don't Copy The Code Without Giving The Credits Nerd from __future__ import unicode_literals try: import os,sys,requests import youtube_dl as dl import validators as valid from time import sleep as sl from random import...
[ "random.randint", "os.system", "validators.url", "youtube_dl.YoutubeDL", "requests.get", "sys.exit" ]
[((954, 968), 'random.randint', 'randint', (['(0)', '(15)'], {}), '(0, 15)\n', (961, 968), False, 'from random import random, randint\n'), ((983, 997), 'random.randint', 'randint', (['(0)', '(15)'], {}), '(0, 15)\n', (990, 997), False, 'from random import random, randint\n'), ((1012, 1026), 'random.randint', 'randint',...
import pytest from email.message import Message from mailers import Email, InMemoryTransport, Mailer from mailers.plugins.jinja_renderer import JinjaRendererPlugin from pathlib import Path from kupala.application import Kupala from kupala.mails import send_mail, send_templated_mail @pytest.mark.asyncio async def tes...
[ "kupala.mails.send_templated_mail", "mailers.plugins.jinja_renderer.JinjaRendererPlugin", "mailers.InMemoryTransport", "kupala.application.Kupala", "mailers.Email" ]
[((393, 401), 'kupala.application.Kupala', 'Kupala', ([], {}), '()\n', (399, 401), False, 'from kupala.application import Kupala\n'), ((847, 855), 'kupala.application.Kupala', 'Kupala', ([], {}), '()\n', (853, 855), False, 'from kupala.application import Kupala\n'), ((1124, 1213), 'kupala.mails.send_templated_mail', 's...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # 1.14.Sorting_Objects_Without_Native_Comparison_Support.py # ch01 # # 🎂"Here's to the crazy ones. The misfits. The rebels. # The troublemakers. The round pegs in the square holes. # The ones who see things differently. They're not found # of rules. And they have no re...
[ "operator.attrgetter" ]
[((1400, 1421), 'operator.attrgetter', 'attrgetter', (['"""user_id"""'], {}), "('user_id')\n", (1410, 1421), False, 'from operator import attrgetter\n')]
""" """ # Future Imports from __future__ import annotations # Standard Library import itertools as it from pathlib import Path class Source(str): """This source code object aids the tracking of tokens in order to indicate error position on exception handling. """ LEXKEYS = {"lexpos", "chrpos", "line...
[ "pathlib.Path" ]
[((1036, 1047), 'pathlib.Path', 'Path', (['fname'], {}), '(fname)\n', (1040, 1047), False, 'from pathlib import Path\n'), ((2499, 2510), 'pathlib.Path', 'Path', (['fname'], {}), '(fname)\n', (2503, 2510), False, 'from pathlib import Path\n')]
import time import requests from config import levels, headers, cities from db_utils.job import Job from db_utils.db_methods import get_jobs_table, get_taken_ids class TheMuseCrawler(): def __init__(self): self.source = "themuse" def scrape(self, city, insert_jobs_into_db = True): jobs_table ...
[ "db_utils.db_methods.get_jobs_table", "db_utils.db_methods.get_taken_ids", "requests.get", "time.sleep" ]
[((322, 338), 'db_utils.db_methods.get_jobs_table', 'get_jobs_table', ([], {}), '()\n', (336, 338), False, 'from db_utils.db_methods import get_jobs_table, get_taken_ids\n'), ((359, 391), 'db_utils.db_methods.get_taken_ids', 'get_taken_ids', (['city', 'self.source'], {}), '(city, self.source)\n', (372, 391), False, 'fr...
import math import time import pickle import sys import os import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from datasets.data_utils import project_image_to_rect, compute_box_3d def adjust_coord_for_view(points): return points[:, [2, 0, 1]] * np.array([1, -1, -1]) def...
[ "datasets.data_utils.compute_box_3d", "matplotlib.pyplot.show", "matplotlib.pyplot.figure", "numpy.arange", "datasets.data_utils.project_image_to_rect", "numpy.array" ]
[((872, 915), 'datasets.data_utils.compute_box_3d', 'compute_box_3d', (['center', 'dimension', 'angle', 'P'], {}), '(center, dimension, angle, P)\n', (886, 915), False, 'from datasets.data_utils import project_image_to_rect, compute_box_3d\n'), ((934, 955), 'numpy.arange', 'np.arange', (['(0)', '(70)', '(0.1)'], {}), '...
#1dbdc6da34094db4e661ed43aac83d91 #Genuine People Personality Plugin v0.1 import traceback import random import re from config import character modules = ['traceback', 'random', 're'] request = re.compile('(could|can|would|might)(.*you)?(.*please)?(\?)?') name = re.compile('({})[.,!\?:]?\s?'.format(character)) talk=...
[ "traceback.print_exc", "re.sub", "random.choice", "re.compile" ]
[((197, 259), 're.compile', 're.compile', (['"""(could|can|would|might)(.*you)?(.*please)?(\\\\?)?"""'], {}), "('(could|can|would|might)(.*you)?(.*please)?(\\\\?)?')\n", (207, 259), False, 'import re\n'), ((3949, 3970), 'traceback.print_exc', 'traceback.print_exc', ([], {}), '()\n', (3968, 3970), False, 'import traceba...
from django.test import TestCase from django.utils.translation import override from modeltrans.manager import transform_translatable_fields from modeltrans.utils import ( build_localized_fieldname, get_instance_field_value, get_language, get_model_field, split_translated_fieldname, ) from .app.mod...
[ "modeltrans.utils.split_translated_fieldname", "modeltrans.utils.build_localized_fieldname", "django.utils.translation.override", "modeltrans.utils.get_model_field", "modeltrans.utils.get_language", "modeltrans.manager.transform_translatable_fields", "modeltrans.utils.get_instance_field_value" ]
[((433, 447), 'modeltrans.utils.get_language', 'get_language', ([], {}), '()\n', (445, 447), False, 'from modeltrans.utils import build_localized_fieldname, get_instance_field_value, get_language, get_model_field, split_translated_fieldname\n'), ((469, 483), 'django.utils.translation.override', 'override', (['"""nl"""'...
import logging import requests from bs4 import BeautifulSoup import json import sys import state_scraper logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) def scrape_state_sites(): state_leg_list = "https://www.congress.gov/state-legislature-websites" state_page = requests.get(sta...
[ "logging.basicConfig", "json.dumps", "state_scraper.StateScraper", "requests.get", "bs4.BeautifulSoup", "logging.getLogger" ]
[((106, 146), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (125, 146), False, 'import logging\n'), ((156, 183), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (173, 183), False, 'import logging\n'), ((304, 332), 'requests.get',...
""" vtk_export =============== Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import _Outputs from ansys.dpf.core.operators.specification import PinSpecification, Specificatio...
[ "ansys.dpf.core.dpf_operator.Operator.default_config", "ansys.dpf.core.operators.specification.PinSpecification" ]
[((4215, 4272), 'ansys.dpf.core.dpf_operator.Operator.default_config', 'Operator.default_config', ([], {'name': '"""vtk_export"""', 'server': 'server'}), "(name='vtk_export', server=server)\n", (4238, 4272), False, 'from ansys.dpf.core.dpf_operator import Operator\n'), ((2519, 2667), 'ansys.dpf.core.operators.specifica...
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 FourierConvolution: Filter an image by using the Fourier transform ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageL, showImageF, createImageF from FourierUtilities i...
[ "ImageUtilities.showImageL", "ImageUtilities.createImageF", "ImageUtilities.showImageF", "FourierUtilities.computePowerfromCoefficients", "ImageOperatorsUtilities.imageLogF", "FourierUtilities.computeCoefficients", "ImageUtilities.imageReadL", "FourierUtilities.reconstruction" ]
[((741, 774), 'ImageUtilities.imageReadL', 'imageReadL', (['(pathToDir + imageName)'], {}), '(pathToDir + imageName)\n', (751, 774), False, 'from ImageUtilities import imageReadL, showImageL, createImageL, showImageF, createImageF\n'), ((795, 817), 'ImageUtilities.showImageL', 'showImageL', (['inputImage'], {}), '(inpu...
# -*- coding: utf-8 -*- from __future__ import with_statement import epiocms import fnmatch import os try: from setuptools import setup, find_packages except ImportError: import distribute_setup distribute_setup.use_setuptools() from setuptools import setup, find_packages with open('README.rst', 'r') a...
[ "distribute_setup.use_setuptools", "os.path.join", "setuptools.find_packages", "fnmatch.fnmatchcase" ]
[((423, 463), 'os.path.join', 'os.path.join', (['"""epiocms"""', '"""data"""', '"""media"""'], {}), "('epiocms', 'data', 'media')\n", (435, 463), False, 'import os\n'), ((207, 240), 'distribute_setup.use_setuptools', 'distribute_setup.use_setuptools', ([], {}), '()\n', (238, 240), False, 'import distribute_setup\n'), (...
import numpy as np def integrate_displacement(displ_img_to_img): """Sum the image-to-image displacement value to obtain image-to-reference displacement, add zeros at the begining Parameters ---------- displ_img_to_img : 3D array 3D array of shape `(nbr images - 1, nbr points, 2)` ...
[ "numpy.stack", "numpy.full", "numpy.zeros_like", "numpy.ones_like", "numpy.linalg.lstsq", "numpy.transpose", "numpy.ones", "numpy.einsum", "numpy.isnan", "numpy.cumsum", "numpy.vstack", "numpy.linspace", "numpy.matmul", "numpy.eye", "numpy.concatenate" ]
[((516, 565), 'numpy.concatenate', 'np.concatenate', (['[zeros, displ_img_to_img]'], {'axis': '(0)'}), '([zeros, displ_img_to_img], axis=0)\n', (530, 565), True, 'import numpy as np\n'), ((592, 621), 'numpy.cumsum', 'np.cumsum', (['displ_zero'], {'axis': '(0)'}), '(displ_zero, axis=0)\n', (601, 621), True, 'import nump...
import logging from pretix.base.email import get_email_context from pretix.base.i18n import language from pretix.base.models import OrderPosition from pretix.base.services.mail import SendMailException from pretix.base.services.tasks import EventTask from pretix.celery_app import app logger = logging.getLogger(__name_...
[ "pretix.base.i18n.language", "pretix.celery_app.app.task", "pretix.base.models.OrderPosition.objects.get", "pretix.base.email.get_email_context", "logging.getLogger" ]
[((295, 322), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (312, 322), False, 'import logging\n'), ((326, 361), 'pretix.celery_app.app.task', 'app.task', ([], {'base': 'EventTask', 'bind': '(True)'}), '(base=EventTask, bind=True)\n', (334, 361), False, 'from pretix.celery_app import app...
""" byceps.services.shop.order.transfer.number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 <NAME> :License: Revised BSD (see `LICENSE` file for details) """ from dataclasses import dataclass from typing import NewType from uuid import UUID from ...shop.transfer.models import ShopID OrderNumber...
[ "typing.NewType", "dataclasses.dataclass" ]
[((333, 371), 'typing.NewType', 'NewType', (['"""OrderNumberSequenceID"""', 'UUID'], {}), "('OrderNumberSequenceID', UUID)\n", (340, 371), False, 'from typing import NewType\n'), ((375, 397), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (384, 397), False, 'from dataclasses import...
"""Week1 Test Cases: Strongly Connected Components""" from week1.scc import scc def test_scc(): graph = { 'a': ['c'], 'b': ['a'], 'c': ['b'], 'd': ['b', 'f'], 'e': ['d'], 'f': ['e'], 'g': ['e', 'h'], 'h': ['i'], 'i': ['g'] } assert...
[ "week1.scc.scc" ]
[((321, 331), 'week1.scc.scc', 'scc', (['graph'], {}), '(graph)\n', (324, 331), False, 'from week1.scc import scc\n'), ((665, 675), 'week1.scc.scc', 'scc', (['graph'], {}), '(graph)\n', (668, 675), False, 'from week1.scc import scc\n'), ((1014, 1024), 'week1.scc.scc', 'scc', (['graph'], {}), '(graph)\n', (1017, 1024), ...
#!/bin/python from os import walk from os.path import join, relpath, normpath from json import load, dump from multiprocessing import Pool oldpath = "./experimental/translations" newpath = "./translations" substitutions = dict() with open(join(newpath, "substitutions.json"),"r") as f: substitutions = load(f) fi...
[ "json.dump", "os.walk", "os.path.join", "json.load" ]
[((368, 381), 'os.walk', 'walk', (['oldpath'], {}), '(oldpath)\n', (372, 381), False, 'from os import walk\n'), ((307, 314), 'json.load', 'load', (['f'], {}), '(f)\n', (311, 314), False, 'from json import load, dump\n'), ((242, 277), 'os.path.join', 'join', (['newpath', '"""substitutions.json"""'], {}), "(newpath, 'sub...
from flask import render_template from app.views.admin import bp_admin @bp_admin.route('/') def index(): return render_template('admin/index.html') @bp_admin.route('/dashboard') def dashboard(): return render_template('admin/dashboard.html')
[ "flask.render_template", "app.views.admin.bp_admin.route" ]
[((75, 94), 'app.views.admin.bp_admin.route', 'bp_admin.route', (['"""/"""'], {}), "('/')\n", (89, 94), False, 'from app.views.admin import bp_admin\n'), ((158, 186), 'app.views.admin.bp_admin.route', 'bp_admin.route', (['"""/dashboard"""'], {}), "('/dashboard')\n", (172, 186), False, 'from app.views.admin import bp_ad...
""" Helper to check the signature of a GitHub event request. """ import hmac def compute_signature(payload: bytes, secret: bytes, algo: str = 'sha256') -> str: """ Computes the HMAC signature of *payload* given the specified *secret* and the given hashing *algo*. # Parmeters payload: The payload for which ...
[ "hmac.new", "hmac.compare_digest" ]
[((1081, 1115), 'hmac.compare_digest', 'hmac.compare_digest', (['sig', 'computed'], {}), '(sig, computed)\n', (1100, 1115), False, 'import hmac\n'), ((635, 666), 'hmac.new', 'hmac.new', (['secret', 'payload', 'algo'], {}), '(secret, payload, algo)\n', (643, 666), False, 'import hmac\n')]
# -*- coding: utf-8 -*- import io import os import requests from httpdbg.httpdbg import ServerThread, app from httpdbg.mode_pytest import run_pytest from httpdbg.__main__ import pyhttpdbg_entry_point from utils import _run_under_httpdbg def test_run_pytest(httpbin): def _test(httpbin): os.environ["HTTPD...
[ "io.StringIO", "httpdbg.httpdbg.ServerThread", "utils._run_under_httpdbg", "httpdbg.mode_pytest.run_pytest", "os.path.realpath", "requests.get", "httpdbg.__main__.pyhttpdbg_entry_point" ]
[((593, 627), 'utils._run_under_httpdbg', '_run_under_httpdbg', (['_test', 'httpbin'], {}), '(_test, httpbin)\n', (611, 627), False, 'from utils import _run_under_httpdbg\n'), ((639, 704), 'requests.get', 'requests.get', (['f"""http://127.0.0.1:{current_httpdbg_port}/requests"""'], {}), "(f'http://127.0.0.1:{current_ht...
import pandas ################# input_panda_address=snakemake.input.input_panda_address output_panda_address=snakemake.output.output_panda_address ################# input_panda=pandas.read_csv(input_panda_address,sep='¬',header=0) def fill_cfmid_collision_energy_column(temp_panda): #iterrate through entire panda...
[ "pandas.read_csv" ]
[((178, 233), 'pandas.read_csv', 'pandas.read_csv', (['input_panda_address'], {'sep': '"""¬"""', 'header': '(0)'}), "(input_panda_address, sep='¬', header=0)\n", (193, 233), False, 'import pandas\n')]
import os import glob from flask import Flask from flask import jsonify from flask import request, render_template from skinapp import app from model.utils import * from model.skinmodel import * valid_mimetypes = ['image/jpeg', 'image/png'] @app.route('/') def index(): samples = glob.glob("%s/*" % app.config['SA...
[ "flask.request.files.get", "skinapp.app.route", "flask.jsonify", "flask.render_template", "glob.glob", "os.path.join" ]
[((245, 259), 'skinapp.app.route', 'app.route', (['"""/"""'], {}), "('/')\n", (254, 259), False, 'from skinapp import app\n'), ((395, 434), 'skinapp.app.route', 'app.route', (['"""/predict"""'], {'methods': "['POST']"}), "('/predict', methods=['POST'])\n", (404, 434), False, 'from skinapp import app\n'), ((287, 334), '...
import os import sys from datetime import datetime, timedelta import numpy as np data_path = "../../dat4figs_JAMES/Fig06" os.makedirs( data_path, exist_ok=True ) USE_ARCH_DAT = True #USE_ARCH_DAT = False quick_hist = False quick_bar = True quick_bar = False def d4_computation_time_nparray( top='' ): dirs = [ ...
[ "numpy.load", "numpy.argmax", "matplotlib.pyplot.clf", "numpy.isnan", "os.path.isfile", "numpy.mean", "numpy.arange", "os.path.join", "numpy.nanmean", "numpy.copy", "numpy.std", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "numpy.savez", "os.scandi...
[((124, 161), 'os.makedirs', 'os.makedirs', (['data_path'], {'exist_ok': '(True)'}), '(data_path, exist_ok=True)\n', (135, 161), False, 'import os\n'), ((1638, 1655), 'numpy.array', 'np.array', (['scale_l'], {}), '(scale_l)\n', (1646, 1655), True, 'import numpy as np\n'), ((2270, 2293), 'numpy.zeros', 'np.zeros', (['sc...
# -*- coding: utf-8 -*- # 使用openCV抓取视频 # 空格-->>截图,ESC-->>退出。 # 代码修改自 http://blog.csdn.net/tanmengwen/article/details/41892977 import cv2.cv as cv import time if __name__ == '__main__': cv.NamedWindow("camRra", 1) capture = cv.CaptureFromCAM(0) #开启摄像头 # capture = cv.CaptureFromFile("Video.avi...
[ "cv2.cv.NamedWindow", "cv2.cv.WaitKey", "cv2.cv.SaveImage", "cv2.cv.DestroyWindow", "cv2.cv.QueryFrame", "cv2.cv.CaptureFromCAM", "cv2.cv.ShowImage" ]
[((194, 221), 'cv2.cv.NamedWindow', 'cv.NamedWindow', (['"""camRra"""', '(1)'], {}), "('camRra', 1)\n", (208, 221), True, 'import cv2.cv as cv\n'), ((236, 256), 'cv2.cv.CaptureFromCAM', 'cv.CaptureFromCAM', (['(0)'], {}), '(0)\n', (253, 256), True, 'import cv2.cv as cv\n'), ((677, 703), 'cv2.cv.DestroyWindow', 'cv.Dest...
import time import titration.utils.devices.board_mock as board import titration.utils.devices.temperature_control_mock as temperature_control import titration.utils.devices.temperature_probe_mock as temperature_probe def test_temperature_control_create(): sensor = temperature_probe.Temperature_Probe( boa...
[ "time.sleep", "titration.utils.devices.temperature_control_mock.Temperature_Control", "titration.utils.devices.temperature_probe_mock.Temperature_Probe" ]
[((272, 365), 'titration.utils.devices.temperature_probe_mock.Temperature_Probe', 'temperature_probe.Temperature_Probe', (['board.SCK', 'board.MOSI', 'board.MISO', 'board.D0'], {'wires': '(3)'}), '(board.SCK, board.MOSI, board.MISO,\n board.D0, wires=3)\n', (307, 365), True, 'import titration.utils.devices.temperatu...
# -*- coding: utf-8 -*- import base64 import uuid from io import BytesIO import qrcode from odoo import api, fields, models class MusicRemote(models.Model): _name = "oomusic.remote" _description = "Remote Control" def _default_name(self): return fields.Date.to_string(fields.Date.context_today(...
[ "io.BytesIO", "uuid.uuid4", "odoo.fields.Many2one", "odoo.fields.Binary", "odoo.api.depends", "odoo.fields.Char", "qrcode.make", "odoo.fields.Date.context_today", "odoo.fields.Boolean" ]
[((597, 636), 'odoo.fields.Boolean', 'fields.Boolean', (['"""Public"""'], {'default': '(False)'}), "('Public', default=False)\n", (611, 636), False, 'from odoo import api, fields, models\n'), ((647, 752), 'odoo.fields.Char', 'fields.Char', (['"""URL"""'], {'compute': '"""_compute_url"""', 'help': '"""Access this URL to...
from pathlib import Path import pandas as pd import spacy from assertpy import assert_that from src.definitions import PROJECT_ROOT from src.main.preprocess_data import preprocess_data, parse_passage def test_preprocess_data(tmp_path: Path): preprocess_data( data_root=PROJECT_ROOT / "data/test/raw", ...
[ "pandas.DataFrame", "pandas.testing.assert_frame_equal", "src.main.preprocess_data.parse_passage", "pandas.read_csv", "spacy.load", "src.main.preprocess_data.preprocess_data" ]
[((250, 328), 'src.main.preprocess_data.preprocess_data', 'preprocess_data', ([], {'data_root': "(PROJECT_ROOT / 'data/test/raw')", 'output_dir': 'tmp_path'}), "(data_root=PROJECT_ROOT / 'data/test/raw', output_dir=tmp_path)\n", (265, 328), False, 'from src.main.preprocess_data import preprocess_data, parse_passage\n')...
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT # Simple test for NeoPixels on Raspberry Pi import time import board import neopixel import colorsys import threading class sunController(): def __init__(self): # Choose an open pin connected to the Data In ...
[ "neopixel.NeoPixel", "threading.Timer", "time.sleep" ]
[((948, 1059), 'neopixel.NeoPixel', 'neopixel.NeoPixel', (['self.pixel_pin', 'self.num_pixels'], {'brightness': '(1)', 'auto_write': '(False)', 'pixel_order': 'self.ORDER'}), '(self.pixel_pin, self.num_pixels, brightness=1, auto_write\n =False, pixel_order=self.ORDER)\n', (965, 1059), False, 'import neopixel\n'), ((...
import unittest from unittest.mock import MagicMock, call from timerecorder.database import Database from timerecorder.databaseAccess import DatabaseAccess class TestDatabaseAccess(unittest.TestCase): def setUp(self): self.database = Database('test') self.database.recordResults = MagicMock() ...
[ "unittest.main", "unittest.mock.MagicMock", "timerecorder.databaseAccess.DatabaseAccess", "timerecorder.database.Database", "unittest.mock.call" ]
[((5078, 5093), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5091, 5093), False, 'import unittest\n'), ((249, 265), 'timerecorder.database.Database', 'Database', (['"""test"""'], {}), "('test')\n", (257, 265), False, 'from timerecorder.database import Database\n'), ((304, 315), 'unittest.mock.MagicMock', 'Magic...
# IMPORTING LIBRARIES import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import datetime import warnings # DECLARING VARIABLES # USER INPUT LIST name = [] age = [] loc = [] cat = [] subcat = [] year = [] # ADMIN INPUT LIST cat_list = [] cat_sub = {} ...
[ "pandas.DataFrame", "datetime.datetime.now" ]
[((5860, 5878), 'pandas.DataFrame', 'pd.DataFrame', (['dict'], {}), '(dict)\n', (5872, 5878), True, 'import pandas as pd\n'), ((2094, 2117), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (2115, 2117), False, 'import datetime\n')]
from selenium import webdriver from selenium.webdriver.support.ui import Select from datetime import date from get_names import send_names ''' this app automatic login in to a website and cut the hours of the people who forgot to clock out in lunch time ''' ####################################### Basic settings ####...
[ "get_names.send_names", "selenium.webdriver.support.ui.Select", "datetime.date.today", "selenium.webdriver.Firefox" ]
[((621, 633), 'get_names.send_names', 'send_names', ([], {}), '()\n', (631, 633), False, 'from get_names import send_names\n'), ((807, 826), 'selenium.webdriver.Firefox', 'webdriver.Firefox', ([], {}), '()\n', (824, 826), False, 'from selenium import webdriver\n'), ((422, 434), 'datetime.date.today', 'date.today', ([],...
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
[ "monai.transforms.utils.compute_divisible_spatial_size", "monai.transforms.croppad.array.SpatialPad", "monai.transforms.utils.convert_pad_mode", "torch.max", "monai.utils.ensure_tuple_rep", "torch.tensor", "torch.nn.functional.pad" ]
[((5625, 5671), 'monai.utils.ensure_tuple_rep', 'ensure_tuple_rep', (['size_divisible', 'spatial_dims'], {}), '(size_divisible, spatial_dims)\n', (5641, 5671), False, 'from monai.utils import PytorchPadMode, ensure_tuple_rep\n'), ((6680, 6705), 'torch.tensor', 'torch.tensor', (['image_sizes'], {}), '(image_sizes)\n', (...
import time import json import sys,os import subprocess import argparse import unittest VALUES_INPUT = {} VALUES_OUTPUT = {} class TestCases(unittest.TestCase): def test_case_000(self): self.assertEqual('foo'.upper(), 'FOO') def test_case_001(self): self.assertEqual('fo...
[ "subprocess.Popen", "json.load", "unittest.TextTestRunner", "argparse.ArgumentParser", "unittest.TestSuite", "json.dumps", "sys.exit" ]
[((990, 1039), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'Main.__doc__'}), '(description=Main.__doc__)\n', (1013, 1039), False, 'import argparse\n'), ((423, 474), 'subprocess.Popen', 'subprocess.Popen', (['[command, parameters]'], {'shell': '(True)'}), '([command, parameters], shell=Tru...
#!/usr/bin/env python3 """从apnic获取中国IP范围""" import urllib.request, os URL = "http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest" TMP_PATH = "./whitelist.tmp" # 生成的最终白名单 RESULT_FILE_PATH = "./fdslight_etc/whitelist.txt" def get_remote_file(): tmpfile = open(TMP_PATH, "wb") response = urllib.reques...
[ "os.remove" ]
[((1496, 1515), 'os.remove', 'os.remove', (['TMP_PATH'], {}), '(TMP_PATH)\n', (1505, 1515), False, 'import urllib.request, os\n')]
import pandas as pd from unittest.mock import patch, Mock, PropertyMock import ramjet.data_interface.tess_transit_metadata_manager as module from ramjet.data_interface.tess_transit_metadata_manager import TessTransitMetadataManager, Disposition from ramjet.data_interface.tess_toi_data_interface import ToiColumns cla...
[ "pandas.DataFrame", "unittest.mock.patch.object", "ramjet.data_interface.tess_transit_metadata_manager.TessTransitMetadataManager" ]
[((353, 389), 'unittest.mock.patch.object', 'patch.object', (['module', '"""metadatabase"""'], {}), "(module, 'metadatabase')\n", (365, 389), False, 'from unittest.mock import patch, Mock, PropertyMock\n'), ((395, 438), 'unittest.mock.patch.object', 'patch.object', (['module', '"""TessTransitMetadata"""'], {}), "(modul...
#!/usr/bin/env python from __future__ import print_function from builtins import str, bytes import fileinput import argparse import os import sys import subprocess python_path = subprocess.check_output(['which' ,'python']).decode('utf-8') system_path = os.path.dirname(python_path) def writeJob(commandlist, jobname, ...
[ "subprocess.check_output", "os.path.dirname", "builtins.str", "argparse.ArgumentParser" ]
[((255, 283), 'os.path.dirname', 'os.path.dirname', (['python_path'], {}), '(python_path)\n', (270, 283), False, 'import os\n'), ((2578, 2676), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""A script to create slurm scripts from list of commands"""'}), "(description=\n 'A script to cr...
import datetime from django.db import models from libs.orm import ModelToDicMiXin SEXS = ( (0, '未知'), (1, '男'), (2, '女'), ) LOCATIONS = ( ('bj', '北京'), ('sh', '上海'), ('hz', '杭州'), ('sz', '深圳'), ('cd', '成都'), ('gz', '广州'), ) class User(models.Model): """ ...
[ "django.db.models.CharField", "django.db.models.IntegerField", "datetime.date.today", "django.db.models.BooleanField" ]
[((507, 551), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(11)', 'unique': '(True)'}), '(max_length=11, unique=True)\n', (523, 551), False, 'from django.db import models\n'), ((567, 598), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(16)'}), '(max_length=16)\n', (583...
#!/usr/bin/env python3 from __future__ import print_function import sys sys.path.append('./method') import os import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import pints import pints.io import pints.plot import model as m import parametertransform import priors """ Run fit....
[ "numpy.random.seed", "pints.GaussianLogLikelihood", "sys.path.append", "numpy.copy", "numpy.std", "matplotlib.pyplot.close", "numpy.append", "numpy.loadtxt", "pints.LogPosterior", "pints.io.save_samples", "pints.plot.pairwise", "importlib.import_module", "pints.UniformLogPrior", "os.path.b...
[((72, 99), 'sys.path.append', 'sys.path.append', (['"""./method"""'], {}), "('./method')\n", (87, 99), False, 'import sys\n'), ((147, 168), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (161, 168), False, 'import matplotlib\n'), ((672, 708), 'sys.path.append', 'sys.path.append', (['"""./mmt-mod...
#!flask/bin/python # This file is for starting up the server! from app import myapp myapp.run(debug=True)
[ "app.myapp.run" ]
[((86, 107), 'app.myapp.run', 'myapp.run', ([], {'debug': '(True)'}), '(debug=True)\n', (95, 107), False, 'from app import myapp\n')]
# encoding:utf-8 from nlpsc.dataset import Dataset from nlpsc.vboard.dataset import DatasetVBoard class TestVBoard(object): def test_dataset_vboard(self): # from nlpsc.vboard.dataset import index from ..vboard import bottle bottle.TEMPLATE_PATH.append('../vboard/views/') dataset...
[ "nlpsc.vboard.dataset.DatasetVBoard", "nlpsc.dataset.Dataset" ]
[((323, 344), 'nlpsc.dataset.Dataset', 'Dataset', ([], {'name': '"""测试数据集"""'}), "(name='测试数据集')\n", (330, 344), False, 'from nlpsc.dataset import Dataset\n'), ((436, 458), 'nlpsc.vboard.dataset.DatasetVBoard', 'DatasetVBoard', (['dataset'], {}), '(dataset)\n', (449, 458), False, 'from nlpsc.vboard.dataset import Datas...
import argparse from os.path import exists from docqa.triviaqa.build_span_corpus import TriviaQaOpenDataset from docqa.triviaqa.evidence_corpus import get_evidence_voc """ Build vocab of all words in the triviaqa dataset, including all documents and all train questions. """ def main(): parser = argparse.Argume...
[ "docqa.triviaqa.evidence_corpus.get_evidence_voc", "docqa.triviaqa.build_span_corpus.TriviaQaOpenDataset", "os.path.exists", "argparse.ArgumentParser" ]
[((305, 330), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (328, 330), False, 'import argparse\n'), ((538, 557), 'os.path.exists', 'exists', (['args.output'], {}), '(args.output)\n', (544, 557), False, 'from os.path import exists\n'), ((598, 619), 'docqa.triviaqa.build_span_corpus.TriviaQaOpe...
from formencode import Schema, validators, FancyValidator, Invalid, ForEach from dateutil.parser import parse class ValidateISODate(FancyValidator): @staticmethod def _to_python(value, state): try: val = parse(value) except ValueError: raise Invalid("Date/time format i...
[ "formencode.validators.Bool", "formencode.ForEach", "dateutil.parser.parse", "formencode.Invalid", "formencode.validators.String", "formencode.validators.Int" ]
[((521, 540), 'formencode.validators.String', 'validators.String', ([], {}), '()\n', (538, 540), False, 'from formencode import Schema, validators, FancyValidator, Invalid, ForEach\n'), ((554, 571), 'formencode.validators.Bool', 'validators.Bool', ([], {}), '()\n', (569, 571), False, 'from formencode import Schema, val...
import tensorflow as tf import numpy as np input = tf.placeholder(dtype=tf.float32,shape=[5,5,3]) filter = tf.constant(value=1, shape=[3,3,3,5], dtype=tf.float32) conv0 = tf.nn.atrous_conv2d(input,filters=filter,rate=2,padding='VALID') with tf.Session() as sess: img = np.array([3,5,5,3]) out = sess.run(conv0,...
[ "tensorflow.Session", "tensorflow.constant", "tensorflow.nn.atrous_conv2d", "tensorflow.placeholder", "numpy.array" ]
[((52, 101), 'tensorflow.placeholder', 'tf.placeholder', ([], {'dtype': 'tf.float32', 'shape': '[5, 5, 3]'}), '(dtype=tf.float32, shape=[5, 5, 3])\n', (66, 101), True, 'import tensorflow as tf\n'), ((108, 166), 'tensorflow.constant', 'tf.constant', ([], {'value': '(1)', 'shape': '[3, 3, 3, 5]', 'dtype': 'tf.float32'}),...
import sys import pygame import random from snake_utility import Snake, Cherry, SnakeGameStatusFlags import json def set_new_cherry_pos(snake_lst): """ Sets new cherry position. :param snake_lst: List, containing all snake instances present in the game. This is needed to check that c...
[ "pygame.__getattribute__", "json.load", "pygame.draw.rect", "pygame.display.set_mode", "pygame.event.get", "pygame.init", "pygame.display.update", "random.randrange", "snake_utility.Cherry", "pygame.time.get_ticks", "pygame.time.set_timer", "sys.exit" ]
[((3450, 3473), 'pygame.display.update', 'pygame.display.update', ([], {}), '()\n', (3471, 3473), False, 'import pygame\n'), ((5260, 5273), 'pygame.init', 'pygame.init', ([], {}), '()\n', (5271, 5273), False, 'import pygame\n'), ((5678, 5707), 'pygame.display.set_mode', 'pygame.display.set_mode', (['size'], {}), '(size...
#!/usr/bin/env python3 import numpy as np import matplotlib #matplotlib.use('Agg') import matplotlib.pyplot as plt import sys, os, glob import re # Output data format from configurations import * design_pt_to_plot=2 ################################################################################# #### Try to figure...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.yscale", "matplotlib.pyplot.show", "numpy.ceil", "matplotlib.pyplot.ylim", "numpy.dtype", "matplotlib.pyplot.figure", "glob.glob", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.errorb...
[((4351, 4373), 'glob.glob', 'glob.glob', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (4360, 4373), False, 'import sys, os, glob\n'), ((2720, 2772), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(2 * nb_of_cols, 2 * nb_of_rows)'}), '(figsize=(2 * nb_of_cols, 2 * nb_of_rows))\n', (2730, 2772), True, 'import ...
""" Module about parameter visibility within hahomematic """ from __future__ import annotations import logging import os from typing import Final import hahomematic.central_unit as hm_central from hahomematic.const import ( DEFAULT_ENCODING, EVENT_CONFIG_PENDING, EVENT_ERROR, EVENT_STICKY_UN_REACH, ...
[ "hahomematic.helpers.check_or_create_directory", "os.path.join", "logging.getLogger" ]
[((557, 584), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (574, 584), False, 'import logging\n'), ((15195, 15242), 'hahomematic.helpers.check_or_create_directory', 'check_or_create_directory', (['self._storage_folder'], {}), '(self._storage_folder)\n', (15220, 15242), False, 'from haho...
from __future__ import division import random import pprint import sys import time import numpy as np from optparse import OptionParser import pickle import os import re import shutil import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras.optimizers import Adam, SGD from tensorflow.ker...
[ "pickle.dump", "optparse.OptionParser", "tensorflow.keras.metrics.CategoricalAccuracy", "tensorflow.python.ops.numpy_ops.np_config.enable_numpy_behavior", "tensorflow.keras.optimizers.SGD", "numpy.random.randint", "numpy.mean", "pprint.pprint", "keras_frcnn.losses.RpnClassificationLoss", "keras_fr...
[((578, 606), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(40000)'], {}), '(40000)\n', (599, 606), False, 'import sys\n'), ((663, 696), 'tensorflow.python.ops.numpy_ops.np_config.enable_numpy_behavior', 'np_config.enable_numpy_behavior', ([], {}), '()\n', (694, 696), False, 'from tensorflow.python.ops.numpy_op...
from collections import namedtuple GoogleDriveFile = namedtuple('GoogleDriveFile', ['google_drive_id', 'local_name']) class Constant: BACKEND = 'torch' # Data VALIDATION_SET_SIZE = 0.08333 CUTOUT_HOLES = 1 CUTOUT_RATIO = 0.5 # Searcher MAX_MODEL_NUM = 1000 BETA = 2.576 KERNEL_LAM...
[ "collections.namedtuple" ]
[((54, 118), 'collections.namedtuple', 'namedtuple', (['"""GoogleDriveFile"""', "['google_drive_id', 'local_name']"], {}), "('GoogleDriveFile', ['google_drive_id', 'local_name'])\n", (64, 118), False, 'from collections import namedtuple\n')]
# -*- coding: utf-8 -*- """The Virtual File System (VFS) file entry object interface. The file entry can be various file system elements like a regular file, a directory or file system metadata. """ import abc from dfvfs.resolver import resolver class Directory(object): """Class that implements the VFS directory...
[ "dfvfs.resolver.resolver.Resolver.OpenFileObject" ]
[((3794, 3888), 'dfvfs.resolver.resolver.Resolver.OpenFileObject', 'resolver.Resolver.OpenFileObject', (['self.path_spec'], {'resolver_context': 'self._resolver_context'}), '(self.path_spec, resolver_context=self.\n _resolver_context)\n', (3826, 3888), False, 'from dfvfs.resolver import resolver\n')]
from rest_framework import serializers from django.utils.translation import ugettext as _ from django.utils.translation import ungettext from misago.acl import add_acl from misago.conf import settings from misago.threads.serializers import AttachmentSerializer from . import PostingEndpoint, PostingMiddleware class...
[ "django.utils.translation.ugettext", "django.utils.translation.ungettext", "rest_framework.serializers.IntegerField", "misago.acl.add_acl", "misago.threads.serializers.AttachmentSerializer", "rest_framework.serializers.ValidationError" ]
[((4282, 4531), 'django.utils.translation.ungettext', 'ungettext', (['"""You can\'t attach more than %(limit_value)s file to single post (added %(show_value)s)."""', '"""You can\'t attach more than %(limit_value)s flies to single post (added %(show_value)s)."""', 'settings.MISAGO_POST_ATTACHMENTS_LIMIT'], {}), '(\n ...
# Copyright (C) 2017-2019 <NAME> # SPDX-License-Identifier: Apache-2.0 import dolfin import numpy from ocellaris import Simulation, setup_simulation import pytest from helpers import skip_in_parallel ISO_INPUT = """ ocellaris: type: input version: 1.0 mesh: type: Rectangle Nx: 4 Ny: 4 probes: - ...
[ "ocellaris.Simulation", "numpy.arctan2", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "pytest.skip", "dolfin.plot", "matplotlib.pyplot.colorbar", "numpy.diff", "pytest.mark.parametrize", "ocellaris.setup_simulation", "dolfin.cells", "matplotlib.pyplot.savefig" ]
[((772, 816), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""degree"""', '[0, 1, 2]'], {}), "('degree', [0, 1, 2])\n", (795, 816), False, 'import pytest\n'), ((1936, 1974), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""degree"""', '[1]'], {}), "('degree', [1])\n", (1959, 1974), False, 'import...
from clubs.club_enums import ClubHangoutSetting from sims4.gsi.dispatcher import GsiHandler from sims4.gsi.schema import GsiGridSchema, GsiFieldVisualizers import services import sims4.resources club_schema = GsiGridSchema(label='Club Info') club_schema.add_field('name', label='Name', type=GsiFieldVisualizers.STRING) c...
[ "services.get_club_service", "sims4.gsi.schema.GsiGridSchema", "services.get_instance_manager", "services.sim_info_manager", "sims4.gsi.dispatcher.GsiHandler" ]
[((209, 241), 'sims4.gsi.schema.GsiGridSchema', 'GsiGridSchema', ([], {'label': '"""Club Info"""'}), "(label='Club Info')\n", (222, 241), False, 'from sims4.gsi.schema import GsiGridSchema, GsiFieldVisualizers\n'), ((3463, 3499), 'sims4.gsi.dispatcher.GsiHandler', 'GsiHandler', (['"""club_info"""', 'club_schema'], {}),...
import pandas as pd import geopandas def compile_airbnb_data(cur_link_table): cur_tables = [] for cur_row in cur_link_table.itertuples(): tmp_table = cur_row.table.copy() tmp_table["month"] = cur_row.month tmp_table["year"] = cur_row.year tmp_table["datetime"] = cur_row.dateti...
[ "geopandas.points_from_xy", "pandas.concat" ]
[((377, 398), 'pandas.concat', 'pd.concat', (['cur_tables'], {}), '(cur_tables)\n', (386, 398), True, 'import pandas as pd\n'), ((2289, 2352), 'geopandas.points_from_xy', 'geopandas.points_from_xy', (['cur_data.longitude', 'cur_data.latitude'], {}), '(cur_data.longitude, cur_data.latitude)\n', (2313, 2352), False, 'imp...
import logging from app.core.app import create_app from app.core.cfg import cfg __author__ = 'kclark' logger = logging.getLogger(__name__) app = create_app() def run_app(): logger.info('App Server Initializing') app.run(host='localhost', port=5000, threaded=True, debug=cfg.debug_mode) logger.info('Ap...
[ "logging.getLogger", "app.core.app.create_app" ]
[((114, 141), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (131, 141), False, 'import logging\n'), ((149, 161), 'app.core.app.create_app', 'create_app', ([], {}), '()\n', (159, 161), False, 'from app.core.app import create_app\n')]
# # CS1010FC --- Programming Methodology # # Mission N Solutions # # Note that written answers are commented out to allow us to run your # code easily while grading your problem set. from random import * from copy import deepcopy import math import random ####### #Task 1a# ####### # [Marking Scheme] # Points to note: ...
[ "copy.deepcopy" ]
[((5838, 5851), 'copy.deepcopy', 'deepcopy', (['mat'], {}), '(mat)\n', (5846, 5851), False, 'from copy import deepcopy\n'), ((6835, 6848), 'copy.deepcopy', 'deepcopy', (['mat'], {}), '(mat)\n', (6843, 6848), False, 'from copy import deepcopy\n'), ((7299, 7312), 'copy.deepcopy', 'deepcopy', (['mat'], {}), '(mat)\n', (73...
import os import logging import sys from collections import OrderedDict, defaultdict import datetime import cartosql import requests import json # Constants LATEST_URL = 'http://popdata.unhcr.org/api/stats/asylum_seekers_monthly.json?year={year}' CARTO_TABLE = 'soc_038_monthly_asylum_requests' CARTO_SCHEMA = OrderedD...
[ "requests.patch", "datetime.datetime.today", "logging.basicConfig", "cartosql.deleteRowsByIDs", "datetime.datetime", "collections.defaultdict", "logging.info", "datetime.datetime.strptime", "cartosql.getFields", "cartosql.createIndex", "collections.OrderedDict", "os.getenv", "cartosql.create...
[((312, 484), 'collections.OrderedDict', 'OrderedDict', (["[('_UID', 'text'), ('date', 'timestamp'), ('country', 'text'), (\n 'value_type', 'text'), ('num_people', 'numeric'), (\n 'some_stats_confidential', 'text')]"], {}), "([('_UID', 'text'), ('date', 'timestamp'), ('country', 'text'),\n ('value_type', 'text...
import json import os import numpy as np import pytest from py_path_signature.data_models.stroke import Stroke from py_path_signature.path_signature_extractor import PathSignatureExtractor from .conftest import TEST_DATA_INPUT_DIR, TEST_DATA_REFERENCE_DIR @pytest.mark.parametrize( "input_strokes, expected_bound...
[ "py_path_signature.path_signature_extractor.PathSignatureExtractor.calculate_bounding_box", "py_path_signature.data_models.stroke.Stroke", "json.load", "pytest.fixture", "py_path_signature.path_signature_extractor.PathSignatureExtractor", "os.path.splitext", "pytest.mark.parametrize", "os.path.join", ...
[((261, 604), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""input_strokes, expected_bounding_box"""', "[([{'x': [1, 2, 3], 'y': [1, 2, 3]}], (1, 1, 2, 2)), ([{'x': [0, 1, 2, 3],\n 'y': [1, 2, 3, 4]}, {'x': [6, 8, 2, 3], 'y': [0, 2, 3, 9]}], (0, 0, 9, \n 8)), ([{'x': [714, 1], 'y': [3, 4]}, {'x': [6,...
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance...
[ "unittest.TextTestRunner", "unittest.TestLoader", "utils.import_depends" ]
[((867, 889), 'utils.import_depends', 'utils.import_depends', ([], {}), '()\n', (887, 889), False, 'import utils\n'), ((4255, 4276), 'unittest.TestLoader', 'unittest.TestLoader', ([], {}), '()\n', (4274, 4276), False, 'import unittest\n'), ((4320, 4356), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {'verb...
import sys sys.path.append('../../extractor_de_aspectos') import unittest from extractor import extractor_de_aspectos from cliente_corenlp import cliente_corenlp from lematizador import lematizador import nltk class Test(unittest.TestCase): def setUp(self): self.ex = extractor_de_aspectos.ExtractorDeAsp...
[ "sys.path.append", "unittest.main", "nltk.sent_tokenize", "lematizador.lematizador.Lematizador", "cliente_corenlp.cliente_corenlp.ClienteCoreNLP", "extractor.extractor_de_aspectos.ExtractorDeAspectos" ]
[((11, 57), 'sys.path.append', 'sys.path.append', (['"""../../extractor_de_aspectos"""'], {}), "('../../extractor_de_aspectos')\n", (26, 57), False, 'import sys\n'), ((30850, 30865), 'unittest.main', 'unittest.main', ([], {}), '()\n', (30863, 30865), False, 'import unittest\n'), ((284, 327), 'extractor.extractor_de_asp...
# SNAKE GAME import pyglet from pyglet import gl from pyglet.window import key from images_load import batch from game_state import Game_state from field import game_field time_to_move = [0.7] def on_key_press(symbol, modifiers): ''' User press key for setting snake direction. ''' if symbol == ke...
[ "pyglet.app.run", "pyglet.text.Label", "pyglet.gl.glClear", "pyglet.gl.glColor3f", "pyglet.gl.glBegin", "game_state.Game_state", "pyglet.gl.glEnd", "images_load.batch.draw", "field.game_field.size_window", "pyglet.gl.glLineWidth", "pyglet.clock.schedule_interval" ]
[((4568, 4612), 'pyglet.clock.schedule_interval', 'pyglet.clock.schedule_interval', (['move', '(1 / 30)'], {}), '(move, 1 / 30)\n', (4598, 4612), False, 'import pyglet\n'), ((4611, 4665), 'pyglet.clock.schedule_interval', 'pyglet.clock.schedule_interval', (['game_state.add_food', '(5)'], {}), '(game_state.add_food, 5)\...
#!/usr/bin/env python import dbus import dbus.service import sys import signal from PyQt4 import QtCore from dbus.mainloop.qt import DBusQtMainLoop from notifier import Notifier from als import AmbientLightSensor from brightnessctrl import BrightnessCtrl class AutoBrightnessService(dbus.service.Object): def __...
[ "PyQt4.QtCore.QTimer", "dbus.SessionBus", "dbus.service.BusName", "dbus.service.Object.__init__", "als.AmbientLightSensor", "brightnessctrl.BrightnessCtrl", "sys.exit", "dbus.mainloop.qt.DBusQtMainLoop", "notifier.Notifier", "dbus.service.method" ]
[((1825, 1895), 'dbus.service.method', 'dbus.service.method', ([], {'dbus_interface': '"""com.github.sheinz.autobrightness"""'}), "(dbus_interface='com.github.sheinz.autobrightness')\n", (1844, 1895), False, 'import dbus\n'), ((2013, 2083), 'dbus.service.method', 'dbus.service.method', ([], {'dbus_interface': '"""com.g...
""" In previous homework task 4, you wrote a cache function that remembers other function output value. Modify it to be a parametrized decorator, so that the following code:: @cache(times=3) def some_function(): pass Would give out cached value up to `times` number only. Example:: @c...
[ "inspect.signature" ]
[((900, 923), 'inspect.signature', 'inspect.signature', (['func'], {}), '(func)\n', (917, 923), False, 'import inspect\n')]
from django.contrib import admin from .models import ServerInfo,SampleData,DeviceControl,UserApp # Register your models here. admin.site.register(ServerInfo) admin.site.register(SampleData) admin.site.register(DeviceControl) admin.site.register(UserApp)
[ "django.contrib.admin.site.register" ]
[((127, 158), 'django.contrib.admin.site.register', 'admin.site.register', (['ServerInfo'], {}), '(ServerInfo)\n', (146, 158), False, 'from django.contrib import admin\n'), ((159, 190), 'django.contrib.admin.site.register', 'admin.site.register', (['SampleData'], {}), '(SampleData)\n', (178, 190), False, 'from django.c...
import hashlib import re from typing import Union, Optional, Dict from urllib.parse import urljoin import binascii import logging import eyed3 from eyed3.id3 import ID3_V1 from unidecode import unidecode from tornado import web from settings import LOG_LEVEL class BasicHandler(web.RequestHandler): logger = None...
[ "unidecode.unidecode", "hashlib.md5", "urllib.parse.urljoin", "eyed3.load", "logging.StreamHandler", "logging.Formatter", "re.sub", "binascii.crc32", "logging.getLogger" ]
[((1811, 1834), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (1828, 1834), False, 'import logging\n'), ((1887, 1910), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (1908, 1910), False, 'import logging\n'), ((2197, 2233), 'urllib.parse.urljoin', 'urljoin', (['"""https://api...
import colorsys import struct import math PIXELS = 94 # interleaved = 1 # interleaved = 2 # interleaved = 4 interleaved = 8 f = open("test_{}.bin".format(interleaved), "wb") for n in range(1000): for x in range(PIXELS): # This way we get a half "rainbow", easy to find breaks/seams hue = float(x ...
[ "math.sin", "struct.pack" ]
[((559, 586), 'struct.pack', 'struct.pack', (['"""BBB"""', 'r', 'g', 'b'], {}), "('BBB', r, g, b)\n", (570, 586), False, 'import struct\n'), ((607, 634), 'struct.pack', 'struct.pack', (['"""BBB"""', 'r', '(0)', '(0)'], {}), "('BBB', r, 0, 0)\n", (618, 634), False, 'import struct\n'), ((1041, 1068), 'struct.pack', 'stru...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Common Python library imports from http import HTTPStatus # Pip package imports from flask import render_template, request, jsonify # Internal package imports from backend.utils import decode_token from ..models import NewsletterSubscribe from ..utils import generate_...
[ "flask.jsonify", "backend.utils.decode_token" ]
[((492, 511), 'backend.utils.decode_token', 'decode_token', (['token'], {}), '(token)\n', (504, 511), False, 'from backend.utils import decode_token\n'), ((1190, 1289), 'flask.jsonify', 'jsonify', (["{'email': email, 'status':\n 'You are successfully unsubscribed from our mailing list.'}"], {}), "({'email': email, '...
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np def load_octmi_dat(acquisitionName, basePath="."): # Vérification de l'existence du fichier datFilePath = os.path.join(os.path.normpath(basePath), acquisitionName + "_MI.dat") if not os.path.exists(datFilePath): print("Co...
[ "numpy.zeros", "os.path.exists", "os.path.normpath" ]
[((206, 232), 'os.path.normpath', 'os.path.normpath', (['basePath'], {}), '(basePath)\n', (222, 232), False, 'import os\n'), ((274, 301), 'os.path.exists', 'os.path.exists', (['datFilePath'], {}), '(datFilePath)\n', (288, 301), False, 'import os\n'), ((951, 965), 'numpy.zeros', 'np.zeros', (['nval'], {}), '(nval)\n', (...
""" Copyright 2019 <NAME> 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, softwar...
[ "json.dump", "json.load", "os.chdir" ]
[((799, 812), 'os.chdir', 'os.chdir', (['dir'], {}), '(dir)\n', (807, 812), False, 'import os\n'), ((1186, 1200), 'os.chdir', 'os.chdir', (['""".."""'], {}), "('..')\n", (1194, 1200), False, 'import os\n'), ((1167, 1181), 'os.chdir', 'os.chdir', (['""".."""'], {}), "('..')\n", (1175, 1181), False, 'import os\n'), ((947...
"""Test creation of mock data. """ import datetime from papilotte.connectors.mock import mockdata def test_generate_person(): "Make sure generate_person() doesn not create more than 15 different persons." num_of_different_objects = 15 generator = mockdata.generate_person(num_of_different_objects) o...
[ "papilotte.connectors.mock.mockdata.make_label_objects", "papilotte.connectors.mock.mockdata.make_date", "papilotte.connectors.mock.mockdata.generate_person", "papilotte.connectors.mock.mockdata.get_datetime", "papilotte.connectors.mock.mockdata.get_uris", "papilotte.connectors.mock.mockdata.generate_stat...
[((264, 314), 'papilotte.connectors.mock.mockdata.generate_person', 'mockdata.generate_person', (['num_of_different_objects'], {}), '(num_of_different_objects)\n', (288, 314), False, 'from papilotte.connectors.mock import mockdata\n'), ((1009, 1059), 'papilotte.connectors.mock.mockdata.generate_source', 'mockdata.gener...
from bs4 import BeautifulSoup import time import pandas as pd import requests import datetime headers={ "User-Agent":"", "Connection": "keep-alive", # 这个cookie的获取方法在文档中已说明 "Cookie":"" } sets=124 # 最新一期的数字 dates=[] # 日期数组,用于填充url # 遍历日期 包括begin和end的日期 生成类似2020-05-03的格式的日期 begin = datetime.date(2020...
[ "pandas.DataFrame", "datetime.date", "time.sleep", "datetime.timedelta", "requests.get", "bs4.BeautifulSoup" ]
[((302, 327), 'datetime.date', 'datetime.date', (['(2020)', '(5)', '(3)'], {}), '(2020, 5, 3)\n', (315, 327), False, 'import datetime\n'), ((332, 357), 'datetime.date', 'datetime.date', (['(2020)', '(6)', '(9)'], {}), '(2020, 6, 9)\n', (345, 357), False, 'import datetime\n'), ((374, 400), 'datetime.timedelta', 'datetim...
# -*- coding: utf-8 -*- """ run all ogs5py benchmarks """ import sys import os import fnmatch import time from pexpect.popen_spawn import PopenSpawn import pexpect from ogs5py.tools.tools import Output # pexpect.spawn just runs on unix-like systems if sys.platform == "win32": CmdRun = PopenSpawn else: CmdRun =...
[ "os.getcwd", "os.walk", "time.strftime", "ogs5py.tools.tools.Output", "os.path.split", "os.path.join", "fnmatch.fnmatch" ]
[((404, 425), 'os.path.split', 'os.path.split', (['script'], {}), '(script)\n', (417, 425), False, 'import os\n'), ((798, 811), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (805, 811), False, 'import os\n'), ((1307, 1339), 'ogs5py.tools.tools.Output', 'Output', (['log_name'], {'print_log': '(True)'}), '(log_name, ...
from django.shortcuts import render, HttpResponse, get_object_or_404 from django.http import Http404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.contrib.admin.views.decorators import staff_member_required from django.urls import reverse,reve...
[ "django.shortcuts.HttpResponse", "django.contrib.admin.views.decorators.staff_member_required", "django.urls.reverse", "django.shortcuts.get_object_or_404", "django.http.Http404", "django.utils.translation.ugettext_lazy", "mimetypes.guess_type" ]
[((1062, 1071), 'django.utils.translation.ugettext_lazy', '_', (['"""Save"""'], {}), "('Save')\n", (1063, 1071), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((1107, 1118), 'django.utils.translation.ugettext_lazy', '_', (['"""Create"""'], {}), "('Create')\n", (1108, 1118), True, 'from django.util...
from pathlib import Path import cdsapi YEARS = [2019] MONTHS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] ROOT = Path("wind_data") ROOT.mkdir(exist_ok=True) c = cdsapi.Client(key="YOUR_API_KEY") for year in YEARS: for month in MONTHS: month = str(month).zfill(2) c.retrieve( "reanalysis-...
[ "pathlib.Path", "cdsapi.Client" ]
[((112, 129), 'pathlib.Path', 'Path', (['"""wind_data"""'], {}), "('wind_data')\n", (116, 129), False, 'from pathlib import Path\n'), ((161, 194), 'cdsapi.Client', 'cdsapi.Client', ([], {'key': '"""YOUR_API_KEY"""'}), "(key='YOUR_API_KEY')\n", (174, 194), False, 'import cdsapi\n')]
import time from random import choice from tornado.ioloop import PeriodicCallback from nltk.chat.util import Chat, reflections from nltk.chat.eliza import pairs chat_info = {} idle_phrases = [ "Are you still there?", "Would you like to say something?", "If you're busy, we can talk later.", "What are yo...
[ "random.choice", "nltk.chat.util.Chat", "time.time" ]
[((880, 904), 'nltk.chat.util.Chat', 'Chat', (['pairs', 'reflections'], {}), '(pairs, reflections)\n', (884, 904), False, 'from nltk.chat.util import Chat, reflections\n'), ((1003, 1014), 'time.time', 'time.time', ([], {}), '()\n', (1012, 1014), False, 'import time\n'), ((2190, 2201), 'time.time', 'time.time', ([], {})...
#!/usr/bin/env python3 import logging import os import signal import sys from .device import Device class Fan(Device): @staticmethod def logTemperature(): process = os.popen( "cat /sys/devices/virtual/thermal/thermal_zone*/temp") stdout = process.read() zones = [ ...
[ "os.remove", "logging.error", "os.getpid", "logging.FileHandler", "logging.warning", "os.popen", "logging.StreamHandler", "logging.shutdown" ]
[((1097, 1108), 'os.getpid', 'os.getpid', ([], {}), '()\n', (1106, 1108), False, 'import os\n'), ((1492, 1510), 'logging.shutdown', 'logging.shutdown', ([], {}), '()\n', (1508, 1510), False, 'import logging\n'), ((1515, 1534), 'os.remove', 'os.remove', (['PID_FILE'], {}), '(PID_FILE)\n', (1524, 1534), False, 'import os...
#!\usr\bin\python # coding=utf-8 # Author: youngfeng # Update: 07/16/2018 """ Flash, proposed by Nair et al. (arXiv '18), which aims to find the (near) optimal configuration in unevaluated set. STEP 1: select 80%% of original data as dataset STEP 2: split the dataset into training set (30 configs) and unevaluated set ...
[ "pandas.read_csv", "random.shuffle", "numpy.min", "sklearn.tree.DecisionTreeRegressor" ]
[((1632, 1655), 'sklearn.tree.DecisionTreeRegressor', 'DecisionTreeRegressor', ([], {}), '()\n', (1653, 1655), False, 'from sklearn.tree import DecisionTreeRegressor\n'), ((2411, 2447), 'numpy.min', 'np.min', (['[sf[0] for sf in select_few]'], {}), '([sf[0] for sf in select_few])\n', (2417, 2447), True, 'import numpy a...
import colorama, traceback from python_helper.api.src.domain import Constant as c from python_helper.api.src.service import SettingHelper, StringHelper, EnvironmentHelper, ObjectHelper, ReflectionHelper LOG = 'LOG' INFO = 'INFO' SUCCESS = 'SUCCESS' SETTING = 'SETTING' DEBUG = 'DEBUG' WARNING = 'WARNING' WRAPPER = 'WRA...
[ "colorama.init", "python_helper.api.src.helper.LogHelperHelper.softLog", "python_helper.api.src.service.ObjectHelper.isEmpty", "python_helper.api.src.helper.LogHelperHelper.hardLog", "python_helper.api.src.service.EnvironmentHelper.getCurrentSoutStatus", "python_helper.api.src.service.EnvironmentHelper.ge...
[((4804, 4821), 'colorama.deinit', 'colorama.deinit', ([], {}), '()\n', (4819, 4821), False, 'import colorama, traceback\n'), ((4889, 4925), 'python_helper.api.src.service.SettingHelper.getActiveEnvironment', 'SettingHelper.getActiveEnvironment', ([], {}), '()\n', (4923, 4925), False, 'from python_helper.api.src.servic...
# -*- coding: utf-8 -*- """ Spyder Editor SEM_batch_conversion script Extracts important header info into parameter log, designed to read out pertinent header information from all emsa files within a folder. No need to convert psmsa into csv ... just always strip header when opening Output into single log file for impo...
[ "sys.path.append", "EDX_import_functions.getparams", "EDX_plot_functions.reportSEMpeaks", "EDX_import_functions.renamePSset", "pandas.read_csv", "EDX_import_functions.loadprocessfiles", "EDX_plot_functions.reportcounts", "os.getcwd", "EDX_import_functions.batchEDXquant", "EDX_import_functions.comb...
[((1213, 1242), 'EDX_import_functions.getparams', 'EDXimport.getparams', (['filelist'], {}), '(filelist)\n', (1232, 1242), True, 'import EDX_import_functions as EDXimport\n'), ((1251, 1296), 'EDX_import_functions.getparams', 'EDXimport.getparams', (['filelist'], {'reprocess': '(True)'}), '(filelist, reprocess=True)\n',...
#!/usr/bin/env python3 """ Python script for retrieving IPTC Video Metadata Hub mapping data from a Google sheet The retrieved data are transformed in HTML as saved as HTML page. For IPTC-internal use Creator: <NAME> History: 2016-11-25 mws: project started, download and HTML output ok 2020-06-15 BQ: Updated a...
[ "os.path.abspath", "pickle.dump", "google.auth.transport.requests.Request", "lxml.etree.fromstring", "lxml.etree.Element", "os.path.exists", "pickle.load", "lxml.etree.SubElement", "lxml.etree.tostring", "google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file", "googleapiclient.disc...
[((1487, 1517), 'os.path.exists', 'os.path.exists', (['"""token.pickle"""'], {}), "('token.pickle')\n", (1501, 1517), False, 'import os\n'), ((2283, 2301), 'lxml.etree.Element', 'ET.Element', (['"""html"""'], {}), "('html')\n", (2293, 2301), True, 'from lxml import etree as ET\n'), ((2313, 2341), 'lxml.etree.SubElement...
import glob import numpy as np from pprint import pprint as pp g = glob.glob("data/*/*/audio/*.wav") wavpath = g[:10] pp(wavpath) res = [("/".join(wp.split("/")[:-2]), "/".join(wp.split("/")[-2:])) for wp in wavpath] pp(res)
[ "pprint.pprint", "glob.glob" ]
[((69, 102), 'glob.glob', 'glob.glob', (['"""data/*/*/audio/*.wav"""'], {}), "('data/*/*/audio/*.wav')\n", (78, 102), False, 'import glob\n'), ((122, 133), 'pprint.pprint', 'pp', (['wavpath'], {}), '(wavpath)\n', (124, 133), True, 'from pprint import pprint as pp\n'), ((223, 230), 'pprint.pprint', 'pp', (['res'], {}), ...
from __future__ import annotations from datetime import datetime from typing import List, Dict, Union, Optional, TYPE_CHECKING import pymongo from pymongo import MongoClient from pytz import timezone import config if TYPE_CHECKING: import discord JsonData = Dict[str, Union[str, int]] cluster = M...
[ "pymongo.MongoClient", "pytz.timezone" ]
[((319, 351), 'pymongo.MongoClient', 'MongoClient', (['config.mongo_client'], {}), '(config.mongo_client)\n', (330, 351), False, 'from pymongo import MongoClient\n'), ((1976, 2000), 'pytz.timezone', 'timezone', (['"""Asia/Kolkata"""'], {}), "('Asia/Kolkata')\n", (1984, 2000), False, 'from pytz import timezone\n'), ((36...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 1 11:41:59 2019 @author: gemsec-user """ import numpy as np import prody as pd import PeptideBuilder as pb import os import Bio import cleaning from decimal import Decimal from symbols import * #from pdbtools import pdbtools as pdb d = os.getcwd()...
[ "os.mkdir", "decimal.Decimal", "os.getcwd", "os.path.exists", "prody.parsePDB", "Bio.PDB.PDBIO", "cleaning.cleanATOM" ]
[((309, 320), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (318, 320), False, 'import os\n'), ((512, 546), 'os.path.exists', 'os.path.exists', (["(d + '/amino_acids')"], {}), "(d + '/amino_acids')\n", (526, 546), False, 'import os\n'), ((556, 584), 'os.mkdir', 'os.mkdir', (["(d + '/amino_acids')"], {}), "(d + '/amino_ac...
def main(): from summ_eval.server import EvalServer from summ_eval.server.helper import get_run_args args = get_run_args() server = EvalServer(args) server.start() server.join()
[ "summ_eval.server.EvalServer", "summ_eval.server.helper.get_run_args" ]
[((120, 134), 'summ_eval.server.helper.get_run_args', 'get_run_args', ([], {}), '()\n', (132, 134), False, 'from summ_eval.server.helper import get_run_args\n'), ((148, 164), 'summ_eval.server.EvalServer', 'EvalServer', (['args'], {}), '(args)\n', (158, 164), False, 'from summ_eval.server import EvalServer\n')]
""" Unit-tests for target generation """ import os import click import pytest from pathlib import Path as P from textwrap import dedent from commodore import cluster from commodore.inventory import Inventory from commodore.config import Config @pytest.fixture def data(): """ Setup test data """ te...
[ "textwrap.dedent", "os.makedirs", "commodore.inventory.Inventory", "commodore.cluster.render_target", "pytest.raises", "commodore.cluster.read_cluster_and_tenant", "commodore.cluster.Cluster", "commodore.config.Config" ]
[((1059, 1107), 'commodore.cluster.Cluster', 'cluster.Cluster', (["data['cluster']", "data['tenant']"], {}), "(data['cluster'], data['tenant'])\n", (1074, 1107), False, 'from commodore import cluster\n'), ((1522, 1550), 'commodore.inventory.Inventory', 'Inventory', ([], {'work_dir': 'tmp_path'}), '(work_dir=tmp_path)\n...
import webbrowser class Movie(): '''This is a class for storing information about movies.''' def __init__(self, movie_title, movie_year, poster_image, trailer_youtube, movie_rating): self.title = movie_title self.year = movie_year self.poster_image_url = poster_image self.traile...
[ "webbrowser.open" ]
[((470, 511), 'webbrowser.open', 'webbrowser.open', (['self.trailer_youtube_url'], {}), '(self.trailer_youtube_url)\n', (485, 511), False, 'import webbrowser\n')]
# Copyright 2013 Google Inc. All Rights Reserved. """Provide commands for managing SSL certificates of Cloud SQL instances.""" from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions class SslCerts(base.Group): """Provide commands for managing SSL certificates of Cloud SQL instanc...
[ "googlecloudsdk.calliope.exceptions.ToolException" ]
[((707, 769), 'googlecloudsdk.calliope.exceptions.ToolException', 'exceptions.ToolException', (['"""argument --instance/-i is required"""'], {}), "('argument --instance/-i is required')\n", (731, 769), False, 'from googlecloudsdk.calliope import exceptions\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from random import randint from set_aws_mfa.data.data_manager import ProfileTuple from set_aws_mfa.helper import helper from set_aws_mfa import validate from set_aws_mfa.data import data_manager from set_aws_mfa.helper.helper import IntObject from set_aws_mfa import promp...
[ "set_aws_mfa.helper.helper.IntObject", "set_aws_mfa.prompts.prompt_for_asking_aws_account_id", "set_aws_mfa.data.data_manager.get_role_list_for_a_profile", "set_aws_mfa.data.data_manager.get_selected_profile", "set_aws_mfa.data.data_manager.get_aws_account_id", "set_aws_mfa.data.data_manager.get_mfa_arn",...
[((1609, 1660), 'set_aws_mfa.prompts.prompt_user_selection', 'prompts.prompt_user_selection', (['perfect_profile_list'], {}), '(perfect_profile_list)\n', (1638, 1660), False, 'from set_aws_mfa import prompts\n'), ((2182, 2217), 'set_aws_mfa.data.data_manager.get_selected_profile', 'data_manager.get_selected_profile', (...
from django.contrib import admin from .models import UserLog admin.site.register(UserLog)
[ "django.contrib.admin.site.register" ]
[((62, 90), 'django.contrib.admin.site.register', 'admin.site.register', (['UserLog'], {}), '(UserLog)\n', (81, 90), False, 'from django.contrib import admin\n')]
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.http.response import HttpResponse from django.http import JsonResponse from django.template.response import SimpleTemplateResponse, TemplateResponse from django.urls import path, reve...
[ "mwbase.forms.ImportXLSXForm", "mwbase.utils.sms_bank.create_xlsx", "mwbase.utils.sms_bank.check_messages", "django.contrib.admin.site.register", "django.http.JsonResponse", "django.template.response.TemplateResponse", "swapper.load_model", "django.contrib.admin.register", "django.urls.reverse", "...
[((601, 649), 'swapper.load_model', 'swapper.load_model', (['"""mwbase"""', '"""AutomatedMessage"""'], {}), "('mwbase', 'AutomatedMessage')\n", (619, 649), False, 'import swapper\n'), ((664, 707), 'swapper.load_model', 'swapper.load_model', (['"""mwbase"""', '"""Participant"""'], {}), "('mwbase', 'Participant')\n", (68...
import logging from .util import raw_get from google.appengine.api.taskqueue import TaskAlreadyExistsError from google.appengine.api.taskqueue import TombstonedTaskError from google.appengine.ext import ndb from google.appengine.ext import deferred from datetime import datetime from time import time CACHE_TIMEO...
[ "time.time", "google.appengine.ext.ndb.DateTimeProperty", "datetime.datetime.utcfromtimestamp", "google.appengine.ext.deferred.defer", "google.appengine.ext.ndb.StringProperty", "google.appengine.ext.ndb.JsonProperty", "logging.critical", "google.appengine.ext.ndb.Key" ]
[((431, 464), 'google.appengine.ext.ndb.Key', 'ndb.Key', (['CachedResponse', 'endpoint'], {}), '(CachedResponse, endpoint)\n', (438, 464), False, 'from google.appengine.ext import ndb\n'), ((2309, 2361), 'google.appengine.ext.ndb.StringProperty', 'ndb.StringProperty', (['"""e"""'], {'required': '(True)', 'indexed': '(T...
import numpy as np import sys import os import json import csv import re import random import subprocess from markdown2 import Markdown from Bio import Entrez from Bio import SeqIO from collections import defaultdict, OrderedDict from scipy import stats from utils import getBindingCore, importBindData,\ importData, r...
[ "utils.getBindingCore", "json.load", "utils.importData", "markdown2.Markdown", "scipy.stats.fisher_exact", "collections.defaultdict", "utils.reference_retreive", "re.sub", "utils.getRandomColor" ]
[((2904, 2914), 'markdown2.Markdown', 'Markdown', ([], {}), '()\n', (2912, 2914), False, 'from markdown2 import Markdown\n'), ((2924, 2947), 'utils.getRandomColor', 'getRandomColor', (['options'], {}), '(options)\n', (2938, 2947), False, 'from utils import getBindingCore, importBindData, importData, reference_retreive,...
import numpy as np from grabscreen import grab_screen from directkeys import Up , Down , PressKey , ReleaseKey , Move1 , Move2 import time from getkeys import key_check import cv2 def main () : while(True) : #Resize the game window to about less than quarter of the screen at 1920*1080 resolution ...
[ "getkeys.key_check", "directkeys.Move2", "grabscreen.grab_screen", "directkeys.Move1" ]
[((420, 431), 'getkeys.key_check', 'key_check', ([], {}), '()\n', (429, 431), False, 'from getkeys import key_check\n'), ((847, 858), 'directkeys.Move2', 'Move2', (['(0)', '(0)'], {}), '(0, 0)\n', (852, 858), False, 'from directkeys import Up, Down, PressKey, ReleaseKey, Move1, Move2\n'), ((1281, 1292), 'directkeys.Mov...