code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import queue from abc import ABC, abstractmethod from blessed import Terminal from src.sections.debug import Debug from src.sections.game_over import GameOver from src.sections.menu import Menu, StartMenuType from src.sections.over_world import OverWorld, StartOverWorld from src.sections.question import NewQuestion, ...
[ "src.sections.menu.StartMenuType", "src.sections.debug.Debug", "src.sections.question.NewQuestion", "src.sections.over_world.StartOverWorld" ]
[((1179, 1194), 'src.sections.menu.StartMenuType', 'StartMenuType', ([], {}), '()\n', (1192, 1194), False, 'from src.sections.menu import Menu, StartMenuType\n'), ((1335, 1360), 'src.sections.over_world.StartOverWorld', 'StartOverWorld', (['"""😎"""', '(True)'], {}), "('😎', True)\n", (1349, 1360), False, 'from src.sec...
from pathlib import Path import os import cv2 import numpy as np import glob from sklearn.preprocessing import LabelEncoder from PIL import Image from tqdm import tqdm import albumentations as A import tensorflow as tf from .utils import load_bbox, get_resized_bbox from .preprocessing import preprocess DATA_DIR = Pa...
[ "sklearn.preprocessing.LabelEncoder", "os.listdir", "PIL.Image.open", "pathlib.Path", "tensorflow.data.Dataset.from_tensor_slices", "os.path.join", "numpy.array", "albumentations.Normalize", "albumentations.Resize", "cv2.cvtColor", "os.system", "cv2.imread", "glob.glob" ]
[((318, 336), 'pathlib.Path', 'Path', (['"""../../data"""'], {}), "('../../data')\n", (322, 336), False, 'from pathlib import Path\n'), ((490, 587), 'os.system', 'os.system', (['"""wget http://vision.stanford.edu/aditya86/ImageNetDogs/images.tar -P ./data"""'], {}), "(\n 'wget http://vision.stanford.edu/aditya86/Ima...
import random import matplotlib.pyplot as plt import numpy as np import pandas as pd def make_bin_edges(sos, x): middle, minim, maxim = np.mean(x), min(x), max(x) d_x = sos middle_low_edge, middle_high_edge = middle - d_x / 2, middle + d_x / 2 edges = [middle_low_edge, middle_high_edge] temp = mi...
[ "numpy.mean", "numpy.histogram", "matplotlib.pyplot.savefig", "numpy.sqrt", "pandas.read_csv", "numpy.std", "matplotlib.pyplot.subplots" ]
[((810, 856), 'numpy.histogram', 'np.histogram', (['x_list'], {'bins': 'bins', 'density': '(False)'}), '(x_list, bins=bins, density=False)\n', (822, 856), True, 'import numpy as np\n'), ((1538, 1567), 'pandas.read_csv', 'pd.read_csv', (['"""cantar2019.csv"""'], {}), "('cantar2019.csv')\n", (1549, 1567), True, 'import p...
from functools import reduce import networkx as nx def identity(*args): if len(args) == 1: return args[0] return args def er(e): """ This function returns the reverse of an edge represented as a tuple """ s, d = e return (d, s) def cer(e): """ Canonica...
[ "networkx.connected_component_subgraphs" ]
[((13632, 13667), 'networkx.connected_component_subgraphs', 'nx.connected_component_subgraphs', (['G'], {}), '(G)\n', (13664, 13667), True, 'import networkx as nx\n')]
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
[ "pytest.raises" ]
[((2172, 2222), 'pytest.raises', 'pytest.raises', (['d1_common.types.exceptions.NotFound'], {}), '(d1_common.types.exceptions.NotFound)\n', (2185, 2222), False, 'import pytest\n')]
from graphql import ( GraphQLObjectType, GraphQLField, GraphQLNonNull, GraphQLString ) ChatMessageType = GraphQLObjectType( 'ChatMessageType', lambda: { 'timestamp': GraphQLField(GraphQLNonNull(GraphQLString)), 'email': GraphQLField(GraphQLNonNull(GraphQLString)), 'conte...
[ "graphql.GraphQLField", "graphql.GraphQLNonNull" ]
[((325, 352), 'graphql.GraphQLField', 'GraphQLField', (['GraphQLString'], {}), '(GraphQLString)\n', (337, 352), False, 'from graphql import GraphQLObjectType, GraphQLField, GraphQLNonNull, GraphQLString\n'), ((212, 241), 'graphql.GraphQLNonNull', 'GraphQLNonNull', (['GraphQLString'], {}), '(GraphQLString)\n', (226, 241...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, print_function, unicode_literals) import humanize from colorclass import Color, Windows from acli.output import (output_ascii_table, output_ascii_table_list, dash_if_none) from external.six import iteritems Windows.enable(auto_colors=True, reset_atexit...
[ "external.six.iteritems", "humanize.naturalsize", "colorclass.Windows.enable", "acli.output.dash_if_none", "colorclass.Color" ]
[((275, 326), 'colorclass.Windows.enable', 'Windows.enable', ([], {'auto_colors': '(True)', 'reset_atexit': '(True)'}), '(auto_colors=True, reset_atexit=True)\n', (289, 326), False, 'from colorclass import Color, Windows\n'), ((3528, 3544), 'external.six.iteritems', 'iteritems', (['dict_'], {}), '(dict_)\n', (3537, 354...
# coding: utf-8 # Standard Libraries import logging from pathlib import Path from typing import Dict # Third Party Libraries import anyconfig # Cfgtree modules from cfgtree.storages._single_file import SingleFileStorage log = logging.getLogger(__name__) class AnyConfigStorage(SingleFileStorage): """ Setti...
[ "logging.getLogger" ]
[((230, 257), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (247, 257), False, 'import logging\n')]
from pymol.cgo import * from pymol import cmd from random import random, seed from chempy import cpv # CGO cones # first draw some walls obj = [ COLOR, 1.0, 1.0, 1.0, BEGIN, TRIANGLE_STRIP, NORMAL, 0.0, 0.0, 1.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 10.0, 0.0, 0.0, VERTEX, 0.0, 10.0, 0.0, ...
[ "pymol.cmd.turn", "chempy.cpv.random_vector", "chempy.cpv.add", "pymol.cmd.clip", "pymol.cmd.load_cgo", "random.seed", "chempy.cpv.scale", "random.random", "pymol.cmd.zoom" ]
[((737, 744), 'random.seed', 'seed', (['(1)'], {}), '(1)\n', (741, 744), False, 'from random import random, seed\n'), ((1637, 1663), 'pymol.cmd.load_cgo', 'cmd.load_cgo', (['obj', '"""cgo08"""'], {}), "(obj, 'cgo08')\n", (1649, 1663), False, 'from pymol import cmd\n'), ((1683, 1701), 'pymol.cmd.turn', 'cmd.turn', (['""...
# # This file is part of Python Client Library for the LCCS-WS. # Copyright (C) 2020 INPE. # # Python Client Library for the LCCS-WS is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # """LCCS Python Client examples.""" from lccs import ...
[ "lccs.LCCS" ]
[((381, 429), 'lccs.LCCS', 'LCCS', (['"""https://brazildatacube.dpi.inpe.br/lccs/"""'], {}), "('https://brazildatacube.dpi.inpe.br/lccs/')\n", (385, 429), False, 'from lccs import LCCS\n')]
#! -*- coding:utf-8 -*- ''' @Author: ZM @Date and Time: 2020/12/13 16:28 @File: train.py ''' import math import numpy as np import pandas as pd from gensim import corpora from keras.layers import Input from keras import Model from keras.callbacks import Callback from keras.optimizers import Adam from ...
[ "get_dataset.get_dataset", "keras.optimizers.Adam", "generator.generator", "math.ceil", "utils.str2id", "keras.Model", "keras.backend.mean", "numpy.argmax", "numpy.array", "utils.sequence_padding", "keras.layers.Input", "ToOneHot.ToOneHot", "CNN_model.CNN_Model", "keras.backend.softmax", ...
[((968, 981), 'get_dataset.get_dataset', 'get_dataset', ([], {}), '()\n', (979, 981), False, 'from get_dataset import get_dataset\n'), ((1187, 1235), 'utils.sequence_padding', 'sequence_padding', (['X_train'], {'max_length': 'max_length'}), '(X_train, max_length=max_length)\n', (1203, 1235), False, 'from utils import s...
from sqlalchemy import func from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.dialects.postgresql import ARRAY from app import db Base = declarative_base() class Resource(db.Model): __tablename__ = 'resource' __label__ = "Online Information" id = db.Column(db.Integer, primary_key=Tr...
[ "sqlalchemy.func.now", "sqlalchemy.dialects.postgresql.ARRAY", "app.db.ARRAY", "sqlalchemy.ext.declarative.declarative_base", "app.db.Column", "app.db.DateTime", "app.db.relationship" ]
[((160, 178), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (176, 178), False, 'from sqlalchemy.ext.declarative import declarative_base\n'), ((284, 323), 'app.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (293, 323), Fals...
import os import numpy as np from sklearn.model_selection import train_test_split from tensorflow.keras import backend as K # 这里目的是使用后端tensorflow from tensorflow.keras.applications.vgg16 import VGG16 from tensorflow.keras.layers import Input, Dense, Lambda from tensorflow.keras.models import Model, Sequential from te...
[ "tensorflow.keras.backend.epsilon", "numpy.array", "tensorflow.keras.layers.Dense", "numpy.mean", "tensorflow.keras.layers.Input", "os.path.exists", "tensorflow.keras.backend.mean", "tensorflow.keras.backend.maximum", "tensorflow.keras.backend.cast", "tensorflow.keras.models.Model", "tensorflow....
[((898, 914), 'tensorflow.keras.backend.square', 'K.square', (['y_pred'], {}), '(y_pred)\n', (906, 914), True, 'from tensorflow.keras import backend as K\n'), ((986, 1045), 'tensorflow.keras.backend.mean', 'K.mean', (['(y_true * square_pred + (1 - y_true) * margin_square)'], {}), '(y_true * square_pred + (1 - y_true) *...
# Generated by Django 3.2.3 on 2021-07-19 17:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hedera', '0003_profile_show_node_ids'), ] operations = [ migrations.AddField( model_name='profile', name='lang', ...
[ "django.db.models.CharField" ]
[((335, 376), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(3)', 'null': '(True)'}), '(max_length=3, null=True)\n', (351, 376), False, 'from django.db import migrations, models\n')]
import torch import torch.nn as nn import numpy as np import pytorch_lightning as pl import sys import os from lifelines.utils import concordance_index from sklearn.metrics import r2_score from torch.utils.data import DataLoader, TensorDataset from torchcontrib.optim import SWA from pytorch_lightning import Trainer, s...
[ "pytorch_lightning.callbacks.ModelCheckpoint", "numpy.mean", "pytorch_lightning.callbacks.EarlyStopping", "pytorch_lightning.Trainer.add_argparse_args", "argparse.ArgumentParser", "models.sfomm.SFOMM", "numpy.where", "pytorch_lightning.seed_everything", "models.sfomm.SFOMM.add_model_specific_args", ...
[((442, 464), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (457, 464), False, 'import sys\n'), ((465, 502), 'sys.path.append', 'sys.path.append', (['"""../../data/ml_mmrf"""'], {}), "('../../data/ml_mmrf')\n", (480, 502), False, 'import sys\n'), ((503, 533), 'sys.path.append', 'sys.path.appen...
# -*- coding: utf-8 -*- from typing import Any, Dict import torch from allennlp.common import Registrable from allennlp.modules.seq2vec_encoders.seq2vec_encoder import Seq2VecEncoder from allennlp.modules.text_field_embedders.text_field_embedder import ( TextFieldEmbedder, ) from allennlp.nn.util import get_text_...
[ "allennlp.training.metrics.Average", "allennlp.nn.util.get_text_field_mask" ]
[((1115, 1124), 'allennlp.training.metrics.Average', 'Average', ([], {}), '()\n', (1122, 1124), False, 'from allennlp.training.metrics import Average\n'), ((1542, 1576), 'allennlp.nn.util.get_text_field_mask', 'get_text_field_mask', (['source_tokens'], {}), '(source_tokens)\n', (1561, 1576), False, 'from allennlp.nn.ut...
from bs4 import BeautifulSoup import pandas import requests from time import sleep def format_url(bbref_team_id, year): return("http://www.sports-reference.com/cbb/schools/" + bbref_team_id + "/" + str(year) + "-schedule.html") def get_schedule(url): soup = BeautifulSoup(requests.get(url).text) headers...
[ "pandas.read_csv", "requests.get", "time.sleep", "pandas.DataFrame", "pandas.concat" ]
[((1042, 1117), 'pandas.read_csv', 'pandas.read_csv', (['"""/Users/travistubbs/cbb_database/data/teams.txt"""'], {'sep': '"""\t"""'}), "('/Users/travistubbs/cbb_database/data/teams.txt', sep='\\t')\n", (1057, 1117), False, 'import pandas\n'), ((1826, 1855), 'pandas.concat', 'pandas.concat', (['schedule_array'], {}), '(...
# Copyright (c) 2018-2022, <NAME> # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * ...
[ "pycuda.driver.to_device", "numpy.int32", "numpy.array", "numpy.arctan2", "numpy.sin", "numpy.asarray", "cv2.blur", "pycuda.driver.mem_alloc", "numpy.intp", "numpy.cos", "pycuda.driver.from_device", "cv2.resize", "cv2.Canny", "pycuda.compiler.SourceModule", "pycuda.tools.DeviceData", "...
[((2532, 2555), 'pycuda.compiler.SourceModule', 'SourceModule', (['cuda_code'], {}), '(cuda_code)\n', (2544, 2555), False, 'from pycuda.compiler import SourceModule\n'), ((2407, 2433), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (2423, 2433), False, 'import os\n'), ((3198, 3297), 'cv2.re...
import math bottom_length = 180 bottom_width = 140 height = 50 taper = 30 margin = 2 * height * math.tan(math.radians(taper)) length = bottom_length + margin width = bottom_width + margin panel_height = height / math.cos(math.radians(taper)) print_margin = 5 svg = f"""<?xml version="1.0" encoding="UTF-8" standalon...
[ "math.radians" ]
[((106, 125), 'math.radians', 'math.radians', (['taper'], {}), '(taper)\n', (118, 125), False, 'import math\n'), ((224, 243), 'math.radians', 'math.radians', (['taper'], {}), '(taper)\n', (236, 243), False, 'import math\n')]
"""Extra utilities for temporary directories. NamedFileInTemporaryDirectory and TemporaryWorkingDirectory from IPython, which uses the 3-clause BSD license. """ from __future__ import print_function import os as _os from tempfile import TemporaryDirectory class NamedFileInTemporaryDirectory(object): """Open a f...
[ "os.chdir", "tempfile.TemporaryDirectory", "os.path.join", "os.getcwd" ]
[((1171, 1197), 'tempfile.TemporaryDirectory', 'TemporaryDirectory', ([], {}), '(**kwds)\n', (1189, 1197), False, 'from tempfile import TemporaryDirectory\n'), ((1213, 1255), 'os.path.join', '_os.path.join', (['self._tmpdir.name', 'filename'], {}), '(self._tmpdir.name, filename)\n', (1226, 1255), True, 'import os as _o...
import requests import json for i in range(10): response = requests.get(url="https://catfact.ninja/fact") data = response.json() print(data["fact"])
[ "requests.get" ]
[((64, 110), 'requests.get', 'requests.get', ([], {'url': '"""https://catfact.ninja/fact"""'}), "(url='https://catfact.ninja/fact')\n", (76, 110), False, 'import requests\n')]
from __future__ import unicode_literals from django.shortcuts import render, HttpResponse, redirect, get_object_or_404 from .models import Post,PostMarcas,Images # Create your views here. from django.forms import modelformset_factory from django.core.exceptions import ObjectDoesNotExist from django.urls import re...
[ "django.shortcuts.render" ]
[((553, 614), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', "{'post': post, 'query': query}"], {}), "(request, 'index.html', {'post': post, 'query': query})\n", (559, 614), False, 'from django.shortcuts import render, HttpResponse, redirect, get_object_or_404\n'), ((839, 906), 'django.shortcuts....
import tifffile name = r'H:\血管后处理文献阅读\新增参考文献\graph\tutorials\3d_classification\datasets\dataset40\train\0000-0069\0000-0069_3dim.tif' f = tifffile.imread(name) print(f.shape) tifffile.imwrite(r'H:\血管后处理文献阅读\新增参考文献\graph\tutorials\3d_clas' r'sification\datasets\dataset40\train\0000-0069\0.tif', f[0]) ...
[ "tifffile.imread", "tifffile.imwrite" ]
[((139, 160), 'tifffile.imread', 'tifffile.imread', (['name'], {}), '(name)\n', (154, 160), False, 'import tifffile\n'), ((177, 317), 'tifffile.imwrite', 'tifffile.imwrite', (['"""H:\\\\血管后处理文献阅读\\\\新增参考文献\\\\graph\\\\tutorials\\\\3d_classification\\\\datasets\\\\dataset40\\\\train\\\\0000-0069\\\\0.tif"""', 'f[0]'], {...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/9/19 3:37 下午 # @Author : kewen # @File : ColorUtils_test.py import unittest from utils.ColorUtils import toHex, get_n_rgb_colors class Test(unittest.TestCase): def test_toHex(self): rgb = [244, 255, 196] self.assertEqual(toHex(...
[ "unittest.main", "utils.ColorUtils.toHex", "utils.ColorUtils.get_n_rgb_colors" ]
[((429, 444), 'unittest.main', 'unittest.main', ([], {}), '()\n', (442, 444), False, 'import unittest\n'), ((376, 395), 'utils.ColorUtils.get_n_rgb_colors', 'get_n_rgb_colors', (['(3)'], {}), '(3)\n', (392, 395), False, 'from utils.ColorUtils import toHex, get_n_rgb_colors\n'), ((314, 324), 'utils.ColorUtils.toHex', 't...
import redis import time import json r=redis.Redis( host='localhost', db=0) sub_count=r.publish('nlp_test_pub',json.dumps({"type":"ping"})) # while True: # time.sleep(2) message=int(time.time()) _time=int(time.time()) task_name=f"nlp_test_pub_{_time}" uid_list=task_name+'_list' print('sub_count',sub_co...
[ "json.dumps", "time.time", "redis.Redis" ]
[((40, 75), 'redis.Redis', 'redis.Redis', ([], {'host': '"""localhost"""', 'db': '(0)'}), "(host='localhost', db=0)\n", (51, 75), False, 'import redis\n'), ((121, 149), 'json.dumps', 'json.dumps', (["{'type': 'ping'}"], {}), "({'type': 'ping'})\n", (131, 149), False, 'import json\n'), ((197, 208), 'time.time', 'time.ti...
""" This example shows a super basic usage of flask-geomapper. On running, the server, `/` route will show you a map of request locations. COMPATIBLE VERSIONS: * 1.0.0^ """ import flask from flask_geomapper import flask_geomapper app = flask.Flask(__name__) # init flask app fg = flask_geomapper(app, count_tri...
[ "flask_geomapper.flask_geomapper", "flask.Flask" ]
[((246, 267), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (257, 267), False, 'import flask\n'), ((290, 356), 'flask_geomapper.flask_geomapper', 'flask_geomapper', (['app'], {'count_trigger': 'app.before_request', 'debug': '(True)'}), '(app, count_trigger=app.before_request, debug=True)\n', (305, 3...
#!/usr/bin/env python import rospy from std_msgs.msg import String def callback(data): strdata = str(data) # hacky split val = strdata.split(':') val = val[1].split('\\t'); temp = val[0].split('"'); frame = int(temp[1]) state = int(val[1]) buttons = int(val[2]) print(frame, state,...
[ "rospy.init_node", "rospy.Subscriber", "rospy.spin" ]
[((351, 394), 'rospy.init_node', 'rospy.init_node', (['"""listener"""'], {'anonymous': '(True)'}), "('listener', anonymous=True)\n", (366, 394), False, 'import rospy\n'), ((399, 449), 'rospy.Subscriber', 'rospy.Subscriber', (['"""openwearable"""', 'String', 'callback'], {}), "('openwearable', String, callback)\n", (415...
import json import os from mock import patch from flexget import __version__ from flexget.api import __version__ as __api_version__ from flexget.manager import Manager from tests.conftest import MockManager class TestValidator(object): config = '{tasks: {}}' def test_invalid_payload(self, api_client): ...
[ "mock.patch.object", "json.loads", "json.dumps", "os.getpid" ]
[((1429, 1469), 'mock.patch.object', 'patch.object', (['MockManager', '"""load_config"""'], {}), "(MockManager, 'load_config')\n", (1441, 1469), False, 'from mock import patch\n'), ((1662, 1695), 'mock.patch.object', 'patch.object', (['Manager', '"""shutdown"""'], {}), "(Manager, 'shutdown')\n", (1674, 1695), False, 'f...
import six import graphene from graphene_django.filter.filterset import setup_filterset, GrapheneFilterSetMixin from graphene_django.registry import get_global_registry from graphql_relay.connection.connectiontypes import Connection, PageInfo, Edge from graphql_relay.connection.arrayconnection import get_offset_...
[ "graphene_django.registry.get_global_registry", "graphene.Field", "graphql_relay.connection.arrayconnection.offset_to_cursor", "graphene_django.forms.converter.convert_form_field", "graphene.types.argument.to_arguments", "graphene_django.filter.filterset.setup_filterset", "graphene.NonNull", "graphene...
[((1053, 1074), 'graphene_django.registry.get_global_registry', 'get_global_registry', ([], {}), '()\n', (1072, 1074), False, 'from graphene_django.registry import get_global_registry\n'), ((1929, 1950), 'graphene_django.registry.get_global_registry', 'get_global_registry', ([], {}), '()\n', (1948, 1950), False, 'from ...
import numpy as np from typing import List, Set from .model_controllers import AdaptiveController from .controller_utils import ModelResults class AdaptiveSelector: def __init__(self, controllers: List[AdaptiveController], model_valid_results: List[ModelResult]): self._controllers = controllers ...
[ "numpy.argmin", "numpy.abs" ]
[((1500, 1530), 'numpy.abs', 'np.abs', (['(self._budgets - budget)'], {}), '(self._budgets - budget)\n', (1506, 1530), True, 'import numpy as np\n'), ((1551, 1573), 'numpy.argmin', 'np.argmin', (['budget_diff'], {}), '(budget_diff)\n', (1560, 1573), True, 'import numpy as np\n')]
# Generated by Django 3.0.1 on 2020-02-11 03:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Post', '0003_post_files'), ] operations = [ migrations.AlterField( model_name='post', name='files', fiel...
[ "django.db.models.FileField" ]
[((322, 352), 'django.db.models.FileField', 'models.FileField', ([], {'upload_to': '""""""'}), "(upload_to='')\n", (338, 352), False, 'from django.db import migrations, models\n')]
# Exercício Python 020 # Programa que abra e reproduza um arquivo mp3 from pygame import mixer mixer.init() mixer.music.load('ex021.mp3') mixer.music.play() input()
[ "pygame.mixer.music.play", "pygame.mixer.init", "pygame.mixer.music.load" ]
[((95, 107), 'pygame.mixer.init', 'mixer.init', ([], {}), '()\n', (105, 107), False, 'from pygame import mixer\n'), ((108, 137), 'pygame.mixer.music.load', 'mixer.music.load', (['"""ex021.mp3"""'], {}), "('ex021.mp3')\n", (124, 137), False, 'from pygame import mixer\n'), ((138, 156), 'pygame.mixer.music.play', 'mixer.m...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from placethings.config.wrapper.config_gen import Config from placethings.demo.base_test import BaseTestCase from placethings.graph_gen.wrapper import gra...
[ "logging.getLogger", "placethings.graph_gen.wrapper.graph_gen.create_task_graph", "placethings.graph_gen.wrapper.graph_gen.create_topo_device_graph", "placethings.config.wrapper.config_gen.Config", "placethings.ilp.method.place_things" ]
[((369, 388), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (386, 388), False, 'import logging\n'), ((799, 829), 'placethings.config.wrapper.config_gen.Config', 'Config', ([], {'folderpath': 'config_name'}), '(folderpath=config_name)\n', (805, 829), False, 'from placethings.config.wrapper.config_gen impor...
# Generated by Django 3.2 on 2021-09-18 18:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='University', fields=[ ...
[ "django.db.models.CharField", "django.db.models.BigAutoField", "django.db.models.ForeignKey" ]
[((337, 433), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (356, 433), False, 'from django.db import migrations, m...
import os from shlex import quote from fast_align.utils import run_bash_command def read_err(err): T, m = "", "" for line in open(err): if "expected target length" in line: m = line.split()[-1] elif "final tension" in line: T = line.split()[-1] return T, m def ali...
[ "fast_align.utils.run_bash_command", "os.path.join", "shlex.quote" ]
[((704, 746), 'os.path.join', 'os.path.join', (['fast_align_dir', '"""fast_align"""'], {}), "(fast_align_dir, 'fast_align')\n", (716, 746), False, 'import os\n'), ((776, 814), 'os.path.join', 'os.path.join', (['fast_align_dir', '"""atools"""'], {}), "(fast_align_dir, 'atools')\n", (788, 814), False, 'import os\n'), ((2...
import pandas as pd import glob import os import copy ''' BankStatementAnalyzer --> To instantiate this class, following parameters are mandatory: statementfolder ---> Local file system folder where your bank statements are present. The folder can contain multiple files. All the files shoul...
[ "pandas.read_csv", "pandas.to_datetime", "os.path.isfile", "os.path.isdir", "copy.deepcopy", "glob.glob" ]
[((1925, 1955), 'os.path.isdir', 'os.path.isdir', (['statementfolder'], {}), '(statementfolder)\n', (1938, 1955), False, 'import os\n'), ((3363, 3395), 'os.path.isdir', 'os.path.isdir', (['self.outputfolder'], {}), '(self.outputfolder)\n', (3376, 3395), False, 'import os\n'), ((2531, 2593), 'pandas.read_csv', 'pd.read_...
#!/usr/bin/python import os import subprocess import argparse import time from colorama import init from colorama import Fore, Back, Style import re def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): return [atoi(c) for c in re.split('(\d+)', text)] class Tester: def...
[ "re.split", "os.listdir", "argparse.ArgumentParser", "os.path.join", "time.sleep", "os.path.basename", "os.path.abspath", "time.time", "colorama.init" ]
[((4990, 5090), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'description', 'formatter_class': 'argparse.RawTextHelpFormatter'}), '(description=description, formatter_class=argparse.\n RawTextHelpFormatter)\n', (5013, 5090), False, 'import argparse\n'), ((5451, 5457), 'colorama.init', '...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'window.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui...
[ "PyQt5.QtWidgets.QTextBrowser", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QSizePolicy", "PyQt5.QtWidgets.QTableWidget", "PyQt5.QtWidgets.QListWidgetItem", "PyQt5.QtWidgets.QStatusBar", "PyQt5.QtWidgets.QGroupBox", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QPu...
[((27506, 27538), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (27528, 27538), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((27556, 27579), 'PyQt5.QtWidgets.QMainWindow', 'QtWidgets.QMainWindow', ([], {}), '()\n', (27577, 27579), False, 'from PyQt5 import QtC...
import uuid from devutils.models import AbstractModel from django.contrib.auth.base_user import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.validators import UnicodeUsernameValidator from django.core.mail import send_mail from django.db import models from django.u...
[ "django.db.models.EmailField", "django.core.mail.send_mail", "django.utils.translation.gettext_lazy", "django.db.models.BooleanField", "django.contrib.auth.validators.UnicodeUsernameValidator", "django.db.models.UUIDField" ]
[((472, 559), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'primary_key': '(True)', 'default': 'uuid.uuid4', 'editable': '(False)', 'unique': '(True)'}), '(primary_key=True, default=uuid.uuid4, editable=False,\n unique=True)\n', (488, 559), False, 'from django.db import models\n'), ((581, 607), 'django.co...
import serial import time import csv ser = serial.Serial('COM5') ser.flushInput() while True: try: ser_bytes = ser.readline() decoded_bytes = float(ser_bytes[0:len(ser_bytes)-2].decode("utf-8")) print(decoded_bytes) with open("test_data.csv","a") as f: writ...
[ "csv.writer", "serial.Serial", "time.time" ]
[((48, 69), 'serial.Serial', 'serial.Serial', (['"""COM5"""'], {}), "('COM5')\n", (61, 69), False, 'import serial\n'), ((325, 353), 'csv.writer', 'csv.writer', (['f'], {'delimiter': '""","""'}), "(f, delimiter=',')\n", (335, 353), False, 'import csv\n'), ((383, 394), 'time.time', 'time.time', ([], {}), '()\n', (392, 39...
from Beam import Beam from OpticalElement import Optical_element from Shape import BoundaryRectangle import numpy as np import matplotlib.pyplot as plt from numpy.testing import assert_almost_equal from Vector import Vector fx=0.5 fz=0.5 beam=Beam(5000) #beam.set_divergences_collimated() #beam.set_rectangular_spot(1...
[ "Beam.Beam", "numpy.sqrt", "matplotlib.pyplot.show", "OpticalElement.Optical_element" ]
[((246, 256), 'Beam.Beam', 'Beam', (['(5000)'], {}), '(5000)\n', (250, 256), False, 'from Beam import Beam\n'), ((410, 427), 'OpticalElement.Optical_element', 'Optical_element', ([], {}), '()\n', (425, 427), False, 'from OpticalElement import Optical_element\n'), ((647, 657), 'matplotlib.pyplot.show', 'plt.show', ([], ...
def calculate_line_diff(): # SAME LINE line1_start = (41.88695, -87.63248) line1_end = (41.88692, -87.63539) line2_start = (41.88695, -87.62951) line2_end = (41.88695, -87.63248) # NOT THE SAME LINE # line1_start = (41.87523, -87.64807) # line1_end = (41.8777, -87.64545) # line2_start = (41.87437, -87.642...
[ "numpy.random.normal", "scipy.stats.gaussian_kde", "numpy.amin", "multiprocessing.Process", "math.degrees", "sklearn.neighbors.KernelDensity", "time.sleep", "math.cos", "numpy.vstack", "numpy.rot90", "math.sin", "numpy.amax", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((2039, 2063), 'numpy.random.normal', 'np.random.normal', ([], {'size': 'n'}), '(size=n)\n', (2055, 2063), True, 'import numpy as np\n'), ((2070, 2105), 'numpy.random.normal', 'np.random.normal', ([], {'scale': '(0.5)', 'size': 'n'}), '(scale=0.5, size=n)\n', (2086, 2105), True, 'import numpy as np\n'), ((2372, 2391),...
import praw import keyboard import time from PIL import Image import math from glob import glob import random import requests import re import pprint import importlib import datetime import urllib.request import string import sys from config import config reddit = praw.Reddit(client_id=config["rd_client"], client_secr...
[ "praw.Reddit", "re.compile" ]
[((266, 437), 'praw.Reddit', 'praw.Reddit', ([], {'client_id': "config['rd_client']", 'client_secret': "config['rd_secret']", 'username': "config['rd_dev_name']", 'password': "config['<PASSWORD>']", 'user_agent': '"""tesh254"""'}), "(client_id=config['rd_client'], client_secret=config['rd_secret'\n ], username=confi...
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 ''' See Ansible Module Documentation (Below) ''' import re import iniparse DOCUMENTATION = ''' --- module: yum_repo_exclude short_description: manage packages on a YUM repo's exclude line description: - Add package names or patterns...
[ "re.split", "iniparse.INIConfig" ]
[((2020, 2048), 'iniparse.INIConfig', 'iniparse.INIConfig', (['repofile'], {}), '(repofile)\n', (2038, 2048), False, 'import iniparse\n'), ((2351, 2376), 're.split', 're.split', (['"""\\\\s+"""', 'current'], {}), "('\\\\s+', current)\n", (2359, 2376), False, 'import re\n'), ((2538, 2566), 'iniparse.INIConfig', 'inipars...
import numpy as np import sys lines = [] for line in sys.stdin: lines.append(line.rstrip('\n')) n = int(lines[0]) count = 1 for i in range(n): size = int(lines[count]) count += 1 m = [[int(x) for x in lin.split()] for lin in lines[count:count+size]] m = np.array(m) k = np.trace(m) r = su...
[ "numpy.array", "numpy.trace" ]
[((278, 289), 'numpy.array', 'np.array', (['m'], {}), '(m)\n', (286, 289), True, 'import numpy as np\n'), ((298, 309), 'numpy.trace', 'np.trace', (['m'], {}), '(m)\n', (306, 309), True, 'import numpy as np\n')]
import sys def title(text): if sys.platform.startswith('linux'): print('\033[1;32m\n{}'.format(text.upper())) print('-'*len(text), end='\n\n\033[m') else: print('\n{}'.format(text.upper())) print('-'*len(text), end='\n\n') def header(text): print() if sys.platform.startswith('linux'): pri...
[ "sys.platform.startswith" ]
[((34, 66), 'sys.platform.startswith', 'sys.platform.startswith', (['"""linux"""'], {}), "('linux')\n", (57, 66), False, 'import sys\n'), ((279, 311), 'sys.platform.startswith', 'sys.platform.startswith', (['"""linux"""'], {}), "('linux')\n", (302, 311), False, 'import sys\n'), ((604, 636), 'sys.platform.startswith', '...
import os, random, shutil from shutil import copyfile from IPython import embed # You only need to change this line to your dataset download path download_path = '../train' #--------------------------------------- #train_val train_save_path = download_path + '/pytorch/train' val_save_path = download_path + '/pytorc...
[ "os.listdir", "shutil.move", "os.path.isdir", "os.mkdir", "os.system" ]
[((468, 539), 'os.system', 'os.system', (['"""cp -r ../train/pytorch/train_all/* ../train/pytorch/train/"""'], {}), "('cp -r ../train/pytorch/train_all/* ../train/pytorch/train/')\n", (477, 539), False, 'import os, random, shutil\n'), ((335, 365), 'os.path.isdir', 'os.path.isdir', (['train_save_path'], {}), '(train_sav...
""" Django settings for treeckle project. Generated by 'django-admin startproject' using Django 3.1.3. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os f...
[ "datetime.timedelta", "os.getenv", "pathlib.Path" ]
[((709, 732), 'os.getenv', 'os.getenv', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (718, 732), False, 'import os\n'), ((813, 834), 'os.getenv', 'os.getenv', (['"""DEBUG"""', '(0)'], {}), "('DEBUG', 0)\n", (822, 834), False, 'import os\n'), ((1548, 1576), 'os.getenv', 'os.getenv', (['"""MAILGUN_API_KEY"""'], {}), "...
import os import tempfile import zipfile from datetime import datetime, timedelta, timezone import boto3 import pytz from busshaming.models import Feed, FeedTimetable from busshaming.data_processing import upsert_timetable_data S3_BUCKET_NAME = os.environ.get('S3_BUCKET_NAME', 'busshaming-timetable-dumps') FEED_TIM...
[ "pytz.timezone", "tempfile.TemporaryDirectory", "boto3.client", "busshaming.data_processing.upsert_timetable_data.process_zip", "zipfile.ZipFile", "datetime.datetime.utcnow", "datetime.datetime.strptime", "busshaming.models.Feed.objects.get", "os.environ.get", "busshaming.models.FeedTimetable.obje...
[((249, 311), 'os.environ.get', 'os.environ.get', (['"""S3_BUCKET_NAME"""', '"""busshaming-timetable-dumps"""'], {}), "('S3_BUCKET_NAME', 'busshaming-timetable-dumps')\n", (263, 311), False, 'import os\n'), ((328, 361), 'pytz.timezone', 'pytz.timezone', (['"""Australia/Sydney"""'], {}), "('Australia/Sydney')\n", (341, ...
from ..executor import CobralangExecutor import colorama import json import os if __name__ == '__main__': executor = CobralangExecutor() tests = [ { "cobra": "6 + 19 + 6 - 39 + 1359 - 19", "python": "6 + 19 + 6 - 39 + 1359 - 19", }, { "cobra": "1 + 6 ...
[ "os.path.dirname", "json.dump" ]
[((2237, 2273), 'json.dump', 'json.dump', (['failed_tests', 'f'], {'indent': '(4)'}), '(failed_tests, f, indent=4)\n', (2246, 2273), False, 'import json\n'), ((2174, 2199), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (2189, 2199), False, 'import os\n')]
import os import sys import unittest import time sys.path.insert(0, os.path.abspath("../")) from mailgun import Mailgun from loguru import logger ################# # config ######## ################# mail = Mailgun() class TestSendEmail(unittest.TestCase): def test_email(self): r = mail.send_message( ...
[ "os.path.abspath", "loguru.logger.info", "unittest.main", "mailgun.Mailgun" ]
[((210, 219), 'mailgun.Mailgun', 'Mailgun', ([], {}), '()\n', (217, 219), False, 'from mailgun import Mailgun\n'), ((69, 91), 'os.path.abspath', 'os.path.abspath', (['"""../"""'], {}), "('../')\n", (84, 91), False, 'import os\n'), ((2415, 2430), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2428, 2430), False, '...
from autoarray.plot.mat_wrap import mat_plot as mp from autogalaxy.plot.plotters import lensing_obj_plotter from autogalaxy.plot.mat_wrap import lensing_mat_plot, lensing_include, lensing_visuals from autogalaxy.plot.plotters import light_profile_plotters, mass_profile_plotters from autogalaxy.profiles import light...
[ "autogalaxy.plot.mat_wrap.lensing_include.Include1D", "autogalaxy.plot.mat_wrap.lensing_include.Include2D", "autogalaxy.plot.plotters.mass_profile_plotters.MassProfilePlotter", "autogalaxy.plot.mat_wrap.lensing_mat_plot.MatPlot1D", "autogalaxy.plot.mat_wrap.lensing_mat_plot.MatPlot2D", "autogalaxy.plot.pl...
[((512, 540), 'autogalaxy.plot.mat_wrap.lensing_mat_plot.MatPlot1D', 'lensing_mat_plot.MatPlot1D', ([], {}), '()\n', (538, 540), False, 'from autogalaxy.plot.mat_wrap import lensing_mat_plot, lensing_include, lensing_visuals\n'), ((591, 618), 'autogalaxy.plot.mat_wrap.lensing_visuals.Visuals1D', 'lensing_visuals.Visual...
# Imports import numpy as np import pandas as pd import os import findspark from pyspark.sql import SparkSession from pyspark.ml.feature import VectorAssembler from pyspark.ml import Pipeline from pyspark.ml.classification import LogisticRegression from pyspark.ml.evaluation import MulticlassClassificationEvaluator fr...
[ "findspark.init", "pyspark.sql.SparkSession.builder.master", "pyspark.ml.evaluation.MulticlassClassificationEvaluator" ]
[((665, 681), 'findspark.init', 'findspark.init', ([], {}), '()\n', (679, 681), False, 'import findspark\n'), ((2097, 2153), 'pyspark.ml.evaluation.MulticlassClassificationEvaluator', 'MulticlassClassificationEvaluator', ([], {'metricName': '"""accuracy"""'}), "(metricName='accuracy')\n", (2130, 2153), False, 'from pys...
import subprocess import sys import ipaddress import threading import re import time import platform from datetime import datetime from multiprocessing import Queue # Verifie que oui.txt est present sinon on le recupere try: file = open('oui.txt', encoding='utf-8', mode='r') file.close() except FileNotFoundEr...
[ "ipaddress.ip_address", "subprocess.run", "time.sleep", "requests.get", "datetime.datetime.now", "platform.system", "threading.Thread", "multiprocessing.Queue", "ipaddress.ip_network" ]
[((1379, 1403), 'ipaddress.ip_network', 'ipaddress.ip_network', (['ip'], {}), '(ip)\n', (1399, 1403), False, 'import ipaddress\n'), ((1802, 1816), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1814, 1816), False, 'from datetime import datetime\n'), ((1963, 1970), 'multiprocessing.Queue', 'Queue', ([], {})...
from easy_python_requirements import util class TestIndentString: def test_none(self): assert util.indent_string(None) == '' def test_no_newline(self): assert util.indent_string('no newline') == ' no newline\n' def test_with_multiple_newlines(self): s = 'wow newlines\n\n\n' ...
[ "easy_python_requirements.util.get_depth_of_file", "easy_python_requirements.util.get_modules", "easy_python_requirements.util.get_classes", "easy_python_requirements.util.get_relative_path", "easy_python_requirements.util.get_type", "easy_python_requirements.util.indent_string", "easy_python_requiremen...
[((2512, 2547), 'easy_python_requirements.util.get_classes', 'util.get_classes', (['test_module_stuff'], {}), '(test_module_stuff)\n', (2528, 2547), False, 'from easy_python_requirements import util\n'), ((2766, 2816), 'easy_python_requirements.util.get_modules', 'util.get_modules', (['mock_functions.test_module_stuff'...
import graphene from mountains.models import Mountain from django.contrib.gis.measure import D from django.contrib.gis.db.models.functions import Distance from django.contrib.gis.geos import GEOSGeometry from utils.schema_utils import find_operation_field, get_selections class ActivityType(graphene.ObjectType): "...
[ "graphene.ID", "graphene.List" ]
[((367, 380), 'graphene.ID', 'graphene.ID', ([], {}), '()\n', (378, 380), False, 'import graphene\n'), ((948, 1014), 'graphene.List', 'graphene.List', (['ActivityType'], {'description': '"""Query strava activities"""'}), "(ActivityType, description='Query strava activities')\n", (961, 1014), False, 'import graphene\n')...
"""Implementation of parallel computation of the velocity integrals as a function of the integral variable y from the Gordeyev integral. """ import ctypes import multiprocessing as mp from functools import partial import numpy as np import scipy.integrate as si from isr_spectrum.inputs import config as cf def inte...
[ "multiprocessing.Array", "scipy.integrate.simps", "functools.partial", "multiprocessing.Pool", "numpy.cos", "numpy.sin" ]
[((901, 932), 'functools.partial', 'partial', (['parallel', 'params', 'v', 'f'], {}), '(parallel, params, v, f)\n', (908, 932), False, 'from functools import partial\n'), ((944, 953), 'multiprocessing.Pool', 'mp.Pool', ([], {}), '()\n', (951, 953), True, 'import multiprocessing as mp\n'), ((1261, 1277), 'scipy.integrat...
# -*- coding: utf-8 -*- # # Dao-Ke-Dao: Universal Message Module # # Written in 2019 by Moky <<EMAIL>> # # ============================================================================== # MIT License # # Copyright (c) 2019 <NAME> # # Permission is hereby granted, free of charge, to any ...
[ "time.time", "mkm.ID.parse" ]
[((5572, 5598), 'mkm.ID.parse', 'ID.parse', ([], {'identifier': 'group'}), '(identifier=group)\n', (5580, 5598), False, 'from mkm import ID, ANYONE\n'), ((6518, 6533), 'time.time', 'time_lib.time', ([], {}), '()\n', (6531, 6533), True, 'import time as time_lib\n')]
"""adding verbose_name to druid column Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2017-03-08 11:48:10.835741 """ # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "<PASSWORD>" import sqlalchemy as sa from alembic import op def upgrade(): op.add_column( "columns", sa....
[ "sqlalchemy.String", "alembic.op.drop_column" ]
[((411, 452), 'alembic.op.drop_column', 'op.drop_column', (['"""columns"""', '"""verbose_name"""'], {}), "('columns', 'verbose_name')\n", (425, 452), False, 'from alembic import op\n'), ((343, 365), 'sqlalchemy.String', 'sa.String', ([], {'length': '(1024)'}), '(length=1024)\n', (352, 365), True, 'import sqlalchemy as ...
import json, requests # JSON-RPC 1.0 client access to node api def requestJsonRPC(url, method, params): headers = {'content-type': 'application/json'} payload = { "method": method, "params": params, "jsonrpc": "1.0", "id": "mappa", } return requests.post(url, data=json.d...
[ "json.dumps" ]
[((314, 333), 'json.dumps', 'json.dumps', (['payload'], {}), '(payload)\n', (324, 333), False, 'import json, requests\n')]
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys sys.dont_write_bytecode = True import numpy as np import tensorflow as tf if tf.__version__ >= "2.0.0": import tensorflow.compat.v1 as tf tf.disable_eager_execution() from absl.testing import parameterized from deep_recommenders.datasets import SyntheticF...
[ "deep_recommenders.datasets.SyntheticForMultiTask", "deep_recommenders.estimator.models.multi_task_learning.MMoE", "absl.testing.parameterized.parameters", "tensorflow.compat.v1.logging.set_verbosity", "tensorflow.compat.v1.disable_eager_execution", "tensorflow.compat.v1.test.main", "tensorflow.compat.v...
[((202, 230), 'tensorflow.compat.v1.disable_eager_execution', 'tf.disable_eager_execution', ([], {}), '()\n', (228, 230), True, 'import tensorflow.compat.v1 as tf\n'), ((482, 524), 'absl.testing.parameterized.parameters', 'parameterized.parameters', (['(32)', '(64)', '(128)', '(512)'], {}), '(32, 64, 128, 512)\n', (506...
from unittest import mock from nimoy.specification import Specification class FeatureBlockRuleEnforcerSpec(Specification): def where_function_is_called_before_feature(self): with expect: class SomeSpec(Specification): def test_something(self, where_visited=False): ...
[ "unittest.mock.patch", "unittest.mock.Mock" ]
[((1483, 1524), 'unittest.mock.patch', 'mock.patch', (['"""nimoy.specification.Compare"""'], {}), "('nimoy.specification.Compare')\n", (1493, 1524), False, 'from unittest import mock\n'), ((1842, 1891), 'unittest.mock.patch', 'mock.patch', (['"""nimoy.specification.PowerAssertions"""'], {}), "('nimoy.specification.Powe...
#!/usr/bin/python import limp import json import sys print('json' in sys.modules) # False print(', '.join(json.loads('["Hello", "World!"]'))) print('json' in sys.modules) # True
[ "json.loads" ]
[((110, 143), 'json.loads', 'json.loads', (['"""["Hello", "World!"]"""'], {}), '(\'["Hello", "World!"]\')\n', (120, 143), False, 'import json\n')]
from setuptools import setup with open('README.md', 'r') as fh: long_description = fh.read() setup( name='OpenMEASURE', version='0.0.10', description='Python package for soft sensing applications', py_modules=['sparse_sensing'], package_dir={'':'src'}, long_description=long_des...
[ "setuptools.setup" ]
[((99, 511), 'setuptools.setup', 'setup', ([], {'name': '"""OpenMEASURE"""', 'version': '"""0.0.10"""', 'description': '"""Python package for soft sensing applications"""', 'py_modules': "['sparse_sensing']", 'package_dir': "{'': 'src'}", 'long_description': 'long_description', 'long_description_content_type': '"""text...
from katana_tsl_patch.katana.pedals.amp import Amp, AmpType import json from translate import translate def create_amp(amp_type: AmpType): def _create(knobs): return Amp( amp_type, **knobs ) return _create amps = { "DEFAULT": create_amp(AmpType.CLEAN), "Amp_...
[ "json.load", "katana_tsl_patch.katana.pedals.amp.Amp", "translate.translate" ]
[((181, 203), 'katana_tsl_patch.katana.pedals.amp.Amp', 'Amp', (['amp_type'], {}), '(amp_type, **knobs)\n', (184, 203), False, 'from katana_tsl_patch.katana.pedals.amp import Amp, AmpType\n'), ((3506, 3521), 'json.load', 'json.load', (['file'], {}), '(file)\n', (3515, 3521), False, 'import json\n'), ((3302, 3316), 'tra...
import abc import math from dataclasses import dataclass from typing import List, Optional, Tuple import xarray as xr from marshmallow import missing from bioimageio.core.resource_io import nodes from ._combined_processing import CombinedProcessing from ._model_adapters import ModelAdapter, create_model_adapter from ...
[ "math.ceil" ]
[((3727, 3759), 'math.ceil', 'math.ceil', (['((target_size - s) / i)'], {}), '((target_size - s) / i)\n', (3736, 3759), False, 'import math\n')]
import os import time import tensorflow as tf from tensorflow.python.client import timeline from tensorflow.python.framework import meta_graph batch_size = 32 num_bathes = 100 def print_tensor_info(tensor): print("tensor name:", tensor.op.name, "-tensor shape:", tensor.get_shape().as_list()) def inference(imag...
[ "tensorflow.gradients", "tensorflow.nn.lrn", "tensorflow.RunMetadata", "tensorflow.random_normal", "tensorflow.Session", "tensorflow.RunOptions", "tensorflow.matmul", "tensorflow.python.client.timeline.Timeline", "tensorflow.nn.conv2d", "tensorflow.nn.l2_loss", "tensorflow.reshape", "time.time...
[((3553, 3589), 'tensorflow.reshape', 'tf.reshape', (['pool5', '(-1, 6 * 6 * 256)'], {}), '(pool5, (-1, 6 * 6 * 256))\n', (3563, 3589), True, 'import tensorflow as tf\n'), ((5048, 5081), 'tensorflow.global_variables_initializer', 'tf.global_variables_initializer', ([], {}), '()\n', (5079, 5081), True, 'import tensorflo...
import datetime import unittest from data import city_visit from router import cost_accumulator from router import point_fit as point_fit_ from router import day_visit_cost_calculator as day_visit_cost_calculator_ from router import test_util class DayVisitCostCalculatorTest(unittest.TestCase): @staticmethod de...
[ "router.test_util.MockPoints", "datetime.datetime", "router.test_util.MockMoveCalculator", "router.day_visit_cost_calculator.DayVisitCostCalculatorGenerator", "router.test_util.MockCoordinates", "unittest.main", "router.point_fit.SimplePointFit", "router.cost_accumulator.FactorCostAccumulatorGenerator...
[((25544, 25559), 'unittest.main', 'unittest.main', ([], {}), '()\n', (25557, 25559), False, 'import unittest\n'), ((862, 884), 'router.test_util.MockPoints', 'test_util.MockPoints', ([], {}), '()\n', (882, 884), False, 'from router import test_util\n'), ((907, 937), 'router.test_util.MockMoveCalculator', 'test_util.Mo...
import requests import Models.network LEADERBOARD_HEROKU = 'https://lmtservice.herokuapp.com/leaderboard/' HISTORY_HEROKU = 'https://lormaster.herokuapp.com/history/' SEARCH_HEROKU = 'https://lormaster.herokuapp.com/search/' TAG_HEROKU = 'https://lormaster.herokuapp.com/tag/' class Heroku(): def __init__(self, l...
[ "requests.Session" ]
[((403, 421), 'requests.Session', 'requests.Session', ([], {}), '()\n', (419, 421), False, 'import requests\n')]
import psycopg2 import psycopg2.extras import psycopg2.pool class PostgresDB(object): _pool = None _instance = None def __new__(cls, host, port, user, password, db_name, min_conn, max_conn, cursor_factory=psycopg2.extras.DictCursor): if cls._instance is None: ...
[ "psycopg2.pool.ThreadedConnectionPool" ]
[((384, 563), 'psycopg2.pool.ThreadedConnectionPool', 'psycopg2.pool.ThreadedConnectionPool', ([], {'minconn': 'min_conn', 'maxconn': 'max_conn', 'host': 'host', 'port': 'port', 'user': 'user', 'password': 'password', 'dbname': 'db_name', 'cursor_factory': 'cursor_factory'}), '(minconn=min_conn, maxconn=max_conn,\n ...
#!/usr/bin/python import getopt import os import sys from cryptography.fernet import Fernet from dotenv import load_dotenv def main(argv): mode = "" key_env = "" key_gen = False input_file = "" output_file = "" try: opts, args = getopt.getopt(argv, "hm:i:o:k:", ["mode=", "input=", "output=", "key=", "keyge...
[ "getopt.getopt", "dotenv.load_dotenv", "cryptography.fernet.Fernet", "sys.exit", "cryptography.fernet.Fernet.generate_key" ]
[((1432, 1443), 'cryptography.fernet.Fernet', 'Fernet', (['key'], {}), '(key)\n', (1438, 1443), False, 'from cryptography.fernet import Fernet\n'), ((1706, 1717), 'cryptography.fernet.Fernet', 'Fernet', (['key'], {}), '(key)\n', (1712, 1717), False, 'from cryptography.fernet import Fernet\n'), ((242, 328), 'getopt.geto...
# Exercício 032 from datetime import date ano = int(input('Digite um ano qualquer. Digite 0 para analisar o ano ATUAL ')) if ano == 0: ano = date.today().year if ano % 4 == 0 and ano % 100 != 0 or ano % 400 == 0: print(f'O ano de \033[1m{ano}\033[m \033[1;32mé BISSEXTO!\033[m') else: print(f'O Ano de \033...
[ "datetime.date.today" ]
[((147, 159), 'datetime.date.today', 'date.today', ([], {}), '()\n', (157, 159), False, 'from datetime import date\n')]
import asyncio from quart import Quart from meross import MerossWrapper app = Quart(__name__) light = MerossWrapper() async def reload_if_exception(f): try: return await f() except Exception as e: print(e) global light light = MerossWrapper() return str(e) @app.route(...
[ "meross.MerossWrapper", "asyncio.get_event_loop", "quart.Quart" ]
[((79, 94), 'quart.Quart', 'Quart', (['__name__'], {}), '(__name__)\n', (84, 94), False, 'from quart import Quart\n'), ((103, 118), 'meross.MerossWrapper', 'MerossWrapper', ([], {}), '()\n', (116, 118), False, 'from meross import MerossWrapper\n'), ((690, 714), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {...
import glob import importlib import os import unittest import SimpleITK as sitk import numpy as np import sys import seg_metrics.seg_metrics as sg from parameterized import parameterized from medutils.medutils import save_itk import tempfile SUFFIX_LS = {".mhd", ".mha", ".nrrd", ".nii", ".nii.gz"} TEST_CASE1 = [{ "IM...
[ "tempfile.TemporaryDirectory", "parameterized.parameterized.expand", "numpy.testing.assert_allclose", "os.path.join", "numpy.array", "numpy.random.randint", "seg_metrics.seg_metrics.load_itk", "medutils.medutils.save_itk", "unittest.main" ]
[((780, 826), 'parameterized.parameterized.expand', 'parameterized.expand', (['[TEST_CASE1, TEST_CASE2]'], {}), '([TEST_CASE1, TEST_CASE2])\n', (800, 826), False, 'from parameterized import parameterized\n'), ((1786, 1801), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1799, 1801), False, 'import unittest\n'), (...
import sudsoln.candidate as candidate import sudsoln.sarray as sarray class Sudoku(): '''Sudoku puzzle.''' def __init__(self, array, empty = '.', elements = None): '''(Sudoku, 2d-array of object, str[, {objects}]) -> None Precondition: 1. each element in elements is of leng...
[ "random.seed", "datetime.datetime.now", "doctest.testmod", "sudsoln.sarray.Array", "sudsoln.candidate.Candidate" ]
[((53057, 53074), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (53072, 53074), False, 'import doctest\n'), ((3608, 3627), 'sudsoln.sarray.Array', 'sarray.Array', (['array'], {}), '(array)\n', (3620, 3627), True, 'import sudsoln.sarray as sarray\n'), ((21115, 21162), 'sudsoln.candidate.Candidate', 'candidate....
""" In vivo prediction robustness and first PC's """ import os import string import pandas as pd import seaborn as sns import numpy as np from .FigureCommon import getSetup, Legend, subplotLabel from ..StoneModMouseFit import InVivoPredict def makeFigure(): # Get list of axis objects ax, f = getSetup((6, 3), ...
[ "seaborn.factorplot", "seaborn.color_palette", "pandas.read_csv", "os.path.abspath", "numpy.meshgrid", "numpy.logspace" ]
[((1292, 1385), 'seaborn.factorplot', 'sns.factorplot', ([], {'x': '"""Cells"""', 'y': '"""value"""', 'hue': '"""Receptor"""', 'data': 'data', 'kind': '"""bar"""', 'ax': 'ax', 'ci': '(63)'}), "(x='Cells', y='value', hue='Receptor', data=data, kind='bar',\n ax=ax, ci=63)\n", (1306, 1385), True, 'import seaborn as sns...
""" """ __version__ = '0.1.0' __author__ = 'Morteza' import os try: import understand as und except ModuleNotFoundError: # Error handling pass from antlr4 import * from antlr4.TokenStreamRewriter import TokenStreamRewriter from gen.java.JavaParser import JavaParser from gen.javaLabeled.JavaLexer import...
[ "gen.javaLabeled.JavaLexer.JavaLexer", "gen.java.JavaParser.JavaParser", "antlr4.TokenStreamRewriter.TokenStreamRewriter", "understand.open" ]
[((11135, 11153), 'understand.open', 'und.open', (['udb_path'], {}), '(udb_path)\n', (11143, 11153), True, 'import understand as und\n'), ((12914, 12931), 'gen.javaLabeled.JavaLexer.JavaLexer', 'JavaLexer', (['stream'], {}), '(stream)\n', (12923, 12931), False, 'from gen.javaLabeled.JavaLexer import JavaLexer\n'), ((13...
import csv from datetime import datetime import random class Match: """ Stores key data fields about a specific match for the team """ def __init__(self, date, competition, competition_round, opponent, place): """ initialises the main fields of Match date - the date of the match ...
[ "datetime.datetime.strptime", "csv.writer", "random.choice" ]
[((3311, 3327), 'csv.writer', 'csv.writer', (['file'], {}), '(file)\n', (3321, 3327), False, 'import csv\n'), ((4339, 4386), 'datetime.datetime.strptime', 'datetime.strptime', (['match_details[0]', '"""%Y-%m-%d"""'], {}), "(match_details[0], '%Y-%m-%d')\n", (4356, 4386), False, 'from datetime import datetime\n'), ((529...
""" The following Python implementation of Shamir's Secret Sharing is released into the Public Domain under the terms of CC0 and OWFa: https://creativecommons.org/publicdomain/zero/1.0/ http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0 See the bottom few lines for usage. Tested on Python 2 and 3. ...
[ "base64.b64encode", "random.SystemRandom", "base64.b64decode" ]
[((7442, 7461), 'base64.b64decode', 'base64.b64decode', (['x'], {}), '(x)\n', (7458, 7461), False, 'import base64\n'), ((7942, 7962), 'base64.b64encode', 'base64.b64encode', (['by'], {}), '(by)\n', (7958, 7962), False, 'import base64\n'), ((778, 799), 'random.SystemRandom', 'random.SystemRandom', ([], {}), '()\n', (797...
from collections import Generator from th2_data_services import DataSource, Data, Filter from datetime import datetime # [1] Create DataSource object to connect to rpt-data-provider. DEMO_HOST = "10.64.66.66" # th2-kube-demo Host port where rpt-data-provider is located. DEMO_PORT = "30999" # Node port of rpt-data-...
[ "datetime.datetime", "th2_data_services.DataSource", "th2_data_services.Filter" ]
[((344, 389), 'th2_data_services.DataSource', 'DataSource', (['f"""http://{DEMO_HOST}:{DEMO_PORT}"""'], {}), "(f'http://{DEMO_HOST}:{DEMO_PORT}')\n", (354, 389), False, 'from th2_data_services import DataSource, Data, Filter\n'), ((404, 494), 'datetime.datetime', 'datetime', ([], {'year': '(2021)', 'month': '(6)', 'day...
import os db_user = os.environ.get('TEST_USER', None) db_pass = os.environ.get('TEST_PASS', None)
[ "os.environ.get" ]
[((21, 54), 'os.environ.get', 'os.environ.get', (['"""TEST_USER"""', 'None'], {}), "('TEST_USER', None)\n", (35, 54), False, 'import os\n'), ((65, 98), 'os.environ.get', 'os.environ.get', (['"""TEST_PASS"""', 'None'], {}), "('TEST_PASS', None)\n", (79, 98), False, 'import os\n')]
from fastecdsa.curve import Curve from fastecdsa.point import Point from starkware.crypto.signature import ( ALPHA, BETA, CONSTANT_POINTS, EC_ORDER, FIELD_PRIME, N_ELEMENT_BITS_HASH, SHIFT_POINT) curve = Curve( 'Curve0', FIELD_PRIME, ALPHA, BETA, EC_ORDER, *SHIFT_POINT) LOW_PART_BITS = 24...
[ "fastecdsa.point.Point", "fastecdsa.curve.Curve" ]
[((210, 275), 'fastecdsa.curve.Curve', 'Curve', (['"""Curve0"""', 'FIELD_PRIME', 'ALPHA', 'BETA', 'EC_ORDER', '*SHIFT_POINT'], {}), "('Curve0', FIELD_PRIME, ALPHA, BETA, EC_ORDER, *SHIFT_POINT)\n", (215, 275), False, 'from fastecdsa.curve import Curve\n'), ((368, 400), 'fastecdsa.point.Point', 'Point', (['*SHIFT_POINT'...
import logging import os import random import socket from typing import Tuple import magic import yaml import utils from validators import port_validation, check_port_open LOGGER_FILE = "./logs/server.log" # Настройки логирования logging.basicConfig( format="%(asctime)-15s [%(levelname)s] %(funcName)s: %(message...
[ "logging.getLogger", "logging.StreamHandler", "socket.socket", "validators.port_validation", "os.path.join", "yaml.safe_load", "logging.FileHandler", "utils.get_date", "os.path.abspath", "magic.Magic", "validators.check_port_open", "random.randint" ]
[((409, 436), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (426, 436), False, 'import logging\n'), ((454, 477), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (475, 477), False, 'import logging\n'), ((6768, 6812), 'validators.port_validation', 'port_validation', (['...
from functools import reduce from operator import or_ from django.db.models import Q from django_filters.rest_framework import CharFilter, FilterSet from project_core.models import Project class ProjectFilterSet(FilterSet): key_any = CharFilter(method='filter_any', label="Key, Title, Keyword, PI, Lay summary or...
[ "django.db.models.Q", "django_filters.rest_framework.CharFilter" ]
[((242, 340), 'django_filters.rest_framework.CharFilter', 'CharFilter', ([], {'method': '"""filter_any"""', 'label': '"""Key, Title, Keyword, PI, Lay summary or Organisation"""'}), "(method='filter_any', label=\n 'Key, Title, Keyword, PI, Lay summary or Organisation')\n", (252, 340), False, 'from django_filters.rest...
import logging import os import time from celery import shared_task from dateutil.relativedelta import relativedelta from django.db.models import F from django.utils import timezone from posthog.models import Cohort logger = logging.getLogger(__name__) MAX_AGE_MINUTES = 15 PARALLEL_COHORTS = int(os.environ.get("PAR...
[ "logging.getLogger", "dateutil.relativedelta.relativedelta", "os.environ.get", "django.db.models.F", "posthog.models.Cohort.objects.get", "django.utils.timezone.now", "celery.shared_task", "time.time" ]
[((228, 255), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (245, 255), False, 'import logging\n'), ((760, 806), 'celery.shared_task', 'shared_task', ([], {'ignore_result': '(True)', 'max_retries': '(1)'}), '(ignore_result=True, max_retries=1)\n', (771, 806), False, 'from celery import s...
# n! means n × (n − 1) × ... × 3 × 2 × 1 # For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, # and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. # Find the sum of the digits in the number 100! import math total = 0 for i in str(math.factorial(100)): total += int(i) print(total)
[ "math.factorial" ]
[((266, 285), 'math.factorial', 'math.factorial', (['(100)'], {}), '(100)\n', (280, 285), False, 'import math\n')]
import os from os.path import abspath, dirname, join from typing import Tuple from dotenv import load_dotenv load_dotenv() class BotSettings: @classmethod def token(cls) -> str: token = os.getenv("TOKEN") if not token: raise ValueError("Token must be specified (missing .env file ...
[ "os.path.dirname", "os.getenv", "dotenv.load_dotenv" ]
[((111, 124), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (122, 124), False, 'from dotenv import load_dotenv\n'), ((206, 224), 'os.getenv', 'os.getenv', (['"""TOKEN"""'], {}), "('TOKEN')\n", (215, 224), False, 'import os\n'), ((444, 461), 'os.getenv', 'os.getenv', (['"""CHAT"""'], {}), "('CHAT')\n", (453, 46...
import warnings import numpy as np import torch from torch import nn from torch.nn import functional as F from torch.utils.data import DataLoader from tqdm import tqdm, tqdm_notebook from itertools import chain import qucumber.cplx as cplx __all__ = [ "RBM_Module", "BinomialRBM" ] class RBM_Module(nn.Modul...
[ "itertools.chain", "numpy.sqrt", "torch.randperm", "qucumber.cplx.make_complex_vector", "torch.cuda.is_available", "torch.nn.functional.linear", "qucumber.cplx.MS_mult", "torch.distributions.bernoulli.Bernoulli", "warnings.warn", "torch.zeros_like", "qucumber.cplx.VS_mult", "torch.randn", "q...
[((3029, 3059), 'torch.mv', 'torch.mv', (['v', 'self.visible_bias'], {}), '(v, self.visible_bias)\n', (3037, 3059), False, 'import torch\n'), ((6371, 6421), 'torch.distributions.bernoulli.Bernoulli', 'torch.distributions.bernoulli.Bernoulli', ([], {'probs': '(0.5)'}), '(probs=0.5)\n', (6410, 6421), False, 'import torch...
#!/usr/bin/python # coding: utf-8 import numpy as np import netCDF4 import math import sys import time import calendar import datetime import os from math import pi from numpy import cos, sin, arccos, power, sqrt, exp,arctan2 ## Entrada path_wrf = (sys.argv[1]) filename = (sys.argv[2]) lat1 = (sys.argv[3]) lon1 = (sy...
[ "os.makedirs", "datetime.datetime.strptime", "netCDF4.Dataset", "numpy.argmax", "os.path.isfile", "numpy.exp", "os.path.isdir", "numpy.cos", "numpy.unravel_index", "numpy.savetxt", "numpy.sin", "numpy.full", "datetime.timedelta", "numpy.argmin" ]
[((453, 498), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['date2', '"""%Y%m%d%H"""'], {}), "(date2, '%Y%m%d%H')\n", (479, 498), False, 'import datetime\n'), ((507, 552), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['date3', '"""%Y%m%d%H"""'], {}), "(date3, '%Y%m%d%H')\n", (533, 552), ...
# # Data generator for training the SELDnet # import os import numpy as np import cls_feature_class from IPython import embed from collections import deque import random import parameter class DataGenerator(object): def __init__( self, datagen_mode='train', dataset='resim', ov=1, ov_num=1, split=1, d...
[ "os.listdir", "collections.deque", "random.shuffle", "numpy.where", "os.path.join", "numpy.zeros", "numpy.cos", "numpy.concatenate", "numpy.sin", "parameter.get_params", "cls_feature_class.FeatureClass" ]
[((784, 873), 'cls_feature_class.FeatureClass', 'cls_feature_class.FeatureClass', ([], {'dataset': 'dataset', 'ov': 'ov', 'split': 'split', 'db': 'db', 'nfft': 'nfft'}), '(dataset=dataset, ov=ov, split=split, db=db,\n nfft=nfft)\n', (814, 873), False, 'import cls_feature_class\n'), ((3477, 3502), 'parameter.get_para...
import math import numpy as np from gym import spaces import furuta_env_torque as fet import common as cm class FurutaEnvTorquePpo2(fet.FurutaEnvTorque): def __init__(self, state, render=False): super(FurutaEnvTorquePpo2, self).__init__(state=state, action_space=spaces.Box(np.array([-1]), np.array([1]))...
[ "numpy.array", "common.rad2Norm" ]
[((290, 304), 'numpy.array', 'np.array', (['[-1]'], {}), '([-1])\n', (298, 304), True, 'import numpy as np\n'), ((306, 319), 'numpy.array', 'np.array', (['[1]'], {}), '([1])\n', (314, 319), True, 'import numpy as np\n'), ((482, 515), 'common.rad2Norm', 'cm.rad2Norm', (['self.pole_angle_real'], {}), '(self.pole_angle_re...
from flow.envs.base_env import SumoEnvironment from flow.core import rewards from flow.controllers.car_following_models import * from gym.spaces.box import Box from gym.spaces.discrete import Discrete from gym.spaces.tuple_space import Tuple import numpy as np class SimpleLaneChangingAccelerationEnvironment(SumoEnvi...
[ "flow.core.rewards.desired_velocity", "gym.spaces.box.Box", "numpy.array", "gym.spaces.tuple_space.Tuple", "numpy.round" ]
[((1501, 1567), 'gym.spaces.box.Box', 'Box', ([], {'low': '(-np.inf)', 'high': 'np.inf', 'shape': '(self.vehicles.num_vehicles,)'}), '(low=-np.inf, high=np.inf, shape=(self.vehicles.num_vehicles,))\n', (1504, 1567), False, 'from gym.spaces.box import Box\n'), ((1583, 1660), 'gym.spaces.box.Box', 'Box', ([], {'low': '(0...
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from pathlib import Path import cloup import click from cloup import ( command, option, help_option, Path as PathType, option_group, ) if TYPE_CHECKING: import pandas as pd def measure_tubes_polylines( ann_file: str, scales: U...
[ "cloup.option", "pandas.read_csv", "pathlib.Path", "cloup.help_option", "cloup.Path", "sys.stderr.write", "pandas.to_numeric", "cloup.command", "sys.exit" ]
[((3042, 3096), 'cloup.command', 'command', (['"""measure"""'], {'help': '"""Measure pollen tube length."""'}), "('measure', help='Measure pollen tube length.')\n", (3049, 3096), False, 'from cloup import command, option, help_option, Path as PathType, option_group\n'), ((4082, 4184), 'cloup.option', 'option', (['"""-f...
from PIL import Image import numpy as np import flask import io import base64 from os import path import cv2 from prediccion import prediccion import numpy as np import json import pruebita_svm # initialize our Flask application and the Keras model app = flask.Flask(__name__) model = None categorias = ["0", "1", "2"...
[ "prediccion.prediccion", "flask.request.args.get", "PIL.Image.open", "json.loads", "flask.Flask", "io.BytesIO", "base64.b64decode", "pruebita_svm.clf.predict", "flask.request.form.get", "numpy.array", "os.path.dirname", "cv2.cvtColor", "cv2.imread", "flask.jsonify" ]
[((258, 279), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (269, 279), False, 'import flask\n'), ((416, 428), 'prediccion.prediccion', 'prediccion', ([], {}), '()\n', (426, 428), False, 'from prediccion import prediccion\n'), ((589, 601), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (599, 601), Fa...
import argparse import sys import logging import os import subprocess import csv DEBUG=True NOT_DEBUG=not DEBUG parser = argparse.ArgumentParser(description="Convert buildsummary peptides to pFind peptides file.", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_arg...
[ "logging.getLogger", "logging.basicConfig", "csv.DictReader", "argparse.ArgumentParser" ]
[((123, 280), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Convert buildsummary peptides to pFind peptides file."""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description=\n 'Convert buildsummary peptides to pFind peptides file.',\n formatter_class=argpars...
from board.board import Result from tqdm import trange import time def play_game(x_player, o_player, board, print_board=False): x_player.set_turn(1) o_player.set_turn(2) while not board.is_game_over(): player = o_player if board.whose_turn() == 1: player = x_player p...
[ "tqdm.trange", "time.sleep" ]
[((766, 782), 'time.sleep', 'time.sleep', (['(0.05)'], {}), '(0.05)\n', (776, 782), False, 'import time\n'), ((856, 875), 'tqdm.trange', 'trange', (['total_games'], {}), '(total_games)\n', (862, 875), False, 'from tqdm import trange\n')]
from ._core import IogasXMLObject import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) logger = logging.getLogger(__name__) class Linear(IogasXMLObject): def __init__(self, *args, xmlelement=None, **kwargs): super().__init__(*args, xmlelement=xmlelement, **kwargs) class Boundary...
[ "logging.getLogger", "logging.NullHandler" ]
[((121, 148), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (138, 148), False, 'import logging\n'), ((89, 110), 'logging.NullHandler', 'logging.NullHandler', ([], {}), '()\n', (108, 110), False, 'import logging\n'), ((50, 77), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}),...
import logging import responses from django.test import TestCase, override_settings from nurseconnect.services import get_clinic_code FAKE_URL = "https://username:password@external.api/" FAKE_ENDPOINT_RESPONSE = { "title": "Facility Check Nurse Connect", "headers": [ { "name": "value", ...
[ "nurseconnect.services.get_clinic_code", "django.test.override_settings", "responses.add", "logging.disable" ]
[((1093, 1136), 'django.test.override_settings', 'override_settings', ([], {'CLINIC_CODE_API': 'FAKE_URL'}), '(CLINIC_CODE_API=FAKE_URL)\n', (1110, 1136), False, 'from django.test import TestCase, override_settings\n'), ((1484, 1547), 'django.test.override_settings', 'override_settings', ([], {'FAKE_CLINIC_CODE_VALIDAT...
# -*- coding: utf-8 -*- """ Created on 2021/4/25 10:22 上午 --------- @summary: 将浏览器的cookie转为request的cookie --------- @author: Boris @email: <EMAIL> """ import json import pyperclip from feapder.utils.tools import get_cookies_from_str, print_pretty class CreateCookies: def get_data(self): """ @su...
[ "pyperclip.paste", "feapder.utils.tools.print_pretty", "feapder.utils.tools.get_cookies_from_str", "json.loads" ]
[((477, 494), 'pyperclip.paste', 'pyperclip.paste', ([], {}), '()\n', (492, 494), False, 'import pyperclip\n'), ((845, 866), 'feapder.utils.tools.print_pretty', 'print_pretty', (['cookies'], {}), '(cookies)\n', (857, 866), False, 'from feapder.utils.tools import get_cookies_from_str, print_pretty\n'), ((655, 671), 'jso...
#!/usr/bin/python import os import subprocess import argparse ## no exception handling yet, to be added. Logging to be added too (in progress, needs to be detailed) def find_filenames(dir_path): file_name_list = [] file_path_list = [] files_dict = {} for root, dirs, files in os.walk(dir_path): ...
[ "os.path.join", "subprocess.run", "argparse.ArgumentParser", "os.walk" ]
[((296, 313), 'os.walk', 'os.walk', (['dir_path'], {}), '(dir_path)\n', (303, 313), False, 'import os\n'), ((1903, 1968), 'subprocess.run', 'subprocess.run', (["['multiqc', qc_output_dir, '-o', multiqc_op_path]"], {}), "(['multiqc', qc_output_dir, '-o', multiqc_op_path])\n", (1917, 1968), False, 'import subprocess\n'),...