code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack, LLC # Copyright 2013 Mirantis, 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 # ...
[ "os.path.realpath", "fuel_health.common.utils.data_utils.rand_name", "logging.getLogger" ]
[((881, 908), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (898, 908), False, 'import logging\n'), ((2553, 2576), 'fuel_health.common.utils.data_utils.rand_name', 'rand_name', (['"""ost1_test-"""'], {}), "('ost1_test-')\n", (2562, 2576), False, 'from fuel_health.common.utils.data_utils ...
#!/usr/bin/python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
[ "cairis.mio.ModelExport.exportUserGoalWorkbook", "argparse.ArgumentParser" ]
[((1013, 1177), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Computer Aided Integration of Requirements and Information Security - Persona characteristics To Workbook converter"""'}), "(description=\n 'Computer Aided Integration of Requirements and Information Security - Persona cha...
import argparse import subprocess from pprint import pprint from collections import namedtuple run = subprocess.check_output srun = run CPUInfo = namedtuple('CPUInfo', ['processor', 'physical_id', 'core_id']) def get_cpus(): with open('/proc/cpuinfo', 'r') as f: raw_out = f.read() relevant_lines = [...
[ "collections.namedtuple", "argparse.ArgumentParser" ]
[((148, 210), 'collections.namedtuple', 'namedtuple', (['"""CPUInfo"""', "['processor', 'physical_id', 'core_id']"], {}), "('CPUInfo', ['processor', 'physical_id', 'core_id'])\n", (158, 210), False, 'from collections import namedtuple\n'), ((4097, 4170), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'desc...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from cms.models.fields import PlaceholderField from parler.managers import TranslatableManager from shop.money.fields import MoneyField from .product import Product cla...
[ "django.utils.translation.ugettext_lazy", "cms.models.fields.PlaceholderField", "parler.managers.TranslatableManager" ]
[((756, 793), 'cms.models.fields.PlaceholderField', 'PlaceholderField', (['"""Commodity Details"""'], {}), "('Commodity Details')\n", (772, 793), False, 'from cms.models.fields import PlaceholderField\n'), ((898, 919), 'parler.managers.TranslatableManager', 'TranslatableManager', ([], {}), '()\n', (917, 919), False, 'f...
from flask import Flask, request, jsonify from flask import abort, make_response, url_for from flask.ext.httpauth import HTTPBasicAuth app = Flask(__name__) auth = HTTPBasicAuth() @auth.get_password def get_password(username): if username == 'promise': return '<PASSWORD>' return None orders = [ {...
[ "flask.ext.httpauth.HTTPBasicAuth", "flask.Flask", "flask.abort", "flask.jsonify", "flask.url_for", "flask.request.json.get" ]
[((142, 157), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (147, 157), False, 'from flask import Flask, request, jsonify\n'), ((165, 180), 'flask.ext.httpauth.HTTPBasicAuth', 'HTTPBasicAuth', ([], {}), '()\n', (178, 180), False, 'from flask.ext.httpauth import HTTPBasicAuth\n'), ((1893, 1923), 'flask.jso...
#!/usr/bin/env python import random import string from datetime import datetime import json def generate_id(length=16): """generate random IDs""" return ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(length)) class DateTimeEncoder(json.JSONEncoder): """datetime support in j...
[ "datetime.datetime.strptime", "random.choice", "json.JSONDecoder.__init__" ]
[((671, 744), 'json.JSONDecoder.__init__', 'json.JSONDecoder.__init__', (['self', '*args'], {'object_hook': 'self.decoder'}), '(self, *args, object_hook=self.decoder, **kargs)\n', (696, 744), False, 'import json\n'), ((809, 850), 'datetime.datetime.strptime', 'datetime.strptime', (['d', '"""%Y-%m-%dT%H:%M:%S"""'], {}),...
import numpy as _np import pandas as _pd import matplotlib.pyplot as _plt from src.plot_helpers.matplotlib_helpers\ import range_axis_ticks as _range_axis_ticks def plot_value_by_element(df, xaxis, element_col, value_col, ax, cmap, alpha=1.0, lw=1.0, x_inte...
[ "numpy.zeros_like", "matplotlib.pyplot.get_cmap", "numpy.ones", "src.plot_helpers.matplotlib_helpers.range_axis_ticks", "pandas.Series" ]
[((7095, 7114), 'matplotlib.pyplot.get_cmap', '_plt.get_cmap', (['cmap'], {}), '(cmap)\n', (7108, 7114), True, 'import matplotlib.pyplot as _plt\n'), ((1726, 1776), 'src.plot_helpers.matplotlib_helpers.range_axis_ticks', '_range_axis_ticks', (['ax', '"""x"""', 'x_intervals'], {'fmt': 'x_fmt'}), "(ax, 'x', x_intervals, ...
import torch from torch import distributed from mpi4py import MPI import socket import os def init_process_group(backend): comm = MPI.COMM_WORLD world_size = comm.Get_size() rank = comm.Get_rank() info = dict() if rank == 0: host = socket.gethostname() address = socket.gethostbyn...
[ "socket.gethostname", "torch.distributed.init_process_group", "os.environ.update", "socket.gethostbyname" ]
[((505, 528), 'os.environ.update', 'os.environ.update', (['info'], {}), '(info)\n', (522, 528), False, 'import os\n'), ((534, 581), 'torch.distributed.init_process_group', 'distributed.init_process_group', ([], {'backend': 'backend'}), '(backend=backend)\n', (564, 581), False, 'from torch import distributed\n'), ((264,...
import argparse import logging import os import sys import textwrap from . import __version__ from .config import ( get_bustools_binary_path, get_kallisto_binary_path, is_dry, PACKAGE_PATH, REFERENCES_MAPPING, set_dry, TECHNOLOGIES, TEMP_DIR, ) from .constants import INFO_FILENAME from ...
[ "textwrap.fill", "argparse.ArgumentParser", "logging.basicConfig", "logging.disable", "sys.argv.index", "sys.exit", "os.path.join", "logging.getLogger" ]
[((1334, 1345), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1342, 1345), False, 'import sys\n'), ((2423, 2434), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (2431, 2434), False, 'import sys\n'), ((14419, 14458), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'add_help': '(False)'}), '(add_help=Fals...
""" Testing code to check time checking mechanisms """ import time import unittest import sys from Session import Session def test_timeBeforeSession(): TEST_TIME = time.time() time.sleep(1) s = Session.createSession() s.endSession() assert s.isSessionWithin(TEST_TIME) == True def test_ti...
[ "time.sleep", "Session.Session.createSession", "time.time" ]
[((175, 186), 'time.time', 'time.time', ([], {}), '()\n', (184, 186), False, 'import time\n'), ((191, 204), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (201, 204), False, 'import time\n'), ((214, 237), 'Session.Session.createSession', 'Session.createSession', ([], {}), '()\n', (235, 237), False, 'from Session i...
# Generated from antlr4-python3-runtime-4.7.2/src/autogen/Cymbol.g4 by ANTLR 4.7.2 # encoding: utf-8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3#") ...
[ "io.StringIO", "antlr4.error.Errors.FailedPredicateException" ]
[((218, 228), 'io.StringIO', 'StringIO', ([], {}), '()\n', (226, 228), False, 'from io import StringIO\n'), ((44187, 44249), 'antlr4.error.Errors.FailedPredicateException', 'FailedPredicateException', (['self', '"""self.precpred(self._ctx, 10)"""'], {}), "(self, 'self.precpred(self._ctx, 10)')\n", (44211, 44249), False...
import torch import torch.nn.functional as F from torch import nn # palabra anterior o <SOS> --> # [features_imagen] --> attention --> decoder --> [0,0......,1,0,0,0,0,0....0] class Decoder(nn.Module): def __init__(self, image_features_dim,vocab_size, embed_size, hidden_size, num_layers=1):...
[ "torch.nn.GRU", "torch.nn.ReLU", "torch.nn.Embedding", "torch.cat", "torch.nn.Linear", "torch.zeros" ]
[((382, 418), 'torch.nn.Embedding', 'nn.Embedding', (['vocab_size', 'embed_size'], {}), '(vocab_size, embed_size)\n', (394, 418), False, 'from torch import nn\n'), ((641, 728), 'torch.nn.GRU', 'nn.GRU', (['(image_features_dim + embed_size)', 'hidden_size', 'num_layers'], {'batch_first': '(False)'}), '(image_features_di...
import re from resources.element import ShallowQuestion from db.connection import session from db.entities import * from datetime import datetime import logging import os if not os.path.exists('logs'): os.makedirs('logs') logger = logging.getLogger('logs/sql_manager.log') logger.setLevel(logging.DEBUG) # Create F...
[ "os.makedirs", "logging.FileHandler", "os.path.exists", "db.connection.session.query", "logging.Formatter", "datetime.datetime.strptime", "db.connection.session.commit", "re.findall", "db.connection.session.add", "logging.getLogger" ]
[((236, 277), 'logging.getLogger', 'logging.getLogger', (['"""logs/sql_manager.log"""'], {}), "('logs/sql_manager.log')\n", (253, 277), False, 'import logging\n'), ((341, 461), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s-%(levelname)s-FILE:%(filename)s-FUNC:%(funcName)s-LINE:%(lineno)d-%(message)s"""'],...
#!/usr/bin/env python3 import pandas as pd import sklearn.neighbors as neighbors from sklearn.neighbors import KNeighborsClassifier import sklearn.metrics as metrics from sklearn.metrics import accuracy_score from sklearn.model_selection import train_test_split from sklearn.svm import SVC from sklearn.ensemble import R...
[ "pandas.DataFrame", "sklearn.ensemble.RandomForestClassifier", "pandas.read_csv", "pandas.concat" ]
[((429, 443), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (441, 443), True, 'import pandas as pd\n'), ((700, 714), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (712, 714), True, 'import pandas as pd\n'), ((877, 944), 'pandas.read_csv', 'pd.read_csv', (['sys.argv[3]'], {'delim_whitespace': '(True)', '...
""" AwesomeTkinter, a new tkinter widgets design using custom styles and images :copyright: (c) 2020-2021 by <NAME>. """ import tkinter as tk from tkinter import ttk from .utils import * from .config import * from .images import * from .scrollbar import SimpleScrollbar class ScrollableFrame(tk.Frame): ...
[ "tkinter.Canvas", "tkinter.Frame.__init__", "tkinter.ttk.Style", "tkinter.ttk.Frame.__init__", "tkinter.Frame" ]
[((1591, 1614), 'tkinter.Frame', 'tk.Frame', (['parent'], {'bg': 'bg'}), '(parent, bg=bg)\n', (1599, 1614), True, 'import tkinter as tk\n'), ((1662, 1741), 'tkinter.Canvas', 'tk.Canvas', (['self.outer_frame'], {'borderwidth': '(0)', 'highlightthickness': '(0)', 'background': 'bg'}), '(self.outer_frame, borderwidth=0, h...
# Copyright (c) 2014-2015 SwiperProxy Team # # 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, publis...
[ "Util.rewrite_URL", "re.sub" ]
[((2434, 2505), 're.sub', 're.sub', (['pattern', 'self.rewrite_re', 'self.input_buffer', '(re.I | re.M | re.S)'], {}), '(pattern, self.rewrite_re, self.input_buffer, re.I | re.M | re.S)\n', (2440, 2505), False, 'import re\n'), ((1798, 1876), 'Util.rewrite_URL', 'Util.rewrite_URL', (["(scheme + '//' + url)", 'self.confi...
from setuptools import setup VERSION = '0.1' DESCRIPTION = 'get teh string ' LONG_DESCRIPTION = 'this is my first pacakage' # Setting up setup( name="hello_World", version=VERSION, author='Udhay', author_email='<EMAIL>', description=DESCRIPTION, long_description_content_type="text/markdown", ...
[ "setuptools.setup" ]
[((139, 739), 'setuptools.setup', 'setup', ([], {'name': '"""hello_World"""', 'version': 'VERSION', 'author': '"""Udhay"""', 'author_email': '"""<EMAIL>"""', 'description': 'DESCRIPTION', 'long_description_content_type': '"""text/markdown"""', 'long_description': 'LONG_DESCRIPTION', 'url': '"""ssh://git@github.com:Udha...
# Title: 연산자 끼워넣기 # Link: https://www.acmicpc.net/problem/14888 import sys from itertools import permutations from collections import defaultdict from copy import deepcopy sys.setrecursionlimit(10 ** 6) read_single_int = lambda: int(sys.stdin.readline().strip()) read_list_int = lambda: list(map(int, sys...
[ "collections.defaultdict", "itertools.permutations", "sys.setrecursionlimit", "sys.stdin.readline" ]
[((182, 212), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 6)'], {}), '(10 ** 6)\n', (203, 212), False, 'import sys\n'), ((475, 502), 'collections.defaultdict', 'defaultdict', (['(lambda : False)'], {}), '(lambda : False)\n', (486, 502), False, 'from collections import defaultdict\n'), ((591, 614), 'iter...
# -*- coding=utf-8 -*- import os, sys sys.path.append(os.getcwd()) # 告诉pytest运行前先检索当前路径 from Basic.Init_Driver import init_hlj_driver from Basic.read_data import Read_Data from Page.search_page import Search_Page import pytest import allure """ allure generate report/ -o report/html """ def packag...
[ "Basic.read_data.Read_Data", "os.getcwd", "allure.attach", "allure.step", "Page.search_page.Search_Page", "allure.severity", "Basic.Init_Driver.init_hlj_driver" ]
[((58, 69), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (67, 69), False, 'import os, sys\n'), ((1372, 1419), 'allure.severity', 'allure.severity', (['allure.severity_level.CRITICAL'], {}), '(allure.severity_level.CRITICAL)\n', (1387, 1419), False, 'import allure\n'), ((1426, 1453), 'allure.step', 'allure.step', (['"""主...
"""Main module.""" from itertools import chain import anytree import nanoid import parse NANOID_ALPHABET = '-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' NANOID_SIZE = 10 STEM_TEMPLATES = ('{group:l}_{index:d}__{name:w}', '{group:l}__{name:w}', '{index:d}__{name:w}', '{name:w}')...
[ "anytree.Node", "anytree.PreOrderIter", "nanoid.generate", "anytree.search.findall", "itertools.chain", "parse.parse" ]
[((1334, 1379), 'nanoid.generate', 'nanoid.generate', (['NANOID_ALPHABET', 'NANOID_SIZE'], {}), '(NANOID_ALPHABET, NANOID_SIZE)\n', (1349, 1379), False, 'import nanoid\n'), ((2695, 2764), 'anytree.search.findall', 'anytree.search.findall', (['root'], {'filter_': '(lambda node: node.name in prune)'}), '(root, filter_=la...
""" This files only purpose is to pretty print the given map. Input to printer is a map, the path the robot took and a planned path if there is no path the robot took or planned path, they args can be left printer(map, rob_path, planned_path) result is nothing. is saves the file in this folder. the name is by defau...
[ "PIL.Image.fromarray", "numpy.zeros" ]
[((600, 636), 'numpy.zeros', 'np.zeros', (['[x_range + 1, y_range + 1]'], {}), '([x_range + 1, y_range + 1])\n', (608, 636), True, 'import numpy as np\n'), ((831, 851), 'PIL.Image.fromarray', 'Image.fromarray', (['arr'], {}), '(arr)\n', (846, 851), False, 'from PIL import Image\n')]
import torch import torch.nn as nn import lrp_framework.lrp as lrp from utils import calculate_linear_lrp_fast class LRP_Classifier(nn.Module): def __init__(self, num_classes=1000) -> None: super(LRP_Classifier,self).__init__() #just the same structure as AlexNet, for easy import #using ...
[ "torch.flatten", "torch.nn.AdaptiveAvgPool2d", "torch.nn.Dropout", "torch.nn.ReLU", "lrp_framework.lrp.Linear", "lrp_framework.lrp.Conv2d", "torch.nn.MaxPool2d" ]
[((1164, 1192), 'torch.nn.AdaptiveAvgPool2d', 'nn.AdaptiveAvgPool2d', (['(6, 6)'], {}), '((6, 6))\n', (1184, 1192), True, 'import torch.nn as nn\n'), ((1760, 1779), 'torch.flatten', 'torch.flatten', (['x', '(1)'], {}), '(x, 1)\n', (1773, 1779), False, 'import torch\n'), ((456, 510), 'lrp_framework.lrp.Conv2d', 'lrp.Con...
import re from pathlib import Path from typing import Dict, List, Tuple from pvi._produce.asyn import AsynParameter, AsynProducer from pvi.device import Grid, Group from ._asyn_convert import ( Action, AsynRecord, Parameter, Readback, RecordError, SettingPair, ) OVERRIDE_DESC = "# Overriding ...
[ "pvi.device.Grid", "re.findall", "re.compile" ]
[((3825, 3883), 're.compile', 're.compile', (['"""^[^#\\\\n]*record\\\\([^{]*{[^}]*}"""', 're.MULTILINE'], {}), "('^[^#\\\\n]*record\\\\([^{]*{[^}]*}', re.MULTILINE)\n", (3835, 3883), False, 'import re\n'), ((3898, 3938), 're.findall', 're.findall', (['record_extractor', 'self._text'], {}), '(record_extractor, self._te...
from queue import Queue class Graph: def __init__(self): self._vertices: list = [] self._colors: dict = {} self._adjacency_matrix: dict = {} def add_vertex(self, label: str): self._vertices.append(label) self._colors[label] = None self._adjacency_matrix[label]:...
[ "queue.Queue" ]
[((706, 713), 'queue.Queue', 'Queue', ([], {}), '()\n', (711, 713), False, 'from queue import Queue\n')]
# Copyright (c) Facebook, Inc. and its affiliates. import random from typing import Optional, Tuple import torch from densepose.converters import ToChartResultConverterWithConfidences from .densepose_base import DensePoseBaseSampler class DensePoseConfidenceBasedSampler(DensePoseBaseSampler): """ Samples D...
[ "torch.sort" ]
[((3335, 3356), 'torch.sort', 'torch.sort', (['values[2]'], {}), '(values[2])\n', (3345, 3356), False, 'import torch\n')]
import logging import multiprocessing import os import sys import flask # flask app for serving predictions app = flask.Flask(__name__) logging.basicConfig(format='%(asctime)s:%(levelname)s:%(message)s', level=logging.INFO) # ============================== # # REQUIRED ENVIRONMENT VARIABLES # # ====================...
[ "logging.error", "model.load_ctx", "logging.basicConfig", "flask.Flask", "model.predict", "flask.request.get_data", "flask.jsonify", "flask.Response", "sys.exit", "multiprocessing.cpu_count" ]
[((116, 137), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (127, 137), False, 'import flask\n'), ((139, 231), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s:%(levelname)s:%(message)s"""', 'level': 'logging.INFO'}), "(format='%(asctime)s:%(levelname)s:%(message)s', lev...
""" Search indexing classes to index into Elasticsearch. Django settings that should be defined: `ES_HOSTS`: A list of hosts where Elasticsearch lives. E.g. ['192.168.1.1:9200', '192.168.2.1:9200'] `ES_DEFAULT_NUM_REPLICAS`: An integer of the number of replicas. `ES_DEFAULT_NUM_SHARDS`: ...
[ "elasticsearch.Elasticsearch", "django.utils.timezone.now", "elasticsearch.helpers.bulk_index" ]
[((942, 974), 'elasticsearch.Elasticsearch', 'Elasticsearch', (['settings.ES_HOSTS'], {}), '(settings.ES_HOSTS)\n', (955, 974), False, 'from elasticsearch import Elasticsearch, exceptions\n'), ((4378, 4426), 'elasticsearch.helpers.bulk_index', 'bulk_index', (['self.es', 'docs'], {'chunk_size': 'chunk_size'}), '(self.es...
import argparse import os from omrdatasettools import Downloader, OmrDataset from MeasureDetector.ImageConverter import ImageConverter from MeasureDetector.ImageColorInverter import ImageColorInverter if __name__ == "__main__": parser = argparse.ArgumentParser(description='Downloads and prepares the MUSCIMA++ da...
[ "os.path.join", "argparse.ArgumentParser", "MeasureDetector.ImageColorInverter.ImageColorInverter", "omrdatasettools.Downloader", "MeasureDetector.ImageConverter.ImageConverter" ]
[((244, 332), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Downloads and prepares the MUSCIMA++ dataset"""'}), "(description=\n 'Downloads and prepares the MUSCIMA++ dataset')\n", (267, 332), False, 'import argparse\n'), ((551, 602), 'os.path.join', 'os.path.join', (['flags.dataset_...
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager # Enable foreign key support in sqlite # from sqlalchemy.engine import Engine from sqlalchemy import event @event.listens_for(Engine, "connect") def set_sqli...
[ "flask.Flask", "flask_sqlalchemy.SQLAlchemy", "flask_migrate.Migrate", "flask_login.LoginManager", "sqlalchemy.event.listens_for" ]
[((271, 307), 'sqlalchemy.event.listens_for', 'event.listens_for', (['Engine', '"""connect"""'], {}), "(Engine, 'connect')\n", (288, 307), False, 'from sqlalchemy import event\n'), ((531, 546), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (536, 546), False, 'from flask import Flask\n'), ((751, 766), 'fla...
import abc from itertools import chain class RollingObject(metaclass=abc.ABCMeta): """ Baseclass for rolling iterator objects. The __new__ method here sets appropriate magic methods for the class (__iter__ and __init__) depending on window_type. All iteration logic is handled in this class. ...
[ "itertools.chain" ]
[((3534, 3565), 'itertools.chain', 'chain', (['self._iterator', 'iterable'], {}), '(self._iterator, iterable)\n', (3539, 3565), False, 'from itertools import chain\n')]
from __future__ import annotations from typing import Optional, TYPE_CHECKING, Union from pyspark.sql.types import StructType, DataType from spark_auto_mapper_fhir.fhir_types.list import FhirList from spark_auto_mapper_fhir.fhir_types.string import FhirString from spark_auto_mapper_fhir.fhir_types.uri import FhirUri ...
[ "spark_fhir_schemas.r4.complex_types.meta.MetaSchema.get_schema" ]
[((5004, 5062), 'spark_fhir_schemas.r4.complex_types.meta.MetaSchema.get_schema', 'MetaSchema.get_schema', ([], {'include_extension': 'include_extension'}), '(include_extension=include_extension)\n', (5025, 5062), False, 'from spark_fhir_schemas.r4.complex_types.meta import MetaSchema\n')]
import os from extract.readers import CSVReader, JSONReader, XLSReader, Reader from typing import Type class Extractor: path: str data: list _readers: dict[str, Type[Reader]] default_path = os.path.join(os.getcwd(), 'input_files') def __init__(self, path: str = default_path): self.path = ...
[ "os.getcwd", "os.path.splitext", "os.path.join", "os.listdir" ]
[((221, 232), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (230, 232), False, 'import os\n'), ((581, 597), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (591, 597), False, 'import os\n'), ((772, 794), 'os.path.splitext', 'os.path.splitext', (['file'], {}), '(file)\n', (788, 794), False, 'import os\n'), ((814, ...
from django.shortcuts import render from django.http import HttpResponseForbidden # Create your views here. def default(request): return render(request, 'basicInfo/basic_homepage.html', {}) def signup(request): return render(request, "basicInfo/basic_signup.html", {}) def login(request): ...
[ "django.shortcuts.render", "django.http.HttpResponseForbidden" ]
[((151, 203), 'django.shortcuts.render', 'render', (['request', '"""basicInfo/basic_homepage.html"""', '{}'], {}), "(request, 'basicInfo/basic_homepage.html', {})\n", (157, 203), False, 'from django.shortcuts import render\n'), ((242, 292), 'django.shortcuts.render', 'render', (['request', '"""basicInfo/basic_signup.ht...
"""Test pydeCONZ session class. pytest --cov-report term-missing --cov=pydeconz tests/test_init.py """ import asyncio from unittest.mock import Mock, patch from asynctest import CoroutineMock import pytest import aiohttp from pydeconz import DeconzSession from pydeconz.sensor import GenericStatus API_KEY = "1234567...
[ "pydeconz.DeconzSession", "asynctest.CoroutineMock", "unittest.mock.Mock" ]
[((456, 462), 'unittest.mock.Mock', 'Mock', ([], {}), '()\n', (460, 462), False, 'from unittest.mock import Mock, patch\n'), ((474, 515), 'pydeconz.DeconzSession', 'DeconzSession', (['session', 'IP', 'PORT', 'API_KEY'], {}), '(session, IP, PORT, API_KEY)\n', (487, 515), False, 'from pydeconz import DeconzSession\n'), (...
# Yuio project, MIT licence. # # https://github.com/taminomara/yuio/ # # You're free to copy this file to your project and edit it for your needs, # just keep this copyright line please :3 """ This module provides basic functionality to interact with git. It comes in handy when writing deployment scripts. Interactin...
[ "dataclasses.field", "pathlib.Path", "re.match" ]
[((9792, 9831), 'dataclasses.field', 'dataclasses.field', ([], {'default_factory': 'list'}), '(default_factory=list)\n', (9809, 9831), False, 'import dataclasses\n'), ((1521, 1539), 'pathlib.Path', 'pathlib.Path', (['path'], {}), '(path)\n', (1533, 1539), False, 'import pathlib\n'), ((3145, 3187), 're.match', 're.match...
from bs4 import BeautifulSoup import requests """ get the html for my personal website """ markup = requests.get('http://xuguanzhou.com') soup = BeautifulSoup(markup.text,"html.parser") print(type(soup)) print(soup.prettify())
[ "bs4.BeautifulSoup", "requests.get" ]
[((102, 139), 'requests.get', 'requests.get', (['"""http://xuguanzhou.com"""'], {}), "('http://xuguanzhou.com')\n", (114, 139), False, 'import requests\n'), ((148, 189), 'bs4.BeautifulSoup', 'BeautifulSoup', (['markup.text', '"""html.parser"""'], {}), "(markup.text, 'html.parser')\n", (161, 189), False, 'from bs4 impor...
# -------------- import pandas as pd import numpy as np import matplotlib.pyplot as plt def visual_summary(type_, df, col): """Summarize the Data using Visual Method. This function accepts the type of visualization, the data frame and the column to be summarized. It displays the chart based on the gi...
[ "pandas.read_csv", "matplotlib.pyplot.scatter", "matplotlib.pyplot.show" ]
[((6758, 6775), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (6769, 6775), True, 'import pandas as pd\n'), ((561, 571), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (569, 571), True, 'import matplotlib.pyplot as plt\n'), ((609, 644), 'matplotlib.pyplot.scatter', 'plt.scatter', (['df[col[0]]'...
#%% Import import sys import re import math import string import time from pathlib import Path import numpy as np import pandas as pd import string import pickle from scipy.sparse import hstack from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.ensemble import RandomForestClassifier from sklea...
[ "pandas.DataFrame", "numpy.zeros", "time.time", "numpy.argsort", "spacy.load", "pathlib.Path", "pickle.load", "scipy.sparse.hstack", "gensim.models.KeyedVectors.load_word2vec_format", "numpy.matmul", "re.sub", "pandas.concat", "nltk.tokenize.word_tokenize" ]
[((644, 655), 'time.time', 'time.time', ([], {}), '()\n', (653, 655), False, 'import time\n'), ((806, 834), 'spacy.load', 'spacy.load', (['"""en_core_web_sm"""'], {}), "('en_core_web_sm')\n", (816, 834), False, 'import spacy\n'), ((2050, 2112), 'gensim.models.KeyedVectors.load_word2vec_format', 'KeyedVectors.load_word2...
from django.db import models from django.urls import reverse, NoReverseMatch from django_nlf.conf import nlf_settings from django_nlf.functions import FunctionRegistry from django_nlf.types import FieldFilterSchema, ModelFilterSchema class NLFModelSchemaBuilder: __cache = {} field_shortcuts = nlf_s...
[ "django.urls.reverse", "django_nlf.functions.FunctionRegistry.get_functions_for" ]
[((1299, 1340), 'django_nlf.functions.FunctionRegistry.get_functions_for', 'FunctionRegistry.get_functions_for', (['model'], {}), '(model)\n', (1333, 1340), False, 'from django_nlf.functions import FunctionRegistry\n'), ((3537, 3554), 'django.urls.reverse', 'reverse', (['url_name'], {}), '(url_name)\n', (3544, 3554), F...
# -*- coding: utf-8 -*- # ============================================================================= # 2mmn40 week 3 report # version 2017-12-03 afternoon # BA # # # for BA: Make sure to run in directory # C:\Users\20165263\Dropbox\tue\2mmn40\src # # ==============================================================...
[ "numpy.sum", "numpy.nan_to_num", "numpy.linalg.norm", "numpy.array", "numpy.sqrt" ]
[((836, 856), 'numpy.array', 'np.array', (['[1.0, 1.0]'], {}), '([1.0, 1.0])\n', (844, 856), True, 'import numpy as np\n'), ((1078, 1125), 'numpy.array', 'np.array', (['[[0.0, 0.1, -0.1], [1.01, 0.9, 0.95]]'], {}), '([[0.0, 0.1, -0.1], [1.01, 0.9, 0.95]])\n', (1086, 1125), True, 'import numpy as np\n'), ((1147, 1191), ...
from copy import deepcopy from ldaptor._encoder import get_strings class LDAPAttributeSet(set): def __init__(self, key, *a, **kw): """ Represents all the values for an attribute in an LDAP entry. An entry might have "cn" or "objectClass" or "uid" attributes, and this class represe...
[ "ldaptor._encoder.get_strings" ]
[((1776, 1792), 'ldaptor._encoder.get_strings', 'get_strings', (['key'], {}), '(key)\n', (1787, 1792), False, 'from ldaptor._encoder import get_strings\n'), ((2042, 2058), 'ldaptor._encoder.get_strings', 'get_strings', (['key'], {}), '(key)\n', (2053, 2058), False, 'from ldaptor._encoder import get_strings\n')]
""" Heuristic agents for various OpenAI Gym environments. The agent policies, in this case, are deterministic functions, and often handcrafted or found by non-gradient optimization algorithms, such as evolutionary strategies. Many of the heuristic policies were adapted from the following source: ``` @book{xiao2022, ...
[ "torch.stack", "numpy.zeros", "torch.clip", "torch.clamp", "torch.abs" ]
[((1686, 1719), 'torch.clip', 'torch.clip', (['angle_targ', '(-0.4)', '(0.4)'], {}), '(angle_targ, -0.4, 0.4)\n', (1696, 1719), False, 'import torch\n'), ((2194, 2244), 'torch.stack', 'torch.stack', (['[hover * 20 - 1, -angle * 20]'], {'dim': '(-1)'}), '([hover * 20 - 1, -angle * 20], dim=-1)\n', (2205, 2244), False, '...
from django.template.exceptions import TemplateDoesNotExist from django.template.base import Template, Context from django.template.engine import Engine from django.template.loader import render_to_string from django.core.mail import EmailMultiAlternatives from django.conf import settings import re from inlinestyler....
[ "django.template.engine.Engine.get_default", "commonmark.common.normalize_uri", "commonmark.HtmlRenderer", "cssutils.log.setLevel", "django.template.loader.render_to_string", "commonmark.Parser", "inlinestyler.utils.inline_css", "django.core.mail.EmailMultiAlternatives", "django.template.base.Contex...
[((488, 524), 'cssutils.log.setLevel', 'cssutils.log.setLevel', (['logging.ERROR'], {}), '(logging.ERROR)\n', (509, 524), False, 'import cssutils\n'), ((948, 1016), 'django.template.loader.render_to_string', 'render_to_string', (["(template_prefix + '_subject.txt')", 'template_context'], {}), "(template_prefix + '_subj...
from tclCommands.TclCommand import * from shapely.geometry import Point class TclCommandAlignDrillGrid(TclCommandSignaled): """ Tcl shell command to create an Excellon object with drills for aligment grid. Todo: What is an alignment grid? """ # array of all command aliases, to be able use o...
[ "shapely.geometry.Point" ]
[((2934, 2987), 'shapely.geometry.Point', 'Point', (['(currentx + gridoffsetx)', '(currenty + gridoffsety)'], {}), '(currentx + gridoffsetx, currenty + gridoffsety)\n', (2939, 2987), False, 'from shapely.geometry import Point\n')]
#!/usr/bin/env python3 import os.path as path import time import toml import json import csv import os # various utilities used for file io, # including loading project configuration, # state, etc... # generate a list of all project directories. # ignores directories with a `.` in their name. def get_projects(): ...
[ "json.load", "os.makedirs", "csv.writer", "os.path.isdir", "time.time", "os.path.isfile", "toml.load", "toml.dump", "os.listdir" ]
[((3069, 3090), 'os.listdir', 'os.listdir', (['directory'], {}), '(directory)\n', (3079, 3090), False, 'import os\n'), ((3258, 3279), 'os.listdir', 'os.listdir', (['directory'], {}), '(directory)\n', (3268, 3279), False, 'import os\n'), ((359, 380), 'os.path.isdir', 'path.isdir', (['directory'], {}), '(directory)\n', (...
#!/usr/bin/env python import os import sys from setuptools import find_packages, setup kwargs = { 'name': 'rosdistro', # same version as in: # - src/rosdistro/__init__.py # - stdeb.cfg 'version': '0.8.0', 'install_requires': ['PyYAML', 'setuptools'], 'packages': find_packages('src'), ...
[ "setuptools.setup", "setuptools.find_packages" ]
[((1598, 1613), 'setuptools.setup', 'setup', ([], {}), '(**kwargs)\n', (1603, 1613), False, 'from setuptools import find_packages, setup\n'), ((294, 314), 'setuptools.find_packages', 'find_packages', (['"""src"""'], {}), "('src')\n", (307, 314), False, 'from setuptools import find_packages, setup\n')]
"""Definitions for all core numeric instructions.""" import math from pyshgp.push.instruction import SimpleInstruction from pyshgp.utils import Token def _add(a, b): return b + a, def _sub(a, b): return b - a, def _mult(a, b): return b * a, def _p_div(a, b): if a == 0: return Token.reve...
[ "pyshgp.push.instruction.SimpleInstruction", "math.tan", "math.cos", "math.sin" ]
[((738, 749), 'math.sin', 'math.sin', (['x'], {}), '(x)\n', (746, 749), False, 'import math\n'), ((777, 788), 'math.cos', 'math.cos', (['x'], {}), '(x)\n', (785, 788), False, 'import math\n'), ((816, 827), 'math.tan', 'math.tan', (['x'], {}), '(x)\n', (824, 827), False, 'import math\n'), ((5232, 5383), 'pyshgp.push.ins...
# common holds pyhton function to be used in the snakefile import pandas as pd import yaml # map samples to fastqs def get_samples(): """ return list of samples from samplesheet.tsv """ return list(st.index) def get_marks(): """ return list of marks from samplesheet.tsv """ return list...
[ "pandas.DataFrame", "yaml.safe_load", "pandas.concat" ]
[((4875, 4889), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (4887, 4889), True, 'import pandas as pd\n'), ((4245, 4263), 'yaml.safe_load', 'yaml.safe_load', (['fi'], {}), '(fi)\n', (4259, 4263), False, 'import yaml\n'), ((5140, 5165), 'pandas.concat', 'pd.concat', (['[outdf, tmpdf]'], {}), '([outdf, tmpdf])\n...
import asyncio import math import sys import boto3 import json import traceback from typing import Dict, List, Any import ccxt.async_support as ccxt from ccxt import InvalidOrder, OrderNotFound from ccxt.async_support.base.exchange import Exchange from Exceptions import OrderCreationError, OrderErrorByExchange from ...
[ "asyncio.gather", "json.load", "Database.Database.initDBFromAWSParameterStore", "boto3.client", "asyncio.sleep", "Exceptions.OrderErrorByExchange", "Exceptions.OrderCreationError", "time.time", "Notifications.sendNotification", "logging.getLogger", "TraderHistory.TraderHistory.getInstance" ]
[((644, 671), 'logging.getLogger', 'logging.getLogger', (['"""Trader"""'], {}), "('Trader')\n", (661, 671), False, 'import logging\n'), ((2501, 2539), 'Database.Database.initDBFromAWSParameterStore', 'Database.initDBFromAWSParameterStore', ([], {}), '()\n', (2537, 2539), False, 'from Database import Database\n'), ((660...
import datetime import re import jwt from flask import current_app as app from flask import request, session from CTFd.cache import cache from CTFd.constants.users import UserAttrs from CTFd.constants.teams import TeamAttrs from CTFd.models import Fails, Users, db, Teams, Tracking from CTFd.utils import get_config ...
[ "CTFd.models.Users.query.filter_by", "CTFd.models.db.session.add", "CTFd.cache.cache.memoize", "flask.request.headers.get", "CTFd.models.Tracking.ip.distinct", "datetime.datetime.now", "datetime.datetime.utcnow", "CTFd.constants.teams.TeamAttrs", "datetime.timedelta", "CTFd.constants.users.UserAtt...
[((609, 634), 'CTFd.cache.cache.memoize', 'cache.memoize', ([], {'timeout': '(30)'}), '(timeout=30)\n', (622, 634), False, 'from CTFd.cache import cache\n'), ((1209, 1234), 'CTFd.cache.cache.memoize', 'cache.memoize', ([], {'timeout': '(30)'}), '(timeout=30)\n', (1222, 1234), False, 'from CTFd.cache import cache\n'), (...
""" to research dataset and event-loop object in ipython """ from psana.pyalgos.generic.NDArrUtils import print_ndarr from psana import DataSource ds = DataSource(files='/reg/g/psdm/detector/data2_test/xtc/data-amox23616-r0104-e000010-xtcav.xtc2') orun = next(ds.runs()) det = orun.Detector('xtcav') print('test_xtca...
[ "psana.DataSource" ]
[((155, 260), 'psana.DataSource', 'DataSource', ([], {'files': '"""/reg/g/psdm/detector/data2_test/xtc/data-amox23616-r0104-e000010-xtcav.xtc2"""'}), "(files=\n '/reg/g/psdm/detector/data2_test/xtc/data-amox23616-r0104-e000010-xtcav.xtc2'\n )\n", (165, 260), False, 'from psana import DataSource\n')]
import numpy as np import tensorflow as tf from baselines.a2c.utils import conv, fc, conv_to_fc, batch_to_seq, seq_to_batch, lstm, lnlstm, sample class CnnPolicy(object): def __init__(self, sess, ob_space, ac_space, nenv, nsteps, nstack, reuse=False): nbatch = nenv*nsteps #nh, nw, nc = ob_space.s...
[ "baselines.a2c.utils.sample", "tensorflow.variable_scope", "tensorflow.placeholder", "tensorflow.cast", "baselines.a2c.utils.conv_to_fc", "baselines.a2c.utils.fc", "numpy.sqrt" ]
[((435, 496), 'tensorflow.placeholder', 'tf.placeholder', (['tf.uint8'], {'shape': '[nbatch, nh, nw, nc * nstack]'}), '(tf.uint8, shape=[nbatch, nh, nw, nc * nstack])\n', (449, 496), True, 'import tensorflow as tf\n'), ((1515, 1525), 'baselines.a2c.utils.sample', 'sample', (['pi'], {}), '(pi)\n', (1521, 1525), False, '...
# Copyright 2022 DeepMind Technologies Limited. 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 ...
[ "absl.testing.absltest.main", "haiku._src.config.set", "haiku._src.config.Config.default", "haiku._src.config.context", "haiku._src.config.assign", "absl.testing.parameterized.parameters", "threading.Event", "inspect.signature", "concurrent.futures.ThreadPoolExecutor", "haiku._src.config.with_conf...
[((1536, 1573), 'absl.testing.parameterized.parameters', 'parameterized.parameters', (['(True)', '(False)'], {}), '(True, False)\n', (1560, 1573), False, 'from absl.testing import parameterized\n'), ((4143, 4158), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (4156, 4158), False, 'from absl.testing i...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest import numpy as np from openvino.tools.mo.middle.dequantize_linear_resolver import DequantizeLinearResolver from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.utils.ir_engi...
[ "openvino.tools.mo.front.common.partial_infer.utils.int64_array", "numpy.uint8", "openvino.tools.mo.utils.ir_engine.compare_graphs.compare_graphs", "unit_tests.utils.graph.build_graph", "numpy.float32", "openvino.tools.mo.middle.dequantize_linear_resolver.DequantizeLinearResolver", "numpy.array" ]
[((5432, 5492), 'openvino.tools.mo.utils.ir_engine.compare_graphs.compare_graphs', 'compare_graphs', (['graph', 'graph_ref', '"""out"""'], {'check_op_attrs': '(True)'}), "(graph, graph_ref, 'out', check_op_attrs=True)\n", (5446, 5492), False, 'from openvino.tools.mo.utils.ir_engine.compare_graphs import compare_graphs\...
# -*- coding: utf-8 -*- """ HackerRank - Sock Merchant https://www.hackerrank.com/challenges/sock-merchant Created on Mon Nov 12 22:29:31 2018 @author: <NAME> """ ## REQUIRED MODULES from collections import Counter import sys ## MODULE DEFINITIONS class Solution: """ Iteration over all el...
[ "collections.Counter" ]
[((894, 904), 'collections.Counter', 'Counter', (['a'], {}), '(a)\n', (901, 904), False, 'from collections import Counter\n')]
from web.views.shelter import shelter_bp, shelters_bp from web.views.user import user_bp from web.views.administration import admin_bp from web.views import views from web.views.page import recommendations from web.views.admin import * from web.views.session_mgmt import * from web.views import api import conf from fla...
[ "conf.LANGUAGES.keys" ]
[((782, 803), 'conf.LANGUAGES.keys', 'conf.LANGUAGES.keys', ([], {}), '()\n', (801, 803), False, 'import conf\n')]
# -*- encoding: utf-8 -*- import json from django.shortcuts import render from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from django.http.response import HttpResponse, JsonResponse from notification.service import ServiceAgent from notification.choices impo...
[ "notification.service.ServiceAgent.get_services_by_platform", "json.loads", "django.http.response.HttpResponse" ]
[((1591, 1638), 'notification.service.ServiceAgent.get_services_by_platform', 'ServiceAgent.get_services_by_platform', (['platform'], {}), '(platform)\n', (1628, 1638), False, 'from notification.service import ServiceAgent\n'), ((2052, 2072), 'django.http.response.HttpResponse', 'HttpResponse', (['result'], {}), '(resu...
from setuptools import setup, find_packages package_name = 'lanenet' setup( name=package_name, version='0.1.0', packages=find_packages(), py_modules=[], zip_safe=True, install_requires=[ 'setuptools', 'torch', 'torchvision', 'opencv-python', 'numpy', ...
[ "setuptools.find_packages" ]
[((135, 150), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (148, 150), False, 'from setuptools import setup, find_packages\n')]
import numpy as np import imageio import matplotlib.pyplot as plt import random import sys import argparse from numba import jit,jitclass,prange from numba import int64,float64 ''' Suceptible-Infected-Removed (SIR) [012] ''' def press(event,obj): sys.stdout.flush() if event.key == 'q': if obj.save: ...
[ "numpy.sum", "argparse.ArgumentParser", "matplotlib.pyplot.figure", "numpy.random.randint", "sys.stdout.flush", "numpy.linalg.norm", "numpy.random.normal", "matplotlib.pyplot.gca", "imageio.mimsave", "matplotlib.pyplot.show", "numba.jitclass", "matplotlib.pyplot.ylim", "matplotlib.pyplot.ion...
[((674, 688), 'numba.jitclass', 'jitclass', (['spec'], {}), '(spec)\n', (682, 688), False, 'from numba import jit, jitclass, prange\n'), ((251, 269), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (267, 269), False, 'import sys\n'), ((5019, 5093), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'...
# coding: utf-8 """ FlashBlade REST API Client A lightweight client for FlashBlade REST API 2.0, developed by Pure Storage, Inc. (http://www.purestorage.com/). OpenAPI spec version: 2.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six imp...
[ "six.iteritems" ]
[((4759, 4792), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (4772, 4792), False, 'import six\n')]
#!/usr/bin/env python3 import rospy import std_msgs.msg from geometry_msgs.msg import Twist from sensor_msgs.msg import RegionOfInterest as ROI import numpy as np w = 640 h = 640 pid_w = [0.5, 0, 0] # pid parameters of yaw channel pid_h = [0.8, 0, 0] # pid parameters of up channel pid_f = [0.8, 0, 0] # pid parameters...
[ "rospy.spin", "rospy.Publisher", "rospy.Subscriber", "rospy.init_node" ]
[((375, 413), 'rospy.init_node', 'rospy.init_node', (['"""pid"""'], {'anonymous': '(True)'}), "('pid', anonymous=True)\n", (390, 413), False, 'import rospy\n'), ((424, 462), 'rospy.Subscriber', 'rospy.Subscriber', (['"""roi"""', 'ROI', 'callback'], {}), "('roi', ROI, callback)\n", (440, 462), False, 'import rospy\n'), ...
""" Kubernetes cluster manager module that provides functionality to schedule jobs as well as manage their state in the cluster. """ import shlex from kubernetes import client as k_client from kubernetes import config as k_config from kubernetes.client.rest import ApiException from .abstractmgr import AbstractManager...
[ "kubernetes.client.V1HostPathVolumeSource", "kubernetes.client.V1JobSpec", "kubernetes.client.V1Capabilities", "kubernetes.client.V1PodSpec", "kubernetes.client.V1DeleteOptions", "kubernetes.client.V1EnvVar", "kubernetes.config.load_incluster_config", "shlex.split", "kubernetes.client.V1ObjectMeta",...
[((473, 505), 'kubernetes.config.load_incluster_config', 'k_config.load_incluster_config', ([], {}), '()\n', (503, 505), True, 'from kubernetes import config as k_config\n'), ((533, 553), 'kubernetes.client.CoreV1Api', 'k_client.CoreV1Api', ([], {}), '()\n', (551, 553), True, 'from kubernetes import client as k_client\...
# -*- coding: utf-8 -*- """Advent of Code 2020 - Day 15 - Rambunctious Recitation.""" import argparse import pdb import traceback from re import findall def extract_ints(line): return [int(x) for x in findall(r"-?\d+", line)] def find_offsets(values, target): offsets = [] for idx, value in enumerate(va...
[ "traceback.print_exc", "re.findall", "pdb.post_mortem", "argparse.ArgumentParser" ]
[((730, 831), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Advent of Code - 2020 - Day 15 - Rambunctious Recitation."""'}), "(description=\n 'Advent of Code - 2020 - Day 15 - Rambunctious Recitation.')\n", (753, 831), False, 'import argparse\n'), ((208, 231), 're.findall', 'findall'...
# -*- coding: utf-8 -*- """ services.payment ~~~~~~~~~~~~~~~~ Services for payments """ import falcon import arrow from .mongo import DService from smpa.models.payment import Payment class PaymentService(DService): __model__ = Payment def check(self, id): """Checks the status of a paym...
[ "smpa.app.govpay.check_payment", "falcon.HTTPError" ]
[((549, 589), 'smpa.app.govpay.check_payment', 'govpay.check_payment', (['payment.payment_id'], {}), '(payment.payment_id)\n', (569, 589), False, 'from smpa.app import config, govpay\n'), ((480, 534), 'falcon.HTTPError', 'falcon.HTTPError', (['falcon.HTTP_404', '"""Payment not found"""'], {}), "(falcon.HTTP_404, 'Payme...
from math import pi from bokeh.plotting import figure, show, output_file output_file('ovals.html') p = figure(width=400, height=400) p.oval(x=[1, 2, 3], y=[1, 2, 3], width=0.2, height=40, color="#CAB2D6", angle=pi/3, height_units="screen") show(p)
[ "bokeh.plotting.output_file", "bokeh.plotting.figure", "bokeh.plotting.show" ]
[((74, 99), 'bokeh.plotting.output_file', 'output_file', (['"""ovals.html"""'], {}), "('ovals.html')\n", (85, 99), False, 'from bokeh.plotting import figure, show, output_file\n'), ((105, 134), 'bokeh.plotting.figure', 'figure', ([], {'width': '(400)', 'height': '(400)'}), '(width=400, height=400)\n', (111, 134), False...
import numpy as np def custom_image_generator(generator, directory, class_names, batch_size=16, target_size=(512, 512), color_mode="grayscale", class_mode="binary", mean=None, std=None, cam=False, verbose=0): """ In paper chap 3.1: we downscale the images to 1024x1024 and normal...
[ "numpy.array" ]
[((1637, 1665), 'numpy.array', 'np.array', (['batch_y_multilabel'], {}), '(batch_y_multilabel)\n', (1645, 1665), True, 'import numpy as np\n'), ((465, 496), 'numpy.array', 'np.array', (['[0.485, 0.456, 0.406]'], {}), '([0.485, 0.456, 0.406])\n', (473, 496), True, 'import numpy as np\n'), ((540, 572), 'numpy.array', 'np...
# ---------------------------------------------------------------------------- # Copyright (c) 2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -----------------------------------------------------...
[ "qiime2.plugin.model.SingleFileDirectoryFormat" ]
[((484, 584), 'qiime2.plugin.model.SingleFileDirectoryFormat', 'model.SingleFileDirectoryFormat', (['"""MAGSequencesDirFmt"""', '"""mag[0-9]+\\\\.(fa|fasta)$"""', 'DNAFASTAFormat'], {}), "('MAGSequencesDirFmt',\n 'mag[0-9]+\\\\.(fa|fasta)$', DNAFASTAFormat)\n", (515, 584), False, 'from qiime2.plugin import model\n')...
import sys import argparse from typing import Any from balsa import verbose_arg_string, delete_existing_arg_string, log_dir_arg_string from pyship import __name__, __version__, DEFAULT_DIST_DIR_NAME def get_arguments() -> Any: parser = argparse.ArgumentParser(prog=__name__, formatter_class=argparse.ArgumentDef...
[ "argparse.ArgumentParser", "sys.exit" ]
[((245, 344), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '__name__', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), '(prog=__name__, formatter_class=argparse.\n ArgumentDefaultsHelpFormatter)\n', (268, 344), False, 'import argparse\n'), ((1816, 1826), 'sys.exit', 'sys.exit', ...
from dataclasses import dataclass from typing import Callable, Any from rxbp.observable import Observable from rxbp.observerinfo import ObserverInfo from rxbp.observers.mapobserver import MapObserver @dataclass class MapObservable(Observable): source: Observable func: Callable[[Any], Any] # stack: List[F...
[ "rxbp.observers.mapobserver.MapObserver" ]
[((462, 520), 'rxbp.observers.mapobserver.MapObserver', 'MapObserver', ([], {'source': 'observer_info.observer', 'func': 'self.func'}), '(source=observer_info.observer, func=self.func)\n', (473, 520), False, 'from rxbp.observers.mapobserver import MapObserver\n')]
#!/usr/bin/env python # -*- coding: UTF-8 -*- from os import path as P from setuptools import setup import lxltools with open(P.join(P.dirname(__file__), 'requirements.txt')) as fp: requirements = [l.rstrip() for l in fp.readlines()] setup( name = "lxltools", version = lxltools.__version__, descripti...
[ "os.path.dirname" ]
[((135, 154), 'os.path.dirname', 'P.dirname', (['__file__'], {}), '(__file__)\n', (144, 154), True, 'from os import path as P\n')]
import pandas as pd import os from models.T5MultiTask.t5_model import T5Model_MultiTask import torch torch.multiprocessing.set_sharing_strategy('file_system') ''' Function to train the T5 model in a multi-task and dataset scenario Parameters ------------ train_task_dict (dict): dataset dictonary containing...
[ "os.getcwd", "torch.multiprocessing.set_sharing_strategy", "models.T5MultiTask.t5_model.T5Model_MultiTask" ]
[((107, 164), 'torch.multiprocessing.set_sharing_strategy', 'torch.multiprocessing.set_sharing_strategy', (['"""file_system"""'], {}), "('file_system')\n", (149, 164), False, 'import torch\n'), ((736, 788), 'models.T5MultiTask.t5_model.T5Model_MultiTask', 'T5Model_MultiTask', (['"""t5"""', 'model_name'], {'args': 'mode...
# author: <NAME>, Early October # version: 6.1 import PySimpleGUI as sg import cx_Oracle from Add_New_Classes import run_program as add from Edit_Classes import run_program as edit from Grades_Chart import run_program as access def run_program(): # the function that runs everything con = cx_Oracle.connect('EOM/...
[ "PySimpleGUI.Button", "Add_New_Classes.run_program", "PySimpleGUI.FlexForm", "PySimpleGUI.Text", "Grades_Chart.run_program", "PySimpleGUI.Radio", "Edit_Classes.run_program", "PySimpleGUI.Column", "cx_Oracle.connect" ]
[((297, 338), 'cx_Oracle.connect', 'cx_Oracle.connect', (['"""EOM/EOM@127.0.0.1/xe"""'], {}), "('EOM/EOM@127.0.0.1/xe')\n", (314, 338), False, 'import cx_Oracle\n'), ((2573, 2695), 'PySimpleGUI.Text', 'sg.Text', (['""" Class selection"""'], {'size': '(17, 1)', 'font': "('Helvetica', 25)", 'text_color': '"""bla...
from __future__ import unicode_literals import frappe from frappe import _ from frappe.data_migration.doctype.data_migration_connector.connectors.base import BaseConnection import mysql.connector as mariadb class EmployeeTrainingCertificationConnection(BaseConnection): def __init__(self, connector): self.connector...
[ "mysql.connector.connect" ]
[((460, 597), 'mysql.connector.connect', 'mariadb.connect', ([], {'host': 'self.connector.hostname', 'user': 'self.connector.username', 'password': 'password', 'database': 'self.connector.database_name'}), '(host=self.connector.hostname, user=self.connector.username,\n password=password, database=self.connector.data...
#!/usr/bin/env python import subprocess import os import shutil import tarfile from setuptools import setup def untar(fname, fpath): if fname.endswith('tar.gz') or fname.endswith('tar.bz') or fname.endswith('tar'): tar = tarfile.open(fname) tar.extractall(path=fpath) tar.close() os...
[ "subprocess.Popen", "os.remove", "os.makedirs", "setuptools.setup", "os.getcwd", "os.environ.get", "subprocess.call", "tarfile.open", "os.path.join", "os.chdir" ]
[((344, 355), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (353, 355), False, 'import os\n'), ((365, 389), 'os.environ.get', 'os.environ.get', (['"""PREFIX"""'], {}), "('PREFIX')\n", (379, 389), False, 'import os\n'), ((464, 495), 'os.path.join', 'os.path.join', (['processDi', '"""work"""'], {}), "(processDi, 'work')\n"...
import numpy as np import Levenshtein as Lev def cer_calculate(s1, s2, no_spaces=False): """ Computes the Character Error Rate, defined as the edit distance. Arguments: s1 (string): space-separated sentence s2 (string): space-separated sentence """ if no_spaces: s1, s2, = s...
[ "Levenshtein.distance", "numpy.array" ]
[((384, 404), 'Levenshtein.distance', 'Lev.distance', (['s1', 's2'], {}), '(s1, s2)\n', (396, 404), True, 'import Levenshtein as Lev\n'), ((1917, 1935), 'numpy.array', 'np.array', (['accuracy'], {}), '(accuracy)\n', (1925, 1935), True, 'import numpy as np\n'), ((2694, 2712), 'numpy.array', 'np.array', (['cer_list'], {}...
import airflow from airflow import DAG from airflow.operators.dummy import DummyOperator from airflow.operators.python import PythonOperator ERP_CHANGE_DATE = airflow.utils.dates.days_ago(1) def _fetch_sales(**context): if context["execution_date"] < ERP_CHANGE_DATE: _fetch_sales_old(**context) else...
[ "airflow.utils.dates.days_ago", "airflow.operators.python.PythonOperator", "airflow.operators.dummy.DummyOperator" ]
[((161, 192), 'airflow.utils.dates.days_ago', 'airflow.utils.dates.days_ago', (['(1)'], {}), '(1)\n', (189, 192), False, 'import airflow\n'), ((1004, 1034), 'airflow.operators.dummy.DummyOperator', 'DummyOperator', ([], {'task_id': '"""start"""'}), "(task_id='start')\n", (1017, 1034), False, 'from airflow.operators.dum...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 10 10:43:18 2019 @author: nevalaio """ import ee import time import datetime import satelliteTools as st import pandas as pd from geetools import batch, tools import numpy as np ee.Initialize() #----------------- Sentinel-2 ------------------------...
[ "pandas.DataFrame", "satelliteTools.sentinelTitle2Datetime", "ee.Reducer.stdDev", "satelliteTools.getShapeAtrrtibutesWithIdentifier", "satelliteTools.wkt2coordinates", "ee.Reducer.toList", "ee.FeatureCollection", "ee.ImageCollection", "ee.Image", "time.time", "geetools.tools.geometry.getRegion",...
[((249, 264), 'ee.Initialize', 'ee.Initialize', ([], {}), '()\n', (262, 264), False, 'import ee\n'), ((625, 636), 'time.time', 'time.time', ([], {}), '()\n', (634, 636), False, 'import time\n'), ((930, 992), 'satelliteTools.getShapeAtrrtibutesWithIdentifier', 'st.getShapeAtrrtibutesWithIdentifier', (['aoi_shp', 'AOI_id...
""" General-purpose tags for working with various aspects of Snippets -- whether a user has bookmarked/rated a given Snippet, etc. """ from django import template from cab.models import Bookmark, Rating, Snippet register = template.Library() class IfBookmarkedNode(template.Node): def __init__(self, user_id, sn...
[ "django.template.Library", "django.template.resolve_variable", "cab.models.Snippet.objects.all", "cab.models.Rating.objects.already_rated", "cab.models.Rating.objects.score_for_snippet", "cab.models.Rating.objects.get", "django.template.TemplateSyntaxError", "cab.models.Bookmark.objects.already_bookma...
[((226, 244), 'django.template.Library', 'template.Library', ([], {}), '()\n', (242, 244), False, 'from django import template\n'), ((796, 862), 'cab.models.Bookmark.objects.already_bookmarked', 'Bookmark.objects.already_bookmarked', (['self.user_id', 'self.snippet_id'], {}), '(self.user_id, self.snippet_id)\n', (831, ...
import ipaddress from typing import Dict, List, Optional from pydantic import BaseModel, validator from common_osint_model.models import ShodanDataHandler, CensysDataHandler, Logger class AutonomousSystem(BaseModel, ShodanDataHandler, CensysDataHandler, Logger): """Represents an autonomous system""" number:...
[ "ipaddress.ip_network", "pydantic.validator" ]
[((414, 433), 'pydantic.validator', 'validator', (['"""prefix"""'], {}), "('prefix')\n", (423, 433), False, 'from pydantic import BaseModel, validator\n'), ((531, 554), 'ipaddress.ip_network', 'ipaddress.ip_network', (['v'], {}), '(v)\n', (551, 554), False, 'import ipaddress\n')]
from enum import Enum, auto class ArjunaOption(Enum): ARJUNA_ROOT_DIR = auto() ARJUNA_EXTERNAL_TOOLS_DIR = auto() ARJUNA_EXTERNAL_IMPORTS_DIR = auto() PYTHON_LOG_NAME = auto() LOG_NAME = auto() LOG_DIR = auto() LOG_CONSOLE_LEVEL = auto() LOG_FILE_LEVEL = auto() PROJECT_NAME = aut...
[ "enum.auto" ]
[((77, 83), 'enum.auto', 'auto', ([], {}), '()\n', (81, 83), False, 'from enum import Enum, auto\n'), ((116, 122), 'enum.auto', 'auto', ([], {}), '()\n', (120, 122), False, 'from enum import Enum, auto\n'), ((157, 163), 'enum.auto', 'auto', ([], {}), '()\n', (161, 163), False, 'from enum import Enum, auto\n'), ((186, 1...
#!/usr/bin/env python # # Public Domain 2014-2017 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compil...
[ "wttest.run" ]
[((4476, 4488), 'wttest.run', 'wttest.run', ([], {}), '()\n', (4486, 4488), False, 'import wiredtiger, wttest\n')]
# Copyright (c) 2007-2018 UShareSoft, 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 requi...
[ "pyxb.BIND", "uforge.objects.uforge.TargetPlatform", "hammr.utils.migration_utils.check_mandatory_target", "uforge.objects.uforge.CredAccountVSphere", "hammr.utils.migration_utils.check_mandatory_builder", "hammr.utils.migration_utils.migration_table", "hammr.utils.migration_utils.retrieve_target_format...
[((883, 919), 'mock.patch', 'patch', (['"""texttable.Texttable.add_row"""'], {}), "('texttable.Texttable.add_row')\n", (888, 919), False, 'from mock import patch\n'), ((1773, 1809), 'mock.patch', 'patch', (['"""texttable.Texttable.add_row"""'], {}), "('texttable.Texttable.add_row')\n", (1778, 1809), False, 'from mock i...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mwindow.ui' # # Created: Sun Mar 05 22:07:45 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.4 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(object): def setupUi(s...
[ "PySide.QtGui.QHBoxLayout", "PySide.QtCore.QMetaObject.connectSlotsByName", "PySide.QtGui.QListWidget", "PySide.QtGui.QStatusBar", "PySide.QtGui.QPushButton", "PySide.QtGui.QVBoxLayout", "PySide.QtCore.QSize", "PySide.QtGui.QMenu", "PySide.QtGui.QLineEdit", "PySide.QtGui.QPlainTextEdit", "PySide...
[((499, 574), 'PySide.QtGui.QSizePolicy', 'QtGui.QSizePolicy', (['QtGui.QSizePolicy.Preferred', 'QtGui.QSizePolicy.Preferred'], {}), '(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)\n', (516, 574), False, 'from PySide import QtCore, QtGui\n'), ((1033, 1058), 'PySide.QtGui.QWidget', 'QtGui.QWidget', (['MainWi...
from django import forms from django.core.exceptions import ImproperlyConfigured from mayan.apps.acls.models import AccessControlList class FilteredModelFieldMixin: def __init__(self, *args, **kwargs): self.source_model = kwargs.pop('source_model', None) self.permission = kwargs.pop('permission',...
[ "mayan.apps.acls.models.AccessControlList.objects.restrict_queryset" ]
[((1037, 1159), 'mayan.apps.acls.models.AccessControlList.objects.restrict_queryset', 'AccessControlList.objects.restrict_queryset', ([], {'permission': 'self.permission', 'queryset': 'self.source_queryset', 'user': 'self.user'}), '(permission=self.permission,\n queryset=self.source_queryset, user=self.user)\n', (10...
import os import configparser class Config(configparser.ConfigParser): """ Creates a configfile <filepath> with the structure contained in <default_dict> as default values. <default_dict> should look like this: default_dict = { "GENERAL": { "theme": 1, ...
[ "os.path.isfile" ]
[((967, 991), 'os.path.isfile', 'os.path.isfile', (['filepath'], {}), '(filepath)\n', (981, 991), False, 'import os\n')]
import geosoft.gxapi as gxapi import geosoft.gxpy.gx as gx import geosoft.gxpy.grid as gxgrid import geosoft.gxpy.utility as gxu # this example requires version 9.2.1, which adds iteration support gxu.check_version('9.2.1') # create context gxc = gx.GXpy() # create a gxapi.GXST instance to accumulate statistics stat...
[ "geosoft.gxpy.grid.Grid.open", "geosoft.gxpy.gx.GXpy", "geosoft.gxapi.GXST.create", "geosoft.gxpy.utility.check_version" ]
[((198, 224), 'geosoft.gxpy.utility.check_version', 'gxu.check_version', (['"""9.2.1"""'], {}), "('9.2.1')\n", (215, 224), True, 'import geosoft.gxpy.utility as gxu\n'), ((249, 258), 'geosoft.gxpy.gx.GXpy', 'gx.GXpy', ([], {}), '()\n', (256, 258), True, 'import geosoft.gxpy.gx as gx\n'), ((324, 343), 'geosoft.gxapi.GXS...
import torch import torch.nn as nn import numpy as np import torch.nn.functional as F """In this script are all modules required for the generator and discriminator""" ### Helper Functions ### def make_mlp(dim_list, activation_list, batch_norm=False, dropout=0): """ Generates MLP network: Parameters ...
[ "torch.nn.Dropout", "torch.empty", "torch.cat", "torch.randn", "torch.rand_like", "numpy.arange", "torch.arange", "torch.nn.init.kaiming_normal_", "torch.nn.init.xavier_uniform", "torch.Tensor", "torch.nn.Linear", "torch.zeros", "torch.nn.LSTM", "torch.log", "torch.nn.Dropout2d", "torc...
[((1379, 1401), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (1392, 1401), True, 'import torch.nn as nn\n'), ((1850, 1865), 'torch.nn.Sequential', 'nn.Sequential', ([], {}), '()\n', (1863, 1865), True, 'import torch.nn as nn\n'), ((3321, 3336), 'torch.nn.Sequential', 'nn.Sequential', ([], {...
import pytest from pps import logic from pps import config import flexmock import os @pytest.mark.parametrize( ['a', 'b', 'f'], [(420, 595, "A5"), (595, 420, "A5"), (595, 842, "A4"), (842, 595, "A4"), (842, 1191, "A3"), (200, 200, config.PPS_CONFIG.UNKNOWN_PAPER_FORMAT)] ) def test_ge...
[ "pps.logic.get_format_from_size", "os.path.abspath", "pps.logic.get_print_job_name", "pps.logic.get_file_format", "flexmock", "pps.logic.get_number_of_pages", "pps.logic.get_print_job_id", "pytest.mark.parametrize" ]
[((88, 282), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["['a', 'b', 'f']", "[(420, 595, 'A5'), (595, 420, 'A5'), (595, 842, 'A4'), (842, 595, 'A4'), (\n 842, 1191, 'A3'), (200, 200, config.PPS_CONFIG.UNKNOWN_PAPER_FORMAT)]"], {}), "(['a', 'b', 'f'], [(420, 595, 'A5'), (595, 420, 'A5'\n ), (595, 842, ...
"""GENIE SP/BPC cBioPortal exporter CLI""" import argparse import synapseclient from .bpc_config import Brca, Crc, Nsclc from .sp_config import Akt1, Erbb2, Fgfr4 BPC_MAPPING = {"NSCLC": Nsclc, 'CRC': Crc, 'BrCa': Brca, 'AKT1': Akt1, 'ERRB2': Erbb2, ...
[ "synapseclient.login", "argparse.ArgumentParser" ]
[((386, 453), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Run GENIE sponsored projects"""'}), "(description='Run GENIE sponsored projects')\n", (409, 453), False, 'import argparse\n'), ((1076, 1097), 'synapseclient.login', 'synapseclient.login', ([], {}), '()\n', (1095, 1097), False, ...
"""Core Classes for preprocessing""" from typing import Callable, Iterable import logging import tensorflow as tf from deepr.utils.field import Field from deepr.prepros import base from deepr.layers import Layer LOGGER = logging.getLogger(__name__) class Map(base.Prepro): """Map a function on each element of...
[ "tensorflow.constant", "logging.getLogger" ]
[((226, 253), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (243, 253), False, 'import logging\n'), ((11425, 11464), 'tensorflow.constant', 'tf.constant', (['field.default', 'field.dtype'], {}), '(field.default, field.dtype)\n', (11436, 11464), True, 'import tensorflow as tf\n')]
"""Tools for generating maps from a text search.""" import geopy as gp import numpy as np import matplotlib.pyplot as plt import warnings from .tile import howmany, bounds2raster, bounds2img, _sm2ll, _calculate_zoom from .plotting import INTERPOLATION, ZOOM, add_attribution from . import providers from ._providers imp...
[ "warnings.warn", "numpy.random.randint", "matplotlib.pyplot.subplots", "geopy.geocoders.Nominatim" ]
[((373, 399), 'numpy.random.randint', 'np.random.randint', (['(1000000)'], {}), '(1000000)\n', (390, 399), True, 'import numpy as np\n'), ((9145, 9352), 'warnings.warn', 'warnings.warn', (['"""The method `plot_map` is deprecated and will be removed from the library in future versions. Please use either `add_basemap` or...
# Copyright (c) 2013-2015 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice,...
[ "copy.deepcopy", "pprint.pformat", "tulip.transys.labeled_graphs.LabeledDiGraph.__init__", "tulip.transys.export.machine2scxml.mealy2scxml", "sys.stdin.readline" ]
[((7969, 7998), 'tulip.transys.labeled_graphs.LabeledDiGraph.__init__', 'LabeledDiGraph.__init__', (['self'], {}), '(self)\n', (7992, 7998), False, 'from tulip.transys.labeled_graphs import LabeledDiGraph\n'), ((16016, 16047), 'tulip.transys.export.machine2scxml.mealy2scxml', 'machine2scxml.mealy2scxml', (['self'], {})...
import pickle from propy.PyPro import GetProDes import argparse import os parser = argparse.ArgumentParser(description='extract features') parser.add_argument('--file', type=str, default='VFG-2706') # VFG-2706/VFG-740/VFG-2706-1066/VFG-564/COG-755 parser.add_argument('--feature', type=str, default='aac') # aac, dpc...
[ "os.makedirs", "argparse.ArgumentParser", "os.getcwd", "os.path.exists", "pickle.load", "propy.PyPro.GetProDes" ]
[((84, 139), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""extract features"""'}), "(description='extract features')\n", (107, 139), False, 'import argparse\n'), ((478, 497), 'pickle.load', 'pickle.load', (['f_file'], {}), '(f_file)\n', (489, 497), False, 'import pickle\n'), ((394, 405)...
from conans import ConanFile, CMake, tools import re from os import path class StructuredConcurrencyExampleRecipe(ConanFile): name = "structured_concurrency_example" description = "example code for using structure concurrency with senders/receivers" author = "<NAME>" topics = ("C++", "concurrency") home...
[ "conans.CMake" ]
[((1667, 1678), 'conans.CMake', 'CMake', (['self'], {}), '(self)\n', (1672, 1678), False, 'from conans import ConanFile, CMake, tools\n')]
from datetime import timedelta from hashlib import md5 from unittest.mock import patch from django.contrib.auth import get_user_model from django.http import JsonResponse, HttpResponseRedirect, HttpResponse, HttpRequest from django.test import override_settings, RequestFactory from axes.apps import AppConfig from axe...
[ "axes.helpers.is_client_ip_address_whitelisted", "axes.helpers.get_cool_off_iso8601", "axes.helpers.get_client_str", "axes.helpers.is_ip_address_in_whitelist", "axes.helpers.toggleable", "axes.helpers.get_cool_off", "axes.helpers.get_cache_timeout", "django.http.HttpResponse", "datetime.timedelta", ...
[((856, 893), 'django.test.override_settings', 'override_settings', ([], {'AXES_ENABLED': '(False)'}), '(AXES_ENABLED=False)\n', (873, 893), False, 'from django.test import override_settings, RequestFactory\n'), ((1306, 1344), 'django.test.override_settings', 'override_settings', ([], {'AXES_COOLOFF_TIME': '(3)'}), '(A...
#!/share/bin/python # Filename: initiate_tracing_updated.py from __future__ import division import os import glob i=int(os.getenv('PBS_ARRAYID'))-1 # The first index of a list is zero input_filenames=glob.glob('/data/mat/data_processing/input_data/*.v3dpbd') mkdir_command='mkdir /data/mat/data_processing/'+str(i) os....
[ "os.getenv", "os.system", "os.chdir", "glob.glob" ]
[((202, 260), 'glob.glob', 'glob.glob', (['"""/data/mat/data_processing/input_data/*.v3dpbd"""'], {}), "('/data/mat/data_processing/input_data/*.v3dpbd')\n", (211, 260), False, 'import glob\n'), ((317, 341), 'os.system', 'os.system', (['mkdir_command'], {}), '(mkdir_command)\n', (326, 341), False, 'import os\n'), ((443...
import json import os from typing import Callable, Dict import PIL.Image import torch import torch.utils.data class SarcasmDataset(torch.utils.data.Dataset): """Dataset of Sarcasm videos.""" FRAMES_DIR_PATH = '../data/frames/utterances_final' def __init__(self, transform: Callable = None, videos_data_pa...
[ "json.load", "os.path.join", "os.listdir", "os.path.exists" ]
[((1377, 1431), 'os.path.join', 'os.path.join', (['SarcasmDataset.FRAMES_DIR_PATH', 'video_id'], {}), '(SarcasmDataset.FRAMES_DIR_PATH, video_id)\n', (1389, 1431), False, 'import os\n'), ((532, 547), 'json.load', 'json.load', (['file'], {}), '(file)\n', (541, 547), False, 'import json\n'), ((1830, 1859), 'os.listdir', ...
#!/usr/bin/env python # Copyright (c) 2017, DIANA-HEP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list ...
[ "numpy.searchsorted", "numpy.cumsum", "numpy.array", "functools.wraps", "numpy.all" ]
[((3620, 3645), 'functools.wraps', 'functools.wraps', (['function'], {}), '(function)\n', (3635, 3645), False, 'import functools\n'), ((4061, 4086), 'functools.wraps', 'functools.wraps', (['function'], {}), '(function)\n', (4076, 4086), False, 'import functools\n'), ((4509, 4534), 'functools.wraps', 'functools.wraps', ...
"""This module contains several helper functions which can be used to find an address of the submitting system, for example to use as the address parameter for HighThroughputExecutor. The helper to use depends on the network environment around the submitter, so some experimentation will probably be needed to choose th...
[ "platform.node", "socket.socket", "os.popen", "requests.get", "psutil.net_if_addrs", "logging.getLogger" ]
[((486, 513), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (503, 513), False, 'import logging\n'), ((1334, 1371), 'requests.get', 'requests.get', (['"""https://api.ipify.org"""'], {}), "('https://api.ipify.org')\n", (1346, 1371), False, 'import requests\n'), ((1900, 1915), 'platform.nod...
#!/usr/bin env python from tests.unit import AWSMockServiceTestCase from boto.cloudsearch.domain import Domain from boto.cloudsearch.layer1 import Layer1 import json class TestCloudSearchCreateDomain(AWSMockServiceTestCase): connection_class = Layer1 def default_body(self): return """ <CreateDomain...
[ "boto.cloudsearch.domain.Domain" ]
[((2124, 2150), 'boto.cloudsearch.domain.Domain', 'Domain', (['self', 'api_response'], {}), '(self, api_response)\n', (2130, 2150), False, 'from boto.cloudsearch.domain import Domain\n'), ((2940, 2966), 'boto.cloudsearch.domain.Domain', 'Domain', (['self', 'api_response'], {}), '(self, api_response)\n', (2946, 2966), F...