code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
"""Unit tests for q0202.py.""" import unittest from src.utils.linkedlist import LinkedList from src.q0202 import kth_element_to_last class TestKthElementToLast(unittest.TestCase): """Tests for kth element to last.""" def test_kth_element_to_last(self): linked_list = LinkedList() self.assertE...
[ "unittest.main", "src.q0202.kth_element_to_last", "src.utils.linkedlist.LinkedList" ]
[((1007, 1022), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1020, 1022), False, 'import unittest\n'), ((287, 299), 'src.utils.linkedlist.LinkedList', 'LinkedList', ([], {}), '()\n', (297, 299), False, 'from src.utils.linkedlist import LinkedList\n'), ((325, 353), 'src.q0202.kth_element_to_last', 'kth_element_t...
""" This file provides endpoints for everything URL shortener related """ from flask import Blueprint, request, make_response, redirect, json import time import validators from rushapi.reusables.context import db_cursor from rushapi.reusables.context import db_connection from rushapi.reusables.rng import get_random_s...
[ "rushapi.reusables.context.db_cursor.execute", "flask.Blueprint", "flask.redirect", "rushapi.reusables.rng.get_random_string", "validators.url", "time.time", "flask.json.dumps", "rushapi.reusables.context.db_connection.commit", "rushapi.reusables.user_validation.get_user_context" ]
[((407, 443), 'flask.Blueprint', 'Blueprint', (['"""url_shortener"""', '__name__'], {}), "('url_shortener', __name__)\n", (416, 443), False, 'from flask import Blueprint, request, make_response, redirect, json\n'), ((3527, 3549), 'rushapi.reusables.context.db_connection.commit', 'db_connection.commit', ([], {}), '()\n'...
from nipype.interfaces.ants.base import ANTSCommandInputSpec, ANTSCommand from nipype.interfaces.ants.segmentation import N4BiasFieldCorrectionOutputSpec from nipype.interfaces.base import (File, traits, isdefined) from nipype.utils.filemanip import split_filename import nipype.pipeline.engine as pe import nipype.inter...
[ "nipype.interfaces.fsl.ApplyTOPUP", "nipype.interfaces.base.traits.Float", "nipype.interfaces.utility.IdentityInterface", "nipype.interfaces.fsl.ExtractROI", "nipype.interfaces.fsl.Split", "nipype.interfaces.fsl.Merge", "nipype.workflows.dmri.fsl.utils.apply_all_corrections", "nipype.interfaces.base.i...
[((3100, 3123), 'nipype.workflows.dmri.fsl.utils.apply_all_corrections', 'apply_all_corrections', ([], {}), '()\n', (3121, 3123), False, 'from nipype.workflows.dmri.fsl.utils import b0_average, apply_all_corrections, insert_mat, rotate_bvecs, vsm2warp, extract_bval, recompose_xfm, recompose_dwi, _checkinitxfm, enhance\...
# -*- coding: utf-8 -*- """ Created on Fri Dec 2 14:02:26 2016 MIT License Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limit...
[ "zeex.core.compat.QtGui.QStandardItemModel.__init__" ]
[((1483, 1522), 'zeex.core.compat.QtGui.QStandardItemModel.__init__', 'QtGui.QStandardItemModel.__init__', (['self'], {}), '(self)\n', (1516, 1522), False, 'from zeex.core.compat import QtGui, QtCore\n')]
import os import glob import numpy as np import pandas as pd # geospatial libaries from osgeo import gdal, osr from xml.etree import ElementTree def read_geo_info(fname): """ This function takes as input the geotiff name and the path of the folder that the images are stored, reads the geographic information ...
[ "numpy.dstack", "xml.etree.ElementTree.parse", "os.path.join", "numpy.max", "numpy.array", "numpy.arange", "osgeo.gdal.BuildVRTOptions", "xml.etree.ElementTree.SubElement", "glob.glob", "osgeo.gdal.Open", "osgeo.gdal.GetDriverByName", "osgeo.gdal.BuildVRT" ]
[((1163, 1179), 'osgeo.gdal.Open', 'gdal.Open', (['fname'], {}), '(fname)\n', (1172, 1179), False, 'from osgeo import gdal, osr\n'), ((1538, 1550), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (1546, 1550), True, 'import numpy as np\n'), ((2892, 2908), 'osgeo.gdal.Open', 'gdal.Open', (['fname'], {}), '(fname)\n',...
# # import modules # from ahvl.helper import AhvlMsg, AhvlHelper import subprocess # # helper/message # msg = AhvlMsg() hlp = AhvlHelper() # # process # class Process(object): def __init__(self, proc=None, cmd=[], failonstderr=True, shell=False): # set process name and command self.setproces...
[ "subprocess.Popen", "ahvl.helper.AhvlMsg", "subprocess.list2cmdline", "ahvl.helper.AhvlHelper" ]
[((111, 120), 'ahvl.helper.AhvlMsg', 'AhvlMsg', ([], {}), '()\n', (118, 120), False, 'from ahvl.helper import AhvlMsg, AhvlHelper\n'), ((127, 139), 'ahvl.helper.AhvlHelper', 'AhvlHelper', ([], {}), '()\n', (137, 139), False, 'from ahvl.helper import AhvlMsg, AhvlHelper\n'), ((3736, 3832), 'subprocess.Popen', 'subproces...
import json import sys from flask import (Blueprint, Markup, flash, g, jsonify, redirect, render_template, request, session, url_for) from flask_login import current_user, login_user, logout_user from app.main.admin import (get_admin_control_by_id, get_admin_control_by_name, ...
[ "flask.flash", "app.main.users.register_user", "app.main.users.get_user", "app.main.users.get_all_users_with_permissions", "flask.request.form.get", "app.main.admin.get_admin_control_by_name", "app.main.users.delete_user", "app.main.users.is_admin", "flask.url_for", "flask.jsonify", "sys.exc_inf...
[((693, 720), 'flask.Blueprint', 'Blueprint', (['"""main"""', '__name__'], {}), "('main', __name__)\n", (702, 720), False, 'from flask import Blueprint, Markup, flash, g, jsonify, redirect, render_template, request, session, url_for\n'), ((906, 939), 'app.main.users.is_admin', 'is_admin', (['g.session', 'current_user']...
import os from nlp_tools.preprocessing import Preprocessing from nlp_tools.loaders import MdLoader from nlp_tools.representations import MergedMatrixRepresentation from nlp_tools.classifiers import ClassificationProcessor, NaiveBayseTfIdfClassifier from nlp_tools.utils import get_random_message from quelfilm.settings ...
[ "nlp_tools.representations.MergedMatrixRepresentation", "nlp_tools.preprocessing.Preprocessing", "nlp_tools.classifiers.NaiveBayseTfIdfClassifier", "nlp_tools.utils.get_random_message", "nlp_tools.loaders.MdLoader" ]
[((368, 391), 'nlp_tools.loaders.MdLoader', 'MdLoader', (['TRAINING_PATH'], {}), '(TRAINING_PATH)\n', (376, 391), False, 'from nlp_tools.loaders import MdLoader\n'), ((408, 429), 'nlp_tools.preprocessing.Preprocessing', 'Preprocessing', (['loader'], {}), '(loader)\n', (421, 429), False, 'from nlp_tools.preprocessing im...
from socket import * import argparse # Parameters #TCP_IP = 'localhost' #TCP_PORT = 12003 BUFFER_SIZE = 1024 # Arguments parser = argparse.ArgumentParser() parser.add_argument('server_host') parser.add_argument('server_port') parser.add_argument('filename') args = parser.parse_args() # Prepare a client socket clien...
[ "argparse.ArgumentParser" ]
[((133, 158), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (156, 158), False, 'import argparse\n')]
#!/usr/bin/python import os import datetime import PyRSS2Gen kInDir = "raw_post" kTmplDir = "template" kBlogDir = "site/blog" kPostsDir = "site/blog/posts" def main(): postlist = posts() archive(postlist) def posts(): postlist = [] # Create the output directory if it doesn't already exist os.m...
[ "os.makedirs", "datetime.datetime.now", "datetime.datetime.strptime", "os.path.splitext", "os.path.join", "os.listdir" ]
[((316, 353), 'os.makedirs', 'os.makedirs', (['kPostsDir'], {'exist_ok': '(True)'}), '(kPostsDir, exist_ok=True)\n', (327, 353), False, 'import os\n'), ((509, 527), 'os.listdir', 'os.listdir', (['kInDir'], {}), '(kInDir)\n', (519, 527), False, 'import os\n'), ((2095, 2130), 'os.path.join', 'os.path.join', (['kBlogDir',...
import logging import math import re from collections import defaultdict from dataclasses import dataclass from typing import Dict, Iterable, Iterator, List, Optional, Sequence, Set, Tuple import cv2 import numpy as np import scipy.spatial from lib.image_processing import ( Point, Rectangle, _contains_sta...
[ "lib.image_processing.Point", "lib.image_processing._contains_start_graphic", "numpy.array_equal", "lib.image_processing.Rectangle", "math.sqrt", "cv2.cvtColor", "numpy.empty", "logging.getLogger", "lib.image_processing.find_boxes_with_rgb", "collections.defaultdict", "numpy.where", "lib.image...
[((494, 527), 'logging.getLogger', 'logging.getLogger', (['"""texsymdetect"""'], {}), "('texsymdetect')\n", (511, 527), False, 'import logging\n'), ((562, 584), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (571, 584), False, 'from dataclasses import dataclass\n'), ((2173, 2280), ...
import re def check_userID(ID): ''' Rule : UserID consists of [A-Z|a-z|0-9] ''' match = re.search(r'\w+', ID) #print match.group(0), if match: return True else: return False def check_jobTitleName(Job_Title): ''' Rule: Employee Job title starts with [A-Z] then multiple occurr...
[ "re.search" ]
[((98, 119), 're.search', 're.search', (['"""\\\\w+"""', 'ID'], {}), "('\\\\w+', ID)\n", (107, 119), False, 'import re\n'), ((420, 474), 're.search', 're.search', (['"""(^[A-Z][a-z]+)( [A-Z][a-z]+)?$"""', 'Job_Title'], {}), "('(^[A-Z][a-z]+)( [A-Z][a-z]+)?$', Job_Title)\n", (429, 474), False, 'import re\n'), ((826, 864...
"""The implementation of a Hera workflow for Argo-based workflows""" from typing import Dict, List, Optional, Tuple from argo_workflows.models import ( IoArgoprojWorkflowV1alpha1DAGTemplate, IoArgoprojWorkflowV1alpha1Template, IoArgoprojWorkflowV1alpha1VolumeClaimGC, IoArgoprojWorkflowV1alpha1Workflow,...
[ "argo_workflows.models.IoArgoprojWorkflowV1alpha1DAGTemplate", "argo_workflows.models.IoArgoprojWorkflowV1alpha1VolumeClaimGC", "hera.workflow_editors.on_exit", "argo_workflows.models.IoArgoprojWorkflowV1alpha1WorkflowTemplateRef", "argo_workflows.models.IoArgoprojWorkflowV1alpha1Workflow", "argo_workflow...
[((5366, 5413), 'argo_workflows.models.IoArgoprojWorkflowV1alpha1DAGTemplate', 'IoArgoprojWorkflowV1alpha1DAGTemplate', ([], {'tasks': '[]'}), '(tasks=[])\n', (5403, 5413), False, 'from argo_workflows.models import IoArgoprojWorkflowV1alpha1DAGTemplate, IoArgoprojWorkflowV1alpha1Template, IoArgoprojWorkflowV1alpha1Volu...
import collections class Solution: def isAnagram(self, s: str, t: str) -> bool: if not s and not t: return True if not s or not t: return False if len(s) != len(t): return False s_hash = collections.defaultdict(int) t_hash = collections.def...
[ "collections.defaultdict" ]
[((259, 287), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (282, 287), False, 'import collections\n'), ((305, 333), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (328, 333), False, 'import collections\n')]
# Copyright (c) 2013 Qubell Inc., http://qubell.com # # 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 agr...
[ "logging.error", "logging.debug", "simplejson.dumps", "logging.info", "qubellclient.tools.rand", "requests.delete", "instance.Instance", "revision.Revision", "requests.get", "requests.post", "qubellclient.private.instance.Instance" ]
[((1706, 1754), 'logging.info', 'log.info', (["('Creating application: %s' % self.name)"], {}), "('Creating application: %s' % self.name)\n", (1714, 1754), True, 'import logging as log\n'), ((1868, 2033), 'requests.post', 'requests.post', (['url'], {'files': "{'path': self.manifest.content}", 'data': "{'manifestSource'...
"""Configurations Copyright (c) 2021 <NAME> """ # The MIT License (MIT) # # Copyright (c) 2021. <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including ...
[ "config42.ConfigManager", "os.path.expanduser", "os.getcwd", "os.path.exists", "os.path.join", "logging.getLogger" ]
[((2220, 2257), 'os.path.join', 'os.path.join', (['"""/var/opt/sc"""', 'filename'], {}), "('/var/opt/sc', filename)\n", (2232, 2257), False, 'import os\n'), ((2581, 2608), 'os.path.exists', 'os.path.exists', (['config_file'], {}), '(config_file)\n', (2595, 2608), False, 'import os\n'), ((2980, 3008), 'config42.ConfigMa...
import logging from pathlib import Path import hydra from omegaconf import DictConfig from omegaconf import OmegaConf from src.evaluate import evaluate from src.plot import plot_feature from src.plot import plot_residual from src.train import train logger = logging.getLogger(__name__) @hydra.main(config_path="../c...
[ "omegaconf.OmegaConf.to_yaml", "hydra.utils.get_original_cwd", "src.train.train", "src.plot.plot_residual", "hydra.main", "src.evaluate.evaluate", "src.plot.plot_feature", "logging.getLogger" ]
[((261, 288), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (278, 288), False, 'import logging\n'), ((292, 351), 'hydra.main', 'hydra.main', ([], {'config_path': '"""../configs"""', 'config_name': '"""default"""'}), "(config_path='../configs', config_name='default')\n", (302, 351), False...
import itertools import operator from functools import wraps, cached_property from .._utils import safe_repr from ..functions import fn from ..typing import Iterator, Tuple, T, TYPE_CHECKING if TYPE_CHECKING: from .. import api as sk # noqa: F401 NOT_GIVEN = object() _iter = iter class Iter(Iterator[T]): ...
[ "operator.length_hint", "functools.wraps", "itertools.product", "itertools.tee", "itertools.islice", "itertools.chain" ]
[((9405, 9416), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (9410, 9416), False, 'from functools import wraps, cached_property\n'), ((7084, 7116), 'itertools.tee', 'itertools.tee', (['self._iterator', '(2)'], {}), '(self._iterator, 2)\n', (7097, 7116), False, 'import itertools\n'), ((7375, 7411), 'itertools...
import requests import webbrowser from os.path import dirname, exists, join, realpath from typing import List from PySide6.QtCore import QTimer, Qt, Slot from PySide6.QtGui import QIcon from PySide6.QtWidgets import * from win10toast import ToastNotifier from pathlib import Path from productiveware import encryption f...
[ "productiveware.client.get_headers", "webbrowser.open", "productiveware.widgets.login.LoginWidget", "pathlib.Path.cwd", "os.path.realpath", "PySide6.QtCore.Slot", "os.path.exists", "PySide6.QtCore.QTimer", "productiveware.encryption.decrypt_file", "requests.get", "win10toast.ToastNotifier", "p...
[((698, 713), 'win10toast.ToastNotifier', 'ToastNotifier', ([], {}), '()\n', (711, 713), False, 'from win10toast import ToastNotifier\n'), ((4257, 4263), 'PySide6.QtCore.Slot', 'Slot', ([], {}), '()\n', (4261, 4263), False, 'from PySide6.QtCore import QTimer, Qt, Slot\n'), ((5512, 5518), 'PySide6.QtCore.Slot', 'Slot', ...
# Generated by Django 3.1 on 2022-02-28 10:11 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MortalityFact', fields=[ ('id', models.AutoFi...
[ "django.db.models.IntegerField", "django.db.models.AutoField" ]
[((307, 400), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (323, 400), False, 'from django.db import migrations, models\...
from jinja2 import Environment, PackageLoader from threading import Timer import os from collections import OrderedDict from IPython.display import IFrame env = Environment( loader=PackageLoader('pyhandsontable', 'templates') ) def generate_html(data, **kwargs): renderers = kwargs.pop('renderers', dict()) ...
[ "jinja2.PackageLoader", "IPython.display.IFrame", "threading.Timer" ]
[((186, 230), 'jinja2.PackageLoader', 'PackageLoader', (['"""pyhandsontable"""', '"""templates"""'], {}), "('pyhandsontable', 'templates')\n", (199, 230), False, 'from jinja2 import Environment, PackageLoader\n'), ((1380, 1424), 'IPython.display.IFrame', 'IFrame', (['filename'], {'width': 'width', 'height': 'height'}),...
import sys import socket try: import riak except ImportError: print("Riak test requested, but riak library not installed. " "Try 'pip install riak' and try again.") sys.exit(1) def riak_check(config): host = config.get("host", "localhost") port = int(config.get("port", 8087)) def_time...
[ "riak.RiakClient", "socket.setdefaulttimeout", "socket.getdefaulttimeout", "sys.exit" ]
[((326, 352), 'socket.getdefaulttimeout', 'socket.getdefaulttimeout', ([], {}), '()\n', (350, 352), False, 'import socket\n'), ((357, 386), 'socket.setdefaulttimeout', 'socket.setdefaulttimeout', (['(1.5)'], {}), '(1.5)\n', (381, 386), False, 'import socket\n'), ((396, 452), 'riak.RiakClient', 'riak.RiakClient', ([], {...
from django.shortcuts import render from django.views.generic import CreateView from django.core.urlresolvers import reverse_lazy from .models import User from .forms import UserAdminCreationForm class RegisterView(CreateView): model = User template_name = 'accounts/register.html' form_class = UserAdminCreationFo...
[ "django.core.urlresolvers.reverse_lazy" ]
[((338, 359), 'django.core.urlresolvers.reverse_lazy', 'reverse_lazy', (['"""index"""'], {}), "('index')\n", (350, 359), False, 'from django.core.urlresolvers import reverse_lazy\n')]
import pytest from pytorch_lightning import Trainer from pyannote.audio.models.segmentation.debug import SimpleSegmentationModel from pyannote.audio.tasks import ( OverlappedSpeechDetection, Segmentation, VoiceActivityDetection, ) from pyannote.database import FileFinder, get_protocol @pytest.fixture() d...
[ "pytorch_lightning.Trainer", "pytest.fixture", "pyannote.audio.models.segmentation.debug.SimpleSegmentationModel", "pyannote.audio.tasks.VoiceActivityDetection", "pyannote.database.FileFinder", "pyannote.audio.tasks.OverlappedSpeechDetection", "pyannote.audio.tasks.Segmentation" ]
[((302, 318), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (316, 318), False, 'import pytest\n'), ((506, 528), 'pyannote.audio.tasks.Segmentation', 'Segmentation', (['protocol'], {}), '(protocol)\n', (518, 528), False, 'from pyannote.audio.tasks import OverlappedSpeechDetection, Segmentation, VoiceActivityDete...
import quadratic_provers as q data = q.eval_across_field([1, 2, 3, 4], 11) qproof = q.mk_quadratic_proof(data, 4, 11) assert q.check_quadratic_proof(data, qproof, 4, 5, 11) data2 = q.eval_across_field(range(36), 97) cproof = q.mk_column_proof(data2, 36, 97) assert q.check_column_proof(data2, cproof, 36, 10, 97)
[ "quadratic_provers.mk_column_proof", "quadratic_provers.mk_quadratic_proof", "quadratic_provers.check_quadratic_proof", "quadratic_provers.check_column_proof", "quadratic_provers.eval_across_field" ]
[((38, 75), 'quadratic_provers.eval_across_field', 'q.eval_across_field', (['[1, 2, 3, 4]', '(11)'], {}), '([1, 2, 3, 4], 11)\n', (57, 75), True, 'import quadratic_provers as q\n'), ((85, 118), 'quadratic_provers.mk_quadratic_proof', 'q.mk_quadratic_proof', (['data', '(4)', '(11)'], {}), '(data, 4, 11)\n', (105, 118), ...
import logging from typing import List import numpy as np import tensorflow as tf try: import tensorflow_probability as tfp distributions = tfp.distributions except: distributions = tf.distributions from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.utils import check_X_y from sklearn.uti...
[ "numpy.full", "spn.gpu.TensorFlow.optimize_tf", "numpy.sum", "tensorflow.compat.v1.variable_scope", "sklearn.utils.check_X_y", "numpy.all", "tensorflow.constant", "sklearn.utils.validation.check_is_fitted", "tensorflow.compat.v1.train.AdamOptimizer", "numpy.max", "numpy.array", "spn.structure....
[((685, 712), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (702, 712), False, 'import logging\n'), ((1378, 1431), 'tensorflow.compat.v1.train.AdamOptimizer', 'tf.compat.v1.train.AdamOptimizer', ([], {'learning_rate': '(0.001)'}), '(learning_rate=0.001)\n', (1410, 1431), True, 'import te...
import pygame, random, time from machine import Machine import utilities from equipment import * from character import Fighter class Section: def __init__(self, pos, prodLine): #self.image = img self.prodLine = prodLine self.tilePos = pos self.machine = None self.neighbors = [] class ProductionLine: def...
[ "random.randint", "utilities.screenPosToTilePos", "machine.Machine", "utilities.tilePosId", "utilities.tilePosToScreenPos" ]
[((1886, 1910), 'utilities.tilePosId', 'utilities.tilePosId', (['pos'], {}), '(pos)\n', (1905, 1910), False, 'import utilities\n'), ((2249, 2305), 'utilities.screenPosToTilePos', 'utilities.screenPosToTilePos', (['(48)', 'newFighter.rect.center'], {}), '(48, newFighter.rect.center)\n', (2277, 2305), False, 'import util...
import tkinter as tk from utils.fonts import _getFont from re import search Y_OFFSET = 220 PANEL_HEIGHT = 127 PANEL_WIDTH = 140 class ButtonGroup: def __init__(self, root, label, id, position, buttons, callback=None): self.id = id self.root = root self.x, self.y = position self.label = label se...
[ "utils.fonts._getFont", "tkinter.PhotoImage", "re.search" ]
[((942, 997), 'tkinter.PhotoImage', 'tk.PhotoImage', ([], {'file': '"""assets/controls/TextButtonOff.png"""'}), "(file='assets/controls/TextButtonOff.png')\n", (955, 997), True, 'import tkinter as tk\n'), ((1011, 1065), 'tkinter.PhotoImage', 'tk.PhotoImage', ([], {'file': '"""assets/controls/TextButtonOn.png"""'}), "(f...
# Copyright 2020 # # 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, ...
[ "flask.Blueprint", "flask.redirect", "flask.request.args.get", "importlib.import_module", "auth.drivers.oidc._validate_basic_auth", "auth.drivers.oidc._validate_token_auth", "flask.request.headers.get", "flask.session.get", "time.time", "auth.utils.redis_client.RedisClient", "traceback.format_ex...
[((865, 892), 'flask.Blueprint', 'Blueprint', (['"""root"""', '__name__'], {}), "('root', __name__)\n", (874, 892), False, 'from flask import current_app, session, request, redirect, make_response, Blueprint\n'), ((949, 962), 'auth.utils.redis_client.RedisClient', 'RedisClient', ([], {}), '()\n', (960, 962), False, 'fr...
""" render_rgb.py renders obj file to rgb image Aviable function: - clear_mash: delete all the mesh in the secene - scene_setting_init: set scene configurations - node_setting_init: set node configurations - render: render rgb image for one obj file and one viewpoint - render_obj_by_vp_lists: wrapper function for rend...
[ "argparse.ArgumentParser", "bpy.context.scene.frame_set", "os.path.isfile", "bpy.data.textures.remove", "bpy.ops.import_scene.obj", "os.path.join", "bpy.ops.object.select_all", "os.path.abspath", "os.path.dirname", "numpy.savetxt", "os.path.exists", "bpy.data.meshes.remove", "bpy.ops.object....
[((770, 795), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (785, 795), False, 'import os\n'), ((812, 837), 'os.path.dirname', 'os.path.dirname', (['abs_path'], {}), '(abs_path)\n', (827, 837), False, 'import os\n'), ((1457, 1501), 'bpy.ops.object.select_all', 'bpy.ops.object.select_all', ([...
'''read ENVI/raw binary format. Dimensions from header, data from .bin file.. ..then segment image using flood-fill segmentation''' import os import sys import pickle import numpy as np from flood import flood import matplotlib.pyplot as plt from dist import normalize, to_list, centroid def read_hdr(hdr): # read th...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "sys.setrecursionlimit", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.imshow", "matplotlib.pyplot.close", "os.path.exists", "dist.to_list", "dist.centroid", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "os.system", "matplo...
[((1278, 1307), 'numpy.zeros', 'np.zeros', (['(rows, cols, bands)'], {}), '((rows, cols, bands))\n', (1286, 1307), True, 'import numpy as np\n'), ((1394, 1409), 'matplotlib.pyplot.imshow', 'plt.imshow', (['rgb'], {}), '(rgb)\n', (1404, 1409), True, 'import matplotlib.pyplot as plt\n'), ((1414, 1424), 'matplotlib.pyplot...
################################################################## # Utils.py # Client side utilities ################################################################## import platform class Utils(object): def __init__(self, parent): self.parent = parent self.ae = parent.ae self.cfg = par...
[ "platform.processor", "platform.node", "ctypes.sizeof", "platform.version", "platform.release", "platform.machine" ]
[((559, 589), 'ctypes.sizeof', 'ctypes.sizeof', (['ctypes.c_uint32'], {}), '(ctypes.c_uint32)\n', (572, 589), False, 'import ctypes\n'), ((1410, 1425), 'platform.node', 'platform.node', ([], {}), '()\n', (1423, 1425), False, 'import platform\n'), ((1457, 1475), 'platform.release', 'platform.release', ([], {}), '()\n', ...
from django.db.models import ForeignKey from django.urls import path from django.utils.functional import cached_property from django.utils.translation import gettext as _ from wagtail.admin.forms.models import register_form_field_override from wagtail.admin.views.generic import chooser as chooser_views from wagtail.ad...
[ "django.urls.path", "wagtail.admin.forms.models.register_form_field_override", "django.utils.translation.gettext" ]
[((644, 655), 'django.utils.translation.gettext', '_', (['"""Choose"""'], {}), "('Choose')\n", (645, 655), True, 'from django.utils.translation import gettext as _\n'), ((888, 907), 'django.utils.translation.gettext', '_', (['"""Choose another"""'], {}), "('Choose another')\n", (889, 907), True, 'from django.utils.tran...
import pandas as pd import zipfile import os def get_media_data(**cfg): '''retrive media dataset''' for url in cfg['URLs']: print(url) infile = os.path.join(cfg['outpath'],url.split('/')[-1]) os.system(cfg['wget_fmt']%(url,infile)) print(infile) with zipfile.ZipFile(infile,...
[ "zipfile.ZipFile", "os.system", "pandas.concat" ]
[((680, 697), 'pandas.concat', 'pd.concat', (['result'], {}), '(result)\n', (689, 697), True, 'import pandas as pd\n'), ((225, 267), 'os.system', 'os.system', (["(cfg['wget_fmt'] % (url, infile))"], {}), "(cfg['wget_fmt'] % (url, infile))\n", (234, 267), False, 'import os\n'), ((297, 325), 'zipfile.ZipFile', 'zipfile.Z...
import asyncio from decouple import config from motor.motor_asyncio import AsyncIOMotorClient cs = config("MONGODB_CS") client = AsyncIOMotorClient(cs) client.get_io_loop = asyncio.get_running_loop buchi = client.get_database('buchi')
[ "decouple.config", "motor.motor_asyncio.AsyncIOMotorClient" ]
[((100, 120), 'decouple.config', 'config', (['"""MONGODB_CS"""'], {}), "('MONGODB_CS')\n", (106, 120), False, 'from decouple import config\n'), ((130, 152), 'motor.motor_asyncio.AsyncIOMotorClient', 'AsyncIOMotorClient', (['cs'], {}), '(cs)\n', (148, 152), False, 'from motor.motor_asyncio import AsyncIOMotorClient\n')]
# Standard library import argparse import os # Third party import openai # Consts PROMPT = """ Given a cooking ingredient and quantity, return only the ingredient name 2 cups flour Flour Cinnamon ~1 tablespoon Cinnamon About one tsp salt Salt 1.5-2 cups grated raw zucchini Raw zucchini 1c walnuts (optional) Walnuts ...
[ "argparse.ArgumentParser", "openai.Completion.create" ]
[((862, 931), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Parse ingredients using OpenAI"""'}), "(description='Parse ingredients using OpenAI')\n", (885, 931), False, 'import argparse\n'), ((445, 628), 'openai.Completion.create', 'openai.Completion.create', ([], {'engine': '"""davinci...
from .serializers import ReviewSerializer, ShopSerializer, UserReviewSerializer from rest_framework import viewsets from rest_framework.pagination import LimitOffsetPagination from .models import ReviewModel, ShopModel from rest_framework.generics import ListAPIView from rest_framework import filters from django.db.mod...
[ "django.db.models.Count", "django.db.models.Avg", "django.contrib.auth.get_user_model" ]
[((485, 501), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (499, 501), False, 'from django.contrib.auth import get_user_model\n'), ((975, 991), 'django.db.models.Count', 'Count', (['"""reviews"""'], {}), "('reviews')\n", (980, 991), False, 'from django.db.models import Count, Avg\n'), ((100...
# stdlib import subprocess from typing import List # local from lib.io import read_value_from_file from lib.log import log, log_pretty # ============================================================================= # # private utility functions # # =====================================================================...
[ "subprocess.Popen", "lib.log.log_pretty", "subprocess.CalledProcessError", "lib.io.read_value_from_file", "lib.log.log" ]
[((6011, 6161), 'subprocess.Popen', 'subprocess.Popen', (['process_args'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.STDOUT', 'bufsize': '(1)', 'universal_newlines': '(True)', 'stdin': 'None', 'cwd': 'working_dir'}), '(process_args, stdout=subprocess.PIPE, stderr=subprocess.\n STDOUT, bufsize=1, universal_...
from typing import Optional from fastapi import APIRouter, Depends import httpx from app.models.models import User from app.schema import User_Pydantic router = APIRouter() @router.get("/") async def homepage(): # httpx代替requests进行异步请求 async with httpx.AsyncClient() as client: res = await client.ge...
[ "app.models.models.User.all", "httpx.AsyncClient", "app.schema.User_Pydantic.from_queryset", "fastapi.APIRouter" ]
[((164, 175), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (173, 175), False, 'from fastapi import APIRouter, Depends\n'), ((770, 780), 'app.models.models.User.all', 'User.all', ([], {}), '()\n', (778, 780), False, 'from app.models.models import User\n'), ((260, 279), 'httpx.AsyncClient', 'httpx.AsyncClient', ([...
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. 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 requir...
[ "googlecloudsdk.command_lib.kms.flags.AddKeyVersionResourceArgument", "googlecloudsdk.api_lib.cloudkms.base.GetMessagesModule", "googlecloudsdk.command_lib.kms.flags.AddOutputFileFlag", "googlecloudsdk.calliope.exceptions.BadFileException", "googlecloudsdk.command_lib.kms.exceptions.ArgumentError", "googl...
[((2397, 2491), 'googlecloudsdk.calliope.base.ReleaseTracks', 'base.ReleaseTracks', (['base.ReleaseTrack.ALPHA', 'base.ReleaseTrack.BETA', 'base.ReleaseTrack.GA'], {}), '(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA, base.\n ReleaseTrack.GA)\n', (2415, 2491), False, 'from googlecloudsdk.calliope import base\n'), ...
#import libraries import face_recognition import numpy as np from PIL import Image, ImageDraw import matplotlib.image as mpimg from IPython.display import display import cv2 import os, re import pyrebase import time cv2.VideoCapture(0).isOpened() from dronekit import connect, VehicleMode, LocationGlobalRelative import...
[ "cv2.resize", "firebase_admin.credentials.Certificate", "face_recognition.compare_faces", "face_recognition.face_encodings", "google.cloud.firestore.Client", "pyrebase.initialize_app", "PIL.Image.open", "cv2.VideoCapture", "time.sleep", "firebase_admin.initialize_app", "face_recognition.face_loc...
[((923, 962), 'pyrebase.initialize_app', 'pyrebase.initialize_app', (['firebaseConfig'], {}), '(firebaseConfig)\n', (946, 962), False, 'import pyrebase\n'), ((1322, 1340), 'google.cloud.firestore.Client', 'firestore.Client', ([], {}), '()\n', (1338, 1340), False, 'from google.cloud import firestore\n'), ((1001, 1025), ...
import re, os, json root = os.path.dirname(os.path.dirname(__file__)) source_folder = os.path.join(root, 'src', 'HoneybeeSchema', 'Model') #NamedReferenceable class_files = [x for x in os.listdir(source_folder) if (x.endswith("Abridged.cs") and not x.endswith("SetAbridged.cs") and not x.endswith("PropertiesAbridged....
[ "os.path.dirname", "os.path.join", "os.listdir" ]
[((88, 140), 'os.path.join', 'os.path.join', (['root', '"""src"""', '"""HoneybeeSchema"""', '"""Model"""'], {}), "(root, 'src', 'HoneybeeSchema', 'Model')\n", (100, 140), False, 'import re, os, json\n'), ((391, 478), 'os.path.join', 'os.path.join', (['root', '"""src"""', '"""HoneybeeSchema"""', '"""BaseClasses"""', '""...
import sys import os from settings import beaver_broker_ip, beaver_broker_port, autotestdir, beaver_datanode_file, gflagsfile, config_path, log_dir, index_forsearch, pb_forsearch import psutil import time import numpy as np import requests #MEM_MAX = psutil.virtual_memory().total MEM_MAX = 0.8*32*1024*1024*1024 ...
[ "os.remove", "os.rename", "os.popen", "numpy.zeros", "os.path.exists", "os.path.dirname", "time.sleep", "requests.post", "os.path.join" ]
[((6072, 6101), 'requests.post', 'requests.post', (['url'], {'data': 'data'}), '(url, data=data)\n', (6085, 6101), False, 'import requests\n'), ((8870, 8929), 'os.path.join', 'os.path.join', (['autotestdir', '"""conf"""', '"""beaver_test.gflags_new"""'], {}), "(autotestdir, 'conf', 'beaver_test.gflags_new')\n", (8882, ...
import os from musicscore.musictree.treescoretimewise import TreeScoreTimewise from musurgia.unittest import TestCase from musurgia.fractaltree.fractalmusic import FractalMusic path = str(os.path.abspath(__file__).split('.')[0]) class Test(TestCase): def setUp(self) -> None: self.score = TreeScoreTimew...
[ "musicscore.musictree.treescoretimewise.TreeScoreTimewise", "os.path.abspath", "musurgia.fractaltree.fractalmusic.FractalMusic" ]
[((306, 325), 'musicscore.musictree.treescoretimewise.TreeScoreTimewise', 'TreeScoreTimewise', ([], {}), '()\n', (323, 325), False, 'from musicscore.musictree.treescoretimewise import TreeScoreTimewise\n'), ((339, 412), 'musurgia.fractaltree.fractalmusic.FractalMusic', 'FractalMusic', ([], {'tempo': '(60)', 'quarter_du...
import functools import collections from django.template.loader import render_to_string from pagination.settings import MARGIN_PAGES_DISPLAYED, PAGE_RANGE_DISPLAYED class PageRepresentation(int): def __new__(cls, x, querystring): obj = int.__new__(cls, x) obj.querystring = querystring r...
[ "django.template.loader.render_to_string", "functools.wraps" ]
[((369, 390), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (384, 390), False, 'import functools\n'), ((4361, 4434), 'django.template.loader.render_to_string', 'render_to_string', (['self.template', "{'current_page': self, 'page_obj': self}"], {}), "(self.template, {'current_page': self, 'page_obj':...
import sys input = bin(int(sys.stdin.readline().strip(), base=16))[2:] # filling missing leading 0 input = input.zfill(-(-len(input)//4)*4) def decode(msg): if msg == '' or int(msg) == 0: return 0 version = int(msg[0:3], 2) type_id = int(msg[3:6], 2) if type_id == 4: last_group = F...
[ "sys.stdin.readline" ]
[((28, 48), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (46, 48), False, 'import sys\n')]
from arm_prosthesis.external_communication.models.dto.entity_dto import EntityDto from arm_prosthesis.external_communication.models.dto.gesture_dto import GestureDto from gestures_pb2 import SaveGesture class SaveGestureDto(EntityDto): def __init__(self): self._time_sync = 0 self._gestur...
[ "arm_prosthesis.external_communication.models.dto.gesture_dto.GestureDto", "gestures_pb2.SaveGesture" ]
[((662, 675), 'gestures_pb2.SaveGesture', 'SaveGesture', ([], {}), '()\n', (673, 675), False, 'from gestures_pb2 import SaveGesture\n'), ((825, 837), 'arm_prosthesis.external_communication.models.dto.gesture_dto.GestureDto', 'GestureDto', ([], {}), '()\n', (835, 837), False, 'from arm_prosthesis.external_communication....
from process.process import Process class Load(Process): def __init__(self, settings=None): Process.__init__(self, settings=settings) # import_file_name is full local file name or url to source #self.import_file_list=import_file_list #self.dataframe=None #self.dictionary={} ...
[ "process.process.Process.__init__" ]
[((104, 145), 'process.process.Process.__init__', 'Process.__init__', (['self'], {'settings': 'settings'}), '(self, settings=settings)\n', (120, 145), False, 'from process.process import Process\n')]
import json from typing import List, Mapping, Optional, Sequence, Tuple, Union, cast import pulumi_aws as aws import pulumi_docker as docker from infra.cache import Cache from infra.config import ( DEPLOYMENT_NAME, REAL_DEPLOYMENT, SERVICE_LOG_RETENTION_DAYS, configured_version_for, ) from infra.ec2 im...
[ "pulumi.info", "infra.policies.attach_policy", "typing.cast", "pulumi.ResourceOptions", "pulumi_aws.ecs.ServiceNetworkConfigurationArgs", "infra.config.configured_version_for", "json.dumps", "infra.ec2.Ec2Port", "pulumi.Output.all", "infra.repository.registry_credentials", "pulumi_aws.get_region...
[((14859, 14887), 'infra.config.configured_version_for', 'configured_version_for', (['name'], {}), '(name)\n', (14881, 14887), False, 'from infra.config import DEPLOYMENT_NAME, REAL_DEPLOYMENT, SERVICE_LOG_RETENTION_DAYS, configured_version_for\n'), ((7471, 7523), 'infra.policies.attach_policy', 'attach_policy', (['ECR...
import random import string from flask import Flask, jsonify app = Flask(__name__) @app.route('/') def root(): return jsonify(result=''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(2 ** 10))) if __name__ == '__main__': app.run(debug=False, host='0.0.0.0')
[ "flask.Flask", "random.choice" ]
[((69, 84), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (74, 84), False, 'from flask import Flask, jsonify\n'), ((149, 202), 'random.choice', 'random.choice', (['(string.ascii_uppercase + string.digits)'], {}), '(string.ascii_uppercase + string.digits)\n', (162, 202), False, 'import random\n')]
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from . import MultiheadAttention class MultiBranch(nn.Module): def __init__(self, branches, embed_dim_list): super().__init__() self.branches = nn.ModuleList(branches) self.embed_dim_list = embed_dim_lis...
[ "torch.cat", "torch.nn.ModuleList" ]
[((253, 276), 'torch.nn.ModuleList', 'nn.ModuleList', (['branches'], {}), '(branches)\n', (266, 276), True, 'import torch.nn as nn\n'), ((1465, 1487), 'torch.cat', 'torch.cat', (['out'], {'dim': '(-1)'}), '(out, dim=-1)\n', (1474, 1487), False, 'import torch\n')]
import fnmatch from . import jobs from . import config log = config.log # # { # At least one match from this array must succeed, or array must be empty # "any": [ # ["file.type", "dicom" ] # Match the file's type # ["file.name", "*.dcm" ] # Match a shell glob for the ...
[ "fnmatch.fnmatch" ]
[((2022, 2065), 'fnmatch.fnmatch', 'fnmatch.fnmatch', (["file_['name']", 'match_param'], {}), "(file_['name'], match_param)\n", (2037, 2065), False, 'import fnmatch\n')]
''' Script used to pull voting information from benty-fields.com. Must be logged in to access the benty-fields. NOTES: 1) benty-fields mostly organizes paper suggestions based upon voting history and chosen preferences (machine learning involved), so these voting totals can be considered as a control sample (i...
[ "pandas.DataFrame", "pandas.read_csv", "selenium.webdriver.Firefox", "time.sleep" ]
[((5469, 5487), 'time.sleep', 'time.sleep', (['timeit'], {}), '(timeit)\n', (5479, 5487), False, 'import threading, time, getpass, sys, subprocess\n'), ((1610, 1629), 'selenium.webdriver.Firefox', 'webdriver.Firefox', ([], {}), '()\n', (1627, 1629), False, 'from selenium import webdriver\n'), ((2147, 2166), 'selenium.w...
import pygame # local import from base.base import GUIBase from solver.solver import Solver class Board(GUIBase): """Screen Board :param board: Sudoku board represent as two dimensional array :type board: list :param size: screen dimensions (pixels) (width, height) :type size: tuple :param ...
[ "pygame.draw.rect", "pygame.draw.line", "solver.solver.Solver", "pygame.font.Font" ]
[((583, 595), 'solver.solver.Solver', 'Solver', (['self'], {}), '(self)\n', (589, 595), False, 'from solver.solver import Solver\n'), ((7266, 7387), 'pygame.draw.line', 'pygame.draw.line', (['self.screen', '(72, 234, 54)', '(self.size[2], r * space)', '(self.size[0] + self.size[2], r * space)', 'w'], {}), '(self.screen...
""" Example headers { "X-Screenly-hostname": "srly-jmar75ko6xp651j", "X-Screenly-screen-name": "dizzy cherry", "X-Screenly-location-name": "Cape Town", "X-Screenly-hardware": "x86", "X-Screenly-version": "v2", "X-Screenly-lat": "-33.925278", "X-Screenly-lng": "18.423889", "X-Screenly-ta...
[ "os.environ.get", "flask.Flask" ]
[((448, 463), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (453, 463), False, 'from flask import Flask, render_template, request\n'), ((622, 656), 'os.environ.get', 'environ.get', (['"""GOOGLE_MAPS_API_KEY"""'], {}), "('GOOGLE_MAPS_API_KEY')\n", (633, 656), False, 'from os import environ\n')]
from django.core import mail from django.test import TestCase, TransactionTestCase from django.contrib.auth.models import User from news.models import News class NewsTest(TestCase): def test_feed(self): response = self.client.get('/feeds/news/') self.assertEqual(response.status_code...
[ "django.contrib.auth.models.User.objects.create_superuser", "news.models.News.objects.first", "news.models.News.objects.all" ]
[((879, 938), 'django.contrib.auth.models.User.objects.create_superuser', 'User.objects.create_superuser', (['"""admin"""', '"""<EMAIL>"""', 'password'], {}), "('admin', '<EMAIL>', password)\n", (908, 938), False, 'from django.contrib.auth.models import User\n'), ((1799, 1819), 'news.models.News.objects.first', 'News.o...
import time import bisect import numpy as np import pandas as pd import networkx as nx import scipy import scipy.optimize import scipy as sp import os import matplotlib.pyplot as plt import random from bayes_opt import BayesianOptimization from bayes_opt.util import UtilityFunction, Colours import asyncio import thre...
[ "numpy.abs", "numpy.sum", "numpy.expand_dims" ]
[((2226, 2257), 'numpy.expand_dims', 'np.expand_dims', (['timings'], {'axis': '(0)'}), '(timings, axis=0)\n', (2240, 2257), True, 'import numpy as np\n'), ((2841, 2872), 'numpy.expand_dims', 'np.expand_dims', (['timings'], {'axis': '(0)'}), '(timings, axis=0)\n', (2855, 2872), True, 'import numpy as np\n'), ((2288, 235...
#!/bin/env python # coding=utf8 from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 import base64 import requests import json import urllib import time import random import datetime import hashlib # 获得响应头信息中的Content-Type域 def urlOpenGetHeaders(url): req = urllib.request.Reque...
[ "urllib.request.ProxyHandler", "hashlib.md5", "urllib.request.Request", "json.loads", "urllib.request.urlopen", "random.choice", "urllib.request.build_opener", "time.sleep", "urllib.request.install_opener", "time.time", "base64.b64encode", "Crypto.PublicKey.RSA.importKey", "requests.post", ...
[((300, 327), 'urllib.request.Request', 'urllib.request.Request', (['url'], {}), '(url)\n', (322, 327), False, 'import urllib\n'), ((496, 523), 'urllib.request.urlopen', 'urllib.request.urlopen', (['req'], {}), '(req)\n', (518, 523), False, 'import urllib\n'), ((622, 649), 'urllib.request.Request', 'urllib.request.Requ...
import os import numpy as np import pytest from ananse.network import Network from .test_02_utils import write_file @pytest.fixture def binding_fname(): return "tests/example_data/binding2.tsv" @pytest.fixture def network(): genome = "tests/data/genome.fa" if not os.path.exists(genome): write_...
[ "numpy.isclose", "os.path.exists", "ananse.network.Network" ]
[((361, 420), 'ananse.network.Network', 'Network', ([], {'genome': 'genome', 'gene_bed': '"""ananse/db/hg38.genes.bed"""'}), "(genome=genome, gene_bed='ananse/db/hg38.genes.bed')\n", (368, 420), False, 'from ananse.network import Network\n'), ((1202, 1251), 'numpy.isclose', 'np.isclose', (["dw.loc[100, 'weight']", '(0)...
import setuptools from configparser import ConfigParser from pkg_resources import parse_version from sys import platform assert parse_version(setuptools.__version__) >= parse_version('36.2') config = ConfigParser(delimiters=['=']) config.read('settings.ini') cfg = config['DEFAULT'] license_options = { 'apache2': ...
[ "pkg_resources.parse_version", "configparser.ConfigParser", "setuptools.find_packages" ]
[((201, 231), 'configparser.ConfigParser', 'ConfigParser', ([], {'delimiters': "['=']"}), "(delimiters=['='])\n", (213, 231), False, 'from configparser import ConfigParser\n'), ((128, 165), 'pkg_resources.parse_version', 'parse_version', (['setuptools.__version__'], {}), '(setuptools.__version__)\n', (141, 165), False,...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-06-28 20:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('providers', '0001_initial'), ] ...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.ImageField" ]
[((440, 533), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (456, 533), False, 'from django.db import migrations, models\...
import matplotlib.pyplot as plt from matplotlib.text import Text class DragHandler(object): # NOTE: DOES NOT HANDLE TEXT WITH ARBITRARY TRANSFORMS!!!! """ A simple class to handle Drag n Drop. This is a simple example, which works for Text objects only """ def __init__(self, figure=None): ...
[ "matplotlib.pyplot.draw", "matplotlib.pyplot.gcf" ]
[((541, 550), 'matplotlib.pyplot.gcf', 'plt.gcf', ([], {}), '()\n', (548, 550), True, 'import matplotlib.pyplot as plt\n'), ((1521, 1531), 'matplotlib.pyplot.draw', 'plt.draw', ([], {}), '()\n', (1529, 1531), True, 'import matplotlib.pyplot as plt\n')]
import yaml import argparse from attrdict import AttrDict from matplotlib import pyplot as plt import torch from torch.autograd import Variable from models.generator import Generator def test(params): G = Generator(params.network.generator) if params.restore.G: G.load_state_dict(torch.load(params....
[ "yaml.load", "matplotlib.pyplot.show", "argparse.ArgumentParser", "matplotlib.pyplot.imshow", "torch.load", "torch.FloatTensor", "models.generator.Generator", "matplotlib.pyplot.gcf", "attrdict.AttrDict" ]
[((214, 249), 'models.generator.Generator', 'Generator', (['params.network.generator'], {}), '(params.network.generator)\n', (223, 249), False, 'from models.generator import Generator\n'), ((610, 619), 'matplotlib.pyplot.gcf', 'plt.gcf', ([], {}), '()\n', (617, 619), True, 'from matplotlib import pyplot as plt\n'), ((6...
"""mcpython - a minecraft clone written in python licenced under MIT-licence authors: uuk, xkcdjerry original game by forgleman licenced under MIT-licence minecraft by Mojang blocks based on 1.14.4.jar of minecraft, downloaded on 20th of July, 2019""" from world.gen.layer.Layer import Layer, LayerConfig import globa...
[ "random.randint" ]
[((485, 514), 'random.randint', 'random.randint', (['(-10000)', '(10000)'], {}), '(-10000, 10000)\n', (499, 514), False, 'import random\n'), ((558, 587), 'random.randint', 'random.randint', (['(-10000)', '(10000)'], {}), '(-10000, 10000)\n', (572, 587), False, 'import random\n'), ((631, 660), 'random.randint', 'random....
from functools import partial from keras.optimizers import SGD from fire import Fire from src.dataset import KaggleDataset, PseudoDataset, ExtraDataset, DataCollection from src.model import get_model, get_callbacks from src.aug import augment from src.utils import logger def fit_once(model, model_name, loss, train,...
[ "src.utils.logger.info", "functools.partial", "fire.Fire", "keras.optimizers.SGD", "src.model.get_callbacks", "src.dataset.DataCollection", "src.model.get_model" ]
[((374, 439), 'src.utils.logger.info', 'logger.info', (['f"""Stage {stage} started: loss {loss}, fold {n_fold}"""'], {}), "(f'Stage {stage} started: loss {loss}, fold {n_fold}')\n", (385, 439), False, 'from src.utils import logger\n'), ((1425, 1463), 'functools.partial', 'partial', (['augment'], {'expected_shape': 'sha...
############################################################################## # # Copyright (c) 2004, 2005 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # T...
[ "Testing.ZopeTestCase.ZopeDocTestSuite", "os.path.join" ]
[((2279, 2297), 'Testing.ZopeTestCase.ZopeDocTestSuite', 'ZopeDocTestSuite', ([], {}), '()\n', (2295, 2297), False, 'from Testing.ZopeTestCase import ZopeDocTestSuite\n'), ((788, 829), 'os.path.join', 'os.path.join', (['sys.path[0]', '"""framework.py"""'], {}), "(sys.path[0], 'framework.py')\n", (800, 829), False, 'imp...
from paver.easy import * import os DLLS = ['h5py_hdf5.dll', 'h5py_hdf5_hl.dll', 'szip.dll', 'zlib.dll'] @task def release_unix(): sh('python setup.py clean') sh('python setup.py configure --reset --hdf5-version=1.8.4') sh('python setup.py build -f') sh('python setup.py test') sh('python setup.py s...
[ "os.unlink" ]
[((995, 1022), 'os.unlink', 'os.unlink', (["('h5py\\\\%s' % dll)"], {}), "('h5py\\\\%s' % dll)\n", (1004, 1022), False, 'import os\n')]
"""Miscellaneous utility functions.""" from functools import reduce from PIL import Image import numpy as np from matplotlib.colors import rgb_to_hsv, hsv_to_rgb import spacy import re import cv2 import time from keras_bert.tokenizer import Tokenizer from keras_bert.loader import load_trained_model_from_checkpoint, l...
[ "PIL.Image.new", "os.path.join", "numpy.random.rand", "numpy.zeros", "numpy.expand_dims", "numpy.shape", "numpy.array", "keras_bert.loader.load_vocabulary", "re.sub", "PIL.Image.fromarray", "keras_bert.tokenizer.Tokenizer", "cv2.resize" ]
[((1069, 1108), 'PIL.Image.new', 'Image.new', (['"""RGB"""', 'size', '(128, 128, 128)'], {}), "('RGB', size, (128, 128, 128))\n", (1078, 1108), False, 'from PIL import Image\n'), ((1302, 1332), 'keras_bert.tokenizer.Tokenizer', 'Tokenizer', (['vocabs'], {'cased': '(False)'}), '(vocabs, cased=False)\n', (1311, 1332), Fa...
#!env/bin/python3 import datetime import sched import pandas as pd import plotly.graph_objs as go import plotly.plotly as py import requests CSV_FILE = 'OholPlayersByServer.csv' def process_current_player_counts(): data = fetch() write(data, CSV_FILE) draw(CSV_FILE) def fetch(): timestamp = datetim...
[ "pandas.read_csv", "plotly.graph_objs.Scatter", "sched.scheduler", "datetime.datetime.utcnow", "requests.get", "plotly.plotly.plot" ]
[((391, 467), 'requests.get', 'requests.get', (['"""http://onehouronelife.com/reflector/server.php?action=report"""'], {}), "('http://onehouronelife.com/reflector/server.php?action=report')\n", (403, 467), False, 'import requests\n'), ((1766, 1827), 'pandas.read_csv', 'pd.read_csv', (['filename'], {'sep': '""";"""', 'n...
from os import getenv from os.path import join, dirname from dotenv import load_dotenv # Create .env file path. dotenv_path = join(dirname(__file__), ".env") # Load file from the path. load_dotenv(dotenv_path) BOT_TOKEN = getenv('BOT_TOKEN', "") CHAT_NAME = getenv('CHAT_NAME', "") INSIDE_CHANNEL = getenv('INSIDE_CHA...
[ "dotenv.load_dotenv", "os.path.dirname", "os.getenv" ]
[((187, 211), 'dotenv.load_dotenv', 'load_dotenv', (['dotenv_path'], {}), '(dotenv_path)\n', (198, 211), False, 'from dotenv import load_dotenv\n'), ((225, 248), 'os.getenv', 'getenv', (['"""BOT_TOKEN"""', '""""""'], {}), "('BOT_TOKEN', '')\n", (231, 248), False, 'from os import getenv\n'), ((261, 284), 'os.getenv', 'g...
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.preprocessing import LabelEncoder from sklearn.metrics import mean_squared_error import matplotlib.pyplot as plt #Import the data data = pd.read_csv("TSLA.csv") print('Raw data from ...
[ "matplotlib.pyplot.show", "pandas.read_csv", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.axes", "sklearn.linear_model.LinearRegression", "matplotlib.pyplot.figure", "sklearn.metrics.mean_squared_error" ]
[((275, 298), 'pandas.read_csv', 'pd.read_csv', (['"""TSLA.csv"""'], {}), "('TSLA.csv')\n", (286, 298), True, 'import pandas as pd\n'), ((677, 725), 'sklearn.model_selection.train_test_split', 'train_test_split', (['data_X', 'data_Y'], {'test_size': '(0.25)'}), '(data_X, data_Y, test_size=0.25)\n', (693, 725), False, '...
"""Utilities to scan all Python files in a directory and aggregate the names of all the imported packages """ import argparse import ast import os from collections import Counter from typing import Dict, Iterable, List, Optional, Tuple from iscan.std_lib import separate_third_party_from_std_lib class ImportScanner(a...
[ "os.path.abspath", "argparse.ArgumentParser", "os.walk", "iscan.std_lib.separate_third_party_from_std_lib", "collections.Counter", "os.path.join" ]
[((2635, 2659), 'os.walk', 'os.walk', ([], {'top': 'dir_to_scan'}), '(top=dir_to_scan)\n', (2642, 2659), False, 'import os\n'), ((5537, 5585), 'iscan.std_lib.separate_third_party_from_std_lib', 'separate_third_party_from_std_lib', (['base_packages'], {}), '(base_packages)\n', (5570, 5585), False, 'from iscan.std_lib im...
# Copyright 2020 Amazon.com, Inc. or its affiliates. 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...
[ "json.dump", "requests.get" ]
[((736, 753), 'requests.get', 'requests.get', (['URL'], {}), '(URL)\n', (748, 753), False, 'import requests\n'), ((1083, 1123), 'json.dump', 'json.dump', (['sorted_perms'], {'fp': 'fh', 'indent': '(2)'}), '(sorted_perms, fp=fh, indent=2)\n', (1092, 1123), False, 'import json\n')]
#!/usr/bin/env python2 ''' This submodule lets the user download the data files necessary for running the GOMAP pipline from CyVerse Currently the files are stored in Gokul's personal directory so the download has to be initiated by gokul's own CyVerse account with icommands ''' import os, re, logging, json, sys, ar...
[ "os.remove", "gzip.open", "os.path.basename", "os.getcwd", "code.utils.basic_utils.check_output_and_run", "os.path.exists", "logging.info", "code.utils.logging_utils.setlogging", "tarfile.open", "shutil.copyfileobj" ]
[((585, 612), 'code.utils.logging_utils.setlogging', 'setlogging', (['config', '"""setup"""'], {}), "(config, 'setup')\n", (595, 612), False, 'from code.utils.logging_utils import setlogging\n'), ((1055, 1113), 'logging.info', 'logging.info', (['"""Downloading file from Cyverse using irsync"""'], {}), "('Downloading fi...
#!/usr/bin/env python import argparse from functools import partial from pathlib import Path from requests_futures.sessions import FuturesSession import pandas as pd import numpy as np # see https://stackoverflow.com/a/50039149 import resource resource.setrlimit(resource.RLIMIT_NOFILE, (110000, 110000)) __version__...
[ "numpy.count_nonzero", "pandas.read_hdf", "argparse.ArgumentParser", "resource.setrlimit", "requests_futures.sessions.FuturesSession", "pathlib.Path" ]
[((247, 307), 'resource.setrlimit', 'resource.setrlimit', (['resource.RLIMIT_NOFILE', '(110000, 110000)'], {}), '(resource.RLIMIT_NOFILE, (110000, 110000))\n', (265, 307), False, 'import resource\n'), ((1187, 1226), 'requests_futures.sessions.FuturesSession', 'FuturesSession', ([], {'max_workers': 'max_workers'}), '(ma...
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup from phyllo.phyllo_logger import logger # Note: The original ordering of chapters and verses was extremely complex. # As a result, chapters are the bold headers and subsections are each p tag. # Case 1: Sec...
[ "bs4.BeautifulSoup", "phyllo.phyllo_logger.logger.info", "sqlite3.connect", "urllib.request.urlopen" ]
[((1840, 1871), 'urllib.request.urlopen', 'urllib.request.urlopen', (['collURL'], {}), '(collURL)\n', (1862, 1871), False, 'import urllib\n'), ((1888, 1923), 'bs4.BeautifulSoup', 'BeautifulSoup', (['collOpen', '"""html5lib"""'], {}), "(collOpen, 'html5lib')\n", (1901, 1923), False, 'from bs4 import BeautifulSoup\n'), (...
from django.shortcuts import render, redirect from django.contrib.auth.models import User from django.contrib import auth def login(request): context = {} if request.method == "POST": user = auth.authenticate(username=request.POST["email"], password=request.POST["password"]) if user is not None: auth.login(...
[ "django.contrib.auth.models.User.objects.get", "django.shortcuts.redirect", "django.contrib.auth.models.User.objects.create_user", "django.contrib.auth.logout", "django.contrib.auth.authenticate", "django.shortcuts.render", "django.contrib.auth.login" ]
[((432, 479), 'django.shortcuts.render', 'render', (['request', '"""accounts/login.html"""', 'context'], {}), "(request, 'accounts/login.html', context)\n", (438, 479), False, 'from django.shortcuts import render, redirect\n'), ((1103, 1151), 'django.shortcuts.render', 'render', (['request', '"""accounts/signup.html"""...
import collections import pandas as pd big_list = [[{'автопродление': 1}, {'аккаунт': 1}, {'акция': 2}, {'безумный': 1}, {'бесплатно': 1}, {'бесплатнои': 1}, {'бесплатныи': 1}, {'бесплатный': 1}, {'бесценок': 1}, {'билет': 2}, {'бритва': 1}, {'бритвеныи': 1}, {'важный': 2}, {'вводить': 1}, {...
[ "pandas.DataFrame", "collections.Counter" ]
[((14011, 14059), 'pandas.DataFrame', 'pd.DataFrame', (['counter'], {'columns': "['Word', 'Count']"}), "(counter, columns=['Word', 'Count'])\n", (14023, 14059), True, 'import pandas as pd\n'), ((13945, 13972), 'collections.Counter', 'collections.Counter', (['result'], {}), '(result)\n', (13964, 13972), False, 'import c...
import uuid from typing import List, Optional from .utils import logging logger = logging.get_logger(__name__) class Conversation: """ Utility class containing a conversation and its history. This class is meant to be used as an input to the :class:`~transformers.ConversationalPipeline`. The conversatio...
[ "uuid.uuid4" ]
[((2622, 2634), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (2632, 2634), False, 'import uuid\n')]
import argparse from datetime import datetime from Common.functions import add_data, get_filtered_stb, get_data parser = argparse.ArgumentParser(description='Data-stream import and searching. Expected input data-stream line\n' + 'of the form: STB|TITLE|PROVIDER|DATE|REVENUE|TIME\n') pa...
[ "Common.functions.get_data", "argparse.ArgumentParser", "Common.functions.add_data", "datetime.datetime.strptime", "Common.functions.get_filtered_stb" ]
[((122, 296), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '(\'Data-stream import and searching. Expected input data-stream line\\n\' +\n """of the form: STB|TITLE|PROVIDER|DATE|REVENUE|TIME\n""")'}), '(description=\n """Data-stream import and searching. Expected input data-stream li...
import os, fnmatch, sys, time import dill as pickle import scipy.interpolate as interp import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab import bead_util as bu import calib_util as cu import configuration as config import time dirname = '/data/old_trap/20201202/power/init' files,...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "bead_util.find_all_fnames", "numpy.mean", "bead_util.DataFile" ]
[((325, 368), 'bead_util.find_all_fnames', 'bu.find_all_fnames', (['dirname'], {'sort_time': '(True)'}), '(dirname, sort_time=True)\n', (343, 368), True, 'import bead_util as bu\n'), ((549, 572), 'matplotlib.pyplot.plot', 'plt.plot', (['fb_set', 'power'], {}), '(fb_set, power)\n', (557, 572), True, 'import matplotlib.p...
"""Carletproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
[ "Carletapp.views.SignUp1.as_view", "Carletapp.views.FavoriteList.as_view", "Carletapp.views.ChangePassword.as_view", "Carletapp.views.RequestVehicle.as_view", "Carletapp.views.UserRegistrationValidation.as_view", "Carletapp.views.SearchVehicle.as_view", "Carletapp.views.ProfileAccountSetting.as_view", ...
[((3578, 3639), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (3584, 3639), False, 'from django.conf.urls.static import static\n'), ((3513, 3576), 'django.conf.urls.static.static', 'static', ([...
# Generated by Django 3.2 on 2021-12-02 01:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0007_alter_user_email'), ] operations = [ migrations.AlterField( model_name='notice', name='enabled', ...
[ "django.db.models.BooleanField" ]
[((330, 428), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)', 'help_text': '"""Display on the Galaxy Australia landing page."""'}), "(default=False, help_text=\n 'Display on the Galaxy Australia landing page.')\n", (349, 428), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python # Read secrets from .env file import requests import csv import json import os from dotenv import load_dotenv load_dotenv() BOARD_ID = os.getenv("TRELLO_BOARD_ID") TRELLO_API_KEY = os.getenv('TRELLO_API_KEY') TRELLO_TOKEN = os.getenv('TRELLO_TOKEN') output_filename = f'output-{BOARD_ID}.csv' k...
[ "dotenv.load_dotenv", "csv.writer", "os.getenv", "requests.get" ]
[((133, 146), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (144, 146), False, 'from dotenv import load_dotenv\n'), ((159, 187), 'os.getenv', 'os.getenv', (['"""TRELLO_BOARD_ID"""'], {}), "('TRELLO_BOARD_ID')\n", (168, 187), False, 'import os\n'), ((205, 232), 'os.getenv', 'os.getenv', (['"""TRELLO_API_KEY"""'...
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import argparse import logging import os import sys import threading from dataclasses import asdict from pprint i...
[ "threading.Thread", "torchx.runner.get_runner", "torchx.schedulers.get_scheduler_factories", "torchx.schedulers.get_default_scheduler_name", "torchx.specs.finder.get_builtin_source", "torchx.util.types.to_dict", "torchx.specs.finder.get_components", "torchx.runner.config.apply", "sys.exit", "pyre_...
[((927, 954), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (944, 954), False, 'import logging\n'), ((2085, 2101), 'torchx.specs.finder.get_components', 'get_components', ([], {}), '()\n', (2099, 2101), False, 'from torchx.specs.finder import ComponentNotFoundException, ComponentValidati...
#Bibliotecas import pandas as pd import numpy as np import matplotlib.pyplot as plt import investpy as py plt.style.use('fivethirtyeight') #Buscando dados bonds = py.get_bonds_overview(country='brazil') #print(bonds) print('') #Filtrando por nome e preço de fechamento bonds2 = py.get_bonds_overview(country='braz...
[ "matplotlib.pyplot.title", "investpy.get_bonds_overview", "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "matplotlib.pyplot.style.use", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.errorbar" ]
[((109, 141), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""fivethirtyeight"""'], {}), "('fivethirtyeight')\n", (122, 141), True, 'import matplotlib.pyplot as plt\n'), ((168, 207), 'investpy.get_bonds_overview', 'py.get_bonds_overview', ([], {'country': '"""brazil"""'}), "(country='brazil')\n", (189, 207), True...
#!/usr/bin/env python3 """This engine enables to customize the stream joining very flexible by importing only few lines of code that define customized functionality. This framework ensures exactly-once time-series processing that are based on joins using the local stream buffering algorithm with Apache Kafka. Impo...
[ "json.dumps", "time.time", "socket.gethostname", "datetime.datetime.utcfromtimestamp", "datetime.datetime.utcnow", "confluent_kafka.Producer", "LocalStreamBuffer.local_stream_buffer.StreamBuffer" ]
[((2844, 2855), 'time.time', 'time.time', ([], {}), '()\n', (2853, 2855), False, 'import time\n'), ((6762, 6891), 'confluent_kafka.Producer', 'Producer', (["{'bootstrap.servers': KAFKA_BOOTSTRAP_SERVERS, 'transactional.id':\n f'ms-stream-app_{SOURCE_SYSTEMS}_{STREAM_NAME}'}"], {}), "({'bootstrap.servers': KAFKA_BOOT...
import datetime from enum import Enum from pymysqlreplication import BinLogStreamReader from pymysqlreplication.row_event import ( DeleteRowsEvent, UpdateRowsEvent, WriteRowsEvent, TableMapEvent ) from pymysqlreplication.event import ( BeginLoadQueryEvent, ExecuteLoadQueryEvent, QueryEvent, ...
[ "pymysqlreplication.BinLogStreamReader" ]
[((777, 1122), 'pymysqlreplication.BinLogStreamReader', 'BinLogStreamReader', ([], {'connection_settings': 'mysql_settings', 'server_id': 'server_id', 'blocking': 'blocking', 'resume_stream': 'resume_stream', 'only_events': '[DeleteRowsEvent, WriteRowsEvent, UpdateRowsEvent, TableMapEvent,\n BeginLoadQueryEvent, Exe...
import argparse import os import sys from collections import namedtuple from pathlib import Path import toml from ._build import build_journal from ._create import create_journal from ._data_classes import JournalConfiguration, WaldenConfiguration from ._delete import delete_journal from ._edit import edit_journal fr...
[ "toml.dumps", "argparse.ArgumentParser", "pathlib.Path.home", "pathlib.Path", "toml.load", "sys.exit" ]
[((1147, 1222), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""edit and manage your walden journals"""'}), "(description='edit and manage your walden journals')\n", (1170, 1222), False, 'import argparse\n'), ((3684, 3711), 'toml.load', 'toml.load', (['config_file_path'], {}), '(config_fi...
from dataclasses import dataclass from decimal import Decimal from common.config import ( BTCProxyConfig, GRPCServerConfig, IPFSConfig, SQLAlchemyConfig, W3Config, ) @dataclass(frozen=True) class WebauthnConfig: rp_name: str rp_id: str origin: str @dataclass(frozen=True) class Audit...
[ "dataclasses.dataclass" ]
[((190, 212), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (199, 212), False, 'from dataclasses import dataclass\n'), ((286, 308), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (295, 308), False, 'from dataclasses import dataclass\n')]
from django.urls import path from chats import consumers websocket_urlpatterns = [ path('ws/v1/chat_rooms/<int:id>/', consumers.ChatConsumer), ]
[ "django.urls.path" ]
[((89, 147), 'django.urls.path', 'path', (['"""ws/v1/chat_rooms/<int:id>/"""', 'consumers.ChatConsumer'], {}), "('ws/v1/chat_rooms/<int:id>/', consumers.ChatConsumer)\n", (93, 147), False, 'from django.urls import path\n')]
import numpy as np from scipy.linalg import expm from pymanopt.manifolds.manifold import EuclideanEmbeddedSubmanifold from pymanopt.tools.multi import multiprod, multisym, multitransp class Stiefel(EuclideanEmbeddedSubmanifold): """ Factory class for the Stiefel manifold. Instantiation requires the dimen...
[ "numpy.eye", "numpy.random.randn", "numpy.tensordot", "numpy.linalg.qr", "numpy.zeros", "pymanopt.tools.multi.multiprod", "numpy.shape", "numpy.bmat", "pymanopt.tools.multi.multitransp", "numpy.linalg.norm", "pymanopt.tools.multi.multisym", "numpy.diag", "numpy.sqrt" ]
[((1309, 1335), 'numpy.sqrt', 'np.sqrt', (['(self._p * self._k)'], {}), '(self._p * self._k)\n', (1316, 1335), True, 'import numpy as np\n'), ((1510, 1541), 'numpy.tensordot', 'np.tensordot', (['G', 'H'], {'axes': 'G.ndim'}), '(G, H, axes=G.ndim)\n', (1522, 1541), True, 'import numpy as np\n'), ((2011, 2024), 'pymanopt...
from mock import patch, Mock from tests.helpers.testbase import TestBase from cerami.datatype import String from cerami.datatype.translator import BaseDatatypeTranslator class TestBaseDatatypeTranslator(TestBase): def setUp(self): self.dt = String() self.translator = BaseDatatypeTranslator(self.dt)...
[ "mock.Mock", "mock.patch", "cerami.datatype.translator.BaseDatatypeTranslator", "cerami.datatype.String" ]
[((254, 262), 'cerami.datatype.String', 'String', ([], {}), '()\n', (260, 262), False, 'from cerami.datatype import String\n'), ((289, 320), 'cerami.datatype.translator.BaseDatatypeTranslator', 'BaseDatatypeTranslator', (['self.dt'], {}), '(self.dt)\n', (311, 320), False, 'from cerami.datatype.translator import BaseDat...
from json import dumps from .base import Base class Show(Base): """Show the databases and the tables using this command. Usage: puchkidb show [options] options: dbs: show all the databases in the server tables: show all the tables inside a database Example: puchki...
[ "json.dumps" ]
[((444, 489), 'json.dumps', 'dumps', (['self.options'], {'indent': '(2)', 'sort_keys': '(True)'}), '(self.options, indent=2, sort_keys=True)\n', (449, 489), False, 'from json import dumps\n')]
import logging from fuzzywuzzy import process from telegram import ( Update, InlineQuery, InlineQueryResultArticle, InlineKeyboardButton, InlineKeyboardMarkup, ) from telegram.ext import CallbackContext from typing import List, Optional from pythonidbot.constants import HINTS from pythonidbot.utils...
[ "pythonidbot.utils.helpers.article", "fuzzywuzzy.process.extractOne", "telegram.InlineKeyboardButton", "fuzzywuzzy.process.extractBests", "pythonidbot.utils.helpers.build_menu", "telegram.InlineKeyboardMarkup", "pythonidbot.constants.HINTS.values", "logging.getLogger" ]
[((453, 480), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (470, 480), False, 'import logging\n'), ((1273, 1378), 'fuzzywuzzy.process.extractBests', 'process.extractBests', ([], {'query': 'query', 'choices': 'self.hints_q_dict', 'score_cutoff': 'score_cutoff', 'limit': 'limit'}), '(quer...
# Compare Algorithms import pandas import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from sklearn import model_selection from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.neighbors import KNeighborsClassifier from sklearn.discriminant_...
[ "os.path.abspath", "sklearn.naive_bayes.GaussianNB", "matplotlib.pyplot.boxplot", "sklearn.model_selection.cross_val_score", "sklearn.model_selection.KFold", "sklearn.tree.DecisionTreeClassifier", "matplotlib.pyplot.figure", "matplotlib.use", "sklearn.neighbors.KNeighborsClassifier", "sklearn.svm....
[((60, 74), 'matplotlib.use', 'mpl.use', (['"""Agg"""'], {}), "('Agg')\n", (67, 74), True, 'import matplotlib as mpl\n'), ((656, 663), 'MyAPI.MyAPI', 'MyAPI', ([], {}), '()\n', (661, 663), False, 'from MyAPI import MyAPI\n'), ((1464, 1476), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1474, 1476), True,...
import os import subprocess as subp import sys class Bench: moreisbetter = False def run(interp): os.chdir(os.path.join(sys.path[0], 'vendor', 'jsnes', 'test')) res = subp.run([interp, 'shell-bench.js'], stdout=subp.PIPE, universal_newlines=True) if res.returncode != 0: ret...
[ "subprocess.run", "os.path.join" ]
[((193, 272), 'subprocess.run', 'subp.run', (["[interp, 'shell-bench.js']"], {'stdout': 'subp.PIPE', 'universal_newlines': '(True)'}), "([interp, 'shell-bench.js'], stdout=subp.PIPE, universal_newlines=True)\n", (201, 272), True, 'import subprocess as subp\n'), ((125, 177), 'os.path.join', 'os.path.join', (['sys.path[0...
############################################################### import os import cv2 import math import numpy as np from scipy.ndimage import interpolation as inter from scipy.ndimage import rotate ############################################################### C_percentage = 0 ACCEPTED_EXTENSIONS = (".jpeg", ".jpg", "...
[ "os.listdir", "numpy.sum", "cv2.threshold", "scipy.ndimage.interpolation.rotate", "cv2.warpAffine", "numpy.array", "numpy.arange", "os.path.join", "cv2.getRotationMatrix2D", "cv2.resize" ]
[((847, 880), 'numpy.sum', 'np.sum', (['((hit[1:] - hit[:-1]) ** 2)'], {}), '((hit[1:] - hit[:-1]) ** 2)\n', (853, 880), True, 'import numpy as np\n'), ((997, 1046), 'cv2.getRotationMatrix2D', 'cv2.getRotationMatrix2D', (['image_center', 'angle', '(1.0)'], {}), '(image_center, angle, 1.0)\n', (1020, 1046), False, 'impo...
import turtle captain = turtle.Turtle() print("\n--------------------------") print("Ad ve Soyad : <NAME>\nOkul No : 203305028") print("----------------------------") kenar = float(input("Kenar Uzunluklarini Gir : ")) yariCap = float(input("Dairenin Yaricapini Gir : ")) x = 0 y = 0 count = 0 kenar += yariCap captain....
[ "turtle.Turtle" ]
[((25, 40), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (38, 40), False, 'import turtle\n')]
from logging import error import numpy as np class Plane: def __init__(self, origin: np.array, vector1: np.array, vector2: np.array) -> None: self.origin = origin self.vector1 = vector1 self.vector2 = vector2 def getBarycentricCoordinates(self, point: np.array, direction: np.array): ...
[ "logging.error", "numpy.deg2rad", "numpy.sin", "numpy.array", "numpy.cos", "numpy.matmul", "numpy.linalg.solve" ]
[((430, 451), 'numpy.linalg.solve', 'np.linalg.solve', (['a', 'b'], {}), '(a, b)\n', (445, 451), True, 'import numpy as np\n'), ((468, 494), 'numpy.array', 'np.array', (['[sol[0], sol[1]]'], {}), '([sol[0], sol[1]])\n', (476, 494), True, 'import numpy as np\n'), ((2348, 2392), 'numpy.matmul', 'np.matmul', (['rotation_m...