code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Generated by Django 3.1.4 on 2021-05-02 09:23 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Main', '0068_remove_product_discount'), ] operations = [ migrations.RenameField( model_name='product', old_name='advantage',...
[ "django.db.migrations.RenameField" ]
[((229, 325), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""product"""', 'old_name': '"""advantage"""', 'new_name': '"""generalTitle"""'}), "(model_name='product', old_name='advantage', new_name\n ='generalTitle')\n", (251, 325), False, 'from django.db import migrations\n')]
"""This module defines context managers which are used to trap exceptions and exit Python cleanly with specific exit_codes which are then seen as the numerical exit status of the process and ultimately Batch job. The exit_on_exception() context manager is used to bracket a block of code by mapping all exceptions onto ...
[ "caldp.log.warning", "random.uniform", "resource.setrlimit", "caldp.log.error", "os.environ.get", "time.sleep", "os.path.isfile", "os._exit", "caldp.exit_codes.explain_signal", "traceback.format_exc", "caldp.log.divider", "caldp.exit_codes.explain", "caldp.log.info", "doctest.testmod" ]
[((10284, 10330), 'caldp.log.divider', 'log.divider', (['"""Fatal Exception"""'], {'func': 'log.error'}), "('Fatal Exception', func=log.error)\n", (10295, 10330), False, 'from caldp import log\n'), ((16581, 16595), 'os._exit', 'os._exit', (['code'], {}), '(code)\n', (16589, 16595), False, 'import os\n'), ((16804, 16865...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-03 01:15 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('authentication', '0003_auto_20161030_0401'), ] operations = [ migrations.RemoveField(...
[ "django.db.migrations.RemoveField", "django.db.migrations.DeleteModel" ]
[((297, 357), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""permission"""', 'name': '"""role"""'}), "(model_name='permission', name='role')\n", (319, 357), False, 'from django.db import migrations\n'), ((402, 464), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([]...
#ini adalah file pertama yang akan dibaca from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) migrate = Migrate(app, db) from .models.users import User
[ "flask_sqlalchemy.SQLAlchemy", "flask.Flask", "flask_migrate.Migrate" ]
[((174, 189), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (179, 189), False, 'from flask import Flask\n'), ((227, 242), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (237, 242), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((253, 269), 'flask_migrate.Migrate', 'Migrate',...
# @createTime : 2019/10/30 9:13 # @author : Mou # @fileName: plan-schedule.py # 计划排产部分前端接口 import json from flask import current_app from flask import request from mesService import config_dict from mesService.lib.pgwrap.db import connection class PlanSchedule(object): def getsortlist(self): reqparam...
[ "flask.current_app.db.query_one", "json.loads", "json.dumps" ]
[((372, 392), 'json.loads', 'json.loads', (['reqparam'], {}), '(reqparam)\n', (382, 392), False, 'import json\n'), ((581, 615), 'flask.current_app.db.query_one', 'current_app.db.query_one', (['base_sql'], {}), '(base_sql)\n', (605, 615), False, 'from flask import current_app\n'), ((1004, 1022), 'json.dumps', 'json.dump...
import pandas as pd import numpy as np from statsmodels.formula.api import ols import plotly_express import plotly.graph_objs as go from plotly.subplots import make_subplots # Read in data batter_data = pd.read_csv("~/Desktop/MLB_FA/Data/fg_bat_data.csv") del batter_data['Age'] print(len(batter_data)) print(batter_dat...
[ "numpy.log", "pandas.read_csv", "plotly.graph_objs.Scatter", "pandas.merge", "numpy.isnan", "numpy.where", "statsmodels.formula.api.ols", "plotly_express.scatter", "plotly.subplots.make_subplots", "plotly_express.bar", "pandas.to_numeric", "plotly.graph_objs.Bar" ]
[((204, 256), 'pandas.read_csv', 'pd.read_csv', (['"""~/Desktop/MLB_FA/Data/fg_bat_data.csv"""'], {}), "('~/Desktop/MLB_FA/Data/fg_bat_data.csv')\n", (215, 256), True, 'import pandas as pd\n'), ((346, 400), 'pandas.read_csv', 'pd.read_csv', (['"""~/Desktop/MLB_FA/Data/fg_pitch_data.csv"""'], {}), "('~/Desktop/MLB_FA/Da...
# Libraries import pandas as pd import numpy as np import interface import time def get_dataframes(start_time, year=2010): dataframes = None columns_to_drop = interface.get_columns_to_drop() amount_csv = interface.get_amount_of_csv() for year in range(year, year+amount_csv): print('------------...
[ "interface.get_columns_to_drop", "pandas.read_csv", "interface.get_time", "time.time", "interface.drop_dimensions", "interface.create_dimensions", "interface.insert_static_dimensions", "interface.copy_from_stringio", "interface.get_ram", "pandas.concat", "interface.get_amount_of_csv" ]
[((168, 199), 'interface.get_columns_to_drop', 'interface.get_columns_to_drop', ([], {}), '()\n', (197, 199), False, 'import interface\n'), ((217, 246), 'interface.get_amount_of_csv', 'interface.get_amount_of_csv', ([], {}), '()\n', (244, 246), False, 'import interface\n'), ((2654, 2708), 'interface.get_ram', 'interfac...
# test_log_format.py """Unit tests for lta/log_format.py.""" import sys from requests.exceptions import HTTPError from .test_util import ObjectLiteral from lta.log_format import StructuredFormatter class LiteralRecord(ObjectLiteral): """ LiteralRecord is a literal LogRecord. This class creates an Objec...
[ "lta.log_format.StructuredFormatter", "sys.exc_info", "requests.exceptions.HTTPError" ]
[((768, 789), 'lta.log_format.StructuredFormatter', 'StructuredFormatter', ([], {}), '()\n', (787, 789), False, 'from lta.log_format import StructuredFormatter\n'), ((1056, 1148), 'lta.log_format.StructuredFormatter', 'StructuredFormatter', ([], {'component_type': '"""Picker"""', 'component_name': '"""test-picker"""', ...
# Example # ------- # # connectivity_check_v2.py from pyats import aetest import re import logging # get your logger for your script logger = logging.getLogger(__name__) class CommonSetup(aetest.CommonSetup): # CommonSetup-SubSec1 @aetest.subsection def check_topology( self, testb...
[ "re.search", "argparse.ArgumentParser", "logging.getLogger" ]
[((146, 173), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (163, 173), False, 'import logging\n'), ((16164, 16189), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (16187, 16189), False, 'import argparse\n'), ((2955, 2983), 're.search', 're.search', (['"""timeout...
import wx import numpy as np import time from wx import glcanvas from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.arrays import vbo from OpenGL.GL import shaders from readobj import Obj3D __author__ = '<NAME>' __version__ = '0.1.0' vertexShader = """ #version 120 void main() { gl_Posit...
[ "wx.Menu", "readobj.Obj3D", "OpenGL.GL.shaders.glUseProgram", "wx.glcanvas.GLContext", "wx.StaticText", "numpy.array", "OpenGL.GL.shaders.compileProgram", "OpenGL.GL.shaders.compileShader", "wx.MenuBar" ]
[((1079, 1103), 'wx.glcanvas.GLContext', 'glcanvas.GLContext', (['self'], {}), '(self)\n', (1097, 1103), False, 'from wx import glcanvas\n'), ((3450, 3503), 'OpenGL.GL.shaders.compileShader', 'shaders.compileShader', (['vertexShader', 'GL_VERTEX_SHADER'], {}), '(vertexShader, GL_VERTEX_SHADER)\n', (3471, 3503), False, ...
from django.conf.urls import url from .. import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^add/$', views.request_add) ]
[ "django.conf.urls.url" ]
[((76, 112), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.index'], {'name': '"""index"""'}), "('^$', views.index, name='index')\n", (79, 112), False, 'from django.conf.urls import url\n'), ((119, 151), 'django.conf.urls.url', 'url', (['"""^add/$"""', 'views.request_add'], {}), "('^add/$', views.request_add)\n", ...
from flask import Flask, render_template, url_for, request, redirect,flash from flask_sqlalchemy import SQLAlchemy from datetime import datetime app = Flask(__name__) @app.route("/", methods=["POST", "GET"]) def Base(): if request.method == "POST": name = request.form["name"] email = request.form["emai...
[ "flask.url_for", "flask.Flask", "flask.render_template" ]
[((156, 171), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (161, 171), False, 'from flask import Flask, render_template, url_for, request, redirect, flash\n'), ((534, 567), 'flask.render_template', 'render_template', (['"""Thankyou2.html"""'], {}), "('Thankyou2.html')\n", (549, 567), False, 'from flask i...
#!/usr/bin/env python3 # Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT # file at the top-level directory of this distribution. # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/M...
[ "os.mkdir", "subprocess.Popen", "os.path.basename", "os.path.exists", "pathlib.Path", "collections.namedtuple", "tarfile.open", "shutil.rmtree" ]
[((558, 593), 'collections.namedtuple', 'namedtuple', (['"""arc"""', '"""board, cpu_arc"""'], {}), "('arc', 'board, cpu_arc')\n", (568, 593), False, 'from collections import namedtuple\n'), ((755, 775), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (769, 775), False, 'import os\n'), ((1263, 1332), 'su...
"""FizzBuzz Game, by <NAME> <EMAIL> A number game where you also race against the clock. Tags: tiny, beginner, game, math""" __version__ = 0 import sys, time print('''Fizz Buzz Game, by <NAME> <EMAIL> Starting with 1, enter increasing numbers. However, if the number is a multiple of 3, type "fizz" instead of the numb...
[ "sys.exit", "time.time" ]
[((712, 723), 'time.time', 'time.time', ([], {}), '()\n', (721, 723), False, 'import sys, time\n'), ((1635, 1645), 'sys.exit', 'sys.exit', ([], {}), '()\n', (1643, 1645), False, 'import sys, time\n'), ((1655, 1666), 'time.time', 'time.time', ([], {}), '()\n', (1664, 1666), False, 'import sys, time\n'), ((1776, 1786), '...
from django.core.mail import send_mail from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render,redirect,reverse from django.http import HttpResponse from .models import Lead,Agent,Category from .forms import LeadForm, LeadModelForm,CustomUserCreationForm,AssignAgentForm,LeadCategor...
[ "django.shortcuts.render", "django.core.mail.send_mail", "django.shortcuts.redirect", "django.shortcuts.reverse" ]
[((784, 815), 'django.shortcuts.render', 'render', (['request', '"""landing.html"""'], {}), "(request, 'landing.html')\n", (790, 815), False, 'from django.shortcuts import render, redirect, reverse\n'), ((1943, 1986), 'django.shortcuts.render', 'render', (['request', '"""leads/home.html"""', 'context'], {}), "(request,...
# coding=utf-8 ''' test case for loss ''' import tensorflow as tf from segelectri.loss_metrics.loss import FocalLoss, LovaszLoss, DiceLoss, BoundaryLoss class TestLoss(tf.test.TestCase): def setUp(self): self.y_true = tf.random.uniform((2, 512, 512), minval=0, ...
[ "tensorflow.keras.losses.SparseCategoricalCrossentropy", "segelectri.loss_metrics.loss.FocalLoss", "segelectri.loss_metrics.loss.DiceLoss", "tensorflow.random.uniform", "segelectri.loss_metrics.loss.LovaszLoss", "segelectri.loss_metrics.loss.BoundaryLoss" ]
[((232, 300), 'tensorflow.random.uniform', 'tf.random.uniform', (['(2, 512, 512)'], {'minval': '(0)', 'maxval': '(3)', 'dtype': 'tf.int64'}), '((2, 512, 512), minval=0, maxval=3, dtype=tf.int64)\n', (249, 300), True, 'import tensorflow as tf\n'), ((443, 516), 'tensorflow.random.uniform', 'tf.random.uniform', (['(2, 512...
"""Dynamo access""" import os from time import sleep import boto.dynamodb2 from .khan_logger import KhanLogger __author__ = 'mattjmorris' class Dynamo(object): def __init__(self, access_key=None, secret=None): """ If access_key and/or secret are not passed in, assumes we are accessing erenev's ...
[ "os.getenv", "time.sleep" ]
[((606, 636), 'os.getenv', 'os.getenv', (['"""VEN_S3_ACCESS_KEY"""'], {}), "('VEN_S3_ACCESS_KEY')\n", (615, 636), False, 'import os\n'), ((664, 690), 'os.getenv', 'os.getenv', (['"""VEN_S3_SECRET"""'], {}), "('VEN_S3_SECRET')\n", (673, 690), False, 'import os\n'), ((2166, 2183), 'time.sleep', 'sleep', (['sleep_secs'], ...
# A bit of setup from __future__ import print_function import Models import code_base.solver as slvr from code_base.data_utils import * from code_base.layers import * from code_base.solver import Solver settings.time_analysis['logger_enabled'] = False # for auto-reloading external modules # see http://stackoverflow....
[ "code_base.solver._file.flush", "code_base.solver._file.write", "code_base.solver.Solver" ]
[((596, 775), 'code_base.solver.Solver', 'Solver', (['model', 'data'], {'num_epochs': 'epoch', 'batch_size': 'batch_size', 'update_rule': '"""adam"""', 'optim_config': "{'learning_rate': alpha}", 'lr_decay': 'alpha_decay', 'verbose': '(True)', 'print_every': '(1)'}), "(model, data, num_epochs=epoch, batch_size=batch_si...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from network import network_pb2 as network_dot_network__pb2 class NetworkStub(object): """Network service is usesd to gain visibility into networks """...
[ "grpc.method_handlers_generic_handler", "grpc.unary_unary_rpc_method_handler", "grpc.experimental.unary_unary" ]
[((5845, 5921), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""network.Network"""', 'rpc_method_handlers'], {}), "('network.Network', rpc_method_handlers)\n", (5881, 5921), False, 'import grpc\n'), ((4024, 4240), 'grpc.unary_unary_rpc_method_handler', 'grpc.unary_unary_rpc_method_...
from executor.executor import Executor from argparse import ArgumentParser from configs.mesh import add_mesh_switch_arguments from configs.mesh import SimpleBlockMeshConfig, SimpleBlockMeshArguments from configs.mesh import RailMeshArguments, RailMeshConfig from configs.fragmentation import FragmentationConfig, Fragmen...
[ "configs.execution.ExecutionConfig", "configs.mesh.SimpleBlockMeshConfig", "executor.executor.Executor", "configs.fragmentation.FragmentationConfig", "mesh_generator.simple_generator.SimpleBlockMeshGenerator" ]
[((1120, 1143), 'configs.mesh.SimpleBlockMeshConfig', 'SimpleBlockMeshConfig', ([], {}), '()\n', (1141, 1143), False, 'from configs.mesh import SimpleBlockMeshConfig, SimpleBlockMeshArguments\n'), ((1180, 1201), 'configs.fragmentation.FragmentationConfig', 'FragmentationConfig', ([], {}), '()\n', (1199, 1201), False, '...
from glob import glob from os import path import pytest import audiofile as af import numpy as np import audresample def set_ones(signal, channels): signal[channels, :] = 1 return signal def mixdown(signal): return np.atleast_2d(np.mean(signal, axis=0)) @pytest.mark.parametrize( 'signal, channel...
[ "audresample.am_fm_synth", "audresample.remix", "numpy.zeros", "numpy.ones", "numpy.mean", "numpy.testing.assert_equal", "pytest.mark.xfail" ]
[((7552, 7639), 'audresample.remix', 'audresample.remix', (['signal', 'channels', 'mixdown'], {'upmix': 'upmix', 'always_copy': 'always_copy'}), '(signal, channels, mixdown, upmix=upmix, always_copy=\n always_copy)\n', (7569, 7639), False, 'import audresample\n'), ((7686, 7725), 'numpy.testing.assert_equal', 'np.tes...
from typing import List, Dict, Optional from jass.agents.agent import Agent from jass.agents.state import PlayCardState, ChooseTrumpState from jass.logic.card import Card, Suit from jass.logic.exceptions import IllegalMoveError from jass.logic.hand import Hand class Player: def __init__(self, name: str, agent: A...
[ "jass.logic.card.Card", "jass.agents.state.ChooseTrumpState", "jass.logic.exceptions.IllegalMoveError" ]
[((1692, 1750), 'jass.agents.state.ChooseTrumpState', 'ChooseTrumpState', (['self.__hand.cards'], {'can_chibre': 'can_chibre'}), '(self.__hand.cards, can_chibre=can_chibre)\n', (1708, 1750), False, 'from jass.agents.state import PlayCardState, ChooseTrumpState\n'), ((1616, 1675), 'jass.logic.exceptions.IllegalMoveError...
# Generated by Django 2.0 on 2019-02-25 19:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portfolio', '0007_auto_20190225_1849'), ] operations = [ migrations.AddField( model_name='portfoliopage', name='git_ur...
[ "django.db.models.CharField", "django.db.models.URLField" ]
[((342, 380), 'django.db.models.URLField', 'models.URLField', ([], {'blank': '(True)', 'null': '(True)'}), '(blank=True, null=True)\n', (357, 380), False, 'from django.db import migrations, models\n'), ((513, 551), 'django.db.models.URLField', 'models.URLField', ([], {'blank': '(True)', 'null': '(True)'}), '(blank=True...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Category' db.create_table('panda_category', ( ('id', self.gf('django.db.models...
[ "south.db.db.delete_table", "south.db.db.create_unique", "django.db.models.ForeignKey", "django.db.models.AutoField", "south.db.db.send_create_signal" ]
[((561, 605), 'south.db.db.send_create_signal', 'db.send_create_signal', (['"""panda"""', "['Category']"], {}), "('panda', ['Category'])\n", (582, 605), False, 'from south.db import db\n'), ((1494, 1540), 'south.db.db.send_create_signal', 'db.send_create_signal', (['"""panda"""', "['TaskStatus']"], {}), "('panda', ['Ta...
import requests import json import base64 import numpy as np import matplotlib.pyplot as plt import pickle import imageio def get_jsonstr(url): url = "http://172.16.58.3:8089/api/problem?stuid=031804104" response = requests.get(url) jsonstr = json.loads(response.text) return jsonstr def ...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "json.loads", "matplotlib.pyplot.imshow", "imageio.imread", "base64.b64decode", "pickle.load", "numpy.array", "requests.get" ]
[((234, 251), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (246, 251), False, 'import requests\n'), ((267, 292), 'json.loads', 'json.loads', (['response.text'], {}), '(response.text)\n', (277, 292), False, 'import json\n'), ((1137, 1158), 'pickle.load', 'pickle.load', (['pkl_file'], {}), '(pkl_file)\n', (1...
import setuptools with open('README.md', 'r') as readme_file: long_description = readme_file.read() with open('requirements.txt', 'r') as requirements_file: requirements = requirements_file.read().splitlines() setuptools.setup( name="ipasc_tool", version="0.1.3", author="International Photoacoust...
[ "setuptools.find_packages" ]
[((540, 604), 'setuptools.find_packages', 'setuptools.find_packages', ([], {'include': "['ipasc_tool', 'ipasc_tool.*']"}), "(include=['ipasc_tool', 'ipasc_tool.*'])\n", (564, 604), False, 'import setuptools\n')]
from git_sentry.handlers.access_controlled_git_object import AccessControlledGitObject from git_sentry.handlers.git_repo import GitRepo from git_sentry.handlers.git_user import GitUser class GitTeam(AccessControlledGitObject): def __init__(self, git_object): super().__init__(git_object) def name(self...
[ "git_sentry.handlers.git_repo.GitRepo", "git_sentry.handlers.git_user.GitUser" ]
[((646, 656), 'git_sentry.handlers.git_repo.GitRepo', 'GitRepo', (['r'], {}), '(r)\n', (653, 656), False, 'from git_sentry.handlers.git_repo import GitRepo\n'), ((1000, 1010), 'git_sentry.handlers.git_user.GitUser', 'GitUser', (['u'], {}), '(u)\n', (1007, 1010), False, 'from git_sentry.handlers.git_user import GitUser\...
import numpy as np import argparse import imutils import cv2 ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required = True, help = "Path to the image") ap.add_argument("-i2", "--image2", required = True, help = "Path to the image 2") ap.add_argument("-i3", "--image3", required = True, help = "Path to...
[ "argparse.ArgumentParser", "cv2.bitwise_and", "numpy.ones", "cv2.warpAffine", "cv2.rectangle", "imutils.translate", "imutils.resize", "cv2.imshow", "cv2.getRotationMatrix2D", "cv2.subtract", "cv2.cvtColor", "cv2.split", "cv2.destroyAllWindows", "cv2.resize", "cv2.circle", "cv2.bitwise_...
[((67, 92), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (90, 92), False, 'import argparse\n'), ((373, 398), 'cv2.imread', 'cv2.imread', (["args['image']"], {}), "(args['image'])\n", (383, 398), False, 'import cv2\n'), ((419, 448), 'cv2.imshow', 'cv2.imshow', (['"""Original"""', 'image'], {})...
import datetime import random import csv import json # TODO: Fix * imports from django.shortcuts import * from django.contrib.auth.decorators import login_required, user_passes_test from django.contrib.auth import logout as auth_logout from social.apps.django_app.default.models import UserSocialAuth from gnip_search...
[ "csv.writer", "chart.Chart", "tweets.Tweets", "json.dumps", "django.contrib.auth.logout", "datetime.timedelta", "frequency.Frequency" ]
[((833, 875), 'datetime.timedelta', 'datetime.timedelta', ([], {'days': 'DEFAULT_TIMEFRAME'}), '(days=DEFAULT_TIMEFRAME)\n', (851, 875), False, 'import datetime\n'), ((899, 926), 'datetime.timedelta', 'datetime.timedelta', ([], {'days': '(30)'}), '(days=30)\n', (917, 926), False, 'import datetime\n'), ((5777, 5797), 'd...
import pytest import mxnet as mx import numpy as np from mxfusion.components.variables.runtime_variable import add_sample_dimension, is_sampled_array, get_num_samples from mxfusion.components.distributions import Gamma, GammaMeanVariance from mxfusion.util.testutils import numpy_array_reshape from mxfusion.util.testuti...
[ "numpy.random.uniform", "mxfusion.components.distributions.GammaMeanVariance.define_variable", "mxfusion.components.distributions.Gamma.define_variable", "mxfusion.components.variables.runtime_variable.is_sampled_array", "mxnet.random.seed", "numpy.random.rand", "scipy.stats.gamma.logpdf", "mxfusion.c...
[((358, 393), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""set_seed"""'], {}), "('set_seed')\n", (381, 393), False, 'import pytest\n'), ((1760, 1808), 'mxfusion.util.testutils.numpy_array_reshape', 'numpy_array_reshape', (['mean', 'mean_isSamples', 'n_dim'], {}), '(mean, mean_isSamples, n_dim)\n', (1779,...
import hashlib import os from .. import FileBuilder from .file_builder_test import FileBuilderTest class HashDirsTest(FileBuilderTest): """Tests a hash directory build operation. The build operation computes SHA-256 hashes for all of the files and directories in a given root directory. A directory's has...
[ "os.mkdir", "hashlib.sha256", "os.path.join" ]
[((624, 661), 'os.path.join', 'os.path.join', (['self._temp_dir', '"""Input"""'], {}), "(self._temp_dir, 'Input')\n", (636, 661), False, 'import os\n'), ((670, 695), 'os.mkdir', 'os.mkdir', (['self._input_dir'], {}), '(self._input_dir)\n', (678, 695), False, 'import os\n'), ((822, 838), 'hashlib.sha256', 'hashlib.sha25...
# ====================================================================== # Program Alarm # Advent of Code 2019 Day 02 -- <NAME> -- https://adventofcode.com # # Computer simulation by Dr. <NAME> III # ====================================================================== # ====================================...
[ "intcode.IntCode", "argparse.ArgumentParser", "sys.exit" ]
[((1497, 1553), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'desc', 'epilog': 'sample'}), '(description=desc, epilog=sample)\n', (1520, 1553), False, 'import argparse\n'), ((2839, 2897), 'intcode.IntCode', 'intcode.IntCode', ([], {'text': 'input_lines[0]', 'noun': 'noun', 'verb': 'verb'})...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Author: <NAME>, Finland 2014-2018 # # This file is part of Kunquat. # # CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/ # # To the extent possible under law, Kunquat Affirmers have waived all # copyright and related or neighboring rights to Kunqua...
[ "scripts.configure.test_add_libkunquatfile_external_deps", "support.fabricate.main", "scripts.install_share.install_share", "support.fabricate.Builder.echo", "scripts.cc.get_cc", "shutil.rmtree", "os.path.join", "scripts.command.PythonCommand", "scripts.test_libkunquat.test_libkunquat", "scripts.c...
[((8568, 8610), 'support.fabricate.main', 'fabricate.main', ([], {'extra_options': 'cmdline_opts'}), '(extra_options=cmdline_opts)\n', (8582, 8610), True, 'import support.fabricate as fabricate\n'), ((4591, 4609), 'scripts.cc.get_cc', 'get_cc', (['options.cc'], {}), '(options.cc)\n', (4597, 4609), False, 'from scripts....
""" Segmenting real-world sounds correctly with synthetic sounds ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It's easy to figure out if a sound is being correcly segmented if the signal at hand is well defined, and repeatable, like in many technological/ engineering applications. However, in bioacoust...
[ "itsfm.view_horseshoebat_call.visualise_call", "numpy.abs", "itsfm.simulate_calls.make_cffm_call", "itsfm.simulate_calls.silence", "scipy.signal.tukey", "itsfm.signal_processing.rms", "itsfm.simulate_calls.make_fm_chirp", "numpy.around", "itsfm.simulate_calls.make_tone", "numpy.random.normal", "...
[((2172, 2202), 'itsfm.simulate_calls.make_cffm_call', 'make_cffm_call', (['call_props', 'fs'], {}), '(call_props, fs)\n', (2186, 2202), False, 'from itsfm.simulate_calls import make_cffm_call, make_tone, make_fm_chirp, silence\n'), ((2216, 2249), 'scipy.signal.tukey', 'signal.tukey', (['cffm_call.size', '(0.1)'], {}),...
import rebase as rb import pickle from datetime import datetime import rebase.util.api_request as api_request class Predicter(): @classmethod def load_data(cls, pred, start_date, end_date): site_config = rb.Site.get(pred.site_id) return pred.load_data(site_config, start_date, end_date) ...
[ "pickle.loads", "rebase.util.api_request.post", "rebase.util.api_request.get", "rebase.Site.get", "pickle.dumps" ]
[((223, 248), 'rebase.Site.get', 'rb.Site.get', (['pred.site_id'], {}), '(pred.site_id)\n', (234, 248), True, 'import rebase as rb\n'), ((1027, 1049), 'rebase.util.api_request.post', 'api_request.post', (['path'], {}), '(path)\n', (1043, 1049), True, 'import rebase.util.api_request as api_request\n'), ((1374, 1395), 'r...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 17 15:24:18 2020 @author: dhulls """ from anastruct import SystemElements import numpy as np class TrussModel: def HF(self, young1=None, young2=None, area1=None, area2=None, P1=None, P2=None, P3=None, P4=None, P5=None, P6=None): ...
[ "numpy.array", "anastruct.SystemElements", "numpy.sum" ]
[((333, 349), 'anastruct.SystemElements', 'SystemElements', ([], {}), '()\n', (347, 349), False, 'from anastruct import SystemElements\n'), ((2828, 2839), 'numpy.array', 'np.array', (['K'], {}), '(K)\n', (2836, 2839), True, 'import numpy as np\n'), ((2989, 3005), 'anastruct.SystemElements', 'SystemElements', ([], {}), ...
from django.db import models from django.urls import reverse from datetime import date # Create your models here. class Photo(models.Model): """猫猫相片的数据库模型""" image = models.ImageField( '图像', upload_to='image/' ) title = models.CharField('标题', blank=True, max_length=8) descript...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.ImageField", "django.urls.reverse", "django.db.models.DateField" ]
[((177, 220), 'django.db.models.ImageField', 'models.ImageField', (['"""图像"""'], {'upload_to': '"""image/"""'}), "('图像', upload_to='image/')\n", (194, 220), False, 'from django.db import models\n'), ((259, 307), 'django.db.models.CharField', 'models.CharField', (['"""标题"""'], {'blank': '(True)', 'max_length': '(8)'}), ...
""" ASGI config for DjAI project. It exposes the ASGI callable as a module-level variable named ``application`` For more information on this file, see docs.djangoproject.com/en/dev/howto/deployment/asgi """ # ref: django-configurations.readthedocs.io import os # from django.core.asgi import get_asgi_application...
[ "configurations.asgi.get_asgi_application", "os.environ.setdefault" ]
[((376, 445), 'os.environ.setdefault', 'os.environ.setdefault', ([], {'key': '"""DJANGO_SETTINGS_MODULE"""', 'value': '"""settings"""'}), "(key='DJANGO_SETTINGS_MODULE', value='settings')\n", (397, 445), False, 'import os\n'), ((446, 512), 'os.environ.setdefault', 'os.environ.setdefault', ([], {'key': '"""DJANGO_CONFIG...
from django.conf import settings from django.core.management.base import BaseCommand, CommandError from pprint import pformat class Command(BaseCommand): args = '<setting>' help = 'Outputs the value of the given setting name' def handle(self, *args, **options): if len(args) != 1: rai...
[ "django.core.management.base.CommandError" ]
[((323, 377), 'django.core.management.base.CommandError', 'CommandError', (['"""Please enter exactly one setting name!"""'], {}), "('Please enter exactly one setting name!')\n", (335, 377), False, 'from django.core.management.base import BaseCommand, CommandError\n')]
from estruturadedados.avltree import AVL from estruturadedados.queue import Queue from biometria.biometria import Biometria as Bio from bancodedados.paths import * import json from os import listdir, remove class GerenciadorPrincipal(): def __init__(self): self.gerVacina = GerenciadorVacina() ...
[ "estruturadedados.queue.Queue", "json.dump", "os.remove", "json.load", "biometria.biometria.Biometria.criar", "biometria.biometria.Biometria.leArquivo", "estruturadedados.avltree.AVL", "os.listdir" ]
[((1918, 1923), 'estruturadedados.avltree.AVL', 'AVL', ([], {}), '()\n', (1921, 1923), False, 'from estruturadedados.avltree import AVL\n'), ((1962, 1967), 'estruturadedados.avltree.AVL', 'AVL', ([], {}), '()\n', (1965, 1967), False, 'from estruturadedados.avltree import AVL\n'), ((6925, 6930), 'estruturadedados.avltre...
import numpy as np import pandas as pd from sklearn import datasets from sklearn.model_selection import train_test_split test_size = 0.25 def sampling(**kwargs): if kwargs['dataset'] == 'moons': X, y = datasets.make_moons(n_samples=kwargs['sample_size'], noise=kwargs['n...
[ "sklearn.datasets.make_circles", "sklearn.datasets.make_classification", "numpy.random.RandomState", "sklearn.datasets.make_moons" ]
[((217, 312), 'sklearn.datasets.make_moons', 'datasets.make_moons', ([], {'n_samples': "kwargs['sample_size']", 'noise': "kwargs['noise']", 'random_state': '(5)'}), "(n_samples=kwargs['sample_size'], noise=kwargs['noise'],\n random_state=5)\n", (236, 312), False, 'from sklearn import datasets\n'), ((636, 746), 'skle...
# Generated by Django 3.0.2 on 2020-02-14 09:12 import django.contrib.postgres.fields.jsonb import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("cases", "0019_auto_20200120_0604"), ("algorithms", "0019_auto_20200210_0...
[ "django.db.models.TextField", "django.db.models.OneToOneField", "django.db.models.ManyToManyField", "django.db.migrations.RenameField", "django.db.models.BooleanField" ]
[((361, 460), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""algorithm"""', 'old_name': '"""visible_to_public"""', 'new_name': '"""public"""'}), "(model_name='algorithm', old_name='visible_to_public',\n new_name='public')\n", (383, 460), False, 'from django.db import migrations...
import numpy as np def get_predecessor(T,P): # copy the inputs T = np.copy(T) P = np.copy(P) P_size = P.shape[0] T_size = T.shape[0] adj = np.zeros((P_size + T_size,P_size + T_size)) # predecessor for Text for i in range(1,T_size): adj[i, i-1] = 1 # predecessor for Pattern for i in range(...
[ "numpy.eye", "numpy.zeros", "numpy.copy" ]
[((72, 82), 'numpy.copy', 'np.copy', (['T'], {}), '(T)\n', (79, 82), True, 'import numpy as np\n'), ((89, 99), 'numpy.copy', 'np.copy', (['P'], {}), '(P)\n', (96, 99), True, 'import numpy as np\n'), ((154, 198), 'numpy.zeros', 'np.zeros', (['(P_size + T_size, P_size + T_size)'], {}), '((P_size + T_size, P_size + T_size...
import os import sys proj_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0,proj_dir) import random from itertools import repeat import utils.blockworld as blockworld from model.utils.Search_Tree import * class BFS_Agent: """An agent performing exhaustive BFS search. This can t...
[ "random.randint", "random.shuffle", "os.path.realpath", "sys.path.insert", "random.seed" ]
[((94, 122), 'sys.path.insert', 'sys.path.insert', (['(0)', 'proj_dir'], {}), '(0, proj_dir)\n', (109, 122), False, 'import sys\n'), ((65, 91), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (81, 91), False, 'import os\n'), ((1310, 1339), 'random.seed', 'random.seed', (['self.random_seed'],...
from telegram.ext import Updater, CommandHandler, ConversationHandler, MessageHandler, Filters, CallbackQueryHandler from env import TOKEN from commands import show_challs, choose_chall_to_show, SHOWS_CHOSEN_CHALL from commands import try_answer, choose_chall_to_answer, check_answer, CHOOSE_CHALL_TO_ANSWER def ...
[ "telegram.ext.Updater", "telegram.ext.CommandHandler", "telegram.ext.MessageHandler", "telegram.ext.CallbackQueryHandler" ]
[((706, 744), 'telegram.ext.Updater', 'Updater', ([], {'token': 'TOKEN', 'use_context': '(True)'}), '(token=TOKEN, use_context=True)\n', (713, 744), False, 'from telegram.ext import Updater, CommandHandler, ConversationHandler, MessageHandler, Filters, CallbackQueryHandler\n'), ((796, 826), 'telegram.ext.CommandHandler...
import random from copy import deepcopy def print_board(board, max_width): for row in range(len(board)): for col in range(len(board)): print("{:>{}}".format(board[row][col], max_width), end='') print() def win_check(board, player, n, row, col): horizontal, vertical, diagonal_down...
[ "copy.deepcopy", "random.choice", "random.randint" ]
[((1922, 1944), 'random.randint', 'random.randint', (['(0)', '(100)'], {}), '(0, 100)\n', (1936, 1944), False, 'import random\n'), ((2523, 2552), 'random.choice', 'random.choice', (['possible_moves'], {}), '(possible_moves)\n', (2536, 2552), False, 'import random\n'), ((4770, 4785), 'copy.deepcopy', 'deepcopy', (['boar...
print('start identity_percent') import os import pandas as pd import numpy as np from sklearn.cluster import KMeans import subprocess from selseq_main import *#all? from selseq_constant import * def clustering_kmeans_aln(aln_file,itself=True): '''input file the aligned sequence output clustering by kmeans f...
[ "pandas.DataFrame", "os.remove", "sklearn.cluster.KMeans", "subprocess.call", "pandas.Series", "os.listdir" ]
[((2316, 2327), 'pandas.Series', 'pd.Series', ([], {}), '()\n', (2325, 2327), True, 'import pandas as pd\n'), ((2350, 2364), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (2362, 2364), True, 'import pandas as pd\n'), ((4055, 4076), 'os.listdir', 'os.listdir', (['directory'], {}), '(directory)\n', (4065, 4076), ...
from os import name import pathlib from discord.ext import commands import discord from dislash import InteractionClient, ActionRow, Button, ButtonStyle, SelectMenu, SelectOption from colored import fore, back, style from PIL import Image, ImageFont, ImageDraw, ImageEnhance from zeee_bot.common import glob class Test...
[ "discord.ext.commands.command", "discord.File", "dislash.Button", "pathlib.Path", "dislash.SelectOption", "PIL.ImageDraw.Draw" ]
[((394, 423), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""test"""'}), "(name='test')\n", (410, 423), False, 'from discord.ext import commands\n'), ((1609, 1635), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""ㅅ"""'}), "(name='ㅅ')\n", (1625, 1635), False, 'from discord.ex...
#!/usr/bin/env python # -*- coding: utf-8 -*- # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> try: from setuptools import setup except ImportError: from os import system system('pip install --user setuptools') from setuptools import setup setup( name='automated', version='1.3.2', description='Automat...
[ "os.system", "setuptools.setup" ]
[((249, 644), 'setuptools.setup', 'setup', ([], {'name': '"""automated"""', 'version': '"""1.3.2"""', 'description': '"""Automatizador de tarefas - LEDA"""', 'license': '"""MIT"""', 'classifiers': "['Programming Language :: Python :: 2', 'Programming Language :: Python :: 3']", 'url': '"""https://github.com/gabrielfern...
from __future__ import absolute_import, print_function import os import numpy as np from subprocess import Popen, PIPE from Bio.PDB.Polypeptide import aa1 as AA_STANDARD from ....featuresComputer import FeatureComputerException from ...seqToolManager import SeqToolManager from .al2coWorkers.parsePsiBlast import parseP...
[ "subprocess.Popen", "os.path.basename", "numpy.std", "os.path.isfile", "numpy.mean", "utils.tryToRemove", "os.path.join", "utils.myMakeDir" ]
[((1043, 1088), 'utils.myMakeDir', 'myMakeDir', (['self.computedFeatsRootDir', '"""al2co"""'], {}), "(self.computedFeatsRootDir, 'al2co')\n", (1052, 1088), False, 'from utils import myMakeDir, tryToRemove\n'), ((1654, 1715), 'os.path.join', 'os.path.join', (['self.al2coOutPath', "(prefixExtended + '.al2co.gz')"], {}), ...
import os import numpy as np import cv2 from glob import glob import tensorflow as tf from sklearn.model_selection import train_test_split def load_data(path, split=0.1): images = sorted(glob(os.path.join(path, "images/*"))) masks = sorted(glob(os.path.join(path, "masks/*"))) total_size = len(images) ...
[ "sklearn.model_selection.train_test_split", "numpy.expand_dims", "tensorflow.data.Dataset.from_tensor_slices", "cv2.imread", "tensorflow.numpy_function", "os.path.join", "cv2.resize" ]
[((422, 485), 'sklearn.model_selection.train_test_split', 'train_test_split', (['images'], {'test_size': 'valid_size', 'random_state': '(42)'}), '(images, test_size=valid_size, random_state=42)\n', (438, 485), False, 'from sklearn.model_selection import train_test_split\n'), ((509, 571), 'sklearn.model_selection.train_...
from queue import PriorityQueue from burrow import Burrow, parse def part1(rows: list[str]) -> int | None: return go(rows) def part2(rows: list[str]) -> int | None: new_rows = list(rows[:3]) + [ " #D#C#B#A#", " #D#B#A#C#", ] + list(rows[3:]) return go(new_rows) def go(rows: list[...
[ "queue.PriorityQueue", "burrow.parse" ]
[((354, 365), 'burrow.parse', 'parse', (['rows'], {}), '(rows)\n', (359, 365), False, 'from burrow import Burrow, parse\n'), ((395, 410), 'queue.PriorityQueue', 'PriorityQueue', ([], {}), '()\n', (408, 410), False, 'from queue import PriorityQueue\n')]
import re def CodelandUsernameValidation(strParam): # code goes here valid = "false" if strParam[0].isalpha(): if 4 < len(strParam) < 25: if strParam[-1] != '_': if re.match('^[a-zA-Z0-9_]+$', strParam): valid = "true" # code goes here retu...
[ "re.match" ]
[((216, 253), 're.match', 're.match', (['"""^[a-zA-Z0-9_]+$"""', 'strParam'], {}), "('^[a-zA-Z0-9_]+$', strParam)\n", (224, 253), False, 'import re\n')]
#!/usr/bin/env python import os import subprocess TID_FILE = "src/tiddlers/system/plugins/security_tools/twsm.tid" VERSION_FILE = "VERSION" def get_commit_count(): return int(subprocess.check_output(["git", "rev-list", "--count", "HEAD"]).decode('utf-8')) def main(): with open(VERSION_FILE, "r") as f: ...
[ "subprocess.check_output" ]
[((181, 244), 'subprocess.check_output', 'subprocess.check_output', (["['git', 'rev-list', '--count', 'HEAD']"], {}), "(['git', 'rev-list', '--count', 'HEAD'])\n", (204, 244), False, 'import subprocess\n')]
""" 画像ビューワー """ import itertools, os, sys import tkinter as tk import tkinter.ttk as ttk import tkinter.font as tkFont from tkinter import filedialog from tkinterdnd2 import * from typing import Tuple # 関数アノテーション用 from PIL import Image, ImageTk # Pillow from PIL.ExifTags import TAGS, GPSTAGS ...
[ "tkinter.StringVar", "itertools.chain.from_iterable", "PIL.Image.new", "PIL.ImageTk.PhotoImage", "tkinter.Button", "os.path.getsize", "tkinter.ttk.Style", "tkinter.Scrollbar", "tkinter.font.Font", "PIL.Image.open", "tkinter.Toplevel", "os.path.normpath", "tkinter.ttk.Treeview", "tkinter.Fr...
[((664, 684), 'tkinter.Frame', 'tk.Frame', ([], {'bg': '"""white"""'}), "(bg='white')\n", (672, 684), True, 'import tkinter as tk\n'), ((727, 747), 'tkinter.Frame', 'tk.Frame', ([], {'bg': '"""green"""'}), "(bg='green')\n", (735, 747), True, 'import tkinter as tk\n'), ((2165, 2224), 'tkinter.Button', 'tk.Button', (['pa...
import os __copyright__ = """Copyright 2020 Chromation, Inc""" __license__ = """All Rights Reserved by Chromation, Inc""" __doc__ = """ see API documentation: 'python -m pydoc microspeclib.simple' """ # NOTE: Sphinx ignores __init__.py files, so for generalized documentation, # please use pydoc, or the...
[ "os.path.dirname" ]
[((1098, 1123), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1113, 1123), False, 'import os\n')]
#!env python import re def c_to_mx_typename(c_type, special_map): m = re.search("([a-zA-Z0-9]+)_t", c_type) if m == None: mx_type = c_type else: mx_type = m.groups()[0] if c_type in special_map: mx_type = special_map[c_type] return mx_type.upper() c_type = ('void', 'bool', 'double', 'float', 'uint64_t', '...
[ "re.search" ]
[((73, 110), 're.search', 're.search', (['"""([a-zA-Z0-9]+)_t"""', 'c_type'], {}), "('([a-zA-Z0-9]+)_t', c_type)\n", (82, 110), False, 'import re\n')]
from moto.cloudwatch.models import cloudwatch_backends from localstack.services.generic_proxy import ProxyListener from localstack.utils.aws import aws_stack # path for backdoor API to receive raw metrics PATH_GET_RAW_METRICS = "/cloudwatch/metrics/raw" class ProxyListenerCloudWatch(ProxyListener): def forward_...
[ "localstack.utils.aws.aws_stack.get_region" ]
[((525, 547), 'localstack.utils.aws.aws_stack.get_region', 'aws_stack.get_region', ([], {}), '()\n', (545, 547), False, 'from localstack.utils.aws import aws_stack\n')]
from xml.dom.minidom import parseString from svgpathtools import svgdoc2paths, wsvg example_text = '<svg>' \ ' <rect x="100" y="100" height="200" width="200" style="fill:#0ff;" />' \ ' <line x1="200" y1="200" x2="200" y2="300" />' \ ' <line x1="200" y1="200" x2="300" y2...
[ "svgpathtools.svgdoc2paths", "svgpathtools.wsvg", "xml.dom.minidom.parseString" ]
[((956, 981), 'xml.dom.minidom.parseString', 'parseString', (['example_text'], {}), '(example_text)\n', (967, 981), False, 'from xml.dom.minidom import parseString\n'), ((1003, 1020), 'svgpathtools.svgdoc2paths', 'svgdoc2paths', (['doc'], {}), '(doc)\n', (1015, 1020), False, 'from svgpathtools import svgdoc2paths, wsvg...
""" invocation functions for all """ __author__ = '<NAME>' __date__ = '6/18/14' __version__ = '0.5' ## Imports import re import json import time import os import base64 import urllib import urllib2 import cStringIO import requests import datetime from string import Template from collections import defaultdict # Local ...
[ "biokbase.narrative.common.service.finalize_service", "biokbase.narrative.common.service.init_service", "json.loads", "biokbase.InvocationService.Client.InvocationService", "biokbase.shock.Client", "json.dumps", "datetime.datetime.strptime", "base64.b64encode", "biokbase.narrative.common.service.met...
[((799, 924), 'biokbase.narrative.common.service.init_service', 'init_service', ([], {'name': 'NAME', 'desc': '"""Functions for executing KBase commands and manipulating the results"""', 'version': 'VERSION'}), "(name=NAME, desc=\n 'Functions for executing KBase commands and manipulating the results',\n version=V...
# -*- coding: utf-8 -*- import numpy as np from scipy.integrate import quad from pmutt import _ModelBase from pmutt import constants as c from pmutt.io.json import remove_class class HarmonicVib(_ModelBase): """Vibrational modes using the harmonic approximation. Equations used sourced from: - <NAME...
[ "numpy.sinh", "numpy.sum", "pmutt.constants.wavenumber_to_temp", "scipy.integrate.quad", "numpy.log", "pmutt.constants.h", "pmutt.io.json.remove_class", "numpy.array", "numpy.exp", "pmutt.constants.R", "numpy.dot", "pmutt.constants.kb", "numpy.prod", "pmutt.constants.wavenumber_to_inertia"...
[((34120, 34145), 'numpy.array', 'np.array', (['wavenumbers_out'], {}), '(wavenumbers_out)\n', (34128, 34145), True, 'import numpy as np\n'), ((950, 975), 'numpy.array', 'np.array', (['vib_wavenumbers'], {}), '(vib_wavenumbers)\n', (958, 975), True, 'import numpy as np\n'), ((1332, 1381), 'pmutt.constants.wavenumber_to...
import formula #年利率、借款期数(月)、初始资金(元)、投资总周期(月)、坏账率 print(formula.annualIncome(22,12,10000,12,0))
[ "formula.annualIncome" ]
[((57, 99), 'formula.annualIncome', 'formula.annualIncome', (['(22)', '(12)', '(10000)', '(12)', '(0)'], {}), '(22, 12, 10000, 12, 0)\n', (77, 99), False, 'import formula\n')]
# Generated by Django 2.2.6 on 2019-10-15 23:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('myapp', '0002_gallery'), ] operations = [ migrations.AddField( model_name='gallery', name='title', field...
[ "django.db.models.TextField" ]
[((321, 348), 'django.db.models.TextField', 'models.TextField', ([], {'default': '(0)'}), '(default=0)\n', (337, 348), False, 'from django.db import migrations, models\n')]
from controllers import mainController import aiohttp_cors def routes(app): cors = aiohttp_cors.setup(app, defaults={ "*": aiohttp_cors.ResourceOptions( allow_methods=("*"), allow_credentials=True, expose_headers=("*",), allow_headers=("*"), max_...
[ "aiohttp_cors.ResourceOptions" ]
[((137, 268), 'aiohttp_cors.ResourceOptions', 'aiohttp_cors.ResourceOptions', ([], {'allow_methods': '"""*"""', 'allow_credentials': '(True)', 'expose_headers': "('*',)", 'allow_headers': '"""*"""', 'max_age': '(3600)'}), "(allow_methods='*', allow_credentials=True,\n expose_headers=('*',), allow_headers='*', max_ag...
import os from pytorch_lightning import seed_everything TEST_ROOT = os.path.realpath(os.path.dirname(__file__)) PACKAGE_ROOT = os.path.dirname(TEST_ROOT) DATASETS_PATH = os.path.join(PACKAGE_ROOT, 'datasets') # generate a list of random seeds for each test ROOT_SEED = 1234 def reset_seed(): seed_everything()
[ "os.path.dirname", "os.path.join", "pytorch_lightning.seed_everything" ]
[((129, 155), 'os.path.dirname', 'os.path.dirname', (['TEST_ROOT'], {}), '(TEST_ROOT)\n', (144, 155), False, 'import os\n'), ((172, 210), 'os.path.join', 'os.path.join', (['PACKAGE_ROOT', '"""datasets"""'], {}), "(PACKAGE_ROOT, 'datasets')\n", (184, 210), False, 'import os\n'), ((87, 112), 'os.path.dirname', 'os.path.d...
# -*- coding: utf-8 -*- import argparse import logging import os import tarfile import textwrap from cliff.command import Command # TODO(dittrich): https://github.com/Mckinsey666/bullet/issues/2 # Workaround until bullet has Windows missing 'termios' fix. try: from bullet import Bullet except ModuleNotFoundError:...
[ "textwrap.dedent", "sys.stdin.isatty", "tarfile.open", "os.path.join", "os.listdir", "logging.getLogger", "bullet.Bullet" ]
[((462, 489), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (479, 489), False, 'import logging\n'), ((732, 834), 'textwrap.dedent', 'textwrap.dedent', (['"""\n TODO(dittrich): Finish documenting command.\n """'], {}), '(\n """\n TODO(dittrich): Finish ...
# -*- coding: utf-8 -*- """ ABM virus visuals Created on Thu Apr 9 10:16:47 2020 @author: Kyle """ import matplotlib.pyplot as plt from matplotlib import colors import numpy as np import os import tempfile from datetime import datetime import imageio class visuals(): def agentPlot(self, storageArrayList, cmap=N...
[ "os.listdir", "matplotlib.pyplot.xlim", "matplotlib.pyplot.show", "os.path.join", "matplotlib.pyplot.suptitle", "os.getcwd", "matplotlib.pyplot.close", "imageio.imread", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "matplotlib.colors.ListedColorma...
[((1333, 1351), 'matplotlib.pyplot.tight_layout', 'plt.tight_layout', ([], {}), '()\n', (1349, 1351), True, 'import matplotlib.pyplot as plt\n'), ((5052, 5068), 'matplotlib.pyplot.xlim', 'plt.xlim', (['[0, i]'], {}), '([0, i])\n', (5060, 5068), True, 'import matplotlib.pyplot as plt\n'), ((5642, 5669), 'matplotlib.pypl...
from google.appengine.ext import vendor vendor.add('lib') vendor.add('lib/nltk') vendor.add('lib/nltk-3.2.1.egg-info')
[ "google.appengine.ext.vendor.add" ]
[((40, 57), 'google.appengine.ext.vendor.add', 'vendor.add', (['"""lib"""'], {}), "('lib')\n", (50, 57), False, 'from google.appengine.ext import vendor\n'), ((58, 80), 'google.appengine.ext.vendor.add', 'vendor.add', (['"""lib/nltk"""'], {}), "('lib/nltk')\n", (68, 80), False, 'from google.appengine.ext import vendor\...
from aws_xray_sdk.core import xray_recorder import app xray_recorder.begin_segment("Test") def test_read_root(): response = app.read_root() assert response == {"hello": "world"}
[ "aws_xray_sdk.core.xray_recorder.begin_segment", "app.read_root" ]
[((57, 92), 'aws_xray_sdk.core.xray_recorder.begin_segment', 'xray_recorder.begin_segment', (['"""Test"""'], {}), "('Test')\n", (84, 92), False, 'from aws_xray_sdk.core import xray_recorder\n'), ((132, 147), 'app.read_root', 'app.read_root', ([], {}), '()\n', (145, 147), False, 'import app\n')]
import os import torch import random import librosa import torchaudio import numpy as np from glob import glob import nlpaug.flow as naf import nlpaug.augmenter.audio as naa import nlpaug.augmenter.spectrogram as nas from torchvision.transforms import Normalize from torch.utils.data import Dataset from nlpaug.augmente...
[ "torch.randn_like", "numpy.zeros", "librosa.feature.melspectrogram", "src.datasets.librispeech.SpectrumAugmentation", "librosa.power_to_db", "random.getrandbits", "torchaudio.load", "torchvision.transforms.Normalize", "os.path.join", "src.datasets.librispeech.WavformAugmentation", "torch.from_nu...
[((2416, 2449), 'os.path.join', 'os.path.join', (['self.root', 'wav_name'], {}), '(self.root, wav_name)\n', (2428, 2449), False, 'import os\n'), ((2482, 2507), 'torchaudio.load', 'torchaudio.load', (['wav_path'], {}), '(wav_path)\n', (2497, 2507), False, 'import torchaudio\n'), ((3222, 3347), 'librosa.feature.melspectr...
import os from dotenv import load_dotenv import requests import json from xml.etree import ElementTree # Load API Keys load_dotenv() ATTOM_API_KEY = os.getenv('ATTOM_API_KEY') url = "http://api.gateway.attomdata.com/propertyapi/v1.0.0/property/detail?" headers = { 'accept': "application/json", 'apikey': ATT...
[ "dotenv.load_dotenv", "requests.request", "os.getenv" ]
[((120, 133), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (131, 133), False, 'from dotenv import load_dotenv\n'), ((151, 177), 'os.getenv', 'os.getenv', (['"""ATTOM_API_KEY"""'], {}), "('ATTOM_API_KEY')\n", (160, 177), False, 'import os\n'), ((426, 486), 'requests.request', 'requests.request', (['"""GET"""',...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ https://github.com/cgloeckner/pyvtt/ Copyright (c) 2020-2021 <NAME> License: MIT (see LICENSE for details) """ from pony.orm import db_session import cache, orm from test.utils import EngineBaseTest, SocketDummy class GameCacheTest(EngineBaseTest): def ...
[ "test.utils.SocketDummy", "orm.createGmDatabase" ]
[((555, 616), 'orm.createGmDatabase', 'orm.createGmDatabase', ([], {'engine': 'self.engine', 'filename': '""":memory:"""'}), "(engine=self.engine, filename=':memory:')\n", (575, 616), False, 'import cache, orm\n'), ((1896, 1909), 'test.utils.SocketDummy', 'SocketDummy', ([], {}), '()\n', (1907, 1909), False, 'from test...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import math import time import numpy import digitalio import board from PIL import Image, ImageDraw, ImageFont from fonts.ttf import RobotoMedium import RPi.GPIO as GPIO from ST7789 import ST7789 SPI_SPEED_MHZ = 80 display = ST7789( rotation=90, # Needed t...
[ "RPi.GPIO.setmode", "PIL.Image.new", "RPi.GPIO.setup", "RPi.GPIO.add_event_detect", "os.environ.get", "PIL.ImageFont.truetype", "PIL.ImageDraw.Draw", "ST7789.ST7789" ]
[((284, 384), 'ST7789.ST7789', 'ST7789', ([], {'rotation': '(90)', 'port': '(0)', 'cs': '(1)', 'dc': '(9)', 'backlight': '(13)', 'spi_speed_hz': '(SPI_SPEED_MHZ * 1000 * 1000)'}), '(rotation=90, port=0, cs=1, dc=9, backlight=13, spi_speed_hz=\n SPI_SPEED_MHZ * 1000 * 1000)\n', (290, 384), False, 'from ST7789 import ...
#!/usr/bin/env python3 # coding:utf-8 import os import sys """ config 1.0 """ DEBUG = True HOST = '0.0.0.0' PORT = 8000 NAME = 'layout' DEPLOY = 0 # 0: 单机部署 ; 1: 接入云服务器 HOMEPAGE = "/projects" ERRPAGE = "/404" TEST_ID = 0 # path _PATH = os.path.abspath(os.path.dirname(__file__)) APP_PATH = os.path.abspath(os.path.di...
[ "sys.path.append", "os.path.dirname", "os.path.join", "sys.path.insert" ]
[((1869, 1902), 'sys.path.insert', 'sys.path.insert', (['(0)', 'LIB_TOOL_PATH'], {}), '(0, LIB_TOOL_PATH)\n', (1884, 1902), False, 'import sys\n'), ((1979, 2012), 'sys.path.insert', 'sys.path.insert', (['(0)', 'LIB_CORE_PATH'], {}), '(0, LIB_CORE_PATH)\n', (1994, 2012), False, 'import sys\n'), ((2086, 2118), 'sys.path....
import pandas as pd from selecttotex.database import Database class Totex: """Classe para transformar resultados de selects em Latex """ def __init__(self): self.db = Database().get_connection() def to_tex(self, command_list: list, output_file: str) -> None: """Função para transforma...
[ "selecttotex.database.Database" ]
[((190, 200), 'selecttotex.database.Database', 'Database', ([], {}), '()\n', (198, 200), False, 'from selecttotex.database import Database\n')]
import numpy as np from numpy import exp, sqrt from functools import partial from scipy import optimize from scipy.stats import norm import scipy.integrate as integrate from fox_toolbox.utils import rates """This module price swaption under Hull White model using Jamshidian method. Usage example: from hw import Jams...
[ "functools.partial", "numpy.negative", "scipy.stats.norm.pdf", "numpy.array", "numpy.exp", "numpy.sign", "scipy.optimize.bisect", "numpy.sqrt" ]
[((3058, 3069), 'numpy.array', 'np.array', (['c'], {}), '(c)\n', (3066, 3069), True, 'import numpy as np\n'), ((4178, 4189), 'numpy.array', 'np.array', (['b'], {}), '(b)\n', (4186, 4189), True, 'import numpy as np\n'), ((4468, 4504), 'functools.partial', 'partial', (['swap_value', 'coef', 'b_i', 'varx'], {}), '(swap_va...
import time import requests import pyeureka.validator as validator import pyeureka.const as c def get_timestamp(): return int(time.time()) class EurekaClientError(Exception): pass class EurekaInstanceDoesNotExistException(Exception): pass class EurekaClient: def __init__(self, eureka_url, ins...
[ "pyeureka.validator.validate_instance_definition", "time.time" ]
[((134, 145), 'time.time', 'time.time', ([], {}), '()\n', (143, 145), False, 'import time\n'), ((1179, 1238), 'pyeureka.validator.validate_instance_definition', 'validator.validate_instance_definition', (['instance_definition'], {}), '(instance_definition)\n', (1217, 1238), True, 'import pyeureka.validator as validator...
## FUNCTIONS TO OVERLAYS ALL PICS!! get_ipython().magic('matplotlib inline') import cv2 from matplotlib import pyplot as plt import numpy as np import time as t import glob, os import operator from PIL import Image import pathlib from pathlib import Path image_dir = ["data/pics_for_overlaps/Sarah", "dat...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.imshow", "PIL.Image.open", "PIL.ImageFont.truetype", "cv2.imread", "matplotlib.pyplot.figure", "os.path.splitext", "PIL.ImageDraw.Draw", "os.listdir" ]
[((550, 578), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(20, 10)'}), '(figsize=(20, 10))\n', (560, 578), True, 'from matplotlib import pyplot as plt\n'), ((628, 669), 'PIL.ImageFont.truetype', 'ImageFont.truetype', (['"""fonts/Arial.ttf"""', '(20)'], {}), "('fonts/Arial.ttf', 20)\n", (646, 669), False...
from django.db import models class Census(models.Model): voting_id = models.PositiveIntegerField() voter_id = models.PositiveIntegerField() class Meta: unique_together = (('voting_id', 'voter_id'),)
[ "django.db.models.PositiveIntegerField" ]
[((75, 104), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {}), '()\n', (102, 104), False, 'from django.db import models\n'), ((120, 149), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {}), '()\n', (147, 149), False, 'from django.db import models\n')]
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api class Lead(models.Model): _inherit = 'crm.lead' event_lead_rule_id = fields.Many2one('event.lead.rule', string="Registration Rule", help="Rule that created this lead") ...
[ "odoo.fields.Many2many", "odoo.api.depends", "odoo.fields.Many2one", "odoo.fields.Integer" ]
[((217, 320), 'odoo.fields.Many2one', 'fields.Many2one', (['"""event.lead.rule"""'], {'string': '"""Registration Rule"""', 'help': '"""Rule that created this lead"""'}), "('event.lead.rule', string='Registration Rule', help=\n 'Rule that created this lead')\n", (232, 320), False, 'from odoo import fields, models, ap...
from re import U import numpy as np from collections import Counter, defaultdict from pprint import pprint def moves(pos, endv, pathz, rolls=0): if rolls==3: pathz.append(pos); return for i in [ 1, 2, 3 ]: npos=(pos+i-1)%10+1 moves(npos, endv, pathz, rolls+1) possibilities={} for x i...
[ "collections.defaultdict", "collections.Counter" ]
[((434, 448), 'collections.Counter', 'Counter', (['pathz'], {}), '(pathz)\n', (441, 448), False, 'from collections import Counter, defaultdict\n'), ((593, 609), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (604, 609), False, 'from collections import Counter, defaultdict\n')]
import datetime import re import time from logging import getLogger from random import randint, gauss, random import pandas as pd from .external import DataframeLoader log = getLogger(__name__) class PrimarySchoolClasses(DataframeLoader): DISABLE_CACHE = False def __init__(self, pupils, present=None): ...
[ "re.match", "logging.getLogger" ]
[((177, 196), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (186, 196), False, 'from logging import getLogger\n'), ((884, 920), 're.match', 're.match', (['"""leeftijd_(\\\\d+)"""', 'cell[0]'], {}), "('leeftijd_(\\\\d+)', cell[0])\n", (892, 920), False, 'import re\n')]
# # Hello World client in Python # Connects REQ socket to tcp://localhost:5555 # import zmq def main(): context = zmq.Context() # Socket to talk to server print("Connecting to Paddle Server…") socket = context.socket(zmq.REQ) socket.connect("tcp://localhost:5555") # Do 2 requests, waiti...
[ "zmq.Context" ]
[((124, 137), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (135, 137), False, 'import zmq\n')]
import pytest from _pytest.logging import LogCaptureFixture from loguru import logger @pytest.fixture def caplog(caplog: LogCaptureFixture): handler_id = logger.add(caplog.handler, format="{message}") yield caplog logger.remove(handler_id)
[ "loguru.logger.remove", "loguru.logger.add" ]
[((160, 206), 'loguru.logger.add', 'logger.add', (['caplog.handler'], {'format': '"""{message}"""'}), "(caplog.handler, format='{message}')\n", (170, 206), False, 'from loguru import logger\n'), ((228, 253), 'loguru.logger.remove', 'logger.remove', (['handler_id'], {}), '(handler_id)\n', (241, 253), False, 'from loguru...
import sys from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError from celery import states from celery.result import AsyncResult, allow_join_result from .fields import JSONField def validate_schedule_...
[ "django.db.models.URLField", "django.db.models.OneToOneField", "django.db.models.TextField", "django.core.exceptions.ValidationError", "django.db.models.CharField", "django.utils.timezone.now", "django.db.models.PositiveIntegerField", "celery.result.AsyncResult", "django.db.models.DateTimeField", ...
[((753, 770), 'django.db.models.URLField', 'models.URLField', ([], {}), '()\n', (768, 770), False, 'from django.db import models\n'), ((784, 838), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(8)', 'choices': 'METHOD_CHOICES'}), '(max_length=8, choices=METHOD_CHOICES)\n', (800, 838), False, 'f...
from random import randint cont = 0 while True: valor = int(input("Digite um valor: ")) conputador = randint(0, 10) total = conputador + valor tipo = " " while tipo not in "PI": tipo = str(input("Par ou Impar [P/I]")).strip().upper()[0] print(f"você jogou {valor} e o computador {conputad...
[ "random.randint" ]
[((109, 123), 'random.randint', 'randint', (['(0)', '(10)'], {}), '(0, 10)\n', (116, 123), False, 'from random import randint\n')]
from pygame.locals import * from blast import Blast from sound import Sound from wentity import WEntity from pygame.math import Vector2 from utils import * WIDTH = 3 # line thickness SCALE_FACTOR = 5.0 ACCELERATION = 250.0 # pixels per second DAMPING = 0.57 # some damping ANGULAR_SPEED = 180.0 # degrees per secon...
[ "sound.Sound", "pygame.math.Vector2" ]
[((345, 363), 'pygame.math.Vector2', 'Vector2', (['(0.0)', '(-5.0)'], {}), '(0.0, -5.0)\n', (352, 363), False, 'from pygame.math import Vector2\n'), ((366, 383), 'pygame.math.Vector2', 'Vector2', (['(3.0)', '(4.0)'], {}), '(3.0, 4.0)\n', (373, 383), False, 'from pygame.math import Vector2\n'), ((385, 402), 'pygame.math...
from django.contrib import admin from messenger.models import ChatSession class ChatSessionAdmin(admin.ModelAdmin): readonly_fields = ['uuid', 'user_id'] list_display = ['uuid', 'state', 'user_id'] list_filter = ['state'] admin.site.register(ChatSession, ChatSessionAdmin)
[ "django.contrib.admin.site.register" ]
[((238, 288), 'django.contrib.admin.site.register', 'admin.site.register', (['ChatSession', 'ChatSessionAdmin'], {}), '(ChatSession, ChatSessionAdmin)\n', (257, 288), False, 'from django.contrib import admin\n')]
from typing import Optional, List import torch import torchvision import numpy as np from ..basic_typing import Datasets from ..train import SequenceArray from ..train import SamplerRandom, SamplerSequential import functools import collections import os from ..transforms import Transform from typing_extensions import...
[ "functools.partial", "torch.cat", "torchvision.datasets.cityscapes.Cityscapes", "os.environ.get", "numpy.array", "collections.OrderedDict", "os.path.join" ]
[((2469, 2501), 'os.path.join', 'os.path.join', (['root', '"""cityscapes"""'], {}), "(root, 'cityscapes')\n", (2481, 2501), False, 'import os\n'), ((2522, 2638), 'torchvision.datasets.cityscapes.Cityscapes', 'torchvision.datasets.cityscapes.Cityscapes', (['cityscapes_path'], {'mode': '"""fine"""', 'split': '"""train"""...
import socket from threading import Thread from typing import Union, Optional, List, Tuple from time import sleep from PIL import Image from io import BytesIO import re from typing import Optional class InvalidRTSPRequest(Exception): pass class RTSPPacket: RTSP_VERSION = 'RTSP/1.0' INVALID = -1 SE...
[ "threading.Thread", "io.BytesIO", "socket.socket", "time.sleep" ]
[((11181, 11222), 'threading.Thread', 'Thread', ([], {'target': 'self._handle_video_receive'}), '(target=self._handle_video_receive)\n', (11187, 11222), False, 'from threading import Thread\n'), ((11378, 11426), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_DGRAM'], {}), '(socket.AF_INET, socket.SO...
import re import spacy spacy_model_name = 'en_core_web_lg' if not spacy.util.is_package(spacy_model_name): spacy.cli.download(spacy_model_name) nlp = spacy.load(spacy_model_name) def filter_sentence(sentence): def sentence_length(s, min_len=8): if len(s) < min_len: return False e...
[ "spacy.cli.download", "re.split", "spacy.util.is_package", "spacy.load", "re.findall", "re.sub" ]
[((156, 184), 'spacy.load', 'spacy.load', (['spacy_model_name'], {}), '(spacy_model_name)\n', (166, 184), False, 'import spacy\n'), ((68, 107), 'spacy.util.is_package', 'spacy.util.is_package', (['spacy_model_name'], {}), '(spacy_model_name)\n', (89, 107), False, 'import spacy\n'), ((113, 149), 'spacy.cli.download', 's...
""" This file contains code that will kick off training and testing processes """ import os, sys import argparse import json import numpy as np from experiments.UNetExperiment import UNetExperiment from data_prep.HippocampusDatasetLoader import LoadHippocampusData from torch.utils.data import random_split class Config...
[ "experiments.UNetExperiment.UNetExperiment", "data_prep.HippocampusDatasetLoader.LoadHippocampusData", "json.dump", "argparse.ArgumentParser", "numpy.floor", "torch.utils.data.random_split", "os.path.join", "sys.exit" ]
[((1293, 1318), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1316, 1318), False, 'import argparse\n'), ((2445, 2541), 'data_prep.HippocampusDatasetLoader.LoadHippocampusData', 'LoadHippocampusData', (["(c.root_dir + 'TrainingSet/')"], {'y_shape': 'c.patch_size', 'z_shape': 'c.patch_size'}), ...
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, Session from sqlalchemy.exc import IntegrityError, InvalidRequestError from db_management.DB import Base, Company, News, db_link def add_company(company): engine = create_engine(db_link) # pool_size=20, max_overflow=0 # Bind the e...
[ "sqlalchemy.create_engine", "sqlalchemy.orm.sessionmaker", "db_management.DB.Company" ]
[((249, 271), 'sqlalchemy.create_engine', 'create_engine', (['db_link'], {}), '(db_link)\n', (262, 271), False, 'from sqlalchemy import create_engine\n'), ((485, 510), 'sqlalchemy.orm.sessionmaker', 'sessionmaker', ([], {'bind': 'engine'}), '(bind=engine)\n', (497, 510), False, 'from sqlalchemy.orm import sessionmaker,...
#"""Fun pligon...for HardcoreUserbot #\nCode by @Hack12R #type `.degi` and `.nehi` to see the fun. #""" import random, re #from uniborg.util import admin_cmd import asyncio from telethon import events from userbot.events import register from asyncio import sleep import time from userbot import CMD_HELP @register(outgo...
[ "userbot.CMD_HELP.update", "asyncio.sleep", "userbot.events.register" ]
[((306, 348), 'userbot.events.register', 'register', ([], {'outgoing': '(True)', 'pattern': '"""^.degi$"""'}), "(outgoing=True, pattern='^.degi$')\n", (314, 348), False, 'from userbot.events import register\n'), ((1040, 1082), 'userbot.events.register', 'register', ([], {'outgoing': '(True)', 'pattern': '"""^.nehi$"""'...
# -*- coding: utf-8 -*- from app import logging from app import config as config import logging def debug(client, message): try: client.send_message( message.from_user.id, "Ниже находится информация, которая может оказаться полезной." "\n\n**Информация о приложении:** ...
[ "logging.error" ]
[((968, 1047), 'logging.error', 'logging.error', (['"""Произошла ошибка при попытке выполнения метода."""'], {'exc_info': '(True)'}), "('Произошла ошибка при попытке выполнения метода.', exc_info=True)\n", (981, 1047), False, 'import logging\n')]
import pytest from commodore import k8sobject _test_objs = [ { "apiVersion": "v1", "kind": "ServiceAccount", "metadata": { "name": "test", "namespace": "test", }, }, { "apiVersion": "v1", "kind": "ServiceAccount", "metadata": ...
[ "pytest.mark.parametrize", "commodore.k8sobject.K8sObject" ]
[((3200, 3325), 'commodore.k8sobject.K8sObject', 'k8sobject.K8sObject', (["{'apiVersion': 'v1', 'kind': 'Namespace', 'metadata': {'name': 'test',\n 'labels': {'name': 'test'}}}"], {}), "({'apiVersion': 'v1', 'kind': 'Namespace', 'metadata': {\n 'name': 'test', 'labels': {'name': 'test'}}})\n", (3219, 3325), False...
__author__ = 'traff' import threading import os import sys import tempfile from _prof_imports import Stats, FuncStat, Function try: execfile=execfile #Not in Py3k except NameError: #We must redefine it in Py3k if it's not already there def execfile(file, glob=None, loc=None): if glob is None: ...
[ "_prof_imports.Function", "_prof_imports.FuncStat", "tempfile.gettempdir", "os.path.exists", "_prof_imports.Stats", "sys._getframe", "imp.new_module", "tokenize.open" ]
[((1100, 1122), 'imp.new_module', 'new_module', (['"""__main__"""'], {}), "('__main__')\n", (1110, 1122), False, 'from imp import new_module\n'), ((1786, 1806), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (1800, 1806), False, 'import os\n'), ((2245, 2252), '_prof_imports.Stats', 'Stats', ([], {}), '...
""" Create holdem game record table """ from yoyo import step __depends__ = {'20211109_01_xKblp-change-comments-on-black-jack-record'} steps = [ step("CREATE TABLE `holdemGameRecord` ( `userID` BIGINT NOT NULL , `moneyInvested` BIGINT NOT NULL , `status` INT NOT NULL COMMENT '0 represent in progress; 1 represent...
[ "yoyo.step" ]
[((152, 474), 'yoyo.step', 'step', (['"""CREATE TABLE `holdemGameRecord` ( `userID` BIGINT NOT NULL , `moneyInvested` BIGINT NOT NULL , `status` INT NOT NULL COMMENT \'0 represent in progress; 1 represent lose or fold; 2 represent win;\' , `tableID` BIGINT NOT NULL , `time` TIMESTAMP NOT NULL , `tableUUID` VARCHAR(64) ...
""" Module that holds classes for performing I/O operations on GEOS geometry objects. Specifically, this has Python implementations of WKB/WKT reader and writer classes. """ from ctypes import byref, c_size_t from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.error import GEOSException from...
[ "django.contrib.gis.geos.prototypes.io.wkb_writer_set_include_srid", "django.contrib.gis.geos.prototypes.io.wkb_writer_get_byteorder", "ctypes.c_size_t", "django.contrib.gis.geos.prototypes.io.wkb_writer_get_outdim", "django.contrib.gis.geos.prototypes.io.wkt_writer_write", "django.contrib.gis.geos.protot...
[((1192, 1227), 'django.contrib.gis.geos.prototypes.io.wkt_reader_read', 'capi.wkt_reader_read', (['self.ptr', 'wkt'], {}), '(self.ptr, wkt)\n', (1212, 1227), True, 'from django.contrib.gis.geos.prototypes import io as capi\n'), ((1653, 1694), 'django.contrib.gis.geos.prototypes.io.wkt_writer_write', 'capi.wkt_writer_w...
from django.urls import path from admin import views urlpatterns = [ path('manage/', views.AdminPanel.as_view(), name = 'admin-panel'), path('manage/customer-list/', views.AdminCustomerListView.as_view(), name = 'admin-customer-list-view'), path('manage/book-list/', views.AdminBookListView.as_view(),...
[ "admin.views.AdminBookListView.as_view", "admin.views.AdminOfferListView.as_view", "admin.views.AdminBorrowsView.as_view", "admin.views.AdminOrderLogView.as_view", "admin.views.AdminPlanListView.as_view", "admin.views.AdminPublisherListView.as_view", "admin.views.AdminPanel.as_view", "admin.views.Admi...
[((94, 120), 'admin.views.AdminPanel.as_view', 'views.AdminPanel.as_view', ([], {}), '()\n', (118, 120), False, 'from admin import views\n'), ((180, 217), 'admin.views.AdminCustomerListView.as_view', 'views.AdminCustomerListView.as_view', ([], {}), '()\n', (215, 217), False, 'from admin import views\n'), ((286, 319), '...