edited_code
stringlengths
17
978k
original_code
stringlengths
17
978k
""" Input: tsv file in the form Input Video filename | topic | subtopic | title greek | title english | start time | end time | delete segments input.mp4 | 1 | 1 | έξοδος | output | 00:10:05 | 00:30:10 | 00:11:15-00:12:30,00:20:35-00:22:10 """ import os import subprocess import sys...
""" Input: tsv file in the form Input Video filename | topic | subtopic | title greek | title english | start time | end time | delete segments input.mp4 | 1 | 1 | έξοδος | output | 00:10:05 | 00:30:10 | 00:11:15-00:12:30,00:20:35-00:22:10 """ import os import subprocess import sys...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Analyze CSV file into scores. Created on Sat Feb 12 22:15:29 2022 // @hk_nien """ from pathlib import Path import os import re import sys import pandas as pd import numpy as np PCODES = dict([ # Regio Noord (1011, 'Amsterdam'), (1625, 'Hoorn|Zwaag'), ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Analyze CSV file into scores. Created on Sat Feb 12 22:15:29 2022 // @hk_nien """ from pathlib import Path import os import re import sys import pandas as pd import numpy as np PCODES = dict([ # Regio Noord (1011, 'Amsterdam'), (1625, 'Hoorn|Zwaag'), ...
# 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 u...
# 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 u...
import logging import azure.functions as func import json import os from azure.cosmosdb.table.tableservice import TableService from azure.cosmosdb.table.models import Entity def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') # Connect to Azu...
import logging import azure.functions as func import json import os from azure.cosmosdb.table.tableservice import TableService from azure.cosmosdb.table.models import Entity def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') # Connect to Azu...
import datetime import logging import traceback from dis_snek.models import ComponentContext from dis_snek.models import InteractionContext from ElevatorBot.misc.formating import embed_message def get_now_with_tz() -> datetime.datetime: """Returns the current datetime (timezone aware)""" return datetime.da...
import datetime import logging import traceback from dis_snek.models import ComponentContext from dis_snek.models import InteractionContext from ElevatorBot.misc.formating import embed_message def get_now_with_tz() -> datetime.datetime: """Returns the current datetime (timezone aware)""" return datetime.da...
from datetime import datetime import cv2 import re import base64 from flask import Flask, render_template, request, jsonify from flask_cors import CORS import numpy as np from io import BytesIO from PIL import Image, ImageOps import os,sys import requests from graphpipe import remote from matplotlib import pylab as pl...
from datetime import datetime import cv2 import re import base64 from flask import Flask, render_template, request, jsonify from flask_cors import CORS import numpy as np from io import BytesIO from PIL import Image, ImageOps import os,sys import requests from graphpipe import remote from matplotlib import pylab as pl...
import abc import enum import itertools import logging import uuid from copy import deepcopy from typing import Any, Dict, List, MutableMapping, Optional, Union from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from ruamel.yaml.compat import StringIO import great_expectations.exceptions as ge...
import abc import enum import itertools import logging import uuid from copy import deepcopy from typing import Any, Dict, List, MutableMapping, Optional, Union from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from ruamel.yaml.compat import StringIO import great_expectations.exceptions as ge...
""" This is an end to end release test automation script used to kick off periodic release tests, running on Anyscale. The tool leverages app configs and compute templates. Calling this script will run a single release test. Example: python e2e.py --test-config ~/ray/release/xgboost_tests/xgboost_tests.yaml --test-...
""" This is an end to end release test automation script used to kick off periodic release tests, running on Anyscale. The tool leverages app configs and compute templates. Calling this script will run a single release test. Example: python e2e.py --test-config ~/ray/release/xgboost_tests/xgboost_tests.yaml --test-...
"""Option helper functions""" __docformat__ = "numpy" import argparse from typing import List import pandas as pd import numpy as np from gamestonk_terminal.helper_funcs import ( parse_known_args_and_warn, check_non_negative, ) # pylint: disable=R1710 def load(other_args: List[str]) -> str: """Load ti...
"""Option helper functions""" __docformat__ = "numpy" import argparse from typing import List import pandas as pd import numpy as np from gamestonk_terminal.helper_funcs import ( parse_known_args_and_warn, check_non_negative, ) # pylint: disable=R1710 def load(other_args: List[str]) -> str: """Load ti...
# Copyright 2020 - 2021 MONAI Consortium # 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 agreed to in wri...
# Copyright 2020 - 2021 MONAI Consortium # 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 agreed to in wri...
# mypy: allow-untyped-defs from unittest import mock import pytest from tools.ci.tc import decision @pytest.mark.parametrize("run_jobs,tasks,expected", [ ([], {"task-no-schedule-if": {}}, ["task-no-schedule-if"]), ([], {"task-schedule-if-no-run-job": {"schedule-if": {}}}, []), (["job"], {"job-pres...
# mypy: allow-untyped-defs from unittest import mock import pytest from tools.ci.tc import decision @pytest.mark.parametrize("run_jobs,tasks,expected", [ ([], {"task-no-schedule-if": {}}, ["task-no-schedule-if"]), ([], {"task-schedule-if-no-run-job": {"schedule-if": {}}}, []), (["job"], {"job-pres...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
import os import pytest import sys import random import tempfile import requests from pathlib import Path import ray from ray.test_utils import (run_string_as_driver, run_string_as_driver_nonblocking) from ray._private.utils import (get_wheel_filename, get_master_wheel_url, ...
import os import pytest import sys import random import tempfile import requests from pathlib import Path import ray from ray.test_utils import (run_string_as_driver, run_string_as_driver_nonblocking) from ray._private.utils import (get_wheel_filename, get_master_wheel_url, ...
# coding: utf-8 # @author octopoulo <polluxyz@gmail.com> # @version 2020-05-01 """ Sync """ import gzip from logging import getLogger import os import re import shutil from subprocess import run from time import time from typing import Any from PIL import Image, ImageFile from common import makedirs_safe, read_text...
# coding: utf-8 # @author octopoulo <polluxyz@gmail.com> # @version 2020-05-01 """ Sync """ import gzip from logging import getLogger import os import re import shutil from subprocess import run from time import time from typing import Any from PIL import Image, ImageFile from common import makedirs_safe, read_text...
import logging import logging.handlers import sys import os import json import sqlite3 import signal import threading import time import difflib import vk_api from vk_api.longpoll import VkLongPoll, VkEventType import requests.exceptions cwd = os.path.dirname(os.path.abspath(__file__)) logging.basicConfig( format=...
import logging import logging.handlers import sys import os import json import sqlite3 import signal import threading import time import difflib import vk_api from vk_api.longpoll import VkLongPoll, VkEventType import requests.exceptions cwd = os.path.dirname(os.path.abspath(__file__)) logging.basicConfig( format=...
import numpy as np import pyqtgraph as pg from datetime import datetime, timedelta from vnpy.trader.constant import Interval, Direction, Offset from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtCore, QtWidgets, QtGui from vnpy.trader.ui.widget import BaseMonitor, BaseCell, DirectionCell, EnumCell ...
import numpy as np import pyqtgraph as pg from datetime import datetime, timedelta from vnpy.trader.constant import Interval, Direction, Offset from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtCore, QtWidgets, QtGui from vnpy.trader.ui.widget import BaseMonitor, BaseCell, DirectionCell, EnumCell ...
#!/usr/bin/env python """ Predefined bluesky scan plans """ import numpy as np import bluesky.plans as bp import bluesky.preprocessors as bpp import bluesky.plan_stubs as bps from .utility import load_config #@bpp.run_decorator() def collect_white_field(experiment, cfg_tomo, at...
#!/usr/bin/env python """ Predefined bluesky scan plans """ import numpy as np import bluesky.plans as bp import bluesky.preprocessors as bpp import bluesky.plan_stubs as bps from .utility import load_config #@bpp.run_decorator() def collect_white_field(experiment, cfg_tomo, at...
"""Provides the Objector class.""" from json import loads from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from .exceptions import ClientException, RedditAPIException from .models.reddit.base import RedditBase from .util import snake_case_keys if TYPE_CHECKING: # pragma: no cover from ... impo...
"""Provides the Objector class.""" from json import loads from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from .exceptions import ClientException, RedditAPIException from .models.reddit.base import RedditBase from .util import snake_case_keys if TYPE_CHECKING: # pragma: no cover from ... impo...
import numpy as np def FNS(scores): domination = np.all(scores[:, None, :] <= scores[None, :, :], axis=2) # domination[i, j] = "i dominuje j" domination &= np.any(scores[:, None, :] < scores[None, :, :], axis=2) Nx = domination.sum(0) Pf = [] ranks = np.zeros(scores.shape[0]) r = 0 Q = n...
import numpy as np def FNS(scores): domination = np.all(scores[:, None, :] <= scores[None, :, :], axis=2) # domination[i, j] = "i dominuje j" domination &= np.any(scores[:, None, :] < scores[None, :, :], axis=2) Nx = domination.sum(0) Pf = [] ranks = np.zeros(scores.shape[0]) r = 0 Q = n...
from loguru import logger from flask import request from flasgger import swag_from from flask_restful import Resource from jwt.exceptions import ExpiredSignatureError from ada_friend_app.modulo.cripto import Sha256 from ada_friend_app.modulo.jwt_auth import Token from ada_friend_app.api.resposta_api import Resposta fr...
from loguru import logger from flask import request from flasgger import swag_from from flask_restful import Resource from jwt.exceptions import ExpiredSignatureError from ada_friend_app.modulo.cripto import Sha256 from ada_friend_app.modulo.jwt_auth import Token from ada_friend_app.api.resposta_api import Resposta fr...
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Also available under a BSD-style license. See LICENSE. """Queries the pytorch op registry and generates ODS and CC sourc...
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Also available under a BSD-style license. See LICENSE. """Queries the pytorch op registry and generates ODS and CC sourc...
import asyncio import logging import time from datetime import datetime from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple from blspy import PrivateKey, G1Element from seno.cmds.init_funcs import check_keys from seno.consensus.block_rewards import calculate_base_farmer_reward from seno....
import asyncio import logging import time from datetime import datetime from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple from blspy import PrivateKey, G1Element from seno.cmds.init_funcs import check_keys from seno.consensus.block_rewards import calculate_base_farmer_reward from seno....
from os import system def comprar(comida, juguetes): comprado = "" while not comprado: system("cls") comprar = (input("Que quiere comprar? Alimentos | Juguetes : ")).lower() if comprar == "alimento": print(f"Carne: {comida["carne"]["cantidad"]}|Agua: {comida["agua"]["cantidad"]}|Huesos: {comida["hueso"...
from os import system def comprar(comida, juguetes): comprado = "" while not comprado: system("cls") comprar = (input("Que quiere comprar? Alimentos | Juguetes : ")).lower() if comprar == "alimento": print(f"Carne: {comida['carne']['cantidad']}|Agua: {comida['agua']['cantidad']}|Huesos: {comida['hueso'...
import operator from functools import reduce from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.db.models import Q, Sum from django.shortcuts import HttpResponse, get_object_or_404, redirect, render from django.views.generic import View from django.view...
import operator from functools import reduce from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.db.models import Q, Sum from django.shortcuts import HttpResponse, get_object_or_404, redirect, render from django.views.generic import View from django.view...
import json import os import sys import disnake from disnake.ext import commands from disnake.ext.commands import Context from helpers import json_manager, checks import logging if not os.path.isfile("../config.json"): sys.exit("'config.json' not found by general-normal! Please add it and try again.") else: ...
import json import os import sys import disnake from disnake.ext import commands from disnake.ext.commands import Context from helpers import json_manager, checks import logging if not os.path.isfile("../config.json"): sys.exit("'config.json' not found by general-normal! Please add it and try again.") else: ...
from os import ( startfile, getcwd ) from os.path import join from io import BytesIO from csv import ( writer, excel ) from openpyxl import ( Workbook, load_workbook ) from statistics import ( mean, variance, stdev ) from treetopper.plot import Plot from treetopper.timber import ( ...
from os import ( startfile, getcwd ) from os.path import join from io import BytesIO from csv import ( writer, excel ) from openpyxl import ( Workbook, load_workbook ) from statistics import ( mean, variance, stdev ) from treetopper.plot import Plot from treetopper.timber import ( ...
from typing import Tuple, Union, Callable, Optional, Sequence from pytest_mock import MockerFixture import pytest import numpy as np import dask.array as da from squidpy.im import ( segment, ImageContainer, SegmentationCustom, SegmentationWatershed, ) from squidpy.im._segment import _SEG_DTYPE from sq...
from typing import Tuple, Union, Callable, Optional, Sequence from pytest_mock import MockerFixture import pytest import numpy as np import dask.array as da from squidpy.im import ( segment, ImageContainer, SegmentationCustom, SegmentationWatershed, ) from squidpy.im._segment import _SEG_DTYPE from sq...
def destructure(obj, *params): import operator return operator.itemgetter(*params)(obj) def greet(**kwargs): year, day, puzzle = destructure(kwargs, 'year', 'day', 'puzzle') print('Advent of Code') print(f'-> {year}-{day}-{puzzle}') print('--------------') def load_data(filename): with fil...
def destructure(obj, *params): import operator return operator.itemgetter(*params)(obj) def greet(**kwargs): year, day, puzzle = destructure(kwargs, 'year', 'day', 'puzzle') print('Advent of Code') print(f'-> {year}-{day}-{puzzle}') print('--------------') def load_data(filename): with fil...
import os import pytest import sys import random import tempfile import time import requests from pathlib import Path import ray from ray.exceptions import RuntimeEnvSetupError from ray._private.test_utils import ( run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition) from ray._private.utils ...
import os import pytest import sys import random import tempfile import time import requests from pathlib import Path import ray from ray.exceptions import RuntimeEnvSetupError from ray._private.test_utils import ( run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition) from ray._private.utils ...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import configparser import getpass import itertools import os import re from abc import ABC, abstractmethod from dataclasses import dataclass from funct...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import configparser import getpass import itertools import os import re from abc import ABC, abstractmethod from dataclasses import dataclass from funct...
import urllib import jose.jwt import time import random import sys import requests from flask import Flask, request, redirect, make_response, jsonify import subprocess # seconds until the token expires TOKEN_EXPIRES = 2 # A mocked out oauth server, which serves all the endpoints needed by the oauth type. class MockO...
import urllib import jose.jwt import time import random import sys import requests from flask import Flask, request, redirect, make_response, jsonify import subprocess # seconds until the token expires TOKEN_EXPIRES = 2 # A mocked out oauth server, which serves all the endpoints needed by the oauth type. class MockO...
__author__ = 'Alexandre Calil Martins Fonseca, github: xandao6' # region TUTORIAL ''' Go to region 'FOR SCRIPTING' and use the methods in your script! EXAMPLE OF USAGE: from wplay.pyppeteerUtils import pyppeteerConfig as pypConfig from wplay.pyppeteerUtils import pyppeteerSearch as pypSearch async def my_script(tar...
__author__ = 'Alexandre Calil Martins Fonseca, github: xandao6' # region TUTORIAL ''' Go to region 'FOR SCRIPTING' and use the methods in your script! EXAMPLE OF USAGE: from wplay.pyppeteerUtils import pyppeteerConfig as pypConfig from wplay.pyppeteerUtils import pyppeteerSearch as pypSearch async def my_script(tar...
import importlib import json import os import shutil import subprocess from pathlib import Path from shutil import which from typing import List, Optional, Tuple from setuptools import find_packages from typer import Argument, Option, Typer from .paths import ( GLOBAL_APP_DIR, GLOBAL_EXTENSIONS_DIR, GLOBA...
import importlib import json import os import shutil import subprocess from pathlib import Path from shutil import which from typing import List, Optional, Tuple from setuptools import find_packages from typer import Argument, Option, Typer from .paths import ( GLOBAL_APP_DIR, GLOBAL_EXTENSIONS_DIR, GLOBA...
"""Helper functions for the distribution.""" import importlib import json import pathlib import subprocess import sys import types import os from typing import Optional, List import requests import repobee_plug as plug import _repobee.ext from _repobee import distinfo from _repobee import plugin class DependencyRe...
"""Helper functions for the distribution.""" import importlib import json import pathlib import subprocess import sys import types import os from typing import Optional, List import requests import repobee_plug as plug import _repobee.ext from _repobee import distinfo from _repobee import plugin class DependencyRe...
# # Copyright (c) 2018 Via Technology Ltd. All Rights Reserved. # Consult your license regarding permissions and restrictions. # """ operations related to airspaces and intersections. """ from psycopg2 import Error, InternalError from psycopg2.extensions import AsIs from psycopg2.extras import DictCursor from itertoo...
# # Copyright (c) 2018 Via Technology Ltd. All Rights Reserved. # Consult your license regarding permissions and restrictions. # """ operations related to airspaces and intersections. """ from psycopg2 import Error, InternalError from psycopg2.extensions import AsIs from psycopg2.extras import DictCursor from itertoo...
import builtins import os from rich.repr import RichReprResult import sys from array import array from collections import Counter, defaultdict, deque, UserDict, UserList import dataclasses from dataclasses import dataclass, fields, is_dataclass from inspect import isclass from itertools import islice import re from typ...
import builtins import os from rich.repr import RichReprResult import sys from array import array from collections import Counter, defaultdict, deque, UserDict, UserList import dataclasses from dataclasses import dataclass, fields, is_dataclass from inspect import isclass from itertools import islice import re from typ...
import logging import os import traceback from datetime import datetime, time, timezone from random import Random, choice import disnake from disnake.ext import tasks from disnake.ext.commands import BucketType, cooldown, guild_only from bot.bot import command, group, has_permissions from bot.globals import PLAYLISTS...
import logging import os import traceback from datetime import datetime, time, timezone from random import Random, choice import disnake from disnake.ext import tasks from disnake.ext.commands import BucketType, cooldown, guild_only from bot.bot import command, group, has_permissions from bot.globals import PLAYLISTS...
#!/usr/local/sal/Python.framework/Versions/Current/bin/python3 import datetime import pathlib import plistlib import sys import sal sys.path.insert(0, "/usr/local/munki") from munkilib import munkicommon __version__ = "1.2.0" def main(): # If we haven't successfully submitted to Sal, pull the existing #...
#!/usr/local/sal/Python.framework/Versions/Current/bin/python3 import datetime import pathlib import plistlib import sys import sal sys.path.insert(0, "/usr/local/munki") from munkilib import munkicommon __version__ = "1.2.0" def main(): # If we haven't successfully submitted to Sal, pull the existing #...
from django.shortcuts import render from django.http import HttpResponse, JsonResponse, StreamingHttpResponse, FileResponse from django.template import loader from django.shortcuts import get_object_or_404, render, redirect from django.views import View from django.views.generic import DetailView, ListView from django....
from django.shortcuts import render from django.http import HttpResponse, JsonResponse, StreamingHttpResponse, FileResponse from django.template import loader from django.shortcuts import get_object_or_404, render, redirect from django.views import View from django.views.generic import DetailView, ListView from django....
import logging import operator import time import traceback from pathlib import Path from typing import List, Type, Set, Tuple, Optional from PyQt5.QtCore import QEvent, Qt, pyqtSignal from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QCursor from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderVi...
import logging import operator import time import traceback from pathlib import Path from typing import List, Type, Set, Tuple, Optional from PyQt5.QtCore import QEvent, Qt, pyqtSignal from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QCursor from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderVi...
import os import time import socket from mmdet.apis import init_detector, inference_detector, show_result_pyplot, show_result_ins import mmcv # map # config_file = '../configs/solo/decoupled_solo_r50_fpn_8gpu_3x.py' # # download the checkpoint from model zoo and put it in `checkpoints/` # checkpoint_file = '../checkp...
import os import time import socket from mmdet.apis import init_detector, inference_detector, show_result_pyplot, show_result_ins import mmcv # map # config_file = '../configs/solo/decoupled_solo_r50_fpn_8gpu_3x.py' # # download the checkpoint from model zoo and put it in `checkpoints/` # checkpoint_file = '../checkp...
import re import pickle import tempfile import pytest from _pytest.config import Config from _pytest._io.terminalwriter import TerminalWriter from _pytest.reports import TestReport from pytest_fold.tui_pytermtk import main as tuitk from pytest_fold.tui_textual1 import main as tuitxt1 from pytest_fold.tui_textual2 impo...
import re import pickle import tempfile import pytest from _pytest.config import Config from _pytest._io.terminalwriter import TerminalWriter from _pytest.reports import TestReport from pytest_fold.tui_pytermtk import main as tuitk from pytest_fold.tui_textual1 import main as tuitxt1 from pytest_fold.tui_textual2 impo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2019, 2020 Matt Post <post@cs.jhu.edu> # # 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/LICE...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2019, 2020 Matt Post <post@cs.jhu.edu> # # 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/LICE...
""" This module contains shared fixtures. """ import json import pytest import selenium.webdriver @pytest.fixture def config(scope='session'): # Read JSON file with open('config.json') as config_file: config = json.load(config_file) # Assert values are acceptable assert config['browser'] in ['Firefox'...
""" This module contains shared fixtures. """ import json import pytest import selenium.webdriver @pytest.fixture def config(scope='session'): # Read JSON file with open('config.json') as config_file: config = json.load(config_file) # Assert values are acceptable assert config['browser'] in ['Firefox'...
# Copyright 2017 StreamSets Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# Copyright 2017 StreamSets Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
from datetime import datetime from matplotlib import pylab as plt from requests_cache import CachedSession CACHE_EXPIRATION_SECS = 3600*24*356 YEAR_RANGE = range(2018, 2022) MARKERS = ["o", "s", "d", "+", "*"] RIRS = { 'AFRINIC': { 'url': 'https://ftp.ripe.net/ripe/rpki/afrinic.tal/', ...
from datetime import datetime from matplotlib import pylab as plt from requests_cache import CachedSession CACHE_EXPIRATION_SECS = 3600*24*356 YEAR_RANGE = range(2018, 2022) MARKERS = ["o", "s", "d", "+", "*"] RIRS = { 'AFRINIC': { 'url': 'https://ftp.ripe.net/ripe/rpki/afrinic.tal/', ...
import inspect import logging import os import re import subprocess from typing import Dict, Any from pyhttpd.certs import CertificateSpec from pyhttpd.conf import HttpdConf from pyhttpd.env import HttpdTestEnv, HttpdTestSetup log = logging.getLogger(__name__) class H2TestSetup(HttpdTestSetup): def __init__(se...
import inspect import logging import os import re import subprocess from typing import Dict, Any from pyhttpd.certs import CertificateSpec from pyhttpd.conf import HttpdConf from pyhttpd.env import HttpdTestEnv, HttpdTestSetup log = logging.getLogger(__name__) class H2TestSetup(HttpdTestSetup): def __init__(se...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
#!/usr/bin/env python3 """ Health authority back end REST and static content server """ __copyright__ = """ Copyright 2020 Diomidis Spinellis 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 L...
#!/usr/bin/env python3 """ Health authority back end REST and static content server """ __copyright__ = """ Copyright 2020 Diomidis Spinellis 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 L...
async def greet(ctx): greetings = [ "Ahn nyong ha se yo", "Ahn-nyong-ha-se-yo", "Ahoj", "An-nyŏng-ha-se-yo", "As-salamu alaykum", "Assalamo aleikum", "Assalamualaikum", "Avuxeni", "Bonġu", "Bonjour", "Bună ziua", "Ciao",...
async def greet(ctx): greetings = [ "Ahn nyong ha se yo", "Ahn-nyong-ha-se-yo", "Ahoj", "An-nyŏng-ha-se-yo", "As-salamu alaykum", "Assalamo aleikum", "Assalamualaikum", "Avuxeni", "Bonġu", "Bonjour", "Bună ziua", "Ciao",...
import discord from discord.ext import commands from decorators import * from io import BytesIO from urllib.parse import quote from base64 import b64encode from json import loads class encoding(commands.Cog): def __init__(self): self.ciphers = loads(open("./assets/json/encode.json", "r").read()) pa...
import discord from discord.ext import commands from decorators import * from io import BytesIO from urllib.parse import quote from base64 import b64encode from json import loads class encoding(commands.Cog): def __init__(self): self.ciphers = loads(open("./assets/json/encode.json", "r").read()) pa...
#main game section # %% plansza_do_gry = {'7':' ','8':' ','9':' ', '4':' ','5':' ','6':' ', '1':' ','2':' ','3':' '} klawisze_gry=[] for key in plansza_do_gry: klawisze_gry.append(key) # print(klawisze_gry) def drukuj_plansze(pole): print(f"{pole["7"]} | {pole["8"]} | {p...
#main game section # %% plansza_do_gry = {'7':' ','8':' ','9':' ', '4':' ','5':' ','6':' ', '1':' ','2':' ','3':' '} klawisze_gry=[] for key in plansza_do_gry: klawisze_gry.append(key) # print(klawisze_gry) def drukuj_plansze(pole): print(f"{pole['7']} | {pole['8']} | {p...
import argparse import discretisedfield as df def convert_files(input_files, output_files): for input_file, output_file in zip(input_files, output_files): field = df.Field.fromfile(input_file) field.write(output_file) def main(): parser = argparse.ArgumentParser( prog='ovf2vtk', ...
import argparse import discretisedfield as df def convert_files(input_files, output_files): for input_file, output_file in zip(input_files, output_files): field = df.Field.fromfile(input_file) field.write(output_file) def main(): parser = argparse.ArgumentParser( prog='ovf2vtk', ...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import os import re from abc import ABC, abstractmethod from textwrap import dedent from typing import Callable, ClassVar, Iterator, Optional, cast fro...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import os import re from abc import ABC, abstractmethod from textwrap import dedent from typing import Callable, ClassVar, Iterator, Optional, cast fro...
# -*- coding: utf-8 -*- import hashlib from unittest.mock import MagicMock from asyncy.AppConfig import Expose from asyncy.Containers import Containers from asyncy.Exceptions import ActionNotFound, ContainerSpecNotRegisteredError,\ EnvironmentVariableNotFound, K8sError from asyncy.Kubernetes import Kubernetes from...
# -*- coding: utf-8 -*- import hashlib from unittest.mock import MagicMock from asyncy.AppConfig import Expose from asyncy.Containers import Containers from asyncy.Exceptions import ActionNotFound, ContainerSpecNotRegisteredError,\ EnvironmentVariableNotFound, K8sError from asyncy.Kubernetes import Kubernetes from...
import json from re import split import shutil import os import sys import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage import io from shapely.geometry import Polygon Image.MAX_IMAGE_PIXELS = None def make_dir(path): if not os.path.exists(path): os.makedirs(path) else: ...
import json from re import split import shutil import os import sys import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage import io from shapely.geometry import Polygon Image.MAX_IMAGE_PIXELS = None def make_dir(path): if not os.path.exists(path): os.makedirs(path) else: ...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # Configuration file for JupyterHub import os # pre-spawn settings NB_UID = 65534 NB_GID = 65534 CUDA = 'cuda' in os.environ['HOSTNODE'] c = get_config() # read users/teams & images import os, yaml with open('...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # Configuration file for JupyterHub import os # pre-spawn settings NB_UID = 65534 NB_GID = 65534 CUDA = 'cuda' in os.environ['HOSTNODE'] c = get_config() # read users/teams & images import os, yaml with open('...
""" Contains various data structures used by Bionic's infrastructure. """ import attr from .utils.misc import ImmutableSequence, ImmutableMapping @attr.s(frozen=True) class EntityDefinition: """ Describes the immutable properties of an entity. These properties generally have to do with the entity's "con...
""" Contains various data structures used by Bionic's infrastructure. """ import attr from .utils.misc import ImmutableSequence, ImmutableMapping @attr.s(frozen=True) class EntityDefinition: """ Describes the immutable properties of an entity. These properties generally have to do with the entity's "con...
from pytezos import PyTezosClient class Token(object): def __init__(self, client: PyTezosClient): self.client = client def set_admin(self, contract_id, new_admin): print(f"Setting fa2 admin on {contract_id} to {new_admin}") call = self.set_admin_call(contract_id, new_admin) r...
from pytezos import PyTezosClient class Token(object): def __init__(self, client: PyTezosClient): self.client = client def set_admin(self, contract_id, new_admin): print(f"Setting fa2 admin on {contract_id} to {new_admin}") call = self.set_admin_call(contract_id, new_admin) r...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 7 12:02:50 2021 @author: ministudio """ from datetime import datetime, timezone import pandas as pd import numpy as np from alive_progress import alive_bar def get_all_futures(ftx_client): tickers = ftx_client.fetchMarkets() list_perp =[...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 7 12:02:50 2021 @author: ministudio """ from datetime import datetime, timezone import pandas as pd import numpy as np from alive_progress import alive_bar def get_all_futures(ftx_client): tickers = ftx_client.fetchMarkets() list_perp =[...
"""Output formatters.""" import os from pathlib import Path from typing import TYPE_CHECKING, Generic, TypeVar, Union import rich if TYPE_CHECKING: from ansiblelint.errors import MatchError T = TypeVar('T', bound='BaseFormatter') class BaseFormatter(Generic[T]): """Formatter of ansible-lint output. Ba...
"""Output formatters.""" import os from pathlib import Path from typing import TYPE_CHECKING, Generic, TypeVar, Union import rich if TYPE_CHECKING: from ansiblelint.errors import MatchError T = TypeVar('T', bound='BaseFormatter') class BaseFormatter(Generic[T]): """Formatter of ansible-lint output. Ba...
# PYTHON_ARGCOMPLETE_OK """The command line interface to pipx""" import argparse import logging import logging.config import os import re import shlex import sys import textwrap import time import urllib.parse from pathlib import Path from typing import Any, Callable, Dict, List import argcomplete # type: ignore fr...
# PYTHON_ARGCOMPLETE_OK """The command line interface to pipx""" import argparse import logging import logging.config import os import re import shlex import sys import textwrap import time import urllib.parse from pathlib import Path from typing import Any, Callable, Dict, List import argcomplete # type: ignore fr...
#!/usr/bin/env python # coding: utf-8 """Download and parse Tanakh from <http://mechon-mamre.org/>. The text is based on the [Aleppo Codex][1]. [1]: https://en.wikipedia.org/wiki/Aleppo_Codex Each book is in a separate HTML file (e.g., `c01.htm`) and contains navigation and textual data. The relevant structure is: ...
#!/usr/bin/env python # coding: utf-8 """Download and parse Tanakh from <http://mechon-mamre.org/>. The text is based on the [Aleppo Codex][1]. [1]: https://en.wikipedia.org/wiki/Aleppo_Codex Each book is in a separate HTML file (e.g., `c01.htm`) and contains navigation and textual data. The relevant structure is: ...
import json import time import os import pandas as pd import requests from bs4 import BeautifulSoup from tqdm import tqdm def process_9gag(args): fetched_memes = [] errors = 0 # for i in tqdm(range(args.)) pass def process_me_dot_me(args): pass def templates_imgflip(args): args.source_url =...
import json import time import os import pandas as pd import requests from bs4 import BeautifulSoup from tqdm import tqdm def process_9gag(args): fetched_memes = [] errors = 0 # for i in tqdm(range(args.)) pass def process_me_dot_me(args): pass def templates_imgflip(args): args.source_url =...
import datetime import zlib from collections import OrderedDict from copy import deepcopy from decimal import Decimal from django.db.models import Q from clients.models import Document, DispensaryReg, Card from directions.models import Napravleniya, Issledovaniya, ParaclinicResult, IstochnikiFinansirovaniya, PersonCo...
import datetime import zlib from collections import OrderedDict from copy import deepcopy from decimal import Decimal from django.db.models import Q from clients.models import Document, DispensaryReg, Card from directions.models import Napravleniya, Issledovaniya, ParaclinicResult, IstochnikiFinansirovaniya, PersonCo...
""" Empatica E4 is a wearable device that offers real-time physiological data acquisition such as blood volume pulse, electrodermal activity (EDA), heart rate, interbeat intervals, 3-axis acceleration and skin temperature. """ import os import random import numpy as np import pandas as pd class EmpaticaReader: ...
""" Empatica E4 is a wearable device that offers real-time physiological data acquisition such as blood volume pulse, electrodermal activity (EDA), heart rate, interbeat intervals, 3-axis acceleration and skin temperature. """ import os import random import numpy as np import pandas as pd class EmpaticaReader: ...
# Owner(s): ["oncall: fx"] import builtins import contextlib import copy import functools import inspect import math import numbers import operator import os import pickle import sys import torch import traceback import typing import types import warnings import unittest from math import sqrt from torch.multiprocessin...
# Owner(s): ["oncall: fx"] import builtins import contextlib import copy import functools import inspect import math import numbers import operator import os import pickle import sys import torch import traceback import typing import types import warnings import unittest from math import sqrt from torch.multiprocessin...
import click from cmsis_svd.parser import SVDParser MCU_OPTIONS = [ 'STM32F0xx', ] MCU2VENDOR_FILE = { 'STM32F0xx': ('STMicro', 'STM32F0xx.svd'), } ALL = 'show_all' def show_register(register): fields = [] for field in register.fields: upper_index = field.bit_offset + field.bit_width - 1 ...
import click from cmsis_svd.parser import SVDParser MCU_OPTIONS = [ 'STM32F0xx', ] MCU2VENDOR_FILE = { 'STM32F0xx': ('STMicro', 'STM32F0xx.svd'), } ALL = 'show_all' def show_register(register): fields = [] for field in register.fields: upper_index = field.bit_offset + field.bit_width - 1 ...
from urllib.parse import urlsplit, urlunsplit import pytest import requests _KUMA_STATUS = None def pytest_configure(config): """Configure pytest for the Kuma deployment under test.""" global _KUMA_STATUS # The pytest-base-url plugin adds --base-url, and sets the default from # environment variab...
from urllib.parse import urlsplit, urlunsplit import pytest import requests _KUMA_STATUS = None def pytest_configure(config): """Configure pytest for the Kuma deployment under test.""" global _KUMA_STATUS # The pytest-base-url plugin adds --base-url, and sets the default from # environment variab...
# Copyright (c) 2020, NVIDIA CORPORATION. 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 software and re...
# Copyright (c) 2020, NVIDIA CORPORATION. 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 software and re...
from qtpy.QtCore import QSize from qtpy.QtGui import QIcon from qtpy.QtWidgets import QListWidget, QListWidgetItem from pathlib import Path ICON_ROOT = Path(__file__).parent / "icons" STYLES = r""" QListWidget{ min-width: 294; background: none; font-size: 8pt; color: #eee; } ...
from qtpy.QtCore import QSize from qtpy.QtGui import QIcon from qtpy.QtWidgets import QListWidget, QListWidgetItem from pathlib import Path ICON_ROOT = Path(__file__).parent / "icons" STYLES = r""" QListWidget{ min-width: 294; background: none; font-size: 8pt; color: #eee; } ...
#!/usr/bin/env python3 # Author: Volodymyr Shymanskyy # Usage: # ./run-spec-test.py # ./run-spec-test.py ./core/i32.json # ./run-spec-test.py ./core/float_exprs.json --line 2070 # ./run-spec-test.py ./proposals/tail-call/*.json # ./run-spec-test.py --exec ../build-custom/wasm3 # ./run-spec-test.py --engine...
#!/usr/bin/env python3 # Author: Volodymyr Shymanskyy # Usage: # ./run-spec-test.py # ./run-spec-test.py ./core/i32.json # ./run-spec-test.py ./core/float_exprs.json --line 2070 # ./run-spec-test.py ./proposals/tail-call/*.json # ./run-spec-test.py --exec ../build-custom/wasm3 # ./run-spec-test.py --engine...
#!/usr/bin/env python3 """ Project title: CollembolAI Authors: Stephan Weißbach, Stanislav Sys, Clément Schneider Original repository: https://github.com/stasys-hub/Collembola_AI.git Module title: output_inference_images .py Purpose: draws bounding boxes from annotation on pictures....
#!/usr/bin/env python3 """ Project title: CollembolAI Authors: Stephan Weißbach, Stanislav Sys, Clément Schneider Original repository: https://github.com/stasys-hub/Collembola_AI.git Module title: output_inference_images .py Purpose: draws bounding boxes from annotation on pictures....
import os import os.path import json import pathlib from types import prepare_class from ulauncher.api.client.Extension import Extension from ulauncher.api.client.EventListener import EventListener from ulauncher.api.shared.event import ( KeywordQueryEvent, ItemEnterEvent, PreferencesEvent, PreferencesUpdateEvent, ...
import os import os.path import json import pathlib from types import prepare_class from ulauncher.api.client.Extension import Extension from ulauncher.api.client.EventListener import EventListener from ulauncher.api.shared.event import ( KeywordQueryEvent, ItemEnterEvent, PreferencesEvent, PreferencesUpdateEvent, ...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2019 The Forte 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 required by applicable ...
# Copyright 2019 The Forte 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 required by applicable ...
#!/usr/bin/env python3 import redis import argparse import hashlib from getpass import getpass r = redis.StrictRedis(host="localhost", port=6379) parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--add', action='store_true', help='Adds a service') group...
#!/usr/bin/env python3 import redis import argparse import hashlib from getpass import getpass r = redis.StrictRedis(host="localhost", port=6379) parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--add', action='store_true', help='Adds a service') group...
import datetime import shutil import services.inventory import workflow import pandas as pd import os import file_system import file_system.images as images import json from file_system.file_system_object import FileSystemObject from services import inventory, library from tabulate import tabulate import cv2 TEMP_FOL...
import datetime import shutil import services.inventory import workflow import pandas as pd import os import file_system import file_system.images as images import json from file_system.file_system_object import FileSystemObject from services import inventory, library from tabulate import tabulate import cv2 TEMP_FOL...
from bilibili import bilibili import datetime import time import asyncio import traceback import os import configloader import utils from printer import Printer class Tasks: def __init__(self): fileDir = os.path.dirname(os.path.realpath('__file__')) file_user = fileDir + "/conf/user.conf" ...
from bilibili import bilibili import datetime import time import asyncio import traceback import os import configloader import utils from printer import Printer class Tasks: def __init__(self): fileDir = os.path.dirname(os.path.realpath('__file__')) file_user = fileDir + "/conf/user.conf" ...
#!/usr/bin/python3 # encoding='utf-8' # author:weibk # @time:2021/9/23 19:10 import pymysql import random con = pymysql.connect(host="localhost", user="root", password="123456", database="db", charset="utf8") cursor = con.cursor(c...
#!/usr/bin/python3 # encoding='utf-8' # author:weibk # @time:2021/9/23 19:10 import pymysql import random con = pymysql.connect(host="localhost", user="root", password="123456", database="db", charset="utf8") cursor = con.cursor(c...
from classes.Humanoid import Humanoid class Player(Humanoid): def __init__(self, name, room, dmg=1, hp=10): super().__init__(name, room, dmg, hp) self.equipped = None def __str__(self): return f'{self.name}: ', '{\n', f'\t[\n\t\thp: {self.hp}/{self.max_hp},\n\t\tdmg: {self.dmg}\n\tequ...
from classes.Humanoid import Humanoid class Player(Humanoid): def __init__(self, name, room, dmg=1, hp=10): super().__init__(name, room, dmg, hp) self.equipped = None def __str__(self): return f'{self.name}: ', '{\n', f'\t[\n\t\thp: {self.hp}/{self.max_hp},\n\t\tdmg: {self.dmg}\n\tequ...
import subprocess import sys import os DEFAULT_ARGS=[] if (os.path.exists("build")): dl=[] for r,ndl,fl in os.walk("build"): r=r.replace("\\","/").strip("/")+"/" for d in ndl: dl.insert(0,r+d) for f in fl: os.remove(r+f) for k in dl: os.rmdir(k) else: os.mkdir("build") if (os.name=="nt"): cd=os...
import subprocess import sys import os DEFAULT_ARGS=[] if (os.path.exists("build")): dl=[] for r,ndl,fl in os.walk("build"): r=r.replace("\\","/").strip("/")+"/" for d in ndl: dl.insert(0,r+d) for f in fl: os.remove(r+f) for k in dl: os.rmdir(k) else: os.mkdir("build") if (os.name=="nt"): cd=os...
from flask import send_file from python_helper import Constant as c from python_helper import EnvironmentHelper, log from python_framework import ResourceManager, FlaskUtil, HttpStatus, LogConstant from queue_manager_api import QueueManager import ModelAssociation app = ResourceManager.initialize(__name__, ModelAss...
from flask import send_file from python_helper import Constant as c from python_helper import EnvironmentHelper, log from python_framework import ResourceManager, FlaskUtil, HttpStatus, LogConstant from queue_manager_api import QueueManager import ModelAssociation app = ResourceManager.initialize(__name__, ModelAss...
#!/usr/bin/env python import json import os import re import sys import tarfile from urllib.request import urlretrieve def main(): # Read in given out_file and create target directory for file download with open(sys.argv[1]) as fh: params = json.load(fh) target_directory = params['output_data'][0...
#!/usr/bin/env python import json import os import re import sys import tarfile from urllib.request import urlretrieve def main(): # Read in given out_file and create target directory for file download with open(sys.argv[1]) as fh: params = json.load(fh) target_directory = params['output_data'][0...
# RT Lib - Setting from typing import ( TYPE_CHECKING, TypedDict, Optional, Union, Literal, Dict, Tuple, List, overload, get_origin, get_args ) from discord.ext import commands import discord from collections import defaultdict from aiohttp import ClientSession from functools import partial from datetime imp...
# RT Lib - Setting from typing import ( TYPE_CHECKING, TypedDict, Optional, Union, Literal, Dict, Tuple, List, overload, get_origin, get_args ) from discord.ext import commands import discord from collections import defaultdict from aiohttp import ClientSession from functools import partial from datetime imp...
from django.shortcuts import render, get_object_or_404 from .models import Post, Comment from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from .forms import EmailPostForm, CommentForm, SearchForm from django.core.mail import send_mail from taggit.models import Tag from django.db.models import Co...
from django.shortcuts import render, get_object_or_404 from .models import Post, Comment from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from .forms import EmailPostForm, CommentForm, SearchForm from django.core.mail import send_mail from taggit.models import Tag from django.db.models import Co...
# Import libraries from arcgis import gis import logging import json #carole was here again #Kerry test secrets = r"H:\secrets\maphub_config.json" # this is one method to def readConfig(configFile): # returns list of parameters # with key 'name' """ reads the config file to dictionary """ log...
# Import libraries from arcgis import gis import logging import json #carole was here again #Kerry test secrets = r"H:\secrets\maphub_config.json" # this is one method to def readConfig(configFile): # returns list of parameters # with key 'name' """ reads the config file to dictionary """ log...
import requests from urllib.parse import urlencode from urllib.request import urlopen from urllib.error import HTTPError import re import json from base64 import b64encode def get_playlists(spotify_url): with open('MY_SECRETS.json', 'r') as f: spotify_key = json.load(f)['SPOTIFY_KEY'] pl...
import requests from urllib.parse import urlencode from urllib.request import urlopen from urllib.error import HTTPError import re import json from base64 import b64encode def get_playlists(spotify_url): with open('MY_SECRETS.json', 'r') as f: spotify_key = json.load(f)['SPOTIFY_KEY'] pl...
import os import yaml import pandas as pd import xml.etree.ElementTree as ET from types import SimpleNamespace from sklearn.model_selection import train_test_split from utils.experiment_utils import create_linspace from utils.preprocess import * SOURCE_PATH = './source_data' DATA_PATH = './data' CONFIG_PATH = './c...
import os import yaml import pandas as pd import xml.etree.ElementTree as ET from types import SimpleNamespace from sklearn.model_selection import train_test_split from utils.experiment_utils import create_linspace from utils.preprocess import * SOURCE_PATH = './source_data' DATA_PATH = './data' CONFIG_PATH = './c...
import contextlib import json import os import pprint import shutil import signal import socket import subprocess import sys import tempfile import time from cytoolz import ( merge, valmap, ) from eth_utils.curried import ( apply_formatter_if, is_bytes, is_checksum_address, is_dict, is_same...
import contextlib import json import os import pprint import shutil import signal import socket import subprocess import sys import tempfile import time from cytoolz import ( merge, valmap, ) from eth_utils.curried import ( apply_formatter_if, is_bytes, is_checksum_address, is_dict, is_same...
import os from collections import OrderedDict from typing import Tuple, List, Callable from fs_s3fs import S3FS import numpy as np import pandas as pd import torch from torch.utils.data import Dataset from skimage.exposure import match_histograms from datetime import datetime from eolearn.core import EOPatch def a...
import os from collections import OrderedDict from typing import Tuple, List, Callable from fs_s3fs import S3FS import numpy as np import pandas as pd import torch from torch.utils.data import Dataset from skimage.exposure import match_histograms from datetime import datetime from eolearn.core import EOPatch def a...
# RT - Twitter from typing import TYPE_CHECKING, Union, Dict, Tuple, List from discord.ext import commands import discord from tweepy.asynchronous import AsyncStream from tweepy import API, OAuthHandler from tweepy.errors import NotFound from tweepy.models import Status from jishaku.functools import executor_functi...
# RT - Twitter from typing import TYPE_CHECKING, Union, Dict, Tuple, List from discord.ext import commands import discord from tweepy.asynchronous import AsyncStream from tweepy import API, OAuthHandler from tweepy.errors import NotFound from tweepy.models import Status from jishaku.functools import executor_functi...
""" Module containing a class for encapsulating the settings of the tree search """ import os import yaml from aizynthfinder.utils.logging import logger from aizynthfinder.utils.paths import data_path from aizynthfinder.mcts.policy import Policy from aizynthfinder.mcts.stock import Stock, MongoDbInchiKeyQuery class...
""" Module containing a class for encapsulating the settings of the tree search """ import os import yaml from aizynthfinder.utils.logging import logger from aizynthfinder.utils.paths import data_path from aizynthfinder.mcts.policy import Policy from aizynthfinder.mcts.stock import Stock, MongoDbInchiKeyQuery class...
"""API ROUTER""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from flask import jsonify, Blueprint from gfwanalysis.errors import WHRCBiomassError from gfwanalysis.middleware import get_geo_by_hash, get_geo_by_use, get_geo_by_wdpa, \ ...
"""API ROUTER""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from flask import jsonify, Blueprint from gfwanalysis.errors import WHRCBiomassError from gfwanalysis.middleware import get_geo_by_hash, get_geo_by_use, get_geo_by_wdpa, \ ...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from commands.basecommand import BaseCommand class Ports(BaseCommand): def __init__(self): self.__name__ = 'Ports' def run_ssh(self, sshc): res = self._ssh_data_with_header(sshc, '/ip service print detail') sus_...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from commands.basecommand import BaseCommand class Ports(BaseCommand): def __init__(self): self.__name__ = 'Ports' def run_ssh(self, sshc): res = self._ssh_data_with_header(sshc, '/ip service print detail') sus_...
from .objects import Server, Zone, RRSet, Record, Comment, Cryptokey, Metadata, SearchResult, StatisticItem, \ MapStatisticItem, RingStatisticItem, SimpleStatisticItem, CacheFlushResult from .exceptions import PDNSApiException, PDNSApiNotFound import json from functools import partial import requests import loggin...
from .objects import Server, Zone, RRSet, Record, Comment, Cryptokey, Metadata, SearchResult, StatisticItem, \ MapStatisticItem, RingStatisticItem, SimpleStatisticItem, CacheFlushResult from .exceptions import PDNSApiException, PDNSApiNotFound import json from functools import partial import requests import loggin...
""" BROS Copyright 2022-present NAVER Corp. Apache License v2.0 Do 2nd preprocess on top of the result of the 'preprocess.sh' file. Reference: https://github.com/microsoft/unilm/blob/master/layoutlm/deprecated/examples/seq_labeling/run_seq_labeling.py """ import json import os from collections import Counter from t...
""" BROS Copyright 2022-present NAVER Corp. Apache License v2.0 Do 2nd preprocess on top of the result of the 'preprocess.sh' file. Reference: https://github.com/microsoft/unilm/blob/master/layoutlm/deprecated/examples/seq_labeling/run_seq_labeling.py """ import json import os from collections import Counter from t...
from database import ( fix_ids, ImageModel, CategoryModel, AnnotationModel, DatasetModel, TaskModel, ExportModel ) # import pycocotools.mask as mask import numpy as np import time import json import os from celery import shared_task from ..socket import create_socket from mongoengine impo...
from database import ( fix_ids, ImageModel, CategoryModel, AnnotationModel, DatasetModel, TaskModel, ExportModel ) # import pycocotools.mask as mask import numpy as np import time import json import os from celery import shared_task from ..socket import create_socket from mongoengine impo...
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import logging import re import subprocess import tempfile from pathlib import Path from typing import Tuple, Optional, Union, List import git import yaml from ogr.parsing import RepoUrl, parse_git_repo from packit.exceptions import Packi...
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import logging import re import subprocess import tempfile from pathlib import Path from typing import Tuple, Optional, Union, List import git import yaml from ogr.parsing import RepoUrl, parse_git_repo from packit.exceptions import Packi...