edited_code
stringlengths
17
978k
original_code
stringlengths
17
978k
from .figure import Figure from .traces import Scatter, ErrorBand, Histogram, Heatmap, Contour, KDE import plotly.graph_objects as go import plotly import numpy as np import warnings class PlotlyFigure(Figure): def __init__(self): super().__init__() self.plotly_figure = go.Figure() # Methods that must be overr...
from .figure import Figure from .traces import Scatter, ErrorBand, Histogram, Heatmap, Contour, KDE import plotly.graph_objects as go import plotly import numpy as np import warnings class PlotlyFigure(Figure): def __init__(self): super().__init__() self.plotly_figure = go.Figure() # Methods that must be overr...
print("importing") from datasets import load_dataset from datasets import load_metric from transformers import AutoTokenizer, AutoModelForSequenceClassification from transformers import TrainingArguments, DefaultFlowCallback, PrinterCallback from transformers import Trainer import torch from torch import nn import num...
print("importing") from datasets import load_dataset from datasets import load_metric from transformers import AutoTokenizer, AutoModelForSequenceClassification from transformers import TrainingArguments, DefaultFlowCallback, PrinterCallback from transformers import Trainer import torch from torch import nn import num...
import os import tempfile from contextlib import contextmanager from ..hdl import * from ..hdl.ast import SignalSet from ..hdl.xfrm import ValueVisitor, StatementVisitor, LHSGroupFilter from ._base import BaseProcess __all__ = ["PyRTLProcess"] class PyRTLProcess(BaseProcess): __slots__ = ("is_comb", "runnable"...
import os import tempfile from contextlib import contextmanager from ..hdl import * from ..hdl.ast import SignalSet from ..hdl.xfrm import ValueVisitor, StatementVisitor, LHSGroupFilter from ._base import BaseProcess __all__ = ["PyRTLProcess"] class PyRTLProcess(BaseProcess): __slots__ = ("is_comb", "runnable"...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_layers.ipynb (unless otherwise specified). from __future__ import annotations __all__ = ['module', 'Identity', 'Lambda', 'PartialLambda', 'Flatten', 'ToTensorBase', 'View', 'ResizeBatch', 'Debugger', 'sigmoid_range', 'SigmoidRange', 'AdaptiveConcatPool1d...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_layers.ipynb (unless otherwise specified). from __future__ import annotations __all__ = ['module', 'Identity', 'Lambda', 'PartialLambda', 'Flatten', 'ToTensorBase', 'View', 'ResizeBatch', 'Debugger', 'sigmoid_range', 'SigmoidRange', 'AdaptiveConcatPool1d...
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
#!/usr/bin/env python3 import sys import traceback from os import makedirs from os.path import basename, splitext from os.path import join as pjoin from catas import parsers from catas.parsers import FileType from catas.parsers import ParseError from catas.cli import MyArgumentError from catas.gentest.cli import cli...
#!/usr/bin/env python3 import sys import traceback from os import makedirs from os.path import basename, splitext from os.path import join as pjoin from catas import parsers from catas.parsers import FileType from catas.parsers import ParseError from catas.cli import MyArgumentError from catas.gentest.cli import cli...
import base64 from ocs_ci.framework import config from ocs_ci.ocs.ocp import OCP from ocs_ci.ocs import constants from ocs_ci.helpers.helpers import storagecluster_independent_check class RGW(object): """ Wrapper class for interaction with a cluster's RGW service """ def __init__(self, namespace=Non...
import base64 from ocs_ci.framework import config from ocs_ci.ocs.ocp import OCP from ocs_ci.ocs import constants from ocs_ci.helpers.helpers import storagecluster_independent_check class RGW(object): """ Wrapper class for interaction with a cluster's RGW service """ def __init__(self, namespace=Non...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ from PySide2 import QtWidgets import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_t...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ from PySide2 import QtWidgets import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_t...
""" Computes a dendrogram based on a given categorical observation. """ from typing import Optional, Sequence, Dict, Any import pandas as pd from anndata import AnnData from pandas.api.types import is_categorical_dtype from .. import logging as logg from .._utils import _doc_params from ..tools._utils import _choose...
""" Computes a dendrogram based on a given categorical observation. """ from typing import Optional, Sequence, Dict, Any import pandas as pd from anndata import AnnData from pandas.api.types import is_categorical_dtype from .. import logging as logg from .._utils import _doc_params from ..tools._utils import _choose...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from pathlib import Path from qlib.model.meta.task import MetaTask from qlib.contrib.meta.data_selection.model import MetaModelDS from qlib.contrib.meta.data_selection.dataset import InternalData, MetaDatasetDS from qlib.data.dataset.handler impor...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from pathlib import Path from qlib.model.meta.task import MetaTask from qlib.contrib.meta.data_selection.model import MetaModelDS from qlib.contrib.meta.data_selection.dataset import InternalData, MetaDatasetDS from qlib.data.dataset.handler impor...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
""" This module contains StructuredLogEvent and EventSummary classes. """ from collections import defaultdict import json import logging import os import re import sys from datetime import datetime from prettytable import PrettyTable from jade.common import JOBS_OUTPUT_DIR from jade.exceptions import InvalidConfigur...
""" This module contains StructuredLogEvent and EventSummary classes. """ from collections import defaultdict import json import logging import os import re import sys from datetime import datetime from prettytable import PrettyTable from jade.common import JOBS_OUTPUT_DIR from jade.exceptions import InvalidConfigur...
from bot.decorators import error_handler from bot.Cats_more_pages import MorePagesCats import requests URL_DOGS = 'https://izpriuta.ru/sobaki' class MorePagesDogs: # The class for pages-parsing dogs def __init__(self, url): self.url = url @error_handler def parse_dogs(self): html = requ...
from bot.decorators import error_handler from bot.Cats_more_pages import MorePagesCats import requests URL_DOGS = 'https://izpriuta.ru/sobaki' class MorePagesDogs: # The class for pages-parsing dogs def __init__(self, url): self.url = url @error_handler def parse_dogs(self): html = requ...
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
#!/usr/bin/env python """ provides a storage layer for meta-data and snv distances from the findneighbour4 system in a RDBMS Tested with: - Oracle Autonomous (ATP and ADW cloud service) - Sqlite (but, sqlite can't be used as a server backend) Not tested: MS SQL server, PostgreSQL Tested but doesn't work at present M...
#!/usr/bin/env python """ provides a storage layer for meta-data and snv distances from the findneighbour4 system in a RDBMS Tested with: - Oracle Autonomous (ATP and ADW cloud service) - Sqlite (but, sqlite can't be used as a server backend) Not tested: MS SQL server, PostgreSQL Tested but doesn't work at present M...
import logging from abc import ABC, abstractmethod from fritzconnection.core.exceptions import ActionError, ServiceError, FritzInternalError from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily logger = logging.getLogger(__name__) logger.setLevel(logging.WARN) class FritzCapability(ABC): ca...
import logging from abc import ABC, abstractmethod from fritzconnection.core.exceptions import ActionError, ServiceError, FritzInternalError from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily logger = logging.getLogger(__name__) logger.setLevel(logging.WARN) class FritzCapability(ABC): ca...
import traceback import argparse import numpy as np from src import NeuralNetwork from typing import * def get_args() -> argparse.Namespace: """Set-up the argument parser Returns: argparse.Namespace: """ parser = argparse.ArgumentParser( description='Project 1 for the Deep Learning cl...
import traceback import argparse import numpy as np from src import NeuralNetwork from typing import * def get_args() -> argparse.Namespace: """Set-up the argument parser Returns: argparse.Namespace: """ parser = argparse.ArgumentParser( description='Project 1 for the Deep Learning cl...
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import re from setuptools import setup, find_packages from distutils.core import Command class DepsCommand(Command): """A custom distutils command to print selective dependency groups. # show available dependency groups: python setup...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import re from setuptools import setup, find_packages from distutils.core import Command class DepsCommand(Command): """A custom distutils command to print selective dependency groups. # show available dependency groups: python setup...
import base64 import datetime import sys import pytest from mock import patch from nbgrader.utils import make_unique_key, notebook_hash from nbexchange.handlers.base import BaseHandler from nbexchange.tests.utils import ( AsyncSession, async_requests, clear_database, get_feedback_dict, get_files_d...
import base64 import datetime import sys import pytest from mock import patch from nbgrader.utils import make_unique_key, notebook_hash from nbexchange.handlers.base import BaseHandler from nbexchange.tests.utils import ( AsyncSession, async_requests, clear_database, get_feedback_dict, get_files_d...
import app.scripts.terminal_scripts as term import app.scripts.cloudhsm_mgmt_utility_scripts as cmu import time import json class CloudHSMMgmtUtil(): def __init__(self, eni_ip, crypto_officer_type, crypto_officer_username, crypto_officer_password): self.eni_ip = eni_ip self.crypto_officer_type =...
import app.scripts.terminal_scripts as term import app.scripts.cloudhsm_mgmt_utility_scripts as cmu import time import json class CloudHSMMgmtUtil(): def __init__(self, eni_ip, crypto_officer_type, crypto_officer_username, crypto_officer_password): self.eni_ip = eni_ip self.crypto_officer_type =...
# MIT License # Copyright (c) 2020 Dr. Jan-Philip Gehrcke # 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...
# MIT License # Copyright (c) 2020 Dr. Jan-Philip Gehrcke # 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...
from nextcord.ext import commands import json import pymongo import os class AddBadWords(commands.Cog): def __init__(self, client): self.client = client @commands.guild_only() @commands.has_permissions(send_messages=True, manage_messages=True) @commands.command(name="add-bad-words", aliases=...
from nextcord.ext import commands import json import pymongo import os class AddBadWords(commands.Cog): def __init__(self, client): self.client = client @commands.guild_only() @commands.has_permissions(send_messages=True, manage_messages=True) @commands.command(name="add-bad-words", aliases=...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved. # from __future__ import division import os import shutil import time from collections import namedtuple from io import BytesIO from logging import getLogger from typing import TYPE_CHECKING from .a...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved. # from __future__ import division import os import shutil import time from collections import namedtuple from io import BytesIO from logging import getLogger from typing import TYPE_CHECKING from .a...
LICNECE = """ Copyright © 2021 Social404 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, distribu...
LICNECE = """ Copyright © 2021 Social404 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, distribu...
from pathlib import Path from params_proto.neo_hyper import Sweep from sac_dennis_rff.config import Args, Actor, Critic, Agent from model_free_analysis import RUN with Sweep(RUN, Args, Actor, Critic, Agent) as sweep: Args.dmc = True Args.train_frames = 1_000_000 Args.env_name = 'dmc:Quadruped-run-v1' ...
from pathlib import Path from params_proto.neo_hyper import Sweep from sac_dennis_rff.config import Args, Actor, Critic, Agent from model_free_analysis import RUN with Sweep(RUN, Args, Actor, Critic, Agent) as sweep: Args.dmc = True Args.train_frames = 1_000_000 Args.env_name = 'dmc:Quadruped-run-v1' ...
# SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 """ Logger to use in all modules """ import logging import logging.config import logging.handlers import os import structlog import decisionengine.framework.modules.logging_configDict as logconf import decisionengine.fr...
# SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 """ Logger to use in all modules """ import logging import logging.config import logging.handlers import os import structlog import decisionengine.framework.modules.logging_configDict as logconf import decisionengine.fr...
# -*- coding: utf-8 -*- import os import sys import numpy as np import pandas as pd import re import matplotlib.pyplot as plt from PIL import Image, ImageDraw import colorsys from selenium import webdriver from selenium.webdriver.chrome.options import Options from measurements.name_prompt import NamePrompt sys.path....
# -*- coding: utf-8 -*- import os import sys import numpy as np import pandas as pd import re import matplotlib.pyplot as plt from PIL import Image, ImageDraw import colorsys from selenium import webdriver from selenium.webdriver.chrome.options import Options from measurements.name_prompt import NamePrompt sys.path....
# Copyright 2020-2021 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 # # Unless required by applicable law or agre...
# Copyright 2020-2021 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 # # Unless required by applicable law or agre...
# Copyright The Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT """ Holds the GitHub repository service. """ import json import os import uuid from typing import List, Union, Optional import falcon import github from github import PullRequest from github.GithubException import...
# Copyright The Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT """ Holds the GitHub repository service. """ import json import os import uuid from typing import List, Union, Optional import falcon import github from github import PullRequest from github.GithubException import...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import logging from closeio_api import APIError, Client as CloseIO_API parser = argparse.ArgumentParser( description='Assigns tasks or opportunities from one user to another' ) group_from = parser.add_mutually_exclusive_group(required=True) group_from...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import logging from closeio_api import APIError, Client as CloseIO_API parser = argparse.ArgumentParser( description='Assigns tasks or opportunities from one user to another' ) group_from = parser.add_mutually_exclusive_group(required=True) group_from...
#!/usr/bin/env python3 import sys, os from subprocess import Popen, PIPE import yaml def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) # let snakemake read job_properties from snakemake.utils import read_job_properties jobscript = sys.argv[1] job_properties = read_job_properties(jobscript)...
#!/usr/bin/env python3 import sys, os from subprocess import Popen, PIPE import yaml def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) # let snakemake read job_properties from snakemake.utils import read_job_properties jobscript = sys.argv[1] job_properties = read_job_properties(jobscript)...
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD (3-clause) from inspect import isfunction from collections import namedtuple from copy import deepcopy from...
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD (3-clause) from inspect import isfunction from collections import namedtuple from copy import deepcopy from...
import hashlib import json import logging import os from datetime import datetime from pathlib import Path import pandas as pd from airflow import DAG from airflow.models import Variable from airflow.operators.dummy import DummyOperator from airflow.operators.python import BranchPythonOperator, PythonOperator from cka...
import hashlib import json import logging import os from datetime import datetime from pathlib import Path import pandas as pd from airflow import DAG from airflow.models import Variable from airflow.operators.dummy import DummyOperator from airflow.operators.python import BranchPythonOperator, PythonOperator from cka...
#!/usr/bin/env python # Copyright 2019 ARC Centre of Excellence for Climate Extremes # author: Paola Petrelli <paola.petrelli@utas.edu.au> # # 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 # # ...
#!/usr/bin/env python # Copyright 2019 ARC Centre of Excellence for Climate Extremes # author: Paola Petrelli <paola.petrelli@utas.edu.au> # # 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 # # ...
# -*- coding: utf-8 -*- """ mslib.msui.mpl_map ~~~~~~~~~~~~~~~~~~ Map canvas for the top view. As Matplotlib's Basemap is primarily designed to produce static plots, we derived a class MapCanvas to allow for a certain degree of interactivity. MapCanvas extends Basemap by functionality to, for ...
# -*- coding: utf-8 -*- """ mslib.msui.mpl_map ~~~~~~~~~~~~~~~~~~ Map canvas for the top view. As Matplotlib's Basemap is primarily designed to produce static plots, we derived a class MapCanvas to allow for a certain degree of interactivity. MapCanvas extends Basemap by functionality to, for ...
# # 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 # "License"); you may not...
# # 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 # "License"); you may not...
# -*- coding: utf-8 -*- """ Portions of this code have been taken and modified from the "asciidag" project. Access Date: Commit: 7c1eefe3895630dc3906bbe9d553e0169202756a PermalinkURL URL: https://github.com/sambrightman/asciidag/ File: asciidag/graph.py Commit: 7c1eefe3895630dc3906bbe9d553e0169202756a Acce...
# -*- coding: utf-8 -*- """ Portions of this code have been taken and modified from the "asciidag" project. Access Date: Commit: 7c1eefe3895630dc3906bbe9d553e0169202756a PermalinkURL URL: https://github.com/sambrightman/asciidag/ File: asciidag/graph.py Commit: 7c1eefe3895630dc3906bbe9d553e0169202756a Acce...
"""jsonld admin routes.""" from aiohttp import web from aiohttp_apispec import docs, request_schema, response_schema from marshmallow import INCLUDE, Schema, fields from pydid import VerificationMethod from ...admin.request_context import AdminRequestContext from ...config.base import InjectionError from ...resolver....
"""jsonld admin routes.""" from aiohttp import web from aiohttp_apispec import docs, request_schema, response_schema from marshmallow import INCLUDE, Schema, fields from pydid import VerificationMethod from ...admin.request_context import AdminRequestContext from ...config.base import InjectionError from ...resolver....
from typing import Union, List from .workers_cheapening import * # noqa from ..base import OptionsGroup from ..typehints import Strlist from ..utils import listify class MuleFarm: """Represents a mule farm.""" def __init__(self, name: str, mule_numbers: Union[int, List[int]]): """ :param na...
from typing import Union, List from .workers_cheapening import * # noqa from ..base import OptionsGroup from ..typehints import Strlist from ..utils import listify class MuleFarm: """Represents a mule farm.""" def __init__(self, name: str, mule_numbers: Union[int, List[int]]): """ :param na...
#!/usr/bin/env python ############################################################################### # # String Encrypt WebApi interface usage example. # # In this example we will encrypt sample file with default options. # # Version : v1.0 # Language : Python # Author : Bartosz Wójcik # Project ...
#!/usr/bin/env python ############################################################################### # # String Encrypt WebApi interface usage example. # # In this example we will encrypt sample file with default options. # # Version : v1.0 # Language : Python # Author : Bartosz Wójcik # Project ...
"""This module contains some common functions for both folium and ipyleaflet. """ import csv import os import requests import shutil import tarfile import urllib.request import zipfile import folium import ipyleaflet import ipywidgets as widgets import whitebox from IPython.display import display, IFrame class Titil...
"""This module contains some common functions for both folium and ipyleaflet. """ import csv import os import requests import shutil import tarfile import urllib.request import zipfile import folium import ipyleaflet import ipywidgets as widgets import whitebox from IPython.display import display, IFrame class Titil...
import json import logging import os import uuid from collections import namedtuple from typing import ( Dict, List, Optional, ) from gxformat2 import ( from_galaxy_native, ImporterGalaxyInterface, ImportOptions, python_to_workflow, ) from pydantic import BaseModel from sqlalchemy import an...
import json import logging import os import uuid from collections import namedtuple from typing import ( Dict, List, Optional, ) from gxformat2 import ( from_galaxy_native, ImporterGalaxyInterface, ImportOptions, python_to_workflow, ) from pydantic import BaseModel from sqlalchemy import an...
from django.http.response import HttpResponse, HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.urls.base import reverse from django.views.generic import ListView from django.core.mail import send_mail from . models import Post, Comment from . form import EmailForm, CommentForm ...
from django.http.response import HttpResponse, HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.urls.base import reverse from django.views.generic import ListView from django.core.mail import send_mail from . models import Post, Comment from . form import EmailForm, CommentForm ...
from datetime import datetime CDN_BASE_URL = "https://pod-cdn.timbrook.tech" def populate_episode(doc, data): item = doc.new_tag("item") bare_tags = { "title": data["name"], "itunes:duration": data["duration"], "description": data["description"], "itunes:subtitle": data["descr...
from datetime import datetime CDN_BASE_URL = "https://pod-cdn.timbrook.tech" def populate_episode(doc, data): item = doc.new_tag("item") bare_tags = { "title": data["name"], "itunes:duration": data["duration"], "description": data["description"], "itunes:subtitle": data["descr...
from functools import partial from typing import Dict, List, Optional, Tuple from qtpy import QtCore, QtGui, QtWidgets from .signal import Signal from .utils import is_concrete_schema, iter_layout_widgets, state_property from ...._qt.widgets.qt_plugin_sorter import QtPluginSorter class SchemaWidgetMixin: on_ch...
from functools import partial from typing import Dict, List, Optional, Tuple from qtpy import QtCore, QtGui, QtWidgets from .signal import Signal from .utils import is_concrete_schema, iter_layout_widgets, state_property from ...._qt.widgets.qt_plugin_sorter import QtPluginSorter class SchemaWidgetMixin: on_ch...
import csv import matplotlib.pyplot as plt import numpy as np from collections import OrderedDict import matplotlib as mpl # import matplotlib.gridspec as gridspec from matplotlib.ticker import MaxNLocator from matplotlib.ticker import StrMethodFormatter import matplotlib.font_manager as font_manager from matplotlib.pa...
import csv import matplotlib.pyplot as plt import numpy as np from collections import OrderedDict import matplotlib as mpl # import matplotlib.gridspec as gridspec from matplotlib.ticker import MaxNLocator from matplotlib.ticker import StrMethodFormatter import matplotlib.font_manager as font_manager from matplotlib.pa...
import json import logging import asyncio import aiohttp import base64 import traceback from hailtop.utils import ( time_msecs, sleep_and_backoff, is_transient_error, time_msecs_str, humanize_timedelta_msecs) from hailtop.tls import in_cluster_ssl_client_session from gear import transaction from .globals impo...
import json import logging import asyncio import aiohttp import base64 import traceback from hailtop.utils import ( time_msecs, sleep_and_backoff, is_transient_error, time_msecs_str, humanize_timedelta_msecs) from hailtop.tls import in_cluster_ssl_client_session from gear import transaction from .globals impo...
# coding: utf-8 __author__ = 'cleardusk' import sys import argparse import cv2 import yaml import os import json # from FaceBoxes import FaceBoxes from TDDFA import TDDFA from utils.render import render from utils.render_ctypes import render # faster from utils.depth import depth # from utils.pncc import pncc # from...
# coding: utf-8 __author__ = 'cleardusk' import sys import argparse import cv2 import yaml import os import json # from FaceBoxes import FaceBoxes from TDDFA import TDDFA from utils.render import render from utils.render_ctypes import render # faster from utils.depth import depth # from utils.pncc import pncc # from...
import logging import re from pathlib import Path from typing import Any, Dict, List from hyperstyle.src.python.review.common.subprocess_runner import run_in_subprocess from hyperstyle.src.python.review.inspectors.base_inspector import BaseInspector from hyperstyle.src.python.review.inspectors.common import convert_pe...
import logging import re from pathlib import Path from typing import Any, Dict, List from hyperstyle.src.python.review.common.subprocess_runner import run_in_subprocess from hyperstyle.src.python.review.inspectors.base_inspector import BaseInspector from hyperstyle.src.python.review.inspectors.common import convert_pe...
import csv import pickle import os import logging from tqdm import tqdm, trange from torch.utils.data import TensorDataset import torch.nn.functional as F import numpy as np import torch from collections import OrderedDict from transformers.utils.dummy_tokenizers_objects import BertTokenizerFast logging.basicConfig(...
import csv import pickle import os import logging from tqdm import tqdm, trange from torch.utils.data import TensorDataset import torch.nn.functional as F import numpy as np import torch from collections import OrderedDict from transformers.utils.dummy_tokenizers_objects import BertTokenizerFast logging.basicConfig(...
import io import os import sys import django sys.path.append(os.path.join(os.path.dirname(__file__), "..")) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "infomate.settings") django.setup() import re import logging from datetime import timedelta, datetime from urllib.parse import urlparse from time import mktime imp...
import io import os import sys import django sys.path.append(os.path.join(os.path.dirname(__file__), "..")) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "infomate.settings") django.setup() import re import logging from datetime import timedelta, datetime from urllib.parse import urlparse from time import mktime imp...
"""Binary Sensor platform for Advantage Air integration.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, DEVICE_CLASS_PROBLEM, BinarySensorEntity, ) from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN from .entity import AdvantageAirEntity PARALLEL_UPDATES = 0 async def async...
"""Binary Sensor platform for Advantage Air integration.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, DEVICE_CLASS_PROBLEM, BinarySensorEntity, ) from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN from .entity import AdvantageAirEntity PARALLEL_UPDATES = 0 async def async...
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() options.headless = True path = "path/to/chromedriver.exe" # You need to change this def parser(): driver = webdriver.Chrome(path, chrome_options=options) driver.get...
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() options.headless = True path = "path/to/chromedriver.exe" # You need to change this def parser(): driver = webdriver.Chrome(path, chrome_options=options) driver.get...
import re import time import json import traceback from os import environ from hashlib import md5 from typing import List, Union from flask import (Flask, make_response, redirect, render_template, request, send_from_directory, Response) from duty.utils import gen_secret from microvk import VkApi, ...
import re import time import json import traceback from os import environ from hashlib import md5 from typing import List, Union from flask import (Flask, make_response, redirect, render_template, request, send_from_directory, Response) from duty.utils import gen_secret from microvk import VkApi, ...
import base64 import json import re import uuid from pyDes import des, CBC, PAD_PKCS5 from requests_toolbelt import MultipartEncoder from todayLoginService import TodayLoginService class AutoSign: # 初始化签到类 def __init__(self, todayLoginService: TodayLoginService, userInfo): self.session = todayLoginS...
import base64 import json import re import uuid from pyDes import des, CBC, PAD_PKCS5 from requests_toolbelt import MultipartEncoder from todayLoginService import TodayLoginService class AutoSign: # 初始化签到类 def __init__(self, todayLoginService: TodayLoginService, userInfo): self.session = todayLoginS...
import gym import os import numpy as np import lanro import argparse import glfw DEBUG = int("DEBUG" in os.environ and os.environ["DEBUG"]) def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-i', '--interactive', action='store_true', dest='interactive', help='Start interactive mode') ...
import gym import os import numpy as np import lanro import argparse import glfw DEBUG = int("DEBUG" in os.environ and os.environ["DEBUG"]) def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-i', '--interactive', action='store_true', dest='interactive', help='Start interactive mode') ...
import argparse import os from pathlib import Path import gym import gym_puddle # noqa f401 import matplotlib import matplotlib.pyplot as plt import numpy as np import seaborn as sns from utils.utils import minmax_normalization_ab matplotlib.rcParams.update({"font.size": 24}) sns.set() parser = argparse.ArgumentPa...
import argparse import os from pathlib import Path import gym import gym_puddle # noqa f401 import matplotlib import matplotlib.pyplot as plt import numpy as np import seaborn as sns from utils.utils import minmax_normalization_ab matplotlib.rcParams.update({"font.size": 24}) sns.set() parser = argparse.ArgumentPa...
# Copyright (c) 2020 Red Hat, 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 require...
# Copyright (c) 2020 Red Hat, 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 require...
#!/usr/bin/env python # Copyright 2020 The HuggingFace Team. 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...
#!/usr/bin/env python # Copyright 2020 The HuggingFace Team. 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...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import ( TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Set, Union, ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import ( TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Set, Union, ...
import os from pathlib import Path import pytest import scrapli from scrapli import Scrape UNIT_TEST_DIR = f"{Path(scrapli.__file__).parents[1]}/tests/unit/" def test__str(): conn = Scrape(host="myhost") assert str(conn) == "Scrape Object for host myhost" def test__repr(): conn = Scrape(host="myhost"...
import os from pathlib import Path import pytest import scrapli from scrapli import Scrape UNIT_TEST_DIR = f"{Path(scrapli.__file__).parents[1]}/tests/unit/" def test__str(): conn = Scrape(host="myhost") assert str(conn) == "Scrape Object for host myhost" def test__repr(): conn = Scrape(host="myhost"...
#!/usr/bin/env python3 import logging from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from collections import defaultdict from bleties.SharedFunctions import Gff, get_not_gaps logger = logging.getLogger("Insert") class Insert(object): """Insert IESs from GFF file and associat...
#!/usr/bin/env python3 import logging from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from collections import defaultdict from bleties.SharedFunctions import Gff, get_not_gaps logger = logging.getLogger("Insert") class Insert(object): """Insert IESs from GFF file and associat...
from abc import ABCMeta, abstractmethod from datetime import datetime from uuid import uuid4 from api.utils import all_subclasses CTIM_DEFAULTS = { 'schema_version': '1.0.17', } RESOLVED_TO = 'Resolved_To' class Mapping(metaclass=ABCMeta): def __init__(self, observable): self.observable = observab...
from abc import ABCMeta, abstractmethod from datetime import datetime from uuid import uuid4 from api.utils import all_subclasses CTIM_DEFAULTS = { 'schema_version': '1.0.17', } RESOLVED_TO = 'Resolved_To' class Mapping(metaclass=ABCMeta): def __init__(self, observable): self.observable = observab...
import asyncio import aiohttp import pandas from concurrent.futures import ThreadPoolExecutor from fpl import FPL from fpl.constants import API_URLS from fpl.utils import fetch, logged_in class FPLTransfers(): ''' ''' def __init__(self, email=None, password=None): ''' Placeholder - the...
import asyncio import aiohttp import pandas from concurrent.futures import ThreadPoolExecutor from fpl import FPL from fpl.constants import API_URLS from fpl.utils import fetch, logged_in class FPLTransfers(): ''' ''' def __init__(self, email=None, password=None): ''' Placeholder - the...
import asyncio import json import os import time import warnings import wave from queue import Queue from typing import Callable import numpy as np import pvporcupine import sounddevice as sd import vosk from fluxhelper import osInterface from speech_recognition import AudioFile, Recognizer, UnknownValueError from ten...
import asyncio import json import os import time import warnings import wave from queue import Queue from typing import Callable import numpy as np import pvporcupine import sounddevice as sd import vosk from fluxhelper import osInterface from speech_recognition import AudioFile, Recognizer, UnknownValueError from ten...
# ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com) # ----------------------------------------------------- import torch.nn as nn from .builder import SPPE from .layers.DUC import DUC from .layers...
# ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com) # ----------------------------------------------------- import torch.nn as nn from .builder import SPPE from .layers.DUC import DUC from .layers...
from twocaptcha import TwoCaptcha from scrapy import Selector from src.core.request import RequestHandler from src.core.captcha import CaptchaHandler from src.core.logging import log from src.settings import SPIDERS_SETTINGS, CAPTCHA from src.utils.format import format_cpf from src.utils.extract import extract_set_coo...
from twocaptcha import TwoCaptcha from scrapy import Selector from src.core.request import RequestHandler from src.core.captcha import CaptchaHandler from src.core.logging import log from src.settings import SPIDERS_SETTINGS, CAPTCHA from src.utils.format import format_cpf from src.utils.extract import extract_set_coo...
# Lint as: python3 # Copyright 2018 The TensorFlow Authors. 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 ...
# Lint as: python3 # Copyright 2018 The TensorFlow Authors. 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 ...
# dodo.py import ast import asyncio import contextlib import dataclasses import datetime import functools import io import itertools import json import os import pathlib import re import shutil import sys import textwrap import typing import aiofiles import flit import git import packaging.requirements import pathspec...
# dodo.py import ast import asyncio import contextlib import dataclasses import datetime import functools import io import itertools import json import os import pathlib import re import shutil import sys import textwrap import typing import aiofiles import flit import git import packaging.requirements import pathspec...
from enum import Enum from typing import Any, Dict, List, Optional from rest_framework import serializers from rest_framework.exceptions import NotFound, ValidationError from web3.exceptions import BadFunctionCallOutput from gnosis.eth import EthereumClientProvider from gnosis.eth.django.serializers import (EthereumA...
from enum import Enum from typing import Any, Dict, List, Optional from rest_framework import serializers from rest_framework.exceptions import NotFound, ValidationError from web3.exceptions import BadFunctionCallOutput from gnosis.eth import EthereumClientProvider from gnosis.eth.django.serializers import (EthereumA...
import os from algorithms.settings import INFERENCE_MODEL from algorithms.io.aws_connection_definition import download_aws_folder, download_aws_file from algorithms.io.path_definition import get_project_dir if __name__ == "__main__": download_aws_folder(f"data/app/models/YOLO/{INFERENCE_MODEL["YOLO"]}/", ...
import os from algorithms.settings import INFERENCE_MODEL from algorithms.io.aws_connection_definition import download_aws_folder, download_aws_file from algorithms.io.path_definition import get_project_dir if __name__ == "__main__": download_aws_folder(f"data/app/models/YOLO/{INFERENCE_MODEL['YOLO']}/", ...
import os import urllib from cached_property import cached_property from ebi_eva_common_pyutils.pg_utils import get_all_results_for_query from eva_submission.eload_submission import Eload from eva_submission.eload_utils import get_reference_fasta_and_report, get_project_alias, download_file class EloadBacklog(Eload...
import os import urllib from cached_property import cached_property from ebi_eva_common_pyutils.pg_utils import get_all_results_for_query from eva_submission.eload_submission import Eload from eva_submission.eload_utils import get_reference_fasta_and_report, get_project_alias, download_file class EloadBacklog(Eload...
import os from os.path import join import shutil import subprocess import numpy.random as npr import numpy as np import scipy.stats from dipy.io.image import load_nifti, save_nifti from dipy.io import read_bvals_bvecs from dipy.segment.mask import median_otsu from dipy.reconst.csdeconv import ConstrainedSphericalDecon...
import os from os.path import join import shutil import subprocess import numpy.random as npr import numpy as np import scipy.stats from dipy.io.image import load_nifti, save_nifti from dipy.io import read_bvals_bvecs from dipy.segment.mask import median_otsu from dipy.reconst.csdeconv import ConstrainedSphericalDecon...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import pytest import sys from sys import platform from pathlib import Path from threading import Event, Thread from time import sleep, time from queue import Queue from openvino.inference_engine import IENetwork, IECore, Execu...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import pytest import sys from sys import platform from pathlib import Path from threading import Event, Thread from time import sleep, time from queue import Queue from openvino.inference_engine import IENetwork, IECore, Execu...
import json import requests import os import csv class MakeDataSet: def __init__(self,data): self.data = data self.fileType = "" self.logError = { "errorVoc" : [], "errorId" : [], "errReport" : [] } # # errorVoc format => { ...
import json import requests import os import csv class MakeDataSet: def __init__(self,data): self.data = data self.fileType = "" self.logError = { "errorVoc" : [], "errorId" : [], "errReport" : [] } # # errorVoc format => { ...
import contextlib import glob import os import platform import shutil import subprocess import sys import tempfile # dependencies that are always installed REQUIRED_DEPS = [ "git", "jupyter", "numpy", "matplotlib", "h5py", "cython", "nose", "sympy", "setuptools", ] # dependencies t...
import contextlib import glob import os import platform import shutil import subprocess import sys import tempfile # dependencies that are always installed REQUIRED_DEPS = [ "git", "jupyter", "numpy", "matplotlib", "h5py", "cython", "nose", "sympy", "setuptools", ] # dependencies t...
from __future__ import annotations from typing import Any, List, Union, Collection, TYPE_CHECKING, Optional import O365.message as message import O365.utils.utils as utils from subtypes import Str, Html from pathmagic import Dir, PathLike, File from ..attribute import Attribute, NonFilterableAttribute, EnumerativeA...
from __future__ import annotations from typing import Any, List, Union, Collection, TYPE_CHECKING, Optional import O365.message as message import O365.utils.utils as utils from subtypes import Str, Html from pathmagic import Dir, PathLike, File from ..attribute import Attribute, NonFilterableAttribute, EnumerativeA...
import torch from vision.ssd.vgg_ssd import create_vgg_ssd, create_vgg_ssd_predictor from vision.ssd.mobilenetv1_ssd import create_mobilenetv1_ssd, create_mobilenetv1_ssd_predictor from vision.ssd.mobilenetv1_ssd_lite import create_mobilenetv1_ssd_lite, create_mobilenetv1_ssd_lite_predictor from vision.ssd.mobilenet_v2...
import torch from vision.ssd.vgg_ssd import create_vgg_ssd, create_vgg_ssd_predictor from vision.ssd.mobilenetv1_ssd import create_mobilenetv1_ssd, create_mobilenetv1_ssd_predictor from vision.ssd.mobilenetv1_ssd_lite import create_mobilenetv1_ssd_lite, create_mobilenetv1_ssd_lite_predictor from vision.ssd.mobilenet_v2...
from collections import namedtuple from datetime import datetime, timedelta from functools import partial from pathlib import Path from typing import Generator, Union, Iterable from dateutil.tz import tzlocal from .casters import cast_date, cast_default, cast_recurrence, cast_int class Calendar: _key_map = { ...
from collections import namedtuple from datetime import datetime, timedelta from functools import partial from pathlib import Path from typing import Generator, Union, Iterable from dateutil.tz import tzlocal from .casters import cast_date, cast_default, cast_recurrence, cast_int class Calendar: _key_map = { ...
"""Utilities defining "Galaxy Flavored Markdown". This is an extension of markdown designed to allow rendering Galaxy object references. The core "Galaxy Flavored Markdown" format should just reference objects by encoded IDs - but preprocessing should allow for instance workflow objects to be referenced relative to t...
"""Utilities defining "Galaxy Flavored Markdown". This is an extension of markdown designed to allow rendering Galaxy object references. The core "Galaxy Flavored Markdown" format should just reference objects by encoded IDs - but preprocessing should allow for instance workflow objects to be referenced relative to t...
from typing import List from dispatch.config import INCIDENT_PLUGIN_CONTACT_SLUG from dispatch.decorators import background_task from dispatch.incident import flows as incident_flows from dispatch.participant import service as participant_service from dispatch.participant_role import service as participant_role_servi...
from typing import List from dispatch.config import INCIDENT_PLUGIN_CONTACT_SLUG from dispatch.decorators import background_task from dispatch.incident import flows as incident_flows from dispatch.participant import service as participant_service from dispatch.participant_role import service as participant_role_servi...
from math import dist import requests, json, time import tkinter as tk root=tk.Tk() root.geometry("425x300") root.title('Tamil Nadu COVID-19 Tracker App') root['bg']='yellow' day = str(time.localtime().tm_mday) + '.' + str(time.localtime().tm_mon) + '.' + str(time.localtime().tm_year) district = tk.StringVar()...
from math import dist import requests, json, time import tkinter as tk root=tk.Tk() root.geometry("425x300") root.title('Tamil Nadu COVID-19 Tracker App') root['bg']='yellow' day = str(time.localtime().tm_mday) + '.' + str(time.localtime().tm_mon) + '.' + str(time.localtime().tm_year) district = tk.StringVar()...
"""'Callbacks' are what enable the "reactive" functionality of a Python Dash web application (literally, the react.js). Every time a user interacts with a UI component on the web app page in their browser, a callback with matching Input (via the component's 'id' attribute) from this module is activated, thus allowing c...
"""'Callbacks' are what enable the "reactive" functionality of a Python Dash web application (literally, the react.js). Every time a user interacts with a UI component on the web app page in their browser, a callback with matching Input (via the component's 'id' attribute) from this module is activated, thus allowing c...
import logging from reconcile import queries from reconcile.slack_base import slackapi_from_slack_workspace from reconcile.utils.unleash import get_feature_toggles from reconcile.utils.slack_api import SlackApi from reconcile.utils.secret_reader import SecretReader from reconcile.utils.state import State QONTRACT_IN...
import logging from reconcile import queries from reconcile.slack_base import slackapi_from_slack_workspace from reconcile.utils.unleash import get_feature_toggles from reconcile.utils.slack_api import SlackApi from reconcile.utils.secret_reader import SecretReader from reconcile.utils.state import State QONTRACT_IN...
import asyncio import functools import inspect import json import math import os import random import re import sys import threading import time import uuid import warnings from argparse import ArgumentParser, Namespace from collections.abc import MutableMapping from datetime import datetime from itertools import islic...
import asyncio import functools import inspect import json import math import os import random import re import sys import threading import time import uuid import warnings from argparse import ArgumentParser, Namespace from collections.abc import MutableMapping from datetime import datetime from itertools import islic...
import logging from selenium import webdriver import json from abprocess.authenticator import Authenticator from abprocess.booking_course import BookingCourse from datetime import datetime from abprocess.logger import LogFileHandler from abprocess.process import Process import os logger = logging.getLogger() LogFile...
import logging from selenium import webdriver import json from abprocess.authenticator import Authenticator from abprocess.booking_course import BookingCourse from datetime import datetime from abprocess.logger import LogFileHandler from abprocess.process import Process import os logger = logging.getLogger() LogFile...
from os import system from pip._internal.utils.misc import get_installed_distributions from runas import runas def check_dependencies(): """Install all the dependencies listed within requirements.txt""" with open('requirements.txt', 'r') as dependencies: dependencies = set(dependencies.read().split())...
from os import system from pip._internal.utils.misc import get_installed_distributions from runas import runas def check_dependencies(): """Install all the dependencies listed within requirements.txt""" with open('requirements.txt', 'r') as dependencies: dependencies = set(dependencies.read().split())...
from httprunner.loader import load_folder_files, load_test_file from httprunner.make import format_pytest_with_black, make_testcase, make_testsuite from loguru import logger from sentry_sdk import capture_message from httprunner.compat import ensure_cli_args, ensure_testcase_v3_api import os import pytest from httprunn...
from httprunner.loader import load_folder_files, load_test_file from httprunner.make import format_pytest_with_black, make_testcase, make_testsuite from loguru import logger from sentry_sdk import capture_message from httprunner.compat import ensure_cli_args, ensure_testcase_v3_api import os import pytest from httprunn...
import numpy as np import cv2 from numpy.core.fromnumeric import trace import mediapipe_utils as mpu from pathlib import Path from FPS import FPS, now import depthai as dai import marshal import sys from string import Template from math import sin, cos SCRIPT_DIR = Path(__file__).resolve().parent POSE_DETECTION_MODEL ...
import numpy as np import cv2 from numpy.core.fromnumeric import trace import mediapipe_utils as mpu from pathlib import Path from FPS import FPS, now import depthai as dai import marshal import sys from string import Template from math import sin, cos SCRIPT_DIR = Path(__file__).resolve().parent POSE_DETECTION_MODEL ...
import os.path import re import sys version = sys.argv[2] lib_suffix = "" if len(sys.argv) < 4 else sys.argv[3] with open(sys.argv[1], "r") as f_in: with open("static_link.sh", "w") as f_out: if os.path.isfile(f"libtensorflow_framework.{version}.dylib-2.params"): p_cd = re.compile(r"...
import os.path import re import sys version = sys.argv[2] lib_suffix = "" if len(sys.argv) < 4 else sys.argv[3] with open(sys.argv[1], "r") as f_in: with open("static_link.sh", "w") as f_out: if os.path.isfile(f"libtensorflow_framework.{version}.dylib-2.params"): p_cd = re.compile(r"...
from pymongo import MongoClient from src.types.messages import MESSAGES_TYPES, Message from .base import BaseStorage class MongoDBStorage(BaseStorage): """ Message storage with MongoDB as backend. """ def __init__(self, host: str, port: int, db: str, collection: str): self._client = MongoCl...
from pymongo import MongoClient from src.types.messages import MESSAGES_TYPES, Message from .base import BaseStorage class MongoDBStorage(BaseStorage): """ Message storage with MongoDB as backend. """ def __init__(self, host: str, port: int, db: str, collection: str): self._client = MongoCl...
import random import time import numpy as np from carla.agents.core import ActorCritic from carla.agents.utils.dummy_vec_env import DummyVecEnv from carla.agents.utils.pytorch_utils import dict_obs_to_tensor, merge_dict_obs_list, merge_list_of_dicts from carla.agents.utils.subproc_vec_env import SubprocVecEnv from ...
import random import time import numpy as np from carla.agents.core import ActorCritic from carla.agents.utils.dummy_vec_env import DummyVecEnv from carla.agents.utils.pytorch_utils import dict_obs_to_tensor, merge_dict_obs_list, merge_list_of_dicts from carla.agents.utils.subproc_vec_env import SubprocVecEnv from ...
import sys import googleapiclient.discovery from ultideploy import constants, credentials, resources def bootstrap(args): google_credentials = credentials.default_google_credentials() organization = resources.get_organization( f"organizations/{args.organization_id}", google_credentials ) p...
import sys import googleapiclient.discovery from ultideploy import constants, credentials, resources def bootstrap(args): google_credentials = credentials.default_google_credentials() organization = resources.get_organization( f"organizations/{args.organization_id}", google_credentials ) p...
""" Module for applying conditional formatting to DataFrames and Series. """ from collections import defaultdict from contextlib import contextmanager import copy from functools import partial from itertools import product from typing import ( Any, Callable, DefaultDict, Dict, List, Optional, ...
""" Module for applying conditional formatting to DataFrames and Series. """ from collections import defaultdict from contextlib import contextmanager import copy from functools import partial from itertools import product from typing import ( Any, Callable, DefaultDict, Dict, List, Optional, ...
# Copyright (c) OpenMMLab. All rights reserved. import copy import math import warnings from typing import Sequence import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import (Linear, build_activation_layer, build_conv_layer, build_norm_layer) from mmcv.runner.base_m...
# Copyright (c) OpenMMLab. All rights reserved. import copy import math import warnings from typing import Sequence import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import (Linear, build_activation_layer, build_conv_layer, build_norm_layer) from mmcv.runner.base_m...
import os import time print('Por favor, digite abaixo os valores da equação.') a = str(input('\nValor de A: ')) b = str(input('Valor de B: ')) c = str(input('Valor de C: ')) print('\nAguarde um instante...') time.sleep(1) os.system('cls || clear') print('='*50 + '\n' + f'{'Resolução':^50}' + '\n' + '='...
import os import time print('Por favor, digite abaixo os valores da equação.') a = str(input('\nValor de A: ')) b = str(input('Valor de B: ')) c = str(input('Valor de C: ')) print('\nAguarde um instante...') time.sleep(1) os.system('cls || clear') print('='*50 + '\n' + f'{"Resolução":^50}' + '\n' + '='...
# (C) Copyright 2014, Google Inc. # (C) Copyright 2018, James R Barlow # 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 applicab...
# (C) Copyright 2014, Google Inc. # (C) Copyright 2018, James R Barlow # 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 applicab...
import abc import asyncio import logging import typing as t from collections import namedtuple from functools import partial import discord from discord import Guild, HTTPException, Member, Message, Reaction, User from discord.ext.commands import Context from bot import constants from bot.api import ResponseCodeError...
import abc import asyncio import logging import typing as t from collections import namedtuple from functools import partial import discord from discord import Guild, HTTPException, Member, Message, Reaction, User from discord.ext.commands import Context from bot import constants from bot.api import ResponseCodeError...
nome = str(input('Digite o seu nome: ')) i = int(input('Digite a sua idade: ')) p = float(input('Digite o seu peso: ')) a = float(input('Digite a sua altura: ')) imc = p/a**2 print(f"{"":=^20}") print(f"{"Ficha IMC":^20}") print(f"{"":=^20}") print('Nome: {}'.format(nome)) print('Idade: {}'.format(i)) print('Peso: {}kg...
nome = str(input('Digite o seu nome: ')) i = int(input('Digite a sua idade: ')) p = float(input('Digite o seu peso: ')) a = float(input('Digite a sua altura: ')) imc = p/a**2 print(f"{'':=^20}") print(f"{'Ficha IMC':^20}") print(f"{'':=^20}") print('Nome: {}'.format(nome)) print('Idade: {}'.format(i)) print('Peso: {}kg...