code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from abc import ABC, abstractmethod import numpy as np from .activations import Identity class Layer(ABC): def __init__(self, size, input_shape=(None, None)): ''' Params ------ size : int number of neurons (size) of output layer input_shape : (int, ...
[ "numpy.sqrt", "numpy.dot", "numpy.random.randn" ]
[((2107, 2129), 'numpy.dot', 'np.dot', (['self.W', 'self.X'], {}), '(self.W, self.X)\n', (2113, 2129), True, 'import numpy as np\n'), ((1633, 1667), 'numpy.random.randn', 'np.random.randn', (['self.OUT', 'self.IN'], {}), '(self.OUT, self.IN)\n', (1648, 1667), True, 'import numpy as np\n'), ((1670, 1703), 'numpy.sqrt', ...
from transliterate import translit from parameterized import parameterized from cinemanio.core.tests.base import BaseTestCase class TranslitTest(BaseTestCase): @parameterized.expand([ ('Ирония судьбы, или с легким паром!', "Ironiya sudby, ili s legkim parom!"), ('<NAME>', '<NAME>'), ('<NA...
[ "transliterate.translit", "parameterized.parameterized.expand" ]
[((168, 501), 'parameterized.parameterized.expand', 'parameterized.expand', (["[('Ирония судьбы, или с легким паром!',\n 'Ironiya sudby, ili s legkim parom!'), ('<NAME>', '<NAME>'), ('<NAME>',\n '<NAME>'), ('<NAME>', '<NAME>'), ('Илья', 'Ilya'), ('<NAME>', '<NAME>'),\n ('<NAME>', '<NAME>'), ('<NAME>', '<NAME>'...
__copyright__ = """ Copyright (c) 2018 Uber Technologies, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
[ "pickle.dump", "multiprocessing.Array", "pickle.load", "math.log", "numpy.random.RandomState" ]
[((1518, 1562), 'multiprocessing.Array', 'multiprocessing.Array', (['ctypes.c_float', 'count'], {}), '(ctypes.c_float, count)\n', (1539, 1562), False, 'import ctypes, multiprocessing\n'), ((1960, 1975), 'pickle.load', 'pickle.load', (['fh'], {}), '(fh)\n', (1971, 1975), False, 'import pickle\n'), ((2320, 2347), 'pickle...
import pandas as pd if __name__ == '__main__': target_file = '/home/jarto/work/wine-quality-predictor/b87fe6d2-ab92-4d36-8946-111850523f12/AutoML(1):wine-quality.log' with open(target_file, 'r') as file_h: content = file_h.readlines() preprocessors = [] regressors = [] rescalers = [] ...
[ "pandas.DataFrame" ]
[((769, 867), 'pandas.DataFrame', 'pd.DataFrame', (["{'preprocessor': preprocessors, 'regressor': regressors, 'rescaling': rescalers\n }"], {}), "({'preprocessor': preprocessors, 'regressor': regressors,\n 'rescaling': rescalers})\n", (781, 867), True, 'import pandas as pd\n')]
from pprint import pprint import asyncio import netdev import yaml r1 = { "device_type": "cisco_ios", "host": "192.168.100.1", "username": "cisco", "password": "<PASSWORD>", "secret": "cisco", } async def send_show(device, commands): result = {} if type(commands) == str: command...
[ "netdev.create", "pprint.pprint" ]
[((796, 821), 'pprint.pprint', 'pprint', (['output'], {'width': '(120)'}), '(output, width=120)\n', (802, 821), False, 'from pprint import pprint\n'), ((363, 386), 'netdev.create', 'netdev.create', ([], {}), '(**device)\n', (376, 386), False, 'import netdev\n')]
from flask import session from werkzeug.security import generate_password_hash from . import database USERNAME_MAX_LEN = 15 EMAIL_MAX_LEN = 320 PASSWORD_MAX_LEN = 100 DEFAULT_RATING = 1000 MIN_RATING = 1 MAX_RATING = 3000 PUBLIC_USER_ID = 0 DRAW_USER_ID = 0 USER_SESSION = 'user_id' def get_data_by_id(userid, field...
[ "flask.session.clear", "werkzeug.security.generate_password_hash", "flask.session.get" ]
[((2508, 2523), 'flask.session.clear', 'session.clear', ([], {}), '()\n', (2521, 2523), False, 'from flask import session\n'), ((1186, 1211), 'flask.session.get', 'session.get', (['USER_SESSION'], {}), '(USER_SESSION)\n', (1197, 1211), False, 'from flask import session\n'), ((1485, 1517), 'werkzeug.security.generate_pa...
# Copyright 2020 Petuum, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ "logging.getLogger", "kubernetes_asyncio.client.CustomObjectsApi", "logging.basicConfig", "aiohttp.web.run_app", "kubernetes_asyncio.watch.Watch", "aiohttp.web.put", "aiohttp.web.Response", "aiohttp.web.Application", "adaptdl_sched.config.get_supervisor_port", "kubernetes_asyncio.client.CoreV1Api"...
[((784, 811), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (801, 811), False, 'import logging\n'), ((3885, 3906), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (3904, 3906), False, 'import logging\n'), ((3911, 3952), 'kubernetes_asyncio.config.load_incluster_config', '...
import django import os import sys sys.path.append("/home/ubuntu/edtech-backend") os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'superteacher.settings') django.setup() from exams.models import Exam from subjects.models import Subject from chapters.models import Chapter from questions.models import QuestionChapterMa...
[ "os.environ.setdefault", "django.setup", "chapters.models.Chapter.objects.filter", "questions.models.QuestionChapterMapping.objects.filter", "subjects.models.Subject.objects.filter", "exams.models.Exam.objects.get", "sys.path.append" ]
[((36, 82), 'sys.path.append', 'sys.path.append', (['"""/home/ubuntu/edtech-backend"""'], {}), "('/home/ubuntu/edtech-backend')\n", (51, 82), False, 'import sys\n'), ((83, 155), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""superteacher.settings"""'], {}), "('DJANGO_SETTINGS_MO...
import os import metricbeat import unittest import time class Test(metricbeat.BaseTest): COMPOSE_SERVICES = ['logstash'] FIELDS = ['logstash'] @unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test") def test_node(self): """ logstash node metricset test """ ...
[ "unittest.skipUnless" ]
[((160, 229), 'unittest.skipUnless', 'unittest.skipUnless', (['metricbeat.INTEGRATION_TESTS', '"""integration test"""'], {}), "(metricbeat.INTEGRATION_TESTS, 'integration test')\n", (179, 229), False, 'import unittest\n'), ((416, 485), 'unittest.skipUnless', 'unittest.skipUnless', (['metricbeat.INTEGRATION_TESTS', '"""...
import base64 import json import os from BeautifulSoup import BeautifulSoup import requests import local_settings import utils NATIONAL_BRACKET = ('http://games.espn.com/tournament-challenge-bracket/' '2017/en/entry?entryID=115703') HTML_FILENAME = os.path.join( local_settings.YEAR, base...
[ "os.path.exists", "utils.prepare_directory", "base64.b64encode", "requests.get", "BeautifulSoup.BeautifulSoup", "json.dump" ]
[((1204, 1231), 'BeautifulSoup.BeautifulSoup', 'BeautifulSoup', (['bracket_html'], {}), '(bracket_html)\n', (1217, 1231), False, 'from BeautifulSoup import BeautifulSoup\n'), ((1778, 1822), 'utils.prepare_directory', 'utils.prepare_directory', (['local_settings.YEAR'], {}), '(local_settings.YEAR)\n', (1801, 1822), Fals...
import csv from flask import ( Blueprint, flash, redirect, render_template, request, url_for ) bp = Blueprint('catalogue', __name__) @bp.route('/getCategories', methods=['GET']) def index(): # Returns all the categories present in excel sheet if request.method == 'POST': return "the method is pos...
[ "flask.Blueprint" ]
[((105, 137), 'flask.Blueprint', 'Blueprint', (['"""catalogue"""', '__name__'], {}), "('catalogue', __name__)\n", (114, 137), False, 'from flask import Blueprint, flash, redirect, render_template, request, url_for\n')]
# -*- coding: utf-8 -*- from copy import copy from re import compile, escape from templex.exceptions import KeyNotFound, MustUseString import difflib import sys if sys.version_info[0] == 3: unicode = str def escape_to_regex(text): escaped = r"" for character in text: if character == r" ": ...
[ "re.compile", "re.escape", "templex.exceptions.MustUseString", "copy.copy" ]
[((475, 487), 're.escape', 'escape', (['"""}}"""'], {}), "('}}')\n", (481, 487), False, 'from re import compile, escape\n'), ((1203, 1213), 'copy.copy', 'copy', (['self'], {}), '(self)\n', (1207, 1213), False, 'from copy import copy\n'), ((379, 396), 're.escape', 'escape', (['character'], {}), '(character)\n', (385, 39...
import mysql.connector from asyncore import read from PyQt5 import uic from PyQt5 import QtWidgets from numpy import save from reportlab.pdfgen import canvas c = 0 # Conectando com o banco de dados con = mysql.connector.connect( host='localhost', database='cadastro_estoque', user='andre2', password='<PASSWORD>')...
[ "PyQt5.uic.loadUi", "PyQt5.QtWidgets.QApplication", "reportlab.pdfgen.canvas.Canvas" ]
[((6145, 6171), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['[]'], {}), '([])\n', (6167, 6171), False, 'from PyQt5 import QtWidgets\n'), ((6185, 6275), 'PyQt5.uic.loadUi', 'uic.loadUi', (['"""/home/andre/Área de Trabalho/Estudos/Cadastro-de-Produtos/formulario.ui"""'], {}), "(\n '/home/andre/Área de ...
import json import os import sys import re import numpy as np from Preprocess import processed_answer from subquestions import filter_Questions def most_frequent(List): counter = 4 num = None for i in List: curr_frequency = List.count(i) if(curr_frequency> counter): ...
[ "json.load", "Preprocess.processed_answer", "subquestions.filter_Questions", "json.dump" ]
[((1377, 1442), 'subquestions.filter_Questions', 'filter_Questions', (['write_unanswerable_path', 'write_subquestion_path'], {}), '(write_unanswerable_path, write_subquestion_path)\n', (1393, 1442), False, 'from subquestions import filter_Questions\n'), ((523, 543), 'json.load', 'json.load', (['json_file'], {}), '(json...
import unittest from kivy3.loaders import OBJLoader class OBJLoaderTest(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
[ "unittest.main" ]
[((134, 149), 'unittest.main', 'unittest.main', ([], {}), '()\n', (147, 149), False, 'import unittest\n')]
import ast import json import os import signal import sys import zmq from tasks import * context = zmq.Context() receiver = context.socket(zmq.PULL) receiver.bind('tcp://127.0.0.1:5588') # Socket to send messages to sender = context.socket(zmq.PUSH) sender.connect("tcp://127.0.0.1:5589") # todo: clean kill- wait unt...
[ "signal.signal", "zmq.Context", "sys.exit" ]
[((100, 113), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (111, 113), False, 'import zmq\n'), ((389, 426), 'signal.signal', 'signal.signal', (['signum', 'signal.SIG_IGN'], {}), '(signum, signal.SIG_IGN)\n', (402, 426), False, 'import signal\n'), ((459, 470), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (467, 470...
#!/usr/bin/env python3 # Test libLF.Regex's for SL behavior using the vuln-regex-detector suite. # This analysis can run single-node many-core. # Import libLF import os import sys import re sys.path.append(os.path.join(os.environ['ECOSYSTEM_REGEXP_PROJECT_ROOT'], 'lib')) import libLF import json import tempfile impor...
[ "argparse.ArgumentParser", "libLF.parallel.map", "os.path.join", "libLF.Regex", "libLF.SLRegexAnalysis", "libLF.log", "traceback.print_exc" ]
[((6098, 6239), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Test a set of libLF.Regex\'s for SL behavior. Regexes are tested in every supported language."""'}), '(description=\n "Test a set of libLF.Regex\'s for SL behavior. Regexes are tested in every supported language."\n )\n...
import random import glob import torch from torch import nn import numpy as np from torch.nn import init import torch.optim as optim import torch.nn.functional as F from torch.nn import Parameter as P from torchvision import transforms, set_image_backend # set_image_backend('accimage') from models.pytorch_biggan.dat...
[ "numpy.product", "torch.nn.ReLU", "torch.from_numpy", "torch.nn.init.orthogonal_", "torch.sum", "torch.conv2d", "torch.mean", "torch.nn.Flatten", "torch.nn.init.xavier_uniform_", "numpy.linspace", "torchvision.transforms.ToTensor", "random.randint", "glob.glob", "torch.abs", "random.choi...
[((641, 666), 'torch.transpose', 'torch.transpose', (['Sx', '(1)', '(0)'], {}), '(Sx, 1, 0)\n', (656, 666), False, 'import torch\n'), ((894, 945), 'pytorch_pretrained_biggan.one_hot_from_names', 'one_hot_from_names', (["['vase']"], {'batch_size': 'batch_size'}), "(['vase'], batch_size=batch_size)\n", (912, 945), False,...
from django.contrib import admin from chat_users.models import ChatUser # Register your models here. admin.site.register(ChatUser)
[ "django.contrib.admin.site.register" ]
[((102, 131), 'django.contrib.admin.site.register', 'admin.site.register', (['ChatUser'], {}), '(ChatUser)\n', (121, 131), False, 'from django.contrib import admin\n')]
import pytest from newsreadercli import NewsScraper from newsreadercli import Article def test_web_scraper(): scraper = NewsScraper() test_page = open("tests/test_data/vnexpress-test.html", 'r', encoding='utf-8') scraper.page_scrape(None, test_page.read()) for article in scraper.articles_cu...
[ "newsreadercli.NewsScraper" ]
[((131, 144), 'newsreadercli.NewsScraper', 'NewsScraper', ([], {}), '()\n', (142, 144), False, 'from newsreadercli import NewsScraper\n')]
#!/usr/bin/python3 import aioros from rospy_tutorials.srv import AddTwoInts from rospy_tutorials.srv import AddTwoIntsResponse async def setup(nh: aioros.NodeHandle): await nh.create_service( 'add_two_ints', AddTwoInts, lambda request: AddTwoIntsResponse(request.a + request.b)) if __na...
[ "aioros.run_forever", "rospy_tutorials.srv.AddTwoIntsResponse" ]
[((344, 392), 'aioros.run_forever', 'aioros.run_forever', (['setup', '"""add_two_ints_server"""'], {}), "(setup, 'add_two_ints_server')\n", (362, 392), False, 'import aioros\n'), ((268, 309), 'rospy_tutorials.srv.AddTwoIntsResponse', 'AddTwoIntsResponse', (['(request.a + request.b)'], {}), '(request.a + request.b)\n', ...
# # Licensed Materials - Property of IBM # # (c) Copyright IBM Corp. 2016 # import unittest, sys import ibm_db import config from testfunctions import IbmDbTestFunctions class Wrapper(str): def __del__(self): print("Wrapper(" + self + ") being deleted") class IbmDbTestCase(unittest.TestCase): def test_31...
[ "ibm_db.connect", "ibm_db.autocommit", "ibm_db.prepare", "ibm_db.bind_param", "ibm_db.execute", "testfunctions.IbmDbTestFunctions", "ibm_db.rollback" ]
[((360, 380), 'testfunctions.IbmDbTestFunctions', 'IbmDbTestFunctions', ([], {}), '()\n', (378, 380), False, 'from testfunctions import IbmDbTestFunctions\n'), ((462, 523), 'ibm_db.connect', 'ibm_db.connect', (['config.database', 'config.user', 'config.password'], {}), '(config.database, config.user, config.password)\n...
#!/usr/bin/python3 import math import numpy as np import pdb import time import torch from mseg_semantic.domain_generalization.ccsa_utils import ( contrastive_loss, paired_euclidean_distance, downsample_label_map, sample_pair_indices, find_matching_pairs, remove_pairs_from_same_domain, get_merged_pair_embeddi...
[ "mseg_semantic.domain_generalization.ccsa_utils.sample_pair_indices", "math.sqrt", "mseg_semantic.domain_generalization.ccsa_utils.pytorch_random_choice", "numpy.array", "torch.arange", "mseg_semantic.domain_generalization.ccsa_utils.paired_euclidean_distance", "torch.unique", "mseg_semantic.domain_ge...
[((854, 914), 'torch.tensor', 'torch.tensor', (['[1.0, 0.0, 0.0, 0.0, 1.0]'], {'dtype': 'torch.float32'}), '([1.0, 0.0, 0.0, 0.0, 1.0], dtype=torch.float32)\n', (866, 914), False, 'import torch\n'), ((959, 1015), 'torch.tensor', 'torch.tensor', (['[0, 1.1, 1.1, 1.1, 0]'], {'dtype': 'torch.float32'}), '([0, 1.1, 1.1, 1....
# coding=utf-8 # Copyright 2014-2017 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ "f5_openstack_agent.lbaasv2.drivers.bigip.exceptions.PoolDeleteException", "f5_openstack_agent.lbaasv2.drivers.bigip.exceptions.MonitorDeleteException", "f5_openstack_agent.lbaasv2.drivers.bigip.exceptions.VirtualServerUpdateException", "f5_openstack_agent.lbaasv2.drivers.bigip.exceptions.PoolCreationExceptio...
[((1254, 1281), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1271, 1281), True, 'from oslo_log import log as logging\n'), ((1655, 1776), 'f5_openstack_agent.lbaasv2.drivers.bigip.listener_service.ListenerServiceBuilder', 'listener_service.ListenerServiceBuilder', (['self', 'self.s...
import cherrypy from gspread import CellNotFound from python_utility.spreadsheet.simple_spreadsheet import SimpleSpreadsheet class SpreadsheetService: @staticmethod def read_status() -> str: try: from python_utility.build import Build except ImportError: # TODO: Unders...
[ "cherrypy.tools.json_in", "python_utility.spreadsheet.simple_spreadsheet.SimpleSpreadsheet", "cherrypy.tools.json_out" ]
[((757, 782), 'cherrypy.tools.json_out', 'cherrypy.tools.json_out', ([], {}), '()\n', (780, 782), False, 'import cherrypy\n'), ((788, 812), 'cherrypy.tools.json_in', 'cherrypy.tools.json_in', ([], {}), '()\n', (810, 812), False, 'import cherrypy\n'), ((1282, 1301), 'python_utility.spreadsheet.simple_spreadsheet.SimpleS...
from src.modeling import util import numpy as np from dskc import dskc_modeling def test(model): x_test, y_test, _ = util.read_test_data() # predict y_pred = model.predict(x_test) # clean y_pred = np.asarray([x[0] for x in y_pred]) # evaluate report = dskc_modeling.EvaluationReport(y_te...
[ "dskc.dskc_modeling.EvaluationReport", "numpy.array", "src.modeling.util.read_test_data", "numpy.asarray" ]
[((123, 144), 'src.modeling.util.read_test_data', 'util.read_test_data', ([], {}), '()\n', (142, 144), False, 'from src.modeling import util\n'), ((221, 255), 'numpy.asarray', 'np.asarray', (['[x[0] for x in y_pred]'], {}), '([x[0] for x in y_pred])\n', (231, 255), True, 'import numpy as np\n'), ((285, 354), 'dskc.dskc...
# added specifically to make floating point division apply to code in bar position calculation from __future__ import division import libtcodpy as libtcod import xp_loader import gzip from vec2d import Vec2d from model.attribute import AttributeTag from ui.frame import Frame from ui.ui_event import UIEvent, UIEventT...
[ "vec2d.Vec2d", "xp_loader.get_position_key_xy", "gzip.open", "libtcodpy.console_set_default_foreground", "libtcodpy.console_set_default_background", "xp_loader.load_layer_to_console", "libtcodpy.console_clear", "libtcodpy.console_blit", "libtcodpy.console_set_alignment", "libtcodpy.console_put_cha...
[((577, 626), 'gzip.open', 'gzip.open', (['"""assets\\\\ui\\\\ui_frame_libraries_bg.xp"""'], {}), "('assets\\\\ui\\\\ui_frame_libraries_bg.xp')\n", (586, 626), False, 'import gzip\n'), ((694, 822), 'ui.frame.Frame.__init__', 'Frame.__init__', (['self', 'root_console_width', 'root_console_height', "self.bg_data['width']...
from random import choice TRID_CSET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' def gen_trid(length=12): return ''.join(choice(TRID_CSET) for _i in range(length))
[ "random.choice" ]
[((151, 168), 'random.choice', 'choice', (['TRID_CSET'], {}), '(TRID_CSET)\n', (157, 168), False, 'from random import choice\n')]
""" Derived from keras-yolo3 train.py (https://github.com/qqwweee/keras-yolo3), with additions from https://github.com/AntonMu/TrainYourOwnYOLO. """ import os import sys import argparse import pickle import numpy as np import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model fr...
[ "yolo3.model.preprocess_true_boxes", "numpy.array", "yolo3.model.yolo_body", "numpy.random.seed", "keras.callbacks.EarlyStopping", "keras.backend.clear_session", "keras.models.Model", "keras.optimizers.Adam", "keras.callbacks.ReduceLROnPlateau", "os.path.dirname", "yolo3.utils.get_random_data", ...
[((1060, 1108), 'os.path.join', 'os.path.join', (['EXPORT_DIR', '"""yolo_annotations.txt"""'], {}), "(EXPORT_DIR, 'yolo_annotations.txt')\n", (1072, 1108), False, 'import os\n'), ((1182, 1223), 'os.path.join', 'os.path.join', (['EXPORT_DIR', '"""classes.names"""'], {}), "(EXPORT_DIR, 'classes.names')\n", (1194, 1223), ...
#!/usr/bin/env python3 # # 2020 February 15 - <NAME> # # I dedicate any and all copyright interest in this software to the # public domain. I make this dedication for the benefit of the public at # large and to the detriment of my heirs and successors. I intend this # dedication to be an overt act of relinquishmen...
[ "json.dumps", "yaml.load", "argparse.ArgumentParser", "pathlib.Path" ]
[((627, 675), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__prgdesc__'}), '(description=__prgdesc__)\n', (650, 675), False, 'import argparse\n'), ((1265, 1314), 'json.dumps', 'json.dumps', (['(data or {})'], {'indent': '(4)', 'sort_keys': '(False)'}), '(data or {}, indent=4, sort_keys=Fa...
import pandas as pd import csv import numpy as np def parse_val(val): '''Parse string value and change it to appropriate type to be manipulated by RuleSet functions Accepted formats: "false" and "true" case insensitive, 'nan', '', "*", string representation of pandas.Interval ''' if val == '' or va...
[ "pandas.Interval", "csv.DictReader" ]
[((2329, 2369), 'pandas.Interval', 'pd.Interval', (['left_val', 'right_val', 'closed'], {}), '(left_val, right_val, closed)\n', (2340, 2369), True, 'import pandas as pd\n'), ((2648, 2672), 'csv.DictReader', 'csv.DictReader', (['csv_file'], {}), '(csv_file)\n', (2662, 2672), False, 'import csv\n')]
from django.urls import path from .views import * urlpatterns = [ path('',homepage,name='home'), path('services/',services, name='services'), path('masters/',masters, name='masters'), path('register/',register_page,name='register'), path('login/',login_page, name='login'), path('master_detail/<...
[ "django.urls.path" ]
[((71, 102), 'django.urls.path', 'path', (['""""""', 'homepage'], {'name': '"""home"""'}), "('', homepage, name='home')\n", (75, 102), False, 'from django.urls import path\n'), ((106, 150), 'django.urls.path', 'path', (['"""services/"""', 'services'], {'name': '"""services"""'}), "('services/', services, name='services...
#!/usr/bin/env python ''' Created by Seria at 02/11/2018 3:38 PM Email: <EMAIL> _ooOoo_ o888888888o o88`_ . _`88o (| 0 0 |) O \ 。 / O _____/`-----‘\_____ .’ \|| _ _ ||/ `. | _ |...
[ "random.random", "numpy.array", "random.uniform", "numpy.transpose" ]
[((2822, 2850), 'numpy.transpose', 'np.transpose', (['img', '(2, 0, 1)'], {}), '(img, (2, 0, 1))\n', (2834, 2850), True, 'import numpy as np\n'), ((7607, 7679), 'random.uniform', 'rand.uniform', (['self.comburant.brightness[0]', 'self.comburant.brightness[1]'], {}), '(self.comburant.brightness[0], self.comburant.bright...
import obspy import unittest import numpy as np import madpy.checks as ch import madpy.tests.testdata.config as cfg class TestChecks(unittest.TestCase): def test_check_config(self): class Measurements: pass self.assertRaises(AttributeError, ch.check_config, Measurements()) ...
[ "obspy.read", "madpy.checks.check_amplitude", "numpy.arange", "madpy.checks.check_stats", "madpy.checks.check_duration_index", "madpy.checks.check_cc", "obspy.UTCDateTime", "madpy.checks.check_window", "madpy.checks.check_datagaps", "numpy.array", "madpy.checks.check_plottype", "unittest.main"...
[((6909, 6924), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6922, 6924), False, 'import unittest\n'), ((1949, 1979), 'obspy.read', 'obspy.read', (['"""testdata/*.mseed"""'], {}), "('testdata/*.mseed')\n", (1959, 1979), False, 'import obspy\n'), ((2506, 2536), 'obspy.read', 'obspy.read', (['"""testdata/*.mseed"...
import taichi as ti from tests import test_utils @test_utils.test() def test_simplify_bug(): @ti.kernel def foo() -> ti.types.vector(4, dtype=ti.i32): a = ti.Vector([0, 0, 0, 0]) for i in range(5): for k in ti.static(range(4)): if i == 3: a[k] = ...
[ "tests.test_utils.test", "taichi.Vector", "taichi.types.vector" ]
[((52, 69), 'tests.test_utils.test', 'test_utils.test', ([], {}), '()\n', (67, 69), False, 'from tests import test_utils\n'), ((127, 159), 'taichi.types.vector', 'ti.types.vector', (['(4)'], {'dtype': 'ti.i32'}), '(4, dtype=ti.i32)\n', (142, 159), True, 'import taichi as ti\n'), ((173, 196), 'taichi.Vector', 'ti.Vector...
import torch import torch.nn as nn from model.fpn import * from model.backbone.shufflenetv2 import * class Detector(nn.Module): def __init__(self, classes, anchor_num, load_param): super(Detector, self).__init__() out_depth = 72 stage_out_channels = [-1, 24, 48, 96, 192] self.back...
[ "torch.nn.Conv2d", "torch.rand", "torch.onnx.export" ]
[((1351, 1377), 'torch.rand', 'torch.rand', (['(1)', '(3)', '(352)', '(352)'], {}), '(1, 3, 352, 352)\n', (1361, 1377), False, 'import torch\n'), ((1382, 1498), 'torch.onnx.export', 'torch.onnx.export', (['model', 'test_data', '"""test.onnx"""'], {'export_params': '(True)', 'opset_version': '(11)', 'do_constant_folding...
#!/usr/bin/env python3 import pytest from tools import play samples = [ (9, 25, 32), (10, 1618, 8317), (13, 7999, 146373), (17, 1104, 2764), (21, 6111, 54718), (30, 5807, 37305), ] def ids(t): return '{} players {} points max. score {}'.format(*t) @pytest.fixture(params=samples, ...
[ "pytest.fixture", "tools.play" ]
[((289, 328), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'samples', 'ids': 'ids'}), '(params=samples, ids=ids)\n', (303, 328), False, 'import pytest\n'), ((452, 477), 'tools.play', 'play', (['num_players', 'points'], {}), '(num_players, points)\n', (456, 477), False, 'from tools import play\n')]
from sklearn.metrics import roc_auc_score, f1_score, accuracy_score import scipy import numpy as np import pandas as pd from pyarc.qcba import * from pyarc.algorithms import createCARs, top_rules from pyarc import TransactionDB from pyids import IDS from pyids.ids_cacher import IDSCacher from pyids.ids_ruleset impo...
[ "pyids.ids_classifier.IDSOneVsAll" ]
[((573, 586), 'pyids.ids_classifier.IDSOneVsAll', 'IDSOneVsAll', ([], {}), '()\n', (584, 586), False, 'from pyids.ids_classifier import IDSOneVsAll\n')]
""" Plot gas, tar, char, water, and water vapor from primary and secondary reactions based on Blasi / Chan / Liden kinetic schemes for biomass pyrolysis. This combined scheme is referred to as the Cpc 2016 kinetic scheme. A similar scheme but without water reaction was proposed in Papadikis 2010 paper. References: Bla...
[ "matplotlib.pyplot.grid", "numpy.ones", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "numpy.exp", "numpy.linspace", "matplotlib.pyplot.figure", "numpy.zeros", "matplotlib.pyplot.ion", "matplotlib.pyplot.legend" ]
[((913, 948), 'numpy.linspace', 'np.linspace', (['(0)', 'tmax'], {'num': '(tmax / dt)'}), '(0, tmax, num=tmax / dt)\n', (924, 948), True, 'import numpy as np\n'), ((4914, 4926), 'numpy.zeros', 'np.zeros', (['nt'], {}), '(nt)\n', (4922, 4926), True, 'import numpy as np\n'), ((4971, 4983), 'numpy.zeros', 'np.zeros', (['n...
from pathlib import Path from boucanpy.core import logger from boucanpy.cli.base import BaseCommand from boucanpy.db.models import models class DbTruncate(BaseCommand): name = "db-truncate" aliases = ["truncate"] description = "truncate db" add_log_level = True add_debug = True @classmethod ...
[ "boucanpy.db.models.models.items", "boucanpy.core.logger.warning" ]
[((601, 615), 'boucanpy.db.models.models.items', 'models.items', ([], {}), '()\n', (613, 615), False, 'from boucanpy.db.models import models\n'), ((999, 1067), 'boucanpy.core.logger.warning', 'logger.warning', (['"""run@db_truncate.py - You must confirm to drop data"""'], {}), "('run@db_truncate.py - You must confirm t...
import random from bit_vector import BitVector import fault import common from fault.actions import Poke, Expect, Eval, Step, Print from fault.array import Array from fault.vector_builder import VectorBuilder def test_tester_basic(): circ = common.TestBasicCircuit builder = VectorBuilder(circ) builder.pro...
[ "fault.vector_builder.VectorBuilder", "fault.actions.Eval", "fault.actions.Print", "bit_vector.BitVector", "fault.array.Array", "fault.actions.Step", "random.randint" ]
[((285, 304), 'fault.vector_builder.VectorBuilder', 'VectorBuilder', (['circ'], {}), '(circ)\n', (298, 304), False, 'from fault.vector_builder import VectorBuilder\n'), ((716, 735), 'fault.vector_builder.VectorBuilder', 'VectorBuilder', (['circ'], {}), '(circ)\n', (729, 735), False, 'from fault.vector_builder import Ve...
import os path = '' if not path: eixt(1) for root, dirs, files in os.walk(path): for f in files: if f == 'readme.md': src = os.path.join(root, f) # print(src) dst = os.path.join(root, 'README.md') os.rename(src, dst)
[ "os.rename", "os.path.join", "os.walk" ]
[((73, 86), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (80, 86), False, 'import os\n'), ((155, 176), 'os.path.join', 'os.path.join', (['root', 'f'], {}), '(root, f)\n', (167, 176), False, 'import os\n'), ((220, 251), 'os.path.join', 'os.path.join', (['root', '"""README.md"""'], {}), "(root, 'README.md')\n", (232...
import mysql.connector from utils.dataIO import dataIO db_cfg = dataIO.load_json("data/mysql.config.json") db = mysql.connector.connect(host=db_cfg["host"], autocommit=True, user=db_cfg["user"], password=db_cfg["pass"], database=db_cfg["db"]) dbc = db.cursor() def sanitize(val): retu...
[ "utils.dataIO.dataIO.load_json" ]
[((65, 107), 'utils.dataIO.dataIO.load_json', 'dataIO.load_json', (['"""data/mysql.config.json"""'], {}), "('data/mysql.config.json')\n", (81, 107), False, 'from utils.dataIO import dataIO\n')]
# Generated by Django 3.0 on 2020-04-02 13:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0024_auto_20200330_1441'), ] operations = [ migrations.AddField( model_name='socialmedia', name='order', ...
[ "django.db.models.IntegerField" ]
[((337, 466), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'blank': '(True)', 'help_text': '"""The order to display the links in, if any"""', 'null': '(True)', 'verbose_name': '"""order"""'}), "(blank=True, help_text=\n 'The order to display the links in, if any', null=True, verbose_name=\n 'orde...
from components.base.ecu.types.impl_ecu_simple import SimpleECU from components.base.ecu.software.ecu_software import ECUSoftware from components.security.ecu.software.impl_app_layer_secure import SecureApplicationLayer from layers.impl_comm_module_my_protocol import MyProtocolCommModule class MyProtocolECU(SimpleECU)...
[ "components.base.ecu.types.impl_ecu_simple.SimpleECU.__init__", "components.security.ecu.software.impl_app_layer_secure.SecureApplicationLayer", "layers.impl_comm_module_my_protocol.MyProtocolCommModule" ]
[((1163, 1261), 'components.base.ecu.types.impl_ecu_simple.SimpleECU.__init__', 'SimpleECU.__init__', (['self', 'sim_env', 'ecu_id', 'data_rate', 'size_sending_buffer', 'size_receive_buffer'], {}), '(self, sim_env, ecu_id, data_rate, size_sending_buffer,\n size_receive_buffer)\n', (1181, 1261), False, 'from componen...
from molecules.dna_sequence import DNASequence class Primer: """ Represent a Primer DNA Sequence which can be attached to DNA sequence in order to mark specific segment in the DNA sequence. """ def __init__(self, searched_sequence): """ Initialize Primer sequence. :param ...
[ "molecules.dna_sequence.DNASequence.complement_table.get" ]
[((1137, 1175), 'molecules.dna_sequence.DNASequence.complement_table.get', 'DNASequence.complement_table.get', (['base'], {}), '(base)\n', (1169, 1175), False, 'from molecules.dna_sequence import DNASequence\n')]
# Copyright (c) 2021 Huawei Technologies Co.,Ltd. All rights reserved. # # StratoVirt is licensed under Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan # PSL v2. # You may obtain a copy of Mulan PSL v2 at: # http:#license.coscl.org.cn/MulanPSL2 # THIS SOFTWARE IS PRO...
[ "utils.exception.LoginAuthenticationError", "utils.exception.LoginTimeoutError", "threading.Lock", "utils.exception.LoginProcessTerminatedError", "time.sleep", "utils.utils_logging.TestLog.get_global_log" ]
[((903, 927), 'utils.utils_logging.TestLog.get_global_log', 'TestLog.get_global_log', ([], {}), '()\n', (925, 927), False, 'from utils.utils_logging import TestLog\n'), ((1622, 1638), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (1636, 1638), False, 'import threading\n'), ((4845, 4904), 'utils.exception.LoginA...
from neo4j import GraphDatabase class AddressGraph: def __init__(self, address, password): self.connection = GraphDatabase.driver(address, auth=("neo4j", password)) def write(self, query): with self.connection.session() as session: session.run(query) def read(self, query): with self.connect...
[ "neo4j.GraphDatabase.driver" ]
[((117, 172), 'neo4j.GraphDatabase.driver', 'GraphDatabase.driver', (['address'], {'auth': "('neo4j', password)"}), "(address, auth=('neo4j', password))\n", (137, 172), False, 'from neo4j import GraphDatabase\n')]
from vedacore.misc import build_from_cfg, registry def build_loss(cfg): return build_from_cfg(cfg, registry, 'loss')
[ "vedacore.misc.build_from_cfg" ]
[((85, 122), 'vedacore.misc.build_from_cfg', 'build_from_cfg', (['cfg', 'registry', '"""loss"""'], {}), "(cfg, registry, 'loss')\n", (99, 122), False, 'from vedacore.misc import build_from_cfg, registry\n')]
# Authors: <NAME> <<EMAIL>>, <NAME> <<EMAIL>> # # License: BSD 3 clause import math ######### Linear Models Functions ######### validator = lambda x: max(2, int(x)) predictor = lambda t, m, x: t+m*(x) ######### Perplexity Parameters ######### P_INTERCEPT_STRUCTURAL = -37.360438135651975 P_COEFFICIENT_STRUCTURAL = 8...
[ "math.log" ]
[((510, 533), 'math.log', 'math.log', (['sample_length'], {}), '(sample_length)\n', (518, 533), False, 'import math\n'), ((1970, 1993), 'math.log', 'math.log', (['sample_length'], {}), '(sample_length)\n', (1978, 1993), False, 'import math\n'), ((851, 874), 'math.log', 'math.log', (['sample_length'], {}), '(sample_leng...
#Essential Modules import pandas as pd import numpy as np import matplotlib.pyplot as plt #Dashboard Modules import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import plotly.graph_objects as go from dash.dependencies import Input, Output import da...
[ "dash_core_components.Interval", "collections.deque", "sqlite3.connect", "dash.dependencies.Output", "dash.dependencies.Input", "navbar.Navbar", "dash_core_components.Graph", "pandas.read_sql", "dash_html_components.H4" ]
[((820, 828), 'navbar.Navbar', 'Navbar', ([], {}), '()\n', (826, 828), False, 'from navbar import Navbar\n'), ((837, 866), 'sqlite3.connect', 'sqlite3.connect', (['"""twitter.db"""'], {}), "('twitter.db')\n", (852, 866), False, 'import sqlite3\n'), ((1301, 1317), 'collections.deque', 'deque', ([], {'maxlen': '(20)'}), ...
# 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, ...
[ "googleapiclient.discovery.build" ]
[((1332, 1378), 'googleapiclient.discovery.build', 'build', (['"""sheets"""', '"""v4"""'], {'credentials': 'credentials'}), "('sheets', 'v4', credentials=credentials)\n", (1337, 1378), False, 'from googleapiclient.discovery import build\n')]
from django.urls import include, path from rest_framework.routers import DefaultRouter from pubtrack.pubs.api.views import (AuthorListCreateAPIView, AuthorRUDAPIView, MetaAuthorListCreateAPIView, MetaAuthorR...
[ "pubtrack.pubs.api.views.PublicationRUDAPIView.as_view", "pubtrack.pubs.api.views.AuthorListCreateAPIView.as_view", "pubtrack.pubs.api.views.AuthoringRUDAPIView.as_view", "pubtrack.pubs.api.views.AffiliationListCreateAPIView.as_view", "pubtrack.pubs.api.views.BlacklistingListCreateAPIView.as_view", "pubtr...
[((1271, 1286), 'rest_framework.routers.DefaultRouter', 'DefaultRouter', ([], {}), '()\n', (1284, 1286), False, 'from rest_framework.routers import DefaultRouter\n'), ((1448, 1481), 'pubtrack.pubs.api.views.AuthorListCreateAPIView.as_view', 'AuthorListCreateAPIView.as_view', ([], {}), '()\n', (1479, 1481), False, 'from...
''' original implementation credit: https://github.com/openai/baselines heavily adapted to suit our needs. ''' import argparse import tempfile import os.path as osp import gym import logging from tqdm import tqdm import tensorflow as tf import numpy as np import os import sys import glob file_path = os.path.dirnam...
[ "sys.path.insert", "matplotlib.pyplot.ylabel", "tensorflow.reduce_mean", "numpy.arange", "contrib.baselines.gail.mlp_policy.MlpPolicy", "os.path.exists", "contrib.baselines.common.set_global_seeds", "matplotlib.pyplot.style.use", "matplotlib.pyplot.close", "contrib.baselines.common.tf_util.flatgra...
[((476, 504), 'sys.path.insert', 'sys.path.insert', (['(0)', 'src_path'], {}), '(0, src_path)\n', (491, 504), False, 'import sys\n'), ((322, 348), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (338, 348), False, 'import os\n'), ((377, 411), 'os.path.join', 'os.path.join', (['file_path', 'o...
from __future__ import absolute_import import errno import logging from ..codes import errorcodes from ..util.utils import is_windows, range, get_temp_path, to_bytes, bytes, to_unicode, is_python3, is_callable import struct import sys if is_windows(): # we're going to have to do some ugly things, because Windows su...
[ "ctypes.windll.kernel32.CreateFileW", "struct.calcsize", "logging.getLogger", "logging.StreamHandler", "ctypes.byref", "socket.socket", "logging.Formatter", "ctypes.c_ulong", "struct.pack", "ctypes.create_string_buffer", "fcntl.fcntl", "struct.unpack", "ctypes.windll.kernel32.GetLastError", ...
[((3015, 3127), 'ctypes.windll.kernel32.CreateFileW', 'ctypes.windll.kernel32.CreateFileW', (['pipe_name', '(GENERIC_READ | GENERIC_WRITE)', '(0)', 'None', 'OPEN_EXISTING', '(0)', 'None'], {}), '(pipe_name, GENERIC_READ | GENERIC_WRITE,\n 0, None, OPEN_EXISTING, 0, None)\n', (3049, 3127), False, 'import ctypes\n'), ...
# region HEADER # !/usr/bin/env python __author__ = "<NAME>" __copyright__ = "Copyright 2021, The MUDCake Project" __credits__ = "<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>" __license__ = """MIT License Copyright (c) 2021 MUDCake Project ...
[ "logging.basicConfig", "DungeonPackage.Class.Class", "DungeonPackage.Room.Room", "logging.debug", "DungeonPackage.AccessList.AccessList", "DungeonPackage.ActiveDungeon.ActiveDungeon", "DungeonPackage.DungeonData.DungeonData", "json.dumps", "uuid.uuid4", "DatabaseHandler.DatabaseHandler.DatabaseHan...
[((3144, 3157), 'DungeonPackage.DungeonData.DungeonData', 'DungeonData', ([], {}), '()\n', (3155, 3157), False, 'from DungeonPackage.DungeonData import DungeonData\n'), ((3166, 3225), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stderr', 'level': 'logging.DEBUG'}), '(stream=sys.stderr, level=loggi...
import logging from mmc.mobilitytrace import MobilityTrace class Djcluster (Cluster): def __init__ (self,trialMobilityTraces, speed=0.1): self._trialMobilityTraces = trialMobilityTraces self._speed=speed self._clusters =[] # List of sets of Mobility traces grouped by cluster """ s...
[ "mmc.mobilitytrace.MobilityTrace.spatial_filter", "mmc.mobilitytrace.MobilityTrace.filterSpeed" ]
[((744, 809), 'mmc.mobilitytrace.MobilityTrace.filterSpeed', 'MobilityTrace.filterSpeed', (['self._trialMobilityTraces', 'self._speed'], {}), '(self._trialMobilityTraces, self._speed)\n', (769, 809), False, 'from mmc.mobilitytrace import MobilityTrace\n'), ((930, 970), 'mmc.mobilitytrace.MobilityTrace.spatial_filter', ...
import glob import numpy as np import sys def group_memory_footprint(memory_list, th_size): # group similar consecutive entries in the memory list (ts, size) ts = 0 size_list = [memory_list[0][1]] group_footprint = [] for i in range(1, len(memory_list)): if abs(memory_list[i][1] - memory_li...
[ "numpy.mean", "numpy.array", "numpy.zeros", "numpy.savetxt", "numpy.maximum", "numpy.loadtxt", "glob.glob" ]
[((742, 758), 'numpy.zeros', 'np.zeros', (['(n, 2)'], {}), '((n, 2))\n', (750, 758), True, 'import numpy as np\n'), ((1011, 1039), 'glob.glob', 'glob.glob', (["(sys.argv[1] + '*')"], {}), "(sys.argv[1] + '*')\n", (1020, 1039), False, 'import glob\n'), ((1448, 1499), 'numpy.array', 'np.array', (['[[i[0], i[1] / 1024] fo...
from __future__ import unicode_literals import codecs from collections import namedtuple import sys import six from typing import Union, Optional, List from namedlist import namedlist class CoNLLNode(object): @classmethod def from_line(cls, line): fields = line.split() try: re...
[ "namedlist.namedlist", "codecs.open", "collections.namedtuple", "six.text_type" ]
[((554, 662), 'namedlist.namedlist', 'namedlist', (['"""_"""', "['id_', 'form', 'lemma', 'cpostag', 'postag', 'feats', 'head', 'deprel',\n 'deps', 'misc']"], {}), "('_', ['id_', 'form', 'lemma', 'cpostag', 'postag', 'feats',\n 'head', 'deprel', 'deps', 'misc'])\n", (563, 662), False, 'from namedlist import namedl...
"""Test for hydromt.gis_utils submodule""" import pytest import numpy as np from hydromt import gis_utils as gu from hydromt.raster import full_from_transform, RasterDataArray from rasterio.transform import from_origin def test_crs(): bbox = [3, 51.5, 4, 52] # NL assert gu.utm_crs(bbox).to_epsg() == 32631 ...
[ "hydromt.raster.full_from_transform", "numpy.ones", "rasterio.transform.from_origin", "hydromt.gis_utils.spread2d", "hydromt.gis_utils.parse_crs", "hydromt.gis_utils.filter_gdf", "hydromt.gis_utils.affine_to_coords", "hydromt.raster.RasterDataArray.from_numpy", "hydromt.gis_utils.utm_crs", "numpy....
[((769, 793), 'rasterio.transform.from_origin', 'from_origin', (['(0)', '(90)', '(1)', '(1)'], {}), '(0, 90, 1, 1)\n', (780, 793), False, 'from rasterio.transform import from_origin\n'), ((830, 867), 'hydromt.gis_utils.affine_to_coords', 'gu.affine_to_coords', (['transform', 'shape'], {}), '(transform, shape)\n', (849,...
"""This module scrapes game information from wikipedia lists to compile into a database""" import pandas as pd import pymysql def connectDatabase(): """Create database connection""" global db db = pymysql.connect(host='localhost', user='root', password='', db='vg_dapi', cursorclass...
[ "pandas.read_html", "pymysql.connect", "pandas.concat" ]
[((210, 346), 'pymysql.connect', 'pymysql.connect', ([], {'host': '"""localhost"""', 'user': '"""root"""', 'password': '""""""', 'db': '"""vg_dapi"""', 'cursorclass': 'pymysql.cursors.DictCursor', 'charset': '"""utf8mb4"""'}), "(host='localhost', user='root', password='', db='vg_dapi',\n cursorclass=pymysql.cursors....
from main.save_and_get import Abrufen import config example1 = Abrufen(config.bucket_name, config.subdir4rss, 'example1') example2 = Abrufen(config.bucket_name, config.subdir4rss, 'example2')
[ "main.save_and_get.Abrufen" ]
[((64, 122), 'main.save_and_get.Abrufen', 'Abrufen', (['config.bucket_name', 'config.subdir4rss', '"""example1"""'], {}), "(config.bucket_name, config.subdir4rss, 'example1')\n", (71, 122), False, 'from main.save_and_get import Abrufen\n'), ((134, 192), 'main.save_and_get.Abrufen', 'Abrufen', (['config.bucket_name', 'c...
import pandas as pd import dash from dash.dependencies import Input, Output import plotly.express as px import dash_html_components as html import dash_core_components as dcc import dash_bootstrap_components as dbc # self packages from .data_generator import load_transactions, comparisons_df from .nav_bar import nav_b...
[ "dash_html_components.Table", "dash.dependencies.Output", "dash_html_components.Br", "pandas.DataFrame.from_dict", "dash.dependencies.Input", "dash_html_components.Td", "dash_html_components.Th", "dash_html_components.Div", "dash_html_components.H2", "dash_html_components.H1", "plotly.express.sc...
[((1448, 1562), 'dash.Dash', 'dash.Dash', ([], {'server': 'server', 'routes_pathname_prefix': '"""/transactions/"""', 'external_stylesheets': '[dbc.themes.BOOTSTRAP]'}), "(server=server, routes_pathname_prefix='/transactions/',\n external_stylesheets=[dbc.themes.BOOTSTRAP])\n", (1457, 1562), False, 'import dash\n'),...
import os from AppKit import NSApp, NSImage import vanilla from mojo.UI import CurrentGlyphWindow, UpdateCurrentGlyphView,\ StatusInteractivePopUpWindow from fontParts.world import CurrentGlyph resourcesDirectory = os.path.dirname(__file__) resourcesDirectory = os.path.dirname(resourcesDirectory) resourcesDirector...
[ "vanilla.ImageButton", "AppKit.NSImage.alloc", "os.path.join", "os.path.dirname", "fontParts.world.CurrentGlyph", "mojo.UI.CurrentGlyphWindow", "mojo.UI.UpdateCurrentGlyphView" ]
[((220, 245), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (235, 245), False, 'import os\n'), ((267, 302), 'os.path.dirname', 'os.path.dirname', (['resourcesDirectory'], {}), '(resourcesDirectory)\n', (282, 302), False, 'import os\n'), ((324, 359), 'os.path.dirname', 'os.path.dirname', (['r...
import Winglets import json import math ## Prepare Data dataDict = {} dataArray = [] f = open('./testFile.json', 'r') dataDict = json.loads(f.read()) for curKey in dataDict['dots'].keys(): curArrDictData = dataDict['dots'][curKey] curKeyArr = [] for i in range(len(curArrDictData)): curKeyArr.appe...
[ "Winglets.drawWinglets" ]
[((3293, 3382), 'Winglets.drawWinglets', 'Winglets.drawWinglets', (["dataDict['dots']", "['#d7191c', '#fdae61', '#abdda4', '#2b83ba']"], {}), "(dataDict['dots'], ['#d7191c', '#fdae61', '#abdda4',\n '#2b83ba'])\n", (3314, 3382), False, 'import Winglets\n')]
import unittest from programy.processors.pre.toupper import ToUpperPreProcessor from programy.processors.pre.normalize import NormalizePreProcessor from programy.bot import Bot from programy.brain import Brain from programy.config.brain import BrainConfiguration from programy.config.bot import BotConfiguration class ...
[ "programy.config.brain.BrainConfiguration", "programy.processors.pre.normalize.NormalizePreProcessor", "programy.processors.pre.toupper.ToUpperPreProcessor", "programy.config.bot.BotConfiguration" ]
[((558, 581), 'programy.processors.pre.normalize.NormalizePreProcessor', 'NormalizePreProcessor', ([], {}), '()\n', (579, 581), False, 'from programy.processors.pre.normalize import NormalizePreProcessor\n'), ((740, 761), 'programy.processors.pre.toupper.ToUpperPreProcessor', 'ToUpperPreProcessor', ([], {}), '()\n', (7...
import os import time import datetime import json import threading from consumer import Consumer from kafka import KafkaProducer def test_consumer_receives_objects(kafka_admin_client, postgres_client): (db, db_cur) = postgres_client db_cur.execute("DELETE FROM website_status;") db.commit() kafka_ad...
[ "os.getenv", "time.sleep", "consumer.Consumer", "datetime.datetime.now", "threading.Thread" ]
[((374, 384), 'consumer.Consumer', 'Consumer', ([], {}), '()\n', (382, 384), False, 'from consumer import Consumer\n'), ((624, 664), 'threading.Thread', 'threading.Thread', ([], {'target': 'launch_consumer'}), '(target=launch_consumer)\n', (640, 664), False, 'import threading\n'), ((691, 704), 'time.sleep', 'time.sleep...
from mock import call from nose.tools import eq_, raises from simian import patch from simian.test.my_package import internal_module from simian.test.my_package import external_module def test_patch_with_multiple_arguments(): @patch( module=internal_module, external=( 'simian.test.my_p...
[ "nose.tools.eq_", "mock.call.internal_fn_b", "simian.test.my_package.internal_module.my_fn", "mock.call.internal_fn_a", "simian.patch", "nose.tools.raises", "mock.call.external_fn_b", "mock.call.external_fn_a" ]
[((781, 801), 'nose.tools.raises', 'raises', (['RuntimeError'], {}), '(RuntimeError)\n', (787, 801), False, 'from nose.tools import eq_, raises\n'), ((2140, 2160), 'nose.tools.raises', 'raises', (['RuntimeError'], {}), '(RuntimeError)\n', (2146, 2160), False, 'from nose.tools import eq_, raises\n'), ((4252, 4272), 'nos...
# # Shell methods. # import os from os import path import shutil from shutil import make_archive from zipfile import ZipFile def main(): # Duplicate of an existing file if path.exists("myFile.txt"): # get the path to the file in the current directory src = path.realpath("myFile.txt"); # #...
[ "os.path.exists", "shutil.make_archive", "zipfile.ZipFile", "os.rename", "os.path.split", "os.path.realpath", "shutil.copy", "shutil.copystat" ]
[((182, 207), 'os.path.exists', 'path.exists', (['"""myFile.txt"""'], {}), "('myFile.txt')\n", (193, 207), False, 'from os import path\n'), ((275, 302), 'os.path.realpath', 'path.realpath', (['"""myFile.txt"""'], {}), "('myFile.txt')\n", (288, 302), False, 'from os import path\n'), ((458, 479), 'shutil.copy', 'shutil.c...
# 应用脚本 import os from webapp import create_app from dotenv import load_dotenv dotenv_path = os.path.join(os.path.dirname(__file__), '.env') if os.path.exists(dotenv_path): load_dotenv(dotenv_path) app = create_app(os.getenv("APP_CONFIG") or "production")
[ "os.path.dirname", "os.path.exists", "os.getenv", "dotenv.load_dotenv" ]
[((144, 171), 'os.path.exists', 'os.path.exists', (['dotenv_path'], {}), '(dotenv_path)\n', (158, 171), False, 'import os\n'), ((106, 131), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (121, 131), False, 'import os\n'), ((177, 201), 'dotenv.load_dotenv', 'load_dotenv', (['dotenv_path'], {})...
from s1.parsers import S1Parser def test_integration_tha(tha_lines, tha_encounter): parser = S1Parser() for line in tha_lines: parser.feed(line) parser.finish() records = parser.flush() assert len(records) == 1 assert records[0].as_dict() == tha_encounter
[ "s1.parsers.S1Parser" ]
[((99, 109), 's1.parsers.S1Parser', 'S1Parser', ([], {}), '()\n', (107, 109), False, 'from s1.parsers import S1Parser\n')]
# -*- coding: UTF-8 -*- import os import matplotlib.pyplot as plt import numpy as np from PIL import Image def show_images(name): folders = {"A", "b", "c", "d", "e", "f", "g", "h", "i", "j"} images = [] for folder in folders: findInFolder = "output/notMNIST_large/" + folder + "/" + name i...
[ "matplotlib.pyplot.imshow", "os.path.exists", "os.listdir", "PIL.Image.open", "PIL.Image._show", "numpy.asarray", "os.remove", "matplotlib.pyplot.show" ]
[((397, 415), 'numpy.asarray', 'np.asarray', (['images'], {}), '(images)\n', (407, 415), True, 'import numpy as np\n'), ((451, 467), 'PIL.Image.open', 'Image.open', (['path'], {}), '(path)\n', (461, 467), False, 'from PIL import Image\n'), ((472, 490), 'PIL.Image._show', 'Image._show', (['image'], {}), '(image)\n', (48...
from sqlalchemy import Column, String, Integer, Date, literal try: from db.driver import Base, Session, engine except ModuleNotFoundError: from puzzle.db.driver import Base, Session, engine class SolutionModel: def __init__(self, **kwargs): Base.metadata.create_all(engine) self.session = ...
[ "puzzle.db.driver.Session", "puzzle.db.driver.Base.metadata.create_all", "sqlalchemy.Column", "sqlalchemy.literal" ]
[((1066, 1099), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (1072, 1099), False, 'from sqlalchemy import Column, String, Integer, Date, literal\n'), ((1111, 1126), 'sqlalchemy.Column', 'Column', (['Integer'], {}), '(Integer)\n', (1117, 1126), False, 'from sq...
#!/usr/bin/env python import io import json from copy import deepcopy from on_demand_eval.pipeline import Pipeline, Action, ACTION_TYPE, Table, EfficientTable from on_demand_eval.pipeline import ActionEncoder, ActionDecoder from on_demand_eval.rule_dg import RuleDependencyGraph from on_demand_eval.flow_space import F...
[ "on_demand_eval.pipeline.Action", "on_demand_eval.flow_space.FlowSpace", "json.dumps", "on_demand_eval.pipeline.Pipeline", "copy.deepcopy", "json.load", "json.dump" ]
[((1601, 1631), 'on_demand_eval.pipeline.Pipeline', 'Pipeline', (['self.pipeline.layout'], {}), '(self.pipeline.layout)\n', (1609, 1631), False, 'from on_demand_eval.pipeline import Pipeline, Action, ACTION_TYPE, Table, EfficientTable\n'), ((1003, 1047), 'json.dumps', 'json.dumps', (['self.pipeline'], {'cls': 'ActionEn...
import matplotlib.pyplot as plt import rebalancer from sp500_data_loader import load_data import numpy as np import itertools import os from multiprocessing import Process def interpet_results(assets, rebalance_inv, bah_inv, data, condition, dir): prices = [] for key in data.keys(): prices.append(data...
[ "matplotlib.pyplot.savefig", "os.makedirs", "multiprocessing.Process", "matplotlib.pyplot.clf", "matplotlib.pyplot.plot", "itertools.combinations", "os.path.isfile", "sp500_data_loader.load_data", "os.path.isdir", "rebalancer.simulate", "matplotlib.pyplot.axis", "numpy.shape" ]
[((682, 697), 'matplotlib.pyplot.axis', 'plt.axis', (['"""off"""'], {}), "('off')\n", (690, 697), True, 'import matplotlib.pyplot as plt\n'), ((706, 761), 'matplotlib.pyplot.savefig', 'plt.savefig', (["(dir + assets[0] + '_' + assets[1] + '.png')"], {}), "(dir + assets[0] + '_' + assets[1] + '.png')\n", (717, 761), Tru...
""" =============== GTK Spreadsheet =============== Example of embedding Matplotlib in an application and interacting with a treeview to store data. Double click on an entry to update plot data. """ import gi gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import Gtk, Gdk from m...
[ "gi.repository.Gtk.TreeView", "gi.repository.Gtk.main_quit", "numpy.random.random", "matplotlib.figure.Figure", "gi.repository.Gtk.ListStore", "gi.require_version", "gi.repository.Gtk.Label", "matplotlib.backends.backend_gtk3agg.FigureCanvas", "gi.repository.Gtk.CellRendererText", "gi.repository.G...
[((212, 244), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (230, 244), False, 'import gi\n'), ((245, 277), 'gi.require_version', 'gi.require_version', (['"""Gdk"""', '"""3.0"""'], {}), "('Gdk', '3.0')\n", (263, 277), False, 'import gi\n'), ((2499, 2509), 'gi.reposito...
# coding: utf-8 import cv2 import os,sys import time import os.path import math sys.path.insert(0, '../facealign') sys.path.insert(0, '../util') from fileutil import * from MtcnnPycaffe import MtcnnDetector, draw_and_show from alignment import * from logfile import * import json import argparse def IoU(bbox1, bbo...
[ "MtcnnPycaffe.MtcnnDetector", "os.path.exists", "sys.path.insert", "json.dumps", "os.path.splitext", "os.path.join", "os.path.split", "cv2.imshow", "json.load", "MtcnnPycaffe.draw_and_show", "cv2.waitKey" ]
[((81, 115), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../facealign"""'], {}), "(0, '../facealign')\n", (96, 115), False, 'import os, sys\n'), ((116, 145), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../util"""'], {}), "(0, '../util')\n", (131, 145), False, 'import os, sys\n'), ((4701, 4741), 'MtcnnPyca...
#!/usr/bin/env python3 """Decrypt the data needed for the next level""" import base64 import binascii import hashlib import json import numpy import sys from Crypto.Cipher import AES # x^128 + x^7 + x^2 + x + 1 GCM_POLY = (1 << 128) + (1 << 7) + (1 << 2) + (1 << 1) + (1 << 0) def invert_poly(p): """Invert the gi...
[ "hashlib.sha256", "base64.b64decode", "Crypto.Cipher.AES.new", "sys.exit", "json.load", "binascii.unhexlify" ]
[((2804, 2852), 'binascii.unhexlify', 'binascii.unhexlify', (["jsondata['next_level']['iv']"], {}), "(jsondata['next_level']['iv'])\n", (2822, 2852), False, 'import binascii\n'), ((2860, 2908), 'base64.b64decode', 'base64.b64decode', (["jsondata['next_level']['data']"], {}), "(jsondata['next_level']['data'])\n", (2876,...
def ano(n=0): from datetime import date#ao fazer a importação somente durante a execução da função, vc economiza memoria idade = date.today().year - n if idade >= 18 and idade <= 70: return (f'Com {idade} anos o voto é \033[1:31mOBRIGATORIO\033[m') if idade >= 16 and idade <= 17 or idade >=...
[ "datetime.date.today" ]
[((139, 151), 'datetime.date.today', 'date.today', ([], {}), '()\n', (149, 151), False, 'from datetime import date\n')]
#!/usr/bin/env python3 import time from Message.CANMessage import MessageToCan from Message.EnvironmentStatus import EnvironmentStatus from Message.MotorStatus import MotorStatus from Message.Parameters.Current import Current from Message.Parameters.Humidity import Humidity from Message.Parameters.Vibration import Vibr...
[ "Message.Parameters.Humidity.Humidity", "config.Config.getBusType", "Message.Parameters.Current.Current", "Message.Parameters.RPM.Rpm", "Message.Parameters.WaterTemperature.WaterTemperature", "time.sleep", "Message.Parameters.Vibration.Vibration", "config.Config.getChannel", "Message.Parameters.Volt...
[((765, 779), 'time.sleep', 'time.sleep', (['(20)'], {}), '(20)\n', (775, 779), False, 'import time\n'), ((1025, 1044), 'config.Config.getChannel', 'Config.getChannel', ([], {}), '()\n', (1042, 1044), False, 'from config import Config\n'), ((1307, 1326), 'config.Config.getChannel', 'Config.getChannel', ([], {}), '()\n'...
"""Create a Dash app within a Flask app.""" import os import json import dash import dash_table # from dash_table.Format import Format, Scheme import dash_html_components as html from dash.dependencies import Input, Output import dash_core_components as dcc # from .layout import html_layout from application.utils.es im...
[ "logging.getLogger", "json.loads", "datetime.datetime.utcnow", "dash.dependencies.Output", "os.environ.get", "dash.dependencies.Input", "application.utils.es.connect_es", "dash_table.DataTable", "dash.Dash" ]
[((402, 429), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (419, 429), False, 'import logging\n'), ((445, 487), 'os.environ.get', 'os.environ.get', (['"""ES_ENDPOINT"""', '"""localhost"""'], {}), "('ES_ENDPOINT', 'localhost')\n", (459, 487), False, 'import os\n'), ((502, 535), 'os.envir...
"""Test SSD model.""" import pytest import torch from pytorch_ssd.modeling.model import SSD def test_model_setup(ssd_params): """Test model building.""" model = SSD(**ssd_params) assert model def test_model_forward(ssd_params): """Test model forward method.""" model = SSD(**ssd_params) data...
[ "pytorch_ssd.modeling.model.SSD", "pytest.mark.parametrize", "torch.rand" ]
[((406, 457), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n_predictions"""', '[0, 1, 2]'], {}), "('n_predictions', [0, 1, 2])\n", (429, 457), False, 'import pytest\n'), ((172, 189), 'pytorch_ssd.modeling.model.SSD', 'SSD', ([], {}), '(**ssd_params)\n', (175, 189), False, 'from pytorch_ssd.modeling.model...
import pytest from django.urls import reverse from django.test import override_settings from django.contrib.auth import authenticate @pytest.mark.django_db def test_login(api_client, django_user_model): """Tests the ability to login.""" username = "user" password = "<PASSWORD>" user = django_user_m...
[ "django.test.override_settings", "django.contrib.auth.authenticate", "django.urls.reverse" ]
[((3831, 3872), 'django.test.override_settings', 'override_settings', ([], {'SIGNUP_TIMEOUT_DAYS': '(-1)'}), '(SIGNUP_TIMEOUT_DAYS=-1)\n', (3848, 3872), False, 'from django.test import override_settings\n'), ((423, 452), 'django.urls.reverse', 'reverse', (['"""api:accounts-login"""'], {}), "('api:accounts-login')\n", (...
from rest_framework import viewsets, permissions from messier_objects import serializers, models class MessierViewSet(viewsets.ModelViewSet): """Messier Object API View""" serializer_class = serializers.MessierSerializer queryset = models.MessierObject.objects.all() permission_classes = ( per...
[ "messier_objects.models.MessierObject.objects.all" ]
[((247, 281), 'messier_objects.models.MessierObject.objects.all', 'models.MessierObject.objects.all', ([], {}), '()\n', (279, 281), False, 'from messier_objects import serializers, models\n')]
"""Collection of loss and metric functions and classes. A good overview and collection can be found e.g. here: https://lars76.github.io/neural-networks/object-detection/losses-for-segmentation/ *(the contained code samples are quite instructive but in tensorflow, thus not used here)*. """ # Copyright (c) 2020 Contine...
[ "torch.nn.functional.binary_cross_entropy" ]
[((5210, 5312), 'torch.nn.functional.binary_cross_entropy', 'torch.nn.functional.binary_cross_entropy', (['inputs', 'targets'], {'weight': 'weight', 'reduction': 'self.reduction'}), '(inputs, targets, weight=weight,\n reduction=self.reduction)\n', (5250, 5312), False, 'import torch\n')]
""" A prior can be any distribution in `scipy.stats`. You specify them in YAML as follows: .. code-block:: yaml priors: module: firecrown.priors param1: # here 'norm' is the name of the function/class in scipy.stats kind: norm # any keywors to this function are listd by name #...
[ "copy.deepcopy" ]
[((786, 809), 'copy.deepcopy', 'copy.deepcopy', (['analysis'], {}), '(analysis)\n', (799, 809), False, 'import copy\n')]
import subprocess import os import errno import json import datetime from pymongo import MongoClient import time import logging from dotenv import load_dotenv from timeout import timeout logging_level = logging.DEBUG def get_module_logger(mod_name): """ To use this, do logger = get_module_logger(__name__) ...
[ "logging.getLogger", "logging.StreamHandler", "os.getenv", "datetime.datetime.strptime", "logging.Formatter", "subprocess.run", "dotenv.load_dotenv", "time.time", "pymongo.MongoClient", "os.strerror" ]
[((365, 392), 'logging.getLogger', 'logging.getLogger', (['mod_name'], {}), '(mod_name)\n', (382, 392), False, 'import logging\n'), ((518, 541), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (539, 541), False, 'import logging\n'), ((558, 632), 'logging.Formatter', 'logging.Formatter', (['"""%(asct...
import sqlite3 con = sqlite3.connect("database.db") c = con.cursor() c.execute("UPDATE names SET fname='OSAMA', lname='MOHAMED', age=22, salary=5000 WHERE age=20") con.commit() con.close()
[ "sqlite3.connect" ]
[((21, 51), 'sqlite3.connect', 'sqlite3.connect', (['"""database.db"""'], {}), "('database.db')\n", (36, 51), False, 'import sqlite3\n')]
import cv2 import numpy as np def MaxPooling(_img): img = _img.copy() result = np.zeros_like(img) for i in range(img.shape[0]//8): ind_11 = i * 8 ind_12 = ind_11 + 8 for j in range(img.shape[1]//8): ind_21 = j * 8 ind_22 = ind_21 + 8 result[ind_11...
[ "cv2.imwrite", "numpy.zeros_like", "cv2.imread", "numpy.max" ]
[((618, 641), 'cv2.imread', 'cv2.imread', (['"""imori.jpg"""'], {}), "('imori.jpg')\n", (628, 641), False, 'import cv2\n'), ((668, 703), 'cv2.imwrite', 'cv2.imwrite', (['"""myans_08.jpg"""', 'result'], {}), "('myans_08.jpg', result)\n", (679, 703), False, 'import cv2\n'), ((88, 106), 'numpy.zeros_like', 'np.zeros_like'...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os from pathlib import Path import torchaudio import progressbar import argparse import torch import tqdm def findAllSeqs(dirName, extension='.flac', loadCache=False): r""" Lists all the sequences wit...
[ "argparse.ArgumentParser", "pathlib.Path", "torch.load", "os.path.join", "torchaudio.info", "torch.save", "os.walk" ]
[((891, 931), 'os.path.join', 'os.path.join', (['dirName', '"""_seqs_cache.txt"""'], {}), "(dirName, '_seqs_cache.txt')\n", (903, 931), False, 'import os\n'), ((2612, 2625), 'pathlib.Path', 'Path', (['path_db'], {}), '(path_db)\n', (2616, 2625), False, 'from pathlib import Path\n'), ((3122, 3136), 'pathlib.Path', 'Path...
import click from uumpa_ci_toolbox import common from . import api @click.group() def kubectl(): pass @kubectl.command() @click.option('--version', required=True, help='Kubectl version to install, e.g. "v1.19.0"') @click.option('--target-filename', default='/usr/local/bin/kubectl') @click.option('--with-sudo'...
[ "click.group", "click.option", "uumpa_ci_toolbox.common.cli_success" ]
[((72, 85), 'click.group', 'click.group', ([], {}), '()\n', (83, 85), False, 'import click\n'), ((132, 228), 'click.option', 'click.option', (['"""--version"""'], {'required': '(True)', 'help': '"""Kubectl version to install, e.g. "v1.19.0\\""""'}), '(\'--version\', required=True, help=\n \'Kubectl version to instal...
#!/usr/bin/python # Copyright: (c) 2021, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = r''' --- module: pvc_info short_description: Get expand info ...
[ "ansible.module_utils.basic.AnsibleModule", "ansible_collections.krestomatio.k8s.plugins.module_utils.storage.b_to_gib", "ansible_collections.krestomatio.k8s.plugins.module_utils.storage.recommended_size_gib", "ansible_collections.krestomatio.k8s.plugins.module_utils.storage.below_twenty_pct", "ansible.modu...
[((3372, 3438), 'ansible.module_utils.basic.AnsibleModule', 'AnsibleModule', ([], {'argument_spec': 'module_args', 'supports_check_mode': '(True)'}), '(argument_spec=module_args, supports_check_mode=True)\n', (3385, 3438), False, 'from ansible.module_utils.basic import AnsibleModule\n'), ((4349, 4373), 'ansible_collect...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse from reporter import Reporter if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--orgname", help="Название организации") parser.add_argument("--login", help="Логин на portal.rfc-revizor.ru") parser.add_ar...
[ "argparse.ArgumentParser", "reporter.Reporter" ]
[((137, 162), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (160, 162), False, 'import argparse\n'), ((806, 826), 'reporter.Reporter', 'Reporter', ([], {}), '(**argsdict)\n', (814, 826), False, 'from reporter import Reporter\n')]
# Generated by Django 2.2.1 on 2019-06-02 18:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('daauth', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='permissionsmixin', options={}, ...
[ "django.db.migrations.AlterModelOptions", "django.db.models.ImageField", "django.db.models.CharField" ]
[((223, 288), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""permissionsmixin"""', 'options': '{}'}), "(name='permissionsmixin', options={})\n", (251, 288), False, 'from django.db import migrations, models\n'), ((333, 386), 'django.db.migrations.AlterModelOptions', 'migratio...
""" Render the models from 24 elevation angles, as in thesis NMR Save as an image. 9. 17. 2020 created by <NAME> 9. 19. 2020 ALL RENDER ARE FINISHED WITHOUT TEXTURE Run from anaconda console NOTE: RENDER FROM ORIGINAL SHOULD BE RANGE(360, 0, -15) HERE RANGE(0, 360, 15) SOLUTION: RENAME FILES OR GENERAT...
[ "soft_renderer.SoftRenderer", "soft_renderer.Mesh.from_obj", "os.path.join" ]
[((705, 794), 'os.path.join', 'os.path.join', (['"""/mnt/zhengwen/model_synthesis/SF_temp/data/obj/sphere/sphere_642.obj"""'], {}), "(\n '/mnt/zhengwen/model_synthesis/SF_temp/data/obj/sphere/sphere_642.obj')\n", (717, 794), False, 'import os\n'), ((1133, 1161), 'soft_renderer.Mesh.from_obj', 'sr.Mesh.from_obj', (['...
#! /usr/bin/python __author__="panos" __date__ ="$Jun 29, 2016 6:10:32 PM$" import pika, json import os, threading, time, signal, sys if __name__ == "__main__": def fail(): sys.stdout.write("False") sys.stdout.flush() os._exit(0) threading.Timer(120, fail).start() crede...
[ "json.loads", "threading.Timer", "pika.ConnectionParameters", "pika.PlainCredentials", "os._exit", "sys.stdout.flush", "sys.stdout.write" ]
[((329, 368), 'pika.PlainCredentials', 'pika.PlainCredentials', (['"""guest"""', '"""guest"""'], {}), "('guest', 'guest')\n", (350, 368), False, 'import pika, json\n'), ((190, 215), 'sys.stdout.write', 'sys.stdout.write', (['"""False"""'], {}), "('False')\n", (206, 215), False, 'import os, threading, time, signal, sys\...
import datetime import glob import os.path import tensorflow as tf def make_summary_writer(exp_name="AIRL", graph=None): summary_base = os.path.join("output/", exp_name, "summary/") today_str = datetime.datetime.today().strftime('%Y-%m-%d') dir_list = glob.glob(os.path.join(summary_base, today_str + "*/")) ...
[ "datetime.datetime.today", "tensorflow.logging.info", "tensorflow.summary.FileWriter" ]
[((524, 583), 'tensorflow.logging.info', 'tf.logging.info', (["('building summary directory at ' + run_dir)"], {}), "('building summary directory at ' + run_dir)\n", (539, 583), True, 'import tensorflow as tf\n'), ((663, 706), 'tensorflow.summary.FileWriter', 'tf.summary.FileWriter', (['run_dir'], {'graph': 'graph'}), ...
import math from datetime import datetime from flask import Flask, jsonify, request from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db' db = SQLAlchemy(app) class Price(db.Model): id = db.Column(db.Integer, primary_key=True) type = db.Col...
[ "flask.request.args.get", "math.ceil", "flask.Flask", "flask_sqlalchemy.SQLAlchemy", "flask.jsonify" ]
[((132, 147), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (137, 147), False, 'from flask import Flask, jsonify, request\n'), ((213, 228), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (223, 228), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((938, 958), 'flask.jsonify', ...
import numpy as np import pandas as pd import datetime import pickle data = pickle.load(open("./data.pkl",'rb')) class get_data(): def __init__(self, data): self.c_data = data self.data = self.clean_data() def clean_data(self): for d in range(len(data)-1, -1, -1): ...
[ "datetime.timedelta" ]
[((1823, 1857), 'datetime.timedelta', 'datetime.timedelta', ([], {'hours': 'timestep'}), '(hours=timestep)\n', (1841, 1857), False, 'import datetime\n')]
import tensorflow as tf #让tf不要一次性分配所有显存(性能会有影响,但是不容易出现无内存错误) # physical_devices = tf.config.list_physical_devices('GPU') # try: # tf.config.experimental.set_virtual_device_configuration( # physical_devices[0], # [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=1024*6)]) # # tf.conf...
[ "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Dropout" ]
[((659, 704), 'tensorflow.keras.layers.Flatten', 'tf.keras.layers.Flatten', ([], {'input_shape': '(28, 28)'}), '(input_shape=(28, 28))\n', (682, 704), True, 'import tensorflow as tf\n'), ((710, 759), 'tensorflow.keras.layers.Dense', 'tf.keras.layers.Dense', (['(512)'], {'activation': 'tf.nn.relu'}), '(512, activation=t...