code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
""" This represents all the contents of an experiment on a per sample, per well basis, whereas the Django models represent contents per plate. Most of the code simply transforms values to useful representations for display. For tests, see main/tests.py. """ import logging import os from io import BytesIO from typing...
[ "pandas.DataFrame", "pandas.notna", "io.BytesIO", "crispresso.fastqs.reverse_complement", "main.models.PrimerSelection.objects.filter", "os.path.basename", "pandas.read_csv", "utils.manuscore.manu_score", "utils.primerchecks.is_self_binding", "utils.primerchecks.is_self_binding_with_adapters", "...
[((812, 839), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (829, 839), False, 'import logging\n'), ((8220, 8351), 'utils.hdr.HDR', 'hdr.HDR', (["row['target_seq']", "row['_hdr_seq']", "row['_hdr_tag']", "row['hdr_dist']", "row['_guide_strand_same']", "row['_seq_codon_at']"], {}), "(row[...
import jsonpickle from model.contact import Contact import os.path import getopt, sys try: opts, args = getopt.getopt(sys.argv[1:], "f", ["file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) f = 'data/contacts.json' for o, a in opts: if o == "-f": f = a testdata = [Contact(f...
[ "model.contact.Contact.generate_random_email", "model.contact.Contact.generate_random_phone", "getopt.usage", "getopt.getopt", "model.contact.Contact.generate_random_name", "jsonpickle.set_encoder_options", "model.contact.Contact.generate_random_address", "sys.exit", "jsonpickle.encode" ]
[((109, 151), 'getopt.getopt', 'getopt.getopt', (['sys.argv[1:]', '"""f"""', "['file']"], {}), "(sys.argv[1:], 'f', ['file'])\n", (122, 151), False, 'import getopt, sys\n'), ((948, 996), 'jsonpickle.set_encoder_options', 'jsonpickle.set_encoder_options', (['"""json"""'], {'indent': '(2)'}), "('json', indent=2)\n", (978...
# -*- coding: utf-8 -*- """ Created on Fri Feb 7 15:41:54 2020 @author: xavier.mouy """ import sys sys.path.append("..") # Adds higher directory to python modules path. from ecosound.core.audiotools import Sound from ecosound.core.spectrogram import Spectrogram from ecosound.detection.detector_builder import Detect...
[ "sys.path.append", "ecosound.detection.detector_builder.DetectorFactory", "time.perf_counter", "ecosound.measurements.measurer_builder.MeasurerFactory", "ecosound.core.audiotools.Sound", "ecosound.core.spectrogram.Spectrogram" ]
[((102, 123), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (117, 123), False, 'import sys\n'), ((1073, 1092), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (1090, 1092), False, 'import time\n'), ((1120, 1146), 'ecosound.core.audiotools.Sound', 'Sound', (['single_channel_file'], {}...
"""SKY API Authentication/Query Scripts Modified from code by <NAME> (<EMAIL>, <EMAIL>) Python functions to a) Get an initial SKYApi token/refresh token and write them to a local file b) Make subsequent refreshes and updates to the SKYApi authentication based on tokens in the files. """ # import ...
[ "djkatha.core.sky_api_calls.get_lookup_id", "djkatha.core.sky_api_auth.fn_do_token", "django.core.cache.cache.get", "djimix.core.utils.get_connection", "djimix.core.utils.xsql" ]
[((1523, 1543), 'djimix.core.utils.get_connection', 'get_connection', (['EARL'], {}), '(EARL)\n', (1537, 1543), False, 'from djimix.core.utils import get_connection\n'), ((1990, 2003), 'djkatha.core.sky_api_auth.fn_do_token', 'fn_do_token', ([], {}), '()\n', (2001, 2003), False, 'from djkatha.core.sky_api_auth import f...
import glob from keras.preprocessing import image import numpy as np import pandas as pd # 模型以及参数位置 MODEL_NAME = "captcha_adam_binary_crossentropy_bs_256_epochs_45.h5" MODEL_PATH = 'model/95.67/' import sys sys.path.append(MODEL_PATH) from pre_model import model # 参数以及模型对应的超参数 TEST_NAME = glob.glob("data/Test_A/"...
[ "sys.path.append", "pandas.DataFrame", "pre_model.model", "keras.preprocessing.image.img_to_array", "keras.preprocessing.image.load_img", "numpy.array", "glob.glob" ]
[((211, 238), 'sys.path.append', 'sys.path.append', (['MODEL_PATH'], {}), '(MODEL_PATH)\n', (226, 238), False, 'import sys\n'), ((296, 331), 'glob.glob', 'glob.glob', (["('data/Test_A/' + '*.jpg')"], {}), "('data/Test_A/' + '*.jpg')\n", (305, 331), False, 'import glob\n'), ((518, 562), 'pre_model.model', 'model', (['in...
""" Tests for StopWord """ import os import sys from unittest import TestCase from mots_vides.stop_words import StopWord from mots_vides.factory import StopWordFactory class StopWordTestCase(TestCase): def setUp(self): self.sw = StopWord('foo', ['foo', 'bar', 'baz']) def test_len(self): sel...
[ "os.path.dirname", "os.path.join", "mots_vides.factory.StopWordFactory", "mots_vides.stop_words.StopWord" ]
[((245, 283), 'mots_vides.stop_words.StopWord', 'StopWord', (['"""foo"""', "['foo', 'bar', 'baz']"], {}), "('foo', ['foo', 'bar', 'baz'])\n", (253, 283), False, 'from mots_vides.stop_words import StopWord\n'), ((579, 618), 'mots_vides.stop_words.StopWord', 'StopWord', (['"""bar"""', "['baz', 'qux', 'norf']"], {}), "('b...
from os import path import setuptools try: from bin import get_version def local_version(): return get_version.get_version() except Exception: def local_version(): return "undefined" def long_description(): this_directory = path.abspath(path.dirname(__file__)) try: with o...
[ "os.path.dirname", "os.path.join", "bin.get_version.get_version" ]
[((117, 142), 'bin.get_version.get_version', 'get_version.get_version', ([], {}), '()\n', (140, 142), False, 'from bin import get_version\n'), ((273, 295), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (285, 295), False, 'from os import path\n'), ((324, 362), 'os.path.join', 'path.join', (['thi...
'''Level 14: ITALY ''' from PIL import Image import requests from io import BytesIO # use cStringIO.StringIO if python2 from itertools import cycle def solution(): '''Twist line into square ''' res = requests.get('http://www.pythonchallenge.com/pc/return/wire.png', auth=('huge', 'file')) img = Image.o...
[ "itertools.cycle", "PIL.Image.new", "io.BytesIO", "requests.get" ]
[((214, 307), 'requests.get', 'requests.get', (['"""http://www.pythonchallenge.com/pc/return/wire.png"""'], {'auth': "('huge', 'file')"}), "('http://www.pythonchallenge.com/pc/return/wire.png', auth=(\n 'huge', 'file'))\n", (226, 307), False, 'import requests\n'), ((358, 399), 'itertools.cycle', 'cycle', (['[(1, 0),...
from alento_bot import BaseUserCache, ConfigData, StorageManager from evelib import EVEManager, SolarSystemData, PlanetData, TypeData, TypeManager, UniverseManager from eve_module.storage.eve_config import EVEConfig from eve_module.storage.user_auth import EVEUserAuthManager from discord.ext import commands from dateti...
[ "datetime.datetime.utcnow", "evelib.PlanetData", "datetime.datetime.strptime", "yaml.safe_load", "evelib.SolarSystemData", "logging.getLogger" ]
[((406, 435), 'logging.getLogger', 'logging.getLogger', (['"""main_bot"""'], {}), "('main_bot')\n", (423, 435), False, 'import logging\n'), ((1342, 1372), 'yaml.safe_load', 'yaml.safe_load', (['schematic_file'], {}), '(schematic_file)\n', (1356, 1372), False, 'import yaml\n'), ((1794, 1811), 'datetime.datetime.utcnow',...
from unittest import TestCase from longestPalindromeSubseq import Solution class TestSolution(TestCase): def test_longestPalindrome02(self): self.assertEqual(Solution().longestPalindrome02('abccba'), 'abccba') def test_longestPalindrome02_1(self): self.assertEqual(Solution().longestPal...
[ "longestPalindromeSubseq.Solution" ]
[((171, 181), 'longestPalindromeSubseq.Solution', 'Solution', ([], {}), '()\n', (179, 181), False, 'from longestPalindromeSubseq import Solution\n'), ((299, 309), 'longestPalindromeSubseq.Solution', 'Solution', ([], {}), '()\n', (307, 309), False, 'from longestPalindromeSubseq import Solution\n'), ((413, 423), 'longest...
from pid import PID from lowpass import LowPassFilter from yaw_controller import YawController import rospy GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, vehicle_mass, fuel_capacity, brake_deadband, decel_limit, accel_limit, wheel_radius, wheel_base, steer_...
[ "pid.PID", "rospy.get_time", "yaw_controller.YawController", "lowpass.LowPassFilter" ]
[((410, 485), 'yaw_controller.YawController', 'YawController', (['wheel_base', 'steer_ratio', '(0.1)', 'max_lat_accel', 'max_steer_angle'], {}), '(wheel_base, steer_ratio, 0.1, max_lat_accel, max_steer_angle)\n', (423, 485), False, 'from yaw_controller import YawController\n'), ((609, 632), 'pid.PID', 'PID', (['kp', 'k...
from ...core.utils import ctypes_wrap from .misc import default_placing_message, load_lib import ctypes import os.path import contextlib import platform ##### Constants ##### Shamrock_errorcodes = { 20201: "SHAMROCK_COMMUNICATION_ERROR", 20202: "SHAMROCK_SUCCESS", 20266: "SHAMROCK_P1INVALID", 20267: "SHAMRO...
[ "platform.machine", "platform.architecture", "ctypes.POINTER" ]
[((2417, 2447), 'ctypes.POINTER', 'ctypes.POINTER', (['ctypes.c_float'], {}), '(ctypes.c_float)\n', (2431, 2447), False, 'import ctypes\n'), ((1572, 1595), 'platform.architecture', 'platform.architecture', ([], {}), '()\n', (1593, 1595), False, 'import platform\n'), ((1620, 1638), 'platform.machine', 'platform.machine'...
from flask import Blueprint from . import (ForgotPassword, RestorePassword) user = Blueprint('user', __name__, url_prefix='/user') user.add_url_rule('/forgot/', view_func=ForgotPassword.as_view('forgot-password')) user.add_url_rule('/restore/<string:token>', v...
[ "flask.Blueprint" ]
[((103, 150), 'flask.Blueprint', 'Blueprint', (['"""user"""', '__name__'], {'url_prefix': '"""/user"""'}), "('user', __name__, url_prefix='/user')\n", (112, 150), False, 'from flask import Blueprint\n')]
from printerAndPrinterAccessories import * import time class InfluxImportFileWriter(): def __init__(self, scanned, successfullyScanned, printers, elapsedTime): self.scanned = scanned self.successfullyScanned = successfullyScanned self.printers = printers self.elapsedTime = elapsedTi...
[ "time.strftime" ]
[((343, 377), 'time.strftime', 'time.strftime', (['"""%m/%d/%Y %H:%M:%S"""'], {}), "('%m/%d/%Y %H:%M:%S')\n", (356, 377), False, 'import time\n')]
from django.urls import path, re_path from django.contrib.auth import views as auth_views from . import views app_name = 'users' urlpatterns = [ #registration urls path('register/', views.register, name='register'), re_path(r'^activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-<KEY>1,13}-[0-9A-Za-z]{1,20})...
[ "django.contrib.auth.views.PasswordChangeView.as_view", "django.contrib.auth.views.LogoutView.as_view", "django.urls.re_path", "django.contrib.auth.views.LoginView.as_view", "django.urls.path", "django.contrib.auth.views.PasswordChangeDoneView.as_view" ]
[((174, 224), 'django.urls.path', 'path', (['"""register/"""', 'views.register'], {'name': '"""register"""'}), "('register/', views.register, name='register')\n", (178, 224), False, 'from django.urls import path, re_path\n'), ((230, 367), 'django.urls.re_path', 're_path', (['"""^activate/(?P<uidb64>[0-9A-Za-z_\\\\-]+)/...
import discord from discord.ext import commands ROLE_MSGID = 752401701562089532 LANG_MSGID = 752401585761550563 ro_list = { '\U00000031\U0000fe0f\U000020e3': 111 } class Role(commands.Cog): def __init__(self, bot): self.bot = bot #認証 @commands.Cog.listener() async def on_member_j...
[ "discord.utils.find", "discord.ext.commands.Cog.listener" ]
[((270, 293), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (291, 293), False, 'from discord.ext import commands\n'), ((528, 551), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (549, 551), False, 'from discord.ext import commands\n'), ((1239, 1262), 'd...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is referred and derived from project NetworkX # # which has the following license: # # Copyright (C) 2004-2020, NetworkX Developers # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # All rights reserved. # # This file is part of NetworkX. # # NetworkX...
[ "graphscope.nx.tests.utils.assert_graphs_equal", "graphscope.nx.DiGraph", "graphscope.nx.to_scipy_sparse_matrix", "graphscope.nx.utils.compat.with_graphscope_nx_context", "graphscope.nx.generators.classic.path_graph", "graphscope.nx.Graph", "graphscope.nx.from_scipy_sparse_matrix", "pytest.raises", ...
[((804, 849), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (827, 849), False, 'import pytest\n'), ((851, 895), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestConvertNumpy'], {}), '(TestConvertNumpy)\n...
import collections import unittest import utils # O(n) time. O(n) space. Hash table, math. class Solution: def numRabbits(self, answers): """ :type answers: List[int] :rtype: int """ return sum((count + answer) // (answer + 1) * (answer + 1) for answer, count in ...
[ "unittest.main", "collections.Counter", "utils.load_test_json" ]
[((699, 714), 'unittest.main', 'unittest.main', ([], {}), '()\n', (712, 714), False, 'import unittest\n'), ((435, 465), 'utils.load_test_json', 'utils.load_test_json', (['__file__'], {}), '(__file__)\n', (455, 465), False, 'import utils\n'), ((328, 356), 'collections.Counter', 'collections.Counter', (['answers'], {}), ...
import time import numpy as np import atomize.general_modules.general_functions as general import atomize.device_modules.Lakeshore_335 as ls xs = [] ys = [] ls335 = ls.Lakeshore_335() ls335.tc_sensor(2) general.message(ls335.tc_sensor())
[ "atomize.device_modules.Lakeshore_335.Lakeshore_335" ]
[((167, 185), 'atomize.device_modules.Lakeshore_335.Lakeshore_335', 'ls.Lakeshore_335', ([], {}), '()\n', (183, 185), True, 'import atomize.device_modules.Lakeshore_335 as ls\n')]
import praw import reddit_keys def scrape(start): reddit = praw.Reddit( client_id=reddit_keys.API["client_id"], client_secret=reddit_keys.API["client_secret"], password=reddit_keys.API["password"], user_agent=reddit_keys.API["user_agent"], username=reddit_keys.API["username"...
[ "praw.Reddit" ]
[((64, 295), 'praw.Reddit', 'praw.Reddit', ([], {'client_id': "reddit_keys.API['client_id']", 'client_secret': "reddit_keys.API['client_secret']", 'password': "reddit_keys.API['password']", 'user_agent': "reddit_keys.API['user_agent']", 'username': "reddit_keys.API['username']"}), "(client_id=reddit_keys.API['client_id...
#!/usr/bin/env python3 # Copyright (c) 2019 Bitcoin Association # Copyright (c) 2020* <NAME> # * Gregorian calendar years # Distributed under the Open BSV software license, see the accompanying file LICENSE. from genesis_upgrade_tests import tests from test_framework.height_based_test_framework import SimplifiedTestFr...
[ "genesis_upgrade_tests.tests" ]
[((402, 409), 'genesis_upgrade_tests.tests', 'tests', ([], {}), '()\n', (407, 409), False, 'from genesis_upgrade_tests import tests\n')]
from contextlib import contextmanager from subprocess import PIPE from unittest import TestCase from jupyter_client.kernelspec import NATIVE_KERNEL_NAME import pytest from traitlets.config.loader import Config from .. import ( SyncPooledKernelManager, MaximumKernelsException, ) from .utils_sync import shutdow...
[ "traitlets.config.loader.Config" ]
[((616, 624), 'traitlets.config.loader.Config', 'Config', ([], {}), '()\n', (622, 624), False, 'from traitlets.config.loader import Config\n'), ((1018, 1026), 'traitlets.config.loader.Config', 'Config', ([], {}), '()\n', (1024, 1026), False, 'from traitlets.config.loader import Config\n'), ((3647, 3655), 'traitlets.con...
# Generated by Django 3.1.2 on 2021-01-02 15:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('movies', '0001_initial'), ] operations = [ migrations.RenameField( model_name='movies', old_name='stars', ...
[ "django.db.models.TextField", "django.db.migrations.RenameField" ]
[((223, 301), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""movies"""', 'old_name': '"""stars"""', 'new_name': '"""year"""'}), "(model_name='movies', old_name='stars', new_name='year')\n", (245, 301), False, 'from django.db import migrations, models\n'), ((455, 482), 'django.db.m...
import io import argparse import os import pickle from bitarray import bitarray import typing import sys import functools import struct from precomputedNetMHCIndex import ChainCollection, peptideGenerator, ScoreTable, ScoreCategory, fileMD5, ScoreTableGroup """ TODO: 1) Complete sparsify in SparseScoreTable -- done 2...
[ "struct.unpack", "struct.pack", "struct.calcsize", "bitarray.bitarray", "precomputedNetMHCIndex.ScoreCategory" ]
[((4390, 4424), 'struct.calcsize', 'struct.calcsize', (['cls.STRUCT_FORMAT'], {}), '(cls.STRUCT_FORMAT)\n', (4405, 4424), False, 'import struct\n'), ((4571, 4628), 'struct.unpack', 'struct.unpack', (['cls.STRUCT_FORMAT', 'byteArray[0:structSize]'], {}), '(cls.STRUCT_FORMAT, byteArray[0:structSize])\n', (4584, 4628), Fa...
import sys from pymongo import MongoClient from pprint import pprint sys.path.insert(0, '../rating_fetch/') sys.path.insert(0, '../') import cc, cf from env import Env env_vars = Env() MongoURI = env_vars.get_bot_uri() client = MongoClient(MongoURI) db = client['chatter_bot_db'] users = db['users'] def createUser(...
[ "pymongo.MongoClient", "cc.get_rating", "sys.path.insert", "env.Env", "cf.get_rating" ]
[((69, 107), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../rating_fetch/"""'], {}), "(0, '../rating_fetch/')\n", (84, 107), False, 'import sys\n'), ((108, 133), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../"""'], {}), "(0, '../')\n", (123, 133), False, 'import sys\n'), ((180, 185), 'env.Env', 'Env', ([...
import uuid from django.db.models.signals import pre_save, post_save from django.dispatch import receiver from betting.models import League, Participant, Bet @receiver(pre_save, sender=League, dispatch_uid="create_league_key") def createLeagueKey(sender,instance,**kwargs): instance.leagueKey = uuid.uuid4().hex[:6...
[ "uuid.uuid4", "django.dispatch.receiver", "betting.models.Bet" ]
[((161, 228), 'django.dispatch.receiver', 'receiver', (['pre_save'], {'sender': 'League', 'dispatch_uid': '"""create_league_key"""'}), "(pre_save, sender=League, dispatch_uid='create_league_key')\n", (169, 228), False, 'from django.dispatch import receiver\n'), ((332, 407), 'django.dispatch.receiver', 'receiver', (['po...
# -*- coding: utf-8 -*- ''' CRISPResso2 - <NAME> and <NAME> 2018 Software pipeline for the analysis of genome editing outcomes from deep sequencing data (c) 2018 The General Hospital Corporation. All Rights Reserved. ''' import os from copy import deepcopy import errno import sys import traceback import argparse import...
[ "argparse.ArgumentParser", "CRISPResso2.CRISPRessoPlot.setMatplotlibDefaults", "os.path.isfile", "CRISPResso2.CRISPRessoShared.get_crispresso_header", "os.path.join", "os.path.abspath", "traceback.print_exc", "logging.FileHandler", "os.path.dirname", "os.path.exists", "CRISPResso2.CRISPRessoShar...
[((484, 660), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(levelname)-5s @ %(asctime)s:\n\t %(message)s \n"""', 'datefmt': '"""%a, %d %b %Y %H:%M:%S"""', 'stream': 'sys.stderr', 'filemode': '"""w"""'}), '(level=logging.INFO, format=\n """%(levelname)-5s @ %(asctime)s:\...
from decimal import Decimal import logging import logging.config import unittest import config from trader.database.db import dal from trader.exchange.api_wrapper.noop_trader import NoopApi from trader.exchange.order import Order from trader.exchange.persisted_book import Book from trader.sequence.book_manager import ...
[ "trader.exchange.api_wrapper.noop_trader.NoopApi", "trader.Test_Session", "decimal.Decimal", "trader.sequence.trading_terms.TradingTerms", "trader.database.db.dal.Session", "trader.database.db.dal.connect", "logging.config.dictConfig", "trader.sequence.book_manager.book_manager_maker", "logging.getL...
[((442, 456), 'trader.Test_Session', 'Test_Session', ([], {}), '()\n', (454, 456), False, 'from trader import Test_Session\n'), ((458, 502), 'logging.config.dictConfig', 'logging.config.dictConfig', (['config.log_config'], {}), '(config.log_config)\n', (483, 502), False, 'import logging\n'), ((512, 539), 'logging.getLo...
import sys from PyQt5 import QtGui, QtWidgets, QtCore from PyQt5.QtWidgets import QFileDialog class Window(QtWidgets.QMainWindow): def __init__(self): super(Window, self).__init__() self.setFixedSize(500,500) self.setWindowTitle("Test") self.home() def home(self): ...
[ "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtCore.QCoreApplication.instance", "PyQt5.QtWidgets.QFileDialog" ]
[((826, 858), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (848, 858), False, 'from PyQt5 import QtGui, QtWidgets, QtCore\n'), ((335, 368), 'PyQt5.QtWidgets.QPushButton', 'QtWidgets.QPushButton', (['"""Ok"""', 'self'], {}), "('Ok', self)\n", (356, 368), False, 'from PyQt...
from __future__ import absolute_import, division, print_function, unicode_literals # This may help with Python 2/3 compatibility. # The next line is intentionally blank. __author__ = "<NAME>" __version__ = "0.0.1" # The previous line is intentionally blank. """ Spirent TestCenter Conformance Test Application ...
[ "os.path.expanduser", "os.path.abspath", "logging.error", "logging.debug", "os.makedirs", "logging.basicConfig", "os.getpid", "getpass.getuser", "os.getcwd", "inspect.stack", "os.path.exists", "datetime.datetime.now", "logging.info", "logging.getLevelName", "inspect.currentframe", "ast...
[((1968, 1998), 'os.path.abspath', 'os.path.abspath', (['self.log_path'], {}), '(self.log_path)\n', (1983, 1998), False, 'import os\n'), ((2022, 2067), 'os.path.join', 'os.path.join', (['self.log_path', '"""cta_python.log"""'], {}), "(self.log_path, 'cta_python.log')\n", (2034, 2067), False, 'import os\n'), ((3050, 317...
import itertools import pandas as pd import numpy as np ''' known issues as of Nov 20 2020, dfFilter does not work with "weird" column names such as those which contain a period (".") or other special characters (/, &, %, etc.) ''' class DataSubsetter: ''' Class to create data subsets based on combina...
[ "itertools.combinations", "pandas.qcut", "itertools.product" ]
[((4957, 4989), 'itertools.product', 'itertools.product', (['*subsets[key]'], {}), '(*subsets[key])\n', (4974, 4989), False, 'import itertools\n'), ((1157, 1210), 'pandas.qcut', 'pd.qcut', (['self.df[column]'], {'q': 'self.q', 'duplicates': '"""drop"""'}), "(self.df[column], q=self.q, duplicates='drop')\n", (1164, 1210...
import enum import asyncio import json from typing import Any from aiohttp import ClientSession, ClientResponseError,ClientTimeout, BasicAuth, ClientConnectorError from ShellyDevice_Constants import * EP_TIMEOUT = ClientTimeout( total=3 # It on LAN, and if too long we will get warning about the update duration i...
[ "aiohttp.ClientSession", "aiohttp.BasicAuth", "aiohttp.ClientTimeout", "json.loads" ]
[((216, 238), 'aiohttp.ClientTimeout', 'ClientTimeout', ([], {'total': '(3)'}), '(total=3)\n', (229, 238), False, 'from aiohttp import ClientSession, ClientResponseError, ClientTimeout, BasicAuth, ClientConnectorError\n'), ((1290, 1315), 'json.loads', 'json.loads', (['json_settings'], {}), '(json_settings)\n', (1300, 1...
"""Testing facility for conkit.io.map_align""" import os import unittest from conkit.core.contact import Contact from conkit.core.contactfile import ContactFile from conkit.core.contactmap import ContactMap from conkit.core.sequence import Sequence from conkit.io.mapalign import MapAlignParser from conkit.io.tests.he...
[ "unittest.main", "conkit.core.contactmap.ContactMap", "conkit.core.contact.Contact", "conkit.core.contactfile.ContactFile", "conkit.core.sequence.Sequence", "conkit.io.mapalign.MapAlignParser" ]
[((3093, 3119), 'unittest.main', 'unittest.main', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (3106, 3119), False, 'import unittest\n'), ((2030, 2047), 'conkit.core.contactfile.ContactFile', 'ContactFile', (['"""RR"""'], {}), "('RR')\n", (2041, 2047), False, 'from conkit.core.contactfile import ContactFile\n'), ((23...
import argparse from time import time, sleep import sys, json, re, random, string from redfish import RedfishClient from redfish.rest.v1 import ServerDownOrUnreachableError from get_resource_directory import get_resource_directory raw_input = input def reboot_ilo(_redfishobj): ilo_reboot_uri = None resource_...
[ "argparse.ArgumentParser", "get_resource_directory.get_resource_directory", "re.match", "redfish.RedfishClient", "random.choice", "json.dumps", "time.sleep", "time.time", "sys.stderr.write", "sys.exit" ]
[((332, 367), 'get_resource_directory.get_resource_directory', 'get_resource_directory', (['_redfishobj'], {}), '(_redfishobj)\n', (354, 367), False, 'from get_resource_directory import get_resource_directory\n'), ((2741, 2776), 'get_resource_directory.get_resource_directory', 'get_resource_directory', (['_redfishobj']...
import sys, json from mainwindow_ui import Ui_MainWindow from PyQt5.QtWidgets import * from PyQt5.QtCore import QThread import logging from global_vars.global_vars import GlobalVars as gv from tabs.Am_finder_tab import AmFinderTab as amfTab from tabs.Gen_Settings_tab import GenSettingsTab as gsTab from tabs.Grab_ms_dat...
[ "json.dump", "workers.Grab_ms_data_worker.GrabMSDataWorker", "json.load", "logging.basicConfig", "global_vars.global_vars.GlobalVars", "tabs.GenCsv_tab.GenCsvTab", "workers.Am_finder_worker.AMWorker", "tabs.Am_finder_tab.AmFinderTab", "workers.Cell_profiler_worker.CPWorker", "tabs.Grab_ms_data_tab...
[((1022, 1203), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""./logs/spaceM.log"""', 'filemode': '"""a"""', 'format': '"""%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s"""', 'datefmt': '"""%H:%M:%S"""', 'level': 'logging.DEBUG'}), "(filename='./logs/spaceM.log', filemode='a', format=\n ...
import json from conf.globalValue import Httplib class APIException(Exception): status_code = Httplib.BAD_REQUEST status = Httplib.responses[status_code] def __init__(self, detail=None): self.detail = detail def __str__(self): error_json = {} error_json['message'] = self.detail...
[ "json.dumps" ]
[((336, 358), 'json.dumps', 'json.dumps', (['error_json'], {}), '(error_json)\n', (346, 358), False, 'import json\n')]
#!/usr/local/bin/anaconda3/bin/python #Este archivo recibe las secuencias de ADN (completas) de homo sapiens y de bacteria (ralstonia picketti) para generar la base de entrenamiento para la prueba 2 #Con esto crea la base de datos con mediciones de las 9 variables en ventanas de tamanio 300 pares de bases (por ahora)....
[ "csv.writer", "random.randint", "Bio.SeqIO.parse", "numpy.arange" ]
[((1033, 1059), 'Bio.SeqIO.parse', 'SeqIO.parse', (['arch', '"""fasta"""'], {}), "(arch, 'fasta')\n", (1044, 1059), False, 'from Bio import SeqIO\n'), ((1830, 1851), 'numpy.arange', 'np.arange', (['cromosomas'], {}), '(cromosomas)\n', (1839, 1851), True, 'import numpy as np\n'), ((2088, 2104), 'numpy.arange', 'np.arang...
# coding: utf-8 """ DocuSign Admin API An API for an organization administrator to manage organizations, accounts and users # noqa: E501 OpenAPI spec version: v2 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import ...
[ "six.iteritems" ]
[((9375, 9408), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (9388, 9408), False, 'import six\n')]
from bots.botSearch import bot_search from bots.botSpeaker import bot_speaker if __name__ == "__main__": bot_search() bot_speaker()
[ "bots.botSearch.bot_search", "bots.botSpeaker.bot_speaker" ]
[((114, 126), 'bots.botSearch.bot_search', 'bot_search', ([], {}), '()\n', (124, 126), False, 'from bots.botSearch import bot_search\n'), ((135, 148), 'bots.botSpeaker.bot_speaker', 'bot_speaker', ([], {}), '()\n', (146, 148), False, 'from bots.botSpeaker import bot_speaker\n')]
# Example Python script to scrape images from web import random import io import aiohttp import asyncio from PIL import Image async def async_fetch(url: str) -> bytes: """fetch html content of a page. Returns a bytestring of the content""" async with aiohttp.ClientSession() as session: async with session....
[ "aiohttp.ClientSession", "io.BytesIO", "random.randint" ]
[((472, 497), 'random.randint', 'random.randint', (['(0)', '(100000)'], {}), '(0, 100000)\n', (486, 497), False, 'import random\n'), ((259, 282), 'aiohttp.ClientSession', 'aiohttp.ClientSession', ([], {}), '()\n', (280, 282), False, 'import aiohttp\n'), ((627, 643), 'io.BytesIO', 'io.BytesIO', (['html'], {}), '(html)\n...
# Copyright 2018 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, ...
[ "pandas.DataFrame", "jax.numpy.sum", "jax.numpy.argmax", "itertools.count", "numpy.random.RandomState", "time.time", "jax.random.PRNGKey", "jax.grad", "mnist.examples.datasets.mnist", "jax.experimental.optimizers.momentum", "jax.experimental.stax.Dense", "jax.numpy.diag", "jax.numpy.mean" ]
[((1526, 1552), 'jax.numpy.argmax', 'np.argmax', (['targets'], {'axis': '(1)'}), '(targets, axis=1)\n', (1535, 1552), True, 'import jax.numpy as np\n'), ((1629, 1669), 'jax.numpy.mean', 'np.mean', (['(predicted_class == target_class)'], {}), '(predicted_class == target_class)\n', (1636, 1669), True, 'import jax.numpy a...
from osgeo import ogr def getFeatureCount(in_layer): ''' Returns the feature count of the in_layer: This must be a OGRLayer ''' try: featureCount = in_layer.GetFeatureCount() except: raise Exception return featureCount def getFieldDefn(in_layer,fieldname)...
[ "osgeo.ogr.FieldDefn" ]
[((2521, 2561), 'osgeo.ogr.FieldDefn', 'ogr.FieldDefn', (['field_name', 'ogr.OFTString'], {}), '(field_name, ogr.OFTString)\n', (2534, 2561), False, 'from osgeo import ogr\n'), ((2660, 2698), 'osgeo.ogr.FieldDefn', 'ogr.FieldDefn', (['field_name', 'ogr.OFTReal'], {}), '(field_name, ogr.OFTReal)\n', (2673, 2698), False,...
import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import pickle import os import sys import ImageEdgeTransforms import ShowSideBySide os.chdir('C:/Users/bynum/documents/udacity/term1/dwb-t1-p2/test_images') #fname = 'test1.jpg' #fname = 'test2.jpg' #s_channel not eno...
[ "numpy.zeros_like", "ImageEdgeTransforms.dir_threshold", "ImageEdgeTransforms.hls_select", "matplotlib.pyplot.show", "cv2.cvtColor", "ImageEdgeTransforms.abs_sobel_thresh", "cv2.imread", "matplotlib.pyplot.subplots", "os.chdir" ]
[((185, 257), 'os.chdir', 'os.chdir', (['"""C:/Users/bynum/documents/udacity/term1/dwb-t1-p2/test_images"""'], {}), "('C:/Users/bynum/documents/udacity/term1/dwb-t1-p2/test_images')\n", (193, 257), False, 'import os\n'), ((717, 734), 'cv2.imread', 'cv2.imread', (['fname'], {}), '(fname)\n', (727, 734), False, 'import c...
from collections import namedtuple class Constants: input_files_key = "input_files" input_format_key = "input_format" job_type_key = "job_type" output_partition_num_key = "output_partition_num" output_type_key = "output_type" output_path_key = "output_path" output_format_key = "output_form...
[ "collections.namedtuple" ]
[((1134, 1219), 'collections.namedtuple', 'namedtuple', (['"""ALLOW_FIELD"""', "['default_value', 'default_type', 'types', 'required']"], {}), "('ALLOW_FIELD', ['default_value', 'default_type', 'types',\n 'required'])\n", (1144, 1219), False, 'from collections import namedtuple\n')]
""" To train the model: python main.py To evaluate the model (on GPU0) by loading a saved checkpoint: CUDA_VISIBLE_DEVICES=0 python main.py --evaluate --resume=checkpoint.pth.tar train resnet50 (weight decay 5e-4) on extras + train, eval on test: Prec@1 95.500 """ import argparse import os import shutil import ...
[ "bird_or_bicycle.get_dataset", "argparse.ArgumentParser", "torch.argmax", "tensorflow.ConfigProto", "os.path.isfile", "torchvision.transforms.Normalize", "torch.no_grad", "os.path.join", "unrestricted_advex.eval_kit.evaluate_bird_or_bicycle_model", "torch.utils.data.DataLoader", "torch.load", ...
[((893, 957), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PyTorch ImageNet Training"""'}), "(description='PyTorch ImageNet Training')\n", (916, 957), False, 'import argparse\n'), ((4379, 4466), 'torch.optim.lr_scheduler.MultiStepLR', 'torch.optim.lr_scheduler.MultiStepLR', (['optimize...
import sys import snr from control_processor_factory import ControlProcessorFactory from controller_loop_factory import ControllerLoopFactory from input_mapping_factory import InputMappingFactory raw_controller_data = "raw_controller_data" controller_data = "controller_data" sockets = snr.SocketsPair(server_tuple=...
[ "control_processor_factory.ControlProcessorFactory", "snr.CliRunner", "snr.TimeoutLoopFactory", "snr.PrinterEndpointFactory", "snr.SocketsPair", "input_mapping_factory.InputMappingFactory", "controller_loop_factory.ControllerLoopFactory" ]
[((291, 340), 'snr.SocketsPair', 'snr.SocketsPair', ([], {'server_tuple': "('localhost', 9000)"}), "(server_tuple=('localhost', 9000))\n", (306, 340), False, 'import snr\n'), ((409, 451), 'controller_loop_factory.ControllerLoopFactory', 'ControllerLoopFactory', (['raw_controller_data'], {}), '(raw_controller_data)\n', ...
""" Minimum content example from: https://docs.pytest.org/en/latest/goodpractices.html """ from setuptools import setup, find_packages setup(name="iam", packages=find_packages())
[ "setuptools.find_packages" ]
[((164, 179), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (177, 179), False, 'from setuptools import setup, find_packages\n')]
from auditMeth import nameCheck from auditMeth import printColor import auditMeth class Management: def __init__(self): self.services = { 'cloudformation': {'rx': auditMeth.rs_4, 'owner': 'philip','ref':self} } self.global_accounts=None @staticmethod def...
[ "auditMeth.printColor", "auditMeth.nameCheck" ]
[((1737, 1816), 'auditMeth.printColor', 'printColor', (["['_____LISTING CloudFORMATION [] now....in .%s' % aconnect._region]"], {}), "(['_____LISTING CloudFORMATION [] now....in .%s' % aconnect._region])\n", (1747, 1816), False, 'from auditMeth import printColor\n'), ((2563, 2622), 'auditMeth.nameCheck', 'nameCheck', (...
# Data generators and augmentation # Adapted from https://www.kaggle.com/fantineh/data-reader-and-visualization import re import numpy as np from typing import Dict, List, Optional, Text, Tuple from PIL import Image import matplotlib.pyplot as plt from matplotlib import colors import tensorflow as tf from config impo...
[ "tensorflow.image.random_crop", "tensorflow.reduce_sum", "tensorflow.clip_by_value", "tensorflow.data.TFRecordDataset", "tensorflow.io.parse_single_example", "re.match", "tensorflow.concat", "tensorflow.constant", "tensorflow.zeros_like", "tensorflow.image.central_crop", "tensorflow.cast", "te...
[((987, 1029), 'tensorflow.concat', 'tf.concat', (['[input_img, output_img]'], {'axis': '(2)'}), '([input_img, output_img], axis=2)\n', (996, 1029), True, 'import tensorflow as tf\n'), ((1045, 1143), 'tensorflow.image.random_crop', 'tf.image.random_crop', (['combined', '[sample_size, sample_size, num_in_channels + num_...
import os import sys from app.streaming import KafkaConnector sys.path.append(os.path.join(os.environ.get("SUMO_HOME"), "tools")) from app.logging import info from app.simulation.PlatoonSimulation import PlatoonSimulation from app.streaming import KafkaPublisher from colorama import Fore from app.sumo import SUMOCon...
[ "app.simulation.PlatoonSimulation.PlatoonSimulation.start", "app.streaming.KafkaPublisher.connect", "app.streaming.KafkaConnector.connect", "os.path.dirname", "app.sumo.SUMOConnector.start", "os.environ.get", "app.logging.info", "sys.stdout.flush", "traci.close", "os.path.join", "app.sumo.SUMODe...
[((433, 489), 'app.logging.info', 'info', (['"""#####################################"""', 'Fore.CYAN'], {}), "('#####################################', Fore.CYAN)\n", (437, 489), False, 'from app.logging import info\n'), ((494, 550), 'app.logging.info', 'info', (['"""# Starting Traffic-Control-A9-v0.1 #"""', 'Fore.CY...
#coding=utf-8 import cv2 import json import random result_json = './results/CornerNet/50000/testing/res1.json' detections = [] with open(result_json, "r", encoding='utf-8') as f: detections = json.load( f) im_name = detections[1]['image_id'] imfile = './data/coco/images/testdev2017/' + '000000' + '{}'.format(im_n...
[ "json.load", "random.randint", "cv2.waitKey", "cv2.imread", "cv2.imshow" ]
[((340, 358), 'cv2.imread', 'cv2.imread', (['imfile'], {}), '(imfile)\n', (350, 358), False, 'import cv2\n'), ((911, 948), 'cv2.imshow', 'cv2.imshow', (['"""Detecting image..."""', 'img'], {}), "('Detecting image...', img)\n", (921, 948), False, 'import cv2\n'), ((972, 986), 'cv2.waitKey', 'cv2.waitKey', (['(0)'], {}),...
import logging from django.contrib.auth import login as auth_login from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.postgres.search import SearchVector, SearchRank, SearchQuery from django.shortcuts import redirect, render from django.urls import...
[ "django.contrib.postgres.search.SearchRank", "django.utils.decorators.method_decorator", "wiki.models.Entry.objects.annotate", "news.models.Article.objects.annotate", "django.shortcuts.redirect", "django.urls.reverse_lazy", "django.contrib.postgres.search.SearchQuery", "forum.models.Post.objects.annot...
[((561, 588), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (578, 588), False, 'import logging\n'), ((998, 1047), 'django.utils.decorators.method_decorator', 'method_decorator', (['login_required'], {'name': '"""dispatch"""'}), "(login_required, name='dispatch')\n", (1014, 1047), False, ...
from nose.tools import assert_equal, assert_is_not_none from nose_parameterized import parameterized from itertools import zip_longest from util import query from collections import OrderedDict import json def grouper(iterable, n, fillvalue=None): "Collect data into fixed-length chunks or blocks" # grouper('...
[ "collections.OrderedDict", "itertools.zip_longest", "json.dumps", "util.query" ]
[((397, 436), 'itertools.zip_longest', 'zip_longest', (['*args'], {'fillvalue': 'fillvalue'}), '(*args, fillvalue=fillvalue)\n', (408, 436), False, 'from itertools import zip_longest\n'), ((9207, 9215), 'util.query', 'query', (['q'], {}), '(q)\n', (9212, 9215), False, 'from util import query\n'), ((8777, 8820), 'collec...
# Credit to <NAME> and his "Python Risk Management: Monte Carlo Simulations" # article which helped with starting off and understanding the material. import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import datetime as dt import json import numpy as np import pandas as pd import pandas_datareade...
[ "matplotlib.pyplot.title", "pandas_datareader.DataReader", "json.dumps", "matplotlib.pyplot.figure", "pandas.DataFrame", "numpy.zeros_like", "matplotlib.pyplot.close", "numpy.linspace", "matplotlib.use", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.gcf", "matplotlib.pyplot.xlim", "mpld3.fi...
[((170, 191), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (184, 191), False, 'import matplotlib\n'), ((1485, 1499), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1497, 1499), True, 'import pandas as pd\n'), ((1526, 1540), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1538, 15...
""" - Script to extract cars from image """ from scipy import io as mat_io from skimage import io as img_io import argparse import logging _logger = logging.getLogger(__name__) _logger.setLevel(0) if __name__ == '__main__': args = argparse.ArgumentParser(description='Extract Cars') args.add_argument('-m...
[ "argparse.ArgumentParser", "scipy.io.loadmat", "logging.getLogger", "skimage.io.imsave", "skimage.io.imread" ]
[((154, 181), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (171, 181), False, 'import logging\n'), ((242, 293), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Extract Cars"""'}), "(description='Extract Cars')\n", (265, 293), False, 'import argparse\n'), (...
#!/usr/bin/env python3 from conans import ConanFile, tools import os class TestPackageConan(ConanFile): settings = "os", "arch" def test(self): if tools.cross_building(self.settings): return bin_path = os.path.join("bin", "test_package") self.run("patchelf --help", run_e...
[ "os.path.join", "conans.tools.cross_building" ]
[((167, 202), 'conans.tools.cross_building', 'tools.cross_building', (['self.settings'], {}), '(self.settings)\n', (187, 202), False, 'from conans import ConanFile, tools\n'), ((243, 278), 'os.path.join', 'os.path.join', (['"""bin"""', '"""test_package"""'], {}), "('bin', 'test_package')\n", (255, 278), False, 'import ...
from django.contrib.gis.db import models from django.contrib.gis.gdal import DataSource from django.core.exceptions import ValidationError from geomaps.validation import GdbValidator from geomaps.dataloader import GdbLoader from geomaps.postprocess import StandardLithologyProcessor, GeologicEventProcessor from gsconfig...
[ "django.core.exceptions.ValidationError", "gsmlp.generators.GeologicUnitViewGenerator", "django.contrib.gis.db.models.FloatField", "django.contrib.gis.db.models.ForeignKey", "django.contrib.gis.db.models.GeoManager", "django.contrib.gis.db.models.MultiLineStringField", "geomaps.validation.GdbValidator",...
[((658, 689), 'django.contrib.gis.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)'}), '(max_length=50)\n', (674, 689), False, 'from django.contrib.gis.db import models\n'), ((702, 734), 'django.contrib.gis.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n',...
import sys import traceback import av import cv2.cv2 as cv2 # for avoidance of pylint error import numpy as np import time import argparse import logging from estimator import TfPoseEstimator from networks import get_graph_path, model_wh from djitellopy import tello from pose_moves import PoseMover from simple_pid imp...
[ "cv2.cv2.threshold", "argparse.ArgumentParser", "logging.Formatter", "numpy.mean", "cv2.cv2.waitKey", "numpy.float64", "numpy.sqrt", "cv2.cv2.cvtColor", "cv2.cv2.putText", "djitellopy.tello.Tello", "math.isnan", "networks.model_wh", "logging.StreamHandler", "time.sleep", "estimator.TfPos...
[((382, 424), 'logging.getLogger', 'logging.getLogger', (['"""TfPoseEstimator-Drone"""'], {}), "('TfPoseEstimator-Drone')\n", (399, 424), False, 'import logging\n'), ((461, 484), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (482, 484), False, 'import logging\n'), ((524, 597), 'logging.Formatter',...
#!/usr/bin/env nmigen from collections import namedtuple import warnings from nmigen import * from nmigen.lib.cdc import ResetSynchronizer from nmigen.cli import main class PLL(Elaboratable): """ Instantiate the iCE40's phase-locked loop (PLL). This uses the iCE40's SB_PLL40_PAD primitive in simple fe...
[ "warnings.warn", "nmigen.cli.main", "nmigen.lib.cdc.ResetSynchronizer", "collections.namedtuple" ]
[((3583, 3609), 'nmigen.cli.main', 'main', (['pll'], {'ports': 'pll.ports'}), '(pll, ports=pll.ports)\n', (3587, 3609), False, 'from nmigen.cli import main\n'), ((1616, 1660), 'collections.namedtuple', 'namedtuple', (['"""coefficients"""', '"""divr divf divq"""'], {}), "('coefficients', 'divr divf divq')\n", (1626, 166...
############################################################################### # Copyright (c) Futurewei Technologies, inc. All Rights Reserved. # # Implementation of FedMom aggregator. # Author: <NAME> (<EMAIL>), 2020-08 ############################################################################### import numpy as ...
[ "tqdm.tqdm", "numpy.sum", "fedsimul.utils.tf_utils.process_grad", "tqdm.trange", "numpy.zeros", "numpy.linalg.norm", "numpy.dot", "tensorflow.train.GradientDescentOptimizer", "numpy.add" ]
[((841, 899), 'tensorflow.train.GradientDescentOptimizer', 'tf.train.GradientDescentOptimizer', (["params['learning_rate']"], {}), "(params['learning_rate'])\n", (874, 899), True, 'import tensorflow as tf\n'), ((1141, 1191), 'tqdm.trange', 'trange', (['self.num_rounds'], {'desc': '"""Round: """', 'ncols': '(120)'}), "(...
import factory.fuzzy from rest_framework.reverse import reverse from waldur_core.structure import models as structure_models from waldur_core.structure.tests import factories as structure_factories from waldur_core.users import models class InvitationBaseFactory(factory.DjangoModelFactory): email = factory.Seque...
[ "rest_framework.reverse.reverse" ]
[((443, 474), 'rest_framework.reverse.reverse', 'reverse', (['"""user-invitation-list"""'], {}), "('user-invitation-list')\n", (450, 474), False, 'from rest_framework.reverse import reverse\n'), ((704, 775), 'rest_framework.reverse.reverse', 'reverse', (['"""user-invitation-detail"""'], {'kwargs': "{'uuid': invitation....
import pytest from oop_practice.blackjack.cards import FrenchCard from oop_practice.blackjack.decks import BaseDeck, FrenchDeck, CasinoDeck @pytest.fixture def deck(): return BaseDeck() @pytest.fixture def french_deck(): return FrenchDeck() @pytest.fixture def casino_deck(): return CasinoDeck() def...
[ "pytest.raises", "oop_practice.blackjack.decks.FrenchDeck", "oop_practice.blackjack.decks.CasinoDeck", "oop_practice.blackjack.decks.BaseDeck" ]
[((182, 192), 'oop_practice.blackjack.decks.BaseDeck', 'BaseDeck', ([], {}), '()\n', (190, 192), False, 'from oop_practice.blackjack.decks import BaseDeck, FrenchDeck, CasinoDeck\n'), ((241, 253), 'oop_practice.blackjack.decks.FrenchDeck', 'FrenchDeck', ([], {}), '()\n', (251, 253), False, 'from oop_practice.blackjack....
#!/usr/bin/env python3 import sqlite3 import pandas as pd import setup_db import os import argparse # Store telo-sRNA table file as sqlite3 database def sql_store(srna_db, sample_file, reads_file, alignments_file): ''' Puts data into sqlite3 db Args: srna_db: db file created using the setup_db function s...
[ "argparse.ArgumentParser", "pandas.read_csv", "setup_db.setup_db", "os.path.exists", "sqlite3.connect" ]
[((678, 702), 'sqlite3.connect', 'sqlite3.connect', (['srna_db'], {}), '(srna_db)\n', (693, 702), False, 'import sqlite3\n'), ((759, 880), 'pandas.read_csv', 'pd.read_csv', (['sample_file'], {'sep': '"""\t"""', 'header': 'None', 'names': "['sample_id', 'dataset', 'name', 'total_mapped', 'telo_reads']"}), "(sample_file,...
import pyvisa as visa rm = visa.ResourceManager() print("instrument id =>" + str (rm.list_resources())) Instrument = rm.open_resource(rm.list_resources()[0]) print("instrument info => " + Instrument.query('*IDN?'))
[ "pyvisa.ResourceManager" ]
[((28, 50), 'pyvisa.ResourceManager', 'visa.ResourceManager', ([], {}), '()\n', (48, 50), True, 'import pyvisa as visa\n')]
import pathlib from spinta import commands from spinta.components import Context from spinta.types.datatype import File from spinta.formats.components import Format from spinta.backends.fs.components import FileSystem @commands.decode.register(Context, Format, FileSystem, File, dict) def decode(context: Context, sou...
[ "pathlib.Path", "spinta.commands.decode.register" ]
[((222, 287), 'spinta.commands.decode.register', 'commands.decode.register', (['Context', 'Format', 'FileSystem', 'File', 'dict'], {}), '(Context, Format, FileSystem, File, dict)\n', (246, 287), False, 'from spinta import commands\n'), ((428, 454), 'pathlib.Path', 'pathlib.Path', (["value['_id']"], {}), "(value['_id'])...
import numpy as np import matplotlib.pyplot as plt import sys if len(sys.argv) < 2: print("usage: python plot_degredation.py [env_name]") sys.exit() env_name = sys.argv[1] reader = open(env_name + "_batch_rewards.csv") noise_levels = [] returns = [] for line in reader: parsed = line.split(", ") if pars...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "numpy.std", "matplotlib.pyplot.legend", "sys.exit", "matplotlib.pylab.rcParams.update", "numpy.mean", "numpy.array", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.xlabel", "mat...
[((551, 568), 'numpy.array', 'np.array', (['returns'], {}), '(returns)\n', (559, 568), True, 'import numpy as np\n'), ((654, 675), 'numpy.mean', 'np.mean', (['demo_returns'], {}), '(demo_returns)\n', (661, 675), True, 'import numpy as np\n'), ((687, 707), 'numpy.std', 'np.std', (['demo_returns'], {}), '(demo_returns)\n...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Test th...
[ "msticpy.common.timespan.TimeSpan", "pathlib.Path", "pytest_check.is_not_none", "msticnb.nblts.azsent.host.HostSummary", "pytest_check.is_instance", "msticnb.data_providers.init" ]
[((876, 997), 'msticnb.data_providers.init', 'data_providers.init', ([], {'query_provider': '"""LocalData"""', 'LocalData_data_paths': '[test_data]', 'LocalData_query_paths': '[test_data]'}), "(query_provider='LocalData', LocalData_data_paths=[\n test_data], LocalData_query_paths=[test_data])\n", (895, 997), False, ...
from Student_Job_Scraper import * import time wishlist_copy = None def main(): clear() print('Hello student :)\n' 'What do you want to do? (choose a number)\n') while True: choice = input('1. Scrap from sites\n' '2. Show jobs that scraped\n' ...
[ "time.sleep" ]
[((5107, 5122), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (5117, 5122), False, 'import time\n'), ((1006, 1019), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (1016, 1019), False, 'import time\n'), ((1568, 1581), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (1578, 1581), False, 'import time\n'...
import os import time import traceback import sys from datetime import date, datetime from tanager_tcp.tanager_server import TanagerServer from tanager_tcp.tanager_client import TanagerClient from threading import Thread from pi_feeder import goniometer INTERVAL = 0.25 CONFIG_LOC = os.path.join(os.path.expanduser("...
[ "os.mkdir", "tanager_tcp.tanager_client.TanagerClient", "threading.Thread", "traceback.print_exc", "os.path.join", "tanager_tcp.tanager_server.TanagerServer", "os.path.isdir", "datetime.date.today", "datetime.datetime.now", "time.sleep", "pi_feeder.goniometer.Goniometer", "os.path.split", "o...
[((366, 412), 'os.path.join', 'os.path.join', (['CONFIG_LOC', '"""encoder_config.txt"""'], {}), "(CONFIG_LOC, 'encoder_config.txt')\n", (378, 412), False, 'import os\n'), ((430, 471), 'os.path.join', 'os.path.join', (['CONFIG_LOC', '"""az_config.txt"""'], {}), "(CONFIG_LOC, 'az_config.txt')\n", (442, 471), False, 'impo...
import csv from pathlib import Path import numpy as np import matplotlib from matplotlib import colors as col from matplotlib import cm import pandas as pd import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import plottools _newmap = col.LinearSegmentedColormap.from_list("Magentas"...
[ "matplotlib.colors.LinearSegmentedColormap.from_list", "excel_processing.read_mutation_files", "csv.reader", "matplotlib.pyplot.show", "matplotlib.cm.get_cmap", "pandas.read_csv", "matplotlib.pyplot.close", "plottools.cmap_discretize", "numpy.zeros", "pathlib.Path", "plottools.desaturate", "ma...
[((272, 382), 'matplotlib.colors.LinearSegmentedColormap.from_list', 'col.LinearSegmentedColormap.from_list', (['"""Magentas"""', '[(1.0, 1.0, 1.0, 1.0), (226 / 255, 0, 116 / 225, 1.0)]'], {}), "('Magentas', [(1.0, 1.0, 1.0, 1.0), (\n 226 / 255, 0, 116 / 225, 1.0)])\n", (309, 382), True, 'from matplotlib import colo...
from asyncio import ensure_future, gather, get_event_loop, sleep from datetime import datetime from typing import List from requests_html import HTML, Element from search.results import Result from search.util import LOGGER, get_first_element, format_comments, RequestsHtmlWrapper NEED_TO_UPDATE = ["ThePirateBay"] c...
[ "asyncio.gather", "search.util.RequestsHtmlWrapper", "asyncio.get_event_loop", "asyncio.sleep", "search.util.get_first_element", "search.util.LOGGER.debug", "search.util.LOGGER.info", "datetime.datetime.now" ]
[((5297, 5337), 'search.util.LOGGER.debug', 'LOGGER.debug', ([], {'msg': 'f"""user_input: {query}"""'}), "(msg=f'user_input: {query}')\n", (5309, 5337), False, 'from search.util import LOGGER, get_first_element, format_comments, RequestsHtmlWrapper\n'), ((857, 889), 'search.util.LOGGER.info', 'LOGGER.info', (['f"""Sear...
#!/usr/bin/env python import json import blinkt, os from time import sleep from datetime import datetime from gpiozero import CPUTemperature from flask import Flask, jsonify, make_response, request, redirect, url_for, send_from_directory, render_template from random import randint #setup the blinkt! hat blinkt.set_c...
[ "blinkt.set_clear_on_exit", "blinkt.get_pixel", "blinkt.show", "blinkt.clear", "blinkt.set_brightness", "flask.Flask", "blinkt.set_all", "flask.jsonify", "flask.render_template" ]
[((308, 338), 'blinkt.set_clear_on_exit', 'blinkt.set_clear_on_exit', (['(True)'], {}), '(True)\n', (332, 338), False, 'import blinkt, os\n'), ((339, 365), 'blinkt.set_brightness', 'blinkt.set_brightness', (['(0.2)'], {}), '(0.2)\n', (360, 365), False, 'import blinkt, os\n'), ((366, 379), 'blinkt.show', 'blinkt.show', ...
import jwt from django.conf import settings from django.http import HttpResponse from rest_framework import exceptions from rest_framework.authentication import get_authorization_header, BaseAuthentication from back.dashboard.models import User users = getattr(settings, "USERS", None) class TokenAuthentication(BaseA...
[ "rest_framework.exceptions.AuthenticationFailed", "django.http.HttpResponse", "back.dashboard.models.User", "rest_framework.authentication.get_authorization_header", "jwt.decode" ]
[((1275, 1321), 'jwt.decode', 'jwt.decode', (['token', '"""J_AIME_LES_CREVETTES?!??!"""'], {}), "(token, 'J_AIME_LES_CREVETTES?!??!')\n", (1285, 1321), False, 'import jwt\n'), ((637, 673), 'rest_framework.exceptions.AuthenticationFailed', 'exceptions.AuthenticationFailed', (['msg'], {}), '(msg)\n', (668, 673), False, '...
import cv2 import numpy as np url="https://192.168.253.173:8080/video" cap=cv2.VideoCapture(url) fourcc=cv2.VideoWriter_fourcc(*'DIVX') out=cv2.VideoWriter('output.mp4v',fourcc,20.0,(480,360)) while(cap.isOpened()): _,frame=cap.read() gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) lined=cv2.line(gray,(0,0),(24...
[ "cv2.line", "cv2.VideoWriter_fourcc", "cv2.cvtColor", "cv2.waitKey", "cv2.imshow", "cv2.VideoCapture", "cv2.VideoWriter", "cv2.destroyAllWindows" ]
[((75, 96), 'cv2.VideoCapture', 'cv2.VideoCapture', (['url'], {}), '(url)\n', (91, 96), False, 'import cv2\n'), ((104, 135), 'cv2.VideoWriter_fourcc', 'cv2.VideoWriter_fourcc', (["*'DIVX'"], {}), "(*'DIVX')\n", (126, 135), False, 'import cv2\n'), ((140, 196), 'cv2.VideoWriter', 'cv2.VideoWriter', (['"""output.mp4v"""',...
import traceback import arff from weka.core import jvm from weka.core.dataset import Instances, Attribute, Instance import logging from weka.core.converters import Loader from weka.filters import Filter, MultiFilter logger = logging.getLogger(__name__) try: jvm.start(system_cp=True, packages=True, max_heap_size="...
[ "weka.core.jvm.start", "arff.dump", "weka.core.dataset.Instances.copy_instances", "weka.filters.MultiFilter", "weka.core.converters.Loader", "traceback.format_exc", "weka.filters.Filter", "logging.getLogger" ]
[((226, 253), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (243, 253), False, 'import logging\n'), ((500, 541), 'weka.core.converters.Loader', 'Loader', (['"""weka.core.converters.ArffLoader"""'], {}), "('weka.core.converters.ArffLoader')\n", (506, 541), False, 'from weka.core.converter...
from django import forms from django.forms import ChoiceField from rating.models import Rating class StarForm(forms.Form): star = ChoiceField(choices=Rating.choices)
[ "django.forms.ChoiceField" ]
[((137, 172), 'django.forms.ChoiceField', 'ChoiceField', ([], {'choices': 'Rating.choices'}), '(choices=Rating.choices)\n', (148, 172), False, 'from django.forms import ChoiceField\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-08-03 23:10 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import s3direct.fields class Migration(migrations.Migration): dependencies = [ ('mridata', '0015_auto_20180731_2232')...
[ "django.db.models.OneToOneField" ]
[((464, 634), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'auto_created': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'parent_link': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'to': '"""mridata.TempData"""'}), "(auto_created=True, on_delete=django.db.models.deletion\n...
# libraries import os import numpy as np import pandas as pd import deepchem as dc import torch from torch_geometric.data import Dataset """ Creating a custom dataset for the torch_geometric models using aqueous solubility dataset from: https://doi.org/10.1038/s41597-019-0151-1 """ class MoleculeDataset(Dataset): ...
[ "deepchem.feat.MolGraphConvFeaturizer", "pandas.read_csv", "numpy.asarray", "os.path.join", "os.listdir", "torch.tensor" ]
[((2220, 2266), 'deepchem.feat.MolGraphConvFeaturizer', 'dc.feat.MolGraphConvFeaturizer', ([], {'use_edges': '(True)'}), '(use_edges=True)\n', (2250, 2266), True, 'import deepchem as dc\n'), ((3171, 3190), 'numpy.asarray', 'np.asarray', (['[label]'], {}), '([label])\n', (3181, 3190), True, 'import numpy as np\n'), ((32...
import os def create_output_folder(output_path : str) -> None: if not os.path.isdir(output_path): os.makedirs(output_path) def create_cleared_output_folder(output_path: str) -> None: create_output_folder(output_path=output_path) for root, dirs, files in os.walk(output_path, topdown=False): ...
[ "os.makedirs", "os.path.isdir", "os.path.dirname", "os.walk", "os.path.join" ]
[((278, 313), 'os.walk', 'os.walk', (['output_path'], {'topdown': '(False)'}), '(output_path, topdown=False)\n', (285, 313), False, 'import os\n'), ((559, 604), 'os.path.join', 'os.path.join', (['output_root', "(input_path + '.md')"], {}), "(output_root, input_path + '.md')\n", (571, 604), False, 'import os\n'), ((76, ...
# -*- coding: utf-8 -*- from transformers import pipeline, set_seed generator = pipeline('text-generation', model='gpt2') set_seed(50) text = generator("I am hungry for success") print(text) import gradio as gr def func(text): generated = generator(text) return generated description = "This is a text genrat...
[ "transformers.set_seed", "gradio.Interface", "transformers.pipeline" ]
[((83, 124), 'transformers.pipeline', 'pipeline', (['"""text-generation"""'], {'model': '"""gpt2"""'}), "('text-generation', model='gpt2')\n", (91, 124), False, 'from transformers import pipeline, set_seed\n'), ((126, 138), 'transformers.set_seed', 'set_seed', (['(50)'], {}), '(50)\n', (134, 138), False, 'from transfor...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed ...
[ "bpy.props.BoolProperty", "bpy.props.CollectionProperty", "bpy.props.IntProperty", "json.loads", "bpy.types.VIEW3D_MT_select_pose.remove", "json.dumps", "bpy.ops.wm.call_menu", "bpy.utils.unregister_class", "bpy.props.StringProperty", "bpy.ops.pose.selection_set_add", "bpy.types.VIEW3D_MT_select...
[((1761, 1793), 'bpy.props.StringProperty', 'StringProperty', ([], {'name': '"""Bone Name"""'}), "(name='Bone Name')\n", (1775, 1793), False, 'from bpy.props import StringProperty, IntProperty, EnumProperty, BoolProperty, CollectionProperty\n'), ((1841, 1872), 'bpy.props.StringProperty', 'StringProperty', ([], {'name':...
import slacker import ids import ManageCommittee def invite_to_slack(email): try: ids.adminbot.users.admin.invite(email=email) return True # Throws an exception if the user is already on Slack except slacker.Error: return False def is_user_on_slack(email): members = ids.slack...
[ "ids.adminbot.channels.invite", "ids.adminbot.users.admin.invite", "ManageCommittee.get_committee_info", "ids.slackbot.users.list", "ids.slackbot.chat.post_message" ]
[((1176, 1224), 'ManageCommittee.get_committee_info', 'ManageCommittee.get_committee_info', (['committee_id'], {}), '(committee_id)\n', (1210, 1224), False, 'import ManageCommittee\n'), ((1318, 1606), 'ids.slackbot.chat.post_message', 'ids.slackbot.chat.post_message', ([], {'channel': 'slack_channel_id', 'username': '"...
import unittest from acme import Product from acme_report import generate_products, ADJECTIVES, NOUNS class AcmeProductTests(unittest.TestCase): """Making sure Acme products are the tops!""" def test_default_product_price(self): """Test default product price being 10.""" prod = Product('Test P...
[ "unittest.main", "acme_report.generate_products", "acme.Product" ]
[((1857, 1872), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1870, 1872), False, 'import unittest\n'), ((305, 328), 'acme.Product', 'Product', (['"""Test Product"""'], {}), "('Test Product')\n", (312, 328), False, 'from acme import Product\n'), ((429, 452), 'acme.Product', 'Product', (['"""Test Product"""'], {}...
import sys import yaml import plac from yte.context import Context from yte.process import _process_yaml_value from yte.document import Document def process_yaml(file_or_str, outfile=None, variables=None, disable_features=None): """Process a YAML file or string with YTE, returning the processed version. ...
[ "yaml.scanner.ScannerError", "yte.document.Document", "yaml.load", "yaml.dump", "plac.call", "yte.context.Context" ]
[((806, 816), 'yte.document.Document', 'Document', ([], {}), '()\n', (814, 816), False, 'from yte.document import Document\n'), ((1851, 1865), 'plac.call', 'plac.call', (['cli'], {}), '(cli)\n', (1860, 1865), False, 'import plac\n'), ((901, 947), 'yaml.load', 'yaml.load', (['file_or_str'], {'Loader': 'yaml.FullLoader'}...
class _NoOp(object): """ Class that silently ignores calls to any function. Use the singleton instance defined below, i.e., from fjcommon.no_op import NoOp (See README.md) """ def __getattr__(self, attr): return _no_op def __call__(self, *args, **kwargs): """ Means NoOp...
[ "pytest.raises" ]
[((931, 956), 'pytest.raises', 'pytest.raises', (['ValueError'], {}), '(ValueError)\n', (944, 956), False, 'import pytest\n')]
import bz2 import collections.abc import json import ga4gh.vrs class RedisObjectStore(collections.abc.MutableMapping): """Provides Redis-backed storage of VR objects The intention of this class is to provide a interface that is indistinguishable from a dictionary for the purposes of GA4GH object...
[ "redis.Redis", "ga4gh.vrs.models.Allele", "ga4gh.core.ga4gh_identify" ]
[((2221, 2245), 'ga4gh.vrs.models.Allele', 'models.Allele', ([], {}), '(**a0_dict)\n', (2234, 2245), False, 'from ga4gh.vrs import models\n'), ((2258, 2276), 'ga4gh.core.ga4gh_identify', 'ga4gh_identify', (['a0'], {}), '(a0)\n', (2272, 2276), False, 'from ga4gh.core import ga4gh_identify\n'), ((2393, 2412), 'ga4gh.core...
import pandas as pd # from ... import global_var from . import eco2mix, entsoe, rte def load(source = None, map_code = None, date_min = None, date_max = None, ): """ Calls the appropriate loader of the production data from ...
[ "pandas.Series" ]
[((1975, 2006), 'pandas.Series', 'pd.Series', (['(True)'], {'index': 'dg.index'}), '(True, index=dg.index)\n', (1984, 2006), True, 'import pandas as pd\n')]
import System import clr clr.AddReference('RevitAPI') import Autodesk.Revit.DB as DB clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument clr.AddReference('RevitNodes') import Revit clr.ImportExtensions(Revit.Elem...
[ "Autodesk.Revit.DB.FilteredElementCollector", "Autodesk.Revit.DB.ElementMulticategoryFilter", "clr.AddReference", "Autodesk.Revit.DB.ElementMulticlassFilter", "clr.ImportExtensions" ]
[((25, 53), 'clr.AddReference', 'clr.AddReference', (['"""RevitAPI"""'], {}), "('RevitAPI')\n", (41, 53), False, 'import clr\n'), ((86, 119), 'clr.AddReference', 'clr.AddReference', (['"""RevitServices"""'], {}), "('RevitServices')\n", (102, 119), False, 'import clr\n'), ((245, 275), 'clr.AddReference', 'clr.AddReferen...
import json import pathlib import time import click import sqlite_utils from pytodoist.api import TodoistAPI from todoist_to_sqlite import utils from tqdm import tqdm @click.group() @click.version_option() def cli(): "Save data from Todoist to a SQLite database" @cli.command() @click.option( "-a", "--a...
[ "click.version_option", "tqdm.tqdm", "pytodoist.api.TodoistAPI", "sqlite_utils.Database", "todoist_to_sqlite.utils.foreign_keys_for", "todoist_to_sqlite.utils.error", "click.echo", "json.dumps", "time.sleep", "click.DateTime", "pathlib.Path", "click.Path", "click.group", "click.prompt" ]
[((171, 184), 'click.group', 'click.group', ([], {}), '()\n', (182, 184), False, 'import click\n'), ((186, 208), 'click.version_option', 'click.version_option', ([], {}), '()\n', (206, 208), False, 'import click\n'), ((676, 778), 'click.echo', 'click.echo', (['"""In Todoist, navigate to Settings > Integrations > API To...
import csv from datetime import timedelta from enum import Enum import pandas as pd import plotly from plotly.graph_objs import Scatter from common import database as db, util TRADE_FEE = .0025 TRADE_SLIPPAGE = .02 class Position: def __init__(self, coin_id, coin_price, date, buy_cash): self.coin_id =...
[ "pandas.DataFrame", "csv.writer", "plotly.graph_objs.Scatter", "pandas.merge", "common.database.mongo_db.historical_prices.find", "plotly.offline.plot", "common.database.get_coins", "datetime.timedelta", "pandas.Series", "common.util.list_to_dict", "common.database.mongo_db.historical_social_sta...
[((9003, 9049), 'common.database.get_coins', 'db.get_coins', (["{'subreddit': {'$exists': True}}"], {}), "({'subreddit': {'$exists': True}})\n", (9015, 9049), True, 'from common import database as db, util\n'), ((9089, 9125), 'common.database.mongo_db.historical_prices.find', 'db.mongo_db.historical_prices.find', ([], ...
# -*- coding: utf-8 -*- import os import sys root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root) import ccxt # noqa: E402 def style(s, style): return style + s + '\033[0m' def green(s): return style(s, '\033[92m') def blue(s): return style(s, '\...
[ "sys.path.append", "os.path.abspath" ]
[((130, 151), 'sys.path.append', 'sys.path.append', (['root'], {}), '(root)\n', (145, 151), False, 'import sys\n'), ((101, 126), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (116, 126), False, 'import os\n')]
''' Settings and start-script for activating the VUSualizer on the server. Use this run.py on the serverside. change name of run_dwergeik.py to run.py The original run.py is for using VUSualizer locally ''' from src import app as application import sys # /data/vusualizer/VUSualizer, use location of VUSualizer on the ...
[ "src.app.run", "sys.path.insert" ]
[((331, 380), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""/data/vusualizer/VUSualizer"""'], {}), "(0, '/data/vusualizer/VUSualizer')\n", (346, 380), False, 'import sys\n'), ((801, 818), 'src.app.run', 'application.run', ([], {}), '()\n', (816, 818), True, 'from src import app as application\n')]
# Copyright 2018 Canonical Ltd. # # 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 writin...
[ "zaza.controller.destroy_model", "zaza.controller.go_list_models", "zaza.controller.list_models", "zaza.controller.get_cloud", "zaza.controller.add_model", "mock.MagicMock" ]
[((1257, 1273), 'mock.MagicMock', 'mock.MagicMock', ([], {}), '()\n', (1271, 1273), False, 'import mock\n'), ((1511, 1527), 'mock.MagicMock', 'mock.MagicMock', ([], {}), '()\n', (1525, 1527), False, 'import mock\n'), ((1732, 1748), 'mock.MagicMock', 'mock.MagicMock', ([], {}), '()\n', (1746, 1748), False, 'import mock\...
from tdl.queue.abstractions.processing_rule import ProcessingRule from tdl.queue.abstractions.response.fatal_error_response import FatalErrorResponse from tdl.queue.abstractions.response.valid_response import ValidResponse class ProcessingRules: def __init__(self): self._rules = {} def add(self, met...
[ "tdl.queue.abstractions.response.fatal_error_response.FatalErrorResponse", "tdl.queue.abstractions.response.valid_response.ValidResponse", "tdl.queue.abstractions.processing_rule.ProcessingRule" ]
[((402, 452), 'tdl.queue.abstractions.processing_rule.ProcessingRule', 'ProcessingRule', (['user_implementation', 'client_action'], {}), '(user_implementation, client_action)\n', (416, 452), False, 'from tdl.queue.abstractions.processing_rule import ProcessingRule\n'), ((903, 967), 'tdl.queue.abstractions.response.vali...
#!/usr/bin/env python3 import sys import os import csv import re from datetime import datetime import pprint core_grid = [] pp = pprint.PrettyPrinter(indent=4) with open('achimota_grid.csv') as csvfile: reader = csv.reader(csvfile) first = True for row in reader: if(first == True): f...
[ "pprint.PrettyPrinter", "datetime.datetime.strptime", "csv.reader", "re.search" ]
[((131, 161), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (151, 161), False, 'import pprint\n'), ((219, 238), 'csv.reader', 'csv.reader', (['csvfile'], {}), '(csvfile)\n', (229, 238), False, 'import csv\n'), ((380, 408), 're.search', 're.search', (['"""^[A-Z]*"""', 'row[4]']...
from __future__ import annotations from dearpygui_obj import start_gui, stop_gui, set_render_callback from dearpygui_obj.data import ColorRGBA from dearpygui_obj.window import Window from dearpygui_obj.basic import Text, Button, Separator from dearpygui_obj.input import InputText, SliderFloat from dearpygui_obj.layout...
[ "dearpygui_obj.window.Window", "dearpygui_obj.basic.Text", "dearpygui_obj.stop_gui", "dearpygui_obj.basic.Button", "dearpygui_obj.data.ColorRGBA", "dearpygui_obj.input.SliderFloat", "dearpygui_obj.input.InputText", "dearpygui_obj.layout.group_horizontal", "dearpygui_obj.basic.Separator", "dearpygu...
[((1424, 1442), 'dearpygui_obj.data.ColorRGBA', 'ColorRGBA', (['(1)', '(0)', '(0)'], {}), '(1, 0, 0)\n', (1433, 1442), False, 'from dearpygui_obj.data import ColorRGBA\n'), ((1462, 1486), 'dearpygui_obj.data.ColorRGBA', 'ColorRGBA', (['(0.2)', '(0.2)', '(0.2)'], {}), '(0.2, 0.2, 0.2)\n', (1471, 1486), False, 'from dear...
from setuptools import setup with open("README.md", "r") as fh: readme = fh.read() setup(name='PackagePyPITest', version='0.0.1', url='https://github.com/DiegoAbreu/PyPITest', license='MIT License', author='<NAME>', long_description=readme, long_description_content_type="text/markdown", ...
[ "setuptools.setup" ]
[((89, 455), 'setuptools.setup', 'setup', ([], {'name': '"""PackagePyPITest"""', 'version': '"""0.0.1"""', 'url': '"""https://github.com/DiegoAbreu/PyPITest"""', 'license': '"""MIT License"""', 'author': '"""<NAME>"""', 'long_description': 'readme', 'long_description_content_type': '"""text/markdown"""', 'author_email'...
#!/usr/bin/python # # espupload by <NAME> - 20170930 # # Uploads binary file to OTA server # # Execute: espupload -u <Host_IP_address>:<Host_port>/<Host_path> -f <sketch.bin> # # Needs pycurl # - pip install pycurl import sys import os import optparse import logging import pycurl HOST_URL = "domus1...
[ "optparse.OptionGroup", "os.remove", "optparse.OptionParser", "logging.basicConfig", "os.path.basename", "os.rename", "os.path.dirname", "os.path.exists", "logging.critical", "pycurl.Curl" ]
[((511, 539), 'os.path.exists', 'os.path.exists', (['new_filename'], {}), '(new_filename)\n', (525, 539), False, 'import os\n'), ((573, 606), 'os.rename', 'os.rename', (['filename', 'new_filename'], {}), '(filename, new_filename)\n', (582, 606), False, 'import os\n'), ((649, 662), 'pycurl.Curl', 'pycurl.Curl', ([], {})...
import json from pathlib import Path import pytest from bravado_core.spec import Spec from bravado.response import BravadoResponse, BravadoResponseMetadata from gc3_query.lib import gc3_cfg from gc3_query.lib import * from gc3_query.lib import gc3_cfg from gc3_query.lib.paas_classic import PaaSServiceBase from gc3_q...
[ "gc3_query.lib.gc3_cfg.BASE_DIR.joinpath", "pathlib.Path", "pytest.fixture", "gc3_query.lib.paas_classic.PaaSServiceBase" ]
[((564, 603), 'gc3_query.lib.gc3_cfg.BASE_DIR.joinpath', 'gc3_cfg.BASE_DIR.joinpath', (['"""etc/config"""'], {}), "('etc/config')\n", (589, 603), False, 'from gc3_query.lib import gc3_cfg\n'), ((946, 962), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (960, 962), False, 'import pytest\n'), ((481, 495), 'pathlib...
import json import math from datetime import datetime from typing import Any import numpy as np import pandas as pd from fugue.dataframe.array_dataframe import ArrayDataFrame from fugue.dataframe.pandas_dataframe import PandasDataFrame from fugue.dataframe.utils import _df_eq as df_eq from fugue.dataframe.utils import...
[ "fugue_spark.dataframe.SparkDataFrame", "fugue_spark._utils.convert.to_spark_schema", "pyspark.sql.SparkSession.builder.getOrCreate", "triad.collections.schema.Schema", "fugue_spark._utils.convert.to_schema", "fugue.exceptions.FugueDataFrameInitError", "datetime.datetime.now" ]
[((1676, 1713), 'fugue_spark.dataframe.SparkDataFrame', 'SparkDataFrame', (['sdf', '"""a:str,b:double"""'], {}), "(sdf, 'a:str,b:double')\n", (1690, 1713), False, 'from fugue_spark.dataframe import SparkDataFrame\n'), ((2608, 2627), 'fugue_spark.dataframe.SparkDataFrame', 'SparkDataFrame', (['sdf'], {}), '(sdf)\n', (26...