code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
'''server/app.py - main api app declaration''' from flask import Flask, jsonify, request, send_from_directory from flask_cors import CORS, cross_origin from flask_socketio import SocketIO, join_room import os '''Main wrapper for app creation''' app = Flask(__name__, static_folder='./build') socketio = SocketIO(app, co...
[ "flask_cors.CORS", "flask.Flask", "flask_socketio.join_room", "flask_socketio.SocketIO", "flask.send_from_directory" ]
[((252, 292), 'flask.Flask', 'Flask', (['__name__'], {'static_folder': '"""./build"""'}), "(__name__, static_folder='./build')\n", (257, 292), False, 'from flask import Flask, jsonify, request, send_from_directory\n'), ((304, 343), 'flask_socketio.SocketIO', 'SocketIO', (['app'], {'cors_allowed_origins': '"""*"""'}), "...
from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django_messaging.m...
[ "django.shortcuts.render_to_response", "django.http.HttpResponse", "django_messaging.views.index", "django_messaging.models.DmUser.objects.get", "django.http.HttpResponseRedirect" ]
[((517, 631), 'django.shortcuts.render_to_response', 'render_to_response', (['"""messaging/send_pm.html"""', "{'contact_id': dm_user_id, 'contact_username': contact_username}"], {}), "('messaging/send_pm.html', {'contact_id': dm_user_id,\n 'contact_username': contact_username})\n", (535, 631), False, 'from django.sh...
# Generated by Django 3.2.8 on 2021-10-31 15:19 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('assesments', '0011_auto_20211031_1218'), ] operations = [ migrations.RenameField( model_name='taker', old_name='api_user', ...
[ "django.db.migrations.RenameField" ]
[((230, 315), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""taker"""', 'old_name': '"""api_user"""', 'new_name': '"""user"""'}), "(model_name='taker', old_name='api_user', new_name='user'\n )\n", (252, 315), False, 'from django.db import migrations\n')]
""" obtain the static field from a set of charges and dipoles at polarizable points. """ import numpy from .tensor import T from .mulmom import MulMom as M def get_static_field_from_file(potential, filename): f = open(filename, 'r') field = [] for i, line in enumerate(f): d = line.split() ...
[ "numpy.array", "numpy.zeros", "numpy.ravel" ]
[((441, 459), 'numpy.ravel', 'numpy.ravel', (['field'], {}), '(field)\n', (452, 459), False, 'import numpy\n'), ((625, 657), 'numpy.zeros', 'numpy.zeros', (['(3 * potential.npols)'], {}), '(3 * potential.npols)\n', (636, 657), False, 'import numpy\n'), ((1041, 1070), 'numpy.zeros', 'numpy.zeros', (['potential.nsites'],...
import typing from typing import Dict, Optional from monitoring.monitorlib.clients.scd_automated_testing import QueryError from monitoring.monitorlib.scd_automated_testing.scd_injection_api import ( InjectFlightResponse, ) from monitoring.uss_qualifier.common_data_definitions import Severity from monitoring.uss_qu...
[ "monitoring.uss_qualifier.scd.executor.report_recorder.ReportRecorder", "monitoring.uss_qualifier.scd.executor.test_steps.inject_flight.execute", "monitoring.uss_qualifier.scd.executor.test_steps.delete_flight.execute", "monitoring.uss_qualifier.scd.reports.TestStepReference" ]
[((1519, 1555), 'monitoring.uss_qualifier.scd.executor.report_recorder.ReportRecorder', 'ReportRecorder', (['report', 'self.context'], {}), '(report, self.context)\n', (1533, 1555), False, 'from monitoring.uss_qualifier.scd.executor.report_recorder import ReportRecorder\n'), ((4560, 4633), 'monitoring.uss_qualifier.scd...
import sys import os import json import numpy as np import glob import argparse import pdb import f0dl_bernox def compute_f0_shift_curve(expt_dict, filter_key, filter_value, f0_min=80.0, f0_max=1e3): ''' ''' # Identify trials where filter_key = filter_value and stimulus is in f0 range indexes = expt_...
[ "json.dump", "numpy.zeros_like", "f0dl_bernox.add_f0_estimates_to_expt_dict", "argparse.ArgumentParser", "numpy.logical_and", "numpy.median", "numpy.std", "numpy.min", "numpy.mean", "f0dl_bernox.load_f0_expt_dict_from_json", "numpy.max", "glob.glob", "json.JSONEncoder.default", "numpy.uniq...
[((744, 763), 'numpy.unique', 'np.unique', (['f0_shift'], {}), '(f0_shift)\n', (753, 763), True, 'import numpy as np\n'), ((789, 819), 'numpy.zeros_like', 'np.zeros_like', (['f0_shift_unique'], {}), '(f0_shift_unique)\n', (802, 819), True, 'import numpy as np\n'), ((847, 877), 'numpy.zeros_like', 'np.zeros_like', (['f0...
import FWCore.ParameterSet.Config as cms from RecoLocalMuon.GEMRecHit.gemRecHits_cfi import * from RecoLocalMuon.GEMSegment.gemSegments_cfi import * gemLocalRecoTask = cms.Task(gemRecHits,gemSegments) gemLocalReco = cms.Sequence(gemLocalRecoTask)
[ "FWCore.ParameterSet.Config.Sequence", "FWCore.ParameterSet.Config.Task" ]
[((170, 203), 'FWCore.ParameterSet.Config.Task', 'cms.Task', (['gemRecHits', 'gemSegments'], {}), '(gemRecHits, gemSegments)\n', (178, 203), True, 'import FWCore.ParameterSet.Config as cms\n'), ((218, 248), 'FWCore.ParameterSet.Config.Sequence', 'cms.Sequence', (['gemLocalRecoTask'], {}), '(gemLocalRecoTask)\n', (230, ...
import aiohttp import discord from discord.ext import commands from db_utils.handle_conn import HandleConn from tle.cogs.util import codeforces_api as cf class Roles(commands.Cog): def __init__(self, bot): self.bot = bot self.ranks = [ 'Expert', 'Candidate Master', 'Master', 'Internatio...
[ "discord.ext.commands.command", "discord.ext.commands.RoleConverter", "db_utils.handle_conn.HandleConn", "discord.ext.commands.MemberConverter", "tle.cogs.util.codeforces_api.user.info", "discord.ext.commands.has_role" ]
[((662, 713), 'discord.ext.commands.command', 'commands.command', ([], {'brief': '"""update roles (admin-only)"""'}), "(brief='update roles (admin-only)')\n", (678, 713), False, 'from discord.ext import commands\n'), ((719, 745), 'discord.ext.commands.has_role', 'commands.has_role', (['"""Admin"""'], {}), "('Admin')\n"...
from django.contrib import admin from apps.employees.models import Employee, Position, Schedule admin.site.register(Employee) admin.site.register(Position) admin.site.register(Schedule)
[ "django.contrib.admin.site.register" ]
[((97, 126), 'django.contrib.admin.site.register', 'admin.site.register', (['Employee'], {}), '(Employee)\n', (116, 126), False, 'from django.contrib import admin\n'), ((127, 156), 'django.contrib.admin.site.register', 'admin.site.register', (['Position'], {}), '(Position)\n', (146, 156), False, 'from django.contrib im...
""" Base Class for Optimization Algorithms Implements problem instance loading, heuristic initialization function, and data plotting functions. """ # ---------------------------------------------------------- import tsplib95 as tsp from numpy.random import default_rng # plotting import matplotlib import matplotlib...
[ "matplotlib.lines.Line2D", "matplotlib.pyplot.close", "matplotlib.rcParams.update", "tsplib95.load", "matplotlib.pyplot.subplots", "numpy.random.default_rng", "candidate_solution.CandidateSolution.set_problem", "matplotlib.pyplot.style.use", "matplotlib.use", "pathlib.Path", "matplotlib.pyplot.t...
[((396, 417), 'matplotlib.use', 'matplotlib.use', (['"""pgf"""'], {}), "('pgf')\n", (410, 417), False, 'import matplotlib\n'), ((418, 546), 'matplotlib.rcParams.update', 'matplotlib.rcParams.update', (["{'pgf.texsystem': 'pdflatex', 'font.family': 'serif', 'text.usetex': True,\n 'pgf.rcfonts': False}"], {}), "({'pgf...
# coding=utf-8 from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from aip import AipOcr im...
[ "pickle.dump", "urllib.request.Request", "json.loads", "urllib.parse.urlencode", "aip.AipOcr", "urllib.request.urlopen", "time.sleep", "selenium.webdriver.support.wait.WebDriverWait", "urllib.request.urlretrieve", "selenium.webdriver.ChromeOptions", "webdriver_manager.chrome.ChromeDriverManager"...
[((446, 532), 'aip.AipOcr', 'AipOcr', (['"""18671664"""', '"""O0d2Tgv4imtAfVqhQF49py0o"""', '"""au1xuxZlqqROnOjlVqLCfHhO4lLQZICl"""'], {}), "('18671664', 'O0d2Tgv4imtAfVqhQF49py0o',\n 'au1xuxZlqqROnOjlVqLCfHhO4lLQZICl')\n", (452, 532), False, 'from aip import AipOcr\n'), ((1113, 1138), 'selenium.webdriver.ChromeOpti...
# 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...
[ "oslo_log.log.getLogger", "oslo_utils.strutils.mask_password", "oslo_utils.strutils.mask_dict_password", "inspect.getcallargs", "retrying.Retrying", "os_brick.i18n._", "time.time", "six.text_type", "oslo_utils.encodeutils.to_utf8", "functools.wraps", "six.wraps" ]
[((854, 881), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (871, 881), True, 'from oslo_log import log as logging\n'), ((3515, 3533), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (3530, 3533), False, 'import functools\n'), ((1832, 1844), 'six.wraps', 'six.wraps', (['...
from emto_input_generator import * import numpy as np folder = os.getcwd() # Get current working directory. emtopath = folder+"/L11_CuPt" # Folder where the calculations will be performed. latpath = emtopath # L11 CuPt prims = np.array([[1.0,0.5,0.5], [0.5,1.0,0.5], [0...
[ "numpy.array", "numpy.linspace" ]
[((240, 301), 'numpy.array', 'np.array', (['[[1.0, 0.5, 0.5], [0.5, 1.0, 0.5], [0.5, 0.5, 1.0]]'], {}), '([[1.0, 0.5, 0.5], [0.5, 1.0, 0.5], [0.5, 0.5, 1.0]])\n', (248, 301), True, 'import numpy as np\n'), ((343, 387), 'numpy.array', 'np.array', (['[[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]]'], {}), '([[0.0, 0.0, 0.0], [0.5, 0....
import numpy as np import cv2 import math from PIL import Image, ImageStat import sys from os import listdir import pymeanshift as pms import os.path # path1 = "/Users/caijieyang/Desktop/allgoodthinghere/" # files= listdir(path1) avg_recall=[] avg_pre=[] hsl_acc_list=[] manual_acc_list=[] file = sys.argv[1] file = str...
[ "numpy.asarray", "PIL.Image.open", "pymeanshift.segment", "cv2.imread", "PIL.Image.fromarray", "PIL.Image.merge" ]
[((351, 367), 'PIL.Image.open', 'Image.open', (['file'], {}), '(file)\n', (361, 367), False, 'from PIL import Image, ImageStat\n'), ((534, 567), 'cv2.imread', 'cv2.imread', (["(file + '_cropped.png')"], {}), "(file + '_cropped.png')\n", (544, 567), False, 'import cv2\n'), ((616, 694), 'pymeanshift.segment', 'pms.segmen...
from colorful.fields import RGBColorField from django.db import models from django.contrib.auth.models import User from datetime import date from django.urls import reverse class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) github = models.URLField(verbose_name="GitHub", ...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.URLField", "colorful.fields.RGBColorField", "django.db.models.CharField", "django.urls.reverse", "django.db.models.DateField" ]
[((215, 267), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {'on_delete': 'models.CASCADE'}), '(User, on_delete=models.CASCADE)\n', (235, 267), False, 'from django.db import models\n'), ((281, 343), 'django.db.models.URLField', 'models.URLField', ([], {'verbose_name': '"""GitHub"""', 'blank': '(T...
#!/usr/bin/env python # # fix_settling_shifts.py # # Author: <NAME>, STScI, February 2022 # # Script to fix shifts between groups introduced by settling issue. # # Input arguments: # required: image filename (single "uncal.fits" file) # optional: boxpeaksize (box size for searching central peak; default=20 pixels...
[ "argparse.ArgumentParser", "numpy.argmax", "astropy.stats.sigma_clipped_stats", "jwst.ramp_fitting.RampFitStep.call", "scipy.signal.fftconvolve", "scipy.ndimage.median_filter", "numpy.full", "jwst.pipeline.calwebb_detector1.Detector1Pipeline.call", "jwst.pipeline.Image2Pipeline.call", "astropy.io....
[((1422, 1510), 'scipy.signal.fftconvolve', 'scipy.signal.fftconvolve', (['data_template', 'data_to_be_shifted[::-1, ::-1]'], {'mode': '"""same"""'}), "(data_template, data_to_be_shifted[::-1, ::-1],\n mode='same')\n", (1446, 1510), False, 'import scipy\n'), ((2132, 2249), 'astropy.modeling.models.Gaussian2D', 'mode...
import html5lib from nose.tools import eq_ import bleach def test_empty(): eq_('', bleach.clean('')) def test_comments_only(): comment = '<!-- this is a comment -->' open_comment = '<!-- this is an open comment' eq_('', bleach.clean(comment)) eq_('', bleach.clean(open_comment)) eq_(comment,...
[ "bleach.linkify", "bleach.clean", "html5lib.HTMLParser" ]
[((2738, 2759), 'html5lib.HTMLParser', 'html5lib.HTMLParser', ([], {}), '()\n', (2757, 2759), False, 'import html5lib\n'), ((4204, 4223), 'bleach.clean', 'bleach.clean', (['dirty'], {}), '(dirty)\n', (4216, 4223), False, 'import bleach\n'), ((4274, 4295), 'bleach.linkify', 'bleach.linkify', (['dirty'], {}), '(dirty)\n'...
import requests class SimpleClassifier(object): def __init__(self, **kwargs): self.host = kwargs.get('host', "localhost") self.port = kwargs.get('port', 8080) self.proto = kwargs.get('proto', "http") self.uri = "{}://{}:{}".format(self.proto, self.host, self.port) self.data...
[ "requests.request" ]
[((492, 546), 'requests.request', 'requests.request', (['method', '(self.uri + path)'], {'json': 'kwargs'}), '(method, self.uri + path, json=kwargs)\n', (508, 546), False, 'import requests\n')]
from brainly_scraper import brainly cyan = '\x1b[36m' white = '\x1b[37m' def start(): banners = """ {} ____ _ _ | __ ) _ __ __ _(_)_ __ | |_ _ | _ \| '__/ _` | | '_ \| | | | | | |_) | | | (_| | | | | | | |_| | |____/|_| \__,_|_|_| |_|_|\__, | {}Made By X-Nabil354 {} ...
[ "brainly_scraper.brainly" ]
[((594, 611), 'brainly_scraper.brainly', 'brainly', (['tanya', '(5)'], {}), '(tanya, 5)\n', (601, 611), False, 'from brainly_scraper import brainly\n')]
""" Unit tests for the atom ID filter """ from __future__ import absolute_import from __future__ import unicode_literals import unittest import numpy as np from ....system import lattice from .. import atomIdFilter from .. import base ###############################################################################...
[ "numpy.empty", "numpy.arange" ]
[((1719, 1765), 'numpy.arange', 'np.arange', (['self.lattice.NAtoms'], {'dtype': 'np.int32'}), '(self.lattice.NAtoms, dtype=np.int32)\n', (1728, 1765), True, 'import numpy as np\n'), ((1881, 1904), 'numpy.empty', 'np.empty', (['(0)', 'np.float64'], {}), '(0, np.float64)\n', (1889, 1904), True, 'import numpy as np\n'), ...
from utils import Session def test_visuals_public_course(): student = Session("student") # Get all course data with visuals enabled courses_with_visuals = student.get("/public/courses/visuals-list")["courses"] # Iterate over courses, generating visuals for each for course in courses_with_visuals...
[ "utils.Session" ]
[((76, 94), 'utils.Session', 'Session', (['"""student"""'], {}), "('student')\n", (83, 94), False, 'from utils import Session\n'), ((762, 780), 'utils.Session', 'Session', (['"""student"""'], {}), "('student')\n", (769, 780), False, 'from utils import Session\n'), ((1114, 1132), 'utils.Session', 'Session', (['"""studen...
# 从你刚刚下载的包中导入Celery类 from celery import Celery # 利用导入的Celery创建对象 celery_app = Celery('meiduo') celery_app.config_from_object('celery_tasks.config') # 让celery_app自动捕获目标地址下的任务: # 就是自动捕获tasks celery_app.autodiscover_tasks(['celery_tasks.sms'])
[ "celery.Celery" ]
[((79, 95), 'celery.Celery', 'Celery', (['"""meiduo"""'], {}), "('meiduo')\n", (85, 95), False, 'from celery import Celery\n')]
# ch1/example2.py import concurrent.futures from timeit import default_timer as timer # sequential def f(x): return x * x - x + 1 start = timer() result = 3 for i in range(20): result = f(result) print('Result is very large. Only printing the last 5 digits:', result % 100000) print('Sequential took: %.2f s...
[ "timeit.default_timer" ]
[((146, 153), 'timeit.default_timer', 'timer', ([], {}), '()\n', (151, 153), True, 'from timeit import default_timer as timer\n'), ((332, 339), 'timeit.default_timer', 'timer', ([], {}), '()\n', (337, 339), True, 'from timeit import default_timer as timer\n'), ((752, 759), 'timeit.default_timer', 'timer', ([], {}), '()...
# Copyright 2018 D-Wave Systems Inc. # # 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...
[ "itertools.combinations", "dimod.Structured", "networkx.Graph" ]
[((2393, 2403), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (2401, 2403), True, 'import networkx as nx\n'), ((907, 925), 'dimod.Structured', 'dimod.Structured', ([], {}), '()\n', (923, 925), False, 'import dimod\n'), ((1180, 1220), 'itertools.combinations', 'itertools.combinations', (['self.nodelist', '(2)'], {}), ...
""" Filename: cartesian.py Authors: <NAME> Implements cartesian products and regular cartesian grids. """ import numpy from numba import njit def cartesian(nodes, order="C"): """Cartesian product of a list of arrays Parameters: ----------- nodes: (list of 1d-arrays) order: ('C' or 'F') order i...
[ "numpy.cumprod", "numba.njit", "numpy.zeros", "numpy.array", "numpy.linspace", "numpy.prod" ]
[((1674, 1690), 'numba.njit', 'njit', ([], {'cache': '(True)'}), '(cache=True)\n', (1678, 1690), False, 'from numba import njit\n'), ((579, 597), 'numpy.prod', 'numpy.prod', (['shapes'], {}), '(shapes)\n', (589, 597), False, 'import numpy\n'), ((608, 627), 'numpy.zeros', 'numpy.zeros', (['(l, n)'], {}), '((l, n))\n', (...
import pandas as pd from random_forest.forest import Forest def load(): df = pd.read_csv('../refrigerator_temp_time_series.csv') df['temp'] = df['temp'].apply(lambda x: x.replace(',', '.')).astype( 'float64') df['Ts'] = df['Ts'].apply(lambda x: x.replace(',', '.')).astype('float64') df.rename(...
[ "pandas.read_csv", "pandas.concat", "random_forest.forest.Forest" ]
[((83, 134), 'pandas.read_csv', 'pd.read_csv', (['"""../refrigerator_temp_time_series.csv"""'], {}), "('../refrigerator_temp_time_series.csv')\n", (94, 134), True, 'import pandas as pd\n'), ((1026, 1047), 'random_forest.forest.Forest', 'Forest', (['training_data'], {}), '(training_data)\n', (1032, 1047), False, 'from r...
# coding: utf-8 """ Argo Events No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
[ "argo.events.client.configuration.Configuration", "six.iteritems" ]
[((6737, 6770), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (6750, 6770), False, 'import six\n'), ((1689, 1704), 'argo.events.client.configuration.Configuration', 'Configuration', ([], {}), '()\n', (1702, 1704), False, 'from argo.events.client.configuration import Configura...
from __future__ import print_function from builtins import str from builtins import object import sys, os sys.path.append(os.path.dirname(os.getcwd())) from moments.timestamp import * def test_time(): s = "*2008.10.22 11:15:42 suffix remainder here" (ts, remainder) = parse_line_for_time(s) assert ts == "*...
[ "os.getcwd", "builtins.str" ]
[((138, 149), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (147, 149), False, 'import sys, os\n'), ((1656, 1663), 'builtins.str', 'str', (['tr'], {}), '(tr)\n', (1659, 1663), False, 'from builtins import str\n'), ((1727, 1734), 'builtins.str', 'str', (['tr'], {}), '(tr)\n', (1730, 1734), False, 'from builtins import str...
import structures import Point def get_adj(grid, cur, checked): adj_list = [] # Checks down if cur.x < len(grid[0])-1: down = Point.Point(cur.x+1, cur.y) if down not in checked: adj_list.append(down) # Checks right if cur.y < len(grid)-1: right = Point.Point(cur.x, cur.y+1) if right not in ch...
[ "structures.Set", "Point.Point", "structures.Queue" ]
[((636, 654), 'structures.Queue', 'structures.Queue', ([], {}), '()\n', (652, 654), False, 'import structures\n'), ((666, 682), 'structures.Set', 'structures.Set', ([], {}), '()\n', (680, 682), False, 'import structures\n'), ((1141, 1154), 'Point.Point', 'Point.Point', ([], {}), '()\n', (1152, 1154), False, 'import Poi...
""" Note: The raw configuration is a configuration that has the exact same representation as in the file but loaded in memory as a dict. (Example: module given in file still have the filename or function given as string to be evaluated are also still string). But the final conf has everythi...
[ "sys.path.pop", "copy.deepcopy", "os.path.abspath", "muteria.drivers.optimizers.criteriatestexecution.optimizerdefs.CriteriaOptimizers.has_element_named", "importlib.import_module", "muteria.drivers.optimizers.criteriatestexecution.optimizerdefs.check_is_right_optimizer", "sys.path.insert", "muteria.d...
[((6524, 6547), 'muteria.configmanager.configurations.CompleteConfiguration', 'CompleteConfiguration', ([], {}), '()\n', (6545, 6547), False, 'from muteria.configmanager.configurations import CompleteConfiguration\n'), ((3969, 4004), 'importlib.import_module', 'importlib.import_module', (['module_str'], {}), '(module_s...
# Copyright (c) 2010 Resolver Systems Ltd, PythonAnywhere LLP # See LICENSE.md # from threading import Lock from .errors import report_cell_error, CycleError class Node(object): def __init__(self, location, children=None, parents=None): self.location = location self.children = children if childr...
[ "threading.Lock" ]
[((407, 413), 'threading.Lock', 'Lock', ([], {}), '()\n', (411, 413), False, 'from threading import Lock\n')]
import requests def getrev(): resp = requests.get("https://pypi.org/pypi/TwitchIO/json") data = resp.json()["releases"] pre = max(data).split("b") final = f"{pre[0]}b{int(pre[1]) + 1}" return final print(getrev())
[ "requests.get" ]
[((43, 94), 'requests.get', 'requests.get', (['"""https://pypi.org/pypi/TwitchIO/json"""'], {}), "('https://pypi.org/pypi/TwitchIO/json')\n", (55, 94), False, 'import requests\n')]
import asyncio import logging import socket import time from dataclasses import astuple, dataclass from typing import Any, Awaitable, Callable, List, Optional, cast from google.protobuf import message import aioesphomeapi.host_resolver as hr from .api_pb2 import ( # type: ignore ConnectRequest, ConnectRespo...
[ "asyncio.sleep", "aioesphomeapi.host_resolver.async_resolve_host", "asyncio.open_connection", "socket.socket", "time.time", "asyncio.Lock", "asyncio.wait_for", "dataclasses.astuple", "logging.getLogger" ]
[((641, 668), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (658, 668), False, 'import logging\n'), ((1334, 1348), 'asyncio.Lock', 'asyncio.Lock', ([], {}), '()\n', (1346, 1348), False, 'import asyncio\n'), ((1483, 1497), 'asyncio.Lock', 'asyncio.Lock', ([], {}), '()\n', (1495, 1497), Fa...
import time import argparse def check_positive_number(number): return number > 0 def check_port(port, base=1024): ivalue = int(port) if ivalue <= base: raise argparse.ArgumentTypeError("%s is an invalid positive int value" % value) return ivalue def work(seconds): time.sleep(seconds)
[ "argparse.ArgumentTypeError", "time.sleep" ]
[((299, 318), 'time.sleep', 'time.sleep', (['seconds'], {}), '(seconds)\n', (309, 318), False, 'import time\n'), ((182, 255), 'argparse.ArgumentTypeError', 'argparse.ArgumentTypeError', (["('%s is an invalid positive int value' % value)"], {}), "('%s is an invalid positive int value' % value)\n", (208, 255), False, 'im...
from django import test from django.urls import reverse from django.contrib import auth from .. import models class HermesTestCase(test.TestCase): fixtures = ('hermes', ) def setUp(self): self.root_category = models.Category.objects.get(id=1) self.second_category = models.Category.objects.g...
[ "django.urls.reverse", "django.contrib.auth.models.User.objects.get", "django.test.Client" ]
[((685, 719), 'django.contrib.auth.models.User.objects.get', 'auth.models.User.objects.get', ([], {'id': '(1)'}), '(id=1)\n', (713, 719), False, 'from django.contrib import auth\n'), ((743, 756), 'django.test.Client', 'test.Client', ([], {}), '()\n', (754, 756), False, 'from django import test\n'), ((819, 862), 'django...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os from os import path import shutil from basic import BasicTestCase class TestReindex(BasicTestCase): def setUp(self): super(TestReindex, self).setUp() # Add a new page. self.page_path = path.j...
[ "os.remove", "os.path.join", "os.path.exists" ]
[((314, 347), 'os.path.join', 'path.join', (['self.repo_dir', '"""pages"""'], {}), "(self.repo_dir, 'pages')\n", (323, 347), False, 'from os import path\n'), ((372, 419), 'os.path.join', 'path.join', (['self.page_path', '"""linux"""', '"""blabla.md"""'], {}), "(self.page_path, 'linux', 'blabla.md')\n", (381, 419), Fals...
from tabulate import tabulate from methods.JSON import * from methods.CSV import * from methods.API import load_rand def main(): print("welcome to the employee directory!") start() def start(): print("\nWelcome! choose one of the following commands: \n1: read CSV \n2: write to CSV \n3: read JSON\n4: writ...
[ "methods.API.load_rand" ]
[((858, 869), 'methods.API.load_rand', 'load_rand', ([], {}), '()\n', (867, 869), False, 'from methods.API import load_rand\n')]
""" ------------------------------------------- Author: <NAME> Date: 7/3/19 ------------------------------------------- """ # common packages, most likely already installed import scipy import math import pandas as pd import networkx as nx import numpy as np import matplotlib.pyplot as plt import scipy.stats import sy...
[ "pandas.DataFrame", "seaborn.set_style", "matplotlib.pyplot.title", "seaborn.kdeplot", "networkx.degree", "numpy.std", "matplotlib.pyplot.legend", "scipy.special.ndtr", "numpy.mean", "seaborn.distplot", "networkx.subgraph", "matplotlib.pyplot.ylabel", "networkx.connected_component_subgraphs"...
[((2872, 2972), 'pandas.DataFrame', 'pd.DataFrame', (["{'min_degree': min_degree, 'max_degree': max_degree, 'genes_binned':\n genes_binned}"], {}), "({'min_degree': min_degree, 'max_degree': max_degree,\n 'genes_binned': genes_binned})\n", (2884, 2972), True, 'import pandas as pd\n'), ((10006, 10035), 'matplotlib...
from app import app from app import db from datetime import datetime from flask import Blueprint from flask import render_template from flask import redirect from flask import url_for from flask import request from flask import flash from flask_login import current_user from flask_login import login_required from app...
[ "app.models.job.Job.query.all", "flask.Blueprint", "app.forms.job_form.JobSubmissionForm", "app.helper.auth_helper.requires_roles", "datetime.datetime.utcnow", "flask.url_for", "app.db.session.commit", "flask.render_template", "app.models.job.Job.query.filter_by", "app.db.session.add", "app.mode...
[((451, 477), 'flask.Blueprint', 'Blueprint', (['"""job"""', '__name__'], {}), "('job', __name__)\n", (460, 477), False, 'from flask import Blueprint\n'), ((1728, 1760), 'app.helper.auth_helper.requires_roles', 'requires_roles', (['"""admin"""', '"""momod"""'], {}), "('admin', 'momod')\n", (1742, 1760), False, 'from ap...
import setuptools import datacite_rest as meta with open('README.md', 'r', encoding='utf-8') as fh: long_description = fh.read() install_requires = [ 'pydantic>=1.8.1,<1.9', 'pyhumps>=1.6.1,<1.7', 'requests>=2.25.1,<2.26' ] tests_require = install_requires + ['pytest'] setuptools.setup( name=me...
[ "setuptools.find_packages" ]
[((989, 1015), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (1013, 1015), False, 'import setuptools\n')]
#!/usr/bin/env python # # Generate tables for GroupVarint32 # Copyright 2011 Facebook # # @author <NAME> (<EMAIL>) # # Reference: http://www.stepanovpapers.com/CIKM_2011.pdf # # From 17 encoded bytes, we may use between 5 and 17 bytes to encode 4 # integers. The first byte is a key that indicates how many bytes each o...
[ "os.path.join", "optparse.OptionParser" ]
[((2646, 2660), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (2658, 2660), False, 'from optparse import OptionParser\n'), ((2891, 2937), 'os.path.join', 'os.path.join', (['options.install_dir', 'OUTPUT_FILE'], {}), '(options.install_dir, OUTPUT_FILE)\n', (2903, 2937), False, 'import os\n')]
# (c) Copyright [2018-2021] Micro Focus or one of its affiliates. # 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 applicabl...
[ "matplotlib.pyplot.close", "verticapy.drop_table", "pytest.fixture", "verticapy.learn.datasets.load_iris", "verticapy.learn.datasets.load_world", "pytest.approx", "datetime.date", "warnings.catch_warnings", "verticapy.learn.datasets.load_amazon", "verticapy.learn.datasets.load_titanic", "vertica...
[((778, 809), 'verticapy.set_option', 'set_option', (['"""print_info"""', '(False)'], {}), "('print_info', False)\n", (788, 809), False, 'from verticapy import set_option\n'), ((813, 843), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (827, 843), False, 'import pytest, datet...
"""Logging""" import json import logging from typing import Any, Dict, List, Optional, Union, cast def _trim_string(message: str) -> str: longest_string = 30 if len(message) > longest_string: prefix_len = int(longest_string / 3) suffix_len = prefix_len return message[:prefix_len] + "....
[ "typing.cast", "json.loads" ]
[((1290, 1309), 'json.loads', 'json.loads', (['message'], {}), '(message)\n', (1300, 1309), False, 'import json\n'), ((756, 813), 'typing.cast', 'cast', (['str', "(val[:prefix_len] + ['...'] + val[-suffix_len:])"], {}), "(str, val[:prefix_len] + ['...'] + val[-suffix_len:])\n", (760, 813), False, 'from typing import An...
# Copyright (C) 2016 Intel Corporation # Released under the MIT license (see COPYING.MIT) from oeqa.core.case import OETestCase from oeqa.core.decorator.oetag import OETestTag from oeqa.core.decorator.data import OETestDataDepends class DataTest(OETestCase): data_vars = ['IMAGE', 'ARCH'] @OETestDataDepends([...
[ "oeqa.core.decorator.data.OETestDataDepends", "oeqa.core.decorator.oetag.OETestTag" ]
[((301, 331), 'oeqa.core.decorator.data.OETestDataDepends', 'OETestDataDepends', (["['MACHINE']"], {}), "(['MACHINE'])\n", (318, 331), False, 'from oeqa.core.decorator.data import OETestDataDepends\n'), ((338, 361), 'oeqa.core.decorator.oetag.OETestTag', 'OETestTag', (['"""dataTestOk"""'], {}), "('dataTestOk')\n", (347...
# coding: utf-8 """ This module contains all the paths for alls this project's directories, that we created dynamically. All paths are absolute, without symlink and in unicode. We also add the 'apps' and 'libs' directories to the PYTHON PATH, which will make the imports much easier. """ impo...
[ "pathlib.Path", "tempfile.gettempdir" ]
[((911, 925), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (915, 925), False, 'from pathlib import Path\n'), ((1279, 1300), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n', (1298, 1300), False, 'import tempfile\n')]
# coding: utf-8 """ test_shopidown ---------------------------------- Tests for `shopidown` module. """ import textwrap from shopidown.parser import Parser parser = Parser() def test_title(): """ Tests that a title parsers to h1 tag """ assert parser.parse("# Title *italic* **bold**") == "<h1>Title <em...
[ "textwrap.dedent", "shopidown.parser.Parser" ]
[((172, 180), 'shopidown.parser.Parser', 'Parser', ([], {}), '()\n', (178, 180), False, 'from shopidown.parser import Parser\n'), ((1197, 1260), 'textwrap.dedent', 'textwrap.dedent', (['""" - list item 1\n - list item 2\n """'], {}), '(""" - list item 1\n - list item 2\n """)\n', (1212, 1260), False, ...
from __future__ import print_function import os from ConfigParser import NoSectionError, NoOptionError import paramiko from artemis.config import get_artemis_config_value from artemis.fileman.config_files import get_config_value from artemis.remote.utils import get_ssh_connection def check_config_file(ip_address,f...
[ "subprocess.Popen", "artemis.remote.utils.get_ssh_connection", "artemis.config.get_artemis_config_value", "os.path.isfile", "os.path.expanduser" ]
[((666, 704), 'os.path.expanduser', 'os.path.expanduser', (["('~/%s' % file_path)"], {}), "('~/%s' % file_path)\n", (684, 704), False, 'import os\n'), ((2841, 2902), 'artemis.config.get_artemis_config_value', 'get_artemis_config_value', ([], {'section': 'ip_address', 'option': '"""python"""'}), "(section=ip_address, op...
import os import numpy as np import scipy.io as sio import skimage as sk #from osgeo import gdal from sklearn.metrics import f1_score, precision_score, recall_score, accuracy_score, confusion_matrix import sklearn import warnings def save_as_mat(data, name): sio.savemat(name, {name: data}) def Read_TIFF_Image(Pa...
[ "numpy.sum", "sklearn.metrics.accuracy_score", "numpy.ones", "sklearn.metrics.f1_score", "numpy.rot90", "numpy.pad", "numpy.max", "warnings.catch_warnings", "numpy.divide", "numpy.size", "sklearn.metrics.recall_score", "numpy.min", "numpy.flip", "warnings.filterwarnings", "numpy.zeros", ...
[((265, 296), 'scipy.io.savemat', 'sio.savemat', (['name', '{name: data}'], {}), '(name, {name: data})\n', (276, 296), True, 'import scipy.io as sio\n'), ((563, 608), 'numpy.zeros', 'np.zeros', (['(Image.shape[1], Image.shape[2], 1)'], {}), '((Image.shape[1], Image.shape[2], 1))\n', (571, 608), True, 'import numpy as n...
from collections import defaultdict import math import random import hashlib from markovmodel import MarkovModelBuilder from samplers import RouletteWheelSampler class ItemCategoryMarkovModelBuilder(object): def __init__(self, item_category=None, customer=None): self.item_category = item_category ...
[ "random.normalvariate", "markovmodel.MarkovModelBuilder", "random.choice", "random.random", "samplers.RouletteWheelSampler" ]
[((1056, 1083), 'random.choice', 'random.choice', (['[0.25, 0.75]'], {}), '([0.25, 0.75])\n', (1069, 1083), False, 'import random\n'), ((1698, 1718), 'markovmodel.MarkovModelBuilder', 'MarkovModelBuilder', ([], {}), '()\n', (1716, 1718), False, 'from markovmodel import MarkovModelBuilder\n'), ((4395, 4439), 'samplers.R...
""" """ import os, sys, posixpath import py # Moved from local.py. iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt') class Checkers: _depend_on_existence = 'exists', 'link', 'dir', 'file' def __init__(self, path): self.path = path def dir(self): raise NotImplemen...
[ "os.path.isabs", "py.code.getrawcode", "py.std.fnmatch.fnmatch", "py.error.EINVAL", "py.error.checked_call", "os.path.normcase" ]
[((13045, 13082), 'py.std.fnmatch.fnmatch', 'py.std.fnmatch.fnmatch', (['name', 'pattern'], {}), '(name, pattern)\n', (13067, 13082), False, 'import py\n'), ((4691, 4735), 'py.error.checked_call', 'py.error.checked_call', (['py.std.pickle.load', 'f'], {}), '(py.std.pickle.load, f)\n', (4712, 4735), False, 'import py\n'...
""" test_transforms_post_transforms_code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import pytest @pytest.mark.sphinx('html', testroot='trim_doctest_flags') def test_trim_doctest_flags_html(app, st...
[ "pytest.mark.sphinx" ]
[((222, 279), 'pytest.mark.sphinx', 'pytest.mark.sphinx', (['"""html"""'], {'testroot': '"""trim_doctest_flags"""'}), "('html', testroot='trim_doctest_flags')\n", (240, 279), False, 'import pytest\n'), ((561, 619), 'pytest.mark.sphinx', 'pytest.mark.sphinx', (['"""latex"""'], {'testroot': '"""trim_doctest_flags"""'}), ...
# adapt from amrlib smatch file used for approximating the largest common supgraph between two AMRs #!/usr/bin/env python # -*- coding: utf-8 -*- import re import random import amr import sys # total number of iteration in smatch computation import penman from penman.models.noop import NoOpModel iteration_num = 5 ...
[ "penman.models.noop.NoOpModel", "random.seed", "amr.AMR.parse_AMR_line", "re.sub" ]
[((12328, 12341), 'random.seed', 'random.seed', ([], {}), '()\n', (12339, 12341), False, 'import random\n'), ((14109, 14122), 'random.seed', 'random.seed', ([], {}), '()\n', (14120, 14122), False, 'import random\n'), ((28525, 28550), 're.sub', 're.sub', (['""" +"""', '""" """', 'string'], {}), "(' +', ' ', string)\n", ...
# imports from datetime import date import requests import xlsxwriter from requests.auth import HTTPBasicAuth as BasicAuth # inputs url = "https://sandboxdnac.cisco.com/dna/system/api/v1/auth/token" username = "devnetuser" password = "<PASSWORD>!" headers = {"Content-Type": "application/json", "Accept": "application/...
[ "requests.auth.HTTPBasicAuth", "datetime.date.today", "requests.get" ]
[((827, 861), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (839, 861), False, 'import requests\n'), ((395, 424), 'requests.auth.HTTPBasicAuth', 'BasicAuth', (['username', 'password'], {}), '(username, password)\n', (404, 424), True, 'from requests.auth import HTTPBasicA...
from direct.actor.Actor import Actor from .definitions import HandSkeletonBone class HandSkeleton: """ Helper class that will map the skeleton received from OpenVR onto the bones of the model of the hand. """ def __init__(self, ovr, action, joint_map, part_name="modelRoot"): """ * ovr ...
[ "direct.actor.Actor.Actor" ]
[((1046, 1070), 'direct.actor.Actor.Actor', 'Actor', (['model'], {'copy': '(False)'}), '(model, copy=False)\n', (1051, 1070), False, 'from direct.actor.Actor import Actor\n')]
from django.contrib import admin from .models import Timer class TimerAdmin(admin.ModelAdmin): list_display =('datetime', 'user', 'event', 'item_pk', 'item_name', 'other_info', 'referrer') list_per_page = 1000 admin.site.register(Timer, TimerAdmin)
[ "django.contrib.admin.site.register" ]
[((239, 277), 'django.contrib.admin.site.register', 'admin.site.register', (['Timer', 'TimerAdmin'], {}), '(Timer, TimerAdmin)\n', (258, 277), False, 'from django.contrib import admin\n')]
#!/usr/bin/env python3 """Runs tablegen.""" import subprocess import sys # Prefix with ./ to run built binary, not arbitrary stuff from PATH. sys.exit(subprocess.call(['./' + sys.argv[1]] + sys.argv[2:]))
[ "subprocess.call" ]
[((153, 205), 'subprocess.call', 'subprocess.call', (["(['./' + sys.argv[1]] + sys.argv[2:])"], {}), "(['./' + sys.argv[1]] + sys.argv[2:])\n", (168, 205), False, 'import subprocess\n')]
from collections import namedtuple from random import randrange, choice, random from copy import deepcopy SensorState = namedtuple('SensorState', 'terrain, sensors, coverage') # Functions for the sensors # def get_covered_signal_points(state: SensorState, sensor: int) -> list: covered = get_all_covered_points(st...
[ "random.random", "copy.deepcopy", "random.choice", "collections.namedtuple" ]
[((121, 176), 'collections.namedtuple', 'namedtuple', (['"""SensorState"""', '"""terrain, sensors, coverage"""'], {}), "('SensorState', 'terrain, sensors, coverage')\n", (131, 176), False, 'from collections import namedtuple\n'), ((3198, 3221), 'copy.deepcopy', 'deepcopy', (['state.sensors'], {}), '(state.sensors)\n', ...
# # Collective Knowledge (CK) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: <NAME> # # This is the kernel of CK. It is implemented in just one file # with a minimal set of common portable functions and without OO # to make it simpler to re-implement it in any...
[ "os.mkdir", "os.remove", "json.dumps", "os.path.isfile", "sys.stdout.flush", "os.close", "shutil.rmtree", "os.path.join", "urllib2.urlopen", "os.chdir", "urllib2.HTTPPasswordMgrWithDefaultRealm", "shutil.copy", "os.path.abspath", "os.path.dirname", "urllib2.Request", "os.path.exists", ...
[((14392, 14410), 'copy.deepcopy', 'copy.deepcopy', (['cfg'], {}), '(cfg)\n', (14405, 14410), False, 'import copy\n'), ((14432, 14458), 'copy.deepcopy', 'copy.deepcopy', (['paths_repos'], {}), '(paths_repos)\n', (14445, 14458), False, 'import copy\n'), ((14526, 14556), 'copy.deepcopy', 'copy.deepcopy', (['paths_repos_a...
import asyncio import datetime import json import random import string #import aiofiles from fastapi import FastAPI from fastapi.responses import HTMLResponse, FileResponse, StreamingResponse, Response, Response from fastapi.staticfiles import StaticFiles from fastapi import FastAPI, File, UploadFile from pydantic im...
[ "items.get_all_machine_name", "items.launch_machine", "items.send_file_to_machine", "items.exec_command_to_machine", "items.stop_machine", "fastapi.File", "items.start_machine", "fastapi.FastAPI" ]
[((366, 375), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (373, 375), False, 'from fastapi import FastAPI, File, UploadFile\n'), ((521, 549), 'items.get_all_machine_name', 'items.get_all_machine_name', ([], {}), '()\n', (547, 549), False, 'import items\n'), ((1259, 1288), 'items.start_machine', 'items.start_machine...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # Поиск мультсериалов 16+ # Пример сериала: 'http://onlinemultfilmy.ru/bratya-ventura/' import time from grab import Grab g = Grab() # Перебор страниц с мультами for i in range(1, 82 + 1): url_page = 'http://onlinemultfilmy.ru/multserialy/...
[ "grab.Grab", "time.sleep" ]
[((202, 208), 'grab.Grab', 'Grab', ([], {}), '()\n', (206, 208), False, 'from grab import Grab\n'), ((741, 754), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (751, 754), False, 'import time\n')]
from aiohttp import web from openapi_core.validation.request.validators import RequestValidator from openapi_core.validation.response.validators import ResponseValidator from .openapi_wrappers import ( PATH_KEY, QUERY_KEY, AiohttpOpenAPIRequest, AiohttpOpenAPIResponse, ) from .rest_oas import OpenApiSp...
[ "openapi_core.validation.response.validators.ResponseValidator", "openapi_core.validation.request.validators.RequestValidator" ]
[((741, 787), 'openapi_core.validation.request.validators.RequestValidator', 'RequestValidator', (['spec'], {'custom_formatters': 'None'}), '(spec, custom_formatters=None)\n', (757, 787), False, 'from openapi_core.validation.request.validators import RequestValidator\n'), ((812, 859), 'openapi_core.validation.response....
from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.naming import make_autoname import datetime settings = frappe.get_doc("CRM Settings") global_settings = frappe.get_doc("Global Defaults") def set_image(self, method): self.sign = settings.signature self._address = settings...
[ "frappe.whitelist", "frappe.db.get_value", "frappe.defaults.get_user_default", "frappe.get_doc", "frappe.model.naming.make_autoname" ]
[((149, 179), 'frappe.get_doc', 'frappe.get_doc', (['"""CRM Settings"""'], {}), "('CRM Settings')\n", (163, 179), False, 'import frappe\n'), ((198, 231), 'frappe.get_doc', 'frappe.get_doc', (['"""Global Defaults"""'], {}), "('Global Defaults')\n", (212, 231), False, 'import frappe\n'), ((491, 509), 'frappe.whitelist', ...
import warnings warnings.filterwarnings("ignore") import yfinance as yf import numpy as np import pandas as pd import matplotlib import matplotlib as mpl matplotlib.use("Agg") from matplotlib import style from matplotlib import pyplot as plt plt.style.use("ggplot") import seaborn as sns plt.style.use("seaborn") sn...
[ "numpy.random.seed", "numpy.sum", "numpy.argmax", "numpy.argmin", "matplotlib.pyplot.style.use", "streamlit.sidebar.selectbox", "numpy.round", "matplotlib.pyplot.tight_layout", "pandas.DataFrame", "streamlit.subheader", "yfinance.download", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots...
[((17, 50), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (40, 50), False, 'import warnings\n'), ((157, 178), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (171, 178), False, 'import matplotlib\n'), ((246, 269), 'matplotlib.pyplot.style.use', 'plt....
# vim:ts=4:sw=4:et: # Copyright 2014-present Facebook, Inc. # Licensed under the Apache License, Version 2.0 from __future__ import absolute_import from __future__ import division from __future__ import print_function # no unicode literals import pywatchman import WatchmanInstance import WatchmanTestCase @WatchmanT...
[ "WatchmanInstance.Instance" ]
[((1095, 1135), 'WatchmanInstance.Instance', 'WatchmanInstance.Instance', ([], {'config': 'config'}), '(config=config)\n', (1120, 1135), False, 'import WatchmanInstance\n')]
# !/usr/bin/env python # coding: utf-8 from flask import request, g, make_response from flask_helper.flask_hook import FlaskHook from flask_helper.utils.ip import ip_value_str __author__ = 'zhouhenglc' class RealIPHook(FlaskHook): def __init__(self, app, trust_proxy=None, forwarded_key="X-Forw...
[ "flask.make_response", "flask_helper.utils.ip.ip_value_str", "flask_helper.flask_hook.FlaskHook.__init__" ]
[((341, 370), 'flask_helper.flask_hook.FlaskHook.__init__', 'FlaskHook.__init__', (['self', 'app'], {}), '(self, app)\n', (359, 370), False, 'from flask_helper.flask_hook import FlaskHook\n'), ((1139, 1170), 'flask_helper.utils.ip.ip_value_str', 'ip_value_str', ([], {'ip_str': 'request_ip'}), '(ip_str=request_ip)\n', (...
from stl import mesh import math import numpy # Create 3 faces of a cube data = numpy.zeros(6, dtype=mesh.Mesh.dtype) # Top of the cube data['vectors'][0] = numpy.array([[0, 1, 1], [1, 0, 1], [0, 0, 1]]) data['vectors'][1] = numpy.array([[1, 0, 1], ...
[ "matplotlib.pyplot.show", "mpl_toolkits.mplot3d.Axes3D", "math.radians", "numpy.zeros", "mpl_toolkits.mplot3d.art3d.Poly3DCollection", "matplotlib.pyplot.figure", "numpy.array", "numpy.concatenate" ]
[((81, 118), 'numpy.zeros', 'numpy.zeros', (['(6)'], {'dtype': 'mesh.Mesh.dtype'}), '(6, dtype=mesh.Mesh.dtype)\n', (92, 118), False, 'import numpy\n'), ((159, 205), 'numpy.array', 'numpy.array', (['[[0, 1, 1], [1, 0, 1], [0, 0, 1]]'], {}), '([[0, 1, 1], [1, 0, 1], [0, 0, 1]])\n', (170, 205), False, 'import numpy\n'), ...
from unittest.mock import Mock, patch import pandas as pd import pytest from rdt.transformers.numerical import NumericalTransformer from sdv.constraints.base import Constraint from sdv.constraints.errors import MissingConstraintColumnError from sdv.errors import ConstraintsNotMetError from sdv.metadata import Table ...
[ "pandas.DataFrame", "unittest.mock.patch.object", "sdv.metadata.Table.from_dict", "sdv.metadata.Table._transform_constraints", "sdv.metadata.Table._validate_data_on_constraints", "unittest.mock.Mock", "sdv.metadata.Table._make_ids", "sdv.metadata.Table._prepare_constraints", "unittest.mock.patch", ...
[((344, 381), 'unittest.mock.patch.object', 'patch.object', (['Constraint', '"""from_dict"""'], {}), "(Constraint, 'from_dict')\n", (356, 381), False, 'from unittest.mock import Mock, patch\n'), ((1551, 1588), 'unittest.mock.patch.object', 'patch.object', (['Constraint', '"""from_dict"""'], {}), "(Constraint, 'from_dic...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author: <NAME> import time import sys sys.path.append("..") import database.db_operator as db_operator import log.custom_logger as custom_logger class GatherAllTrackingStocks: ''' 聚合汇总所有需要被跟踪的股票 ''' def __int__(self): pass def run_file_t...
[ "sys.path.append", "log.custom_logger.CustomLogger", "database.db_operator.DBOperator", "time.time" ]
[((90, 111), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (105, 111), False, 'import sys\n'), ((1566, 1577), 'time.time', 'time.time', ([], {}), '()\n', (1575, 1577), False, 'import time\n'), ((1642, 1653), 'time.time', 'time.time', ([], {}), '()\n', (1651, 1653), False, 'import time\n'), ((108...
import os import unittest import glob from ....BaseTestCase import BaseTestCase from centipede.Crawler import Crawler from centipede.PathHolder import PathHolder from centipede.Crawler.Fs.Image import Exr class ExrTest(BaseTestCase): """Test Exr crawler.""" __exrFile = os.path.join(BaseTestCase.dataDirectory(...
[ "unittest.main", "centipede.PathHolder.PathHolder", "centipede.Crawler.Fs.Image.Exr.group" ]
[((3726, 3741), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3739, 3741), False, 'import unittest\n'), ((3096, 3115), 'centipede.Crawler.Fs.Image.Exr.group', 'Exr.group', (['crawlers'], {}), '(crawlers)\n', (3105, 3115), False, 'from centipede.Crawler.Fs.Image import Exr\n'), ((640, 666), 'centipede.PathHolder....
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "arch.api.utils.log_utils.getLogger", "numpy.square", "federatedml.statistic.data_overview.rubbish_clear", "federatedml.optim.gradient.HeteroLogisticGradient", "federatedml.secureprotol.EncryptModeCalculator" ]
[((1082, 1103), 'arch.api.utils.log_utils.getLogger', 'log_utils.getLogger', ([], {}), '()\n', (1101, 1103), False, 'from arch.api.utils import log_utils\n'), ((2325, 2352), 'federatedml.statistic.data_overview.rubbish_clear', 'rubbish_clear', (['rubbish_list'], {}), '(rubbish_list)\n', (2338, 2352), False, 'from feder...
import numpy as np import cv2 # Identify pixels above the threshold # Threshold of RGB > 160 does a nice job of identifying ground pixels only def color_thresh(img, rgb_thresh=(160, 160, 160),above = True): # Create an array of zeros same xy size as img, but single channel color_select = np.zeros_like(img[:,:,...
[ "cv2.warpPerspective", "numpy.zeros_like", "numpy.arctan2", "numpy.int_", "numpy.abs", "numpy.sum", "cv2.getPerspectiveTransform", "numpy.multiply", "numpy.float32", "numpy.clip", "numpy.mean", "numpy.arange", "numpy.sin", "numpy.cos", "numpy.sqrt" ]
[((298, 325), 'numpy.zeros_like', 'np.zeros_like', (['img[:, :, 0]'], {}), '(img[:, :, 0])\n', (311, 325), True, 'import numpy as np\n'), ((1314, 1341), 'numpy.zeros_like', 'np.zeros_like', (['img[:, :, 0]'], {}), '(img[:, :, 0])\n', (1327, 1341), True, 'import numpy as np\n'), ((2660, 2696), 'numpy.sqrt', 'np.sqrt', (...
#!/usr/bin/env python3 """ NPMExtraMetrics module """ from __future__ import print_function import logging from multiqc.utils import config from multiqc.modules.base_module import BaseMultiqcModule from . import npm_picard_QualityYieldMetrics from . import npm_samtools_stats_bq from . import npm_bcftools_gtcheck fr...
[ "multiqc.utils.config.kwargs.get", "logging.getLogger" ]
[((420, 448), 'logging.getLogger', 'logging.getLogger', (['"""multiqc"""'], {}), "('multiqc')\n", (437, 448), False, 'import logging\n'), ((584, 625), 'multiqc.utils.config.kwargs.get', 'config.kwargs.get', (['"""enable_plugin"""', '(False)'], {}), "('enable_plugin', False)\n", (601, 625), False, 'from multiqc.utils im...
from timeit import timeit from sijuiacion_lang.lowering import sij, Lower defun = sij.Defun("", "", [], "", ["argf"], [ sij.Load("argf"), sij.Label("loop"), sij.Unpack(2), sij.Call(1), sij.Unpack(2), sij.GotoNEq("loop"), sij.Return() ]) code, _ = Lower({}).lower("", "", 1, "", [], [], [def...
[ "sijuiacion_lang.lowering.sij.Call", "sijuiacion_lang.lowering.sij.Return", "sijuiacion_lang.lowering.sij.Load", "sijuiacion_lang.lowering.sij.GotoNEq", "sijuiacion_lang.lowering.sij.Label", "sijuiacion_lang.lowering.Lower", "dis.show_code", "sijuiacion_lang.lowering.sij.Unpack" ]
[((754, 778), 'dis.show_code', 'dis.show_code', (['scheduler'], {}), '(scheduler)\n', (767, 778), False, 'import dis\n'), ((779, 798), 'dis.show_code', 'dis.show_code', (['schd'], {}), '(schd)\n', (792, 798), False, 'import dis\n'), ((125, 141), 'sijuiacion_lang.lowering.sij.Load', 'sij.Load', (['"""argf"""'], {}), "('...
# -*- encoding: utf-8 -*- # # 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...
[ "json.loads", "cryptography.hazmat.primitives.hashes.SHA256", "cryptography.hazmat.primitives.ciphers.algorithms.AES", "base64.b64decode", "json.dumps", "cryptography.hazmat.primitives.ciphers.modes.GCM", "mergify_engine.config.CACHE_TOKEN_SECRET.encode", "base64.b64encode", "requests.get", "daiqu...
[((882, 910), 'daiquiri.getLogger', 'daiquiri.getLogger', (['__name__'], {}), '(__name__)\n', (900, 910), False, 'import daiquiri\n'), ((933, 948), 'cryptography.hazmat.primitives.hashes.SHA256', 'hashes.SHA256', ([], {}), '()\n', (946, 948), False, 'from cryptography.hazmat.primitives import hashes\n'), ((991, 1025), ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Configure the tests for :mod:`astropy.cosmology`.""" ############################################################################## # IMPORTS # STDLIB import inspect import json import os # THIRD-PARTY import pytest # LOCAL import astropy.cosmology...
[ "json.dump", "astropy.units.Quantity", "json.loads", "inspect.isclass", "os.path.exists", "astropy.units.add_enabled_units", "astropy.cosmology.core.Cosmology.from_format" ]
[((2705, 2721), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (2715, 2721), False, 'import json\n'), ((3219, 3259), 'astropy.cosmology.core.Cosmology.from_format', 'Cosmology.from_format', (['mapping'], {}), '(mapping, **kwargs)\n', (3240, 3259), False, 'from astropy.cosmology.core import Cosmology\n'), ((137...
import json from urllib.parse import quote from sdk_lpl.config import Config from sdk_lpl.models.InfoCompteModel import InformationCompteModel from sdk_lpl.utils.crypt import Crypt def generate_url(mail, username, guid): """ Génération de l'url de l'inscription partenaire Inclure cette url dans une balis...
[ "sdk_lpl.utils.crypt.Crypt", "sdk_lpl.models.InfoCompteModel.InformationCompteModel", "json.dumps" ]
[((545, 589), 'sdk_lpl.models.InfoCompteModel.InformationCompteModel', 'InformationCompteModel', (['mail', 'username', 'guid'], {}), '(mail, username, guid)\n', (567, 589), False, 'from sdk_lpl.models.InfoCompteModel import InformationCompteModel\n'), ((605, 631), 'json.dumps', 'json.dumps', (['model.__dict__'], {}), '...
from tensorflow.keras.optimizers import Adam from tensorflow.keras.callbacks import (ModelCheckpoint, TensorBoard, ReduceLROnPlateau, CSVLogger, EarlyStopping) from model import get_model import argparse from datasets import ECGSequence, PublicECGSequence if __name__ == "__main_...
[ "model.get_model", "argparse.ArgumentParser", "tensorflow.keras.callbacks.ReduceLROnPlateau", "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.callbacks.CSVLogger", "datasets.PublicECGSequence.get_train_and_val", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.callbacks.TensorBoar...
[((362, 422), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train neural network."""'}), "(description='Train neural network.')\n", (385, 422), False, 'import argparse\n'), ((1146, 1206), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train neural network...
""" Agents! Create a number of Agents, each with a random x and y coordinate (0-99). Cycle through a number of iteration steps. For each iteration randomly move the agent by +/- 1 unit in each direction. The agent must stay within the bounds of the model 0-99. Calculate the final distance between all the agents. Plot ...
[ "operator.itemgetter", "agentframework.Agent" ]
[((844, 866), 'agentframework.Agent', 'agentframework.Agent', ([], {}), '()\n', (864, 866), False, 'import agentframework\n'), ((1586, 1608), 'operator.itemgetter', 'operator.itemgetter', (['(2)'], {}), '(2)\n', (1605, 1608), False, 'import operator\n'), ((1630, 1652), 'operator.itemgetter', 'operator.itemgetter', (['(...
import configparser import random import os import requests from common import doc, set_help, set_aliases, get_aliases from lxml import etree config = configparser.ConfigParser() config.read('config.ini') BOT_NAME = config['bot']['name'] if config['bot']['cmd_without_dash'] == 'yes': CMD_SIGN = '' else: CMD_S...
[ "lxml.etree.fromstring", "common.get_aliases", "common.set_help", "requests.get", "configparser.ConfigParser" ]
[((152, 179), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (177, 179), False, 'import configparser\n'), ((1077, 1088), 'common.set_help', 'set_help', (['s'], {}), '(s)\n', (1085, 1088), False, 'from common import doc, set_help, set_aliases, get_aliases\n'), ((438, 455), 'requests.get', 'r...
import tensorflow as tf from utils.util_class import WrongInputException def augmentation_factory(augment_probs=None): augment_probs = augment_probs if augment_probs else dict() augmenters = [] for key, prob in augment_probs.items(): if key is "CropAndResize": augm = CropAndResize(prob...
[ "tensorflow.image.flip_left_right", "tensorflow.clip_by_value", "tensorflow.reshape", "tensorflow.image.crop_and_resize", "numpy.isclose", "tensorflow.linalg.inv", "numpy.linalg.norm", "utils.convert_pose.pose_rvec2matr_batch_tf", "cv2.imshow", "os.path.join", "tensorflow.abs", "tensorflow.ran...
[((9665, 9711), 'tensorflow.constant', 'tf.constant', (['[height, width]'], {'dtype': 'tf.float32'}), '([height, width], dtype=tf.float32)\n', (9676, 9711), True, 'import tensorflow as tf\n'), ((9728, 9832), 'tensorflow.constant', 'tf.constant', (['[[[width / 2, 0, width / 2], [0, height / 2, height / 2], [0, 0, 1]]]']...
# contrast activity contrast back lr import os import mne from mne.io import read_raw_fif import numpy import numpy as np import matplotlib.pyplot as plt import os.path as op from operator import itemgetter from mne.io import Raw from mne.io import read_raw_ctf from mne.preprocessing import ICA from mne.viz import pl...
[ "numpy.load", "mne.io.read_raw_fif", "mne.pick_types", "matplotlib.pyplot.close", "numpy.shape", "matplotlib.pyplot.figure", "mne.channels.layout._find_topomap_coords", "numpy.array", "mne.Epochs", "numpy.arange", "matplotlib.gridspec.GridSpec", "operator.itemgetter", "mne.viz.topomap._plot_...
[((3639, 3663), 'numpy.array', 'np.array', (['list_data_back'], {}), '(list_data_back)\n', (3647, 3663), True, 'import numpy as np\n'), ((3677, 3701), 'numpy.array', 'np.array', (['list_data_left'], {}), '(list_data_left)\n', (3685, 3701), True, 'import numpy as np\n'), ((3716, 3741), 'numpy.array', 'np.array', (['list...
from time import sleep from bluepy.btle import Scanner, Peripheral, ADDR_TYPE_RANDOM, DefaultDelegate, ScanEntry, BTLEException from .config import Config from .desks import factory, DefaultDesk class DeskManager: MAX_CONNECTION_ATTEMPTS = 5 def __init__(self): self._scanner = Scanner() self...
[ "bluepy.btle.Scanner", "time.sleep", "bluepy.btle.Peripheral" ]
[((298, 307), 'bluepy.btle.Scanner', 'Scanner', ([], {}), '()\n', (305, 307), False, 'from bluepy.btle import Scanner, Peripheral, ADDR_TYPE_RANDOM, DefaultDelegate, ScanEntry, BTLEException\n'), ((335, 347), 'bluepy.btle.Peripheral', 'Peripheral', ([], {}), '()\n', (345, 347), False, 'from bluepy.btle import Scanner, ...
"""seize process release""" from casymda.blocks import Delay, NamedResource, ResourceRelease, ResourceSeizeQueue from casymda.blocks.block_components import VisualizableBlock class SeizeProcessRelease(VisualizableBlock): """entities in this block follow the process: request resource, be processed, release res...
[ "casymda.blocks.NamedResource", "casymda.blocks.Delay", "casymda.blocks.ResourceSeizeQueue", "casymda.blocks.ResourceRelease" ]
[((517, 580), 'casymda.blocks.NamedResource', 'NamedResource', (['self.env', '"""resource"""'], {'capacity': 'resource_capacity'}), "(self.env, 'resource', capacity=resource_capacity)\n", (530, 580), False, 'from casymda.blocks import Delay, NamedResource, ResourceRelease, ResourceSeizeQueue\n'), ((648, 718), 'casymda....
# Copyright 2021 Canonical Ltd. # See LICENSE file for licensing details. import re import subprocess import unittest from unittest.mock import Mock, patch from charms.operator_libs_linux.v0 import apt from ops.model import ActiveStatus, BlockedStatus, WaitingStatus from ops.testing import Harness from charm import ...
[ "re.fullmatch", "ops.testing.Harness", "ops.model.WaitingStatus", "ops.model.BlockedStatus", "unittest.mock.Mock", "unittest.mock.patch", "tests.helpers.patch_network_get", "subprocess.CalledProcessError" ]
[((431, 475), 'tests.helpers.patch_network_get', 'patch_network_get', ([], {'private_address': '"""1.1.1.1"""'}), "(private_address='1.1.1.1')\n", (448, 475), False, 'from tests.helpers import patch_network_get\n'), ((825, 885), 'unittest.mock.patch', 'patch', (['"""charm.PostgresqlOperatorCharm._install_pip_packages""...
import cv2 import numpy as np import pyautogui hand_hist = None traverse_point = [] total_rectangle = 9 hand_rect_one_x = None hand_rect_one_y = None hand_rect_two_x = None hand_rect_two_y = None def rescale_frame(frame, wpercent=130, hpercent=130): width = int(frame.shape[1] * wpercent / 100) height = int(...
[ "cv2.bitwise_and", "numpy.argmax", "cv2.rectangle", "cv2.normalize", "cv2.erode", "cv2.convexityDefects", "cv2.subtract", "cv2.filter2D", "cv2.dilate", "cv2.cvtColor", "cv2.calcBackProject", "cv2.destroyAllWindows", "cv2.resize", "cv2.circle", "cv2.waitKey", "cv2.calcHist", "cv2.conv...
[((364, 428), 'cv2.resize', 'cv2.resize', (['frame', '(width, height)'], {'interpolation': 'cv2.INTER_AREA'}), '(frame, (width, height), interpolation=cv2.INTER_AREA)\n', (374, 428), False, 'import cv2\n'), ((489, 538), 'cv2.cvtColor', 'cv2.cvtColor', (['hist_mask_image', 'cv2.COLOR_BGR2GRAY'], {}), '(hist_mask_image, ...
import argparse import logging import subprocess import tempfile from pathlib import Path from aiohttp import web from PIL import Image from unifi.cams.base import UnifiCamBase class RTSPCam(UnifiCamBase): def __init__(self, args: argparse.Namespace, logger: logging.Logger) -> None: super().__init__(ar...
[ "subprocess.Popen", "aiohttp.web.Response", "aiohttp.web.TCPSite", "PIL.Image.open", "pathlib.Path", "tempfile.mkdtemp", "aiohttp.web.get", "aiohttp.web.AppRunner", "aiohttp.web.Application" ]
[((411, 429), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (427, 429), False, 'import tempfile\n'), ((1861, 1898), 'pathlib.Path', 'Path', (['self.snapshot_dir', '"""screen.jpg"""'], {}), "(self.snapshot_dir, 'screen.jpg')\n", (1865, 1898), False, 'from pathlib import Path\n'), ((1681, 1772), 'subprocess.P...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.python.platform.test.main", "tensorflow.python.ops.gradient_checker.compute_gradient_error", "numpy.abs", "numpy.asarray", "tensorflow.python.framework.constant_op.constant", "tensorflow.python.ops.nn_ops.softsign", "numpy.array" ]
[((2751, 2762), 'tensorflow.python.platform.test.main', 'test.main', ([], {}), '()\n', (2760, 2762), False, 'from tensorflow.python.platform import test\n'), ((1416, 1444), 'tensorflow.python.ops.nn_ops.softsign', 'nn_ops.softsign', (['np_features'], {}), '(np_features)\n', (1431, 1444), False, 'from tensorflow.python....
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import example_pb2 as example__pb2 class AgentStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel)...
[ "grpc.method_handlers_generic_handler", "grpc.unary_unary_rpc_method_handler", "grpc.experimental.unary_unary" ]
[((7315, 7381), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""Agent"""', 'rpc_method_handlers'], {}), "('Agent', rpc_method_handlers)\n", (7351, 7381), False, 'import grpc\n'), ((5043, 5228), 'grpc.unary_unary_rpc_method_handler', 'grpc.unary_unary_rpc_method_handler', (['service...
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
[ "webkitpy.tool.mocktool.MockTool", "os.remove", "webkitpy.tool.mocktool.MockOptions", "webkitpy.common.system.outputcapture.OutputCapture" ]
[((1908, 1923), 'webkitpy.common.system.outputcapture.OutputCapture', 'OutputCapture', ([], {}), '()\n', (1921, 1923), False, 'from webkitpy.common.system.outputcapture import OutputCapture\n'), ((2654, 2679), 'os.remove', 'os.remove', (['changelog_path'], {}), '(changelog_path)\n', (2663, 2679), False, 'import os\n'),...
import argparse import os print("In dataprep.py: as a data scientist, this is where you should fill in your dataprep code.") parser = argparse.ArgumentParser("dataprep") parser.add_argument("--input_data", type=str, help="input data") parser.add_argument("--processed_data", type=str, help="processed_data directory")...
[ "os.makedirs", "argparse.ArgumentParser" ]
[((136, 171), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""dataprep"""'], {}), "('dataprep')\n", (159, 171), False, 'import argparse\n'), ((474, 521), 'os.makedirs', 'os.makedirs', (['args.processed_data'], {'exist_ok': '(True)'}), '(args.processed_data, exist_ok=True)\n', (485, 521), False, 'import os\n...
import unittest import click from click.testing import CliRunner # init database from gather2gether.db import g2gDB from gather2gether.db import * init_database(g2gDB) from gather2gether.db.project import project_create, project_find, project_update, project_search, project_delete from gather2gether.db.task import ta...
[ "gather2gether.db.project.project_update", "gather2gether.db.project.project_find", "gather2gether.db.task.task_search", "gather2gether.db.project.project_create", "gather2gether.db.project.project_delete", "gather2gether.db.project.project_search", "logging.disable", "gather2gether.db.user.user_delet...
[((567, 598), 'logging.disable', 'logging.disable', (['logging.NOTSET'], {}), '(logging.NOTSET)\n', (582, 598), False, 'import logging\n'), ((724, 737), 'gather2gether.db.task.task_search', 'task_search', ([], {}), '()\n', (735, 737), False, 'from gather2gether.db.task import task_delete, task_search\n'), ((907, 923), ...
import json import logging import os from pathlib import Path import collections import ast import yaml from fire import Fire import time import torch from torch.nn import functional as F from transformers import AutoTokenizer, AutoModelForQuestionAnswering from health_qa.src.utils import chunks_ques_wrapper # change...
[ "yaml.load", "time.strftime", "logging.getLogger", "json.dumps", "collections.defaultdict", "pathlib.Path", "torch.no_grad", "os.chdir", "transformers.AutoModelForQuestionAnswering.from_pretrained", "easydict.EasyDict", "time.localtime", "tqdm.tqdm", "transformers.AutoTokenizer.from_pretrain...
[((364, 391), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (381, 391), False, 'import logging\n'), ((448, 470), 'os.chdir', 'os.chdir', (['project_path'], {}), '(project_path)\n', (456, 470), False, 'import os\n'), ((564, 605), 'yaml.load', 'yaml.load', (['stream'], {'Loader': 'yaml.Ful...
import requests import colorama import os from base64 import b64encode as b64 from base64 import b64decode import base64 from random import choice as ch import time from colorama import Fore, Back, Style from colorama import init def bruteforce_token(): init() print(Style.BRIGHT) if os.name == 'nt': os.syste...
[ "colorama.init", "random.choice", "os.system", "time.sleep", "requests.get", "requests.post" ]
[((257, 263), 'colorama.init', 'init', ([], {}), '()\n', (261, 263), False, 'from colorama import init\n'), ((312, 328), 'os.system', 'os.system', (['"""cls"""'], {}), "('cls')\n", (321, 328), False, 'import os\n'), ((341, 359), 'os.system', 'os.system', (['"""clear"""'], {}), "('clear')\n", (350, 359), False, 'import ...
#import cv2 import numpy as np #import os #import tensorflow as tf #from tensorflow import keras def calib_input(iter): X = np.load("features.npy") / 255.0 images = X[:100] return {"conv2d_input": images}
[ "numpy.load" ]
[((127, 150), 'numpy.load', 'np.load', (['"""features.npy"""'], {}), "('features.npy')\n", (134, 150), True, 'import numpy as np\n')]
import os import time import torch import numpy as np import utils import logging from options import * from model.hidden import Hidden from average_meter import AverageMeter def train(model: Hidden, device: torch.device, hidden_config: HiDDenConfiguration, train_options: TrainingOption...
[ "utils.get_data_loaders", "average_meter.AverageMeter", "time.time", "logging.info", "numpy.random.choice", "os.path.join", "utils.log_progress" ]
[((952, 1004), 'utils.get_data_loaders', 'utils.get_data_loaders', (['hidden_config', 'train_options'], {}), '(hidden_config, train_options)\n', (974, 1004), False, 'import utils\n'), ((1656, 1667), 'time.time', 'time.time', ([], {}), '()\n', (1665, 1667), False, 'import time\n'), ((2704, 2726), 'logging.info', 'loggin...
# -*- coding: utf-8 -*- """ Created on Wed Nov 14 14:28:11 2018 @author: <NAME> """ import numpy as np import numpy.random as rd import argparse from collections import deque import pickle import os from ddpg import Actor, Critic from make_env import make_env import torch dtype = torch.float device = torch.device(...
[ "numpy.size", "numpy.zeros_like", "make_env.make_env", "argparse.ArgumentParser", "os.getcwd", "numpy.asarray", "numpy.zeros", "numpy.ones", "numpy.clip", "numpy.array", "numpy.random.normal", "torch.device", "ddpg.Critic", "ddpg.Actor", "collections.deque", "numpy.sqrt" ]
[((307, 327), 'torch.device', 'torch.device', (['"""cuda"""'], {}), "('cuda')\n", (319, 327), False, 'import torch\n'), ((443, 464), 'numpy.zeros_like', 'np.zeros_like', (['x_prev'], {}), '(x_prev)\n', (456, 464), True, 'import numpy as np\n'), ((477, 492), 'numpy.size', 'np.size', (['x_prev'], {}), '(x_prev)\n', (484,...
# coding=utf_8 # Copyright 2020 The Allen Institute for AI team and The HuggingFace Inc. team. # # 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...
[ "logging.getLogger" ]
[((781, 808), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (798, 808), False, 'import logging\n')]
import imaplib import json import os import tqdm class Mail: def __init__(self, username, password, host='imap.gmail.com', port=993): self.conn = imaplib.IMAP4_SSL(host, port) self.conn.login(username, password) def select_mailbox(self, mailbox='INBOX'): self.conn.select(mailbox) ...
[ "imaplib.IMAP4_SSL", "tqdm.tqdm", "os.mkdir", "json.load", "os.getcwd", "os.system", "os.chdir" ]
[((3359, 3379), 'os.chdir', 'os.chdir', (['"""Problems"""'], {}), "('Problems')\n", (3367, 3379), False, 'import os\n'), ((161, 190), 'imaplib.IMAP4_SSL', 'imaplib.IMAP4_SSL', (['host', 'port'], {}), '(host, port)\n', (178, 190), False, 'import imaplib\n'), ((1281, 1296), 'tqdm.tqdm', 'tqdm.tqdm', (['nums'], {}), '(num...
"""Highlights API handler.""" import json import os import time from time import sleep import requests import threading try: from gateway_addon import APIHandler, APIResponse, Adapter, Device, Property, Database #print("succesfully loaded APIHandler and APIResponse from gateway_addon") except: print("Imp...
[ "os.path.expanduser", "threading.Thread", "json.load", "gateway_addon.Adapter.__init__", "json.loads", "os.getcwd", "gateway_addon.APIHandler.__init__", "gateway_addon.Device.__init__", "os.path.dirname", "json.dumps", "time.sleep", "os.path.isfile", "gateway_addon.APIResponse", "gateway_a...
[((37616, 37693), 'gateway_addon.Adapter.__init__', 'Adapter.__init__', (['self', 'self.adapter_name', 'self.adapter_name'], {'verbose': 'verbose'}), '(self, self.adapter_name, self.adapter_name, verbose=verbose)\n', (37632, 37693), False, 'from gateway_addon import APIHandler, APIResponse, Adapter, Device, Property, D...
# Quickbutton # # $Id$ # # Coded by Dr.Best (c) 2009 # Support: www.dreambox-tools.info # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your o...
[ "Components.config.ConfigSubsection", "Components.config.config.plugins.Quickbutton.save", "Components.ConfigList.ConfigListScreen.keyLeft", "Screens.Screen.Screen.__init__", "Plugins.Plugin.PluginDescriptor", "Components.PluginComponent.plugins.getPlugins", "Components.ActionMap.HelpableActionMap", "...
[((1253, 1271), 'Components.config.ConfigSubsection', 'ConfigSubsection', ([], {}), '()\n', (1269, 1271), False, 'from Components.config import ConfigSubsection, ConfigText, configfile, ConfigSelection, getConfigListEntry, ConfigYesNo\n'), ((1325, 1351), 'Components.config.ConfigYesNo', 'ConfigYesNo', ([], {'default': ...