code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import app.ai.model as model from app.ai.genetic import Genetic import app.ai.plot as plot import time import datetime import numpy as np import torch as t import threading import sys class Service(): def __init__(self, inputs=1, outputs=1, main_service=False): self.main_service = main_serv...
[ "numpy.float", "torch.stack", "datetime.datetime.now", "numpy.array", "app.ai.plot.linear", "app.ai.genetic.Genetic", "app.ai.model.Model_deep", "numpy.int", "torch.FloatTensor" ]
[((960, 1003), 'app.ai.model.Model_deep', 'model.Model_deep', (['self.inputs', 'self.outputs'], {}), '(self.inputs, self.outputs)\n', (976, 1003), True, 'import app.ai.model as model\n'), ((1271, 1295), 'app.ai.plot.linear', 'plot.linear', (['self.losses'], {}), '(self.losses)\n', (1282, 1295), True, 'import app.ai.plo...
# Generated by Django 3.1.1 on 2021-12-26 10:44 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('question', '0005_auto_20211226_1036'), ] operations = [ migrations.CreateModel( ...
[ "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.FilePathField", "django.db.models.CharField" ]
[((388, 481), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (404, 481), False, 'from django.db import migrations, models\...
#!/usr/bin/env python3 import yaml def load_config(filepath): # Loads YAML config file with open(filepath, "r") as f: return yaml.load(f, Loader=yaml.FullLoader)
[ "yaml.load" ]
[((143, 179), 'yaml.load', 'yaml.load', (['f'], {'Loader': 'yaml.FullLoader'}), '(f, Loader=yaml.FullLoader)\n', (152, 179), False, 'import yaml\n')]
""" This file exports the big_endian and little_endian decorators, They are used to convert a BinaryStruct endiannes """ import logging from copy import deepcopy from binary_structs.utils import * from binary_structs.binary_struct import binary_struct, _is_binary_struct def _convert_primitive_type_endianness(kind: ...
[ "binary_structs.binary_struct._is_binary_struct", "logging.debug", "binary_structs.binary_struct.binary_struct" ]
[((997, 1048), 'logging.debug', 'logging.debug', (['f"""Converting {kind} into {new_kind}"""'], {}), "(f'Converting {kind} into {new_kind}')\n", (1010, 1048), False, 'import logging\n'), ((2371, 2420), 'logging.debug', 'logging.debug', (['f"""Converting endianness for {cls}"""'], {}), "(f'Converting endianness for {cls...
from transformers import pipeline import pandas as pd import os import mlflow from mlflow import log_artifact from mlflow.models import ModelSignature import json import subprocess # Example invocation: # curl -X POST -H "Content-Type:application/json; format=pandas-split" # --data '{"columns":["text"],"data":[["T...
[ "mlflow.start_run", "json.dumps", "mlflow.models.ModelSignature.from_dict", "os.system", "transformers.pipeline" ]
[((1171, 1214), 'os.system', 'os.system', (['"""conda env export -f conda.yaml"""'], {}), "('conda env export -f conda.yaml')\n", (1180, 1214), False, 'import os\n'), ((1334, 1382), 'json.dumps', 'json.dumps', (["[{'name': 'text', 'type': 'string'}]"], {}), "([{'name': 'text', 'type': 'string'}])\n", (1344, 1382), Fals...
import itertools from .. import DSPCircuit from ..device.RZ6 import split_atten, atten_to_bits if __name__ == '__main__': circuit = DSPCircuit('debug_RZ6_audio_out', 'RZ6') circuit.start() for a, b in itertools.permutations((0, 20, 40, 60), 2): circuit.set_tag('attA', a) circui...
[ "itertools.permutations" ]
[((225, 267), 'itertools.permutations', 'itertools.permutations', (['(0, 20, 40, 60)', '(2)'], {}), '((0, 20, 40, 60), 2)\n', (247, 267), False, 'import itertools\n')]
from invoke import Collection, Config from sys import platform import os import yaml from . import nrfconnect, nrf5 def parse_platform_specific(cfg, is_linux): """Recursive function that will parse platform specific config This will move all children of matching platform keys to its parent I.e. if cu...
[ "os.path.abspath", "os.path.join", "invoke.Collection" ]
[((1534, 1546), 'invoke.Collection', 'Collection', ([], {}), '()\n', (1544, 1546), False, 'from invoke import Collection, Config\n'), ((1153, 1178), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (1168, 1178), False, 'import os\n'), ((1209, 1238), 'os.path.join', 'os.path.join', (['tasks_dir'...
"""Integration tests for the pyWriter project. Test the odt brief synopsis. For further information see https://github.com/peter88213/PyWriter Published under the MIT License (https://opensource.org/licenses/mit-license.php) """ from pywriter.odt.odt_brief_synopsis import OdtBriefSynopsis from pywriter.test.e...
[ "unittest.main" ]
[((709, 724), 'unittest.main', 'unittest.main', ([], {}), '()\n', (722, 724), False, 'import unittest\n')]
import frameworks.tc_scikit.features.bag_of_words as bag_of_words import frameworks.tc_scikit.features.character_embeddings as character_embeddings import frameworks.tc_scikit.features.character_ngrams as character_ngrams import frameworks.tc_scikit.features.dependency_distribution_spacy as dependency_distribution_spac...
[ "frameworks.tc_scikit.features.sentiws_average_polarity_feature.build", "frameworks.tc_scikit.features.bag_of_words.build", "frameworks.tc_scikit.features.character_ngrams.build", "frameworks.tc_scikit.features.pos_distribution_spacy.build", "frameworks.tc_scikit.features.textdepth_feature.build", "framew...
[((1281, 1319), 'frameworks.tc_scikit.features.bag_of_words.build', 'bag_of_words.build', ([], {'ngram_range': '(1, 1)'}), '(ngram_range=(1, 1))\n', (1299, 1319), True, 'import frameworks.tc_scikit.features.bag_of_words as bag_of_words\n'), ((1480, 1534), 'frameworks.tc_scikit.features.bag_of_words.build', 'bag_of_word...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Copyright 2019 Huawei Technologies Co.,Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at # http://www.apache.org/licenses/LICENSE-2.0 # Unle...
[ "obs.util.to_int", "threading.Lock", "threading.Thread", "queue.Queue", "threading.Condition" ]
[((994, 1017), 'queue.Queue', 'queue.Queue', (['queue_size'], {}), '(queue_size)\n', (1005, 1017), False, 'import queue\n'), ((1104, 1120), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (1118, 1120), False, 'import threading\n'), ((2839, 2860), 'threading.Condition', 'threading.Condition', ([], {}), '()\n', (28...
import os import django BASE_PATH = os.path.dirname(__file__) if django.VERSION[:2] >= (1, 3): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } else: DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = ':memory:' SITE_ID = 1 ...
[ "os.path.dirname", "os.path.join" ]
[((38, 63), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (53, 63), False, 'import os\n'), ((576, 611), 'os.path.join', 'os.path.join', (['BASE_PATH', '"""coverage"""'], {}), "(BASE_PATH, 'coverage')\n", (588, 611), False, 'import os\n')]
import yaml import sys import os import pathlib import zipfile import shutil import tarfile import errno # Read YAML file def main(argv): command_name = 'mkisofs' target_directory = 'target' if sys.version_info[0] != 3 or sys.version_info[1] < 6: print("This script requires Python version 3.6+") ...
[ "os.path.exists", "tarfile.open", "distutils.spawn.find_executable", "zipfile.ZipFile", "os.makedirs", "shutil.copy2", "pathlib.Path", "tarfile.is_tarfile", "yaml.safe_load", "os.path.isdir", "sys.exit", "os.system", "zipfile.is_zipfile" ]
[((5700, 5720), 'os.path.exists', 'os.path.exists', (['name'], {}), '(name)\n', (5714, 5720), False, 'import os\n'), ((5923, 5954), 'zipfile.ZipFile', 'zipfile.ZipFile', (['file_name', '"""r"""'], {}), "(file_name, 'r')\n", (5938, 5954), False, 'import zipfile\n'), ((328, 339), 'sys.exit', 'sys.exit', (['(1)'], {}), '(...
""" Reinforcement Learning Using Q-learning, Double Q-learning, and Dyna-Q. Copyright (c) 2020 <NAME> References ---------- - Based on project 7 in the Georgia Tech Spring 2020 course "Machine Learning for Trading" by Prof. <NAME>. - Course: http://quantsoftware.gatech.edu/CS7646_Spring_2020 - Project: http://quant...
[ "numpy.mean", "numpy.median", "QLearner.QLearner", "robot.robot", "numpy.std", "numpy.array", "numpy.random.seed", "sys.exit", "numpy.loadtxt" ]
[((4817, 4859), 'numpy.array', 'np.array', (['[-1.0, -1.0, -1.0, +1.0, -100.0]'], {}), '([-1.0, -1.0, -1.0, +1.0, -100.0])\n', (4825, 4859), True, 'import numpy as np\n'), ((5097, 5143), 'numpy.array', 'np.array', (['[[-1, 0], [0, +1], [+1, 0], [0, -1]]'], {}), '([[-1, 0], [0, +1], [+1, 0], [0, -1]])\n', (5105, 5143), ...
#!/usr/bin/env python # # Copyright 2014 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ "zipline.api.get_datetime", "zipline.api.time_rules.market_close", "zipline.api.record", "matplotlib.pyplot.gcf", "zipline.api.symbols", "zipline.algorithm.TradingAlgorithm", "zipline.api.date_rules.every_day", "datetime.date", "zipline.utils.factory.load_from_yahoo", "zipline.api.set_symbol_looku...
[((1164, 1200), 'zipline.api.set_symbol_lookup_date', 'set_symbol_lookup_date', (['"""2015-02-08"""'], {}), "('2015-02-08')\n", (1186, 1200), False, 'from zipline.api import order, order_target_percent, record, symbol, symbols, set_symbol_lookup_date, history, get_datetime, schedule_function, date_rules, time_rules, ge...
import torch from torch.utils.data import Dataset import os from PIL import Image import numpy as np import PIL import torch.nn as nn from config import opt import pandas as pd import matplotlib.pyplot as plt from pathlib import Path import random import math class TextureDataset(Dataset): """Dataset wrapping ima...
[ "torch.nn.ReLU", "pandas.read_csv", "torch.nn.Sequential", "torch.sin", "numpy.array", "torch.cuda.is_available", "torch.arange", "os.listdir", "pathlib.Path", "torch.nn.Flatten", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "matplotlib.pyplot.title", ...
[((6041, 6067), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(5, 5)'}), '(figsize=(5, 5))\n', (6051, 6067), True, 'import matplotlib.pyplot as plt\n'), ((6153, 6190), 'pandas.read_csv', 'pd.read_csv', (['csv_path'], {'index_col': 'None'}), '(csv_path, index_col=None)\n', (6164, 6190), True, 'import panda...
""" Created on Tuesday Dec 4 18:00 2018 @author: <EMAIL> Partially based on the BSc Thesis of <NAME> (TUM, Statik 2018) """ from node2d import Node2D from geometric_utilities import get_line_coefficients, get_magnitude_and_direction, get_length, get_midpoint class Segment2D(object): def __init__(self, id, nod...
[ "geometric_utilities.get_magnitude_and_direction", "geometric_utilities.get_line_coefficients", "node2d.Node2D", "geometric_utilities.get_length", "geometric_utilities.get_midpoint" ]
[((3969, 4037), 'geometric_utilities.get_midpoint', 'get_midpoint', (['[self.nodes[0].coordinates, self.nodes[1].coordinates]'], {}), '([self.nodes[0].coordinates, self.nodes[1].coordinates])\n', (3981, 4037), False, 'from geometric_utilities import get_line_coefficients, get_magnitude_and_direction, get_length, get_mi...
# -*- coding: utf-8 -*- # # test_place.py # cjktools # from __future__ import unicode_literals import unittest import os import tempfile from cjktools.resources import place def suite(): test_suite = unittest.TestSuite(( unittest.makeSuite(PlaceTestCase) )) return test_suite class PlaceTestC...
[ "os.path.exists", "os.close", "unittest.makeSuite", "cjktools.resources.place.Place.from_file", "cjktools.resources.place.Place", "tempfile.mkstemp", "unittest.TextTestRunner", "os.remove" ]
[((239, 272), 'unittest.makeSuite', 'unittest.makeSuite', (['PlaceTestCase'], {}), '(PlaceTestCase)\n', (257, 272), False, 'import unittest\n'), ((385, 418), 'cjktools.resources.place.Place', 'place.Place', (['"""Melbourne"""', '"""メルボルン"""'], {}), "('Melbourne', 'メルボルン')\n", (396, 418), False, 'from cjktools.resources...
import pytest from drink_partners.contrib.samples import ( partner_adega_cerveja, partner_adega_ze_ambev, partner_bar_legal ) @pytest.fixture def url(): return '/partner/1/' @pytest.fixture def partner_with_str_id_url(): return '/partner/id-str/' @pytest.fixture def partner_search_with_str_co...
[ "drink_partners.contrib.samples.partner_bar_legal", "drink_partners.contrib.samples.partner_adega_ze_ambev", "drink_partners.contrib.samples.partner_adega_cerveja" ]
[((835, 858), 'drink_partners.contrib.samples.partner_adega_cerveja', 'partner_adega_cerveja', ([], {}), '()\n', (856, 858), False, 'from drink_partners.contrib.samples import partner_adega_cerveja, partner_adega_ze_ambev, partner_bar_legal\n'), ((918, 941), 'drink_partners.contrib.samples.partner_adega_cerveja', 'part...
import asyncio import usb1 from select import POLLIN, POLLOUT from weakref import finalize from . import descriptor __all__ = ["Context"] class ContextNotifier: """ Object used for binding libusb1 into Asyncio's event loop. This is an implementation detail (i.e. no API stability). """ def __init__...
[ "weakref.finalize", "asyncio.get_running_loop", "asyncio.Event", "usb1.USBContext" ]
[((485, 500), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (498, 500), False, 'import asyncio\n'), ((521, 536), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (534, 536), False, 'import asyncio\n'), ((2468, 2485), 'usb1.USBContext', 'usb1.USBContext', ([], {}), '()\n', (2483, 2485), False, 'import usb1\n'),...
# coding: utf-8 # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import sys import unittest import datadog_api_client.v2 from datadog...
[ "unittest.main" ]
[((1225, 1240), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1238, 1240), False, 'import unittest\n')]
from PIL import Image, ImageDraw import sys import math, random from itertools import product from utils.ufarray import * import numpy as np def perform_dws(dws_energy, class_map, bbox_map,cutoff=0,min_ccoponent_size=0, return_ccomp_img = False): bbox_list = [] dws_energy = np.squeeze(dws_energy) class_m...
[ "numpy.amax", "numpy.average", "PIL.Image.new", "numpy.asanyarray", "numpy.squeeze", "numpy.transpose", "numpy.bincount", "random.randint", "numpy.round" ]
[((286, 308), 'numpy.squeeze', 'np.squeeze', (['dws_energy'], {}), '(dws_energy)\n', (296, 308), True, 'import numpy as np\n'), ((325, 346), 'numpy.squeeze', 'np.squeeze', (['class_map'], {}), '(class_map)\n', (335, 346), True, 'import numpy as np\n'), ((362, 382), 'numpy.squeeze', 'np.squeeze', (['bbox_map'], {}), '(b...
""" Turning radar PPIs into Cartesian grids. Processing the Australian National archive. @creator: <NAME> <<EMAIL>> @institution: Monash University and Bureau of Meteorology @date: 12/04/2021 .. autosummary:: :toctree: generated/ buffer check_rid extract_zip get_radar_archive_file mkdir r...
[ "radar_grids.标准映射", "os.path.exists", "zipfile.ZipFile", "argparse.ArgumentParser", "warnings.catch_warnings", "os.path.join", "os.mkdir", "dask.bag.from_sequence", "sys.exit", "warnings.simplefilter", "traceback.print_exc", "time.time", "pandas.date_range", "os.remove" ]
[((1664, 1685), 'os.path.exists', 'os.path.exists', (['indir'], {}), '(indir)\n', (1678, 1685), False, 'import os\n'), ((4575, 4630), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'parser_description'}), '(description=parser_description)\n', (4598, 4630), False, 'import argparse\n'), ((683,...
import itertools import requests from geosolver import settings import networkx as nx __author__ = 'minjoon' class SyntaxParse(object): def __init__(self, words, directed, undirected, rank, score): self.words = words self.directed = directed self.undirected = undirected self.rank =...
[ "networkx.DiGraph", "networkx.shortest_path", "networkx.shortest_path_length", "requests.get" ]
[((1677, 1708), 'networkx.shortest_path', 'nx.shortest_path', (['graph', 'i0', 'i1'], {}), '(graph, i0, i1)\n', (1693, 1708), True, 'import networkx as nx\n'), ((2385, 2423), 'networkx.shortest_path_length', 'nx.shortest_path_length', (['graph', 'i0', 'i1'], {}), '(graph, i0, i1)\n', (2408, 2423), True, 'import network...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='movies_organizer', version='1.0.4', scripts=['movies_organizer'] , author="<NAME>", author_email="<EMAIL>", description="Tool for organizing movies by IMDB rating.", long...
[ "setuptools.find_packages" ]
[((477, 503), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (501, 503), False, 'import setuptools\n')]
import re from collections import Counter from re import split from os import chdir, environ from os.path import join, dirname import sys def pyinstaller_get_full_path(filename): """ If bundling files in onefile with pyinstaller, use thise to get the temp directory where file actually resides """ if hasattr(s...
[ "os.path.dirname", "os.path.join", "re.split" ]
[((414, 442), 'os.path.join', 'join', (['sys._MEIPASS', 'filename'], {}), '(sys._MEIPASS, filename)\n', (418, 442), False, 'from os.path import join, dirname\n'), ((581, 617), 'os.path.join', 'join', (["environ['_MEIPASS2']", 'filename'], {}), "(environ['_MEIPASS2'], filename)\n", (585, 617), False, 'from os.path impor...
# -*- coding: utf-8 -*- # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
[ "parameterized.parameterized.expand", "o2a.utils.el_utils.extract_evaluate_properties", "o2a.o2a_libs.property_utils.PropertySet", "o2a.utils.el_utils.escape_string_with_python_escapes", "tempfile.NamedTemporaryFile" ]
[((3306, 3623), 'parameterized.parameterized.expand', 'parameterized.expand', (["[('${nameNode}/examples/output-data/demo/pig-node',\n '/examples/output-data/demo/pig-node'), (\n '${nameNode}/examples/output-data/demo/pig-node2',\n '/examples/output-data/demo/pig-node2'), (\n 'hdfs:///examples/output-data/d...
from typing import Dict, Set, Tuple from automaton import abstract __all__ = ["NDFA"] class NonDetTransitions: """Transitions is a wrapper for a graph of moves over non-deterministic state machine.""" def __init__(self, d: Dict[int, Dict[chr, Set[int]]] = None): """Constructor for a non-determinist...
[ "automaton.abstract.map" ]
[((5035, 5100), 'automaton.abstract.map', 'abstract.map', (['self.T', 'new_trans', '(lambda x: x + n)', '(lambda x: x + n)'], {}), '(self.T, new_trans, lambda x: x + n, lambda x: x + n)\n', (5047, 5100), False, 'from automaton import abstract\n')]
import numpy as np import tensorflow as tf def upsample_nearest(inputs, scale): shape = tf.shape(input=inputs) n, h, w, c = shape[0], shape[1], shape[2], shape[3] return tf.image.resize(inputs, tf.stack([h*scale, w*scale]), method=tf.image.ResizeMethod.NEAREST_NEIGHBOR)
[ "tensorflow.shape", "tensorflow.stack" ]
[((94, 116), 'tensorflow.shape', 'tf.shape', ([], {'input': 'inputs'}), '(input=inputs)\n', (102, 116), True, 'import tensorflow as tf\n'), ((208, 240), 'tensorflow.stack', 'tf.stack', (['[h * scale, w * scale]'], {}), '([h * scale, w * scale])\n', (216, 240), True, 'import tensorflow as tf\n')]
""" Django settings for securedblog project. Generated by 'django-admin startproject' using Django 3.1.4. 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/ """ from pat...
[ "os.path.join", "environ.Env", "environ.Env.read_env", "pathlib.Path" ]
[((390, 422), 'environ.Env', 'environ.Env', ([], {'DEBUG': '(bool, False)'}), '(DEBUG=(bool, False))\n', (401, 422), False, 'import environ\n'), ((482, 504), 'environ.Env.read_env', 'environ.Env.read_env', ([], {}), '()\n', (502, 504), False, 'import environ\n'), ((3966, 4003), 'os.path.join', 'os.path.join', (['BASE_D...
from random import randint from sympy import expand, sqrt from cartesian import * def tangent(x0, y0): x, y = symbols('x, y') return Eq(x0*x + y0*y, 1) def sub_y(x, y): return y, (1 - randint(0, 1)*2)*sqrt(1 - x**2) def main(): # A hexagon ABCDEF circumscribed about a unit circle with tangent points ...
[ "random.randint", "sympy.sqrt" ]
[((215, 231), 'sympy.sqrt', 'sqrt', (['(1 - x ** 2)'], {}), '(1 - x ** 2)\n', (219, 231), False, 'from sympy import expand, sqrt\n'), ((198, 211), 'random.randint', 'randint', (['(0)', '(1)'], {}), '(0, 1)\n', (205, 211), False, 'from random import randint\n')]
#!/usr/bin/env python3 from csv import reader from math import pi, sqrt, exp from random import randrange class NaiveBayesClassifier: """ Implementation of a Naive Bayes Classifier algorithm. The implementation consists of the following steps:\n 1. Dataset values separation by class\n 2. Calcu...
[ "math.exp", "math.sqrt", "csv.reader" ]
[((4097, 4111), 'math.sqrt', 'sqrt', (['variance'], {}), '(variance)\n', (4101, 4111), False, 'from math import pi, sqrt, exp\n'), ((5864, 5908), 'math.exp', 'exp', (['(-((x - mean) ** 2 / (2 * std_dev ** 2)))'], {}), '(-((x - mean) ** 2 / (2 * std_dev ** 2)))\n', (5867, 5908), False, 'from math import pi, sqrt, exp\n'...
import os from pytorch3dunet.unet3d import utils from argparse import ArgumentParser import yaml from pathlib import Path from pytorch3dunet.datasets.utils_pdb import processPdb import prody as pr from shutil import copyfile logger = utils.get_logger('DataGen') def procName(arg): output, name, dataFol...
[ "os.makedirs", "argparse.ArgumentParser", "pathlib.Path", "pytorch3dunet.unet3d.utils.get_logger", "pytorch3dunet.datasets.utils_pdb.processPdb", "shutil.copyfile", "prody.parsePDB", "prody.writePDB" ]
[((244, 271), 'pytorch3dunet.unet3d.utils.get_logger', 'utils.get_logger', (['"""DataGen"""'], {}), "('DataGen')\n", (260, 271), False, 'from pytorch3dunet.unet3d import utils\n'), ((380, 418), 'os.makedirs', 'os.makedirs', (['output_dir'], {'exist_ok': '(True)'}), '(output_dir, exist_ok=True)\n', (391, 418), False, 'i...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ "django.utils.translation.ugettext", "google.appengine.ext.db.ReferenceProperty", "google.appengine.ext.db.DateTimeProperty" ]
[((1426, 1532), 'google.appengine.ext.db.ReferenceProperty', 'db.ReferenceProperty', ([], {'reference_class': 'soc.models.user.User', 'required': '(True)', 'collection_name': '"""commented"""'}), "(reference_class=soc.models.user.User, required=True,\n collection_name='commented')\n", (1446, 1532), False, 'from goog...
# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
[ "boto3.client" ]
[((630, 649), 'boto3.client', 'boto3.client', (['"""sts"""'], {}), "('sts')\n", (642, 649), False, 'import boto3\n'), ((1016, 1173), 'boto3.client', 'boto3.client', (['"""sts"""'], {'aws_access_key_id': "creds['AccessKeyId']", 'aws_secret_access_key': "creds['SecretAccessKey']", 'aws_session_token': "creds['SessionToke...
""" Code to extract a box-like region, typically for another modeler to use as a boundary contition. In cases where it gets velocity in addition to the rho-grid variables the grid limits mimic the standard ROMS organization, with the outermost corners being on the rho-grid. Job definitions are in LO_user/extract/box/...
[ "sys.exit", "job_definitions.get_box", "lo_tools.Lfun.make_dir", "numpy.mod", "lo_tools.Lfun.Lstart", "lo_tools.zrfun.get_z", "argparse.ArgumentParser", "subprocess.Popen", "os.getpid", "sys.stdout.flush", "lo_tools.Lfun.get_fn_list", "numpy.ones", "numpy.isnan", "xarray.open_dataset", "...
[((1163, 1174), 'os.getpid', 'os.getpid', ([], {}), '()\n', (1172, 1174), False, 'import os\n'), ((1288, 1313), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1311, 1313), False, 'import argparse\n'), ((2719, 2775), 'lo_tools.Lfun.Lstart', 'Lfun.Lstart', ([], {'gridname': 'gridname', 'tag': 't...
from torch import nn from constants import Const from simple_lstm import SimpleLSTM from crf import CRF # or try the vectorized version: # from crf_vectorized import CRF class BiLSTM_CRF(nn.Module): def __init__(self, vocab_size, nb_labels, emb_dim=5, hidden_dim=4): super().__init__() self.lstm =...
[ "crf.CRF", "simple_lstm.SimpleLSTM" ]
[((321, 394), 'simple_lstm.SimpleLSTM', 'SimpleLSTM', (['vocab_size', 'nb_labels'], {'emb_dim': 'emb_dim', 'hidden_dim': 'hidden_dim'}), '(vocab_size, nb_labels, emb_dim=emb_dim, hidden_dim=hidden_dim)\n', (331, 394), False, 'from simple_lstm import SimpleLSTM\n'), ((436, 538), 'crf.CRF', 'CRF', (['nb_labels', 'Const.B...
import scipy import matplotlib.pyplot as plt filename = 'cyclic_test_data.txt' data = scipy.loadtxt(filename,delimiter=',') t = data[:,0] v = data[:,1] figsize = 12, 8 xlim = t.min(), t.max() ylim = -0.2, 1.2 linewidth = 2 fig = plt.figure(1,figsize=figsize) vpos_arrow_low = -0.15 # Quiet time fill plt.fill([0.0...
[ "matplotlib.pyplot.text", "scipy.loadtxt", "matplotlib.pyplot.grid", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.fill", "matplotlib.pyplot.figtext", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "mat...
[((88, 126), 'scipy.loadtxt', 'scipy.loadtxt', (['filename'], {'delimiter': '""","""'}), "(filename, delimiter=',')\n", (101, 126), False, 'import scipy\n'), ((234, 264), 'matplotlib.pyplot.figure', 'plt.figure', (['(1)'], {'figsize': 'figsize'}), '(1, figsize=figsize)\n', (244, 264), True, 'import matplotlib.pyplot as...
import numpy as np import torch.nn as nn import torch import math import time from visualDet3D.networks.backbones import resnet class YoloMono3DCore(nn.Module): """Some Information about YoloMono3DCore""" def __init__(self, backbone_arguments=dict()): super(YoloMono3DCore, self).__init__() sel...
[ "visualDet3D.networks.backbones.resnet" ]
[((332, 360), 'visualDet3D.networks.backbones.resnet', 'resnet', ([], {}), '(**backbone_arguments)\n', (338, 360), False, 'from visualDet3D.networks.backbones import resnet\n')]
''' Created on 2016年8月4日 @author: Administrator pickling序列化, 反序列化即unpickling ''' import pickle d = dict(name='Bob', age=20, score=88) # 把任意对象序列化成一个bytes print(pickle.dumps(d)) # 序列化 with open('dump.txt', 'wb') as f: pickle.dump(d, f) # 反序列化 with open('dump.txt', 'rb') as f: d = pickle.load(f) print...
[ "pickle.dumps", "pickle.load", "pickle.dump" ]
[((162, 177), 'pickle.dumps', 'pickle.dumps', (['d'], {}), '(d)\n', (174, 177), False, 'import pickle\n'), ((224, 241), 'pickle.dump', 'pickle.dump', (['d', 'f'], {}), '(d, f)\n', (235, 241), False, 'import pickle\n'), ((296, 310), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (307, 310), False, 'import pickle\n'...
# https://www.tweepy.org/ # https://developer.twitter.com/en/portal/dashboard import tweepy import time consumer_key = 'UhGZOyvUbcV2AdP6qKO0JVyO5' consumer_secret = '<KEY>' access_token = '<KEY>' access_token_secret = '<KEY>' auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token...
[ "tweepy.Cursor", "tweepy.API", "time.sleep", "tweepy.OAuthHandler" ]
[((247, 297), 'tweepy.OAuthHandler', 'tweepy.OAuthHandler', (['consumer_key', 'consumer_secret'], {}), '(consumer_key, consumer_secret)\n', (266, 297), False, 'import tweepy\n'), ((363, 379), 'tweepy.API', 'tweepy.API', (['auth'], {}), '(auth)\n', (373, 379), False, 'import tweepy\n'), ((1046, 1079), 'tweepy.Cursor', '...
""" Solution to https://adventofcode.com/2020/day/17 """ from collections import namedtuple from itertools import product class Array: """ A simple array that you can add and multiply with other arrays and scalars. """ def __init__(self, *args): self._vals = tuple(args) def __len__(self...
[ "collections.namedtuple" ]
[((1468, 1509), 'collections.namedtuple', 'namedtuple', (['"""Cube"""', "['position', 'state']"], {}), "('Cube', ['position', 'state'])\n", (1478, 1509), False, 'from collections import namedtuple\n')]
import argparse import os import random from envs import MappingEnvironment, LocalISM import numpy as np parser = argparse.ArgumentParser() # General Stuff parser.add_argument('--experiment', default='runs/myopic', help='folder to put results of experiment in') # Environment parser.add_argument('--N', type=int, de...
[ "numpy.ones", "os.makedirs", "argparse.ArgumentParser", "envs.LocalISM", "os.path.join", "random.seed", "envs.MappingEnvironment", "numpy.sum", "numpy.random.seed", "random.random", "random.randint" ]
[((117, 142), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (140, 142), False, 'import argparse\n'), ((1040, 1061), 'random.seed', 'random.seed', (['opt.seed'], {}), '(opt.seed)\n', (1051, 1061), False, 'import random\n'), ((1062, 1086), 'numpy.random.seed', 'np.random.seed', (['opt.seed'], {}...
#!/usr/bin/env python3 # This sample script demonstrates how to # 1. get a list of flow regex properties # 2. create a new flow regex property # 3. get a flow regex property by id # 4. update an existing flow regex property # 5. start a find dependents task and check results when completed # 6. start a deletion task to...
[ "importlib.import_module", "json.dumps", "os.path.realpath", "taskManager.TaskManager", "sys.exit" ]
[((514, 554), 'importlib.import_module', 'importlib.import_module', (['"""RestApiClient"""'], {}), "('RestApiClient')\n", (537, 554), False, 'import importlib\n'), ((573, 615), 'importlib.import_module', 'importlib.import_module', (['"""SampleUtilities"""'], {}), "('SampleUtilities')\n", (596, 615), False, 'import impo...
import psycopg2 import time q1 = """SELECT DISTINCT "visc", "dens", "kxx", "kyy", "kzz", "mmodel", "mesh" FROM "scc2-edgecfd"."oedgecfdpre" , "scc2-edgecfd"."dl_mat" WHERE mesh = 'cavp.2' OR mesh = 'cavp.3' OR mesh = 'cavp.4' AND "oedgecfdpre"."dl_matid" = "dl_mat"."rid" """ q2 = """SELECT DISTINCT dat FROM "scc2-...
[ "psycopg2.connect", "time.time" ]
[((1076, 1154), 'psycopg2.connect', 'psycopg2.connect', (['"""dbname=edgecfd-program-p user=postgres password=<PASSWORD>"""'], {}), "('dbname=edgecfd-program-p user=postgres password=<PASSWORD>')\n", (1092, 1154), False, 'import psycopg2\n'), ((1220, 1231), 'time.time', 'time.time', ([], {}), '()\n', (1229, 1231), Fals...
from omnibus import lang from omnibus import dataclasses as dc import pytest from .. import nodes as no from ... import types def test_cache(): qn = no.QualifiedNameNode.of(['hi', 'there']) assert qn.name == types.QualifiedName(('hi', 'there')) def test_sealed(): with pytest.raises(lang.SealedException...
[ "pytest.raises" ]
[((286, 321), 'pytest.raises', 'pytest.raises', (['lang.SealedException'], {}), '(lang.SealedException)\n', (299, 321), False, 'import pytest\n'), ((523, 555), 'pytest.raises', 'pytest.raises', (['dc.CheckException'], {}), '(dc.CheckException)\n', (536, 555), False, 'import pytest\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Meeko hydrate molecule # import numpy as np from .utils import geomutils from .utils import obutils class HydrateMoleculeLegacy: def __init__(self, distance=3.0, charge=0, atom_type="W"): """Initialize the legacy hydrate typer for AutoDock 4.2.x ...
[ "numpy.radians", "numpy.array" ]
[((1867, 1887), 'numpy.array', 'np.array', (['[position]'], {}), '([position])\n', (1875, 1887), True, 'import numpy as np\n'), ((2190, 2210), 'numpy.array', 'np.array', (['[position]'], {}), '([position])\n', (2198, 2210), True, 'import numpy as np\n'), ((2993, 3012), 'numpy.array', 'np.array', (['positions'], {}), '(...
# Copyright (c) 2021 elParaguayo # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
[ "pytest.mark.parametrize" ]
[((2423, 2856), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""params,expected"""', "[({'location': 'London'}, 'London: 7.0 °C 81% light intensity drizzle'), ({\n 'location': 'London', 'format': '{location_city}: {sunrise} {sunset}'},\n 'London: 07:40 16:47'), ({'location': 'London', 'format':\n '...
import streamlit as st import json from joblib import dump, load import numpy as np import glob with open('params.json') as f: config = json.load(f) features = config['feature_names'] models = glob.glob('artifacts/*.joblib')+glob.glob('artifacts/*.pkl') if len(models)>0: model = load(models[0]) st.title('Welcome ...
[ "numpy.array", "joblib.load", "json.load", "glob.glob", "streamlit.title" ]
[((302, 324), 'streamlit.title', 'st.title', (['"""Welcome to"""'], {}), "('Welcome to')\n", (310, 324), True, 'import streamlit as st\n'), ((325, 355), 'streamlit.title', 'st.title', (["config['model_name']"], {}), "(config['model_name'])\n", (333, 355), True, 'import streamlit as st\n'), ((138, 150), 'json.load', 'js...
""" PSoC bootloader command line tool This Python file encompasses the command line utility cyflash. If you need to use this package in your own program, then use bootload.py """ import argparse import codecs import time import six import sys import logging import logging.config from builtins import input from cyfl...
[ "logging.basicConfig", "cyflash.cyacd.BootloaderData.read", "argparse.FileType", "logging.getLogger", "builtins.input", "argparse.ArgumentParser", "time.clock", "can.interface.Bus", "cyflash.protocol.SerialTransport", "cyflash.bootload.BootloaderHost", "argparse.ArgumentTypeError", "time.perf_...
[((446, 525), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Bootloader tool for Cypress PSoC devices"""'}), "(description='Bootloader tool for Cypress PSoC devices')\n", (469, 525), False, 'import argparse\n'), ((7829, 7869), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': ...
############################################################################### # Copyright 2018 The AnPyLar Team. All Rights Reserved. # Use of this source code is governed by an MIT-style license that # can be found in the LICENSE file at http://anpylar.com/mit-license ################################################...
[ "anpylar.html.a", "anpylar.html.span", "anpylar.html.txt", "anpylar.html.li" ]
[((832, 841), 'anpylar.html.li', 'html.li', ([], {}), '()\n', (839, 841), False, 'from anpylar import Component, html\n'), ((943, 989), 'anpylar.html.a', 'html.a', ([], {'routerlink': "('', {'did': disaster.did})"}), "(routerlink=('', {'did': disaster.did}))\n", (949, 989), False, 'from anpylar import Component, html\n...
import sys,os import torch import torch.nn as nn import config import numpy as np from .smpl import SMPL sys.path.append(os.path.abspath(__file__).replace('models/smpl_regressor.py','')) from config import args class SMPLR(nn.Module): def __init__(self, use_gender=False): super(SMPLR, self).__init__() ...
[ "os.path.abspath", "config.args", "torch.from_numpy" ]
[((122, 147), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (137, 147), False, 'import sys, os\n'), ((338, 344), 'config.args', 'args', ([], {}), '()\n', (342, 344), False, 'from config import args\n'), ((388, 394), 'config.args', 'args', ([], {}), '()\n', (392, 394), False, 'from config imp...
import pendulum from .. import types # https://github.com/sdispater/pendulum/issues/97 DEFAULT_TIMEZONE = "utc" class DateTime(types.DateTime): python_type = pendulum.Pendulum def __init__(self, timezone=DEFAULT_TIMEZONE): self.timezone = timezone super().__init__() def dynamo_dump(se...
[ "pendulum.instance" ]
[((703, 724), 'pendulum.instance', 'pendulum.instance', (['dt'], {}), '(dt)\n', (720, 724), False, 'import pendulum\n'), ((1342, 1363), 'pendulum.instance', 'pendulum.instance', (['dt'], {}), '(dt)\n', (1359, 1363), False, 'import pendulum\n')]
import unittest from assertpy import assert_that from nose_parameterized import parameterized from implementation.converter import RomanToArabic from implementation.exceptions import IllegalArgumentError from tests.method_conversion import as_function class RomanToArabicTests(unittest.TestCase): def setUp(self)...
[ "nose_parameterized.parameterized.expand", "assertpy.assert_that", "implementation.converter.RomanToArabic", "tests.method_conversion.as_function" ]
[((366, 421), 'nose_parameterized.parameterized.expand', 'parameterized.expand', (["[('I', 1), ('II', 2), ('III', 3)]"], {}), "([('I', 1), ('II', 2), ('III', 3)])\n", (386, 421), False, 'from nose_parameterized import parameterized\n'), ((953, 996), 'nose_parameterized.parameterized.expand', 'parameterized.expand', (["...
import numpy as np import requests import random import pandas as pd import time import multiprocessing url = 'https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt' existingWords = requests.get(url) existingWords = existingWords.text.split() existingWords = [word for word in existingWo...
[ "random.choice", "pandas.DataFrame", "multiprocessing.Process", "requests.get", "numpy.array", "multiprocessing.Manager", "time.time" ]
[((213, 230), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (225, 230), False, 'import requests\n'), ((460, 483), 'random.choice', 'random.choice', (['alphabet'], {}), '(alphabet)\n', (473, 483), False, 'import random\n'), ((4981, 4992), 'time.time', 'time.time', ([], {}), '()\n', (4990, 4992), False, 'impo...
import logging from homeassistant.components.media_player.const import ( MEDIA_TYPE_MUSIC, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PLAY_MEDIA, SUPPORT_SELECT_SOURCE, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET, ) from homeassistant.const import ( STATE_OFF, STATE_PAUSED, STATE_PLAYING,...
[ "logging.getLogger", "datetime.timedelta" ]
[((494, 521), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (511, 521), False, 'import logging\n'), ((539, 559), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(5)'}), '(seconds=5)\n', (548, 559), False, 'from datetime import timedelta\n')]
from .Role import Role import strings as s class Derek(Role): """Derek muore. Quando gli pare.""" icon = s.derek_icon team = "Good" name = s.derek_name powerdesc = s.derek_power_description def __init__(self, player): super().__init__(player) # Per qualche motivo assurdo ho dec...
[ "strings.derek_deathwish_successful.format" ]
[((847, 910), 'strings.derek_deathwish_successful.format', 's.derek_deathwish_successful.format', ([], {'name': 'self.player.tusername'}), '(name=self.player.tusername)\n', (882, 910), True, 'import strings as s\n')]
# -*- coding: utf-8 -*- from yawf import get_workflow_by_instance def get_allowed(sender, obj): workflow = get_workflow_by_instance(obj) obj_state = getattr(obj, workflow.state_attr_name) check_result = dict( (c, c(obj, sender)) for c in workflow.get_checkers_by_state(obj_state)) me...
[ "yawf.get_workflow_by_instance" ]
[((113, 142), 'yawf.get_workflow_by_instance', 'get_workflow_by_instance', (['obj'], {}), '(obj)\n', (137, 142), False, 'from yawf import get_workflow_by_instance\n')]
from django import template from django.core.exceptions import ImproperlyConfigured from django.utils.safestring import mark_safe from django.conf import settings from bilderfee.bilderfee import Ext from bilderfee.bilderfee import url from bilderfee.bilderfee import BASE_URL as BF_BASE_URL LAZY_LOADING = getattr(sett...
[ "bilderfee.bilderfee.url", "django.utils.safestring.mark_safe", "django.template.Library", "django.conf.settings.STATIC_URL.endswith", "django.core.exceptions.ImproperlyConfigured" ]
[((530, 548), 'django.template.Library', 'template.Library', ([], {}), '()\n', (546, 548), False, 'from django import template\n'), ((455, 517), 'django.core.exceptions.ImproperlyConfigured', 'ImproperlyConfigured', (['"""Please provide your BILDERFEE_BASE_URL"""'], {}), "('Please provide your BILDERFEE_BASE_URL')\n", ...
# Generated by Django 2.0.5 on 2018-05-26 15:31 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sunless_web', '0023_entity_translated'), ] operations = [ migrations.CreateModel( name='Answer',...
[ "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((1222, 1363), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""answers"""', 'to': '"""sunless_web.Conversation"""', 'verbose_name': '"""대화"""'}), "(on_delete=django.db.models.deletion.CASCADE, related_name\n ='answers', to='sunless_web....
import snap7 import threading import time import struct from utils import int2bitarray import ctypes from snap7.common import check_error from snap7.snap7types import S7DataItem, S7AreaDB, S7WLByte import logging logger = logging.getLogger(__name__) class Siemens_s7(snap7.client.Client): def __init__(self): ...
[ "logging.getLogger", "utils.int2bitarray", "snap7.common.check_error", "ctypes.c_int32", "ctypes.POINTER", "snap7.util.set_bool", "struct.pack", "ctypes.create_string_buffer", "struct.unpack", "ctypes.pointer" ]
[((223, 250), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (240, 250), False, 'import logging\n'), ((5853, 5877), 'ctypes.c_int32', 'ctypes.c_int32', (['S7AreaDB'], {}), '(S7AreaDB)\n', (5867, 5877), False, 'import ctypes\n'), ((5910, 5934), 'ctypes.c_int32', 'ctypes.c_int32', (['S7WLBy...
#!/usr/bin/env python """ This filename contains a health monitoring plugin which is still being developed and is still in the alpha testing stage. ---------------------------------------------------------------- check-l3-resources DESCRIPTION OUTPUT plain text PLATFORMS: Cumulus Linux Hardware Switc...
[ "subprocess.check_output", "argparse.ArgumentParser" ]
[((2787, 2896), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': "('Check Cumulus L3 Resources. ' + 'Found in cl-resource-query output')"}), "(description='Check Cumulus L3 Resources. ' +\n 'Found in cl-resource-query output')\n", (2810, 2896), False, 'import argparse\n'), ((1194, 1222), 's...
""" Visualize mel spectrogram input data. Copyright 2021. <NAME>. """ from os import path from matplotlib import pyplot as plt # type: ignore from seaborn import heatmap # type: ignore from click import command, option # type: ignore import tensorflow as tf # type: ignore from util import ARTIFACT_DIR, hyperparams...
[ "util.hyperparams", "matplotlib.pyplot.savefig", "tensorflow.transpose", "click.option", "os.path.join", "preprocess.load_accents", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "click.command" ]
[((401, 410), 'click.command', 'command', ([], {}), '()\n', (408, 410), False, 'from click import command, option\n'), ((412, 502), 'click.option', 'option', (['"""--num"""', '"""-n"""'], {'type': 'int', 'required': '(True)', 'help': '"""The number of plots to create."""'}), "('--num', '-n', type=int, required=True, he...
import MeCab import mojimoji import re import pandas as pd import numpy as np tagger = MeCab.Tagger("-Owakati -d /usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd") def make_wakati(sentence): # MeCabで分かち書き sentence = sentence.lower() sentence = tagger.parse(sentence) sentence = mojimoji.zen_to_h...
[ "MeCab.Tagger", "re.sub", "mojimoji.zen_to_han", "re.compile" ]
[((88, 177), 'MeCab.Tagger', 'MeCab.Tagger', (['"""-Owakati -d /usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd"""'], {}), "(\n '-Owakati -d /usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd')\n", (100, 177), False, 'import MeCab\n'), ((303, 332), 'mojimoji.zen_to_han', 'mojimoji.zen_to_han', (['sente...
from django_sqlalchemy.test import * from django_sqlalchemy.backend import metadata from django.db import models # An example of a custom manager called "objects". class PersonManager(models.Manager): def get_fun_people(self): return self.filter(fun=True) class Person(models.Model): first_name = mode...
[ "django.db.models.Manager", "django.db.models.IntegerField", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.CharField", "django_sqlalchemy.backend.metadata.create_all" ]
[((1591, 1612), 'django_sqlalchemy.backend.metadata.create_all', 'metadata.create_all', ([], {}), '()\n', (1610, 1612), False, 'from django_sqlalchemy.backend import metadata\n'), ((316, 347), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)'}), '(max_length=30)\n', (332, 347), False, 'from d...
# # Progression of infection within individuals # import random import numpy as np import pyEpiabm as pe from pyEpiabm.core import Person from pyEpiabm.property import InfectionStatus from pyEpiabm.utility import StateTransitionMatrix, TransitionTimeMatrix from .abstract_sweep import AbstractSweep class HostProgre...
[ "pyEpiabm.Parameters.instance", "pyEpiabm.property.InfectionStatus", "pyEpiabm.utility.TransitionTimeMatrix", "numpy.floor", "random.choices", "numpy.random.gamma", "pyEpiabm.utility.StateTransitionMatrix" ]
[((1116, 1139), 'pyEpiabm.utility.StateTransitionMatrix', 'StateTransitionMatrix', ([], {}), '()\n', (1137, 1139), False, 'from pyEpiabm.utility import StateTransitionMatrix, TransitionTimeMatrix\n'), ((1555, 1577), 'pyEpiabm.utility.TransitionTimeMatrix', 'TransitionTimeMatrix', ([], {}), '()\n', (1575, 1577), False, ...
import asyncio import platform import telegram_helper if platform.system() == "Windows": # otherwise some "RuntimeError: Event loop is closed" occur asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) telegram_helper.run_bot()
[ "telegram_helper.run_bot", "platform.system", "asyncio.WindowsSelectorEventLoopPolicy" ]
[((232, 257), 'telegram_helper.run_bot', 'telegram_helper.run_bot', ([], {}), '()\n', (255, 257), False, 'import telegram_helper\n'), ((59, 76), 'platform.system', 'platform.system', ([], {}), '()\n', (74, 76), False, 'import platform\n'), ((189, 229), 'asyncio.WindowsSelectorEventLoopPolicy', 'asyncio.WindowsSelectorE...
import streamlit as st import requests import json from PIL import Image import ipywidgets as widgets import matplotlib.pyplot as plt import deviantart import numpy as np import argparse import sys from IPython.display import display from ipywidgets import interact, interact_manual def app(): st.title('Recommendat...
[ "streamlit.form", "streamlit.caption", "streamlit.markdown", "PIL.Image.open", "deviantart.Api", "streamlit.number_input", "streamlit.expander", "streamlit.write", "requests.get", "streamlit.container", "streamlit.header", "streamlit.form_submit_button", "streamlit.title" ]
[((299, 342), 'streamlit.title', 'st.title', (['"""Recommendation from Deviant Art"""'], {}), "('Recommendation from Deviant Art')\n", (307, 342), True, 'import streamlit as st\n'), ((347, 385), 'streamlit.write', 'st.write', (['"""Welcome to Recommendations"""'], {}), "('Welcome to Recommendations')\n", (355, 385), Tr...
"""A minimal API for defining ACL protected resources and querying permissions""" import functools import typing import flask class AclResource: def __init__(self, name: str, rank: int = 1, children: typing.Optional[typing.List['AclResource']] = None): ...
[ "flask.abort", "functools.update_wrapper" ]
[((3584, 3620), 'functools.update_wrapper', 'functools.update_wrapper', (['wrapper', 'f'], {}), '(wrapper, f)\n', (3608, 3620), False, 'import functools\n'), ((3384, 3415), 'flask.abort', 'flask.abort', (['(403)', 'abort_message'], {}), '(403, abort_message)\n', (3395, 3415), False, 'import flask\n')]
from fastapi import APIRouter, Depends, Path, HTTPException from fastapi.responses import Response from kubernetes.client import CoreV1Api, StorageV1Api from starlette.status import ( HTTP_201_CREATED, HTTP_204_NO_CONTENT, HTTP_400_BAD_REQUEST, HTTP_404_NOT_FOUND, HTTP_422_UNPROCESSABLE_ENTITY, ) ...
[ "app.crud.user.delete_user", "fastapi.HTTPException", "app.core.jwt.get_current_user_authorizer", "app.crud.user.get_user_by_user_id", "app.core.permission.check_permission_with_exception", "app.crud.user.crud_get_many_user", "fastapi.APIRouter", "fastapi.Path", "fastapi.Depends", "fastapi.respons...
[((1091, 1102), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (1100, 1102), False, 'from fastapi import APIRouter, Depends, Path, HTTPException\n'), ((1312, 1333), 'fastapi.Depends', 'Depends', (['get_database'], {}), '(get_database)\n', (1319, 1333), False, 'from fastapi import APIRouter, Depends, Path, HTTPExce...
import os import sys sys.path.append('../../../') sys.path.append('../../../python_parser') from run_parser import get_identifiers, get_code_tokens from parser_folder import remove_comments_and_docstrings def preprocess_gcjpy(split_portion): ''' 预处理文件. 需要将结果分成train和valid ''' data_name = "gcjpy" ...
[ "os.path.exists", "os.listdir", "run_parser.get_code_tokens", "os.path.join", "os.mkdir", "run_parser.get_identifiers", "sys.path.append" ]
[((21, 49), 'sys.path.append', 'sys.path.append', (['"""../../../"""'], {}), "('../../../')\n", (36, 49), False, 'import sys\n'), ((50, 91), 'sys.path.append', 'sys.path.append', (['"""../../../python_parser"""'], {}), "('../../../python_parser')\n", (65, 91), False, 'import sys\n'), ((330, 370), 'os.path.join', 'os.pa...
import torch import torch.nn as nn class Actor(nn.Module): def __init__(self, state_size, action_size, args): super(Actor, self).__init__() self.fc1 = nn.Linear(state_size, args.hidden_size) self.fc2 = nn.Linear(args.hidden_size, args.hidden_size) self.fc3 = nn.Linear(args.hidden_si...
[ "torch.cat", "torch.nn.Linear" ]
[((172, 211), 'torch.nn.Linear', 'nn.Linear', (['state_size', 'args.hidden_size'], {}), '(state_size, args.hidden_size)\n', (181, 211), True, 'import torch.nn as nn\n'), ((231, 276), 'torch.nn.Linear', 'nn.Linear', (['args.hidden_size', 'args.hidden_size'], {}), '(args.hidden_size, args.hidden_size)\n', (240, 276), Tru...
from flask import Flask, jsonify, request import logging logging.basicConfig(level=logging.DEBUG) app = Flask(__name__) @app.route("/") def get_header(): default = {"Client IP": "0.0.0.0", "Host": "", "User-Agent": "", "Accept": ""} try: r = request.headers.__dict__ #print r logging.d...
[ "logging.basicConfig", "flask.jsonify", "logging.debug", "flask.Flask" ]
[((57, 97), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (76, 97), False, 'import logging\n'), ((105, 120), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (110, 120), False, 'from flask import Flask, jsonify, request\n'), ((580, 596), 'flask.jso...
""" Implementation of F-cooper maxout fusing. """ import torch import torch.nn as nn class SpatialFusion(nn.Module): def __init__(self): super(SpatialFusion, self).__init__() def regroup(self, x, record_len): cum_sum_len = torch.cumsum(record_len, dim=0) split_x = torch.tensor_split(x...
[ "torch.max", "torch.cumsum", "torch.cat" ]
[((250, 281), 'torch.cumsum', 'torch.cumsum', (['record_len'], {'dim': '(0)'}), '(record_len, dim=0)\n', (262, 281), False, 'import torch\n'), ((660, 681), 'torch.cat', 'torch.cat', (['out'], {'dim': '(0)'}), '(out, dim=0)\n', (669, 681), False, 'import torch\n'), ((580, 614), 'torch.max', 'torch.max', (['xx'], {'dim':...
import torch import torch.nn as nn from network.gated_conv import GatedConv2d, GatedDeConv2d class CoarseNetwork(nn.Module): def __init__(self, in_channels: int = 4, out_channels: int = 3, latent_channels: int = 48, padding_type: str = 'zero', activation: str = 'lrelu', norm: str = 'none'): super().__init...
[ "network.gated_conv.GatedDeConv2d", "torch.nn.Tanh", "torch.cat", "network.gated_conv.GatedConv2d" ]
[((3008, 3044), 'torch.cat', 'torch.cat', (['(img_masked, mask)'], {'dim': '(1)'}), '((img_masked, mask), dim=1)\n', (3017, 3044), False, 'import torch\n'), ((397, 513), 'network.gated_conv.GatedConv2d', 'GatedConv2d', (['in_channels', 'latent_channels', '(5)', '(1)', '(2)'], {'padding_type': 'padding_type', 'activatio...
import os import json path = "P2S2/" example = {} example["labels"] = ["Background","Vegetation","Organ","Don't know"] example["models"] = [] dirs = [item for item in os.listdir(path) if os.path.isdir(os.path.join(path,item))] print(dirs) for dir_ in dirs: if dir_ == "images": example["imageURLs"] = ["data/im...
[ "os.listdir", "os.path.join", "json.dump" ]
[((665, 687), 'json.dump', 'json.dump', (['example', 'fp'], {}), '(example, fp)\n', (674, 687), False, 'import json\n'), ((171, 187), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (181, 187), False, 'import os\n'), ((205, 229), 'os.path.join', 'os.path.join', (['path', 'item'], {}), '(path, item)\n', (217, 22...
# Copyright (c) [2022] Huawei Technologies Co.,Ltd.ALL rights reserved. # This program is licensed under Mulan PSL v2. # You can use it according to the terms and conditions of the Mulan PSL v2. # http://license.coscl.org.cn/MulanPSL2 # THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KI...
[ "json.loads", "os.path.isfile", "shlex.quote", "copy.deepcopy", "re.search" ]
[((939, 962), 'shlex.quote', 'shlex.quote', (['machine.ip'], {}), '(machine.ip)\n', (950, 962), False, 'import shlex\n'), ((972, 1001), 'shlex.quote', 'shlex.quote', (['machine.password'], {}), '(machine.password)\n', (983, 1001), False, 'import shlex\n'), ((1051, 1076), 'shlex.quote', 'shlex.quote', (['machine.user'],...
from flask import Flask app = Flask(__name__) import lachesis.views from lachesis.models.database import init_db, clear_db if __name__ == '__main__': app.run(debug=True)
[ "flask.Flask" ]
[((32, 47), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (37, 47), False, 'from flask import Flask\n')]
import jwe import jwt class Strategy2: def __init__(self, signature_public_key, signature_algorithm, encryption_private_key, encryption_algorithm, encryption_method, logging_enabled=False): # The library we use, PyJWE, only supports the 'A256GCM' encryption algorithm ...
[ "jwt.decode", "logging.exception" ]
[((1417, 1538), 'jwt.decode', 'jwt.decode', (['decrypted_payload', 'self.signature_public_key'], {'audience': '"""OpenStax"""', 'algorithms': '[self.signature_algorithm]'}), "(decrypted_payload, self.signature_public_key, audience=\n 'OpenStax', algorithms=[self.signature_algorithm])\n", (1427, 1538), False, 'import...
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from chinese.models import * from language.views_common import * import datetime import json def choose_language (request): return render(request, 'russian/home.html') def time(request): #print(get_time_step(requ...
[ "django.shortcuts.render", "datetime.timedelta" ]
[((237, 273), 'django.shortcuts.render', 'render', (['request', '"""russian/home.html"""'], {}), "(request, 'russian/home.html')\n", (243, 273), False, 'from django.shortcuts import render, redirect\n'), ((1615, 1660), 'django.shortcuts.render', 'render', (['request', '"""russian/time.html"""', 'context'], {}), "(reque...
# -*- coding: utf-8 -*- # File: vgg_model.py import tensorflow as tf from tensorpack import * from tensorpack.tfutils.scope_utils import auto_reuse_variable_scope from tensorpack.tfutils.argscope import argscope, get_arg_scope from tensorpack.tfutils.summary import * from tensorpack.models import ( Conv2D, MaxPoo...
[ "tensorpack.tfutils.argscope.argscope", "tensorflow.variance_scaling_initializer", "tensorpack.models.MaxPooling", "tensorflow.random_normal_initializer", "tensorpack.tfutils.tower.get_current_tower_context", "tensorflow.summary.histogram", "tensorpack.models.GlobalAvgPooling" ]
[((565, 592), 'tensorpack.tfutils.tower.get_current_tower_context', 'get_current_tower_context', ([], {}), '()\n', (590, 592), False, 'from tensorpack.tfutils.tower import get_current_tower_context\n'), ((754, 848), 'tensorpack.tfutils.argscope.argscope', 'argscope', (['[Conv2D, MaxPooling, BatchNorm, GlobalAvgPooling]...
#################### # ES-DOC CIM Questionnaire # Copyright (c) 2017 ES-DOC. All rights reserved. # # University of Colorado, Boulder # http://cires.colorado.edu/ # # This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT]. #################### from Q.qu...
[ "Q.questionnaire.models.models_ontologies.registered_ontology_signal.connect" ]
[((1050, 1161), 'Q.questionnaire.models.models_ontologies.registered_ontology_signal.connect', 'registered_ontology_signal.connect', (['registered_ontology_handler'], {'dispatch_uid': '"""registered_ontology_handler"""'}), "(registered_ontology_handler,\n dispatch_uid='registered_ontology_handler')\n", (1084, 1161),...
#!/usr/bin/env python3 import numpy as np ############################################################# class Person(): def __init__(self, _id, pos, moveinterval, destiny): self.id = _id self.destiny = destiny self.pos = pos self.moveinterval = moveinterval self.path = np....
[ "numpy.array" ]
[((317, 345), 'numpy.array', 'np.array', (['[]'], {'dtype': 'np.int64'}), '([], dtype=np.int64)\n', (325, 345), True, 'import numpy as np\n')]
from typing import Optional, Tuple from sqlalchemy.orm import Session from sqlalchemy import func from amcat4annotator.models import Unit, User, Annotation, CodingJob, JobSetUnits from amcat4annotator.crud import crud_codingjob class ValidationError(Exception): pass class RuleSet: """ A Rule set encodes...
[ "sqlalchemy.func.count", "amcat4annotator.crud.crud_codingjob.get_jobset", "amcat4annotator.models.JobSetUnits.unit_id.not_in" ]
[((3666, 3730), 'amcat4annotator.crud.crud_codingjob.get_jobset', 'crud_codingjob.get_jobset', (['self.db', 'job.id', 'coder.id', 'assign_set'], {}), '(self.db, job.id, coder.id, assign_set)\n', (3691, 3730), False, 'from amcat4annotator.crud import crud_codingjob\n'), ((7591, 7649), 'amcat4annotator.crud.crud_codingjo...
#!/usr/bin/env python # We use addstr() instead of printw() import curses try: # message to be appeared on the screen mesg = "Enter a string: " # start the curses mode stdscr = curses.initscr() # get the number of rows and columns row, col = stdscr.getmaxyx() # print the message at the ...
[ "curses.endwin", "curses.initscr" ]
[((198, 214), 'curses.initscr', 'curses.initscr', ([], {}), '()\n', (212, 214), False, 'import curses\n'), ((536, 551), 'curses.endwin', 'curses.endwin', ([], {}), '()\n', (549, 551), False, 'import curses\n')]
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager from config import config_options from flask_bootstrap import Bootstrap db = SQLAlchemy() migrate = Migrate() login = LoginManager() login.login_view = 'auth.login' login.login_message...
[ "flask_login.LoginManager", "flask.Flask", "flask_migrate.Migrate", "flask_bootstrap.Bootstrap", "flask_sqlalchemy.SQLAlchemy" ]
[((213, 225), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (223, 225), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((236, 245), 'flask_migrate.Migrate', 'Migrate', ([], {}), '()\n', (243, 245), False, 'from flask_migrate import Migrate\n'), ((254, 268), 'flask_login.LoginManager', 'LoginManag...
# Copyright 2004-2008 <NAME>. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import os import compound import code_creator import ctypes_formatter import declaration_based from pygccxml import declaratio...
[ "os.linesep.join", "ctypes_formatter.as_ctype", "code_creator.code_creator_t.__init__", "declaration_based.declaration_based_t.__init__", "pygccxml.declarations.is_void" ]
[((975, 1017), 'code_creator.code_creator_t.__init__', 'code_creator.code_creator_t.__init__', (['self'], {}), '(self)\n', (1011, 1017), False, 'import code_creator\n'), ((1027, 1087), 'declaration_based.declaration_based_t.__init__', 'declaration_based.declaration_based_t.__init__', (['self', 'class_'], {}), '(self, c...
"""evaluate.py This script is used to evalute trained ImageNet models. """ import sys import argparse import tensorflow as tf from config import config from utils.utils import config_keras_backend, clear_keras_session from utils.dataset import get_dataset from models.adamw import AdamW DESCRIPTION = """For examp...
[ "utils.utils.config_keras_backend", "argparse.ArgumentParser", "utils.utils.clear_keras_session", "tensorflow.keras.models.load_model", "sys.exit", "utils.dataset.get_dataset" ]
[((524, 572), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'DESCRIPTION'}), '(description=DESCRIPTION)\n', (547, 572), False, 'import argparse\n'), ((886, 908), 'utils.utils.config_keras_backend', 'config_keras_backend', ([], {}), '()\n', (906, 908), False, 'from utils.utils import config_...
# -*- coding: UTF-8 -*- from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep from Adafruit_LED_Backpack.HT16K33 import HT16K33 # Digit value to bitmask map. # REPLACEMENT = 0x00 DIGIT_VALUES = { ' ': 0x00, '!': 0x82, '"': 0x21, '\'': 0x02, '{': 0x39, '...
[ "time.sleep" ]
[((3704, 3712), 'time.sleep', 'sleep', (['(2)'], {}), '(2)\n', (3709, 3712), False, 'from time import sleep\n'), ((3802, 3810), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (3807, 3810), False, 'from time import sleep\n'), ((3987, 3997), 'time.sleep', 'sleep', (['(0.1)'], {}), '(0.1)\n', (3992, 3997), False, 'from ti...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
[ "json.dumps" ]
[((1636, 1768), 'json.dumps', 'json.dumps', (["{'bkdata_authentication_method': 'inner', 'bk_app_code': APP_ID,\n 'bk_app_secret': APP_TOKEN, 'bk_username': 'admin'}"], {}), "({'bkdata_authentication_method': 'inner', 'bk_app_code': APP_ID,\n 'bk_app_secret': APP_TOKEN, 'bk_username': 'admin'})\n", (1646, 1768), ...
import numpy as np import cv2 import operator import numpy as np from matplotlib import pyplot as plt def plot_many_images(images, titles, rows=1, columns=2): """Plots each image in a given list as a grid structure. using Matplotlib.""" for i, image in enumerate(images): plt.subplot(rows, columns, i+1) plt.imsh...
[ "numpy.sqrt", "numpy.array", "operator.itemgetter", "matplotlib.pyplot.imshow", "cv2.__version__.split", "numpy.mean", "matplotlib.pyplot.yticks", "numpy.concatenate", "cv2.drawContours", "matplotlib.pyplot.xticks", "cv2.getPerspectiveTransform", "cv2.floodFill", "cv2.cvtColor", "matplotli...
[((414, 424), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (422, 424), True, 'from matplotlib import pyplot as plt\n'), ((2470, 2524), 'cv2.drawContours', 'cv2.drawContours', (['img', 'contours', '(-1)', 'colour', 'thickness'], {}), '(img, contours, -1, colour, thickness)\n', (2486, 2524), False, 'import cv2...
from ..tools.velocity_embedding import quiver_autoscale, velocity_embedding from ..tools.utils import groups_to_bool from .utils import * from .scatter import scatter from .docs import doc_scatter, doc_params from sklearn.neighbors import NearestNeighbors from scipy.stats import norm as normal from matplotlib import r...
[ "numpy.mean", "numpy.abs", "numpy.unique", "matplotlib.pyplot.plot", "numpy.max", "numpy.array", "matplotlib.pyplot.figure", "scipy.stats.norm.pdf", "numpy.vstack", "sklearn.neighbors.NearestNeighbors", "numpy.min", "numpy.percentile", "numpy.meshgrid", "numpy.maximum", "matplotlib.pyplo...
[((1146, 1163), 'numpy.meshgrid', 'np.meshgrid', (['*grs'], {}), '(*grs)\n', (1157, 1163), True, 'import numpy as np\n'), ((1328, 1380), 'sklearn.neighbors.NearestNeighbors', 'NearestNeighbors', ([], {'n_neighbors': 'n_neighbors', 'n_jobs': '(-1)'}), '(n_neighbors=n_neighbors, n_jobs=-1)\n', (1344, 1380), False, 'from ...
from django.conf.urls import url from timepiece.entries import views urlpatterns = [ url(r'^time/$', views.Dashboard.as_view(), name='dashboard'), # Active entry url(r'^entry/clock_in/$', views.clock_in, name='clock_in'), url(r'^entry/clock_out/$', views.clock_...
[ "timepiece.entries.views.TodoAdminListView.as_view", "django.conf.urls.url", "timepiece.entries.views.TodoCompletedListView.as_view", "timepiece.entries.views.Dashboard.as_view" ]
[((193, 250), 'django.conf.urls.url', 'url', (['"""^entry/clock_in/$"""', 'views.clock_in'], {'name': '"""clock_in"""'}), "('^entry/clock_in/$', views.clock_in, name='clock_in')\n", (196, 250), False, 'from django.conf.urls import url\n'), ((273, 333), 'django.conf.urls.url', 'url', (['"""^entry/clock_out/$"""', 'views...
import json import sys import datetime from os import getenv from dotenv import load_dotenv from notion import NotionHelper from rabbit import RabbitHelper load_dotenv() notion_helper = NotionHelper() # get discord id to notion id list result = notion_helper.get_discord_list(getenv('NOTION_ID_LIST')) discord_to_noti...
[ "rabbit.RabbitHelper", "os.getenv", "notion.NotionHelper", "dotenv.load_dotenv", "json.JSONEncoder", "sys.exit", "datetime.date.today" ]
[((158, 171), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (169, 171), False, 'from dotenv import load_dotenv\n'), ((189, 203), 'notion.NotionHelper', 'NotionHelper', ([], {}), '()\n', (201, 203), False, 'from notion import NotionHelper\n'), ((517, 531), 'rabbit.RabbitHelper', 'RabbitHelper', ([], {}), '()\n'...
import os from django.db import models from django.contrib.auth.models import User from django.core.validators import MinValueValidator, MaxValueValidator from ecantina_project import constants from api.models.ec.organization import Organization from api.models.ec.store import Store from api.models.ec.employee import E...
[ "django.core.validators.MinValueValidator", "django.core.validators.MaxValueValidator", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.ImageField", "django.db.models.AutoField", "django.db.models.Dat...
[((1108, 1142), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (1124, 1142), False, 'from django.db import models\n'), ((1409, 1479), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(511)', 'null': '(True)', 'blank': '(True)', 'db_index'...
import tkinter from tkinter import ttk import random import time import tkinter.messagebox class SortingVisualizer: """ Main GUI """ def __init__(self, main): """ Init GUI :param main: tkinter.Tk() """ self.FINISHED_SORTING = False self.box_color = "#...
[ "tkinter.messagebox.showwarning", "tkinter.ttk.Separator", "tkinter.Button", "time.sleep", "tkinter.Canvas", "tkinter.StringVar", "tkinter.Tk", "tkinter.Scrollbar", "tkinter.Label", "tkinter.PhotoImage", "tkinter.messagebox.showinfo", "tkinter.Frame", "random.randint" ]
[((24122, 24134), 'tkinter.Tk', 'tkinter.Tk', ([], {}), '()\n', (24132, 24134), False, 'import tkinter\n'), ((1018, 1082), 'tkinter.PhotoImage', 'tkinter.PhotoImage', ([], {'file': '"""icons/icons8-ascending-sorting-48.png"""'}), "(file='icons/icons8-ascending-sorting-48.png')\n", (1036, 1082), False, 'import tkinter\n...
import ezdxf from ezdxf.tools.standards import linetypes data = { 'circles': ( (5, (13, 2)), (19, (15, 15)), (19, (12, 4)), (8, (8, 13)), (3, (29, 29)), (2, (8, 11)), (1, (2, 6)), ), 'lines': ( ((12, 3), (18, 2), 'CONTINUOUS', 'B'), ((...
[ "ezdxf.tools.standards.linetypes", "ezdxf.new" ]
[((596, 615), 'ezdxf.new', 'ezdxf.new', (['"""AC1027"""'], {}), "('AC1027')\n", (605, 615), False, 'import ezdxf\n'), ((683, 694), 'ezdxf.tools.standards.linetypes', 'linetypes', ([], {}), '()\n', (692, 694), False, 'from ezdxf.tools.standards import linetypes\n')]
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ "traceback.format_exc", "google.appengine.ext.db.TextProperty", "google.appengine.ext.db.IntegerProperty", "json.dumps", "google.appengine.ext.deferred.defer", "logging.info", "google.appengine.ext.db.DateTimeProperty", "google.appengine.api.namespace_manager.get_namespace", "google.appengine.ext.db...
[((2920, 2953), 'google.appengine.ext.db.DateTimeProperty', 'db.DateTimeProperty', ([], {'indexed': '(True)'}), '(indexed=True)\n', (2939, 2953), False, 'from google.appengine.ext import db\n'), ((2979, 3012), 'google.appengine.ext.db.IntegerProperty', 'db.IntegerProperty', ([], {'indexed': '(False)'}), '(indexed=False...
import numpy as np np.random.seed(0) import torch torch.manual_seed(0) from torch.utils.data import Dataset, DataLoader, ConcatDataset, RandomSampler import torchvision import imageio import importlib import random import glob import os import transforms_3d class patch_DS(Dataset): """Implementation of torch...
[ "torch.utils.data.ConcatDataset", "torch.manual_seed", "numpy.mean", "importlib.import_module", "numpy.std", "random.seed", "numpy.max", "numpy.array", "numpy.zeros", "numpy.random.seed", "numpy.min", "imageio.imread", "torchvision.transforms.ToTensor", "transforms_3d.get_transformer", "...
[((19, 36), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (33, 36), True, 'import numpy as np\n'), ((50, 70), 'torch.manual_seed', 'torch.manual_seed', (['(0)'], {}), '(0)\n', (67, 70), False, 'import torch\n'), ((8191, 8228), 'importlib.import_module', 'importlib.import_module', (['"""dataloader"""'],...
import numpy as np import pandas as pd import pytest from pandas.testing import assert_index_equal from evalml.pipelines import RegressionPipeline def test_regression_init(): clf = RegressionPipeline( component_graph=["Imputer", "One Hot Encoder", "Random Forest Regressor"] ) assert clf.parameter...
[ "pandas.Series", "evalml.pipelines.RegressionPipeline", "numpy.arange", "pandas.testing.assert_index_equal", "pytest.mark.parametrize", "pytest.raises", "pandas.date_range" ]
[((1943, 2013), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""target_type"""', "['category', 'string', 'bool']"], {}), "('target_type', ['category', 'string', 'bool'])\n", (1966, 2013), False, 'import pytest\n'), ((188, 285), 'evalml.pipelines.RegressionPipeline', 'RegressionPipeline', ([], {'component_gr...
from io import BytesIO import PIL.Image import PIL.ImageColor import PIL.ImageDraw import zeit.cms.browser.view import zeit.content.image.interfaces import zeit.imp.mask def parse_filter_args(request, crop): for key, value in request.form.items(): if key.startswith('filter.'): filter_type = ke...
[ "io.BytesIO" ]
[((1064, 1073), 'io.BytesIO', 'BytesIO', ([], {}), '()\n', (1071, 1073), False, 'from io import BytesIO\n')]