code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from yaml import safe_load from hashlib import md5 from enum import Enum from box import Box class YamlType(Enum): BASE = 0 PIPELINE = 1 SERVICE = 2 def Yaml(path): """ Sudo class for managing a yaml as a python object. :param path: path to .yaml file """ __type__ = None __text_...
[ "yaml.safe_load" ]
[((353, 372), 'yaml.safe_load', 'safe_load', (['__text__'], {}), '(__text__)\n', (362, 372), False, 'from yaml import safe_load\n')]
from __future__ import absolute_import from __future__ import print_function import numpy as np import re from scipy import linalg import scipy.ndimage as ndi from six.moves import range import os import sys import threading import copy import inspect import types from keras import backend as K from keras.utils.gener...
[ "six.moves.range", "keras.backend.image_dim_ordering", "threading.Lock", "numpy.random.randint", "numpy.random.seed" ]
[((3432, 3454), 'keras.backend.image_dim_ordering', 'K.image_dim_ordering', ([], {}), '()\n', (3452, 3454), True, 'from keras import backend as K\n'), ((4362, 4378), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (4376, 4378), False, 'import threading\n'), ((7642, 7674), 'numpy.random.seed', 'np.random.seed', ([...
# -*- coding: utf-8 -*- """ ==================================== Plotting simple 3D graph with Mayavi ==================================== A simple example of the plot of a 3D graph with Mayavi in order to test the autonomy of the gallery. """ # Code source: <NAME> # License: BSD 3 clause from mayavi import mlab ml...
[ "mayavi.mlab.test_plot3d", "mayavi.mlab.test_contour3d", "mayavi.mlab.figure" ]
[((318, 336), 'mayavi.mlab.test_plot3d', 'mlab.test_plot3d', ([], {}), '()\n', (334, 336), False, 'from mayavi import mlab\n'), ((338, 351), 'mayavi.mlab.figure', 'mlab.figure', ([], {}), '()\n', (349, 351), False, 'from mayavi import mlab\n'), ((352, 373), 'mayavi.mlab.test_contour3d', 'mlab.test_contour3d', ([], {}),...
__author__ = "<NAME>" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import os # RiBuild Modules from delphin_6_automation.database_interactions.db_templates import delphin_entry from delphin_6_automation...
[ "delphin_6_automation.database_interactions.mongo_setup.global_end_ssh", "delphin_6_automation.database_interactions.mongo_setup.global_init", "delphin_6_automation.database_interactions.general_interactions.download_sample_data", "delphin_6_automation.database_interactions.db_templates.delphin_entry.Delphin....
[((664, 698), 'delphin_6_automation.database_interactions.mongo_setup.global_init', 'mongo_setup.global_init', (['auth_dict'], {}), '(auth_dict)\n', (687, 698), False, 'from delphin_6_automation.database_interactions import mongo_setup\n'), ((1230, 1264), 'delphin_6_automation.database_interactions.mongo_setup.global_e...
#!/usr/bin/env python ''' MonkeyTest -- test your hard drive read-write speed in Python A simplistic script to show that such system programming tasks are possible and convenient to be solved in Python The file is being created, then written with random data, randomly read and deleted, so the script doesn't waste your...
[ "sys.stdout.flush", "random.shuffle", "argparse.ArgumentParser", "os.close", "os.urandom", "os.write", "os.open", "os.lseek", "time.perf_counter", "os.fsync", "os.read", "json.dump", "os.remove" ]
[((959, 1068), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Arguments"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description='Arguments', formatter_class=argparse.\n ArgumentDefaultsHelpFormatter)\n", (982, 1068), False, 'import argparse\n'), ((7965, 7985)...
from django.test import TestCase, RequestFactory from authors.apps.authentication.views import RegistrationAPIView, VerificationAPIView from authors.apps.articles.views import UpdateArticleAPIView, ArticleCreateAPIView import json from minimock import Mock import smtplib from rest_framework import exceptions, authentic...
[ "django.test.RequestFactory", "authors.apps.utils.app_util.UtilClass", "json.dumps", "authors.apps.articles.views.ArticleCreateAPIView.as_view", "authors.apps.articles.views.UpdateArticleAPIView.as_view" ]
[((461, 477), 'django.test.RequestFactory', 'RequestFactory', ([], {}), '()\n', (475, 477), False, 'from django.test import TestCase, RequestFactory\n'), ((1092, 1103), 'authors.apps.utils.app_util.UtilClass', 'UtilClass', ([], {}), '()\n', (1101, 1103), False, 'from authors.apps.utils.app_util import UtilClass\n'), ((...
# -*- coding: utf-8 -*- from lxml import etree from optparse import OptionParser from zeit.care import add_file_logging from zeit.connector.resource import Resource import StringIO import logging import sys import zeit.care.crawl import zeit.connector.connector logger = logging.getLogger(__name__) _DAV_PROP_NAME_ =...
[ "logging.getLogger", "lxml.etree.Element", "StringIO.StringIO", "zeit.care.add_file_logging", "optparse.OptionParser", "sys.exit", "lxml.etree.tostring" ]
[((273, 300), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (290, 300), False, 'import logging\n'), ((3473, 3492), 'optparse.OptionParser', 'OptionParser', (['usage'], {}), '(usage)\n', (3485, 3492), False, 'from optparse import OptionParser\n'), ((1108, 1129), 'lxml.etree.Element', 'etr...
import traceback from pycompss.api.task import task from pycompss.api.constraint import constraint from pycompss.api.parameter import FILE_IN, FILE_OUT from biobb_common.tools import file_utils as fu from biobb_chemistry.acpype import acpype_params_gmx @task(input_path=FILE_IN, output_path_gro=FILE_OUT, output_path_it...
[ "pycompss.api.task.task", "biobb_common.tools.file_utils.write_failed_output", "traceback.print_exc", "biobb_chemistry.acpype.acpype_params_gmx.AcpypeParamsGMX" ]
[((255, 361), 'pycompss.api.task.task', 'task', ([], {'input_path': 'FILE_IN', 'output_path_gro': 'FILE_OUT', 'output_path_itp': 'FILE_OUT', 'output_path_top': 'FILE_OUT'}), '(input_path=FILE_IN, output_path_gro=FILE_OUT, output_path_itp=FILE_OUT,\n output_path_top=FILE_OUT)\n', (259, 361), False, 'from pycompss.api...
import os import statistics import librosa import sox from concurrent.futures import ThreadPoolExecutor directory = "flac" lengths = [] for file in os.listdir(directory): print(file) length = librosa.get_duration(filename=f"flac\\{file}") lengths.append(length) transform = sox.Transformer(); tran...
[ "statistics.median", "os.listdir", "sox.Transformer", "librosa.get_duration" ]
[((150, 171), 'os.listdir', 'os.listdir', (['directory'], {}), '(directory)\n', (160, 171), False, 'import os\n'), ((203, 249), 'librosa.get_duration', 'librosa.get_duration', ([], {'filename': 'f"""flac\\\\{file}"""'}), "(filename=f'flac\\\\{file}')\n", (223, 249), False, 'import librosa\n'), ((293, 310), 'sox.Transfo...
from django.contrib import admin from ems.crm.models import ( Attribute, Business, Project, TeamMemberRole, TeamMember, ProjectTeam, ProjectAssessment, ProjectUserStory, ProjectEpic, ProjectTask, UserProfile) class AttributeAdmin(admin.ModelAdmin): search_fields = ('label', 'type') list_display =...
[ "django.contrib.admin.site.register" ]
[((1766, 1812), 'django.contrib.admin.site.register', 'admin.site.register', (['Attribute', 'AttributeAdmin'], {}), '(Attribute, AttributeAdmin)\n', (1785, 1812), False, 'from django.contrib import admin\n'), ((1813, 1857), 'django.contrib.admin.site.register', 'admin.site.register', (['Business', 'BusinessAdmin'], {})...
from string import Template from requests import get, post userInfoQuery = """ { viewer { login id } } """ createContributedRepoQuery = Template(""" query { user(login: "$username") { repositoriesContributedTo(last: 100, includeUserRepositories: true) { nodes { isFork...
[ "requests.post", "string.Template", "requests.get" ]
[((160, 426), 'string.Template', 'Template', (['"""\nquery {\n user(login: "$username") {\n repositoriesContributedTo(last: 100, includeUserRepositories: true) {\n nodes {\n isFork\n name\n owner {\n login\n }\n }\n }\n }\n }\n"""'], {}), '(\...
""" This script tunes XGBoost regression model using Bayesian Optimization. """ import os from typing import Union, Tuple, Dict import numpy as np import pandas as pd import xgboost as xgb from munch import munchify from scipy.stats import pearsonr from bayes_opt import BayesianOptimization from sklearn.model_selecti...
[ "utilities.load_data", "bayes_opt.BayesianOptimization", "munch.munchify", "sklearn.model_selection.train_test_split", "utilities.transform_data", "xgboost.DMatrix" ]
[((2874, 2898), 'munch.munchify', 'munchify', (['model_settings'], {}), '(model_settings)\n', (2882, 2898), False, 'from munch import munchify\n'), ((2932, 3393), 'bayes_opt.BayesianOptimization', 'BayesianOptimization', (['model_function', "{'max_depth': model_settings.max_depth_range, 'gamma': model_settings.\n ga...
from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse def send_validation(strategy, code): url = reverse('social:complete', args=(strategy.backend_name,)) + '?code=' + code.code send_mail( 'Validate your account', ...
[ "django.core.urlresolvers.reverse" ]
[((166, 223), 'django.core.urlresolvers.reverse', 'reverse', (['"""social:complete"""'], {'args': '(strategy.backend_name,)'}), "('social:complete', args=(strategy.backend_name,))\n", (173, 223), False, 'from django.core.urlresolvers import reverse\n')]
from django.db import models # Create your models here. from fastrunner.models import Project from fastuser.models import BaseTable class Schedule(BaseTable): """ 定时任务信息表 """ send_strategy = ( (1, "始终发送"), (2, "仅失败发送"), (3, "从不发送") ) class Meta: verbose_name ...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.BooleanField", "django.db.models.CharField" ]
[((371, 436), 'django.db.models.CharField', 'models.CharField', (['"""任务名称"""'], {'unique': '(True)', 'null': '(False)', 'max_length': '(100)'}), "('任务名称', unique=True, null=False, max_length=100)\n", (387, 436), False, 'from django.db import models\n'), ((452, 517), 'django.db.models.CharField', 'models.CharField', ([...
from django import template from django.contrib.admin.util import quote from django.core.urlresolvers import reverse from pbs.risk.models import Treatment register = template.Library() @register.inclusion_tag('admin/risk/treatments.html', takes_context=True) def show_treatments(context, location): current = con...
[ "django.contrib.admin.util.quote", "django.template.Library", "pbs.risk.models.Treatment.objects.filter" ]
[((168, 186), 'django.template.Library', 'template.Library', ([], {}), '()\n', (184, 186), False, 'from django import template\n'), ((353, 439), 'pbs.risk.models.Treatment.objects.filter', 'Treatment.objects.filter', ([], {'register__prescription': 'current', 'location__name': 'location'}), '(register__prescription=cur...
# -*- coding: utf-8 -*- """ Created: on 2018-04-10 @author: Four Project: config\readConfig.py """ import os import configparser cur_path = os.path.dirname(os.path.realpath(__file__)) configPath = os.path.join(cur_path, "cfg.ini") conf = configparser.ConfigParser() conf.read(configPath) smtp_server = conf.get("email"...
[ "os.path.realpath", "os.path.join", "configparser.ConfigParser" ]
[((198, 231), 'os.path.join', 'os.path.join', (['cur_path', '"""cfg.ini"""'], {}), "(cur_path, 'cfg.ini')\n", (210, 231), False, 'import os\n'), ((239, 266), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (264, 266), False, 'import configparser\n'), ((157, 183), 'os.path.realpath', 'os.path...
import os import setuptools from pathlib import Path directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'peg_in_hole', 'envs', 'assets') data_files = [] for root, dirs, files in os.walk(directory): for file in files: data_files.append(os.path.join(root, file)) setuptools.setup( name...
[ "pathlib.Path", "setuptools.find_packages", "os.path.join", "os.path.realpath", "os.walk" ]
[((198, 216), 'os.walk', 'os.walk', (['directory'], {}), '(directory)\n', (205, 216), False, 'import os\n'), ((95, 121), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (111, 121), False, 'import os\n'), ((543, 583), 'setuptools.find_packages', 'setuptools.find_packages', ([], {'include': '"...
#!/usr/bin/env python3.8 'Serial device.' from time import time import serial from settings import Settings class SerialDevice(): 'Communicate with a device over serial.' def __init__(self, settings): self.verbosity = settings['log_verbosity'] - 1 self.log('Setting up serial connection...',...
[ "settings.Settings", "serial.Serial", "time.time" ]
[((465, 512), 'serial.Serial', 'serial.Serial', (['port', 'baud'], {'timeout': 'self.timeout'}), '(port, baud, timeout=self.timeout)\n', (478, 512), False, 'import serial\n'), ((1768, 1774), 'time.time', 'time', ([], {}), '()\n', (1772, 1774), False, 'from time import time\n'), ((4620, 4630), 'settings.Settings', 'Sett...
import cv2 ''' OpenCV comes with a trainer as well as detector. If you want to train your own classifier for any object like car, planes etc. you can use OpenCV to create one. Its full details are given here: Cascade Classifier Training. OpenCV already contains many pre-trained classifiers for face, eyes, smile et...
[ "cv2.rectangle", "cv2.CascadeClassifier", "cv2.cvtColor" ]
[((484, 544), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""haarcascade_frontalface_default.xml"""'], {}), "('haarcascade_frontalface_default.xml')\n", (505, 544), False, 'import cv2\n'), ((563, 607), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""haarcascade_eye.xml"""'], {}), "('haarcascade_eye.xml...
import json import psycopg2 import os from psycopg2._psycopg import IntegrityError from psycopg2.errorcodes import UNIQUE_VIOLATION from logging import getLogger def create_db_connection(): return psycopg2.connect(os.environ['DB_CONNECTION_STRING']) class RunInTransaction: def __init__(self, connection): ...
[ "psycopg2.connect", "json.dumps", "logging.getLogger" ]
[((204, 256), 'psycopg2.connect', 'psycopg2.connect', (["os.environ['DB_CONNECTION_STRING']"], {}), "(os.environ['DB_CONNECTION_STRING'])\n", (220, 256), False, 'import psycopg2\n'), ((939, 964), 'json.dumps', 'json.dumps', (['event.details'], {}), '(event.details)\n', (949, 964), False, 'import json\n'), ((1252, 1279)...
import os import sys def pytest_addoption(parser): parser.addoption('--selenium', '-S', action='store_true', dest='enable_selenium', default=False, help='enable selenium tests') parser.addoption('--show-browser', '-B', action='store_true', dest='show_browser', defaul...
[ "os.path.dirname", "django.setup" ]
[((1050, 1064), 'django.setup', 'django.setup', ([], {}), '()\n', (1062, 1064), False, 'import django\n'), ((930, 955), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (945, 955), False, 'import os\n')]
import pytest import numpy as np from sklearn.ensemble import RandomForestClassifier from ..sequential import sequential import pkg_resources PATH = pkg_resources.resource_filename(__name__, 'test_data/') def test_sequential(): "Test sequential feature selection" # load data X = np.load(PATH+'featur...
[ "numpy.load", "sklearn.ensemble.RandomForestClassifier", "pkg_resources.resource_filename" ]
[((151, 206), 'pkg_resources.resource_filename', 'pkg_resources.resource_filename', (['__name__', '"""test_data/"""'], {}), "(__name__, 'test_data/')\n", (182, 206), False, 'import pkg_resources\n'), ((300, 337), 'numpy.load', 'np.load', (["(PATH + 'features_largeN.npy')"], {}), "(PATH + 'features_largeN.npy')\n", (307...
from __future__ import annotations import os import typing from jj2.client import Client, log from jj2.connection import ConnectionEvent from jj2.exceptions import ArgumentError from jj2.game.connection import GameConnection, GameVersion, ConnectionFlag from jj2.game.objects import PartialRabbit, Rabbit, Message from...
[ "jj2.sgip.sgip", "jj2.sgip.SGIPList", "jj2.game.connection.GameVersion.from_str", "jj2.connection.ConnectionEvent" ]
[((534, 563), 'jj2.game.connection.GameVersion.from_str', 'GameVersion.from_str', (['"""1.24+"""'], {}), "('1.24+')\n", (554, 563), False, 'from jj2.game.connection import GameConnection, GameVersion, ConnectionFlag\n'), ((1589, 1618), 'jj2.game.connection.GameVersion.from_str', 'GameVersion.from_str', (['version'], {}...
import regex class LexToken: def __init__(self, type, tag=None): self.type = type self.tag = tag def __eq__(self, other): return self.type == other.type and self.tag == other.tag def __str__(self): return "Type:'{}' Tag:'{}'".format(self.type, self.tag) def lex(content:...
[ "regex.compile" ]
[((405, 740), 'regex.compile', 'regex.compile', (['"""\n (?p)(?P<whitespace>\\\\s)\n |(?P<if>if)\n |(?P<else>else)\n |(?P<int>int)\n |(?P<void>void)\n |(?P<return>return)\n |(?P<while>while)\n |(?P<operator>[\\\\+\\\\-\\\\*/<>=;,\\\\(\\\\)\\\\{\\\\}{\\\\\\\\\\\\*}{/\\\\*}]|(?:==)|(?:<=)|(?:>=)|(...
from django.urls import path from .views import ( change_password, login, logout, profile, register, register_email, reset_password, send_reset_password_link, verify_email, verify_registration ) app_name = 'rest_registration' urlpatterns = [ path('register/', register, name...
[ "django.urls.path" ]
[((288, 332), 'django.urls.path', 'path', (['"""register/"""', 'register'], {'name': '"""register"""'}), "('register/', register, name='register')\n", (292, 332), False, 'from django.urls import path\n'), ((338, 415), 'django.urls.path', 'path', (['"""verify-registration/"""', 'verify_registration'], {'name': '"""verif...
import tkinter as tk from tkinter import * from PIL import ImageTk, Image import model Height=735 Width=1375 root1=tk.Tk() root1.attributes("-fullscreen", True) root1.geometry('1366x768') root1.title("COVID 19") background_image1=tk.PhotoImage(file=('suru.png')) background_label1=tk.Label(root1,image=background_im...
[ "tkinter.Button", "tkinter.Canvas", "tkinter.StringVar", "tkinter.Tk", "tkinter.Label", "tkinter.OptionMenu", "tkinter.PhotoImage", "model.predictwin", "tkinter.Frame" ]
[((119, 126), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (124, 126), True, 'import tkinter as tk\n'), ((235, 265), 'tkinter.PhotoImage', 'tk.PhotoImage', ([], {'file': '"""suru.png"""'}), "(file='suru.png')\n", (248, 265), True, 'import tkinter as tk\n'), ((286, 326), 'tkinter.Label', 'tk.Label', (['root1'], {'image': 'b...
# Melhore o jogo do DESAFIO 028 onde o computador vai "pensar" em um número entre 0 e 10. Só que agora o jogador vai tentar adivinhar até acertar, mostrando no final quantos palpites foram necessários para vencer. from random import randint contchute=0 print('¬¬¬'*7) print(' JOGO DE ADVINHAÇÃO') print('¬¬¬'*7) print('I...
[ "random.randint" ]
[((386, 400), 'random.randint', 'randint', (['(1)', '(10)'], {}), '(1, 10)\n', (393, 400), False, 'from random import randint\n')]
import numpy as np from keras.models import Model from keras.layers import Input, Conv2D, DepthwiseConv2D # model inputs = Input(shape=(4, 4, 3)) x = DepthwiseConv2D((3, 3), strides=( 1, 1), depth_multiplier=1, padding='same')(inputs) model = Model(inputs, x) model.load_weights('model.h5') print(model.summary()) ...
[ "numpy.allclose", "keras.layers.DepthwiseConv2D", "keras.layers.Input", "keras.models.Model", "numpy.load" ]
[((124, 146), 'keras.layers.Input', 'Input', ([], {'shape': '(4, 4, 3)'}), '(shape=(4, 4, 3))\n', (129, 146), False, 'from keras.layers import Input, Conv2D, DepthwiseConv2D\n'), ((248, 264), 'keras.models.Model', 'Model', (['inputs', 'x'], {}), '(inputs, x)\n', (253, 264), False, 'from keras.models import Model\n'), (...
from pymesh.TestCase import TestCase from pymesh import distance_to_mesh, BVH from pymesh.meshutils import generate_box_mesh import numpy as np class DistanceToMeshTest(TestCase): def test_boundary_pts_cgal(self): mesh = generate_box_mesh( np.array([0, 0, 0]), np.array([1, 1, 1]))...
[ "numpy.array", "numpy.zeros", "pymesh.distance_to_mesh" ]
[((336, 380), 'numpy.array', 'np.array', (['[[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]]'], {}), '([[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]])\n', (344, 380), True, 'import numpy as np\n'), ((453, 488), 'pymesh.distance_to_mesh', 'distance_to_mesh', (['mesh', 'pts', '"""cgal"""'], {}), "(mesh, pts, 'cgal')\n", (469, 488), False, 'from p...
""" Read configurations from a file """ import json import os from typing import Any, List from json_minify import json_minify from yellowbot.globalbag import GlobalBag from yellowbot.loggingservice import LoggingService class ConfigService: def __init__( self, config_file: str = GlobalBag.CONFI...
[ "yellowbot.loggingservice.LoggingService.get_logger", "os.path.join", "os.path.isfile", "os.path.dirname", "json_minify.json_minify" ]
[((552, 587), 'yellowbot.loggingservice.LoggingService.get_logger', 'LoggingService.get_logger', (['__name__'], {}), '(__name__)\n', (577, 587), False, 'from yellowbot.loggingservice import LoggingService\n'), ((2335, 2367), 'os.path.isfile', 'os.path.isfile', (['full_config_path'], {}), '(full_config_path)\n', (2349, ...
# Generated by Django 3.2.9 on 2021-12-11 02:07 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('course', '0017_alter_recording_lesson'), ] operations = [ migrations.AlterField( model_name='re...
[ "django.db.models.ForeignKey" ]
[((375, 462), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""course.lesson"""'}), "(on_delete=django.db.models.deletion.CASCADE, to=\n 'course.lesson')\n", (392, 462), False, 'from django.db import migrations, models\n')]
import torch import torch.nn as nn import numpy as np class IndexTranslator(object): def __init__(self, state): self.state = state self.px = self.state[:, 0].reshape(-1, 1) self.py = self.state[:, 1].reshape(-1, 1) self.vx = self.state[:, 2].reshape(-1, 1) self.vy = self.st...
[ "torch.nn.ReLU", "torch.Tensor", "numpy.arctan2", "numpy.cos", "torch.nn.Linear", "numpy.concatenate", "numpy.sin" ]
[((1990, 2044), 'numpy.arctan2', 'np.arctan2', (['(state.pgy - state.py)', '(state.pgx - state.px)'], {}), '(state.pgy - state.py, state.pgx - state.px)\n', (2000, 2044), True, 'import numpy as np\n'), ((2818, 2831), 'numpy.cos', 'np.cos', (['theta'], {}), '(theta)\n', (2824, 2831), True, 'import numpy as np\n'), ((285...
#!/bin/python import sys,os,json,random ls=os.listdir() dirs=[] for i in ls: if os.path.isdir(i): dirs.append(i) combined=[] for i in dirs: f=open(i+"/quotes.json",'r') quotes=json.load(f) for j in quotes: combined.append(j) random.shuffle(combined) json_data=json.dumps(combined,ind...
[ "os.listdir", "random.shuffle", "json.dumps", "os.path.isdir", "json.load", "os.remove" ]
[((44, 56), 'os.listdir', 'os.listdir', ([], {}), '()\n', (54, 56), False, 'import sys, os, json, random\n'), ((261, 285), 'random.shuffle', 'random.shuffle', (['combined'], {}), '(combined)\n', (275, 285), False, 'import sys, os, json, random\n'), ((297, 343), 'json.dumps', 'json.dumps', (['combined'], {'indent': '(4)...
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2020, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
[ "torch.ones_like", "torch.le", "torch.Tensor", "torch.round", "torch.sum", "torch.zeros_like", "torch.ones" ]
[((4956, 4981), 'torch.le', 'torch.le', (['x', 'encoding_max'], {}), '(x, encoding_max)\n', (4964, 4981), False, 'import torch\n'), ((5044, 5062), 'torch.ones_like', 'torch.ones_like', (['x'], {}), '(x)\n', (5059, 5062), False, 'import torch\n'), ((5112, 5131), 'torch.zeros_like', 'torch.zeros_like', (['x'], {}), '(x)\...
import os from os import path from typing import Callable, Iterable import cv2.cv2 as cv2 import numpy as np from facepy import config class DataSample: """Models a single LFW dataset image.""" @property def person_name(self) -> str: return person_name_from_dir(self.dir_path) @property ...
[ "os.listdir", "cv2.cv2.imread", "os.path.join", "os.path.dirname", "os.path.isdir", "os.path.basename" ]
[((364, 393), 'os.path.basename', 'path.basename', (['self.file_path'], {}), '(self.file_path)\n', (377, 393), False, 'from os import path\n'), ((455, 483), 'os.path.dirname', 'path.dirname', (['self.file_path'], {}), '(self.file_path)\n', (467, 483), False, 'from os import path\n'), ((1152, 1174), 'os.path.join', 'pat...
# ----------------------------------------------------------------------------- # Copyright * 2014, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The Crisis Mapping Toolkit (CMT) v1 platform is licensed under the Apache #...
[ "PyQt4.QtGui.QApplication", "PyQt4.QtCore.pyqtSlot", "PyQt4.QtCore.pyqtSignal", "PyQt4.QtGui.QProgressBar", "PyQt4.QtGui.QLabel", "PyQt4.QtGui.QPushButton", "PyQt4.QtCore.QDate.currentDate", "PyQt4.QtGui.QFileDialog.getSaveFileName", "PyQt4.QtGui.QVBoxLayout", "PyQt4.QtGui.QWidget.__init__", "th...
[((1136, 1183), 'PyQt4.QtCore.pyqtSignal', 'QtCore.pyqtSignal', (['int', 'int', 'str', 'str', 'int', 'int'], {}), '(int, int, str, str, int, int)\n', (1153, 1183), False, 'from PyQt4 import QtGui, QtCore\n'), ((4394, 4413), 'PyQt4.QtCore.pyqtSignal', 'QtCore.pyqtSignal', ([], {}), '()\n', (4411, 4413), False, 'from PyQ...
from asyncio import FastChildWatcher import os from unicodedata import category from flask import request, current_app, url_for from flask_restful import Resource from datetime import datetime from flask_jwt_extended import ( jwt_required, current_user ) from werkzeug.utils import secure_filename from sqlalchemy.or...
[ "os.path.join", "flask.url_for", "datetime.datetime.now", "flask_jwt_extended.jwt_required", "werkzeug.utils.secure_filename" ]
[((844, 858), 'flask_jwt_extended.jwt_required', 'jwt_required', ([], {}), '()\n', (856, 858), False, 'from flask_jwt_extended import jwt_required, current_user\n'), ((1541, 1555), 'flask_jwt_extended.jwt_required', 'jwt_required', ([], {}), '()\n', (1553, 1555), False, 'from flask_jwt_extended import jwt_required, cur...
from Data import Data import itertools import joblib import numpy as np import pandas as pd import pickle import re import statsmodels.api as sm import sys from sklearn.linear_model import LinearRegression from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor from sklearn.metrics impo...
[ "Data.Data", "pandas.Series", "sklearn.ensemble.RandomForestRegressor", "itertools.compress", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.OneHotEncoder", "pandas.merge", "os.path.join", "sklearn.metrics.mean_squared_error", "numpy.square", "sys.exit", "pandas.DataFrame",...
[((959, 986), 'sklearn.ensemble.GradientBoostingRegressor', 'GradientBoostingRegressor', ([], {}), '()\n', (984, 986), False, 'from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor\n'), ((2368, 2487), 'sklearn.model_selection.train_test_split', 'train_test_split', (['self.data[self.features]', "...
import asyncio import json import os import ssl from mock import Mock from aiohttp.client import ClientSession from serversion.kubernetes import Kubernetes def mock_is_file(filename): if filename == "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt": return True return os.path.isfile(filename) d...
[ "os.path.isfile", "serversion.kubernetes.Kubernetes", "mock.Mock", "asyncio.Future" ]
[((292, 316), 'os.path.isfile', 'os.path.isfile', (['filename'], {}), '(filename)\n', (306, 316), False, 'import os\n'), ((431, 464), 'serversion.kubernetes.Kubernetes', 'Kubernetes', (['unique_api_server_url'], {}), '(unique_api_server_url)\n', (441, 464), False, 'from serversion.kubernetes import Kubernetes\n'), ((58...
#!/bin/env python # # Copyright (C) 2014 eNovance SAS <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ "os.path.join", "os.path.isdir", "pysflib.sfgerrit.GerritUtils", "utils.GerritGitUtils" ]
[((1029, 1125), 'pysflib.sfgerrit.GerritUtils', 'GerritUtils', (['config.GATEWAY_URL'], {'auth_cookie': "config.USERS[config.ADMIN_USER]['auth_cookie']"}), "(config.GATEWAY_URL, auth_cookie=config.USERS[config.ADMIN_USER]\n ['auth_cookie'])\n", (1040, 1125), False, 'from pysflib.sfgerrit import GerritUtils\n'), ((12...
#!/usr/bin/env python import sys from os import getcwd sys.path.append(getcwd() + "/pymodules") import plotter from json import dumps from flask import Flask, render_template, request, session, redirect, flash, url_for from nseLookup import MapFormat from finLogin import Connector import datetime app = Flask(__name__...
[ "flask.render_template", "nseLookup.MapFormat", "plotter.get_data", "flask.flash", "flask.Flask", "os.getcwd", "flask.url_for", "datetime.datetime.now", "finLogin.Connector", "flask.session.pop" ]
[((306, 321), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (311, 321), False, 'from flask import Flask, render_template, request, session, redirect, flash, url_for\n'), ((465, 512), 'finLogin.Connector', 'Connector', (['"""127.0.0.1"""', '"""xxxx"""', '"""xxxx"""', '"""xxxxx"""'], {}), "('127.0.0.1', 'xx...
import random import math import pyglet from .letter import Letter def random_color(): return ( random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), ) def spawn_letters(bitmap_font, text, start_x, start_y, batch, boundaries): points = len(text) if points ...
[ "pyglet.resource.image", "pyglet.image.ImageGrid", "pyglet.image.load_animation", "math.cos", "pyglet.image.Animation.from_image_sequence", "math.sin", "random.randint", "pyglet.image.atlas.TextureBin" ]
[((946, 979), 'pyglet.image.load_animation', 'pyglet.image.load_animation', (['path'], {}), '(path)\n', (973, 979), False, 'import pyglet\n'), ((1115, 1142), 'pyglet.resource.image', 'pyglet.resource.image', (['path'], {}), '(path)\n', (1136, 1142), False, 'import pyglet\n'), ((1154, 1193), 'pyglet.image.ImageGrid', 'p...
import cv2 import dlib import numpy as np import pyautogui import imutils import time from imutils import face_utils WHITE_COLOR = (255, 255, 255) YELLOW_COLOR = (0, 255, 255) RED_COLOR = (0, 0, 255) GREEN_COLOR = (0, 255, 0) BLUE_COLOR = (255, 0, 0) BLACK_COLOR = (0, 0, 0) MOUTH_AR_THRESH = 0.6 shape_predictor = "./...
[ "cv2.rectangle", "cv2.flip", "pyautogui.moveTo", "cv2.line", "dlib.shape_predictor", "cv2.imshow", "cv2.putText", "dlib.get_frontal_face_detector", "imutils.resize", "cv2.circle", "pyautogui.click", "cv2.VideoCapture", "cv2.cvtColor", "numpy.linalg.norm", "imutils.face_utils.shape_to_np"...
[((370, 402), 'dlib.get_frontal_face_detector', 'dlib.get_frontal_face_detector', ([], {}), '()\n', (400, 402), False, 'import dlib\n'), ((415, 452), 'dlib.shape_predictor', 'dlib.shape_predictor', (['shape_predictor'], {}), '(shape_predictor)\n', (435, 452), False, 'import dlib\n'), ((748, 767), 'cv2.VideoCapture', 'c...
#!/usr/bin/env python from nodes import Node class Less(Node): char = "<" args = 2 results = 1 @Node.test_func([4,2], [0]) @Node.test_func([0,0], [0]) @Node.test_func([4,5], [1]) def func(self, a,b): """a<b""" return (a<b)+0 @Node.test_func(["test",2], [...
[ "nodes.Node.test_func" ]
[((119, 146), 'nodes.Node.test_func', 'Node.test_func', (['[4, 2]', '[0]'], {}), '([4, 2], [0])\n', (133, 146), False, 'from nodes import Node\n'), ((153, 180), 'nodes.Node.test_func', 'Node.test_func', (['[0, 0]', '[0]'], {}), '([0, 0], [0])\n', (167, 180), False, 'from nodes import Node\n'), ((187, 214), 'nodes.Node....
from random import randint from time import sleep from operator import itemgetter jogo = {'Jogador 1': randint(1,6), 'Jogador 2': randint(1,6), 'Jogador 3': randint(1,6), 'Jogador 4': randint(1,6)} ranking = [] print('Valores sorteados: ') for k, v in jogo.items(): print(f'O {k} tirou {v}') sleep(1) print('='*3...
[ "operator.itemgetter", "random.randint", "time.sleep" ]
[((103, 116), 'random.randint', 'randint', (['(1)', '(6)'], {}), '(1, 6)\n', (110, 116), False, 'from random import randint\n'), ((130, 143), 'random.randint', 'randint', (['(1)', '(6)'], {}), '(1, 6)\n', (137, 143), False, 'from random import randint\n'), ((157, 170), 'random.randint', 'randint', (['(1)', '(6)'], {}),...
import unittest from random import randint from Compare_powers_6_kyu import compare_powers class Powers(unittest.TestCase): def test_1(self): a = [2, 5] b = [3, 9] result = 1 self.assertEqual(compare_powers(a, b), result) def test_2(self): a = [33, 99] b = [22, ...
[ "unittest.main", "Compare_powers_6_kyu.compare_powers" ]
[((584, 599), 'unittest.main', 'unittest.main', ([], {}), '()\n', (597, 599), False, 'import unittest\n'), ((230, 250), 'Compare_powers_6_kyu.compare_powers', 'compare_powers', (['a', 'b'], {}), '(a, b)\n', (244, 250), False, 'from Compare_powers_6_kyu import compare_powers\n'), ((369, 389), 'Compare_powers_6_kyu.compa...
""" IDE: PyCharm Project: corpus-analysis Author: Robin Filename: generate_docs Date: 12.01.2020 """ import pandas as pd from tqdm import tqdm root_folder = 'data/leipzig-corpora/' filename: str = root_folder + 'deu_wikipedia_2016_10K-sentences.txt' doc_folder = root_folder + 'docs' dataframe = pd.read_csv(filename...
[ "pandas.read_csv" ]
[((300, 366), 'pandas.read_csv', 'pd.read_csv', (['filename'], {'sep': '"""\t"""', 'header': 'None', 'names': "['id', 'text']"}), "(filename, sep='\\t', header=None, names=['id', 'text'])\n", (311, 366), True, 'import pandas as pd\n')]
import subprocess import os """ Much of the generated code is based on code internal to quickjs with minor changes. Generated IDL files are header files that provide basic declarations and wrappers. The normal function signature for quickjs is... JSValue js_std_gc(JSContext *ctx, JSValueConst this_val, int argc, JS...
[ "subprocess.check_call" ]
[((19938, 20017), 'subprocess.check_call', 'subprocess.check_call', (["['clang-format', '-style=google', '-i', output_filename]"], {}), "(['clang-format', '-style=google', '-i', output_filename])\n", (19959, 20017), False, 'import subprocess\n')]
from django.test import TestCase import logging from users.models import CustomUser from .models import ContractualParty, Contract, UserContractualPartyAssociation logger = logging.getLogger(__name__) class Explorations(TestCase): def setUp(self): logger.info("setting up the test case") admin =...
[ "logging.getLogger", "users.models.CustomUser" ]
[((175, 202), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (192, 202), False, 'import logging\n'), ((321, 372), 'users.models.CustomUser', 'CustomUser', ([], {'username': '"""Admin"""', 'password': '"""<PASSWORD>"""'}), "(username='Admin', password='<PASSWORD>')\n", (331, 372), False, '...
import sqlite3 from sqlite3 import Error #todo: absoluten pfad raus class RecipeDB: def __init__(self, db_file): """ establishes a connection to an existing database or creates a new one :param db_file: name of the database to be created """ self.db_file = db_file s...
[ "sqlite3.connect" ]
[((416, 457), 'sqlite3.connect', 'sqlite3.connect', (['(self.path + self.db_file)'], {}), '(self.path + self.db_file)\n', (431, 457), False, 'import sqlite3\n')]
"""Handle requests to support sequential navigation between arXiv IDs.""" from flask import url_for, escape from typing import Tuple, Dict, Any from werkzeug.exceptions import BadRequest from browse.domain.identifier import Identifier, IdentifierException from browse.services.database import get_sequential_id from ar...
[ "arxiv.base.logging.getLogger", "flask.escape", "flask.url_for", "browse.services.database.get_sequential_id", "browse.domain.identifier.Identifier", "werkzeug.exceptions.BadRequest" ]
[((501, 528), 'arxiv.base.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (518, 528), False, 'from arxiv.base import logging\n'), ((1811, 1897), 'browse.services.database.get_sequential_id', 'get_sequential_id', ([], {'paper_id': 'arxiv_id', 'is_next': "(function == 'next')", 'context': 'co...
import unittest import numpy as np from chainer import testing from chainercv.transforms import resize_bbox class TestResizeBbox(unittest.TestCase): def test_resize_bbox(self): bbox = np.random.uniform( low=0., high=32., size=(10, 4)) out = resize_bbox(bbox, in_size=(32, 32), out_s...
[ "chainercv.transforms.resize_bbox", "chainer.testing.run_module", "numpy.testing.assert_equal", "numpy.random.uniform" ]
[((605, 643), 'chainer.testing.run_module', 'testing.run_module', (['__name__', '__file__'], {}), '(__name__, __file__)\n', (623, 643), False, 'from chainer import testing\n'), ((201, 252), 'numpy.random.uniform', 'np.random.uniform', ([], {'low': '(0.0)', 'high': '(32.0)', 'size': '(10, 4)'}), '(low=0.0, high=32.0, si...
# This examples shows how to perform collision detection between the end-effector of a robot and a point cloud depicted as a Height Field # Note: this feature requires Meshcat to be installed, this can be done using # pip install --user meshcat import pinocchio as pin import hppfcl as fcl import numpy as np import sys...
[ "numpy.random.rand", "pinocchio.buildModelsFromUrdf", "numpy.array", "pinocchio.computeCollisions", "sys.exit", "numpy.linspace", "pinocchio.randomConfiguration", "pinocchio.SE3.Identity", "numpy.eye", "numpy.ones", "numpy.digitize", "pinocchio.visualize.MeshcatVisualizer", "pinocchio.Collis...
[((613, 667), 'os.path.join', 'join', (['pinocchio_model_dir', '"""example-robot-data/robots"""'], {}), "(pinocchio_model_dir, 'example-robot-data/robots')\n", (617, 667), False, 'from os.path import dirname, join, abspath\n'), ((847, 897), 'pinocchio.buildModelsFromUrdf', 'pin.buildModelsFromUrdf', (['urdf_model_path'...
from collections import Counter, namedtuple Result_ApOfflineTrend = namedtuple("Result_ApOfflineTrend", ( "areaid", "avgApNum", "avgOffLineApNum", "maxOffLineApNum", "minOffLineApNum", "avgOffLineRate", "maxOffLineRate", "minOffLineRate")) data= [ { "deviceId":14063, ...
[ "collections.Counter", "collections.namedtuple" ]
[((69, 247), 'collections.namedtuple', 'namedtuple', (['"""Result_ApOfflineTrend"""', "('areaid', 'avgApNum', 'avgOffLineApNum', 'maxOffLineApNum',\n 'minOffLineApNum', 'avgOffLineRate', 'maxOffLineRate', 'minOffLineRate')"], {}), "('Result_ApOfflineTrend', ('areaid', 'avgApNum',\n 'avgOffLineApNum', 'maxOffLineA...
import logging import types from collections import defaultdict from typing import ( Any, Dict, Iterator, List, Mapping, Tuple, Type, Union, ) from .setting import Setting, PropertySetting from .setting_registry import registry from .docreader import extract_doc_comments_from_class_or_m...
[ "logging.getLogger", "collections.defaultdict" ]
[((662, 689), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (679, 689), False, 'import logging\n'), ((8456, 8473), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (8467, 8473), False, 'from collections import defaultdict\n')]
import sys, os, socket, time, xmlrpc.client, threading from log.logger import * from bean.urlbean import * class Worker(threading.Thread): def __init__(self): threading.Thread.__init__(self) localip = socket.gethostbyname(socket.gethostname()) self.s = xmlrpc.client.ServerProxy('h...
[ "threading.Thread.__init__", "socket.gethostname", "time.sleep" ]
[((180, 211), 'threading.Thread.__init__', 'threading.Thread.__init__', (['self'], {}), '(self)\n', (205, 211), False, 'import sys, os, socket, time, xmlrpc.client, threading\n'), ((252, 272), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (270, 272), False, 'import sys, os, socket, time, xmlrpc.client, ...
#!/usr/bin/env python #------------------------------------------------------------ # Purpose: Program to straight line parameters # to data with errors in both coordinates. Compare # the results with SciPy's ODR routine. # Vog, 27 Nov, 2011 #----------------------------------------------------------...
[ "numpy.random.normal", "numpy.sqrt", "numpy.where", "scipy.odr.ODR", "scipy.odr.Model", "numpy.linspace", "scipy.odr.RealData", "matplotlib.pyplot.figure", "kapteyn.kmpfit.Fitter", "matplotlib.pyplot.rc", "matplotlib.pyplot.show" ]
[((1153, 1181), 'numpy.linspace', 'numpy.linspace', (['(0.0)', '(12.0)', 'N'], {}), '(0.0, 12.0, N)\n', (1167, 1181), False, 'import numpy\n'), ((1251, 1270), 'numpy.random.normal', 'normal', (['(0.0)', '(0.4)', 'N'], {}), '(0.0, 0.4, N)\n', (1257, 1270), False, 'from numpy.random import normal\n'), ((1279, 1298), 'num...
import os import KratosMultiphysics from KratosMultiphysics import Logger Logger.GetDefaultOutput().SetSeverity(Logger.Severity.WARNING) import KratosMultiphysics.KratosUnittest as KratosUnittest import KratosMultiphysics.DEMApplication.DEM_analysis_stage import numpy as np import auxiliary_functions_for_tests this_w...
[ "numpy.isclose", "KratosMultiphysics.DEMApplication.DEM_analysis_stage.DEMAnalysisStage.FinalizeSolutionStep", "KratosMultiphysics.KratosUnittest.main", "os.path.join", "os.getcwd", "os.path.realpath", "KratosMultiphysics.Logger.GetDefaultOutput", "KratosMultiphysics.Model", "auxiliary_functions_for...
[((340, 351), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (349, 351), False, 'import os\n'), ((9710, 9731), 'KratosMultiphysics.KratosUnittest.main', 'KratosUnittest.main', ([], {}), '()\n', (9729, 9731), True, 'import KratosMultiphysics.KratosUnittest as KratosUnittest\n'), ((74, 99), 'KratosMultiphysics.Logger.GetDef...
# -*- coding: utf-8 -*- import pywph as pw import pywph_vanilla as pw2 import numpy as np import matplotlib.pyplot as plt M, N = 256, 256 J = 6 L = 4 dn = 0 data_ini = np.load('data/I_1.npy') data = data_ini[:256,:256] datab = data_ini[256:,256:] """ Without normalization """ # Version dev wph_op = pw.WPHOp(M, N,...
[ "pywph.WPHOp", "numpy.real", "matplotlib.pyplot.figure", "numpy.load", "pywph_vanilla.WPHOp" ]
[((171, 194), 'numpy.load', 'np.load', (['"""data/I_1.npy"""'], {}), "('data/I_1.npy')\n", (178, 194), True, 'import numpy as np\n'), ((306, 349), 'pywph.WPHOp', 'pw.WPHOp', (['M', 'N', 'J'], {'L': 'L', 'dn': 'dn', 'device': '"""cpu"""'}), "(M, N, J, L=L, dn=dn, device='cpu')\n", (314, 349), True, 'import pywph as pw\n...
# Copyright [2018-2020] <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ "ixian_docker.modules.docker.tasks.run" ]
[((1420, 1442), 'ixian_docker.modules.docker.tasks.run', 'run', (['MANAGE_CMD', '*args'], {}), '(MANAGE_CMD, *args)\n', (1423, 1442), False, 'from ixian_docker.modules.docker.tasks import run, Compose\n'), ((4736, 4812), 'ixian_docker.modules.docker.tasks.run', 'run', (['MANAGE_CMD', '"""--service-ports"""', '"""runser...
''' Utility methods for running jobs, changing parameters, and sending multiple jobs at the same time to the dgx server. ''' __author__ = "<NAME>" __email__ = "<EMAIL>" import os import numpy as np import sys import subprocess JSON_TEMPLATE1 = \ '{\ "jobDefinition": {\ "name": "%s",\ "descriptio...
[ "subprocess.check_output", "os.listdir", "os.path.join", "os.remove" ]
[((1688, 1711), 'os.listdir', 'os.listdir', (['ckpt_folder'], {}), '(ckpt_folder)\n', (1698, 1711), False, 'import os\n'), ((3373, 3385), 'os.remove', 'os.remove', (['n'], {}), '(n)\n', (3382, 3385), False, 'import os\n'), ((2688, 2754), 'subprocess.check_output', 'subprocess.check_output', (["['dgx', 'job', 'submit', ...
# import RPi.GPIO as GPIO import datetime class Servo: def __init__(self, on_time=datetime.time(0,0,0)): #pin_mode = GPIO.BOARD): self.on_time = on_time self.on_hour = on_time.hour self.on_minute = on_time.minute self.is_running = False def view_config(self): print(f'on_time: {self.on_time}') ...
[ "datetime.time" ]
[((85, 107), 'datetime.time', 'datetime.time', (['(0)', '(0)', '(0)'], {}), '(0, 0, 0)\n', (98, 107), False, 'import datetime\n')]
# -*- coding: UTF-8 -*- from urllib.parse import urlparse from flask import Flask, request, abort app = Flask(__name__) BASE = "tellement.sexy" VERBS = { "est": "est", "sont": "sont", "is": "is", "are": "are", "cest": "c'est", "ete": "été", "etre": "être", "etait": "était", "etais...
[ "flask.abort", "urllib.parse.urlparse", "flask.Flask" ]
[((106, 121), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (111, 121), False, 'from flask import Flask, request, abort\n'), ((942, 952), 'flask.abort', 'abort', (['(404)'], {}), '(404)\n', (947, 952), False, 'from flask import Flask, request, abort\n'), ((604, 630), 'urllib.parse.urlparse', 'urlparse', (...
from flexinfer.misc import build_from_cfg, registry def build_converter(cfg): return build_from_cfg(cfg, registry, 'converter')
[ "flexinfer.misc.build_from_cfg" ]
[((91, 133), 'flexinfer.misc.build_from_cfg', 'build_from_cfg', (['cfg', 'registry', '"""converter"""'], {}), "(cfg, registry, 'converter')\n", (105, 133), False, 'from flexinfer.misc import build_from_cfg, registry\n')]
from anydoi2cff.main import norm_doi def test_simple_doi(): doi = 'http://doi.org/10.5334/jors.161' assert norm_doi(doi) == '10.5334/jors.161' assert norm_doi(norm_doi(doi)) == '10.5334/jors.161'
[ "anydoi2cff.main.norm_doi" ]
[((117, 130), 'anydoi2cff.main.norm_doi', 'norm_doi', (['doi'], {}), '(doi)\n', (125, 130), False, 'from anydoi2cff.main import norm_doi\n'), ((173, 186), 'anydoi2cff.main.norm_doi', 'norm_doi', (['doi'], {}), '(doi)\n', (181, 186), False, 'from anydoi2cff.main import norm_doi\n')]
#c.execute("CREATE TABLE aud(RollNO text, date integer, starttime integer,endtime integer)") def check(roll,date,starttime,endtime): import sqlite3 message="" conn=sqlite3.connect('aud.db') c=conn.cursor() tup=tuple([roll,date,starttime,endtime]) audopen=9 audclose=24 if int(starttim...
[ "sqlite3.connect" ]
[((178, 203), 'sqlite3.connect', 'sqlite3.connect', (['"""aud.db"""'], {}), "('aud.db')\n", (193, 203), False, 'import sqlite3\n')]
from django.test import TestCase from graphql_extensions import types class CamelJSONTypeTests(TestCase): def test_camel_json(self): json_type = types.CamelJSON() self.assertIn('aB', json_type.serialize({'a_b': None}).keys())
[ "graphql_extensions.types.CamelJSON" ]
[((161, 178), 'graphql_extensions.types.CamelJSON', 'types.CamelJSON', ([], {}), '()\n', (176, 178), False, 'from graphql_extensions import types\n')]
from pkg_resources import resource_string import json proto_info = None try: proto_json = resource_string(__name__, 'proto.json') proto_info = json.loads(proto_json) except Exception: pass
[ "json.loads", "pkg_resources.resource_string" ]
[((102, 141), 'pkg_resources.resource_string', 'resource_string', (['__name__', '"""proto.json"""'], {}), "(__name__, 'proto.json')\n", (117, 141), False, 'from pkg_resources import resource_string\n'), ((160, 182), 'json.loads', 'json.loads', (['proto_json'], {}), '(proto_json)\n', (170, 182), False, 'import json\n')]
import numpy as np import scipy import cv2 def get_pixel_neighbors(height, width): """ Estimate the 4 neighbors of every pixel in an image :param height: image height :param width: image width :return: pixel index - neighbor index lists """ pix_id = [] neighbor_id = [] for i in ra...
[ "scipy.sparse.lil_matrix", "numpy.ones", "numpy.minimum", "numpy.squeeze", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.unravel_index", "numpy.arange" ]
[((990, 1177), 'numpy.array', 'np.array', (['[[0, 1], [1, 2], [2, 3], [3, 4], [1, 5], [5, 6], [6, 7], [1, 11], [11, 12],\n [12, 13], [1, 8], [8, 9], [9, 10], [14, 15], [16, 17], [0, 14], [0, 15],\n [14, 16], [15, 17]]'], {}), '([[0, 1], [1, 2], [2, 3], [3, 4], [1, 5], [5, 6], [6, 7], [1, 11],\n [11, 12], [12, ...
import math import torch import numpy as np import pandas as pd import torch.nn as nn def normal_pdf(x): import math return torch.exp(-0.5 * x**2) / math.sqrt(2 * math.pi) def normal_cdf(y, h=0.01, tau=0.5): # Approximation of Q-function given by López-Benítez & Casadevall (2011) # based on a second-...
[ "torch.abs", "torch.nn.CrossEntropyLoss", "numpy.logical_and", "math.sqrt", "torch.exp", "torch.nn.BCELoss", "torch.no_grad", "torch.logical_and" ]
[((134, 158), 'torch.exp', 'torch.exp', (['(-0.5 * x ** 2)'], {}), '(-0.5 * x ** 2)\n', (143, 158), False, 'import torch\n'), ((159, 181), 'math.sqrt', 'math.sqrt', (['(2 * math.pi)'], {}), '(2 * math.pi)\n', (168, 181), False, 'import math\n'), ((388, 436), 'torch.exp', 'torch.exp', (['(-0.492 * x ** 2 - 0.2887 * x - ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Functions that handle saving and loading of checkpoints.""" import os import pickle from collections import OrderedDict import torch from fvcore.common.file_io import PathManager import net.utils.logging_tool as loggin...
[ "fvcore.common.file_io.PathManager.open", "torch.load", "os.path.join", "net.utils.logging_tool.get_logger", "fvcore.common.file_io.PathManager.ls", "torch.save", "fvcore.common.file_io.PathManager.mkdirs", "fvcore.common.file_io.PathManager.exists" ]
[((401, 429), 'net.utils.logging_tool.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (419, 429), True, 'import net.utils.logging_tool as logging\n'), ((653, 693), 'os.path.join', 'os.path.join', (['path_to_job', '"""checkpoints"""'], {}), "(path_to_job, 'checkpoints')\n", (665, 693), False, 'imp...
import sqlite3 import os DB_SAVES_DIR = 'saves' class DB: def __init__(self, name): self.name = name self.path = '{}/{}.db'.format(DB_SAVES_DIR, self.name) if not os.path.isdir(DB_SAVES_DIR): os.makedirs(DB_SAVES_DIR) self.conn = sqlite3.connect(self.path) def sa...
[ "os.path.isdir", "sqlite3.connect", "os.makedirs" ]
[((282, 308), 'sqlite3.connect', 'sqlite3.connect', (['self.path'], {}), '(self.path)\n', (297, 308), False, 'import sqlite3\n'), ((455, 481), 'sqlite3.connect', 'sqlite3.connect', (['self.path'], {}), '(self.path)\n', (470, 481), False, 'import sqlite3\n'), ((194, 221), 'os.path.isdir', 'os.path.isdir', (['DB_SAVES_DI...
import pandas as pd df = pd.read_csv('tmp/all.csv') df.to_excel('tmp/all.xlsx')
[ "pandas.read_csv" ]
[((26, 52), 'pandas.read_csv', 'pd.read_csv', (['"""tmp/all.csv"""'], {}), "('tmp/all.csv')\n", (37, 52), True, 'import pandas as pd\n')]
from google.cloud import storage from todayi.remote.base import Remote from todayi.util.fs import path class GcsRemote(Remote): """ Manages pushing and pulling application resources with Google Cloud Storage. :param local_file_path: path to file to upload :type local_file_path: str :param re...
[ "google.cloud.storage.Client", "todayi.util.fs.path" ]
[((881, 897), 'google.cloud.storage.Client', 'storage.Client', ([], {}), '()\n', (895, 897), False, 'from google.cloud import storage\n'), ((1733, 1760), 'todayi.util.fs.path', 'path', (['self._local_file_path'], {}), '(self._local_file_path)\n', (1737, 1760), False, 'from todayi.util.fs import path\n')]
import argparse import re from pathlib import Path parser = argparse.ArgumentParser(description='Patches the rers code for libfuzzer') parser.add_argument('file', type=str) args = parser.parse_args() path = args.file alphabet = None with open(path, 'r') as f: lines = f.readlines() for line in lines: ...
[ "re.match", "argparse.ArgumentParser", "pathlib.Path" ]
[((61, 135), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Patches the rers code for libfuzzer"""'}), "(description='Patches the rers code for libfuzzer')\n", (84, 135), False, 'import argparse\n'), ((329, 377), 're.match', 're.match', (['"""\\\\s*int inputs\\\\[\\\\] = {(.*)};"""', 'li...
from python_anticaptcha import AnticaptchaClient, NoCaptchaTaskProxylessTask, AnticaptchaException from bs4 import BeautifulSoup import requests URL_DEC_PEC = "http://www.infoimprese.it/impr/ricerca/captcha.jsp?codiceCaptcha=%s&pecCriptata=%s" def get_captcha(url, api_key, site_key): print("[CHECKING] captcha (s...
[ "bs4.BeautifulSoup", "python_anticaptcha.AnticaptchaClient", "python_anticaptcha.NoCaptchaTaskProxylessTask", "requests.get" ]
[((733, 750), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (745, 750), False, 'import requests\n'), ((762, 798), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.text', '"""html.parser"""'], {}), "(r.text, 'html.parser')\n", (775, 798), False, 'from bs4 import BeautifulSoup\n'), ((1237, 1262), 'requests.get', 'r...
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
[ "ngraph.frontends.onnx.onnx_importer.utils.axes.reorder_axes", "ngraph.convolution", "ngraph.frontends.onnx.onnx_importer.utils.misc.verify_symmetric_padding", "ngraph.frontends.tensorflow.tf_importer.utils_pos_axes.cast_to_pos_axes", "math.floor", "ngraph.constant", "ngraph.deconvolution" ]
[((2728, 2769), 'ngraph.frontends.onnx.onnx_importer.utils.misc.verify_symmetric_padding', 'verify_symmetric_padding', (['onnx_node', 'pads'], {}), '(onnx_node, pads)\n', (2752, 2769), False, 'from ngraph.frontends.onnx.onnx_importer.utils.misc import verify_symmetric_padding\n'), ((8953, 8989), 'ngraph.frontends.onnx....
from floodsystem.geo import stations_by_distance, rivers_by_station_number from haversine import haversine from floodsystem.stationdata import build_station_list from floodsystem.geo import rivers_with_station from floodsystem.geo import stations_by_river from floodsystem.geo import stations_within_radius from floodsy...
[ "floodsystem.geo.rivers_with_station", "haversine.haversine", "floodsystem.geo.stations_by_distance", "floodsystem.geo.stations_within_radius", "floodsystem.geo.stations_by_river", "floodsystem.geo.rivers_by_station_number", "floodsystem.stationdata.build_station_list", "floodsystem.station.inconsiste...
[((413, 433), 'floodsystem.stationdata.build_station_list', 'build_station_list', ([], {}), '()\n', (431, 433), False, 'from floodsystem.stationdata import build_station_list\n'), ((491, 531), 'floodsystem.geo.stations_by_distance', 'stations_by_distance', (['stations'], {'p': '(0, 0)'}), '(stations, p=(0, 0))\n', (511...
import unittest def setUpModule(): print("in module {} - setUpModule()".format(__name__)) def tearDownModule(): print("in module {} - tearDownModule()".format(__name__)) class TextFixtures(unittest.TestCase): @classmethod def setUpClass(cls): print('in class {} - setUpClass()'.format(cls.__...
[ "unittest.main" ]
[((687, 702), 'unittest.main', 'unittest.main', ([], {}), '()\n', (700, 702), False, 'import unittest\n')]
import os import numpy as np import torch from torchvision import models, transforms MODELS = {'densenet121': models.densenet121, 'resnet152': models.resnet152} DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu') ANALYZERS = ['grad', 'smooth-grad', 'smooth-taylor', 'ig', 'lrp'] IG_BASELIN...
[ "torchvision.transforms.CenterCrop", "torch.cuda.is_available", "torchvision.transforms.Normalize", "torchvision.transforms.Resize", "torchvision.transforms.ToTensor" ]
[((205, 230), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (228, 230), False, 'import torch\n'), ((421, 443), 'torchvision.transforms.Resize', 'transforms.Resize', (['(256)'], {}), '(256)\n', (438, 443), False, 'from torchvision import models, transforms\n'), ((488, 514), 'torchvision.transfo...
import warnings import numpy as np from einsteinpy.integrators import GeodesicIntegrator from .utils import _P, _kerr, _kerrnewman, _sch class Geodesic: """ Base Class for defining Geodesics Working in Geometrized Units (M-Units), with :math:`c = G = M = k_e = 1` """ def __init__( ...
[ "numpy.hstack", "einsteinpy.integrators.GeodesicIntegrator", "numpy.array", "numpy.cos", "numpy.vstack", "numpy.sin", "numpy.arange" ]
[((3607, 3633), 'numpy.array', 'np.array', (['[0.0, *position]'], {}), '([0.0, *position])\n', (3615, 3633), True, 'import numpy as np\n'), ((6840, 6852), 'numpy.arange', 'np.arange', (['N'], {}), '(N)\n', (6849, 6852), True, 'import numpy as np\n'), ((6872, 7048), 'einsteinpy.integrators.GeodesicIntegrator', 'Geodesic...
import galaxy.model import galaxy.webapps.community.model as model from galaxy.model.orm import * from galaxy.webapps.community.model.mapping import context as sa_session from galaxy.model.mapping import context as ga_session def delete_obj( obj ): sa_session.delete( obj ) sa_session.flush() def delete_user_ro...
[ "galaxy.webapps.community.model.mapping.context.add", "galaxy.model.mapping.context.refresh", "galaxy.webapps.community.model.mapping.context.query", "galaxy.webapps.community.model.mapping.context.flush", "galaxy.webapps.community.model.mapping.context.refresh", "galaxy.model.mapping.context.query", "g...
[((254, 276), 'galaxy.webapps.community.model.mapping.context.delete', 'sa_session.delete', (['obj'], {}), '(obj)\n', (271, 276), True, 'from galaxy.webapps.community.model.mapping import context as sa_session\n'), ((283, 301), 'galaxy.webapps.community.model.mapping.context.flush', 'sa_session.flush', ([], {}), '()\n'...
from payment_server import app from flask import json def test_payment_server(): response = app.test_client().post( '/api-v1/process-payment/', data=json.dumps({ "CreditCardNumber":"79927398713", "CardHolder":"Anonymous", "ExpirationDate":"2022-08-11T05:26:03.869245", ...
[ "payment_server.app.test_client", "flask.json.dumps" ]
[((109, 126), 'payment_server.app.test_client', 'app.test_client', ([], {}), '()\n', (124, 126), False, 'from payment_server import app\n'), ((184, 323), 'flask.json.dumps', 'json.dumps', (["{'CreditCardNumber': '79927398713', 'CardHolder': 'Anonymous',\n 'ExpirationDate': '2022-08-11T05:26:03.869245', 'Amount': 9}"...
# coding: utf-8 from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.text import slugify class Profile(models.Model): user = models.OneToOneField(User) is_external = models.BooleanField(default=False) class Met...
[ "django.db.models.OneToOneField", "django.utils.translation.ugettext_lazy", "django.utils.text.slugify", "django.db.models.BooleanField" ]
[((226, 252), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {}), '(User)\n', (246, 252), False, 'from django.db import models\n'), ((271, 305), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (290, 305), False, 'from django.db import mode...
""" This module defines an abstract base formatter. !!! question "Formats" Refer to the [Formats documentation](../../formats/index.md) to learn about the supported output formats. """ from abc import ABC, abstractmethod import numpy as np from numpy.lib.recfunctions import unstructured_to_structured class...
[ "numpy.vectorize" ]
[((1067, 1091), 'numpy.vectorize', 'np.vectorize', (['self.color'], {}), '(self.color)\n', (1079, 1091), True, 'import numpy as np\n')]
from typing import List, Optional, Dict, Any import logging import os import json import glob from fastapi import FastAPI, HTTPException, Header, Response, Body from fastapi.responses import FileResponse from fastapi.encoders import jsonable_encoder from app.metadata import PaperStatus, Allocation from app.annotation...
[ "logging.getLogger", "logging.StreamHandler", "fastapi.Body", "app.utils.StackdriverJsonFormatter", "os.path.exists", "app.metadata.PaperStatus.empty", "glob.glob", "fastapi.Response", "fastapi.responses.FileResponse", "app.pre_serve.load_configuration", "fastapi.encoders.jsonable_encoder", "f...
[((460, 493), 'os.getenv', 'os.getenv', (['"""IN_PRODUCTION"""', '"""dev"""'], {}), "('IN_PRODUCTION', 'dev')\n", (469, 493), False, 'import os\n'), ((516, 615), 'os.getenv', 'os.getenv', (['"""PAWLS_CONFIGURATION_FILE"""', '"""/usr/local/src/skiff/app/api/config/configuration.json"""'], {}), "('PAWLS_CONFIGURATION_FIL...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk from predict import Predict class Clasify(): BOX = None WINDOW = None BOX_IMG_TO_PREDICT = None IMAGE = None def __init__(self): self.wi...
[ "gi.repository.Gtk.Box", "gi.repository.Gtk.FileFilter", "gi.repository.Gtk.Image", "gi.repository.Gtk.main_quit", "gi.require_version", "gi.repository.Gtk.Window", "gi.repository.Gtk.Button", "gi.repository.Gtk.main" ]
[((78, 110), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (96, 110), False, 'import gi\n'), ((2724, 2734), 'gi.repository.Gtk.main', 'Gtk.main', ([], {}), '()\n', (2732, 2734), False, 'from gi.repository import Gtk\n'), ((327, 339), 'gi.repository.Gtk.Window', 'Gtk.W...
import os import cloudpickle import numpy as np import logging from modestga import operators from modestga import population from modestga import individual from modestga.ga import norm def parallel_pop(pipe, pickled_fun, args, bounds, pop_size, ...
[ "cloudpickle.loads", "modestga.operators.tournament", "modestga.population.Population", "modestga.operators.crossover", "os.getpid", "modestga.operators.mutation" ]
[((614, 644), 'cloudpickle.loads', 'cloudpickle.loads', (['pickled_fun'], {}), '(pickled_fun)\n', (631, 644), False, 'import cloudpickle\n'), ((684, 755), 'modestga.population.Population', 'population.Population', (['pop_size', 'bounds', 'fun'], {'args': 'args', 'evaluate': '(False)'}), '(pop_size, bounds, fun, args=ar...
import numpy as np import matplotlib.pylab as plt from math import pi,floor,atan2,atan from scipy.interpolate import splprep, splev plt.rcParams['pdf.fonttype'] = 42 plt.rcParams['ps.fonttype'] = 42 ######################################################################################### #############################...
[ "numpy.sqrt", "math.floor", "matplotlib.pylab.show", "numpy.sin", "numpy.arange", "matplotlib.pylab.figure", "numpy.diff", "numpy.linspace", "scipy.interpolate.splev", "matplotlib.pylab.plot", "matplotlib.pylab.xlabel", "math.atan2", "numpy.savetxt", "numpy.interp", "numpy.cos", "scipy...
[((3451, 3491), 'numpy.loadtxt', 'np.loadtxt', (['"""data/Human/StartAndEnd.dat"""'], {}), "('data/Human/StartAndEnd.dat')\n", (3461, 3491), True, 'import numpy as np\n'), ((4257, 4306), 'numpy.loadtxt', 'np.loadtxt', (['"""data/Human/DataIROS/StartAndEnd.dat"""'], {}), "('data/Human/DataIROS/StartAndEnd.dat')\n", (426...
import datetime import asynctest.mock import pytest from exptools.time import ( utcnow, localnow, as_local, as_utc, format_utc, format_utc_short, format_local, format_local_short, parse_utc, parse_local, diff_sec, format_sec, format_sec_fixed, format_sec_short, job_elapsed_time, format_job_count, fo...
[ "exptools.time.parse_local", "exptools.time.format_estimated_time", "exptools.time.format_sec_short", "exptools.time.utcnow", "exptools.time.localnow", "exptools.time.parse_utc", "exptools.time.as_local", "exptools.time.format_job_count", "exptools.time.job_elapsed_time", "exptools.time.format_sec...
[((873, 912), 'exptools.time.parse_utc', 'parse_utc', (['"""2000-01-02 03:04:05.678901"""'], {}), "('2000-01-02 03:04:05.678901')\n", (882, 912), False, 'from exptools.time import utcnow, localnow, as_local, as_utc, format_utc, format_utc_short, format_local, format_local_short, parse_utc, parse_local, diff_sec, format...
import os import struct import sys import matplotlib.pyplot as plt import numpy as np import pandas as pd from ply import lex, yacc class EDR: """Reader for experimental data record (EDR) files from the PDS. This object will ingest and store data from the EDR files, to be processed later. It only ingest...
[ "ply.yacc.yacc", "numpy.fromfile", "ply.lex.lex", "sys.exit", "pandas.DataFrame", "numpy.frombuffer", "numpy.dtype", "numpy.vectorize" ]
[((2156, 2818), 'numpy.dtype', 'np.dtype', (["[('SCET_FRAME_WHOLE', '>u4'), ('SCET_FRAME_FRAC', '>u2'), (\n 'GEOMETRY_EPHEMERIS_TIME', '>f8'), ('GEOMETRY_EPOCH', 'V23'), (\n 'MARS_SOLAR_LONGITUDE', '>f8'), ('MARS_SUN_DISTANCE', '>f8'), (\n 'ORBIT_NUMBER', '>u4'), ('TARGET_NAME', 'V6'), (\n 'TARGET_SC_POSITI...
#! /usr/bin/env python3 # -*- coding:utf-8 -*- import cv2 import xml.etree.ElementTree as ET import glob import sys import pickle from multiprocessing import Pool, Manager def getXmlRoot(filename): # try: tree = ET.parse(filename) return tree.getroot() def getVideo(filename): try: video = ...
[ "xml.etree.ElementTree.parse", "glob.iglob", "cv2.VideoCapture", "multiprocessing.Pool", "multiprocessing.Manager" ]
[((223, 241), 'xml.etree.ElementTree.parse', 'ET.parse', (['filename'], {}), '(filename)\n', (231, 241), True, 'import xml.etree.ElementTree as ET\n'), ((320, 346), 'cv2.VideoCapture', 'cv2.VideoCapture', (['filename'], {}), '(filename)\n', (336, 346), False, 'import cv2\n'), ((2810, 2819), 'multiprocessing.Manager', '...
from typing import Tuple import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder def label_encoder(c: str) -> np.ndarray: lc = LabelEncoder() return lc.fit_transform(c) def load_dataset() -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]: path = "../../input/tabular-playg...
[ "sklearn.preprocessing.LabelEncoder", "numpy.select", "pandas.read_csv", "numpy.where", "pandas.concat" ]
[((164, 178), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (176, 178), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((356, 387), 'pandas.read_csv', 'pd.read_csv', (["(path + 'train.csv')"], {}), "(path + 'train.csv')\n", (367, 387), True, 'import pandas as pd\n'), ((399, 429), ...
""" This file is part of nucypher. nucypher 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 3 of the License, or (at your option) any later version. nucypher is distributed in the hope that it wil...
[ "pytest.fixture" ]
[((743, 759), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (757, 759), False, 'import pytest\n'), ((912, 928), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (926, 928), False, 'import pytest\n'), ((1338, 1354), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1352, 1354), False, 'import pytest\n'...
import http.server from os import linesep class POST: def __init__(self,server_instance): selfserv = server_instance content_length = int(selfserv.headers['Content-Length']) boundary = '--' + selfserv.headers['Content-Type'].split('=')[1] #get boundary. in headers, bou...
[ "os.linesep.encode" ]
[((1064, 1080), 'os.linesep.encode', 'linesep.encode', ([], {}), '()\n', (1078, 1080), False, 'from os import linesep\n'), ((1224, 1240), 'os.linesep.encode', 'linesep.encode', ([], {}), '()\n', (1238, 1240), False, 'from os import linesep\n')]
import psycopg2 import csv # relative and fixed imports from config.db.config import config from config.db.connect import setup_db from geodensity.tasks import query_data from geodensity.querries import geonorge, enhetsreg # from .models import YOUR_MODEL def query_data(query, filepath): """ Sample function t...
[ "csv.writer", "config.db.config.config", "geodensity.tasks.query_data" ]
[((1778, 1832), 'geodensity.tasks.query_data', 'query_data', ([], {'query': 'geonorge', 'filepath': 'geonorge_filepath'}), '(query=geonorge, filepath=geonorge_filepath)\n', (1788, 1832), False, 'from geodensity.tasks import query_data\n'), ((480, 506), 'config.db.config.config', 'config', ([], {'section': '"""DATABASE"...
import numpy as np from scipy.stats import chi2 from tqdm import tqdm as tqdm from ...common import ( Gaussian, GaussianDensity, HypothesisReduction, normalize_log_weights, ) from ...configs import SensorModelConfig from ...measurement_models import MeasurementModel from ...motion_models import MotionM...
[ "numpy.log", "numpy.array", "scipy.stats.chi2.ppf", "numpy.argmax" ]
[((887, 922), 'scipy.stats.chi2.ppf', 'chi2.ppf', (['P_G'], {'df': 'self.meas_model.d'}), '(P_G, df=self.meas_model.d)\n', (895, 922), False, 'from scipy.stats import chi2\n'), ((2707, 2768), 'numpy.log', 'np.log', (['(self.sensor_model.P_D / self.sensor_model.intensity_c)'], {}), '(self.sensor_model.P_D / self.sensor_...
import SCRAM from SCRAM.BuildSystem.ToolManager import ToolManager from SCRAM.Core.Core import Core from operator import itemgetter def process(args): area = Core() area.checklocal() if not args or args[0].lower() not in ['list', 'info', 'tag', 'remove']: SCRAM.scramfatal("Error parsing arguments....
[ "SCRAM.BuildSystem.ToolManager.ToolManager", "SCRAM.scramfatal", "SCRAM.BuildSystem.ToolFile.ToolFile.get_feature", "SCRAM.BuildSystem.ToolFile.ToolFile.summarize_tool", "SCRAM.scramerror", "SCRAM.printmsg", "SCRAM.Core.Core.Core", "operator.itemgetter" ]
[((164, 170), 'SCRAM.Core.Core.Core', 'Core', ([], {}), '()\n', (168, 170), False, 'from SCRAM.Core.Core import Core\n'), ((479, 496), 'SCRAM.BuildSystem.ToolManager.ToolManager', 'ToolManager', (['area'], {}), '(area)\n', (490, 496), False, 'from SCRAM.BuildSystem.ToolManager import ToolManager\n'), ((730, 758), 'SCRA...
from flask import request import app.api.routes.models.political from app.api.routes.models.political import PoliticalParty as p, parties from app.api.blueprints import version1 from app.api.responses import Responses from app.api.utils import Validations from app.api.valid import validate_update_all as v from app.api...
[ "app.api.blueprints.version1.route", "app.api.utils.Validations.validate_json_inputs", "app.api.utils.Validations.validate_strings", "app.api.utils.Validations.validate_logo", "app.api.valid.validate_update_all", "app.api.responses.Responses.created_response", "app.api.utils.Validations.validate_charact...
[((347, 388), 'app.api.blueprints.version1.route', 'version1.route', (['"""/party"""'], {'methods': "['GET']"}), "('/party', methods=['GET'])\n", (361, 388), False, 'from app.api.blueprints import version1\n'), ((650, 692), 'app.api.blueprints.version1.route', 'version1.route', (['"""/party"""'], {'methods': "['POST']"...
import unittest import numpy as np import tensorflow as tf import lib.weighted_layers_v2 as wl from lib.weighted_resblock import MixtureWeight class WeightedConv2DTest(tf.test.TestCase): """WeightedConv2D test class.""" def setUp(self): """Sets default parameters.""" super(WeightedConv2DTest, self).setUp(...
[ "tensorflow.random.normal", "lib.weighted_layers_v2.WeightedBatchNormalizationSeparate", "lib.weighted_layers_v2.WeightedDepthwiseConv2D", "numpy.random.rand", "tensorflow.keras.layers.Conv2D", "tensorflow.reduce_sum", "tensorflow.nn.moments", "tensorflow.math.sqrt", "tensorflow.zeros_like", "lib....
[((8216, 8272), 'unittest.main', 'unittest.main', ([], {'argv': "['first-arg-is-ignored']", 'exit': '(False)'}), "(argv=['first-arg-is-ignored'], exit=False)\n", (8229, 8272), False, 'import unittest\n'), ((472, 581), 'numpy.random.rand', 'np.random.rand', (['self.num_templates', 'self.kernel_size', 'self.kernel_size',...