code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" Get frequencies """ import os import random import projrot_io import autofile from lib import filesys from lib.submission import run_script from lib.submission import DEFAULT_SCRIPT_DCT def projrot_freqs(geoms, hessians, run_path, grads=((),), rotors_str='', coord_proj='cartesian', ...
[ "os.path.exists", "autofile.fs.build", "os.makedirs", "os.path.join", "projrot_io.reader.rpht_output", "projrot_io.writer.rpht_input", "random.randint", "lib.submission.run_script" ]
[((539, 566), 'autofile.fs.build', 'autofile.fs.build', (['run_path'], {}), '(run_path)\n', (556, 566), False, 'import autofile\n'), ((1155, 1257), 'projrot_io.writer.rpht_input', 'projrot_io.writer.rpht_input', (['geoms', 'grads', 'hessians'], {'rotors_str': 'rotors_str', 'coord_proj': 'coord_proj'}), '(geoms, grads, ...
#!/usr/bin/python3 """ I created this program to have a simple command to connect to my home network using sshuttle. The program has two self explainatory arguments: start and stop. """ import os import sys import time def get_current_ip(): # gets your current ip ip = os.popen("curl -s checkip.dyndns.org | \ ...
[ "os.system", "os.popen", "time.time" ]
[((508, 519), 'time.time', 'time.time', ([], {}), '()\n', (517, 519), False, 'import time\n'), ((539, 550), 'time.time', 'time.time', ([], {}), '()\n', (548, 550), False, 'import time\n'), ((278, 390), 'os.popen', 'os.popen', (['"""curl -s checkip.dyndns.org | sed -e \'s/.*Current IP Address: //\' -e \'s/<....
import sys sys.path.append('../') import numpy as np import matplotlib.pyplot as plt import matplotlib import matplotlib.gridspec as gridspec from mpl_toolkits.axes_grid1 import make_axes_locatable import seaborn as sns from network import Protocol, NetworkManager, BCPNNPerfect, TimedInput from connectivity_functions...
[ "connectivity_functions.create_orthogonal_canonical_representation", "seaborn.set_style", "analysis_functions.get_weights", "network.BCPNNPerfect", "connectivity_functions.build_network_representation", "sys.path.append", "numpy.arange", "seaborn.set", "seaborn.color_palette", "numpy.diff", "con...
[((11, 33), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (26, 33), False, 'import sys\n'), ((4212, 4235), 'seaborn.set', 'sns.set', ([], {'font_scale': '(2.8)'}), '(font_scale=2.8)\n', (4219, 4235), True, 'import seaborn as sns\n'), ((4236, 4264), 'seaborn.set_style', 'sns.set_style', ([], {'...
import more_itertools import structlog from covidactnow.datapublic.common_fields import CommonFields from libs.datasets.sources import zeros_filter from libs.pipeline import Region from tests import test_helpers from tests.test_helpers import TimeseriesLiteral import pandas as pd def test_basic(): region_tx = Re...
[ "libs.pipeline.Region.from_fips", "libs.datasets.sources.zeros_filter.drop_all_zero_timeseries", "libs.pipeline.Region.from_state", "tests.test_helpers.assert_dataset_like", "more_itertools.one", "structlog.testing.capture_logs", "tests.test_helpers.make_tag", "pandas.MultiIndex.from_tuples", "tests...
[((318, 341), 'libs.pipeline.Region.from_state', 'Region.from_state', (['"""TX"""'], {}), "('TX')\n", (335, 341), False, 'from libs.pipeline import Region\n'), ((358, 383), 'libs.pipeline.Region.from_fips', 'Region.from_fips', (['"""06075"""'], {}), "('06075')\n", (374, 383), False, 'from libs.pipeline import Region\n'...
import numpy as np import pandas as pd import pathlib from relm.mechanisms import GeometricMechanism EPSILON = 2 ** -3 SENSITIVITY = 1.0 # ======================================================================================== # Read the raw data. filename = "pcr_testing_age_group_2020-03-09.csv" path = pathlib.Pa...
[ "pandas.DataFrame", "relm.mechanisms.GeometricMechanism", "pandas.read_csv", "pathlib.Path" ]
[((366, 383), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (377, 383), True, 'import pandas as pd\n'), ((649, 709), 'relm.mechanisms.GeometricMechanism', 'GeometricMechanism', ([], {'epsilon': 'EPSILON', 'sensitivity': 'SENSITIVITY'}), '(epsilon=EPSILON, sensitivity=SENSITIVITY)\n', (667, 709), False, ...
from __future__ import print_function, absolute_import from collections import OrderedDict from ._result_base import H5NastranResultBase from h5Nastran.post_process.result_readers.punch import PunchReader import numpy as np import tables from six import iteritems class H5NastranResultPunch(H5NastranResultBase): ...
[ "h5Nastran.post_process.result_readers.punch.PunchReader", "tables.descr_from_dtype", "numpy.dtype", "six.iteritems" ]
[((780, 801), 'h5Nastran.post_process.result_readers.punch.PunchReader', 'PunchReader', (['filename'], {}), '(filename)\n', (791, 801), False, 'from h5Nastran.post_process.result_readers.punch import PunchReader\n'), ((1122, 1201), 'numpy.dtype', 'np.dtype', (["[('SUBCASE_ID', '<i8'), ('LOAD_FACTOR', '<f8'), ('DOMAIN_I...
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from sis_provisioner.management.commands import SISProvisionerCommand from sis_provisioner.models.user import User class Command(SISProvisionerCommand): help = "Loads users for provisioning, from pre-defined groups" def h...
[ "sis_provisioner.models.user.User.objects.add_all_users" ]
[((359, 387), 'sis_provisioner.models.user.User.objects.add_all_users', 'User.objects.add_all_users', ([], {}), '()\n', (385, 387), False, 'from sis_provisioner.models.user import User\n')]
#!/usr/bin/python3 import configparser import os.path class IniFile : def __init__(self): self.configfile = os.path.expanduser("~/.squareplay.ini") self.config = configparser.RawConfigParser() self.main_section = 'Squareplay' self.read() def read(self): if os.path.exis...
[ "configparser.RawConfigParser" ]
[((184, 214), 'configparser.RawConfigParser', 'configparser.RawConfigParser', ([], {}), '()\n', (212, 214), False, 'import configparser\n')]
import _zipfile # https://docs.python.org/3/library/zipfile.html?highlight=zipfile#zipfile.ZipFile # (file, mode='r', compression=ZIP_STORED, allowZip64=True, compresslevel=None, *, strict_timestamps=True) def ZipFile(file, mode='r', compression=0, allowZip64=True, compresslevel=None, *, strict_timestamps=True): z...
[ "_zipfile.ZipFile" ]
[((324, 342), '_zipfile.ZipFile', '_zipfile.ZipFile', ([], {}), '()\n', (340, 342), False, 'import _zipfile\n')]
import unittest import sys # automake build dir sys.path.insert(0, '..') sys.path.insert(0, '../.libs') # cmake build dir sys.path.insert(0, '../../../build/bindings/python') from pywsman import * class TestAddSelector(unittest.TestCase): def test_add_selector(self): options = ClientOptions() ass...
[ "unittest.main", "sys.path.insert" ]
[((49, 73), 'sys.path.insert', 'sys.path.insert', (['(0)', '""".."""'], {}), "(0, '..')\n", (64, 73), False, 'import sys\n'), ((74, 104), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../.libs"""'], {}), "(0, '../.libs')\n", (89, 104), False, 'import sys\n'), ((123, 175), 'sys.path.insert', 'sys.path.insert', (['(...
import os from collections import defaultdict, Counter from magweaver.genome import Mag # TODO: Remove all within file calls to hard paths, move to magweaver.py BASEPATH = os.path.dirname(os.path.abspath(__file__)) TMP_DIR = os.path.join(BASEPATH, "tmp") OUT_DIR = os.path.join(BASEPATH, "results") def create_mag(mag_...
[ "os.path.exists", "os.path.join", "collections.Counter", "collections.defaultdict", "magweaver.genome.Mag", "os.mkdir", "os.path.abspath" ]
[((226, 255), 'os.path.join', 'os.path.join', (['BASEPATH', '"""tmp"""'], {}), "(BASEPATH, 'tmp')\n", (238, 255), False, 'import os\n'), ((266, 299), 'os.path.join', 'os.path.join', (['BASEPATH', '"""results"""'], {}), "(BASEPATH, 'results')\n", (278, 299), False, 'import os\n'), ((189, 214), 'os.path.abspath', 'os.pat...
import argparse import json from typing import Union from pathlib import Path PathLike = Union[str, Path] def get_parser(): parser = argparse.ArgumentParser() parser.add_argument( "--variational_node", action="store_true", help="Use variational node encoder" ) parser.add_argument( "-...
[ "json.load", "argparse.Namespace", "argparse.ArgumentParser", "pathlib.Path" ]
[((141, 166), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (164, 166), False, 'import argparse\n'), ((2413, 2433), 'argparse.Namespace', 'argparse.Namespace', ([], {}), '()\n', (2431, 2433), False, 'import argparse\n'), ((2465, 2477), 'json.load', 'json.load', (['f'], {}), '(f)\n', (2474, 247...
import factory import factory.django from django.db.models.signals import post_save from .. import models from ...users.tests import factories as userfac @factory.django.mute_signals(post_save) class GamerProfileFactory(factory.django.DjangoModelFactory): class Meta: model = models.GamerProfile user...
[ "factory.django.mute_signals", "factory.Sequence", "factory.SubFactory", "factory.RelatedFactory" ]
[((158, 196), 'factory.django.mute_signals', 'factory.django.mute_signals', (['post_save'], {}), '(post_save)\n', (185, 196), False, 'import factory\n'), ((636, 674), 'factory.django.mute_signals', 'factory.django.mute_signals', (['post_save'], {}), '(post_save)\n', (663, 674), False, 'import factory\n'), ((323, 362), ...
import csv import sys from pathlib import Path def main(): ranked_list = [] print(sys.path[0]) print("\nEnter input file name:") inputFile = input() print("\nEnter output file name (will append .csv, will overwrite if file of same name exists):") outputFile = input() print("\nVote for the b...
[ "csv.writer", "pathlib.Path" ]
[((380, 397), 'pathlib.Path', 'Path', (['sys.path[0]'], {}), '(sys.path[0])\n', (384, 397), False, 'from pathlib import Path\n'), ((1309, 1325), 'csv.writer', 'csv.writer', (['fOut'], {}), '(fOut)\n', (1319, 1325), False, 'import csv\n'), ((1218, 1235), 'pathlib.Path', 'Path', (['sys.path[0]'], {}), '(sys.path[0])\n', ...
# 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 u...
[ "forml.io.dsl.parser.Container", "forml.io.dsl.Join", "pytest.raises", "pytest.fixture", "forml.io.dsl.String" ]
[((1077, 1109), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (1091, 1109), False, 'import pytest\n'), ((1238, 1270), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (1252, 1270), False, 'import pytest\n'), ((3401, 3432), 'p...
# Generated by Django 2.0.3 on 2018-03-22 10:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20180321_2140'), ] operations = [ migrations.AddField( model_name='student', name='name', ...
[ "django.db.models.CharField" ]
[((330, 373), 'django.db.models.CharField', 'models.CharField', ([], {'default': '(1)', 'max_length': '(255)'}), '(default=1, max_length=255)\n', (346, 373), False, 'from django.db import migrations, models\n'), ((528, 571), 'django.db.models.CharField', 'models.CharField', ([], {'default': '(1)', 'max_length': '(255)'...
import os import vim try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser cache = {} def load_settings(file): file_dir = os.path.dirname(file) for dir, settings in cache.items(): if file_dir.startswith(dir): return settings dir ...
[ "os.path.isfile", "os.path.dirname", "os.path.join", "ConfigParser.ConfigParser" ]
[((183, 204), 'os.path.dirname', 'os.path.dirname', (['file'], {}), '(file)\n', (198, 204), False, 'import os\n'), ((383, 418), 'os.path.join', 'os.path.join', (['dir', '""".localsettings"""'], {}), "(dir, '.localsettings')\n", (395, 418), False, 'import os\n'), ((430, 459), 'os.path.isfile', 'os.path.isfile', (['setti...
"""Option - MODEL """ from sqlalchemy import Column, String, Text, UniqueConstraint from sqlalchemy.orm.exc import NoResultFound from app.models.base import Base class Option(Base): __tablename__ = 'options' name = Column(String(50), nullable=False) value = Column(Text()) __table_args__ = ( ...
[ "sqlalchemy.Text", "sqlalchemy.String", "sqlalchemy.UniqueConstraint" ]
[((236, 246), 'sqlalchemy.String', 'String', (['(50)'], {}), '(50)\n', (242, 246), False, 'from sqlalchemy import Column, String, Text, UniqueConstraint\n'), ((283, 289), 'sqlalchemy.Text', 'Text', ([], {}), '()\n', (287, 289), False, 'from sqlalchemy import Column, String, Text, UniqueConstraint\n'), ((323, 361), 'sql...
# Generated by Django 3.0.4 on 2020-05-09 09:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0002_auto_20200509_0450'), ] operations = [ migrations.AlterField( model_name='comment', name='approved_comm...
[ "django.db.models.DateTimeField", "django.db.models.BooleanField" ]
[((344, 378), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (363, 378), False, 'from django.db import migrations, models\n'), ((507, 546), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (52...
#!/usr/bin/env python3 import sys import shlex import os args = sys.argv del args[0] new_args = ["xcrun"] is_just_c_not_cpp = True for arg in sys.argv: if arg.endswith(".cpp") or arg.endswith(".cxx"): is_just_c_not_cpp = False for arg in sys.argv: if is_just_c_not_cpp and arg.startswith("-std=c++"...
[ "shlex.join", "os.system" ]
[((554, 574), 'shlex.join', 'shlex.join', (['new_args'], {}), '(new_args)\n', (564, 574), False, 'import shlex\n'), ((584, 602), 'os.system', 'os.system', (['command'], {}), '(command)\n', (593, 602), False, 'import os\n')]
import math n1 = float(input('Digite um número: ')) print(f'O número {n1} possui como porção inteira {math.trunc(n1)}')
[ "math.trunc" ]
[((105, 119), 'math.trunc', 'math.trunc', (['n1'], {}), '(n1)\n', (115, 119), False, 'import math\n')]
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup, ParseMode from telegram.ext import CallbackContext, CommandHandler def rps(update: Update, context: CallbackContext): if ( update.effective_chat is None or update.effective_user is None or context.chat_data is None ...
[ "telegram.InlineKeyboardMarkup", "telegram.InlineKeyboardButton", "telegram.ext.CommandHandler" ]
[((1628, 1654), 'telegram.ext.CommandHandler', 'CommandHandler', (['"""rps"""', 'rps'], {}), "('rps', rps)\n", (1642, 1654), False, 'from telegram.ext import CallbackContext, CommandHandler\n'), ((937, 967), 'telegram.InlineKeyboardMarkup', 'InlineKeyboardMarkup', (['keyboard'], {}), '(keyboard)\n', (957, 967), False, ...
import json import pytest from plenum.common.request import Request from plenum.common.constants import AML from plenum.common.exceptions import InvalidClientRequest def test_taa_acceptance_static_validation(write_manager, taa_aml_request): taa_aml_request = json.loads(taa_aml_request) taa_aml_request['oper...
[ "json.loads", "pytest.raises", "plenum.common.request.Request" ]
[((267, 294), 'json.loads', 'json.loads', (['taa_aml_request'], {}), '(taa_aml_request)\n', (277, 294), False, 'import json\n'), ((678, 705), 'json.loads', 'json.loads', (['taa_aml_request'], {}), '(taa_aml_request)\n', (688, 705), False, 'import json\n'), ((348, 383), 'pytest.raises', 'pytest.raises', (['InvalidClient...
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
[ "datetime.datetime.strptime", "tinctest.TINCTestLoader", "unittest2.skip" ]
[((821, 842), 'unittest2.skip', 'unittest.skip', (['"""mock"""'], {}), "('mock')\n", (834, 842), True, 'import unittest2 as unittest\n'), ((1301, 1317), 'tinctest.TINCTestLoader', 'TINCTestLoader', ([], {}), '()\n', (1315, 1317), False, 'from tinctest import TINCTestLoader\n'), ((1876, 1937), 'datetime.datetime.strptim...
""" This module provides functionality for converting noggin metrics to xarray objects, and for building a dataset from multiple iterations of an experiment. """ from collections import namedtuple from typing import Dict, Tuple, Union import numpy as np import xarray as xr from numpy import ndarray from xarray import...
[ "xarray.concat", "xarray.merge", "collections.namedtuple", "xarray.DataArray" ]
[((518, 564), 'collections.namedtuple', 'namedtuple', (['"""MetricArrays"""', "('batch', 'epoch')"], {}), "('MetricArrays', ('batch', 'epoch'))\n", (528, 564), False, 'from collections import namedtuple\n'), ((4043, 4129), 'xarray.DataArray', 'xr.DataArray', (['exp_inds'], {'name': '"""experiment"""', 'dims': "['experi...
import random import pandas as pd # Columns in the dataset. my_columns = ['site', 'species', 'abundances'] # Fix the random seed to have reproducible results. random.seed(42) print("Generating a new dataset...") def generate_data(): """ Generate entries for the dataset. """ for site_no in range(1, ...
[ "random.randint", "random.seed" ]
[((162, 177), 'random.seed', 'random.seed', (['(42)'], {}), '(42)\n', (173, 177), False, 'import random\n'), ((525, 546), 'random.randint', 'random.randint', (['(0)', '(42)'], {}), '(0, 42)\n', (539, 546), False, 'import random\n')]
# Copyright 2017 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...
[ "click.testing.CliRunner", "unittest.mock.patch.object" ]
[((1313, 1324), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (1322, 1324), False, 'from click.testing import CliRunner\n'), ((2016, 2027), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (2025, 2027), False, 'from click.testing import CliRunner\n'), ((2506, 2517), 'click.testing.CliRunner', 'CliR...
""" * File name: test_postgresql.py * Purpose: test postgresql.py * Use python moduel unittest """ # the inclusion of the tests module is not meant to offer best practices for # testing in general, but rather to support the `find_packages` example in # setup.py that excludes installing the "tests" package import os im...
[ "os.path.isfile", "postgresql.PostgreSQL", "os.path.abspath", "unittest.main" ]
[((821, 845), 'os.path.isfile', 'os.path.isfile', (['passfile'], {}), '(passfile)\n', (835, 845), False, 'import os\n'), ((2818, 2833), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2831, 2833), False, 'import unittest\n'), ((1297, 1348), 'postgresql.PostgreSQL', 'PostgreSQL', (['host', 'user', 'dbname', 'passwo...
import datetime import hashlib import logging import os from logging.handlers import SysLogHandler from utils.settings_handler import settings LOG_FORMAT = "%(asctime)s %(levelname)s: %(message)s" DATE_FORMAT = "%Y-%m-%d %H:%M:%S" class ColoredFormatter(logging.Formatter): """ Apply only to the console hand...
[ "logging.getLogger", "os.path.exists", "utils.settings_handler.settings.USER_ID.encode", "logging.StreamHandler", "logging.Formatter", "os.path.join", "os.path.realpath", "datetime.datetime.now", "os.mkdir", "logging.handlers.SysLogHandler" ]
[((1013, 1043), 'logging.getLogger', 'logging.getLogger', (['logger_name'], {}), '(logger_name)\n', (1030, 1043), False, 'import logging\n'), ((779, 810), 'logging.Formatter', 'logging.Formatter', (['format_style'], {}), '(format_style)\n', (796, 810), False, 'import logging\n'), ((1118, 1141), 'logging.StreamHandler',...
import web import socketserver ## #WEB SERVER ## PORT=8000 socketserver.TCPServer.allow_reuse_address = True Handler = web.testHTTPRequestHandler httpd = socketserver.TCPServer(("", PORT), Handler) print("serving at port", PORT) httpd.serve_forever()
[ "socketserver.TCPServer" ]
[((155, 198), 'socketserver.TCPServer', 'socketserver.TCPServer', (["('', PORT)", 'Handler'], {}), "(('', PORT), Handler)\n", (177, 198), False, 'import socketserver\n')]
""" Tests for oboeware/oninit.py functionality. """ import base from oboeware import oninit import oboe import unittest2 as unittest import logging class TestOnInit(base.TraceTestCase): def __init__(self, *args, **kwargs): super(TestOnInit, self).__init__(*args, **kwargs) def setUp(self): sel...
[ "oboeware.oninit.report_layer_init", "unittest2.main" ]
[((874, 889), 'unittest2.main', 'unittest.main', ([], {}), '()\n', (887, 889), True, 'import unittest2 as unittest\n'), ((741, 781), 'oboeware.oninit.report_layer_init', 'oninit.report_layer_init', ([], {'layer': '"""Django"""'}), "(layer='Django')\n", (765, 781), False, 'from oboeware import oninit\n')]
# -*- coding: utf-8 -*- """ @author: NysanAskar """ import numpy as np import tensorflow as tf from keras import backend as K import keras from tensorflow.keras.layers import ( Add, Input, ) from utils import xywh_to_x1y1x2y2, broadcast_iou, binary_cross_entropy anchors_wh = np.array([[10, 13...
[ "tensorflow.shape", "tensorflow.sort", "keras.backend.shape", "tensorflow.math.log", "tensorflow.reduce_sum", "tensorflow.split", "keras.backend.softplus", "tensorflow.keras.layers.BatchNormalization", "numpy.array", "tensorflow.cast", "tensorflow.keras.layers.Input", "tensorflow.keras.layers....
[((303, 425), 'numpy.array', 'np.array', (['[[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [\n 156, 198], [373, 326]]', 'np.float32'], {}), '([[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116,\n 90], [156, 198], [373, 326]], np.float32)\n', (311, 425), True, 'import nump...
from app.utils import CheckQuality from django.shortcuts import redirect, render from django.contrib.auth.decorators import login_required from django.views.generic.detail import DetailView from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import status from...
[ "django.shortcuts.render", "app.utils.CheckQuality", "rest_framework.response.Response", "django.shortcuts.redirect", "app.forms.RegisternForms", "channels.layers.get_channel_layer", "app.models.Parameters.objects.create", "django.contrib.auth.models.User.objects.get", "rest_framework.decorators.api...
[((1311, 1328), 'rest_framework.decorators.api_view', 'api_view', (["['PUT']"], {}), "(['PUT'])\n", (1319, 1328), False, 'from rest_framework.decorators import api_view\n'), ((603, 654), 'django.shortcuts.render', 'render', (['request', '"""dashboard/index.html"""'], {'context': '{}'}), "(request, 'dashboard/index.html...
from django.urls import path from . import views urlpatterns = [ path('',views.UserForm, name='person') ]
[ "django.urls.path" ]
[((70, 109), 'django.urls.path', 'path', (['""""""', 'views.UserForm'], {'name': '"""person"""'}), "('', views.UserForm, name='person')\n", (74, 109), False, 'from django.urls import path\n')]
n, m = map(int, input().split()) arr = [[0] * (m + 1) for i in range(n + 1)] arr[0][1] = 1 import sys print(sys.getsizeof(arr) / 1024 / 1024) for i in range(1, n + 1): for j in range(1, m + 1): arr[i][j] = arr[i - 1][j] + arr[i][j - 1] print(arr[n][m])
[ "sys.getsizeof" ]
[((113, 131), 'sys.getsizeof', 'sys.getsizeof', (['arr'], {}), '(arr)\n', (126, 131), False, 'import sys\n')]
# -*- coding: utf-8 -*- """ Created on Sat Jun 27 12:00:00 2020 @author: <NAME>, <NAME> Module: RESTful API to communicate with the frontend. """ import flask from flask import request, jsonify from flask_cors import CORS import get_songs import general app = flask.Flask(__name__) CORS(app) app.config["DEBUG"...
[ "flask_cors.CORS", "flask.Flask", "get_songs.CreateWikipediaConnection", "general._isint", "flask.jsonify" ]
[((270, 291), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (281, 291), False, 'import flask\n'), ((292, 301), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (296, 301), False, 'from flask_cors import CORS\n'), ((998, 1088), 'get_songs.CreateWikipediaConnection', 'get_songs.CreateWikipediaConn...
# automate # <NAME> from cell import Cell from grid import Grid from cell_types import CellType from grid_generator import GridGenerator from PIL import Image import tkinter as tk from math import floor from tkinter import filedialog root = tk.Tk() root.title("Conway's Game of Life Cellular Automata") class Automata...
[ "grid_generator.GridGenerator", "tkinter.Tk", "tkinter.filedialog.askopenfilename", "PIL.Image.open" ]
[((243, 250), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (248, 250), True, 'import tkinter as tk\n'), ((1779, 1793), 'PIL.Image.open', 'Image.open', (['fn'], {}), '(fn)\n', (1789, 1793), False, 'from PIL import Image\n'), ((1808, 1826), 'grid_generator.GridGenerator', 'GridGenerator', (['img'], {}), '(img)\n', (1821, 182...
#!/usr/bin/python # -------------------------------------------------------------------------- # # Copyright 2016-2018 # # # # Portions copyright OpenNebula Project (OpenNebula.org), CG12 L...
[ "subprocess.check_output", "os.listdir", "xml.etree.ElementTree.parse", "subprocess.Popen", "subprocess.call", "os.path.basename", "sys.exit", "os.stat", "os.major", "os.minor", "time.time" ]
[((4144, 4170), 'xml.etree.ElementTree.parse', 'ET.parse', (['xml'], {'parser': 'None'}), '(xml, parser=None)\n', (4152, 4170), True, 'import xml.etree.ElementTree as ET\n'), ((6965, 7018), 'subprocess.call', 'sp.call', (["('mount ' + source + ' ' + target)"], {'shell': '(True)'}), "('mount ' + source + ' ' + target, s...
#!/bin/env python import os import itk import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt from glob import glob from FemurSegmentation.IOManager import ImageReader from FemurSegmentation.IOManager import VolumeWriter from FemurSegmentation.filters import execute_pipeline from Femu...
[ "FemurSegmentation.IOManager.ImageReader", "FemurSegmentation.filters.adjust_physical_space", "argparse.ArgumentParser", "FemurSegmentation.metrics.itk_hausdorff_distance_map", "FemurSegmentation.metrics.itk_label_overlapping_measures", "pandas.DataFrame.from_dict", "os.path.basename", "FemurSegmentat...
[((659, 707), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'description'}), '(description=description)\n', (682, 707), False, 'import argparse\n'), ((1955, 1968), 'FemurSegmentation.IOManager.ImageReader', 'ImageReader', ([], {}), '()\n', (1966, 1968), False, 'from FemurSegmentation.IOMana...
from enum import Enum import re import sqlite3 from textwrap import dedent from typing import Tuple, List VERSION = "0.3.0" color_pattern = re.compile( r"\[(?P<color>#[0-9a-fA-F]{6})\](?P<body>[^\[]*?)\[/(?:#[0-9a-fA-F]{6})?\]" ) def format_time(seconds: int) -> str: return f"{seconds // 60}:{seconds % 60:0...
[ "re.sub", "textwrap.dedent", "sqlite3.connect", "re.compile" ]
[((142, 243), 're.compile', 're.compile', (['"""\\\\[(?P<color>#[0-9a-fA-F]{6})\\\\](?P<body>[^\\\\[]*?)\\\\[/(?:#[0-9a-fA-F]{6})?\\\\]"""'], {}), "(\n '\\\\[(?P<color>#[0-9a-fA-F]{6})\\\\](?P<body>[^\\\\[]*?)\\\\[/(?:#[0-9a-fA-F]{6})?\\\\]'\n )\n", (152, 243), False, 'import re\n'), ((454, 487), 're.sub', 're.su...
import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from tf_keras_vis import ModelVisualization from tf_keras_vis.utils import check_steps, listify class Saliency(ModelVisualization): def __call__(self, loss, seed_input, smooth_sample...
[ "numpy.random.normal", "tf_keras_vis.utils.check_steps", "numpy.ones", "tf_keras_vis.utils.listify", "numpy.zeros_like", "numpy.max", "tensorflow.GradientTape", "tensorflow.math.reduce_max", "tensorflow.keras.backend.abs", "tensorflow.math.reduce_min" ]
[((443, 455), 'tensorflow.keras.backend.abs', 'K.abs', (['grads'], {}), '(grads)\n', (448, 455), True, 'import tensorflow.keras.backend as K\n'), ((2204, 2231), 'tf_keras_vis.utils.check_steps', 'check_steps', (['smooth_samples'], {}), '(smooth_samples)\n', (2215, 2231), False, 'from tf_keras_vis.utils import check_ste...
# SPDX-License-Identifier: MIT import typing import xml.etree.ElementTree as ET import pytest import dbus_objects.types from dbus_objects.object import DBusObject, DBusObjectException from dbus_objects.signature import DBusSignature @pytest.mark.parametrize( ('types', 'signature'), [ (str, 's'), ...
[ "dbus_objects.signature.DBusSignature._type_signature", "xml.etree.ElementTree.tostring", "pytest.mark.parametrize", "pytest.raises", "dbus_objects.signature.DBusSignature" ]
[((240, 1096), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["('types', 'signature')", "[(str, 's'), (int, 'i'), (float, 'd'), (dbus_objects.types.Byte, 'y'), (\n dbus_objects.types.UInt16, 'q'), (dbus_objects.types.UInt32, 'u'), (\n dbus_objects.types.UInt64, 't'), (dbus_objects.types.Int16, 'n'), (\n ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from django.urls import reverse_lazy from django import forms from django.db.models import Q from crispy_forms.helper import FormHelper from crispy_forms.layout import * from crispy_forms.bootstrap import * from crispy_forms.layout import Layout, Submit, Reset, Div from fun...
[ "crispy_forms.layout.Submit", "indicators.models.PeriodicTarget.objects.filter", "crispy_forms.layout.Reset", "django.forms.Textarea", "workflow.models.SiteProfile.objects.filter", "indicators.models.Indicator.objects.get", "workflow.models.ProjectComplete.objects.filter", "django.urls.reverse_lazy", ...
[((823, 872), 'functools.partial', 'partial', (['forms.DateInput', "{'class': 'datepicker'}"], {}), "(forms.DateInput, {'class': 'datepicker'})\n", (830, 872), False, 'from functools import partial\n'), ((5111, 5128), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (5126, 5128), False, 'from django impor...
""" Plot loss and associated metrics throughout training. First argument is path to directory for a specific training run (e.g., /home/tscott/Documents/curl/tmp/cartpole/cartpole-swingup-05-19-im84-b125-nes100000-s406565-pixel-curl_sac) """ from collections import defaultdict import os import sys import matplotlib...
[ "matplotlib.pyplot.suptitle", "collections.defaultdict", "matplotlib.pyplot.subplots", "os.path.join" ]
[((3398, 3415), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (3409, 3415), False, 'from collections import defaultdict\n'), ((408, 455), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(2)', '(2)'], {'figsize': '(8, 8)', 'sharex': '(True)'}), '(2, 2, figsize=(8, 8), sharex=True)\n', (420, 455)...
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.colors import LinearSegmentedColormap import matplotlib.gridspec as gridspec import matplotlib.patches as patches class ContagionSimulator: def __init__(self): pass def set_params(self, params...
[ "matplotlib.patches.Rectangle", "numpy.sqrt", "numpy.ones", "numpy.random.rand", "matplotlib.animation.FuncAnimation", "numpy.zeros", "numpy.random.randint", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.figure", "numpy.cos", "numpy.sin", "matplotlib.colors.LinearSegmentedColormap.from_li...
[((654, 677), 'numpy.random.rand', 'np.random.rand', (['nagents'], {}), '(nagents)\n', (668, 677), True, 'import numpy as np\n'), ((695, 718), 'numpy.random.rand', 'np.random.rand', (['nagents'], {}), '(nagents)\n', (709, 718), True, 'import numpy as np\n'), ((1113, 1141), 'numpy.ones', 'np.ones', (['nagents'], {'dtype...
"""Problem 60 02 January 2004 The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for a set of four pr...
[ "eulerlib.isPrime", "pickle.load" ]
[((734, 756), 'pickle.load', 'pickle.load', (['primefile'], {}), '(primefile)\n', (745, 756), False, 'import pickle\n'), ((1019, 1040), 'eulerlib.isPrime', 'eulerlib.isPrime', (['num'], {}), '(num)\n', (1035, 1040), False, 'import eulerlib\n')]
from django.test import TestCase from django.core import mail from myhpom.models import CloudFactoryDocumentRun, DocumentUrl from myhpom.tasks import EmailUserDocumentReviewCompleted from myhpom.tests.factories import AdvanceDirectiveFactory class EmailUserDocumentReviewCompletedTestCase(TestCase): """ * If t...
[ "myhpom.tests.factories.AdvanceDirectiveFactory" ]
[((635, 660), 'myhpom.tests.factories.AdvanceDirectiveFactory', 'AdvanceDirectiveFactory', ([], {}), '()\n', (658, 660), False, 'from myhpom.tests.factories import AdvanceDirectiveFactory\n')]
# Generated by Django 2.2.6 on 2020-02-01 21:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fetcher', '0001_initial'), ] operations = [ migrations.AlterField( model_name='fetchrun', name='source', ...
[ "django.db.models.CharField" ]
[((327, 416), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[(0, 'ArchivesSpace'), (1, 'Cartographer')]", 'max_length': '(100)'}), "(choices=[(0, 'ArchivesSpace'), (1, 'Cartographer')],\n max_length=100)\n", (343, 416), False, 'from django.db import migrations, models\n')]
from bson.objectid import ObjectId from fastapi import APIRouter, HTTPException, Depends, status from mongomapper.errors import DocumentNotFoundError from app.models import User, Product, Payment, Campaign, Tip, Purchase from app.models.data import UserData, PaymentData from app.dependencies import get_current_user ro...
[ "fastapi.HTTPException", "app.models.Tip.create", "app.models.Purchase.create", "bson.objectid.ObjectId", "app.models.User.get", "app.models.User.all", "fastapi.APIRouter", "fastapi.Depends" ]
[((327, 353), 'fastapi.APIRouter', 'APIRouter', ([], {'prefix': '"""/users"""'}), "(prefix='/users')\n", (336, 353), False, 'from fastapi import APIRouter, HTTPException, Depends, status\n'), ((420, 430), 'app.models.User.all', 'User.all', ([], {}), '()\n', (428, 430), False, 'from app.models import User, Product, Paym...
import numpy as np from sbrfuzzy import * entrada = open("dados.txt","a") v = np.arange(0,300.5,0.5) v1 = variavellinguistica("População",np.arange(0,300.5,0.5)) v1.adicionar("muito-baixa","trapezoidal",[0,0,25,45]) v1.adicionar("baixa","triangular",[30,50,70]) v1.adicionar("media","triangular",[55,75,110]) v1.adicio...
[ "numpy.arange" ]
[((79, 103), 'numpy.arange', 'np.arange', (['(0)', '(300.5)', '(0.5)'], {}), '(0, 300.5, 0.5)\n', (88, 103), True, 'import numpy as np\n'), ((142, 166), 'numpy.arange', 'np.arange', (['(0)', '(300.5)', '(0.5)'], {}), '(0, 300.5, 0.5)\n', (151, 166), True, 'import numpy as np\n'), ((511, 535), 'numpy.arange', 'np.arange...
import torch from torch import nn, Tensor class MaxoutLinear(nn.Module): """ A linear maxout layer: output_i = max_{j = 1,...,k} (w_1 input + b_1, w_2 input + b_2,..., w_k input + b_k) References: <NAME> et al. "Maxout Networks." https://arxiv.org/pdf/1302.4389.pdf """ def __init...
[ "torch.stack", "torch.nn.Linear" ]
[((500, 572), 'torch.nn.Linear', 'nn.Linear', ([], {'in_features': 'in_features', 'out_features': 'out_features', 'bias': 'bias'}), '(in_features=in_features, out_features=out_features, bias=bias)\n', (509, 572), False, 'from torch import nn, Tensor\n'), ((884, 913), 'torch.stack', 'torch.stack', (['features'], {'dim':...
import logging import os from settings import LOG_DIR logger = logging.getLogger('edusoho') logger.setLevel(logging.DEBUG) # 创建一个handler,用于写入日志文件 log_path = os.path.join(LOG_DIR, 'test.log') fh = logging.FileHandler(log_path, 'a') fh.setLevel(logging.DEBUG) # 再创建一个handler,用于输出到控制台 ch = logging.StreamHandler() ch.setL...
[ "logging.getLogger", "logging.StreamHandler", "logging.Formatter", "os.path.join", "logging.FileHandler" ]
[((64, 92), 'logging.getLogger', 'logging.getLogger', (['"""edusoho"""'], {}), "('edusoho')\n", (81, 92), False, 'import logging\n'), ((158, 191), 'os.path.join', 'os.path.join', (['LOG_DIR', '"""test.log"""'], {}), "(LOG_DIR, 'test.log')\n", (170, 191), False, 'import os\n'), ((198, 232), 'logging.FileHandler', 'loggi...
import io, re from setuptools import setup with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() with io.open("gridwxcomp/__init__.py", "rt", encoding="utf8") as f: version = re.search(r"__version__ = \'(.*?)\'", f.read()).group(1) requires = [ 'bokeh>=1.0.4', 'click>=7.0', 'f...
[ "setuptools.setup", "io.open" ]
[((810, 1613), 'setuptools.setup', 'setup', ([], {'name': '"""gridwxcomp"""', 'version': 'version', 'description': '"""Compare meterological station data to gridded data"""', 'long_description': 'readme', 'author': '"""<NAME> and <NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""Apache"""', 'url': '"""https:/...
from setuptools import setup setup_kwargs = { 'name': 'mach9', 'author': '38elements', 'url': 'https://github.com/silver-castle/mach9', 'description': 'a web application framework based ASGI and async/await.', 'version': '0.0.4', 'license': 'MIT License', 'packages': ['mach9'], 'classi...
[ "setuptools.setup" ]
[((658, 679), 'setuptools.setup', 'setup', ([], {}), '(**setup_kwargs)\n', (663, 679), False, 'from setuptools import setup\n')]
# # This code is a modified version of CEDR: https://github.com/Georgetown-IR-Lab/cedr # # (c) Georgetown IR lab & Carnegie Mellon University # # It's distributed under the MIT License # MIT License is compatible with Apache 2 license for the code in this repo. # from flexneuart.models.base import BaseModel from flexne...
[ "flexneuart.models.utils.init_model" ]
[((1030, 1059), 'flexneuart.models.utils.init_model', 'init_model', (['self', 'bert_flavor'], {}), '(self, bert_flavor)\n', (1040, 1059), False, 'from flexneuart.models.utils import init_model, BERT_ATTR\n')]
""" * @author ['aroop'] * @email ['<EMAIL>'] * @create date 2019-06-25 12:40:01 * @modify date 2019-06-25 12:40:01 * @desc [description] """ from PIL import Image import pytesseract import argparse import cv2 import os # import multiprocessing as mp from multiprocessing.dummy import Pool as ThreadPool import th...
[ "cv2.imwrite", "PIL.Image.open", "random.choice", "threading.Lock", "cv2.medianBlur", "os.getcwd", "cv2.cvtColor", "time.time", "threading.Thread", "cv2.imread", "os.remove" ]
[((384, 400), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (398, 400), False, 'import threading\n'), ((758, 779), 'cv2.imread', 'cv2.imread', (['imagepath'], {}), '(imagepath)\n', (768, 779), False, 'import cv2\n'), ((791, 830), 'cv2.cvtColor', 'cv2.cvtColor', (['image', 'cv2.COLOR_BGR2GRAY'], {}), '(image, cv...
from ccgetusers.generator import GenerateToken from ccgetusers.customerid import CustomerId from ccgetusers.users import Users import sys def main(): if len(sys.argv) < 4: print('Must provide CloudCheckr CMx auth endpoint, client id and access key') print('ccgetusers <cloudcheckr endpoint> <client...
[ "ccgetusers.generator.GenerateToken", "ccgetusers.customerid.CustomerId", "ccgetusers.users.Users", "sys.exit" ]
[((348, 360), 'sys.exit', 'sys.exit', (['(-1)'], {}), '(-1)\n', (356, 360), False, 'import sys\n'), ((489, 582), 'ccgetusers.generator.GenerateToken', 'GenerateToken', ([], {'cc_endpoint': 'cc_endpoint', 'client_id': 'client_id', 'client_secret': 'client_secret'}), '(cc_endpoint=cc_endpoint, client_id=client_id, client...
# Imports #----------- # rasa core import logging from rasa_core import training from rasa_core.actions import Action from rasa_core.agent import Agent from rasa_core.domain import Domain from rasa_core.policies.keras_policy import KerasPolicy from rasa_core.policies.memoization import MemoizationPolicy from rasa_core....
[ "logging.basicConfig", "rasa_core.policies.memoization.MemoizationPolicy" ]
[((743, 776), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': '"""INFO"""'}), "(level='INFO')\n", (762, 776), False, 'import logging\n'), ((896, 928), 'rasa_core.policies.memoization.MemoizationPolicy', 'MemoizationPolicy', ([], {'max_history': '(1)'}), '(max_history=1)\n', (913, 928), False, 'from rasa_co...
from cryptacular.bcrypt import BCRYPTPasswordManager manager = BCRYPTPasswordManager() hashed = manager.encode('password') assert manager.check(hashed, 'password')
[ "cryptacular.bcrypt.BCRYPTPasswordManager" ]
[((64, 87), 'cryptacular.bcrypt.BCRYPTPasswordManager', 'BCRYPTPasswordManager', ([], {}), '()\n', (85, 87), False, 'from cryptacular.bcrypt import BCRYPTPasswordManager\n')]
import click import json import sys import os from pathlib import Path class Config(object): def __init__(self): self.access_key = "" self.secret_key = "" self.configuration = "" self.api_host = "" def init(self, configuration, host, api_key, api_secret): config_dir =...
[ "click.confirm", "os.listdir", "click.secho", "pathlib.Path.home", "click.echo", "sys.exit", "json.load", "click.open_file", "json.dump" ]
[((321, 332), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (330, 332), False, 'from pathlib import Path\n'), ((520, 593), 'click.confirm', 'click.confirm', (["('Found a configuration for %s. Overwrite?' % configuration)"], {}), "('Found a configuration for %s. Overwrite?' % configuration)\n", (533, 593), False, ...
import unittest import random import math from pyneval.model.euclidean_point import EuclideanPoint,Line def rand(k): return random.uniform(0, k) class TestPointMethods(unittest.TestCase): def test_point_to_line(self): p = EuclideanPoint([49.4362, 111.12, 322.687]) l = Line(coords=[[47.9082,...
[ "random.uniform", "pyneval.model.euclidean_point.Line", "math.fabs", "pyneval.model.euclidean_point.EuclideanPoint", "unittest.main" ]
[((130, 150), 'random.uniform', 'random.uniform', (['(0)', 'k'], {}), '(0, k)\n', (144, 150), False, 'import random\n'), ((1330, 1345), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1343, 1345), False, 'import unittest\n'), ((243, 285), 'pyneval.model.euclidean_point.EuclideanPoint', 'EuclideanPoint', (['[49.436...
#!/usr/bin/env python3 #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # DESCRIPTION: # Python modbus driver to get and store Eastron SDM120CT meter data into a CSV file # # CALL SAMPLE: # see this_file.py -h # # DOCS # see ../../docs director...
[ "logging.getLogger", "dl_bytes_decoder.DlBytesDecoder", "os.path.exists", "collections.OrderedDict", "argparse.ArgumentParser", "uuid.getnode", "os.makedirs", "pymodbus.client.sync.ModbusSerialClient", "datetime.datetime.utcnow", "csv.writer", "os.path.join", "os.path.isfile", "os.path.dirna...
[((1928, 1944), 'dl_bytes_decoder.DlBytesDecoder', 'DlBytesDecoder', ([], {}), '()\n', (1942, 1944), False, 'from dl_bytes_decoder import DlBytesDecoder\n'), ((10103, 10130), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (10120, 10130), False, 'import logging\n'), ((2658, 2749), 'argpars...
from datetime import datetime class Logger(object): def __init__(self, no_timer): self._no_Timer = no_timer def log(self, level, msg): if self._no_Timer: print("[" + level + "] " + msg.rstrip()) else: print(str(datetime.now()) + " [" + level + "] " + msg.rstri...
[ "datetime.datetime.now" ]
[((271, 285), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (283, 285), False, 'from datetime import datetime\n')]
import codecs import os import random import pickle import sys import numpy as np import tensorflow as tf from tqdm import tqdm from transformers import BertTokenizer, TFBertModel from io_utils.io_utils import load_data from data_processing.feature_extraction import calc_features from data_processing.feature_extracti...
[ "pickle.dump", "tensorflow.random.set_seed", "transformers.TFBertModel.from_pretrained", "io_utils.io_utils.load_data", "data_processing.feature_extraction.calc_features", "transformers.BertTokenizer.from_pretrained", "random.seed", "os.path.normpath", "os.path.dirname", "os.path.isfile", "os.pa...
[((373, 388), 'random.seed', 'random.seed', (['(42)'], {}), '(42)\n', (384, 388), False, 'import random\n'), ((393, 411), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (407, 411), True, 'import numpy as np\n'), ((416, 438), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['(42)'], {}), '(42)\n',...
from backpressure_report.lib import log_utils from datetime import datetime from dateutil import parser import itertools from typing import AnyStr class BackpressureEvent: """ Represents a span during which a single pod was backpressuring / in high I/O and not dispensing job tokens. """ def __init__(s...
[ "itertools.chain", "backpressure_report.lib.log_utils.is_start_event", "backpressure_report.lib.log_utils.filter_and_sort_log_entries", "dateutil.parser.isoparse", "backpressure_report.lib.log_utils.is_end_event" ]
[((1635, 1657), 'itertools.chain', 'itertools.chain', (['*logs'], {}), '(*logs)\n', (1650, 1657), False, 'import itertools\n'), ((1675, 1725), 'backpressure_report.lib.log_utils.filter_and_sort_log_entries', 'log_utils.filter_and_sort_log_entries', (['merged_logs'], {}), '(merged_logs)\n', (1712, 1725), False, 'from ba...
import re import sys import numpy as np import pkg_resources import math from PyQt5 import uic, QtGui, QtCore from matplotlib.figure import Figure from isstools.widgets import (widget_general_info, widget_trajectory_manager, widget_processing, widget_batch_mode, widget_run, widget_beaml...
[ "re.compile", "PyQt5.QtGui.QColor", "PyQt5.uic.loadUiType", "isstools.widgets.widget_batch_mode.UIBatchMode", "isstools.widgets.widget_general_info.UIGeneralInfo", "isstools.elements.EmittingStream.EmittingStream", "isstools.widgets.widget_beamline_setup.UIBeamlineSetup", "numpy.round", "PyQt5.QtCor...
[((639, 697), 'pkg_resources.resource_filename', 'pkg_resources.resource_filename', (['"""isstools"""', '"""ui/XLive.ui"""'], {}), "('isstools', 'ui/XLive.ui')\n", (670, 697), False, 'import pkg_resources\n'), ((934, 957), 'PyQt5.uic.loadUiType', 'uic.loadUiType', (['ui_path'], {}), '(ui_path)\n', (948, 957), False, 'f...
import sys import os root = os.path.dirname( os.path.dirname( os.path.dirname( os.path.dirname( os.path.abspath(__file__) ) ) ) ) sys.argv[0] = os.path.realpath(sys.argv[0]) fp = open(os.path.join(root, "argv.txt"), "w") ...
[ "os.path.realpath", "os.path.join", "os.path.abspath" ]
[((243, 272), 'os.path.realpath', 'os.path.realpath', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (259, 272), False, 'import os\n'), ((283, 313), 'os.path.join', 'os.path.join', (['root', '"""argv.txt"""'], {}), "(root, 'argv.txt')\n", (295, 313), False, 'import os\n'), ((154, 179), 'os.path.abspath', 'os.path.abspath', ...
# 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, software # d...
[ "openstack_dashboard.test.integration_tests.regions.tables.bind_row_action", "openstack_dashboard.test.integration_tests.regions.forms.MetadataFormRegion", "openstack_dashboard.test.integration_tests.regions.tables.bind_table_action", "openstack_dashboard.test.integration_tests.regions.tables.bind_row_anchor_...
[((1379, 1413), 'openstack_dashboard.test.integration_tests.regions.tables.bind_table_action', 'tables.bind_table_action', (['"""create"""'], {}), "('create')\n", (1403, 1413), False, 'from openstack_dashboard.test.integration_tests.regions import tables\n'), ((1628, 1662), 'openstack_dashboard.test.integration_tests.r...
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status class TestUserApi(TestCase): USER_API_URL = reverse('user:create') TOKEN_API_URL = reverse('user:token') ME_URL = rev...
[ "rest_framework.test.APIClient", "django.contrib.auth.get_user_model", "django.urls.reverse" ]
[((239, 261), 'django.urls.reverse', 'reverse', (['"""user:create"""'], {}), "('user:create')\n", (246, 261), False, 'from django.urls import reverse\n'), ((282, 303), 'django.urls.reverse', 'reverse', (['"""user:token"""'], {}), "('user:token')\n", (289, 303), False, 'from django.urls import reverse\n'), ((317, 335), ...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Name: mei/base.py # Purpose: Public methods for the MEI module # # Authors: <NAME> # # Copyright: Copyright © 2014 <NAME> and the music21 Project # License: BSD, see license.txt # --------...
[ "music21.key.Key", "music21.note.SpacerRest", "music21.clef.PercussionClef", "music21.articulations.Tenuto", "music21.tie.Tie", "music21.metadata.DateBetween", "music21.note.Rest", "music21.metadata.Date", "music21.duration.GraceDuration", "music21.articulations.StrongAccent", "music21.clef.TabC...
[((7783, 7812), 'music21.environment.Environment', 'environment.Environment', (['_MOD'], {}), '(_MOD)\n', (7806, 7812), False, 'from music21 import environment\n'), ((15804, 15827), 'music21.duration.Duration', 'duration.Duration', (['base'], {}), '(base)\n', (15821, 15827), False, 'from music21 import duration\n'), ((...
import re import xml.etree.ElementTree as ET kashf = open('KashfAlZunun.txt', mode='r', encoding='utf-8') text = kashf.read() denoised_text = re.sub(r'\.{2,}', '', text) elementsKashf = denoised_text.split(".") f = open("KashfActualLengthEntries.txt","w") for x in range(0, len(elementsKashf)): numberWordsElement =...
[ "re.sub", "re.findall" ]
[((144, 171), 're.sub', 're.sub', (['"""\\\\.{2,}"""', '""""""', 'text'], {}), "('\\\\.{2,}', '', text)\n", (150, 171), False, 'import re\n'), ((321, 357), 're.findall', 're.findall', (['"""\\\\w+"""', 'elementsKashf[x]'], {}), "('\\\\w+', elementsKashf[x])\n", (331, 357), False, 'import re\n')]
from pathlib import Path import logging from typing import MutableMapping import toml logger = logging.getLogger(__name__) class Configuration(): def __init__(self): self.__config_file_path : str self.__config : MutableMapping def load(self, config_file_path: str = './config.toml'): l...
[ "logging.getLogger", "toml.load", "pathlib.Path" ]
[((96, 123), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (113, 123), False, 'import logging\n'), ((391, 413), 'pathlib.Path', 'Path', (['config_file_path'], {}), '(config_file_path)\n', (395, 413), False, 'from pathlib import Path\n'), ((595, 629), 'toml.load', 'toml.load', (['self.__c...
from functools import cmp_to_key import sublime import sublime_plugin from sublime import Region class MoveTextHorizCommand(sublime_plugin.TextCommand): def move_text_horiz(self, edit, direction, selections=None): selections = selections or list(self.view.sel()) if direction > 1: sele...
[ "sublime.Region" ]
[((3818, 3851), 'sublime.Region', 'Region', (['(dest_point + select_begin)'], {}), '(dest_point + select_begin)\n', (3824, 3851), False, 'from sublime import Region\n')]
import flow ip_lst = flow.get_ip_lst_1() flow.check_ip(ip_lst, song_id=157014) ip_lst = flow.get_ip_lst_2() flow.check_ip(ip_lst, song_id=157014) ip_lst = flow.get_ip_lst_3() flow.check_ip(ip_lst, song_id=157014) ip_lst = flow.get_ip_lst_4(3) flow.check_ip(ip_lst, song_id=157014)
[ "flow.get_ip_lst_3", "flow.get_ip_lst_2", "flow.check_ip", "flow.get_ip_lst_1", "flow.get_ip_lst_4" ]
[((32, 51), 'flow.get_ip_lst_1', 'flow.get_ip_lst_1', ([], {}), '()\n', (49, 51), False, 'import flow\n'), ((53, 90), 'flow.check_ip', 'flow.check_ip', (['ip_lst'], {'song_id': '(157014)'}), '(ip_lst, song_id=157014)\n', (66, 90), False, 'import flow\n'), ((103, 122), 'flow.get_ip_lst_2', 'flow.get_ip_lst_2', ([], {}),...
"""Module providing the Lemma class.""" from typing import Dict from typing import Optional from typing import Tuple from banone.sound import SoundSequence def remove_last_syllable(phon: str) -> str: """Remove the last syllable boundary in a phonetic string. Example: Turn `fa:-n` (stem of `fa:-n@`) into `fa...
[ "banone.sound.SoundSequence" ]
[((2085, 2120), 'banone.sound.SoundSequence', 'SoundSequence', (['self.orth', 'self.phon'], {}), '(self.orth, self.phon)\n', (2098, 2120), False, 'from banone.sound import SoundSequence\n'), ((2186, 2211), 'banone.sound.SoundSequence', 'SoundSequence', (['orth', 'phon'], {}), '(orth, phon)\n', (2199, 2211), False, 'fro...
#!/usr/bin/env python3 # author: greyshell # description: TBD import socket import optparse from socket import * from threading import * from time import sleep screenLock = Semaphore(value=1) def connect_scan(tgtHost, tgtPort): try: sock = socket(AF_INET, SOCK_STREAM) buffer = "greyshell\r\n" ...
[ "socket", "optparse.OptionParser", "time.sleep" ]
[((1237, 1312), 'optparse.OptionParser', 'optparse.OptionParser', (["('Usage %prog -H' + ' <target host> -p <target port>')"], {}), "('Usage %prog -H' + ' <target host> -p <target port>')\n", (1258, 1312), False, 'import optparse\n'), ((258, 286), 'socket', 'socket', (['AF_INET', 'SOCK_STREAM'], {}), '(AF_INET, SOCK_ST...
#import discord py library import discord #Imports commands from discord.ext import commands #import permissions from discord.ext.commands import has_permissions class purgecommand(commands.Cog): def __init__(self, client): self.client = client #Reads the users input if it has prefix or not @comma...
[ "discord.ext.commands.has_permissions", "discord.ext.commands.command" ]
[((315, 364), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""clear"""', 'aliases': "['purge']"}), "(name='clear', aliases=['purge'])\n", (331, 364), False, 'from discord.ext import commands\n'), ((422, 459), 'discord.ext.commands.has_permissions', 'has_permissions', ([], {'manage_channels': '(Tru...
# Import the modules import os, time, urllib2, xbmc, xbmcaddon, xbmcgui, xbmcvfs # Constants ACTION_PREVIOUS_MENU = 10 ACTION_BACKSPACE = 110 ACTION_NAV_BACK = 92 ADD_ON_ID = 'script.securitycam' # Set plugin variables __addon__ = xbmcaddon.Addon() __cwd__ = __addon__.getAddonInfo('path').decode("utf-8") __ic...
[ "xbmcvfs.listdir", "urllib2.urlopen", "xbmcvfs.exists", "xbmcgui.ControlImage", "os.path.join", "xbmcvfs.mkdir", "xbmcaddon.Addon", "urllib2.install_opener", "urllib2.HTTPPasswordMgrWithDefaultRealm", "urllib2.HTTPBasicAuthHandler", "time.time", "urllib2.build_opener", "xbmc.sleep", "os.re...
[((236, 253), 'xbmcaddon.Addon', 'xbmcaddon.Addon', ([], {}), '()\n', (251, 253), False, 'import os, time, urllib2, xbmc, xbmcaddon, xbmcgui, xbmcvfs\n'), ((4520, 4551), 'xbmcvfs.mkdir', 'xbmcvfs.mkdir', (['__snapshot_dir__'], {}), '(__snapshot_dir__)\n', (4533, 4551), False, 'import os, time, urllib2, xbmc, xbmcaddon,...
import sys import time import datetime import requests import json import urllib3 import click print("Libraries are imported") urllib3.disable_warnings() class Interface(): def __init__(self, name): ''' This class is representative of physical interfaces of dc switches ''' self.na...
[ "datetime.datetime", "requests.post", "click.group", "click.option", "requests.get", "urllib3.disable_warnings", "sys.exc_info", "datetime.date.today", "time.time" ]
[((129, 155), 'urllib3.disable_warnings', 'urllib3.disable_warnings', ([], {}), '()\n', (153, 155), False, 'import urllib3\n'), ((6777, 6817), 'click.group', 'click.group', ([], {'invoke_without_command': '(True)'}), '(invoke_without_command=True)\n', (6788, 6817), False, 'import click\n'), ((6843, 6918), 'click.option...
from traingame.game import Engine, Environment from traingame.player import NeatAI, NeatSpeedAI import neat def fitness_distance(genomes, engine): scores = engine.get_scores() max_score = engine.track.distance_matrix.max() for idx, (genome_id, genome) in enumerate(genomes): genome.fitness = max_sc...
[ "traingame.game.Engine", "neat.nn.FeedForwardNetwork.create", "traingame.game.Environment" ]
[((1257, 1275), 'traingame.game.Environment', 'Environment', (['track'], {}), '(track)\n', (1268, 1275), False, 'from traingame.game import Engine, Environment\n'), ((1338, 1430), 'traingame.game.Engine', 'Engine', ([], {'headless': '(False)', 'environment': 'track', 'players': 'ai_players', 'tick_limit': '(max_score *...
import json import uuid import typer import validators from googleapiclient.discovery import build from google.oauth2 import service_account import yaml from datetime import datetime, timedelta from pathlib import Path from enum import Enum from typing import Optional, NamedTuple extractor = typer.Typer() APP_NAME = ...
[ "google.oauth2.service_account.Credentials.from_service_account_file", "yaml.dump", "typer.Option", "datetime.datetime.strptime", "pathlib.Path", "json.dumps", "typer.Typer", "uuid.uuid4", "yaml.safe_load", "googleapiclient.discovery.build", "typer.echo", "validators.url", "typer.Exit", "d...
[((295, 308), 'typer.Typer', 'typer.Typer', ([], {}), '()\n', (306, 308), False, 'import typer\n'), ((1536, 1567), 'typer.Option', 'typer.Option', (['None', '"""--metrics"""'], {}), "(None, '--metrics')\n", (1548, 1567), False, 'import typer\n'), ((1597, 1631), 'typer.Option', 'typer.Option', (['None', '"""--dimensions...
#!/usr/bin/env python # coding: utf-8 import pandas as pd from sklearn.base import BaseEstimator import torch from torch import nn from torch import optim import numpy as np torch.autograd.set_detect_anomaly(True) class TorchCox(BaseEstimator): """Fit a Cox model """ def __init__(self, lr=1, random_sta...
[ "torch.autograd.set_detect_anomaly", "torch.unique", "torch.full", "numpy.asarray", "torch.from_numpy", "numpy.dot", "torch.sum", "torch.einsum", "torch.optim.LBFGS", "pandas.DataFrame", "torch.logsumexp" ]
[((176, 215), 'torch.autograd.set_detect_anomaly', 'torch.autograd.set_detect_anomaly', (['(True)'], {}), '(True)\n', (209, 215), False, 'import torch\n'), ((471, 514), 'torch.full', 'torch.full', (['targetshape'], {'fill_value': '(-1000.0)'}), '(targetshape, fill_value=-1000.0)\n', (481, 514), False, 'import torch\n')...
import sqlite3 as sql import pandas as pd import os import logging logging.basicConfig(format='%(asctime)s %(levelname)s | %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) def database_builder(path: str) -> pd.DataFrame(): logger.info('Building DataFrame ...') (_, _...
[ "logging.basicConfig", "logging.getLogger", "pandas.read_sql_query", "sqlite3.connect", "pandas.DataFrame", "pandas.concat", "os.walk" ]
[((69, 163), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s %(levelname)s | %(message)s"""', 'level': 'logging.INFO'}), "(format='%(asctime)s %(levelname)s | %(message)s', level\n =logging.INFO)\n", (88, 163), False, 'import logging\n'), ((188, 215), 'logging.getLogger', 'logging.getLo...
from __future__ import absolute_import import os,sys import numpy as np from Bio.PDB.Polypeptide import is_aa from computeFeatures.structStep.myPDBParser import myPDBParser as PDBParser from ..StructFeatComputer import StructFeatComputer from utils import myMakeDir, tryToRemove #utils is at the root of the package c...
[ "numpy.mean", "utils.tryToRemove", "os.path.join", "Bio.PDB.Polypeptide.is_aa", "os.path.isfile", "numpy.dot", "computeFeatures.structStep.myPDBParser.myPDBParser", "utils.myMakeDir", "numpy.linalg.norm" ]
[((987, 1047), 'utils.myMakeDir', 'myMakeDir', (['self.computedFeatsRootDir', '"""distanceMatricesData"""'], {}), "(self.computedFeatsRootDir, 'distanceMatricesData')\n", (996, 1047), False, 'from utils import myMakeDir, tryToRemove\n'), ((1065, 1086), 'computeFeatures.structStep.myPDBParser.myPDBParser', 'PDBParser', ...
# -*- coding: utf-8 -*- import os import sys import torch from src.data import config as cfg from src.interactive import functions as utilfuncs import csv def run_generator(filename): saved_pretrained_model_file = \ 'datasets/comet_pretrained_models/atomic_pretrained_model.pickle' device...
[ "src.interactive.functions.get_atomic_sequence", "torch.cuda.set_device", "src.interactive.functions.set_sampler", "src.interactive.functions.make_model", "src.interactive.functions.load_data", "src.interactive.functions.load_model_file" ]
[((387, 441), 'src.interactive.functions.load_model_file', 'utilfuncs.load_model_file', (['saved_pretrained_model_file'], {}), '(saved_pretrained_model_file)\n', (412, 441), True, 'from src.interactive import functions as utilfuncs\n'), ((475, 509), 'src.interactive.functions.load_data', 'utilfuncs.load_data', (['"""at...
import docker docker_socket = 'tcp://172.17.42.1:4243' client = docker.client.Client(base_url=docker_socket) slave_image = 'datalad/buildslave:nd80-1' container = client.create_container(slave_image) client.start(container['Id']) # Optionally examine the logs of the master client.stop(container['Id']) client.wait(conta...
[ "docker.client.Client" ]
[((64, 108), 'docker.client.Client', 'docker.client.Client', ([], {'base_url': 'docker_socket'}), '(base_url=docker_socket)\n', (84, 108), False, 'import docker\n')]
from collections import namedtuple from glm import vec2, min as glm_min from .typedefs import cvec ResizeWrapper = namedtuple('ResizeWrapper', 'func soft_redraw') AlignWrapper = namedtuple('AlignWrapper', 'func soft_redraw') # resize functions def resize_stretch(elem): new_size = vec2(elem.metrics.user_size) *...
[ "glm.vec2", "collections.namedtuple" ]
[((118, 165), 'collections.namedtuple', 'namedtuple', (['"""ResizeWrapper"""', '"""func soft_redraw"""'], {}), "('ResizeWrapper', 'func soft_redraw')\n", (128, 165), False, 'from collections import namedtuple\n'), ((181, 227), 'collections.namedtuple', 'namedtuple', (['"""AlignWrapper"""', '"""func soft_redraw"""'], {}...
import inspect import sys import time import pytest from joulehunter import Profiler from joulehunter.renderers import ConsoleRenderer, HTMLRenderer, JSONRenderer # Utilities def recurse(depth): if depth == 0: time.sleep(0.1) return recurse(depth - 1) def current_stack_depth(): depth...
[ "joulehunter.Profiler", "inspect.currentframe", "time.sleep", "joulehunter.renderers.HTMLRenderer", "sys.getrecursionlimit", "joulehunter.renderers.ConsoleRenderer", "pytest.fixture", "joulehunter.renderers.JSONRenderer" ]
[((458, 474), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (472, 474), False, 'import pytest\n'), ((337, 359), 'inspect.currentframe', 'inspect.currentframe', ([], {}), '()\n', (357, 359), False, 'import inspect\n'), ((563, 573), 'joulehunter.Profiler', 'Profiler', ([], {}), '()\n', (571, 573), False, 'from jo...
import sys, os BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, BASE_PATH) from lib.appController import Controller, devices_name_queue from appCase.test_thread_login import ThreadDemo from conf.settings import logger,APP_REPORT from lib.result import Result from lib import H...
[ "lib.appController.Controller", "sys.path.insert", "threading.local", "threading.current_thread", "lib.appController.devices_name_queue.get", "time.strftime", "lib.result.Result", "os.path.abspath", "unittest.TestLoader" ]
[((88, 117), 'sys.path.insert', 'sys.path.insert', (['(0)', 'BASE_PATH'], {}), '(0, BASE_PATH)\n', (103, 117), False, 'import sys, os\n'), ((392, 409), 'threading.local', 'threading.local', ([], {}), '()\n', (407, 409), False, 'import threading\n'), ((60, 85), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '...
import datetime import fnmatch import os import pathlib import shutil import socket import subprocess import tempfile import time import unittest import unittest.mock import xattr import sneakersync import test_synchronize_base class TestRsync(test_synchronize_base.TestSynchronizeBase): def test_equal(self): ...
[ "sneakersync.operations.read_configuration", "subprocess.check_call", "sneakersync.State.load", "time.sleep", "datetime.datetime.now", "sneakersync.rsync.receive", "sneakersync.rsync.send", "unittest.main", "socket.gethostname", "unittest.mock.patch" ]
[((4850, 4865), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4863, 4865), False, 'import unittest\n'), ((1004, 1111), 'subprocess.check_call', 'subprocess.check_call', (["['touch', '-a', '-t', '200102032324.25', self.drives[0] / 'module_1' / 'foo.1']"], {}), "(['touch', '-a', '-t', '200102032324.25', self.drive...
import pywhatkit as kit #installpywhatkit import os kit.sendwhatmsg("Enter your friends phone no. and add country code","Enter Your Message",24,00) #at the end enter time in 24 hours format os.system("taskkill /im chrome.exe /f") #it will close the browser os.system("shutdown /s /t 1") #it will shutdown the pc
[ "os.system", "pywhatkit.sendwhatmsg" ]
[((54, 155), 'pywhatkit.sendwhatmsg', 'kit.sendwhatmsg', (['"""Enter your friends phone no. and add country code"""', '"""Enter Your Message"""', '(24)', '(0)'], {}), "('Enter your friends phone no. and add country code',\n 'Enter Your Message', 24, 0)\n", (69, 155), True, 'import pywhatkit as kit\n'), ((193, 232), ...
#!/usr/bin/env python3 import yaml import glob from jinja2 import Template from os.path import basename, splitext from subprocess import check_output from collections import defaultdict def convert_markdown_to_tex(markdown): return check_output( ["pandoc", "--from=markdown", "--to=latex"], univer...
[ "subprocess.check_output", "yaml.load", "collections.defaultdict", "os.path.basename", "glob.glob" ]
[((1358, 1375), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (1369, 1375), False, 'from collections import defaultdict\n'), ((1423, 1440), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (1434, 1440), False, 'from collections import defaultdict\n'), ((1475, 1515), 'glob.gl...
"""dicognito - anonymize DICOM datasets""" from os.path import abspath, dirname, join import re DATA_ROOT = abspath(dirname(__file__)) with open(join(DATA_ROOT, "release_notes.md"), "r") as notes: for line in notes: if line.startswith("## "): __version__ = line[3:].strip() ...
[ "os.path.dirname", "os.path.join", "re.match" ]
[((121, 138), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (128, 138), False, 'from os.path import abspath, dirname, join\n'), ((151, 186), 'os.path.join', 'join', (['DATA_ROOT', '"""release_notes.md"""'], {}), "(DATA_ROOT, 'release_notes.md')\n", (155, 186), False, 'from os.path import abspath, di...
import datetime import logging import azure.functions as func def main(mytimer: func.TimerRequest) -> None: if mytimer.past_due: logging.info('The timer is past due!') logging.info('function warm up')
[ "logging.info" ]
[((188, 220), 'logging.info', 'logging.info', (['"""function warm up"""'], {}), "('function warm up')\n", (200, 220), False, 'import logging\n'), ((144, 182), 'logging.info', 'logging.info', (['"""The timer is past due!"""'], {}), "('The timer is past due!')\n", (156, 182), False, 'import logging\n')]
import plistlib import json from datetime import datetime from ds_toolkit.files import write_to_file def bplist_read_file(file_path): """ Reads a bplist file. Args: file_path (sttr): Returns: dict: """ with open(file_path, 'rb') as file: return plistlib.load(file) ...
[ "json.dumps", "plistlib.load" ]
[((298, 317), 'plistlib.load', 'plistlib.load', (['file'], {}), '(file)\n', (311, 317), False, 'import plistlib\n'), ((703, 756), 'json.dumps', 'json.dumps', (['data'], {'indent': '(2)', 'default': '_convert_datetime'}), '(data, indent=2, default=_convert_datetime)\n', (713, 756), False, 'import json\n')]
from tkinter import * from tkinter import ttk from tkinter import simpledialog, messagebox from PIL import Image, ImageTk import AER_config as config from AER_utils import Plot_Types import os import numpy as np import time import matplotlib matplotlib.use("TkAgg") from matplotlib.backends.backend_tkagg import FigureC...
[ "tkinter.ttk.Button", "tkinter.ttk.Style", "matplotlib.use", "matplotlib.figure.Figure", "tkinter.ttk.Label", "matplotlib.image.imread", "tkinter.simpledialog.askstring", "numpy.round", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg" ]
[((243, 266), 'matplotlib.use', 'matplotlib.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (257, 266), False, 'import matplotlib\n'), ((2176, 2187), 'tkinter.ttk.Style', 'ttk.Style', ([], {}), '()\n', (2185, 2187), False, 'from tkinter import ttk\n'), ((2429, 2440), 'tkinter.ttk.Style', 'ttk.Style', ([], {}), '()\n', (243...
# Copyright (c) 2021 <NAME> # # This software is released under the MIT License. # https://opensource.org/licenses/MIT from dataclasses import dataclass, field from ynab.__base import RESTBase @dataclass class Category: id: str = None name: str = None hidden: bool = None deleted: bool = None ca...
[ "dataclasses.field" ]
[((402, 429), 'dataclasses.field', 'field', ([], {'default_factory': 'dict'}), '(default_factory=dict)\n', (407, 429), False, 'from dataclasses import dataclass, field\n')]
import tensorflow as tf import keras import pandas as pd # Data prep train_metadata = pd.read_csv('../input/shopee-product-matching/train.csv') # phash distance calculation def get_phash_dist(phash_a, phash_b): return phash_a - phash_b def parse_phash(phash): return int(phash, 16) # (highly primitive) 1-D se...
[ "pandas.read_csv" ]
[((87, 144), 'pandas.read_csv', 'pd.read_csv', (['"""../input/shopee-product-matching/train.csv"""'], {}), "('../input/shopee-product-matching/train.csv')\n", (98, 144), True, 'import pandas as pd\n')]
""" Django settings for the project. Generated by "django-admin startproject" using Django 3.2.8. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ import os from g...
[ "os.getenv", "pathlib.Path", "sentry_sdk.integrations.django.DjangoIntegration", "dj_database_url.config", "django.utils.translation.gettext_lazy", "sentry_sdk.integrations.logging.ignore_logger" ]
[((1046, 1123), 'os.getenv', 'os.getenv', (['"""SECRET_KEY"""', '"""w^pq&p1phz$^1j!aqa#8zm#m@_jhm(9skcx*8rom7x7j1cy1y="""'], {}), "('SECRET_KEY', 'w^pq&p1phz$^1j!aqa#8zm#m@_jhm(9skcx*8rom7x7j1cy1y=')\n", (1055, 1123), False, 'import os\n'), ((6782, 6825), 'os.getenv', 'os.getenv', (['"""RABBIT_URL"""', '"""amqp://local...
from django.contrib import admin from .models import Post, Universities # Register your models here. # add the model I just imported to the adminstrative panel admin.site.register(Post) admin.site.register(Universities)
[ "django.contrib.admin.site.register" ]
[((161, 186), 'django.contrib.admin.site.register', 'admin.site.register', (['Post'], {}), '(Post)\n', (180, 186), False, 'from django.contrib import admin\n'), ((187, 220), 'django.contrib.admin.site.register', 'admin.site.register', (['Universities'], {}), '(Universities)\n', (206, 220), False, 'from django.contrib i...