code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
[ "warnings.warn", "torch.squeeze" ]
[((1316, 1340), 'torch.squeeze', 'torch.squeeze', (['labels', '(1)'], {}), '(labels, 1)\n', (1329, 1340), False, 'import torch\n'), ((2511, 2622), 'warnings.warn', 'warnings.warn', (['"""single channel prediction, `mutually_exclusive=True` ignored, use threshold instead."""'], {}), "(\n 'single channel prediction, `...
# This file is also a independently runnable file in addition to being a module. # You can run this file to test NewRaphAlgorithm function. ''' This program demonstrates Newton Raphson Algorithm(NPA). It is advised to follow all rules of the algorithm while entering the input. (Either read rules provided in README.md ...
[ "sympy.sympify", "sympy.diff" ]
[((2606, 2623), 'sympy.sympify', 'sympify', (['equation'], {}), '(equation)\n', (2613, 2623), False, 'from sympy import sympify, diff\n'), ((2793, 2807), 'sympy.diff', 'diff', (['equation'], {}), '(equation)\n', (2797, 2807), False, 'from sympy import sympify, diff\n')]
from itertools import groupby from taxonomic import lca from taxonomic import ncbi n = ncbi.NCBI() def read_relationships(): for line in open('cold/GMGC.relationships.txt'): a,_,b = line.rstrip().split() yield a,b fr12name = {} for line in open('cold/freeze12.rename.table'): i,g,_ = li...
[ "taxonomic.ncbi.NCBI" ]
[((87, 98), 'taxonomic.ncbi.NCBI', 'ncbi.NCBI', ([], {}), '()\n', (96, 98), False, 'from taxonomic import ncbi\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import openpyxl import csv path = os.curdir if len(sys.argv) > 1: path = sys.argv[1] for excel_file in os.listdir(path): if (not os.path.isfile(excel_file)) or not excel_file.endswith('.xlsx'): continue print('{0}: Writing to csv...
[ "openpyxl.load_workbook", "csv.writer", "os.listdir", "os.path.isfile" ]
[((178, 194), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (188, 194), False, 'import os\n'), ((354, 388), 'openpyxl.load_workbook', 'openpyxl.load_workbook', (['excel_file'], {}), '(excel_file)\n', (376, 388), False, 'import openpyxl\n'), ((208, 234), 'os.path.isfile', 'os.path.isfile', (['excel_file'], {})...
from gpiozero import Button from time import sleep, time import blinkt import random import requests import sys from constants import * FNT_URL = "https://api.fortnitetracker.com/v1/profile/{}/{}" FNT_REFRESH_TIME_SECS = 30 # debug shorter refresh # FNT_REFRESH_TIME_SECS = 10 class FortniteAPIError(Exception): pa...
[ "blinkt.show", "blinkt.set_clear_on_exit", "blinkt.set_pixel", "requests.get", "gpiozero.Button", "blinkt.set_all", "time.sleep", "sys.exc_info", "blinkt.clear", "time.time", "random.randint" ]
[((4045, 4055), 'gpiozero.Button', 'Button', (['(17)'], {}), '(17)\n', (4051, 4055), False, 'from gpiozero import Button\n'), ((4056, 4082), 'blinkt.set_clear_on_exit', 'blinkt.set_clear_on_exit', ([], {}), '()\n', (4080, 4082), False, 'import blinkt\n'), ((502, 535), 'requests.get', 'requests.get', (['url'], {'headers...
#!/usr/bin/env python import os.path import sys from pprint import pprint import nist_database def sort_dict(d, key=None, reverse=False): """ Returns an OrderedDict object whose keys are ordered according to their value. Args: d: Input dictionary key: functio...
[ "collections.OrderedDict", "qatom.AtomicConfiguration.neutral_from_symbol", "pprint.pprint", "sys.exit" ]
[((854, 887), 'collections.OrderedDict', 'collections.OrderedDict', (['kv_items'], {}), '(kv_items)\n', (877, 887), False, 'import collections\n'), ((1547, 1562), 'pprint.pprint', 'pprint', (['neutral'], {}), '(neutral)\n', (1553, 1562), False, 'from pprint import pprint\n'), ((1645, 1660), 'pprint.pprint', 'pprint', (...
import gym import time import random import custom_envs import pprint class MCOBJ(object): def __init__(self, grid_mdp): self.env = grid_mdp # Just for pass the error. self.states = self.env.getStates() self.actions = self.env.getActions() def gen_random_pi_sample(self, num): ...
[ "random.random", "time.sleep", "gym.make", "pprint.pprint" ]
[((3883, 3905), 'gym.make', 'gym.make', (['"""GridEnv-v0"""'], {}), "('GridEnv-v0')\n", (3891, 3905), False, 'import gym\n'), ((4357, 4377), 'pprint.pprint', 'pprint.pprint', (['qfunc'], {}), '(qfunc)\n', (4370, 4377), False, 'import pprint\n'), ((4493, 4508), 'time.sleep', 'time.sleep', (['(0.3)'], {}), '(0.3)\n', (45...
#coding=utf-8 #-*- coding: utf-8 -*- import os import sys sys.path.append("../frame/") from loggingex import LOG_INFO from loggingex import LOG_ERROR from loggingex import LOG_WARNING from mysql_manager import mysql_manager class prepare_table(): def __init__(self, conn_name, table_template_name): self....
[ "sys.setdefaultencoding", "mysql_manager.mysql_manager", "os.chdir", "os.path.isfile", "j_load_mysql_conf.j_load_mysql_conf", "scheduler_frame_conf_inst.scheduler_frame_conf_inst", "loggingex.LOG_WARNING", "sys.path.append" ]
[((59, 87), 'sys.path.append', 'sys.path.append', (['"""../frame/"""'], {}), "('../frame/')\n", (74, 87), False, 'import sys\n'), ((1597, 1615), 'os.chdir', 'os.chdir', (['"""../../"""'], {}), "('../../')\n", (1605, 1615), False, 'import os\n'), ((1620, 1651), 'sys.path.append', 'sys.path.append', (['"""./src/frame/"""...
#!/usr/bin/env python3 import sys def set_path(path: str): try: sys.path.index(path) except ValueError: sys.path.insert(0, path) # set programatically the path to 'sim-environment' directory (alternately can also set PYTHONPATH) set_path('/media/suresh/research/awesome-robotics/active-slam/cat...
[ "torch.manual_seed", "sys.path.insert", "pathlib.Path", "random.seed", "measurement.Measurement", "sys.path.index", "numpy.random.seed", "torch.cuda.manual_seed", "numpy.set_printoptions" ]
[((486, 523), 'numpy.random.seed', 'np.random.seed', (['constants.RANDOM_SEED'], {}), '(constants.RANDOM_SEED)\n', (500, 523), True, 'import numpy as np\n'), ((524, 558), 'random.seed', 'random.seed', (['constants.RANDOM_SEED'], {}), '(constants.RANDOM_SEED)\n', (535, 558), False, 'import random\n'), ((559, 604), 'torc...
from django.contrib.auth import authenticate from django.shortcuts import render from rest_framework import serializers from rest_framework import status from rest_framework.views import APIView from rest_framework.authtoken.models import Token from rest_framework.response import Response from .models import Editor fr...
[ "django.contrib.auth.authenticate", "rest_framework.serializers.EmailField", "rest_framework.response.Response", "rest_framework.serializers.CharField", "rest_framework.authtoken.models.Token.objects.get_or_create" ]
[((413, 437), 'rest_framework.serializers.EmailField', 'serializers.EmailField', ([], {}), '()\n', (435, 437), False, 'from rest_framework import serializers\n'), ((453, 497), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'trim_whitespace': '(False)'}), '(trim_whitespace=False)\n', (474, 497), ...
import argparse import os import json from torch.utils.tensorboard import SummaryWriter import random import numpy as np import zipfile import torch from transformers import AdamW, get_linear_schedule_with_warmup from LAUG.nlu.jointBERT_new.dataloader import Dataloader from LAUG.nlu.jointBERT_new.jointBERT im...
[ "torch.manual_seed", "torch.utils.tensorboard.SummaryWriter", "os.path.exists", "LAUG.nlu.jointBERT_new.frames.postprocess.calculateF1", "argparse.ArgumentParser", "os.makedirs", "zipfile.ZipFile", "transformers.AdamW", "transformers.get_linear_schedule_with_warmup", "json.dumps", "os.path.join"...
[((452, 505), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train a model."""'}), "(description='Train a model.')\n", (475, 505), False, 'import argparse\n'), ((365, 382), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (376, 382), False, 'import random\n'), ((388, 408), 'nump...
import json import time import requests import re from flask import Flask, render_template, jsonify from pyecharts.charts import Map, Timeline,Kline,Line,Bar,WordCloud from pyecharts import options as opts from pyecharts.globals import SymbolType app = Flask(__name__) #字典,受限于谷歌调用限制 cn_to_en = {'安哥拉': 'Angola', '阿富汗':...
[ "flask.render_template", "flask.Flask", "pyecharts.options.VisualMapOpts", "pyecharts.options.DataZoomOpts", "pyecharts.charts.Line", "pyecharts.charts.Bar", "flask.jsonify", "pyecharts.options.LabelOpts", "pyecharts.options.TitleOpts", "pyecharts.options.LegendOpts", "pyecharts.charts.WordCloud...
[((255, 270), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (260, 270), False, 'from flask import Flask, render_template, jsonify\n'), ((7343, 7369), 'json.loads', 'json.loads', (["r_data['data']"], {}), "(r_data['data'])\n", (7353, 7369), False, 'import json\n'), ((7881, 7907), 'json.loads', 'json.loads'...
# Generated by Django 2.2.4 on 2019-08-03 15:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('game', '0001_initial'), ] operations = [ migrations.CreateModel( name='Table', fields=[ ('id', model...
[ "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((315, 408), '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", (331, 408), False, 'from django.db import migrations, models\...
# coding=utf-8 import unittest from mock import patch from ddt import ddt, data from digestparser.objects import Digest import activity.activity_PostDigestJATS as activity_module from activity.activity_PostDigestJATS import activity_PostDigestJATS as activity_object import tests.activity.settings_mock as settings_mock...
[ "mock.patch", "digestparser.objects.Digest", "tests.activity.classes_mock.FakeStorageContext", "mock.patch.object", "ddt.data", "unittest.main", "activity.activity_PostDigestJATS.activity_PostDigestJATS", "tests.activity.classes_mock.FakeLogger" ]
[((1060, 1120), 'mock.patch.object', 'patch.object', (['activity_module.email_provider', '"""smtp_connect"""'], {}), "(activity_module.email_provider, 'smtp_connect')\n", (1072, 1120), False, 'from mock import patch\n'), ((1126, 1148), 'mock.patch', 'patch', (['"""requests.post"""'], {}), "('requests.post')\n", (1131, ...
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.exceptions import ValidationError # Class for project management and their relationships class Projects(models.Model): # Name of table _name = "projects.project" # Simple fields of the object name = fields.Char(string="Project titl...
[ "odoo.api.constrains", "odoo.fields.Date", "odoo.fields.Many2one", "odoo.exceptions.ValidationError", "odoo.fields.Many2many", "odoo.fields.Char" ]
[((288, 338), 'odoo.fields.Char', 'fields.Char', ([], {'string': '"""Project title"""', 'required': '(True)'}), "(string='Project title', required=True)\n", (299, 338), False, 'from odoo import models, fields, api\n'), ((354, 393), 'odoo.fields.Char', 'fields.Char', ([], {'string': '"""ID"""', 'required': '(True)'}), "...
from app.shared.models import db from app.models.mixins import ModelMixin class Food(ModelMixin, db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), nullable=False) category_id = db.Column(db.Integer, db.ForeignKey("category.id"), nullable=False) restourant_id = db...
[ "app.shared.models.db.Column", "app.shared.models.db.String", "app.shared.models.db.ForeignKey" ]
[((119, 158), 'app.shared.models.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (128, 158), False, 'from app.shared.models import db\n'), ((180, 194), 'app.shared.models.db.String', 'db.String', (['(255)'], {}), '(255)\n', (189, 194), False, 'from app.shared.mo...
from setuptools import find_packages, setup from ticketus import __version__ as version setup( name='ticketus', version=version, license='BSD', author='<NAME>', author_email='<EMAIL>', description='Ticketus is a simple, no-frills ticketing system for helpdesks.', url='https://github.com/sj...
[ "setuptools.find_packages" ]
[((605, 649), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['ticketus_settings']"}), "(exclude=['ticketus_settings'])\n", (618, 649), False, 'from setuptools import find_packages, setup\n')]
from rasa_nlu.interpreters.simple_interpreter import HelloGoodbyeInterpreter interpreter = HelloGoodbyeInterpreter() def test_samples(): samples = [ ("Hey there", {'text': "Hey there", 'intent': 'greet', 'entities': {}}), ("good bye for now", {'text': "good bye for now", 'intent': 'goodbye', 'ent...
[ "rasa_nlu.interpreters.simple_interpreter.HelloGoodbyeInterpreter" ]
[((92, 117), 'rasa_nlu.interpreters.simple_interpreter.HelloGoodbyeInterpreter', 'HelloGoodbyeInterpreter', ([], {}), '()\n', (115, 117), False, 'from rasa_nlu.interpreters.simple_interpreter import HelloGoodbyeInterpreter\n')]
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # Invenio-Circulation is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Tests for loan item resolver.""" from invenio_circulation.api import Loan def test_loan_item_resolver(ap...
[ "invenio_circulation.api.Loan.get_record_by_pid" ]
[((429, 461), 'invenio_circulation.api.Loan.get_record_by_pid', 'Loan.get_record_by_pid', (['loan_pid'], {}), '(loan_pid)\n', (451, 461), False, 'from invenio_circulation.api import Loan\n'), ((713, 745), 'invenio_circulation.api.Loan.get_record_by_pid', 'Loan.get_record_by_pid', (['loan_pid'], {}), '(loan_pid)\n', (73...
#!/usr/bin/python # Copyright (c) 2011 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os # # CoverageHelper # # The CoverageHelper is an object which defines lists used by the coverage # scripts for grouping ...
[ "os.path.realpath", "os.listdir", "os.path.join", "os.path.isdir" ]
[((726, 753), 'os.path.realpath', 'os.path.realpath', (['startpath'], {}), '(startpath)\n', (742, 753), False, 'import os\n'), ((770, 790), 'os.listdir', 'os.listdir', (['realpath'], {}), '(realpath)\n', (780, 790), False, 'import os\n'), ((805, 833), 'os.path.join', 'os.path.join', (['realpath', 'name'], {}), '(realpa...
import json from requests import Request from pydantic import BaseModel from pydoc import locate from typing import List, Optional import dataclasses from dataclasses import dataclass from datetime import datetime SCHEMAS = {} class ResourceBaseSchema(BaseModel): id: Optional[str] private: Optional[bool] ...
[ "json.dumps", "requests.Request" ]
[((5357, 5385), 'json.dumps', 'json.dumps', (['response_payload'], {}), '(response_payload)\n', (5367, 5385), False, 'import json\n'), ((3852, 3926), 'requests.Request', 'Request', (["self.method_dict[method]['method']", 'url'], {'json': 'data', 'params': 'params'}), "(self.method_dict[method]['method'], url, json=data...
"""This module handles the creation of an Explosion instance.""" from os import pardir, path import pygame as pg from pygame.sprite import Sprite import color # Path template for the nine explosion images. IMG = path.join(pardir, "resources/images/explosions/explosion0{}.jpg") class Explosion(Sprite): """A cl...
[ "os.path.join", "pygame.time.get_ticks", "pygame.transform.scale" ]
[((216, 281), 'os.path.join', 'path.join', (['pardir', '"""resources/images/explosions/explosion0{}.jpg"""'], {}), "(pardir, 'resources/images/explosions/explosion0{}.jpg')\n", (225, 281), False, 'from os import pardir, path\n'), ((627, 646), 'pygame.time.get_ticks', 'pg.time.get_ticks', ([], {}), '()\n', (644, 646), T...
import pandas as pd import numpy as np import yaml import os import argparse from sklearn.impute import KNNImputer from logger import App_Logger file_object=open("application_logging/Loggings.txt", 'a+') logger_object=App_Logger() def read_params(config_path): with open(config_path) as yaml_file: ...
[ "argparse.ArgumentParser", "pandas.read_csv", "sklearn.impute.KNNImputer", "yaml.safe_load", "logger.App_Logger", "numpy.round" ]
[((228, 240), 'logger.App_Logger', 'App_Logger', ([], {}), '()\n', (238, 240), False, 'from logger import App_Logger\n'), ((4068, 4093), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (4091, 4093), False, 'import argparse\n'), ((332, 357), 'yaml.safe_load', 'yaml.safe_load', (['yaml_file'], {})...
"""This module contains helper functions used in the API""" import datetime import json import re import string import random from functools import wraps from flask import request from api_v1.models import User def name_validalidation(name, context): """Function used to validate various names""" if len(name...
[ "api_v1.models.User.decode_token", "random.choice", "json.dumps", "re.match", "functools.wraps", "flask.request.headers.get" ]
[((1193, 1252), 'json.dumps', 'json.dumps', (['data'], {'default': 'datetimeconverter', 'sort_keys': '(True)'}), '(data, default=datetimeconverter, sort_keys=True)\n', (1203, 1252), False, 'import json\n'), ((1373, 1385), 'functools.wraps', 'wraps', (['funct'], {}), '(funct)\n', (1378, 1385), False, 'from functools imp...
import sensor, image, time, pyb from pid import PID from pyb import Servo from pyb import UART uart = UART(3, 19200) usb = pyb.USB_VCP() led_red = pyb.LED(1) # Red LED = 1, Green LED = 2, Blue LED = 3, IR LEDs = 4. led_green = pyb.LED(2) pan_pid = PID(p=0.07, i=0, imax=90) #脱机运行或者禁用图像传输,使用这个PID tilt_pid = PID(p=0...
[ "sensor.skip_frames", "sensor.set_auto_gain", "time.clock", "sensor.set_pixformat", "pyb.Pin", "sensor.set_auto_whitebal", "pid.PID", "sensor.set_framesize", "time.sleep", "pyb.USB_VCP", "sensor.reset", "pyb.UART", "pyb.Servo", "sensor.snapshot", "pyb.LED" ]
[((103, 117), 'pyb.UART', 'UART', (['(3)', '(19200)'], {}), '(3, 19200)\n', (107, 117), False, 'from pyb import UART\n'), ((124, 137), 'pyb.USB_VCP', 'pyb.USB_VCP', ([], {}), '()\n', (135, 137), False, 'import sensor, image, time, pyb\n'), ((151, 161), 'pyb.LED', 'pyb.LED', (['(1)'], {}), '(1)\n', (158, 161), False, 'i...
import json import datetime def print_json_log(logger_, level_, message_): dict_ = {"level": level_, "message": message_, "time": str(datetime.datetime.now())} json_str = json.dumps(dict_) getattr(logger_, level_)(json_str)
[ "datetime.datetime.now", "json.dumps" ]
[((181, 198), 'json.dumps', 'json.dumps', (['dict_'], {}), '(dict_)\n', (191, 198), False, 'import json\n'), ((140, 163), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (161, 163), False, 'import datetime\n')]
# -*- coding: utf-8 -*- import pytest from pyisic import NACE2_to_ISIC4 from pyisic.types import Standards @pytest.mark.parametrize( "code,expected", [ ("DOESNT EXIST", set()), ("A", {(Standards.ISIC4, "A")}), ("01", {(Standards.ISIC4, "01")}), ("01.1", {(Standards.ISIC4, "011...
[ "pyisic.NACE2_to_ISIC4.concordant" ]
[((516, 547), 'pyisic.NACE2_to_ISIC4.concordant', 'NACE2_to_ISIC4.concordant', (['code'], {}), '(code)\n', (541, 547), False, 'from pyisic import NACE2_to_ISIC4\n')]
from django.urls import path from custom_user_app.views import (CustomUserLoginView, CustomUserLogoutView, CustomUserCreationView, CustomUserUpdateView, CustomUserPasswordChangeVie...
[ "custom_user_app.views.CustomUserPasswordChangeView.as_view", "custom_user_app.views.CustomUserCreationView.as_view", "custom_user_app.views.CustomUserUpdateView.as_view", "custom_user_app.views.CustomUserPasswordChangeDoneView.as_view", "custom_user_app.views.CustomUserLogoutView.as_view", "custom_user_a...
[((429, 458), 'custom_user_app.views.CustomUserLoginView.as_view', 'CustomUserLoginView.as_view', ([], {}), '()\n', (456, 458), False, 'from custom_user_app.views import CustomUserLoginView, CustomUserLogoutView, CustomUserCreationView, CustomUserUpdateView, CustomUserPasswordChangeView, CustomUserPasswordChangeDoneVie...
import numpy as np import csv as csv from clean_data import clean_data from join_columns import join_columns from fix_decimals import add_int, cut_decimals def preprocess_dataset(): preprocess_data('train', False) preprocess_data('test', False) preprocess_data('train', True) preprocess_data('test', Tru...
[ "fix_decimals.cut_decimals", "fix_decimals.add_int", "numpy.array", "numpy.savetxt", "clean_data.clean_data", "csv.reader", "join_columns.join_columns" ]
[((586, 599), 'numpy.array', 'np.array', (['raw'], {}), '(raw)\n', (594, 599), True, 'import numpy as np\n'), ((610, 625), 'clean_data.clean_data', 'clean_data', (['raw'], {}), '(raw)\n', (620, 625), False, 'from clean_data import clean_data\n'), ((2508, 2523), 'fix_decimals.add_int', 'add_int', (['raw', '(0)'], {}), '...
# Generated by Django 3.2.7 on 2021-09-07 02:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0004_location'), ] operations = [ migrations.AlterField( model_name='location', name='location', ...
[ "django.db.models.CharField" ]
[((331, 363), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(150)'}), '(max_length=150)\n', (347, 363), False, 'from django.db import migrations, models\n')]
import numpy as np from napari_plugin_engine import napari_hook_implementation from napari_tools_menu import register_function from napari_time_slicer import time_slicer, slice_by_slice import napari from napari.types import ImageData, LabelsData @napari_hook_implementation def napari_experimental_provide_function()...
[ "mahotas.label", "mahotas.distance", "numpy.ones", "mahotas.close_holes", "numpy.asarray", "mahotas.cwatershed", "scipy.ndimage.convolve", "numpy.logical_xor", "mahotas.gaussian_filter", "mahotas.regmax", "napari_tools_menu.register_function", "mahotas.open", "mahotas.sobel", "mahotas.otsu...
[((574, 648), 'napari_tools_menu.register_function', 'register_function', ([], {'menu': '"""Filtering / noise removal > Gaussian (n-mahotas)"""'}), "(menu='Filtering / noise removal > Gaussian (n-mahotas)')\n", (591, 648), False, 'from napari_tools_menu import register_function\n'), ((1099, 1198), 'napari_tools_menu.re...
from order import Order class OrderManager: def __init__(self): self.orders = {} def user_has_any_order(self, chat_id: int, user: str) -> bool: order = self.get_order(chat_id) return order.user_has_any_order(user) def get_order(self, id: int) -> Order: if id not in sel...
[ "order.Order" ]
[((360, 367), 'order.Order', 'Order', ([], {}), '()\n', (365, 367), False, 'from order import Order\n')]
from django.contrib import admin # Register your models here. from Box.models import Player, ObservationList, Comments, ObservationForm class PlayerAdmin(admin.ModelAdmin): list_display = ['first_name', 'last_name', 'year_of_birth', 'club', 'position', 'status', 'mail', 'phone', 'agent'] class ObservationListA...
[ "django.contrib.admin.site.register" ]
[((966, 1024), 'django.contrib.admin.site.register', 'admin.site.register', (['ObservationForm', 'ObservationFormAdmin'], {}), '(ObservationForm, ObservationFormAdmin)\n', (985, 1024), False, 'from django.contrib import admin\n'), ((818, 858), 'django.contrib.admin.site.register', 'admin.site.register', (['Player', 'Pl...
from __future__ import print_function, division, absolute_import, unicode_literals from numbers import Number import numpy as np from voluptuous import Schema, Required, Any, Range from mitxgraders.comparers.baseclasses import CorrelatedComparer from mitxgraders.helpers.calc.mathfuncs import is_nearly_zero from mitxgra...
[ "numpy.mean", "voluptuous.Required", "mitxgraders.exceptions.ConfigError", "numpy.all", "numpy.square", "numpy.array", "numpy.vstack", "numpy.linalg.lstsq", "numpy.linalg.norm", "mitxgraders.helpers.calc.mathfuncs.is_nearly_zero", "voluptuous.Range" ]
[((1370, 1401), 'numpy.linalg.lstsq', 'np.linalg.lstsq', (['A', 'y'], {'rcond': '(-1)'}), '(A, y, rcond=-1)\n', (1385, 1401), True, 'import numpy as np\n'), ((2612, 2624), 'numpy.vstack', 'np.vstack', (['x'], {}), '(x)\n', (2621, 2624), True, 'import numpy as np\n'), ((2670, 2701), 'numpy.linalg.lstsq', 'np.linalg.lsts...
# -*- coding: utf-8 -*- """ Created on Mon Oct 25 05:21:45 2021 @author: bw98j """ import prose as pgx import pandas as pd import matplotlib.pyplot as plt import matplotlib.colors as colors import seaborn as sns import numpy as np import itertools import glob import os from tqdm import tqdm import ...
[ "matplotlib.pyplot.text", "matplotlib.pyplot.savefig", "seaborn.despine", "matplotlib.pyplot.ylabel", "pandas.read_csv", "seaborn.clustermap", "matplotlib.pyplot.xlabel", "seaborn.diverging_palette", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "glob.glob" ]
[((689, 728), 'matplotlib.pyplot.rc', 'plt.rc', (['"""font"""'], {'family': '"""arial"""', 'size': '(40)'}), "('font', family='arial', size=40)\n", (695, 728), True, 'import matplotlib.pyplot as plt\n'), ((728, 758), 'matplotlib.pyplot.rc', 'plt.rc', (['"""hatch"""'], {'linewidth': '(2.0)'}), "('hatch', linewidth=2.0)\...
import argparse import os import glob import pandas as pd from libraryTools import imageRegionOfInterest #filename,width,height,class,xmin,ymin,xmax,ymax #20170730_132530-(F00000).jpeg,576,1024,sinaleira,221,396,246,437 valid_images = [".jpg",".gif",".png",".tga",".jpeg"] def run(image_path, classNameList = ["somecl...
[ "os.listdir", "argparse.ArgumentParser", "libraryTools.imageRegionOfInterest", "os.path.join", "os.path.splitext" ]
[((2060, 2085), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2083, 2085), False, 'import argparse\n'), ((1051, 1084), 'libraryTools.imageRegionOfInterest', 'imageRegionOfInterest', (['image_path'], {}), '(image_path)\n', (1072, 1084), False, 'from libraryTools import imageRegionOfInterest\n'...
# coding=utf-8 import serial import time import os KERNEL_PATH = './kernel9.img' def serial_w(content): ser.write(content) time.sleep(1) port1 = '/dev/pts/4' port2 = '/dev/ttyUSB0' if __name__ == "__main__": ser = serial.Serial(port=port1, baudrate=115200) kernel_size = os.path.getsize(KERNEL_PATH)...
[ "os.path.getsize", "serial.Serial", "time.sleep" ]
[((134, 147), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (144, 147), False, 'import time\n'), ((231, 273), 'serial.Serial', 'serial.Serial', ([], {'port': 'port1', 'baudrate': '(115200)'}), '(port=port1, baudrate=115200)\n', (244, 273), False, 'import serial\n'), ((292, 320), 'os.path.getsize', 'os.path.getsiz...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # ----------- # SPDX-License-Identifier: MIT # Copyright (c) 2021 <NAME> # uuid : 633f2088-bbe3-11eb-b9c2-33be0bb8451e # author: <NAME> # email : <EMAIL> # date : 2021-05-23 # ----------- """ The `repair` command has access to tools that can repair various problems th...
[ "pathlib.Path", "click.group", "click.option", "rich.console.Console", "datetime.datetime.now" ]
[((750, 759), 'rich.console.Console', 'Console', ([], {}), '()\n', (757, 759), False, 'from rich.console import Console\n'), ((13372, 13393), 'click.group', 'click.group', (['"""repair"""'], {}), "('repair')\n", (13383, 13393), False, 'import click\n'), ((13395, 13512), 'click.option', 'click.option', (['"""--dry-run""...
# -*- coding: utf-8 -*- # This file is part of the Ingram Micro Cloud Blue Connect connect-cli. # Copyright (c) 2019-2021 Ingram Micro. All Rights Reserved. import os import json from datetime import datetime from urllib import parse import requests from click import ClickException from openpyxl import Workbook from...
[ "connect.cli.core.http.handle_http_error", "click.ClickException", "connect.client.R", "connect.cli.plugins.product.utils.get_col_limit_by_ws_type", "os.path.exists", "json.dumps", "os.path.isdir", "os.mkdir", "openpyxl.utils.quote_sheetname", "connect.cli.plugins.product.utils.get_json_object_for...
[((1274, 1298), 'openpyxl.styles.Font', 'Font', ([], {'sz': '(24)', 'color': 'WHITE'}), '(sz=24, color=WHITE)\n', (1278, 1298), False, 'from openpyxl.styles import Alignment, Font, PatternFill\n'), ((1320, 1369), 'openpyxl.styles.Alignment', 'Alignment', ([], {'horizontal': '"""center"""', 'vertical': '"""center"""'}),...
import os, time, shutil def get_used_dirs(): pids = [p for p in os.listdir("/proc") if p.isnumeric()] res = set() for p in pids: try: path = os.path.realpath("/proc/%s/cwd"%p) if path.startswith("/tmp/fileshare."): res.add(path) except: pa...
[ "os.listdir", "time.sleep", "os.path.realpath", "shutil.rmtree", "os.system" ]
[((715, 728), 'time.sleep', 'time.sleep', (['(5)'], {}), '(5)\n', (725, 728), False, 'import os, time, shutil\n'), ((69, 88), 'os.listdir', 'os.listdir', (['"""/proc"""'], {}), "('/proc')\n", (79, 88), False, 'import os, time, shutil\n'), ((174, 210), 'os.path.realpath', 'os.path.realpath', (["('/proc/%s/cwd' % p)"], {...
import os import requests from nltk.corpus import wordnet as wn urldir = "urls" geturls = "http://www.image-net.org/api/text/imagenet.synset.geturls?wnid={wnid}" if not os.path.isdir(urldir): os.makedirs(urldir) with open("base_concepts.txt") as fin: for line in fin: concept = line.strip().split("_"...
[ "nltk.corpus.wordnet.synsets", "os.path.isdir", "os.makedirs" ]
[((172, 193), 'os.path.isdir', 'os.path.isdir', (['urldir'], {}), '(urldir)\n', (185, 193), False, 'import os\n'), ((199, 218), 'os.makedirs', 'os.makedirs', (['urldir'], {}), '(urldir)\n', (210, 218), False, 'import os\n'), ((370, 402), 'nltk.corpus.wordnet.synsets', 'wn.synsets', (['concept'], {'pos': 'wn.NOUN'}), '(...
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.0) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x01\x64\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x...
[ "PyQt5.QtCore.qVersion", "PyQt5.QtCore.qUnregisterResourceData", "PyQt5.QtCore.qRegisterResourceData" ]
[((9613, 9714), 'PyQt5.QtCore.qRegisterResourceData', 'QtCore.qRegisterResourceData', (['rcc_version', 'qt_resource_struct', 'qt_resource_name', 'qt_resource_data'], {}), '(rcc_version, qt_resource_struct,\n qt_resource_name, qt_resource_data)\n', (9641, 9714), False, 'from PyQt5 import QtCore\n'), ((9741, 9844), 'P...
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "jax_cfd.data.xarray_utils.construct_coords", "jax.numpy.asarray", "numpy.empty", "xarray.DataArray", "xarray.open_dataset" ]
[((2013, 2061), 'numpy.empty', 'np.empty', (['(num_init, num_optspace)'], {'dtype': 'object'}), '((num_init, num_optspace), dtype=object)\n', (2021, 2061), True, 'import numpy as np\n'), ((2931, 2957), 'jax_cfd.data.xarray_utils.construct_coords', 'xru.construct_coords', (['grid'], {}), '(grid)\n', (2951, 2957), True, ...
import argparse from train_images import run # generalized ZSL # CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 0 --generalized True > awa1.log 2>&1 & # CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train False --num_shots 0 --generalized True > sun.lo...
[ "argparse.ArgumentTypeError", "train_images.run", "argparse.ArgumentParser" ]
[((18138, 18163), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (18161, 18163), False, 'import argparse\n'), ((23652, 23660), 'train_images.run', 'run', (['opt'], {}), '(opt)\n', (23655, 23660), False, 'from train_images import run\n'), ((18074, 18127), 'argparse.ArgumentTypeError', 'argparse....
from kivy.app import App from kivy.config import Config from kivy.uix.listview import ListItemButton from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.label import Label from kivy.clock import Clock from kivy.uix.button import Button from kivy.uix.widget import Widget from functools import partial ...
[ "datetime.datetime.utcfromtimestamp", "rpclib.rpc_connect", "kivy.config.Config.set", "functools.partial", "bitcoin.core.x", "kivy.app.App.get_running_app" ]
[((461, 509), 'kivy.config.Config.set', 'Config.set', (['"""kivy"""', '"""window_icon"""', '"""favicon.ico"""'], {}), "('kivy', 'window_icon', 'favicon.ico')\n", (471, 509), False, 'from kivy.config import Config\n'), ((8959, 9016), 'functools.partial', 'partial', (['MessageUpdater.messages_checker', 'message_updater']...
import os import sys import shutil import csv import subprocess ...
[ "subprocess.check_output", "os.path.exists", "random.choice", "xml.etree.ElementTree.parse", "csv.DictReader", "argparse.ArgumentParser", "subprocess.check_call", "os.makedirs", "subprocess.Popen", "req.send_req", "shutil.which", "random.randrange", "change_axis_qhd.ChangeAxis", "re.findal...
[((590, 678), 'sys.path.append', 'sys.path.append', (['"""/home/kimsoohyun/00-Research/02-Graph/01-tapsterbot/dataSendTest"""'], {}), "(\n '/home/kimsoohyun/00-Research/02-Graph/01-tapsterbot/dataSendTest')\n", (605, 678), False, 'import sys\n'), ((2590, 2627), 'subprocess.Popen', 'subprocess.Popen', (['command'], {...
# -*- coding: utf-8 -*- ''' Special rule for processing Hangul https://github.com/kyubyong/g2pK ''' import re from g2pk.utils import gloss, get_rule_id2text rule_id2text = get_rule_id2text() ############################ vowels ############################ def jyeo(inp, descriptive=False, verbose=False): rule =...
[ "g2pk.utils.gloss", "re.sub", "g2pk.utils.get_rule_id2text" ]
[((175, 193), 'g2pk.utils.get_rule_id2text', 'get_rule_id2text', ([], {}), '()\n', (191, 193), False, 'from g2pk.utils import gloss, get_rule_id2text\n'), ((385, 416), 're.sub', 're.sub', (['"""([ᄌᄍᄎ])ᅧ"""', '"""\\\\1ᅥ"""', 'inp'], {}), "('([ᄌᄍᄎ])ᅧ', '\\\\1ᅥ', inp)\n", (391, 416), False, 'import re\n'), ((421, 451), 'g...
#!/usr/local/bin/python2.7 ## # OOIPLACEHOLDER # # Copyright 2014 <NAME>. ## __author__ = '<NAME>' from mi.dataset.dataset_parser import DataSetDriverConfigKeys from mi.dataset.dataset_driver import SimpleDatasetDriver from mi.dataset.parser.flord_l_wfp_sio import FlordLWfpSioParser from mi.core.versioning import ver...
[ "mi.core.versioning.version", "mi.dataset.parser.flord_l_wfp_sio.FlordLWfpSioParser" ]
[((328, 345), 'mi.core.versioning.version', 'version', (['"""15.6.1"""'], {}), "('15.6.1')\n", (335, 345), False, 'from mi.core.versioning import version\n'), ((956, 1030), 'mi.dataset.parser.flord_l_wfp_sio.FlordLWfpSioParser', 'FlordLWfpSioParser', (['parser_config', 'stream_handle', 'self._exception_callback'], {}),...
import sys import os sys.path.insert(0, '../..') from nltk.corpus import framenet as fn import FrameNetNLTK from FrameNetNLTK import load, convert_to_lemon my_fn = load(folder='test_lexicon', verbose=2) output_path = os.path.join(os.getcwd(), 'stats', ...
[ "FrameNetNLTK.convert_to_lemon", "sys.path.insert", "FrameNetNLTK.load", "os.getcwd" ]
[((21, 48), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../.."""'], {}), "(0, '../..')\n", (36, 48), False, 'import sys\n'), ((166, 204), 'FrameNetNLTK.load', 'load', ([], {'folder': '"""test_lexicon"""', 'verbose': '(2)'}), "(folder='test_lexicon', verbose=2)\n", (170, 204), False, 'from FrameNetNLTK import loa...
from django.contrib import admin from controle.models import Time, Music # Register your models here. admin.site.register(Time) admin.site.register(Music)
[ "django.contrib.admin.site.register" ]
[((103, 128), 'django.contrib.admin.site.register', 'admin.site.register', (['Time'], {}), '(Time)\n', (122, 128), False, 'from django.contrib import admin\n'), ((129, 155), 'django.contrib.admin.site.register', 'admin.site.register', (['Music'], {}), '(Music)\n', (148, 155), False, 'from django.contrib import admin\n'...
import os import pdb import fvm.models_atyped_double as models import fvm.exporters_atyped_double as exporters class Output(): def __init__(self, outputDir, probeIndex, sim): if os.path.isdir(outputDir) == False: os.mkdir(outputDir) self.defFile = open(outputDir + 'deformation.dat...
[ "os.path.isdir", "os.mkdir" ]
[((197, 221), 'os.path.isdir', 'os.path.isdir', (['outputDir'], {}), '(outputDir)\n', (210, 221), False, 'import os\n'), ((244, 263), 'os.mkdir', 'os.mkdir', (['outputDir'], {}), '(outputDir)\n', (252, 263), False, 'import os\n')]
from __future__ import absolute_import import errno import socket import sys from future.utils import raise_ from boofuzz import exception from boofuzz.connections import base_socket_connection ETH_P_ALL = 0x0003 # Ethernet protocol: Every packet, see Linux if_ether.h docs for more details. ETH_P_IP = 0x0800 # Et...
[ "sys.exc_info", "boofuzz.exception.BoofuzzTargetConnectionReset", "socket.htons", "boofuzz.exception.BoofuzzTargetConnectionAborted" ]
[((1861, 1894), 'socket.htons', 'socket.htons', (['self.ethernet_proto'], {}), '(self.ethernet_proto)\n', (1873, 1894), False, 'import socket\n'), ((2781, 2873), 'boofuzz.exception.BoofuzzTargetConnectionAborted', 'exception.BoofuzzTargetConnectionAborted', ([], {'socket_errno': 'e.errno', 'socket_errmsg': 'e.strerror'...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_google_dork.models import model_utils.fields import django.utils.timezone class Migration(migrations.Migration): replaces = [('django_google_dork', '0001_initial'), ('django_google_dork', '0002...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.DateTimeField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.URLField", "django.db.models.CharField" ]
[((3647, 3680), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)'}), '(default=True)\n', (3666, 3680), False, 'from django.db import models, migrations\n'), ((3834, 3867), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)'}), '(default=True)\n', (3853, 3867...
from flask import Blueprint, abort, jsonify, render_template from src.fruit_castle.hadwin.utilities import get_json_data from .v1.version_1 import v1 from .v2.version_2 import v2 from .v3.version_3 import v3 hadwin = Blueprint('hadwin', __name__, url_prefix='/hadwin',static_url_path='/dist', static_folde...
[ "flask.abort", "flask.Blueprint", "src.fruit_castle.hadwin.utilities.get_json_data", "flask.jsonify" ]
[((219, 357), 'flask.Blueprint', 'Blueprint', (['"""hadwin"""', '__name__'], {'url_prefix': '"""/hadwin"""', 'static_url_path': '"""/dist"""', 'static_folder': '"""../client/dist"""', 'template_folder': '"""client"""'}), "('hadwin', __name__, url_prefix='/hadwin', static_url_path='/dist',\n static_folder='../client/...
import pytest import friendly_traceback from friendly_traceback.console_helpers import _get_info from ..syntax_errors_formatting_cases import descriptions friendly_traceback.set_lang("en") where = "parsing_error_source" cause = "cause" @pytest.mark.parametrize("filename", descriptions.keys()) def test_syntax_errors...
[ "friendly_traceback.explain_traceback", "friendly_traceback.set_lang", "friendly_traceback.console_helpers._get_info" ]
[((157, 190), 'friendly_traceback.set_lang', 'friendly_traceback.set_lang', (['"""en"""'], {}), "('en')\n", (184, 190), False, 'import friendly_traceback\n'), ((523, 534), 'friendly_traceback.console_helpers._get_info', '_get_info', ([], {}), '()\n', (532, 534), False, 'from friendly_traceback.console_helpers import _g...
from itertools import product from tools.general import load_input_list def get_new_active_range(current_active_set, dimensions): lowest = [0] * dimensions highest = [0] * dimensions for point in current_active_set: for i, coord in enumerate(point): if coord < lowest[i]: ...
[ "tools.general.load_input_list" ]
[((1640, 1668), 'tools.general.load_input_list', 'load_input_list', (['"""day17.txt"""'], {}), "('day17.txt')\n", (1655, 1668), False, 'from tools.general import load_input_list\n')]
# -*- coding: utf-8 -*- from numpy import log2 from pickle import load """ * Clase que se encarga de ver la información mutua que hay entre dos tokens * sirve para determinar si es colocación o no """ class MI: def __init__(self): self.words = load(open("./models/words.d",'r')) self.ngrams = load(open("./models...
[ "numpy.log2" ]
[((722, 737), 'numpy.log2', 'log2', (['(sup / inf)'], {}), '(sup / inf)\n', (726, 737), False, 'from numpy import log2\n')]
from functools import reduce data = [] with open("aoc6.inp") as rf: sets = [] for l in rf: if l == "\n": data.append(sets) sets = [] else: sets.append(set([c for c in l.strip()])) a1 = a2 = 0 for sets in data: a1 += len(reduce(lambda s1, s2: s1 | s2, s...
[ "functools.reduce" ]
[((288, 324), 'functools.reduce', 'reduce', (['(lambda s1, s2: s1 | s2)', 'sets'], {}), '(lambda s1, s2: s1 | s2, sets)\n', (294, 324), False, 'from functools import reduce\n'), ((340, 376), 'functools.reduce', 'reduce', (['(lambda s1, s2: s1 & s2)', 'sets'], {}), '(lambda s1, s2: s1 & s2, sets)\n', (346, 376), False, ...
import zeep import logging logging.getLogger('zeep').setLevel(logging.ERROR) publicServiceUrl = 'https://api.tradera.com/v3/PublicService.asmx' appId = 'REPLACE ME WITH TRADERA ID' appKey = 'REPLACE ME WITH TRADERA KEY' wsdl = 'https://api.tradera.com/v3/PublicService.asmx?WSDL' client = zeep.Client(wsdl=wsdl) au...
[ "logging.getLogger", "zeep.Client" ]
[((294, 316), 'zeep.Client', 'zeep.Client', ([], {'wsdl': 'wsdl'}), '(wsdl=wsdl)\n', (305, 316), False, 'import zeep\n'), ((28, 53), 'logging.getLogger', 'logging.getLogger', (['"""zeep"""'], {}), "('zeep')\n", (45, 53), False, 'import logging\n')]
#!/usr/bin/env python3 import webbrowser import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from ghnotifier.notifier import Notifier from ghnotifier.settings import Settings class Menu: GITHUB_NOTIFICATIONS = 'https://github.com/notifications' def __init__(self): self.menu =...
[ "gi.repository.Gtk.SeparatorMenuItem", "gi.repository.Gtk.main_quit", "webbrowser.open", "gi.require_version", "ghnotifier.settings.Settings", "gi.repository.Gtk.Menu", "ghnotifier.notifier.Notifier.stop", "gi.repository.Gtk.MenuItem" ]
[((53, 85), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (71, 85), False, 'import gi\n'), ((321, 331), 'gi.repository.Gtk.Menu', 'Gtk.Menu', ([], {}), '()\n', (329, 331), False, 'from gi.repository import Gtk\n'), ((670, 688), 'gi.repository.Gtk.MenuItem', 'Gtk.MenuI...
import tensorflow as tf ######################################################################################################################## # Isometry Loss ######################################################################################################################## def getLoss(inputMeshTensor, restTe...
[ "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.shape", "tensorflow.reshape" ]
[((995, 1046), 'tensorflow.reshape', 'tf.reshape', (['innerSum', '[batchSize, numberOfVertices]'], {}), '(innerSum, [batchSize, numberOfVertices])\n', (1005, 1046), True, 'import tensorflow as tf\n'), ((1057, 1092), 'tensorflow.reduce_sum', 'tf.reduce_sum', (['(innerSum * rowWeight)'], {}), '(innerSum * rowWeight)\n', ...
import os import re import fnmatch from logfetch_base import log, is_in_date_range from termcolor import colored def find_cached_logs(args): matching_logs = [] log_fn_match = get_matcher(args) for filename in os.listdir(args.dest): if fnmatch.fnmatch(filename, log_fn_match) and in_date_range(args, ...
[ "re.findall", "os.listdir", "fnmatch.fnmatch" ]
[((222, 243), 'os.listdir', 'os.listdir', (['args.dest'], {}), '(args.dest)\n', (232, 243), False, 'import os\n'), ((700, 733), 're.findall', 're.findall', (['"""-\\\\d{13}-"""', 'filename'], {}), "('-\\\\d{13}-', filename)\n", (710, 733), False, 'import re\n'), ((256, 295), 'fnmatch.fnmatch', 'fnmatch.fnmatch', (['fil...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ## # @file predict_bw_lstm1.py # @author <NAME> (<NAME> <<EMAIL>> # @date 2019-04-22 # 2022-03-23 - updated for TensorFlow version 2.6 # # @brief Predict channel bandwidth. # # @remarks This code is based on the nice sample code from: # ht...
[ "tensorflow.keras.Sequential", "tensorflow.keras.layers.LSTM", "tensorflow.keras.layers.Dense", "numpy.load", "skimage.util.view_as_windows" ]
[((594, 619), 'numpy.load', 'np.load', (['"""bandwidths.npy"""'], {}), "('bandwidths.npy')\n", (601, 619), True, 'import numpy as np\n'), ((885, 906), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {}), '()\n', (904, 906), True, 'import tensorflow as tf\n'), ((624, 655), 'skimage.util.view_as_windows', 'vie...
from src.use_cases.todo import create_todo, update_todo def test_create_todo(client, user): payload = { 'title': 'test todo', 'description': 'very long and useful description', } todo = create_todo(user.id, payload) assert todo.id == 1 assert todo.title == payload['title'] def t...
[ "src.use_cases.todo.update_todo", "src.use_cases.todo.create_todo" ]
[((216, 245), 'src.use_cases.todo.create_todo', 'create_todo', (['user.id', 'payload'], {}), '(user.id, payload)\n', (227, 245), False, 'from src.use_cases.todo import create_todo, update_todo\n'), ((466, 495), 'src.use_cases.todo.update_todo', 'update_todo', (['todo_id', 'payload'], {}), '(todo_id, payload)\n', (477, ...
#!/usr/bin/env python """Exposes functions to perform a source-to-source transformation that detects and unrolls loops in the code being analyzed. """ """See the LICENSE file, located in the root directory of the source distribution and at http://verifun.eecs.berkeley.edu/gametime/about/LICENSE, for details on the Ga...
[ "os.path.join", "subprocess.call" ]
[((1313, 1363), 'os.path.join', 'os.path.join', (['sourceDir', '"""ocaml/conf/findlib.conf"""'], {}), "(sourceDir, 'ocaml/conf/findlib.conf')\n", (1325, 1363), False, 'import os\n'), ((1584, 1620), 'os.path.join', 'os.path.join', (['sourceDir', '"""ocaml/lib"""'], {}), "(sourceDir, 'ocaml/lib')\n", (1596, 1620), False,...
from Main import main, __version__ as ESVersion from argparse import Namespace import random from tkinter import Checkbutton, OptionMenu, Tk, LEFT, RIGHT, BOTTOM, TOP, StringVar, IntVar, Frame, Label, W, E, Entry, Spinbox, Button, filedialog, messagebox def guiMain(args=None): mainWindow = Tk() mainWindow.wm...
[ "tkinter.IntVar", "random.randint", "tkinter.Checkbutton", "tkinter.Entry", "tkinter.Button", "tkinter.StringVar", "tkinter.Tk", "tkinter.Spinbox", "tkinter.Label", "tkinter.OptionMenu", "tkinter.messagebox.showinfo", "tkinter.Frame", "Main.main", "tkinter.filedialog.askopenfilename" ]
[((298, 302), 'tkinter.Tk', 'Tk', ([], {}), '()\n', (300, 302), False, 'from tkinter import Checkbutton, OptionMenu, Tk, LEFT, RIGHT, BOTTOM, TOP, StringVar, IntVar, Frame, Label, W, E, Entry, Spinbox, Button, filedialog, messagebox\n'), ((378, 395), 'tkinter.Frame', 'Frame', (['mainWindow'], {}), '(mainWindow)\n', (38...
from datetime import datetime from pprint import pprint from cryptography.fernet import Fernet from libsvc.utils import pack_data, unpack_data def pack_data_test(): fkey = Fernet.generate_key() data = {"today": datetime.today(), "dog": "cat", "red": "blue"} p = pack_data(data, f...
[ "cryptography.fernet.Fernet.generate_key", "libsvc.utils.pack_data", "datetime.datetime.fromisoformat", "datetime.datetime.today", "libsvc.utils.unpack_data", "pprint.pprint" ]
[((179, 200), 'cryptography.fernet.Fernet.generate_key', 'Fernet.generate_key', ([], {}), '()\n', (198, 200), False, 'from cryptography.fernet import Fernet\n'), ((303, 349), 'libsvc.utils.pack_data', 'pack_data', (['data', 'fkey'], {'fields': "['today', 'dog']"}), "(data, fkey, fields=['today', 'dog'])\n", (312, 349),...
#!/usr/bin/env python3 # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import logging from ckan.lib.helpers import lang as ckan_lang from ckan.model import Package from ckan.plugins import PluginImplementations, toolkit from ckanext.doi.interfaces import I...
[ "logging.getLogger", "ckan.plugins.toolkit.config.get", "ckanext.doi.lib.helpers.package_get_year", "ckan.lib.helpers.lang", "ckan.model.Package.get_license_register", "ckanext.doi.lib.xml_utils.create_contributor", "ckanext.doi.lib.errors.DOIMetadataException", "ckan.plugins.PluginImplementations", ...
[((506, 533), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (523, 533), False, 'import logging\n'), ((6424, 6451), 'ckan.plugins.PluginImplementations', 'PluginImplementations', (['IDoi'], {}), '(IDoi)\n', (6445, 6451), False, 'from ckan.plugins import PluginImplementations, toolkit\n'),...
# -*- coding: utf-8 -*- from model.movie import Movie from model.user import User from fixture.selenium_fixture import app def test_add_movie(app): app.session.login(User.Admin()) old_list = app.movie.get_movie_list() app.movie.add_movie(Movie(film_name='name', film_year='2016')) new_list = app.movie....
[ "model.user.User.Admin", "fixture.selenium_fixture.app.movie.check_field_in_add_form", "model.movie.Movie", "fixture.selenium_fixture.app.movie.get_movie_list", "fixture.selenium_fixture.app.session.logout" ]
[((201, 227), 'fixture.selenium_fixture.app.movie.get_movie_list', 'app.movie.get_movie_list', ([], {}), '()\n', (225, 227), False, 'from fixture.selenium_fixture import app\n'), ((310, 336), 'fixture.selenium_fixture.app.movie.get_movie_list', 'app.movie.get_movie_list', ([], {}), '()\n', (334, 336), False, 'from fixt...
# Argument handling import argparse parser = argparse.ArgumentParser() parser.add_argument("-r", "--run", action="store_true", help="Start the learning process") parser.add_argument("-m", "--memories", type=int, default=100, help="Number of runs of demonstration data to...
[ "misc.run_human", "argparse.ArgumentParser", "DQN_DUEL.DQN_DUEL", "tensorflow.logging.set_verbosity", "DQN.DQN", "Simulation.forest_fire.ForestFire", "DQN_BOTH.DQN_BOTH", "DQN_SARSA.DQN_SARSA" ]
[((47, 72), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (70, 72), False, 'import argparse\n'), ((1282, 1324), 'tensorflow.logging.set_verbosity', 'tf.logging.set_verbosity', (['tf.logging.ERROR'], {}), '(tf.logging.ERROR)\n', (1306, 1324), True, 'import tensorflow as tf\n'), ((1415, 1427), '...
# author: <NAME>, <NAME> # title: occasionally trivial support functions for aggregating data for python 2/3 [only numpy as dependency] # NOTE: these functions are generally tested meant for 1D although they may apply or be easily extended to nd # license: 3-clause BSD import numpy as np flat_max = np.max flat_min = ...
[ "numpy.abs", "numpy.argpartition", "numpy.asarray", "numpy.argmax", "numpy.argmin" ]
[((1057, 1073), 'numpy.asarray', 'np.asarray', (['data'], {}), '(data)\n', (1067, 1073), True, 'import numpy as np\n'), ((1089, 1101), 'numpy.abs', 'np.abs', (['data'], {}), '(data)\n', (1095, 1101), True, 'import numpy as np\n'), ((2024, 2040), 'numpy.asarray', 'np.asarray', (['data'], {}), '(data)\n', (2034, 2040), T...
#!/usr/bin/env python from __future__ import print_function import roslib roslib.load_manifest('begineer_tutorial') import sys import rospy import cv2 import numpy as np from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init_...
[ "rospy.init_node", "cv2.inRange", "cv2.bitwise_and", "roslib.load_manifest", "cv_bridge.CvBridge", "numpy.array", "cv2.imshow", "cv2.destroyAllWindows", "rospy.spin", "cv2.cvtColor", "rospy.Subscriber" ]
[((75, 116), 'roslib.load_manifest', 'roslib.load_manifest', (['"""begineer_tutorial"""'], {}), "('begineer_tutorial')\n", (95, 116), False, 'import roslib\n'), ((1035, 1085), 'rospy.init_node', 'rospy.init_node', (['"""image_converter"""'], {'anonymous': '(True)'}), "('image_converter', anonymous=True)\n", (1050, 1085...
import os from pathlib import Path ABS_PATH_OF_TOP_LEVEL_DIR = os.path.abspath(os.path.dirname(Path(__file__)))
[ "pathlib.Path" ]
[((96, 110), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (100, 110), False, 'from pathlib import Path\n')]
from django.db import models # Create your models here. class Case(models.Model): name = models.CharField(max_length =100) email = models.EmailField(max_length=100, unique=True) message = models.CharField(max_length=500, blank=True) created_at = models.DateTimeField(auto_now_add=True)
[ "django.db.models.DateTimeField", "django.db.models.EmailField", "django.db.models.CharField" ]
[((94, 126), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (110, 126), False, 'from django.db import models\n'), ((137, 183), 'django.db.models.EmailField', 'models.EmailField', ([], {'max_length': '(100)', 'unique': '(True)'}), '(max_length=100, unique=True)\n',...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestCont...
[ "django.contrib.auth.forms.PasswordChangeForm", "django.core.urlresolvers.reverse" ]
[((3509, 3547), 'django.contrib.auth.forms.PasswordChangeForm', 'PasswordChangeForm', (['user', 'request.POST'], {}), '(user, request.POST)\n', (3527, 3547), False, 'from django.contrib.auth.forms import PasswordResetForm, PasswordChangeForm, AdminPasswordChangeForm\n'), ((2457, 2478), 'django.core.urlresolvers.reverse...
# spaCyをインポートし、日本語のnlpオブジェクトを作成 import spacy nlp = spacy.blank("ja") # テキストを処理 doc = nlp("私はツリーカンガルーとイッカクが好きです。") # 「ツリーカンガルー」のスライスを選択 tree_kangaroos = doc[2:4] print(tree_kangaroos.text) # 「ツリーカンガルーとイッカク」のスライスを選択 tree_kangaroos_and_narwhals = doc[2:6] print(tree_kangaroos_and_narwhals.text)
[ "spacy.blank" ]
[((52, 69), 'spacy.blank', 'spacy.blank', (['"""ja"""'], {}), "('ja')\n", (63, 69), False, 'import spacy\n')]
import numpy import numbers import math import struct from six.moves import zip from .. import SetIntersectionIndexBase, SearchResults, EmptySearchResults def _check_numpy (): missing = [] for fn in ("zeros", "empty", "digitize", "resize", "concatenate", "unique", "bincount", "argsort"): if not getatt...
[ "numpy.digitize", "math.log", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.empty", "numpy.concatenate", "struct.Struct", "numpy.bincount", "six.moves.zip" ]
[((844, 875), 'numpy.empty', 'numpy.empty', (['(64)'], {'dtype': '"""object"""'}), "(64, dtype='object')\n", (855, 875), False, 'import numpy\n'), ((2111, 2141), 'numpy.digitize', 'numpy.digitize', (['[set_bits]', 'sz'], {}), '([set_bits], sz)\n', (2125, 2141), False, 'import numpy\n'), ((2239, 2272), 'numpy.digitize',...
""" Programs scraper """ import re import src.scrape.util.helpers as helpers import src.settings as settings from src.logger import get_logger _LOG = get_logger("programs_scraper") def programs(): """ Scrapes list of programs :return: List, of program codes """ _LOG.debug("scraping list of progra...
[ "src.scrape.util.helpers.get_soup", "src.logger.get_logger", "re.compile" ]
[((151, 181), 'src.logger.get_logger', 'get_logger', (['"""programs_scraper"""'], {}), "('programs_scraper')\n", (161, 181), False, 'from src.logger import get_logger\n'), ((442, 463), 'src.scrape.util.helpers.get_soup', 'helpers.get_soup', (['url'], {}), '(url)\n', (458, 463), True, 'import src.scrape.util.helpers as ...
import numpy as np from myutils import * from easydict import EasyDict as edict def dcg_at_k(r, k, method=1): r = np.asfarray(r)[:k] if r.size: if method == 0: return r[0] + np.sum(r[1:] / np.log2(np.arange(2, r.size + 1))) elif method == 1: return np.sum(r / np.log2(np....
[ "numpy.asfarray", "easydict.EasyDict", "numpy.array", "numpy.arange" ]
[((920, 927), 'easydict.EasyDict', 'edict', ([], {}), '()\n', (925, 927), True, 'from easydict import EasyDict as edict\n'), ((6127, 6200), 'easydict.EasyDict', 'edict', ([], {'avg_groups_ETV': 'avg_groups_ETV', 'groups_ETV_scores': 'groups_ETV_scores'}), '(avg_groups_ETV=avg_groups_ETV, groups_ETV_scores=groups_ETV_sc...
import numpy as np #Simulater Setting #------------------------------ MINUTES=60000000000 TIMESTEP = np.timedelta64(10*MINUTES) PICKUPTIMEWINDOW = np.timedelta64(10*MINUTES) #It can enable the neighbor car search system to determine the search range according to the set search distance and the size of the grid. #It u...
[ "numpy.timedelta64" ]
[((102, 130), 'numpy.timedelta64', 'np.timedelta64', (['(10 * MINUTES)'], {}), '(10 * MINUTES)\n', (116, 130), True, 'import numpy as np\n'), ((148, 176), 'numpy.timedelta64', 'np.timedelta64', (['(10 * MINUTES)'], {}), '(10 * MINUTES)\n', (162, 176), True, 'import numpy as np\n')]
from helpers import create_connection, execute_query connection = create_connection( "postgres", "postgres", "admin", "127.0.0.1", "5432" ) create_database_query = "CREATE DATABASE ekatte" execute_query(connection, create_database_query) connection = create_connection( "ekatte", "postgres", "admin", "127.0.0...
[ "helpers.create_connection", "helpers.execute_query" ]
[((67, 138), 'helpers.create_connection', 'create_connection', (['"""postgres"""', '"""postgres"""', '"""admin"""', '"""127.0.0.1"""', '"""5432"""'], {}), "('postgres', 'postgres', 'admin', '127.0.0.1', '5432')\n", (84, 138), False, 'from helpers import create_connection, execute_query\n'), ((195, 243), 'helpers.execut...
# -*- coding: utf-8 -*- """ This module contains the tool of Events """ import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() version = '0.2' long_description = ( read('README.txt') + '\n' + 'Change history\n' ...
[ "os.path.dirname", "setuptools.find_packages" ]
[((1328, 1363), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['ez_setup']"}), "(exclude=['ez_setup'])\n", (1341, 1363), False, 'from setuptools import setup, find_packages\n'), ((175, 200), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (190, 200), False, 'import os\n')]
from django.contrib import admin from app.models import * from app.admin.tip import ReadingTipAdmin from app.admin.user import UserAdmin # Register your models here. admin.site.register(User, UserAdmin) admin.site.register(ReadingTip, ReadingTipAdmin)
[ "django.contrib.admin.site.register" ]
[((168, 204), 'django.contrib.admin.site.register', 'admin.site.register', (['User', 'UserAdmin'], {}), '(User, UserAdmin)\n', (187, 204), False, 'from django.contrib import admin\n'), ((205, 253), 'django.contrib.admin.site.register', 'admin.site.register', (['ReadingTip', 'ReadingTipAdmin'], {}), '(ReadingTip, Readin...
# %% [markdown] # # How to define a scikit-learn pipeline and visualize it # %% [markdown] # The goal of keeping this notebook is to: # - make it available for users that want to reproduce it locally # - archive the script in the event we want to rerecord this video with an # update in the UI of scikit-learn in a f...
[ "pandas.read_csv", "sklearn.preprocessing.OneHotEncoder", "sklearn.model_selection.cross_validate", "sklearn.set_config", "sklearn.linear_model.LogisticRegression", "sklearn.preprocessing.StandardScaler", "sklearn.impute.SimpleImputer", "sklearn.compose.ColumnTransformer" ]
[((534, 592), 'pandas.read_csv', 'pd.read_csv', (['"""../datasets/house_prices.csv"""'], {'na_values': '"""?"""'}), "('../datasets/house_prices.csv', na_values='?')\n", (545, 592), True, 'import pandas as pd\n'), ((1496, 1534), 'sklearn.preprocessing.OneHotEncoder', 'OneHotEncoder', ([], {'handle_unknown': '"""ignore""...
from nltk.corpus import wordnet as wn import json from pyinflect import getAllInflections, getInflection import re import inflect import urllib.parse from SPARQLWrapper import SPARQLWrapper, JSON from urllib.parse import quote from py_thesaurus import Thesaurus import sys, getopt WN_NOUN = 'n' WN_VERB = 'v' WN_ADJECTI...
[ "getopt.getopt", "pyinflect.getAllInflections", "SPARQLWrapper.SPARQLWrapper", "re.match", "inflect.engine", "sys.exit", "json.load", "re.sub", "nltk.corpus.wordnet.synsets", "json.dump" ]
[((514, 544), 'nltk.corpus.wordnet.synsets', 'wn.synsets', (['verb_word'], {'pos': '"""v"""'}), "(verb_word, pos='v')\n", (524, 544), True, 'from nltk.corpus import wordnet as wn\n'), ((1681, 1711), 'nltk.corpus.wordnet.synsets', 'wn.synsets', (['word'], {'pos': 'from_pos'}), '(word, pos=from_pos)\n', (1691, 1711), Tru...
# https://www.youtube.com/watch?v=bf_UOFFaHiY # http://www.trex-game.skipser.com/ from PIL import ImageGrab, ImageOps import pyautogui import time from numpy import * class Cordinates(): replayBtn = (962, 530) dinosaur = (664, 536) # dinaosaur standing # dinosaur = (686, 548) # dinosaur down #730= x co...
[ "PIL.ImageGrab.grab", "pyautogui.keyDown", "time.sleep", "pyautogui.click", "PIL.ImageOps.grayscale", "pyautogui.keyUp" ]
[((393, 430), 'pyautogui.click', 'pyautogui.click', (['Cordinates.replayBtn'], {}), '(Cordinates.replayBtn)\n', (408, 430), False, 'import pyautogui\n'), ((516, 542), 'pyautogui.keyDown', 'pyautogui.keyDown', (['"""space"""'], {}), "('space')\n", (533, 542), False, 'import pyautogui\n'), ((565, 581), 'time.sleep', 'tim...
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from mixbox import entities from mixbox import fields import cybox.bindings.win_event_object as win_event_binding from cybox.objects.win_handle_object import WinHandle from cybox.common import ObjectProperties, Str...
[ "mixbox.fields.TypedField" ]
[((603, 636), 'mixbox.fields.TypedField', 'fields.TypedField', (['"""Name"""', 'String'], {}), "('Name', String)\n", (620, 636), False, 'from mixbox import fields\n'), ((650, 688), 'mixbox.fields.TypedField', 'fields.TypedField', (['"""Handle"""', 'WinHandle'], {}), "('Handle', WinHandle)\n", (667, 688), False, 'from m...
# coding=utf-8 """This module, nexus_db.py, defines a basic started database for the Nexus Server.""" import pika import json import time from scripts.docker.wait_for_rabbit_host import WaitForRabbitMQHost from libraries.database_abstraction.sql.sqlite import sqlite_db from libraries.database_abstraction.sql.sqlite i...
[ "libraries.database_abstraction.sql.sqlite.sqlite_db.SQLiteDB", "libraries.database_abstraction.sql.sqlite.table_abstraction.TableAbstraction" ]
[((496, 543), 'libraries.database_abstraction.sql.sqlite.sqlite_db.SQLiteDB', 'sqlite_db.SQLiteDB', (['"""/v/db.sqlite"""', '(False)', '(True)'], {}), "('/v/db.sqlite', False, True)\n", (514, 543), False, 'from libraries.database_abstraction.sql.sqlite import sqlite_db\n'), ((557, 605), 'libraries.database_abstraction....
import itertools import asyncio from async_timeout import timeout from functools import partial from youtube_dl import YoutubeDL from discord.ext import commands from discord import Embed, FFmpegPCMAudio, HTTPException, PCMVolumeTransformer, Color ytdlopts = { 'format': 'bestaudio/best', 'extractaudio': True, ...
[ "discord.ext.commands.Cog.listener", "discord.FFmpegPCMAudio", "asyncio.Queue", "async_timeout.timeout", "asyncio.Event", "youtube_dl.YoutubeDL", "functools.partial", "asyncio.get_event_loop", "discord.Embed", "discord.ext.commands.command" ]
[((842, 861), 'youtube_dl.YoutubeDL', 'YoutubeDL', (['ytdlopts'], {}), '(ytdlopts)\n', (851, 861), False, 'from youtube_dl import YoutubeDL\n'), ((4694, 4717), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (4715, 4717), False, 'from discord.ext import commands\n'), ((5833, 5969), 'disc...
#!/usr/bin/env python import os import pickle import json import argparse from collections import defaultdict import tensorflow as tf import numpy as np import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('path', help="Tf path to event files from which to extract variables") parse...
[ "os.path.exists", "pickle.dump", "argparse.ArgumentParser", "os.makedirs", "json.dump", "tensorflow.compat.v1.train.summary_iterator", "os.walk", "matplotlib.pyplot.plot", "os.path.join", "os.path.isfile", "os.path.isdir", "collections.defaultdict", "matplotlib.pyplot.legend", "matplotlib....
[((198, 223), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (221, 223), False, 'import argparse\n'), ((780, 805), 'os.path.isfile', 'os.path.isfile', (['args.path'], {}), '(args.path)\n', (794, 805), False, 'import os\n'), ((1302, 1319), 'collections.defaultdict', 'defaultdict', (['list'], {})...
# TestSwiftPrivateDeclName.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org...
[ "unittest2.main", "atexit.register", "os.getcwd", "lldbsuite.test.lldbutil.check_variable", "lldbsuite.test.lldbutil.get_threads_stopped_at_breakpoint", "lldbsuite.test.decorators.expectedFailureAll", "lldb.SBDebugger.Initialize", "lldb.SBFileSpec" ]
[((1037, 1095), 'lldbsuite.test.decorators.expectedFailureAll', 'decorators.expectedFailureAll', ([], {'bugnumber': '"""rdar://23236790"""'}), "(bugnumber='rdar://23236790')\n", (1066, 1095), True, 'import lldbsuite.test.decorators as decorators\n'), ((3497, 3525), 'lldb.SBDebugger.Initialize', 'lldb.SBDebugger.Initial...
import subprocess def Settings( **kwargs ): flags = [ '-x', 'c++', '-Wall', '-Wextra', '-Wno-unused-parameter', '-std=c++14', '-I', '.', '-I', 'third_party/googletest/googletest/include', '-I', 'third_party/abseil-cpp', '-I', 'third_party/libbcf', '-pthread', ] ...
[ "subprocess.check_output" ]
[((329, 386), 'subprocess.check_output', 'subprocess.check_output', (["['ncursesw5-config', '--cflags']"], {}), "(['ncursesw5-config', '--cflags'])\n", (352, 386), False, 'import subprocess\n')]
""" Modeling Relational Data with Graph Convolutional Networks Paper: https://arxiv.org/abs/1703.06103 Code: https://github.com/tkipf/relational-gcn Difference compared to tkipf/relation-gcn * l2norm applied to all weights * remove nodes that won't be touched """ import argparse import numpy as np import time import ...
[ "argparse.ArgumentParser", "dgl.nn.pytorch.RelGraphConv", "torch.from_numpy", "dgl.contrib.data.load_data", "torch.cuda.synchronize", "torch.cuda.is_available", "functools.partial", "dgl.DGLGraph", "torch.nn.functional.cross_entropy", "time.time", "torch.cuda.set_device", "torch.arange" ]
[((1468, 1539), 'dgl.contrib.data.load_data', 'load_data', (['args.dataset'], {'bfs_level': 'args.bfs_level', 'relabel': 'args.relabel'}), '(args.dataset, bfs_level=args.bfs_level, relabel=args.relabel)\n', (1477, 1539), False, 'from dgl.contrib.data import load_data\n'), ((2023, 2046), 'torch.arange', 'torch.arange', ...
import subprocess from hop import Stream from hop.auth import Auth from hop import auth from hop.io import StartPosition from hop.models import GCNCircular import argparse import random import threading import time from functools import wraps import datetime import numpy import uuid from dotenv import load_dotenv impor...
[ "os.getenv", "datetime.datetime.utcnow", "subprocess.Popen", "time.monotonic", "threading.Lock", "numpy.random.exponential", "functools.wraps", "dotenv.load_dotenv", "hop.Stream", "uuid.uuid4", "threading.Thread", "time.time", "random.randint" ]
[((774, 810), 'dotenv.load_dotenv', 'load_dotenv', ([], {'dotenv_path': '"""./../.env"""'}), "(dotenv_path='./../.env')\n", (785, 810), False, 'from dotenv import load_dotenv\n'), ((981, 990), 'functools.wraps', 'wraps', (['fn'], {}), '(fn)\n', (986, 990), False, 'from functools import wraps\n'), ((1905, 1935), 'numpy....
from collections import deque def list_manipulator(numbers, *args): numbers = deque(numbers) action = args[0] direction = args[1] if action == 'add': parameters = [int(x) for x in args[2:]] if direction == 'beginning': [numbers.appendleft(x) for x in parameters[::-1]] ...
[ "collections.deque" ]
[((84, 98), 'collections.deque', 'deque', (['numbers'], {}), '(numbers)\n', (89, 98), False, 'from collections import deque\n')]
from django.urls import reverse from ..links.document_file_links import ( link_document_file_delete, link_document_file_download_quick ) from ..links.favorite_links import ( link_document_favorites_add, link_document_favorites_remove ) from ..links.trashed_document_links import link_document_restore from ..mod...
[ "django.urls.reverse" ]
[((5501, 5605), 'django.urls.reverse', 'reverse', ([], {'viewname': 'link_document_file_download_quick.view', 'args': '(self.test_document.file_latest.pk,)'}), '(viewname=link_document_file_download_quick.view, args=(self.\n test_document.file_latest.pk,))\n', (5508, 5605), False, 'from django.urls import reverse\n'...
# Copyright The IETF Trust 2013-2020, All Rights Reserved # -*- coding: utf-8 -*- from email.message import EmailMessage from textwrap import dedent from traceback import format_exception, extract_tb from django.conf import settings from django.core.management.base import BaseCommand from ietf.utils.mail import send...
[ "textwrap.dedent", "traceback.format_exception", "ietf.utils.mail.send_smtp", "email.message.EmailMessage", "traceback.extract_tb" ]
[((1716, 1779), 'textwrap.dedent', 'dedent', (['""" An exception occurred: \n \n {error}\n """'], {}), '(""" An exception occurred: \n \n {error}\n """)\n', (1722, 1779), False, 'from textwrap import dedent\n'), ((2880, 2894), 'email.message.EmailMessage', 'EmailMessage', ([], {}), '()\n', (2892...
from antlr4 import * from antlr4.error.ErrorListener import ErrorListener from antlr.SBHasmLexer import SBHasmLexer from antlr.SBHasmListener import SBHasmListener from antlr.SBHasmParser import SBHasmParser class MyErrorListener(ErrorListener): def __init__(self): super(MyErrorListener, self).__init__(...
[ "antlr.SBHasmLexer.SBHasmLexer", "antlr.SBHasmParser.SBHasmParser" ]
[((1735, 1761), 'antlr.SBHasmLexer.SBHasmLexer', 'SBHasmLexer', (['source_stream'], {}), '(source_stream)\n', (1746, 1761), False, 'from antlr.SBHasmLexer import SBHasmLexer\n'), ((1821, 1841), 'antlr.SBHasmParser.SBHasmParser', 'SBHasmParser', (['stream'], {}), '(stream)\n', (1833, 1841), False, 'from antlr.SBHasmPars...
import logging from tools.EventGeneration import convert_date, generate_random_time, generate_random_node_id logger = logging.getLogger(__name__.split('.')[-1]) from features.ResponseTypeFeature import ResponseTypeFeature from features.ReplayTimeSeriesFeature import ReplayTimeSeriesFeature import tools.Cache as Cach...
[ "pandas.DataFrame", "features.ReplayTimeSeriesFeature.ReplayTimeSeriesFeature", "random.seed", "features.ResponseTypeFeature.ResponseTypeFeature", "tools.EventGeneration.generate_random_time", "warnings.simplefilter", "random.random", "tools.EventGeneration.generate_random_node_id" ]
[((423, 479), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'SparseEfficiencyWarning'], {}), "('ignore', SparseEfficiencyWarning)\n", (444, 479), False, 'import warnings\n'), ((481, 498), 'random.seed', 'random.seed', (['(1234)'], {}), '(1234)\n', (492, 498), False, 'import random\n'), ((2301, 231...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'xml/alert.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s):...
[ "PyQt4.QtCore.QMetaObject.connectSlotsByName", "PyQt4.QtGui.QLabel", "PyQt4.QtGui.QPushButton", "PyQt4.QtGui.QVBoxLayout", "PyQt4.QtGui.QApplication.translate", "PyQt4.QtGui.QHBoxLayout", "PyQt4.QtGui.QSpacerItem" ]
[((451, 515), 'PyQt4.QtGui.QApplication.translate', 'QtGui.QApplication.translate', (['context', 'text', 'disambig', '_encoding'], {}), '(context, text, disambig, _encoding)\n', (479, 515), False, 'from PyQt4 import QtCore, QtGui\n'), ((976, 1001), 'PyQt4.QtGui.QVBoxLayout', 'QtGui.QVBoxLayout', (['Dialog'], {}), '(Dia...