code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright (c) 2014-present PlatformIO <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "click.Choice", "collections.namedtuple", "click.Path", "click.IntRange" ]
[((736, 845), 'collections.namedtuple', 'namedtuple', (['"""ConfigOption"""', "['scope', 'name', 'type', 'multiple', 'sysenvvar', 'buildenvvar', 'oldnames']"], {}), "('ConfigOption', ['scope', 'name', 'type', 'multiple',\n 'sysenvvar', 'buildenvvar', 'oldnames'])\n", (746, 845), False, 'from collections import Order...
from scipy.sparse import * import numpy as np import pickle import random from sklearn.decomposition import PCA from matplotlib import pyplot as plt from tqdm import tqdm from sklearn import svm from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_curve, auc from operator import itemgette...
[ "matplotlib.pyplot.ylabel", "sklearn.metrics.auc", "numpy.array", "keras.layers.Dense", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.random.seed", "pandas.DataFrame", "matplotlib.pyplot.ylim", "sklearn.model_selection.train_test_split", "keras.models.Sequential", "matplotlib.py...
[((4519, 4597), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'Y'], {'test_size': 'test_size_percent', 'random_state': 'random_state'}), '(X, Y, test_size=test_size_percent, random_state=random_state)\n', (4535, 4597), False, 'from sklearn.model_selection import train_test_split\n'), ((5288, 53...
import numpy as np class Renderer: def __init__(self, height, width, config): self.height = height self.width = width self.content = None self.zbuffer = None self.m = None self.f = 1.0 self.resize(height, width) self.colors = config.colors s...
[ "numpy.identity", "numpy.array", "numpy.matmul" ]
[((534, 548), 'numpy.identity', 'np.identity', (['(3)'], {}), '(3)\n', (545, 548), True, 'import numpy as np\n'), ((876, 905), 'numpy.matmul', 'np.matmul', (['self.pos', 'self.rot'], {}), '(self.pos, self.rot)\n', (885, 905), True, 'import numpy as np\n'), ((6596, 6610), 'numpy.identity', 'np.identity', (['(3)'], {}), ...
from os.path import dirname, realpath from setuptools import setup, find_packages, Distribution from opencda.version import __version__ def _read_requirements_file(): """Return the elements in requirements.txt.""" req_file_path = '%s/requirements.txt' % dirname(realpath(__file__)) with open(req_file_path)...
[ "os.path.realpath", "setuptools.find_packages" ]
[((438, 453), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (451, 453), False, 'from setuptools import setup, find_packages, Distribution\n'), ((272, 290), 'os.path.realpath', 'realpath', (['__file__'], {}), '(__file__)\n', (280, 290), False, 'from os.path import dirname, realpath\n')]
# This file is meant to create a new meeting note file automatically. from datetime import datetime import os now = datetime.now() ordinal = ( "th" if 11 <= now.day <= 13 else {1: "st", 2: "nd", 3: "rd"}.get(now.day % 10, "th") ) folder = now.strftime("%Y - %B").lower() file = os.path.join(folder, f"{str(now.day...
[ "datetime.datetime.now", "os.path.isdir", "os.makedirs" ]
[((118, 132), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (130, 132), False, 'from datetime import datetime\n'), ((514, 535), 'os.path.isdir', 'os.path.isdir', (['folder'], {}), '(folder)\n', (527, 535), False, 'import os\n'), ((541, 560), 'os.makedirs', 'os.makedirs', (['folder'], {}), '(folder)\n', (55...
""" Copyright (c) 2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ "numpy.clip", "tensorflow.equal", "tensorflow.shape", "tensorflow.reduce_sum", "tensorflow.numpy_function", "cv2.filter2D", "numpy.array", "tensorflow.image.random_saturation", "image_retrieval.common.preproces_image", "numpy.mean", "argparse.ArgumentParser", "tensorflow.image.random_crop", ...
[((858, 889), 'cv2.filter2D', 'cv2.filter2D', (['image', '(-1)', 'kernel'], {}), '(image, -1, kernel)\n', (870, 889), False, 'import cv2\n'), ((1393, 1455), 'tensorflow.random.uniform', 'tf.random.uniform', (['()', '(min_size // 2)', 'min_size'], {'dtype': 'tf.int32'}), '((), min_size // 2, min_size, dtype=tf.int32)\n'...
import pathlib def iter_examples(): example_dir = pathlib.Path(__file__).parent.absolute() for fp in example_dir.iterdir(): if fp.name.startswith("_") or fp.suffix != ".py": continue yield fp
[ "pathlib.Path" ]
[((56, 78), 'pathlib.Path', 'pathlib.Path', (['__file__'], {}), '(__file__)\n', (68, 78), False, 'import pathlib\n')]
from pathlib import Path from .leavedonto import LeavedOnto from .ontomanager import OntoManager from .trie import OntTrie def merge_ontos(ontos_path, out_file, basis=None): if basis: om = OntoManager(basis) else: om = OntoManager() om.batch_merge_to_onto(ontos_path) out_file = Path...
[ "pathlib.Path" ]
[((316, 330), 'pathlib.Path', 'Path', (['out_file'], {}), '(out_file)\n', (320, 330), False, 'from pathlib import Path\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, ...
[ "os.path.exists", "os.path.join", "os.stat" ]
[((1471, 1530), 'os.path.join', 'os.path.join', (['server.config.dirs.scratch', 'repo', '"""_clc.yaml"""'], {}), "(server.config.dirs.scratch, repo, '_clc.yaml')\n", (1483, 1530), False, 'import os\n'), ((1542, 1565), 'os.path.exists', 'os.path.exists', (['ymlfile'], {}), '(ymlfile)\n', (1556, 1565), False, 'import os\...
#!/usr/bin/env python3 # SonicScrewdriver.py # Version January 1, 2015 def addtodict(word, count, lexicon): '''Adds an integer (count) to dictionary (lexicon) under the key (word), or increments lexicon[word] if key present. ''' if word in lexicon: lexicon[word] += count else: lexicon[word] = count def appe...
[ "os.path.exists" ]
[((4951, 4975), 'os.path.exists', 'os.path.exists', (['filepath'], {}), '(filepath)\n', (4965, 4975), False, 'import os\n'), ((6161, 6185), 'os.path.exists', 'os.path.exists', (['filepath'], {}), '(filepath)\n', (6175, 6185), False, 'import os\n')]
# This entrypoint file to be used in development. Start by reading README.md from arithmetic_arranger import arithmetic_arranger from unittest import main print(arithmetic_arranger(["32 + 698", "3801 - 2", "45 + 43", "123 + 49"])) # Run unit tests automatically main(module='test_module', exit=False)
[ "unittest.main", "arithmetic_arranger.arithmetic_arranger" ]
[((264, 302), 'unittest.main', 'main', ([], {'module': '"""test_module"""', 'exit': '(False)'}), "(module='test_module', exit=False)\n", (268, 302), False, 'from unittest import main\n'), ((162, 230), 'arithmetic_arranger.arithmetic_arranger', 'arithmetic_arranger', (["['32 + 698', '3801 - 2', '45 + 43', '123 + 49']"],...
from typing import Sequence, Dict from anoncreds.protocol.globals import LARGE_VPRIME, LARGE_MVECT, LARGE_E_START, \ LARGE_ETILDE, \ LARGE_VTILDE, LARGE_UTILDE, LARGE_RTILDE, LARGE_ALPHATILDE, ITERATIONS, \ DELTA from anoncreds.protocol.primary.primary_proof_common import calcTge, calcTeq from anoncreds.pr...
[ "anoncreds.protocol.utils.splitRevealedAttrs", "anoncreds.protocol.types.PrimaryProof", "anoncreds.protocol.utils.fourSquares", "anoncreds.protocol.types.PrimaryEqualProof", "anoncreds.protocol.types.ID", "anoncreds.protocol.types.PrimaryInitProof", "anoncreds.protocol.types.PrimaryPrecicateGEInitProof"...
[((1033, 1062), 'config.config.cmod.randomBits', 'cmod.randomBits', (['LARGE_VPRIME'], {}), '(LARGE_VPRIME)\n', (1048, 1062), False, 'from config.config import cmod\n'), ((1178, 1215), 'anoncreds.protocol.types.ClaimInitDataType', 'ClaimInitDataType', ([], {'U': 'U', 'vPrime': 'vprime'}), '(U=U, vPrime=vprime)\n', (119...
import math import torch import heat as ht from .test_suites.basic_test import TestCase class TestTrigonometrics(TestCase): def test_arccos(self): # base elements elements = [-1.0, -0.83, -0.12, 0.0, 0.24, 0.67, 1.0] comparison = torch.tensor( elements, dtype=torch.float64, de...
[ "heat.tan", "heat.radians", "torch.arange", "heat.atan", "heat.deg2rad", "heat.sinh", "heat.degrees", "heat.tanh", "heat.arange", "heat.cosh", "heat.asin", "heat.array", "heat.arccos", "torch.randn", "heat.allclose", "heat.arctan2", "heat.arcsin", "heat.arctan", "heat.acos", "h...
[((421, 457), 'heat.array', 'ht.array', (['elements'], {'dtype': 'ht.float32'}), '(elements, dtype=ht.float32)\n', (429, 457), True, 'import heat as ht\n'), ((483, 506), 'heat.acos', 'ht.acos', (['float32_tensor'], {}), '(float32_tensor)\n', (490, 506), True, 'import heat as ht\n'), ((763, 799), 'heat.array', 'ht.array...
# Generated by Django 3.1.5 on 2021-02-01 13:14 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.DeleteModel( name='River', ), ]
[ "django.db.migrations.DeleteModel" ]
[((213, 249), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""River"""'}), "(name='River')\n", (235, 249), False, 'from django.db import migrations\n')]
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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....
[ "pytadbit.mapping.filter.apply_filter", "pytadbit.mapping.analyze.insert_sizes", "basic_modules.tool.Tool.__init__", "utils.dummy_pycompss.compss_wait_on", "utils.logger.info", "pytadbit.parsers.hic_bam_parser.bed2D_to_BAMhic", "pytadbit.mapping.filter.filter_reads", "utils.dummy_pycompss.task" ]
[((2243, 2554), 'utils.dummy_pycompss.task', 'task', ([], {'reads': 'FILE_IN', 'filter_reads_file': 'FILE_OUT', 'custom_filter': 'IN', 'conservative': 'IN', 'output_de': 'FILE_OUT', 'output_d': 'FILE_OUT', 'output_e': 'FILE_OUT', 'output_ed': 'FILE_OUT', 'output_or': 'FILE_OUT', 'output_rb': 'FILE_OUT', 'output_sc': 'F...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: create_template_with_yaml.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from g...
[ "google.protobuf.reflection.GeneratedProtocolMessageType", "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((479, 505), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (503, 505), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((5871, 6092), 'google.protobuf.reflection.GeneratedProtocolMessageType', '_reflection.GeneratedProtocolMessageType', (['"""Creat...
import os import glob from terminaltables import AsciiTable import json from datetime import datetime import time class Pjobs(): def __init__(self, jobsdir): pendloc = os.path.join(jobsdir, 'PEND') runloc = os.path.join(jobsdir, 'RUN') self.pendFiles = glob.glob("%s/*.json" % pendloc) ...
[ "datetime.datetime.strptime", "os.path.join", "terminaltables.AsciiTable", "time.time", "glob.glob" ]
[((182, 211), 'os.path.join', 'os.path.join', (['jobsdir', '"""PEND"""'], {}), "(jobsdir, 'PEND')\n", (194, 211), False, 'import os\n'), ((229, 257), 'os.path.join', 'os.path.join', (['jobsdir', '"""RUN"""'], {}), "(jobsdir, 'RUN')\n", (241, 257), False, 'import os\n'), ((283, 315), 'glob.glob', 'glob.glob', (["('%s/*....
# ---------------------------------------------------------------------------- # Copyright 2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
[ "ngraph.testing.RandomTensorGenerator", "ngraph.transformers.make_transformer", "ngraph.make_axes", "neon.backends.gen_backend", "ngraph.testing.executor", "ngraph.sum", "ngraph.batch_size", "ngraph.sigmoid", "ngraph.make_axis", "ngraph.deriv", "ngraph.placeholder", "numpy.exp", "ngraph.pool...
[((1095, 1131), 'ngraph.testing.RandomTensorGenerator', 'RandomTensorGenerator', (['(0)', 'np.float32'], {}), '(0, np.float32)\n', (1116, 1131), False, 'from ngraph.testing import RandomTensorGenerator, executor\n'), ((1152, 1165), 'neon.backends.gen_backend', 'gen_backend', ([], {}), '()\n', (1163, 1165), False, 'from...
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
[ "six.iteritems" ]
[((23994, 24023), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (24003, 24023), False, 'from six import iteritems\n')]
import multiprocessing import os import random import numpy as np import sacred import torch from capreolus.reranker.reranker import Reranker from capreolus.collection import COLLECTIONS from capreolus.benchmark import Benchmark from capreolus.index import Index from capreolus.searcher import Searcher from capreolus....
[ "torch.cuda.manual_seed_all", "torch.manual_seed", "capreolus.utils.loginit.get_logger", "os.path.join", "sacred.Experiment", "random.seed", "multiprocessing.cpu_count", "capreolus.utils.frozendict.FrozenDict", "torch.cuda.is_available", "numpy.random.seed", "capreolus.utils.common.get_default_r...
[((599, 619), 'capreolus.utils.loginit.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (609, 619), False, 'from capreolus.utils.loginit import get_logger\n'), ((1251, 1320), 'sacred.SETTINGS.HOST_INFO.CAPTURED_ENV.append', 'sacred.SETTINGS.HOST_INFO.CAPTURED_ENV.append', (['"""CUDA_VISIBLE_DEVICES"""'], ...
import unittest from translator import english_to_french, french_to_english class TestFrenchtoEnglish (unittest.TestCase): def test1(self): self.assertEqual(french_to_english("NULL"),"NULL") #test that empty string returns empty string self.assertEqual(french_to_english("Bonjour"),"Hello") #test t...
[ "unittest.main", "translator.french_to_english", "translator.english_to_french" ]
[((668, 683), 'unittest.main', 'unittest.main', ([], {}), '()\n', (681, 683), False, 'import unittest\n'), ((171, 196), 'translator.french_to_english', 'french_to_english', (['"""NULL"""'], {}), "('NULL')\n", (188, 196), False, 'from translator import english_to_french, french_to_english\n'), ((275, 303), 'translator.f...
import os import socket import logging import subprocess logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s') # ================================================================== # SET THESE PATHS MANUALLY ######################################### # ================================================...
[ "logging.basicConfig", "subprocess.check_output", "os.path.join", "logging.info", "os.environ.get", "socket.gethostname" ]
[((57, 130), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s %(message)s"""'}), "(level=logging.INFO, format='%(asctime)s %(message)s')\n", (76, 130), False, 'import logging\n'), ((879, 927), 'os.path.join', 'os.path.join', (['project_root', '"""git_sem_proj/code/"...
import logging import os from logging.config import dictConfig import flask from flask import request, current_app #from app.logging_config.log_formatters import RequestFormatter from app import config log_con = flask.Blueprint('log_con', __name__) @log_con.after_app_request def after_request_logging(response): ...
[ "os.path.exists", "logging.config.dictConfig", "os.path.join", "os.mkdir", "flask.request.path.startswith", "flask.Blueprint" ]
[((215, 251), 'flask.Blueprint', 'flask.Blueprint', (['"""log_con"""', '__name__'], {}), "('log_con', __name__)\n", (230, 251), False, 'import flask\n'), ((788, 829), 'logging.config.dictConfig', 'logging.config.dictConfig', (['LOGGING_CONFIG'], {}), '(LOGGING_CONFIG)\n', (813, 829), False, 'import logging\n'), ((390, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################## # # # GhIDA: Ghidra decompiler for IDA Pro # # ...
[ "ida_kernwin.Form.FormChangeCb", "utility.from_ghidra_to_ida_syntax_conversion", "ida_kernwin.Form.DirInput", "ida_kernwin.Form.__init__", "idaapi.find_widget", "ida_kernwin.Form.NumericLabel", "ida_kernwin.Form.ChkGroupControl", "idaapi.get_current_viewer", "utility.from_ida_to_ghidra_syntax_conver...
[((2620, 2652), 'idaapi.find_widget', 'idaapi.find_widget', (['"""IDA View-A"""'], {}), "('IDA View-A')\n", (2638, 2652), False, 'import idaapi\n'), ((2887, 2931), 'utility.from_ghidra_to_ida_syntax_conversion', 'from_ghidra_to_ida_syntax_conversion', (['symbol'], {}), '(symbol)\n', (2923, 2931), False, 'from utility i...
import logging def setup_logging(): # Create root logger logger = logging.getLogger('') logger.setLevel(logging.DEBUG) # Create stream handler ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) # Create formatter formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname...
[ "logging.getLogger", "logging.Formatter", "logging.StreamHandler" ]
[((75, 96), 'logging.getLogger', 'logging.getLogger', (['""""""'], {}), "('')\n", (92, 96), False, 'import logging\n'), ((170, 193), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (191, 193), False, 'import logging\n'), ((265, 338), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s - %(na...
""" +=========================================================================================+ || Line Detector || || Name: <NAME> Date: 3/19/15 || +==================================...
[ "queue.PriorityQueue", "math.radians", "math.atan2", "copy.deepcopy" ]
[((1495, 1514), 'copy.deepcopy', 'deepcopy', (['oldMatrix'], {}), '(oldMatrix)\n', (1503, 1514), False, 'from copy import deepcopy\n'), ((2714, 2733), 'copy.deepcopy', 'deepcopy', (['oldMatrix'], {}), '(oldMatrix)\n', (2722, 2733), False, 'from copy import deepcopy\n'), ((6632, 6669), 'queue.PriorityQueue', 'PriorityQu...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
[ "oslo_policy.policy.DocumentedRuleDefault" ]
[((729, 975), 'oslo_policy.policy.DocumentedRuleDefault', 'policy.DocumentedRuleDefault', ([], {'name': '"""quotas:get"""', 'check_str': 'f"""rule:all_users or {_READER}"""', 'scope_types': "['project']", 'description': '"""List quotas for the project the user belongs to."""', 'operations': "[{'path': '/v1/quotas', 'me...
import asyncio import logging import time from collections import OrderedDict from datetime import datetime from enum import Enum from typing import ( Mapping, Optional, List, Tuple, Union, Sequence, AsyncGenerator, Iterable, TYPE_CHECKING, ) from aioredis import ConnectionClosedErr...
[ "logging.getLogger", "lightbus.transports.redis.utilities.retry_on_redis_connection_failure", "lightbus.client.utilities.queue_exception_checker", "logging.debug", "aioredis.commands.streams.fields_to_dict", "aioredis.util.decode", "lightbus.utilities.frozendict.frozendict", "lightbus.transports.redis...
[((1373, 1419), 'logging.getLogger', 'logging.getLogger', (['"""lightbus.transports.redis"""'], {}), "('lightbus.transports.redis')\n", (1390, 1419), False, 'import logging\n'), ((2200, 2226), 'lightbus.serializers.ByFieldMessageSerializer', 'ByFieldMessageSerializer', ([], {}), '()\n', (2224, 2226), False, 'from light...
""" Demonstrates the fundamentals of unit test. adder() is a function that lets you 'add' integers, strings, and lists. """ from adder import adder # keep the tested code separate from the tests. import unittest class TestAdder(unittest.TestCase): def test_numbers(self): self.assertEqual(adder(3,4), 7, "3...
[ "unittest.main", "adder.adder" ]
[((871, 886), 'unittest.main', 'unittest.main', ([], {}), '()\n', (884, 886), False, 'import unittest\n'), ((303, 314), 'adder.adder', 'adder', (['(3)', '(4)'], {}), '(3, 4)\n', (308, 314), False, 'from adder import adder\n'), ((401, 416), 'adder.adder', 'adder', (['"""x"""', '"""y"""'], {}), "('x', 'y')\n", (406, 416)...
import math import time import settings def _get_apoapsis_circularize_dv(orbit): mu = orbit.body.gravitational_parameter r = orbit.apoapsis a1 = orbit.semi_major_axis a2 = r v1 = math.sqrt(mu*((2./r)-(1./a1))) v2 = math.sqrt(mu*((2./r)-(1./a2))) return v2 - v1 def _get_hohmann_dv(orbit, target_altitude): mu =...
[ "math.exp", "math.sqrt", "time.sleep" ]
[((185, 221), 'math.sqrt', 'math.sqrt', (['(mu * (2.0 / r - 1.0 / a1))'], {}), '(mu * (2.0 / r - 1.0 / a1))\n', (194, 221), False, 'import math\n'), ((222, 258), 'math.sqrt', 'math.sqrt', (['(mu * (2.0 / r - 1.0 / a2))'], {}), '(mu * (2.0 / r - 1.0 / a2))\n', (231, 258), False, 'import math\n'), ((2831, 2875), 'math.sq...
import pynng from ditk import logging from typing import List, Optional, Tuple from pynng import Bus0 from time import sleep from ding.framework.message_queue.mq import MQ from ding.utils import MQ_REGISTRY @MQ_REGISTRY.register("nng") class NNGMQ(MQ): def __init__(self, listen_to: str, attach_to: Optional[List...
[ "ditk.logging.error", "ding.utils.MQ_REGISTRY.register", "pynng.Bus0", "time.sleep" ]
[((211, 238), 'ding.utils.MQ_REGISTRY.register', 'MQ_REGISTRY.register', (['"""nng"""'], {}), "('nng')\n", (231, 238), False, 'from ding.utils import MQ_REGISTRY\n'), ((847, 853), 'pynng.Bus0', 'Bus0', ([], {}), '()\n', (851, 853), False, 'from pynng import Bus0\n'), ((898, 908), 'time.sleep', 'sleep', (['(0.1)'], {}),...
#! /usr/bin/env python3 import argparse import contextlib import csv import gzip import pathlib import subprocess import sys import textwrap import time from datetime import datetime import G2Paths from G2Engine import G2Engine from G2Exception import G2ModuleException from G2Health import G2Health from G2IniParams i...
[ "csv.field_size_limit", "textwrap.dedent", "csv.DictWriter", "csv.DictReader", "datetime.datetime.fromtimestamp", "G2Paths.get_G2Module_ini_path", "argparse.ArgumentParser", "gzip.open", "G2Health.G2Health", "pathlib.Path", "subprocess.Popen", "time.sleep", "G2Engine.G2Engine", "datetime.d...
[((3439, 3450), 'time.time', 'time.time', ([], {}), '()\n', (3448, 3450), False, 'import time\n'), ((6174, 6185), 'time.time', 'time.time', ([], {}), '()\n', (6183, 6185), False, 'import time\n'), ((7764, 7858), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.RawTextHelpFormatte...
import pytest from ruptures.datasets import pw_constant from ruptures.show import display from ruptures.show.display import MatplotlibMissingError @pytest.fixture(scope="module") def signal_bkps(): signal, bkps = pw_constant() return signal, bkps def test_display_with_options(signal_bkps): try: ...
[ "pytest.fixture", "pytest.skip", "ruptures.datasets.pw_constant", "ruptures.show.display" ]
[((151, 181), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (165, 181), False, 'import pytest\n'), ((220, 233), 'ruptures.datasets.pw_constant', 'pw_constant', ([], {}), '()\n', (231, 233), False, 'from ruptures.datasets import pw_constant\n'), ((369, 390), 'ruptures.show.di...
#!/usr/bin/env python3 import logging import os from telegram.ext import PicklePersistence, Updater from handler.startcommand import StartCommandHandler from handler.helpcommand import HelpCommandHandler from handler.neweventcommand import NewEventCommandHandler from handler.ongacommand import OngaCommandHandler fro...
[ "logging.basicConfig", "logging.getLogger", "handler.helpcommand.HelpCommandHandler", "os.getenv", "telegram.ext.PicklePersistence", "handler.startcommand.StartCommandHandler", "handler.neweventcommand.NewEventCommandHandler", "handler.ongacommand.OngaCommandHandler", "telegram.ext.Updater", "hand...
[((373, 480), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""', 'level': 'logging.INFO'}), "(format=\n '%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)\n", (392, 480), False, 'import logging\n'), ((491, 518), 'loggin...
import sys import os import electronDbsDiscovery import FWCore.ParameterSet.Config as cms process = cms.Process("testEgammaAnalyzers") process.DQMStore = cms.Service("DQMStore") process.load("DQMServices.Components.DQMStoreStats_cfi") #from DQMServices.Components.DQMStoreStats_cfi import * #dqmStoreStats.runOnEndJob...
[ "FWCore.ParameterSet.Config.string", "electronDbsDiscovery.search", "FWCore.ParameterSet.Config.Service", "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.Process", "FWCore.ParameterSet.Config.untracked.vstring", "FWCore.ParameterSet.Config.Path" ]
[((102, 136), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""testEgammaAnalyzers"""'], {}), "('testEgammaAnalyzers')\n", (113, 136), True, 'import FWCore.ParameterSet.Config as cms\n'), ((157, 180), 'FWCore.ParameterSet.Config.Service', 'cms.Service', (['"""DQMStore"""'], {}), "('DQMStore')\n", (168, 180), ...
""" test multi vs single thread data loading """ import os import random import numpy as np from sklearn.model_selection import KFold import time import utils.settings as settings from evaluation.metrics import accuracy from evaluation.conf_matrix import create_conf_matrix from loader.Preprocessor import Preprocesso...
[ "utils.DataConfig.SonarConfig", "random.seed", "utils.settings.init", "utils.settings.DATA_CONFIG.load_dataset", "time.time" ]
[((681, 779), 'utils.DataConfig.SonarConfig', 'SonarConfig', ([], {'dataset_path': '"""C:/Users/Leander/HPI/BP/UnicornML/dataset/ML Prototype Recordings"""'}), "(dataset_path=\n 'C:/Users/Leander/HPI/BP/UnicornML/dataset/ML Prototype Recordings')\n", (692, 779), False, 'from utils.DataConfig import SonarConfig\n'), ...
import csv # convert to csv with open('/home/elad_ch/security_prj/security_project/10-million-password-list-top-1000000.txt', 'r') as in_file: stripped = (line.strip() for line in in_file) lines = (line.split(",") for line in stripped if line) with open('10-million-password-list-top-1000000.csv', 'w') as o...
[ "csv.writer" ]
[((346, 366), 'csv.writer', 'csv.writer', (['out_file'], {}), '(out_file)\n', (356, 366), False, 'import csv\n')]
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # 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...
[ "edb.edgeql.utils.find_subject_ptrs", "edb.edgeql.utils.subject_paths_substitute", "edb.errors.UnsupportedFeatureError", "edb.ir.ast.OnConflictClause", "edb.ir.ast.ConstraintRef", "edb.edgeql.ast.BinOp", "edb.edgeql.utils.subject_substitute", "edb.schema.utils.get_class_nearest_common_ancestors", "e...
[((11438, 11463), 'edb.edgeql.ast.Set', 'qlast.Set', ([], {'elements': 'frags'}), '(elements=frags)\n', (11447, 11463), True, 'from edb.edgeql import ast as qlast\n'), ((13154, 13260), 'edb.ir.ast.OnConflictClause', 'irast.OnConflictClause', ([], {'constraint': 'None', 'select_ir': 'select_ir', 'always_check': 'always_...
import requests from bs4 import BeautifulSoup import random import time random.seed(60) def get_page(url): """ Simple funtion that get the url with requests and return a bs4 object. :param (str): The string of the url :return: bs4 object """ try: req = requests.get(url) ...
[ "requests.get", "time.sleep", "bs4.BeautifulSoup", "random.seed", "random.randint" ]
[((73, 88), 'random.seed', 'random.seed', (['(60)'], {}), '(60)\n', (84, 88), False, 'import random\n'), ((297, 314), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (309, 314), False, 'import requests\n'), ((330, 368), 'bs4.BeautifulSoup', 'BeautifulSoup', (['req.text', '"""html.parser"""'], {}), "(req.text,...
from bert_utils.pretrain_model import load_model from bert_utils.tokenization import Tokenizer import numpy as np config_path = '../chinese_L-12_H-768_A-12/bert_config.json' checkpoint_path = '../chinese_L-12_H-768_A-12/bert_model.ckpt' dict_path = '../chinese_L-12_H-768_A-12/vocab.txt' model = load_model(checkpoint_...
[ "numpy.array", "bert_utils.tokenization.Tokenizer", "bert_utils.pretrain_model.load_model" ]
[((298, 351), 'bert_utils.pretrain_model.load_model', 'load_model', (['checkpoint_path', 'dict_path'], {'is_pool': '(False)'}), '(checkpoint_path, dict_path, is_pool=False)\n', (308, 351), False, 'from bert_utils.pretrain_model import load_model\n'), ((365, 405), 'bert_utils.tokenization.Tokenizer', 'Tokenizer', (['dic...
""" Useful constant variables """ from pathlib import Path PROJECT_ROOT = Path(__file__).parent ASSETS_PATH = PROJECT_ROOT / 'tmp' / 'articles' CRAWLER_CONFIG_PATH = PROJECT_ROOT / 'scrapper_config.json' HEADERS = { 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0", ...
[ "pathlib.Path" ]
[((76, 90), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (80, 90), False, 'from pathlib import Path\n')]
# -*- coding: utf-8 -*- from __future__ import print_function import json import sys from pprint import pprint import asyncio from pygments import highlight, lexers, formatters __version__ = '0.1.2' PY3 = sys.version_info[0] >= 3 def format_json(data): return json.dumps(data, sort_keys=True, indent=4) def col...
[ "pygments.lexers.JsonLexer", "json.dumps", "pygments.formatters.TerminalFormatter", "asyncio.ensure_future" ]
[((268, 310), 'json.dumps', 'json.dumps', (['data'], {'sort_keys': '(True)', 'indent': '(4)'}), '(data, sort_keys=True, indent=4)\n', (278, 310), False, 'import json\n'), ((586, 604), 'pygments.lexers.JsonLexer', 'lexers.JsonLexer', ([], {}), '()\n', (602, 604), False, 'from pygments import highlight, lexers, formatter...
import logging from zope.dottedname.resolve import resolve from .documents import ( BaseDocument, ESBaseDocument, BaseMixin, get_document_cls, get_document_classes) from .serializers import JSONEncoder, ESJSONSerializer from .signals import ESMetaclass from .utils import ( relationship_fields, is_relation...
[ "logging.getLogger", "sqlalchemy_utils.database_exists", "pyramid_sqlalchemy.BaseObject.metadata.create_all", "sqlalchemy.engine_from_config", "sqlalchemy_utils.create_database" ]
[((1505, 1532), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1522, 1532), False, 'import logging\n'), ((1943, 2002), 'sqlalchemy.engine_from_config', 'engine_from_config', (['config.registry.settings', '"""sqlalchemy."""'], {}), "(config.registry.settings, 'sqlalchemy.')\n", (1961, 200...
""" Setup information for application. This includes a database connection object and a database config By: <NAME> """ from app.database.conn import PostgresConnection import yaml with open("config.yaml", "r") as f: db_config = yaml.load(f, Loader=yaml.FullLoader) conn = PostgresConnection(db_config)
[ "yaml.load", "app.database.conn.PostgresConnection" ]
[((278, 307), 'app.database.conn.PostgresConnection', 'PostgresConnection', (['db_config'], {}), '(db_config)\n', (296, 307), False, 'from app.database.conn import PostgresConnection\n'), ((234, 270), 'yaml.load', 'yaml.load', (['f'], {'Loader': 'yaml.FullLoader'}), '(f, Loader=yaml.FullLoader)\n', (243, 270), False, '...
from esper.prelude import par_for, unzip, pcache, flatten, collect from query.models import Video, Face, Frame, HairColor, HairColorName, Labeler from esper.scannerutil import ScannerWrapper, ScannerSQLTable from scannertools import clothing_detection , hairstyle_detection from django.db.models import Count, OuterRef, ...
[ "query.models.Face.objects.filter", "esper.scannerutil.ScannerWrapper.create", "query.models.HairColorName.objects.all", "django.db.models.IntegerField", "django.db.models.Count", "query.models.Video.objects.all", "scannerpy.register_python_op", "scannertools.hairstyle_detection.HairStyle", "django....
[((1628, 1669), 'scannerpy.register_python_op', 'register_python_op', ([], {'name': '"""BboxesFromJson"""'}), "(name='BboxesFromJson')\n", (1646, 1669), False, 'from scannerpy import register_python_op, Database, DeviceType\n'), ((3794, 3817), 'esper.scannerutil.ScannerWrapper.create', 'ScannerWrapper.create', ([], {})...
# Generated by Django 2.2.17 on 2021-01-30 08:35 from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields from django.db.models import JSONField class Migration(migrations.Migration): dependencies = [('dojo', '0074_notifications_close_engagement')] operat...
[ "django.db.models.Index", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.JSONField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((2327, 2416), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'through': '"""dojo.Test_Import_Finding_Action"""', 'to': '"""dojo.Finding"""'}), "(through='dojo.Test_Import_Finding_Action', to=\n 'dojo.Finding')\n", (2349, 2416), False, 'from django.db import migrations, models\n'), ((2534, 2633...
# coding: utf-8 """ お天気機能 """ import json import xml.etree.ElementTree as ET from typing import Optional import requests def get_city_id_from_city_name(city_name: str) -> Optional[str]: """ 都市名から都市IDを返す """ city_id = None city_list_url = 'http://weather.livedoor.com/forecast/rss/primary_area.xml...
[ "xml.etree.ElementTree.fromstring", "json.loads", "requests.get" ]
[((337, 364), 'requests.get', 'requests.get', (['city_list_url'], {}), '(city_list_url)\n', (349, 364), False, 'import requests\n'), ((376, 407), 'xml.etree.ElementTree.fromstring', 'ET.fromstring', (['response.content'], {}), '(response.content)\n', (389, 407), True, 'import xml.etree.ElementTree as ET\n'), ((803, 828...
"""URL Routing for user account interaction Uses the HMAC flow from django-registration with the Improved User. https://django-registration.readthedocs.io/en/latest/hmac.html https://django-registration.readthedocs.io/en/latest/custom-user.html Your flake8 config will likely cause imports to be sorted differently. ...
[ "django.views.generic.TemplateView.as_view", "django.conf.urls.include", "registration.backends.hmac.views.RegistrationView.as_view", "registration.backends.hmac.views.ActivationView.as_view" ]
[((732, 807), 'django.views.generic.TemplateView.as_view', 'TemplateView.as_view', ([], {'template_name': '"""registration/activation_complete.html"""'}), "(template_name='registration/activation_complete.html')\n", (752, 807), False, 'from django.views.generic import TemplateView\n'), ((956, 980), 'registration.backen...
""" Persist Helper Module """ from __future__ import print_function from datetime import datetime import json import os import asyncio import asyncpg from eventify.exceptions import EventifySanityError async def persist_event(topic, event, pool): """ Track event to prevent duplication of work and poten...
[ "json.dumps", "datetime.datetime.utcnow" ]
[((453, 479), 'json.dumps', 'json.dumps', (['event.__dict__'], {}), '(event.__dict__)\n', (463, 479), False, 'import json\n'), ((1133, 1150), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (1148, 1150), False, 'from datetime import datetime\n')]
"""Test mmd related functions.""" import numpy as np import pytest from sklearn.metrics.pairwise import euclidean_distances from discern.mmd import mmd def _mmd_loop(dist_xy, dist_xx, dist_yy, scales, sigma): # pylint: disable=too-many-locals stat = np.zeros_like(scales) n_x = np.float(dist_xx.shape[0]) ...
[ "numpy.random.rand", "numpy.testing.assert_allclose", "numpy.max", "numpy.exp", "numpy.linspace", "discern.mmd.mmd._calculate_distances", "numpy.random.seed", "pytest.mark.skipif", "discern.mmd.mmd.mmd_loss", "sklearn.metrics.pairwise.euclidean_distances", "numpy.fill_diagonal", "discern.mmd.m...
[((855, 914), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n_rows"""', '[10, 25, 100, 500, 1000]'], {}), "('n_rows', [10, 25, 100, 500, 1000])\n", (878, 914), False, 'import pytest\n'), ((916, 975), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n_cols"""', '[10, 25, 100, 500, 1000]'], {}), ...
from flask_restful import Resource from flask_restful.reqparse import RequestParser from pajbot.managers.db import DBManager from pajbot.models.playsound import Playsound from pajbot.models.sock import SocketClientManager from pajbot.modules import PlaysoundModule from pajbot.web.utils import requires_level from pajbo...
[ "flask_restful.reqparse.RequestParser", "pajbot.modules.PlaysoundModule.validate_cooldown", "pajbot.web.utils.requires_level", "pajbot.models.playsound.Playsound", "pajbot.models.sock.SocketClientManager.send", "pajbot.modules.PlaysoundModule.validate_name", "pajbot.managers.db.DBManager.create_session_...
[((400, 419), 'pajbot.web.utils.requires_level', 'requires_level', (['(500)'], {}), '(500)\n', (414, 419), False, 'from pajbot.web.utils import requires_level\n'), ((1729, 1748), 'pajbot.web.utils.requires_level', 'requires_level', (['(500)'], {}), '(500)\n', (1743, 1748), False, 'from pajbot.web.utils import requires_...
# -*- coding: utf-8 -*- """setup.py description. This is a setup.py template for any project. """ from setuptools import setup, find_packages with open('README.md', 'r') as f: long_description = f.read() setup( name='acbm', version='1.0.0', description='Animal-cell-based meat model sensitivity anal...
[ "setuptools.find_packages" ]
[((606, 621), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (619, 621), False, 'from setuptools import setup, find_packages\n')]
import atexit import logging.config from myfunds.config import init_config from myfunds.config import init_env_parser from myfunds.core.models import db_proxy from myfunds.database import init_database from myfunds.tgbot.bot import Bot from myfunds.tgbot.handlers import balance_stats from myfunds.tgbot.handlers import...
[ "myfunds.config.init_config", "myfunds.tgbot.bot.Bot", "myfunds.tgbot.utils.get_logger", "myfunds.config.init_env_parser", "myfunds.core.models.db_proxy.initialize", "myfunds.database.init_database" ]
[((565, 577), 'myfunds.tgbot.utils.get_logger', 'get_logger', ([], {}), '()\n', (575, 577), False, 'from myfunds.tgbot.utils import get_logger\n'), ((657, 674), 'myfunds.config.init_env_parser', 'init_env_parser', ([], {}), '()\n', (672, 674), False, 'from myfunds.config import init_env_parser\n'), ((720, 741), 'myfund...
# encoding: utf-8 from unittest import TestCase from pulp.wsgi.graph.registry import register, graph from pulp.wsgi.graph.exception import * from pulp.wsgi.graph.topo import resolve, leveled @register class A(object): provides = ['foo'] @register class B(object): uses = ['foo', 'bar'] @register class C(ob...
[ "pulp.wsgi.graph.topo.leveled", "pulp.wsgi.graph.registry.graph", "pulp.wsgi.graph.topo.resolve" ]
[((543, 608), 'pulp.wsgi.graph.topo.resolve', 'resolve', (['[(1, 2), (3, 4), (5, 6), (1, 3), (1, 5), (1, 6), (2, 5)]'], {}), '([(1, 2), (3, 4), (5, 6), (1, 3), (1, 5), (1, 6), (2, 5)])\n', (550, 608), False, 'from pulp.wsgi.graph.topo import resolve, leveled\n'), ((649, 706), 'pulp.wsgi.graph.topo.resolve', 'resolve', ...
from typing import Dict import numpy as np import edunet as net from edunet.core import Operation from edunet.core import Variable EPSILON = 1e-6 SEED = 69696969 RANDOM_STATE = np.random.RandomState(SEED) INPUT_DTYPE = np.float64 INPUT_DATA_SHAPE = (1, 6, 6, 3) INPUT_LABELS_SHAPE = (1, 3, 1) data_batch = RANDOM_S...
[ "edunet.Gradients", "edunet.ReduceSum", "edunet.CrossEntropy", "edunet.AveragePool2D", "edunet.SoftArgMax", "edunet.Relu6", "edunet.Relu", "numpy.empty", "edunet.Convolution2D", "edunet.Input", "edunet.Flatten", "edunet.Dense", "numpy.all", "numpy.random.RandomState" ]
[((181, 208), 'numpy.random.RandomState', 'np.random.RandomState', (['SEED'], {}), '(SEED)\n', (202, 208), True, 'import numpy as np\n'), ((527, 554), 'numpy.random.RandomState', 'np.random.RandomState', (['SEED'], {}), '(SEED)\n', (548, 554), True, 'import numpy as np\n'), ((583, 623), 'edunet.Input', 'net.Input', (['...
from copy import deepcopy from traffic_madness.car.simple_car import SimpleCar from traffic_madness.track import Track class SingleLaneTrack(Track): def __init__(self, speed_limit, track_length, max_num_cars): self.speed_limit = speed_limit self.track_length = track_length self.max_num_ca...
[ "traffic_madness.car.simple_car.SimpleCar", "copy.deepcopy" ]
[((604, 643), 'traffic_madness.car.simple_car.SimpleCar', 'SimpleCar', (['(0)'], {'velocity': 'self.speed_limit'}), '(0, velocity=self.speed_limit)\n', (613, 643), False, 'from traffic_madness.car.simple_car import SimpleCar\n'), ((2139, 2195), 'traffic_madness.car.simple_car.SimpleCar', 'SimpleCar', (['(0)'], {'veloci...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 13 20:01:56 2020 @author: usingh """ import os import sys import time import multiprocessing from contextlib import closing import gc #import pyximport; pyximport.install() import orfipy_core as oc import subprocess import orfipy.utils as ut import ...
[ "orfipy_core.start_search", "pyfastx.Fastx", "os.path.exists", "os.makedirs", "subprocess.Popen", "os.path.splitext", "os.path.join", "orfipy.utils.print_notification", "multiprocessing.Pool", "gc.collect", "time.time" ]
[((803, 833), 'orfipy_core.start_search', 'oc.start_search', (['*arglist[:-1]'], {}), '(*arglist[:-1])\n', (818, 833), True, 'import orfipy_core as oc\n'), ((1423, 1435), 'gc.collect', 'gc.collect', ([], {}), '()\n', (1433, 1435), False, 'import gc\n'), ((1754, 1791), 'multiprocessing.Pool', 'multiprocessing.Pool', ([]...
from amaranth_boards.zturn_lite_z010 import * from amaranth_boards.zturn_lite_z010 import __all__ import warnings warnings.warn("instead of nmigen_boards.zturn_lite_z010, use amaranth_boards.zturn_lite_z010", DeprecationWarning, stacklevel=2)
[ "warnings.warn" ]
[((116, 254), 'warnings.warn', 'warnings.warn', (['"""instead of nmigen_boards.zturn_lite_z010, use amaranth_boards.zturn_lite_z010"""', 'DeprecationWarning'], {'stacklevel': '(2)'}), "(\n 'instead of nmigen_boards.zturn_lite_z010, use amaranth_boards.zturn_lite_z010'\n , DeprecationWarning, stacklevel=2)\n", (12...
"""Flask server""" import datetime from flask import Flask, request, jsonify from flask.ext import restful from flask.ext.restful import abort from learning_text_transformer import learner3 as learner from learning_text_transformer import transforms from learning_text_transformer import config app = Flask(__name__) a...
[ "flask.ext.restful.abort", "flask.Flask", "datetime.datetime.utcnow", "learning_text_transformer.config.get", "learning_text_transformer.learner3.get_transform_searcher", "learning_text_transformer.transforms.Serialisation", "flask.request.get_json", "flask.ext.restful.Api", "flask.jsonify" ]
[((303, 318), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (308, 318), False, 'from flask import Flask, request, jsonify\n'), ((325, 341), 'flask.ext.restful.Api', 'restful.Api', (['app'], {}), '(app)\n', (336, 341), False, 'from flask.ext import restful\n'), ((349, 361), 'learning_text_transformer.confi...
import os import datetime from PIL import Image exe_directory = os.getcwd() try: log_file = open("SpriteCheckerLog.txt", "a+") except IOError as e: print("Error using log file: " + str(e)) total_sprites = 0 total_sprites_tmc = 0 total_sprites_wasteful = 0 total_sprites_transparent_top_row = 0 def main(): ...
[ "os.path.join", "os.replace", "os.getcwd", "os.path.dirname", "datetime.datetime.now", "os.path.abspath", "os.walk" ]
[((65, 76), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (74, 76), False, 'import os\n'), ((990, 1012), 'os.walk', 'os.walk', (['exe_directory'], {}), '(exe_directory)\n', (997, 1012), False, 'import os\n'), ((7588, 7639), 'os.replace', 'os.replace', ([], {'src': 'image_filename', 'dst': 'backup_location'}), '(src=image...
""" This module will encompass the code for analyzing the molecular dynamics generated on the simulations as dcd files. It also takes care of the CV generation for further feeding into the MLTSA pipeline. """ import numpy as np import mdtraj as md from itertools import combinations from itertools import permutation...
[ "re.split", "matplotlib.pyplot.title", "mdtraj.compute_distances", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "mdtraj.compute_contacts", "itertools.combinations", "numpy.array", "numpy.sum", "matplotlib.pyplot.figure", "matplotlib.pyplot.close", "mdtraj...
[((1041, 1053), 'mdtraj.load', 'md.load', (['top'], {}), '(top)\n', (1048, 1053), True, 'import mdtraj as md\n'), ((3158, 3189), 'itertools.combinations', 'combinations', (['relevant_atoms', '(2)'], {}), '(relevant_atoms, 2)\n', (3170, 3189), False, 'from itertools import combinations\n'), ((12528, 12540), 'mdtraj.load...
from flask import Blueprint, current_app, request, jsonify from flask_cors import cross_origin from .pvaapi import pvaapi from .accessctrl import accessctrl from .exception import InvalidRequest pvarpc2web = Blueprint('pvarpc2web', __name__) methods = ('GET', 'POST') @pvarpc2web.route('/', methods=methods) @cross_...
[ "flask.request.args.to_dict", "flask_cors.cross_origin", "flask.request.get_json", "flask.current_app.logger.info", "flask.Blueprint", "flask.jsonify" ]
[((211, 244), 'flask.Blueprint', 'Blueprint', (['"""pvarpc2web"""', '__name__'], {}), "('pvarpc2web', __name__)\n", (220, 244), False, 'from flask import Blueprint, current_app, request, jsonify\n'), ((314, 328), 'flask_cors.cross_origin', 'cross_origin', ([], {}), '()\n', (326, 328), False, 'from flask_cors import cro...
import unittest # import io # import sys import lecture_cdn as sut class TestLectureCDN(unittest.TestCase): def test_get_tokens(self): tokens = sut.extract_tokens('trainer:housey;course:csharp-oop-basics;lecture:polymorphism;duration:3h05m') self.assertSequenceEqual( sorted(['polymorph...
[ "lecture_cdn.extract_tokens", "unittest.TextTestRunner", "unittest.TestLoader" ]
[((158, 265), 'lecture_cdn.extract_tokens', 'sut.extract_tokens', (['"""trainer:housey;course:csharp-oop-basics;lecture:polymorphism;duration:3h05m"""'], {}), "(\n 'trainer:housey;course:csharp-oop-basics;lecture:polymorphism;duration:3h05m'\n )\n", (176, 265), True, 'import lecture_cdn as sut\n'), ((467, 574), '...
import mcell as m from parameters import * from subsystem import * from geometry import * # ---- observables ---- viz_output = m.VizOutput( mode = m.VizMode.ASCII, output_files_prefix = './viz_data/seed_' + str(get_seed()).zfill(5) + '/Scene', every_n_timesteps = 100 ) # declaration of rxn rules defined...
[ "mcell.Observables" ]
[((363, 378), 'mcell.Observables', 'm.Observables', ([], {}), '()\n', (376, 378), True, 'import mcell as m\n')]
from __future__ import unicode_literals from django.shortcuts import render from django.utils import timezone from .models import Project def project_list(request): projects = Project.objects.all() return render(request, 'portfolio/project_list.html', {'projects': projects}) def project_detail(request): try: de...
[ "django.shortcuts.render" ]
[((209, 279), 'django.shortcuts.render', 'render', (['request', '"""portfolio/project_list.html"""', "{'projects': projects}"], {}), "(request, 'portfolio/project_list.html', {'projects': projects})\n", (215, 279), False, 'from django.shortcuts import render\n'), ((413, 483), 'django.shortcuts.render', 'render', (['req...
import time import threading from urllib.request import urlopen, Request from concurrent.futures import ThreadPoolExecutor from queue import Queue # Header with user agent is needed to allow access for scraping HEADER = {'User-Agent': 'Mozilla/5.0'} URLS = ['https://www.volvocars.com/se', 'https://consid.se/',...
[ "concurrent.futures.ThreadPoolExecutor", "urllib.request.Request", "threading.Thread", "queue.Queue", "time.time", "urllib.request.urlopen" ]
[((1682, 1710), 'urllib.request.Request', 'Request', (['URL'], {'headers': 'HEADER'}), '(URL, headers=HEADER)\n', (1689, 1710), False, 'from urllib.request import urlopen, Request\n'), ((2107, 2114), 'queue.Queue', 'Queue', ([], {}), '()\n', (2112, 2114), False, 'from queue import Queue\n'), ((1423, 1434), 'time.time',...
import os from datetime import datetime import sys class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' def nominal(message, verbose): if verbose is True: ...
[ "datetime.datetime.now", "sys.stdout.write" ]
[((482, 506), 'sys.stdout.write', 'sys.stdout.write', (['status'], {}), '(status)\n', (498, 506), False, 'import sys\n'), ((723, 747), 'sys.stdout.write', 'sys.stdout.write', (['status'], {}), '(status)\n', (739, 747), False, 'import sys\n'), ((973, 997), 'sys.stdout.write', 'sys.stdout.write', (['status'], {}), '(stat...
#!/usr/bin/env python3 import time from networktables import NetworkTables import logging # To see messages from networktables, you must setup logging logging.basicConfig(level=logging.DEBUG) NetworkTables.initialize(server="localhost") nt = NetworkTables.getTable("Peariscope") time.sleep(1) while True: print("...
[ "logging.basicConfig", "networktables.NetworkTables.initialize", "time.sleep", "networktables.NetworkTables.getTable" ]
[((153, 193), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (172, 193), False, 'import logging\n'), ((195, 239), 'networktables.NetworkTables.initialize', 'NetworkTables.initialize', ([], {'server': '"""localhost"""'}), "(server='localhost')\n", (219, 239), F...
#!/usr/bin/env python from shutil import copytree, copy2 from pathlib import Path fg_src_dir = Path("~/Goodhertz/fontgoggles/Lib/fontgoggles").expanduser() fg_dst_dir = Path(__file__).parent / "drafting/fontgoggles" fg_dst_dir.mkdir(exist_ok=True) copy2(fg_src_dir.parent.parent / "LICENSE.txt", fg_dst_dir / "LICENS...
[ "shutil.copytree", "pathlib.Path", "shutil.copy2" ]
[((252, 327), 'shutil.copy2', 'copy2', (["(fg_src_dir.parent.parent / 'LICENSE.txt')", "(fg_dst_dir / 'LICENSE.txt')"], {}), "(fg_src_dir.parent.parent / 'LICENSE.txt', fg_dst_dir / 'LICENSE.txt')\n", (257, 327), False, 'from shutil import copytree, copy2\n'), ((527, 603), 'shutil.copytree', 'copytree', (['(fg_src_dir ...
import requests from scaleout.errors import AuthenticationError import json def login(url,username,password): """ Login to Studio services. """ def get_bearer_token(url, username, password): """ Exchange username,password for an auth token. TODO: extend to get creds from keyring. """ data = { ...
[ "json.loads", "requests.post" ]
[((388, 417), 'requests.post', 'requests.post', (['url'], {'data': 'data'}), '(url, data=data)\n', (401, 417), False, 'import requests\n'), ((463, 484), 'json.loads', 'json.loads', (['r.content'], {}), '(r.content)\n', (473, 484), False, 'import json\n')]
import csv import math import matplotlib.pyplot as plt import matplotlib.animation as animation import time import numpy as np # read the data csvfile=open("weightedX.csv", 'r') x = list(csv.reader(csvfile)) csvfile=open("weightedY.csv", 'r') y = list(csv.reader(csvfile)) m=len(x) n=1 x3=[] y2=[] for i in range(m): ...
[ "numpy.transpose", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "math.sqrt", "matplotlib.pyplot.ioff", "numpy.array", "matplotlib.pyplot.figure", "numpy.dot", "matplotlib.pyplot.ion", "matplotlib.pyplot.title", "math.exp", "matplotlib.pyplot.pause", "csv.reader", "matplotlib.pyp...
[((489, 501), 'math.sqrt', 'math.sqrt', (['v'], {}), '(v)\n', (498, 501), False, 'import math\n'), ((612, 624), 'numpy.array', 'np.array', (['x2'], {}), '(x2)\n', (620, 624), True, 'import numpy as np\n'), ((627, 639), 'numpy.array', 'np.array', (['y2'], {}), '(y2)\n', (635, 639), True, 'import numpy as np\n'), ((683, ...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' TERRAFORM_BIN = os.environ.get('MCAM_TERRAFORM_BIN') or '/usr/local/bin/terraform' PLAN_DIR = os.environ.get('MCAM_PLAN_DIR') or '/plans' RQ_REDIS_URL = os....
[ "os.path.dirname", "os.environ.get", "os.getenv" ]
[((37, 62), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (52, 62), False, 'import os\n'), ((97, 125), 'os.environ.get', 'os.environ.get', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (111, 125), False, 'import os\n'), ((172, 208), 'os.environ.get', 'os.environ.get', (['"""MCAM_TERRAFORM_...
""" Main file for streaming Multicam tracker for 360 degree usecase """ __version__ = '0.2' import argparse import json import logging import signal import sys from mctrack import mctrackstream logging.basicConfig(filename='mctracker360.log', level=logging.INFO) DEFAULT_CONSUMER_KAFKA_BOOTSTRAP_SERVER_URL = "kafka" ...
[ "logging.basicConfig", "signal.signal", "argparse.ArgumentParser", "mctrack.mctrackstream.McTrackerStream", "sys.exc_info", "logging.error" ]
[((197, 265), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""mctracker360.log"""', 'level': 'logging.INFO'}), "(filename='mctracker360.log', level=logging.INFO)\n", (216, 265), False, 'import logging\n'), ((826, 884), 'logging.error', 'logging.error', (['"""Multicam tracker got a signal: %d"""', 's...
import torch import torch.nn as nn import torch_geometric as pyg import torch.nn.functional as F from sklearn import metrics from sklearn.cluster import KMeans import community ## For calculating modularity def vGraph_loss(c, recon_c, prior, q): ''' c: The original node value recon_c: The reconstructed n...
[ "torch.log", "torch.load", "torch.cuda.is_available", "torch.nn.functional.cross_entropy", "torch.save", "torch.zeros" ]
[((856, 904), 'torch.load', 'torch.load', (['ckpt_path'], {'map_location': 'map_location'}), '(ckpt_path, map_location=map_location)\n', (866, 904), False, 'import torch\n'), ((1113, 1141), 'torch.save', 'torch.save', (['state', 'save_path'], {}), '(state, save_path)\n', (1123, 1141), False, 'import torch\n'), ((1451, ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-19 12:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djangocms_salesforce_forms', '0006_auto_20171212_1453'), ] operations = [ m...
[ "django.db.models.CharField" ]
[((431, 679), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'choices': "[('redirect_to_page', 'CMS Page'), ('redirect_to_url', 'Absolute URL')]", 'help_text': '"""Where to redirect the user when the form has been successfully sent?"""', 'max_length': '(20)', 'verbose_name': '"""Redirect to"...
from academicInfo.models import Department from staff.models import Staff from student.models import Student from django.contrib.auth.models import User from django.shortcuts import reverse from django.test import Client, TestCase from django.utils import timezone class StudentProfileTest(TestCase): @classmet...
[ "staff.models.Staff.objects.create", "django.utils.timezone.now", "academicInfo.models.Department.objects.create", "student.models.Student.objects.create", "django.shortcuts.reverse", "django.contrib.auth.models.User.objects.create_user", "django.test.Client" ]
[((417, 466), 'academicInfo.models.Department.objects.create', 'Department.objects.create', ([], {'name': '"""test department"""'}), "(name='test department')\n", (442, 466), False, 'from academicInfo.models import Department\n'), ((483, 569), 'django.contrib.auth.models.User.objects.create_user', 'User.objects.create_...
# copytrue (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 applicab...
[ "os.path.join", "pickle.load", "pickle.dump", "random.shuffle" ]
[((2185, 2210), 'random.shuffle', 'random.shuffle', (['all_files'], {}), '(all_files)\n', (2199, 2210), False, 'import random\n'), ((1814, 1834), 'pickle.dump', 'pickle.dump', (['info', 'f'], {}), '(info, f)\n', (1825, 1834), False, 'import pickle\n'), ((1952, 1966), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', ...
import math import numpy as np import matlab.engine from pyomo.environ import * from pyomo.dae import * from pyomo.gdp import * from pyomo.gdp.plugins.chull import ConvexHull_Transformation from pyomo.gdp.plugins.bigm import BigM_Transformation from pyomo.core import Var from pyomo.dae.plugins.finitedifference import F...
[ "numpy.atleast_2d", "pyomo.core.Var", "math.sqrt", "pyomo.gdp.plugins.chull.ConvexHull_Transformation", "numpy.array", "numpy.arctan", "numpy.vstack", "numpy.cumsum", "numpy.matrix", "numpy.atleast_1d" ]
[((2724, 2743), 'numpy.matrix', 'np.matrix', (['"""0.; 0."""'], {}), "('0.; 0.')\n", (2733, 2743), True, 'import numpy as np\n'), ((3561, 3615), 'numpy.cumsum', 'np.cumsum', (['([0.0] + [m.dt[ti].value for ti in m.t][:-1])'], {}), '([0.0] + [m.dt[ti].value for ti in m.t][:-1])\n', (3570, 3615), True, 'import numpy as n...
import numpy as np from scipy.spatial import distance from Quaternions import Quaternions import Animation import AnimationStructure def constrain(positions, constraints): """ Constrain animation positions given a number of VerletParticles constrains Parameters ---------- ...
[ "pymel.core.nodetypes.AnimCurveTU", "numpy.array", "pymel.core.runtime.AttachBrushToCurves", "pymel.core.connectAttr", "VerletParticles.VerletParticles", "pymel.core.selected", "numpy.concatenate", "numpy.min", "pymel.core.setAttr", "scipy.spatial.distance.pdist", "pymel.core.select", "Quatern...
[((861, 914), 'VerletParticles.VerletParticles', 'VerletParticles', (['positions'], {'gravity': '(0.0)', 'timestep': '(0.0)'}), '(positions, gravity=0.0, timestep=0.0)\n', (876, 914), False, 'from VerletParticles import VerletParticles\n'), ((2233, 2247), 'numpy.array', 'np.array', (['keys'], {}), '(keys)\n', (2241, 22...
from config import get_env class EnvConfig(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET = get_env("SECRET") SQLALCHEMY_DATABASE_URI = get_env("DATABASE_URL") class DevelopmentEnv(EnvConfig): """Configurations for Development.""" DEBUG = True cla...
[ "config.get_env" ]
[((148, 165), 'config.get_env', 'get_env', (['"""SECRET"""'], {}), "('SECRET')\n", (155, 165), False, 'from config import get_env\n'), ((196, 219), 'config.get_env', 'get_env', (['"""DATABASE_URL"""'], {}), "('DATABASE_URL')\n", (203, 219), False, 'from config import get_env\n')]
import os import sys import gzip import bz2 import argparse import logging import csv import urllib.request import codecs from collections import OrderedDict def Decode(x): """ Decoding input, if needed """ try: x = x.decode('utf-8') except AttributeError: pass return x def Op...
[ "bz2.open", "gzip.open" ]
[((455, 477), 'bz2.open', 'bz2.open', (['infile', 'mode'], {}), '(infile, mode)\n', (463, 477), False, 'import bz2\n'), ((526, 549), 'gzip.open', 'gzip.open', (['infile', 'mode'], {}), '(infile, mode)\n', (535, 549), False, 'import gzip\n')]
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ "re.compile" ]
[((720, 758), 're.compile', 're.compile', (["b'^([^a-zA-Z0-9~^]*)(.*)$'"], {}), "(b'^([^a-zA-Z0-9~^]*)(.*)$')\n", (730, 758), False, 'import re\n'), ((772, 801), 're.compile', 're.compile', (["b'^([\\\\d]+)(.*)$'"], {}), "(b'^([\\\\d]+)(.*)$')\n", (782, 801), False, 'import re\n'), ((816, 848), 're.compile', 're.compil...
import streamlit as st from multiapp import MultiApp from pages import cases, deaths, home, internals, maps, recoveries, report from sentry import set_sentry set_sentry() st.set_page_config( layout="wide", menu_items={ "Get Help": "https://github.com/blopezpi/mid-project-bdmlpt1021/blob/main/README.md...
[ "sentry.set_sentry", "multiapp.MultiApp", "streamlit.set_page_config" ]
[((159, 171), 'sentry.set_sentry', 'set_sentry', ([], {}), '()\n', (169, 171), False, 'from sentry import set_sentry\n'), ((173, 443), 'streamlit.set_page_config', 'st.set_page_config', ([], {'layout': '"""wide"""', 'menu_items': "{'Get Help':\n 'https://github.com/blopezpi/mid-project-bdmlpt1021/blob/main/README.md...
# coding=utf-8 # Copyright 2020 The Trax Authors. # # 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 a...
[ "trax.layers.to_list", "trax.layers.ParametricRelu", "absl.testing.absltest.main", "numpy.array", "trax.layers.Relu", "trax.layers.LeakyRelu", "trax.layers.HardTanh", "trax.layers.HardSigmoid" ]
[((1817, 1832), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (1830, 1832), False, 'from absl.testing import absltest\n'), ((822, 831), 'trax.layers.Relu', 'tl.Relu', ([], {}), '()\n', (829, 831), True, 'import trax.layers as tl\n'), ((840, 882), 'numpy.array', 'np.array', (['[-2.0, -1.0, 0.0, 2.0, 3...
from django import forms import datetime as dt from .models import Product from django.utils.safestring import mark_safe class UploadImage(forms.ModelForm): picture = forms.ImageField(label = "Product Picture", required=False) class Meta: model = Product fields = ['picture'] class CreateProdu...
[ "django.forms.ImageField", "django.forms.FloatField", "django.forms.URLField", "django.forms.TextInput" ]
[((172, 229), 'django.forms.ImageField', 'forms.ImageField', ([], {'label': '"""Product Picture"""', 'required': '(False)'}), "(label='Product Picture', required=False)\n", (188, 229), False, 'from django import forms\n'), ((425, 486), 'django.forms.URLField', 'forms.URLField', ([], {'label': '"""Printful Product Link"...
from ..._common import block_to_format, str2format from ..._io.input.tough._helpers import write_record def block(keyword): """Decorate block writing functions.""" def decorator(func): from functools import wraps header = "----1----*----2----*----3----*----4----*----5----*----6----*----7----...
[ "functools.wraps" ]
[((338, 349), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (343, 349), False, 'from functools import wraps\n')]
''' This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. Copyright 2020, <NAME> <<EMAIL>> All rights reserved. ''' import numpy as np import cv2 import math import matplotlib.pyplot ...
[ "PIL.Image.open", "matplotlib.pyplot.savefig", "pathlib.Path", "utilities.classicalUtils.classicalUtilitiesPY.normalize", "utilities.classicalUtils.classicalUtilitiesPY.gaussianSmoothing", "numpy.array", "utilities.cameraUtils.Camera.cameraMod", "utilities.classicalUtils.classicalUtilitiesPY.scaling",...
[((702, 763), 'cv2.imread', 'cv2.imread', (['"""./data/foreman/frame5.png"""', 'cv2.IMREAD_GRAYSCALE'], {}), "('./data/foreman/frame5.png', cv2.IMREAD_GRAYSCALE)\n", (712, 763), False, 'import cv2\n'), ((771, 832), 'cv2.imread', 'cv2.imread', (['"""./data/foreman/frame7.png"""', 'cv2.IMREAD_GRAYSCALE'], {}), "('./data/...
# This is a sample Python script. import time import functools import sys import numpy as np # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. sys.setrecursionlimit(10 ** 9) def find_squares_opt(array): ...
[ "sys.setrecursionlimit", "numpy.array", "time.time" ]
[((255, 285), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 9)'], {}), '(10 ** 9)\n', (276, 285), False, 'import sys\n'), ((326, 341), 'numpy.array', 'np.array', (['array'], {}), '(array)\n', (334, 341), True, 'import numpy as np\n'), ((1003, 1014), 'time.time', 'time.time', ([], {}), '()\n', (1012, 1014)...
from hyperopt import hp fixed_values= { "match_cost": 1.0, "gap_penalty": 1.0, "mismatch_penalty": 1.0, "const_match": False, "const_gap": False, "const_mismatch": False, "brodie_function": False, "no_norm": False, "df_coef": 0.0, "diff_coef": 1.0, "sigmoid": Fals...
[ "hyperopt.hp.uniform", "hyperopt.hp.choice" ]
[((527, 560), 'hyperopt.hp.uniform', 'hp.uniform', (['"""pos_coef"""', '(0.0)', '(30.0)'], {}), "('pos_coef', 0.0, 30.0)\n", (537, 560), False, 'from hyperopt import hp\n'), ((579, 613), 'hyperopt.hp.uniform', 'hp.uniform', (['"""diff_coef"""', '(0.0)', '(30.0)'], {}), "('diff_coef', 0.0, 30.0)\n", (589, 613), False, '...
import numpy as np import torch from torch.utils.data import Dataset import numpy as np from ad3 import factor_graph as fg try: import cPickle as pickle except: import pickle from tqdm import tqdm import time from .random_pgm_data import RandomPGMData, worker_init_fn len = 100000 class RandomPGMHop(Dataset):...
[ "numpy.asarray", "numpy.argmax", "ad3.factor_graph.PFactorGraph", "numpy.zeros", "numpy.random.randint", "numpy.random.uniform", "numpy.transpose" ]
[((726, 743), 'ad3.factor_graph.PFactorGraph', 'fg.PFactorGraph', ([], {}), '()\n', (741, 743), True, 'from ad3 import factor_graph as fg\n'), ((1385, 1436), 'numpy.random.uniform', 'np.random.uniform', (['(0.0)', '(1.0)', '(self.chain_length, 2)'], {}), '(0.0, 1.0, (self.chain_length, 2))\n', (1402, 1436), True, 'impo...
#!/usr/bin/env python import numpy as np import math import chainer import chainer.functions as F import chainer.links as L from chainer import cuda, optimizers, serializers, Variable from chainer import function from chainer.utils import type_check class UNET(chainer.Chain): def __init__(self): super...
[ "chainer.links.Deconvolution2D", "chainer.functions.softmax_cross_entropy", "chainer.functions.concat", "math.sqrt", "chainer.links.BatchNormalization", "chainer.functions.mean_absolute_error", "chainer.links.Convolution2D", "chainer.report" ]
[((3215, 3242), 'chainer.functions.mean_absolute_error', 'F.mean_absolute_error', (['h', 't'], {}), '(h, t)\n', (3236, 3242), True, 'import chainer.functions as F\n'), ((3251, 3287), 'chainer.report', 'chainer.report', (["{'loss': loss}", 'self'], {}), "({'loss': loss}, self)\n", (3265, 3287), False, 'import chainer\n'...
import configparser from contextlib import contextmanager from argparse import ArgumentParser @contextmanager def config_override(config, args): try: # save original section values so we can reapply them later old_values = {} for section_name in config.sections(): section = get...
[ "aspyre.config.sections", "configparser.ConfigParser" ]
[((276, 293), 'aspyre.config.sections', 'config.sections', ([], {}), '()\n', (291, 293), False, 'from aspyre import config\n'), ((2155, 2209), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {'inline_comment_prefixes': '"""#"""'}), "(inline_comment_prefixes='#')\n", (2180, 2209), False, 'import configpar...
import os import csv import shutil import hashlib import tempfile import numpy as np import pandas as pd from rdkit import Chem from rdkit.Chem import AllChem, MACCSkeys from rdkit.Chem import MolFromSmiles from padelpy import padeldescriptor # required to calculate KlekotaRothFingerPrint from metstab_shap.config imp...
[ "numpy.sqrt", "hashlib.md5", "numpy.ones", "numpy.hstack", "pandas.read_csv", "os.getenv", "rdkit.Chem.MACCSkeys.GenMACCSKeys", "numpy.log", "os.path.join", "rdkit.Chem.MolFromSmiles", "rdkit.Chem.AllChem.GetMorganFingerprintAsBitVect", "os.getcwd", "numpy.exp", "numpy.array", "os.path.r...
[((853, 890), 'numpy.vstack', 'np.vstack', (['[el[0] for el in datasets]'], {}), '([el[0] for el in datasets])\n', (862, 890), True, 'import numpy as np\n'), ((899, 936), 'numpy.hstack', 'np.hstack', (['[el[1] for el in datasets]'], {}), '([el[1] for el in datasets])\n', (908, 936), True, 'import numpy as np\n'), ((950...
from flask import render_template, request, redirect, url_for, abort,flash from . import main from ..models import User, Post from .. import db from .forms import UpdateProfile,PostForm from flask_login import login_required, current_user import datetime from ..requests import get_quote # Views @main.route('/') def...
[ "flask.render_template", "flask.abort", "flask.flash", "flask.url_for" ]
[((531, 598), 'flask.render_template', 'render_template', (['"""index.html"""'], {'title': 'title', 'posts': 'post', 'quote': 'quote'}), "('index.html', title=title, posts=post, quote=quote)\n", (546, 598), False, 'from flask import render_template, request, redirect, url_for, abort, flash\n'), ((645, 689), 'flask.rend...
from django.db import models from django.utils.translation import ugettext_lazy as _ from core.models import AbstractBaseModel class RawCompany(AbstractBaseModel): """ Data which should be processed to obtain Company """ name = models.CharField(_('Raw company name'), max_length=255) def __str__(self): ...
[ "django.utils.translation.ugettext_lazy" ]
[((256, 277), 'django.utils.translation.ugettext_lazy', '_', (['"""Raw company name"""'], {}), "('Raw company name')\n", (257, 277), True, 'from django.utils.translation import ugettext_lazy as _\n')]
#! /usr/bin/env python3 """ Copyright 2021 <NAME>. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ "tensorflow.keras.layers.MaxPool1D", "tensorflow.keras.layers.Dense", "sys.exit", "absl.flags.DEFINE_enum", "absl.flags.DEFINE_float", "os.listdir", "absl.flags.DEFINE_boolean", "absl.app.run", "os.path.isdir", "pandas.DataFrame", "tensorflow.keras.layers.Conv1D", "stellargraph.utils.plot_hist...
[((1007, 1027), 'silence_tensorflow.silence_tensorflow', 'silence_tensorflow', ([], {}), '()\n', (1025, 1027), False, 'from silence_tensorflow import silence_tensorflow\n'), ((1980, 2019), 'pandas.DataFrame', 'pd.DataFrame', (['n_features'], {'index': 'n_index'}), '(n_features, index=n_index)\n', (1992, 2019), True, 'i...
import os from colorama import Fore, Back, Style import colorama import rlcompleter import readline from peepshow.utils.system import OS_IS_WINDOWS _completer_suggestions = {} class Completer(rlcompleter.Completer): def complete_ex(self, *args, **kwargs): buf = readline.get_line_buffer().strip() i...
[ "readline.set_completer", "readline.parse_and_bind", "readline.get_line_buffer", "readline.set_startup_hook", "readline.set_history_length", "readline.insert_text", "os.system", "colorama.init" ]
[((601, 646), 'readline.set_completer', 'readline.set_completer', (['completer.complete_ex'], {}), '(completer.complete_ex)\n', (623, 646), False, 'import readline\n'), ((651, 691), 'readline.parse_and_bind', 'readline.parse_and_bind', (['"""tab: complete"""'], {}), "('tab: complete')\n", (674, 691), False, 'import rea...
import re import os IMDB_URL_REGEX = re.compile(r'^http://www.imdb.com/title/(tt[0-9]+)/$', re.IGNORECASE) IMDB_ID_REGEX = re.compile(r'(tt\d{7})') def find_nfos(directory): return [os.path.join(directory, f) for f in os.listdir(directory) if f.endswith('.nfo')] def extra...
[ "os.listdir", "os.path.join", "re.compile" ]
[((38, 106), 're.compile', 're.compile', (['"""^http://www.imdb.com/title/(tt[0-9]+)/$"""', 're.IGNORECASE'], {}), "('^http://www.imdb.com/title/(tt[0-9]+)/$', re.IGNORECASE)\n", (48, 106), False, 'import re\n'), ((152, 176), 're.compile', 're.compile', (['"""(tt\\\\d{7})"""'], {}), "('(tt\\\\d{7})')\n", (162, 176), Fa...
import asyncio import requests import queue class TaskGenerator(): def __init__(self): self.queue = queue.Queue(10) def append_task(self, ): pass async def get_data(task_id): #print("start get data from", task_id) await asyncio.sleep(3) # for i in range(5000000): # pass #print("ge...
[ "queue.Queue", "asyncio.get_event_loop", "requests.get", "asyncio.sleep" ]
[((449, 487), 'requests.get', 'requests.get', (['"""http://127.0.0.1:5000/"""'], {}), "('http://127.0.0.1:5000/')\n", (461, 487), False, 'import requests\n'), ((563, 587), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (585, 587), False, 'import asyncio\n'), ((113, 128), 'queue.Queue', 'queue.Que...
import sys import os from scapy.all import * from datetime import datetime import requests from scapy import * from threading import Thread, Event, Lock from time import sleep IFACE_NAME = "Intel(R) Wireless-AC 9560 160MHz" MAC_URL = 'http://macvendors.co/api/%s' data_lock = Lock() dispositivos = [] class Sniffe...
[ "threading.Lock", "time.sleep", "requests.get", "datetime.datetime.now", "os.system" ]
[((280, 286), 'threading.Lock', 'Lock', ([], {}), '()\n', (284, 286), False, 'from threading import Thread, Event, Lock\n'), ((3744, 3758), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (3756, 3758), False, 'from datetime import datetime\n'), ((5280, 5290), 'time.sleep', 'sleep', (['(100)'], {}), '(100)\n'...