edited_code
stringlengths
17
978k
original_code
stringlengths
17
978k
"""Mark channels in an existing BIDS dataset as "bad". example usage: $ mne_bids mark_bad_channels --ch_name="MEG 0112" --description="noisy" \ --ch_name="MEG 0131" --description="flat" \ --subject_id=01 --task=experiment --session=test \ ...
"""Mark channels in an existing BIDS dataset as "bad". example usage: $ mne_bids mark_bad_channels --ch_name="MEG 0112" --description="noisy" \ --ch_name="MEG 0131" --description="flat" \ --subject_id=01 --task=experiment --session=test \ ...
# Alacritty config options # Antonio Sarosi # December 10, 2020 from typing import List, Dict, Any from collections.abc import Mapping from pathlib import Path from sys import stderr import yaml import log class ConfigError(Exception): def __init__(self, message='Error applying configuration'): super()._...
# Alacritty config options # Antonio Sarosi # December 10, 2020 from typing import List, Dict, Any from collections.abc import Mapping from pathlib import Path from sys import stderr import yaml import log class ConfigError(Exception): def __init__(self, message='Error applying configuration'): super()._...
#!/usr/bin/env python """A Verification, Storage and Query/Retrieve SCP application.""" import argparse from configparser import ConfigParser import os import sys import pydicom.config from pydicom.dataset import Dataset from pynetdicom import ( AE, evt, AllStoragePresentationContexts, ALL_TRANSFER_SYNTAXES ) fr...
#!/usr/bin/env python """A Verification, Storage and Query/Retrieve SCP application.""" import argparse from configparser import ConfigParser import os import sys import pydicom.config from pydicom.dataset import Dataset from pynetdicom import ( AE, evt, AllStoragePresentationContexts, ALL_TRANSFER_SYNTAXES ) fr...
import pytest, os, logging, uuid import pytest_html from selenium import webdriver from py.xml import html from framework.action_framework import Actions from framework.configuration import Config from framework.element_provider import BasicWebElementProvider DRIVER_SCOPE = os.environ.get('DRIVER_SCOPE', 'fu...
import pytest, os, logging, uuid import pytest_html from selenium import webdriver from py.xml import html from framework.action_framework import Actions from framework.configuration import Config from framework.element_provider import BasicWebElementProvider DRIVER_SCOPE = os.environ.get('DRIVER_SCOPE', 'fu...
import logging from typing import List, Callable, Dict, Optional, Union import math import qtawesome as qta from qtpy.QtCore import Qt, QTimer from qtpy.QtGui import QFont, QCloseEvent from qtpy.QtWidgets import QDialog, QFrame, QGridLayout, QHBoxLayout, QToolButton, QButtonGroup, QLabel, QSlider, \ QDoubleSpinBox...
import logging from typing import List, Callable, Dict, Optional, Union import math import qtawesome as qta from qtpy.QtCore import Qt, QTimer from qtpy.QtGui import QFont, QCloseEvent from qtpy.QtWidgets import QDialog, QFrame, QGridLayout, QHBoxLayout, QToolButton, QButtonGroup, QLabel, QSlider, \ QDoubleSpinBox...
import numpy as np import tensorflow as tf from pyuvdata import UVData, UVCal, UVFlag from . import utils import copy import argparse import itertools import datetime from pyuvdata import utils as uvutils from .utils import echo from .utils import PBARS from . import cal_utils from . import modeling import re OPTIMIZ...
import numpy as np import tensorflow as tf from pyuvdata import UVData, UVCal, UVFlag from . import utils import copy import argparse import itertools import datetime from pyuvdata import utils as uvutils from .utils import echo from .utils import PBARS from . import cal_utils from . import modeling import re OPTIMIZ...
import json import os import uuid from datetime import datetime, timedelta, timezone from decimal import Decimal from unittest import mock from django.contrib.auth import get_user_model from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import rever...
import json import os import uuid from datetime import datetime, timedelta, timezone from decimal import Decimal from unittest import mock from django.contrib.auth import get_user_model from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import rever...
import itertools import logging import os.path as osp import tempfile import mmcv import numpy as np from mmcv.utils import print_log from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from mmdet.core import eval_recalls from .builder import DATASETS from...
import itertools import logging import os.path as osp import tempfile import mmcv import numpy as np from mmcv.utils import print_log from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from mmdet.core import eval_recalls from .builder import DATASETS from...
import torch from torchvision.transforms import functional as TFF import matplotlib.pyplot as plt from theseus.base.trainer.supervised_trainer import SupervisedTrainer from theseus.utilities.loading import load_state_dict from theseus.classification.utilities.gradcam import CAMWrapper, show_cam_on_image from theseus.ut...
import torch from torchvision.transforms import functional as TFF import matplotlib.pyplot as plt from theseus.base.trainer.supervised_trainer import SupervisedTrainer from theseus.utilities.loading import load_state_dict from theseus.classification.utilities.gradcam import CAMWrapper, show_cam_on_image from theseus.ut...
# Copyright (c) 2021, 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 copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Copyright (c) 2021, 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 copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
"""Common classes and elements for Omnilogic Integration.""" from datetime import timedelta import logging from omnilogic import OmniLogicException from homeassistant.const import ATTR_NAME from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, ...
"""Common classes and elements for Omnilogic Integration.""" from datetime import timedelta import logging from omnilogic import OmniLogicException from homeassistant.const import ATTR_NAME from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, ...
from bs4 import BeautifulSoup from spotipy.oauth2 import SpotifyOAuth import requests import spotipy SPOTIFY_CLIENT_ID = "YOUR_SPOTIFY_CLIENT_ID" SPOTIFY_CLIENT_SECRET = "YOUR_SPOTIFY_CLIENT_SECRET" sp = spotipy.Spotify( auth_manager=SpotifyOAuth( client_id=SPOTIFY_CLIENT_ID, client_secret=SPOTIF...
from bs4 import BeautifulSoup from spotipy.oauth2 import SpotifyOAuth import requests import spotipy SPOTIFY_CLIENT_ID = "YOUR_SPOTIFY_CLIENT_ID" SPOTIFY_CLIENT_SECRET = "YOUR_SPOTIFY_CLIENT_SECRET" sp = spotipy.Spotify( auth_manager=SpotifyOAuth( client_id=SPOTIFY_CLIENT_ID, client_secret=SPOTIF...
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2022 Kyle Balisnomo, Abram Hindle, https://github.com/tywtyw2002, and https://github.com/treedust # # 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 Lice...
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2022 Kyle Balisnomo, Abram Hindle, https://github.com/tywtyw2002, and https://github.com/treedust # # 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 Lice...
import os import time import json import random import numpy as np import torch import torch.nn as nn import torch.optim as optim import vgtk # TODO add dataparallel # TODO add the_world = ipdb.set_trace class Trainer(): def __init__(self, opt): super(Trainer, self).__init__() opt_dict = vgtk....
import os import time import json import random import numpy as np import torch import torch.nn as nn import torch.optim as optim import vgtk # TODO add dataparallel # TODO add the_world = ipdb.set_trace class Trainer(): def __init__(self, opt): super(Trainer, self).__init__() opt_dict = vgtk....
import os import subprocess from refactorings.utils.utils2 import get_program, Rewriter, get_filenames_in_dir from refactorings.utils.scope_listener import get_program2 from refactorings.utils.utils_listener_fast import TokensInfo, Field, Class, Method, LocalVariable, ClassImport from antlr4.TokenStreamRewriter import ...
import os import subprocess from refactorings.utils.utils2 import get_program, Rewriter, get_filenames_in_dir from refactorings.utils.scope_listener import get_program2 from refactorings.utils.utils_listener_fast import TokensInfo, Field, Class, Method, LocalVariable, ClassImport from antlr4.TokenStreamRewriter import ...
from argparse import ArgumentTypeError from enum import Enum from typing import TYPE_CHECKING from shogun.argparse_.action import FieldAction from shogun.dispatch.base import DispatchPriority, DispatcherIsSubclass from shogun.dispatch.concrete.default import DispatcherDefault if TYPE_CHECKING: from shogun.records...
from argparse import ArgumentTypeError from enum import Enum from typing import TYPE_CHECKING from shogun.argparse_.action import FieldAction from shogun.dispatch.base import DispatchPriority, DispatcherIsSubclass from shogun.dispatch.concrete.default import DispatcherDefault if TYPE_CHECKING: from shogun.records...
import youtube_dl from requests_html import HTMLSession import re import sys import json def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): return [ atoi(c) for c in re.split(r'(\d+)', text) ] try: language = sys.argv[1] arg = sys.argv[2] except: print("""Arg...
import youtube_dl from requests_html import HTMLSession import re import sys import json def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): return [ atoi(c) for c in re.split(r'(\d+)', text) ] try: language = sys.argv[1] arg = sys.argv[2] except: print("""Arg...
#!/usr/bin/python3 import importlib import json import os import shutil import sys import warnings import zipfile from base64 import b64encode from hashlib import sha1 from io import BytesIO from pathlib import Path from types import ModuleType from typing import Any, Dict, Iterator, KeysView, List, Optional, Set, Tup...
#!/usr/bin/python3 import importlib import json import os import shutil import sys import warnings import zipfile from base64 import b64encode from hashlib import sha1 from io import BytesIO from pathlib import Path from types import ModuleType from typing import Any, Dict, Iterator, KeysView, List, Optional, Set, Tup...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_showdoc.ipynb (unless otherwise specified). __all__ = ['is_enum', 'is_lib_module', 're_digits_first', 'try_external_doc_link', 'is_doc_name', 'doc_link', 'add_doc_links', 'colab_link', 'get_nb_source_link', 'nb_source_link', 'type_repr', 'format_param', ...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_showdoc.ipynb (unless otherwise specified). __all__ = ['is_enum', 'is_lib_module', 're_digits_first', 'try_external_doc_link', 'is_doc_name', 'doc_link', 'add_doc_links', 'colab_link', 'get_nb_source_link', 'nb_source_link', 'type_repr', 'format_param', ...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from typing import Tuple from pants.backend.python.lint.docformatter.subsystem import Docformatter from pants.backend.python.lint.python_fmt import Pytho...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from typing import Tuple from pants.backend.python.lint.docformatter.subsystem import Docformatter from pants.backend.python.lint.python_fmt import Pytho...
import json import requests import csv from glob import glob import pandas as pd from pathlib import Path from tqdm import trange def main(): folder_setup() download_trials() write_txt() def folder_setup(): """Makes directory 'Full_Studies' to which trial files are downloaded.""" current_director...
import json import requests import csv from glob import glob import pandas as pd from pathlib import Path from tqdm import trange def main(): folder_setup() download_trials() write_txt() def folder_setup(): """Makes directory 'Full_Studies' to which trial files are downloaded.""" current_director...
import binascii from collections import ( abc, namedtuple, ) import copy import itertools import re from typing import ( Any, Callable, Collection, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union, cast, ) import warnings from eth_abi imp...
import binascii from collections import ( abc, namedtuple, ) import copy import itertools import re from typing import ( Any, Callable, Collection, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union, cast, ) import warnings from eth_abi imp...
ALETHIO_SIMPLE_TOKEN_BALANCES = '{"data":[{"type":"TokenBalance","id":"0x9531c059098e3d194ff87febb587ab07b30b13066b175474e89094c44da98b954eedeac495271d0f","attributes":{"balance":"5700000000000000000"},"relationships":{"account":{"data":{"type":"Account","id":"0x9531c059098e3d194ff87febb587ab07b30b1306"},"links":{"rela...
ALETHIO_SIMPLE_TOKEN_BALANCES = '{"data":[{"type":"TokenBalance","id":"0x9531c059098e3d194ff87febb587ab07b30b13066b175474e89094c44da98b954eedeac495271d0f","attributes":{"balance":"5700000000000000000"},"relationships":{"account":{"data":{"type":"Account","id":"0x9531c059098e3d194ff87febb587ab07b30b1306"},"links":{"rela...
''' Running Dynamic Sednet simulations using OpenWater ''' import os import json import pandas as pd import geopandas as gpd import shutil import numpy as np from openwater import OWTemplate, OWLink from openwater.template import TAG_MODEL import openwater.nodes as n from collections import defaultdict from openwater.e...
''' Running Dynamic Sednet simulations using OpenWater ''' import os import json import pandas as pd import geopandas as gpd import shutil import numpy as np from openwater import OWTemplate, OWLink from openwater.template import TAG_MODEL import openwater.nodes as n from collections import defaultdict from openwater.e...
"""Config flow to configure the Netgear integration.""" import logging from urllib.parse import urlparse from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp from homeassistant.const import ( CONF...
"""Config flow to configure the Netgear integration.""" import logging from urllib.parse import urlparse from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp from homeassistant.const import ( CONF...
"""Classes to help gather user submissions.""" from __future__ import annotations import abc import asyncio from collections.abc import Mapping from types import MappingProxyType from typing import Any, TypedDict import uuid import voluptuous as vol from .core import HomeAssistant, callback from .exceptions import H...
"""Classes to help gather user submissions.""" from __future__ import annotations import abc import asyncio from collections.abc import Mapping from types import MappingProxyType from typing import Any, TypedDict import uuid import voluptuous as vol from .core import HomeAssistant, callback from .exceptions import H...
import logging import numpy import os import random import shutil import time import torch from draugr import AverageMeter, find_unclaimed_port from draugr.numpy_utilities import Split from draugr.torch_utilities import TensorBoardPytorchWriter from pathlib import Path from torch import distributed, multiprocessing, nn...
import logging import numpy import os import random import shutil import time import torch from draugr import AverageMeter, find_unclaimed_port from draugr.numpy_utilities import Split from draugr.torch_utilities import TensorBoardPytorchWriter from pathlib import Path from torch import distributed, multiprocessing, nn...
from collections import Counter import logging import numpy as np import os from prob_cbr.data.data_utils import get_inv_relation, is_inv_relation logger = logging.getLogger('stream_utils') logger.setLevel(logging.INFO) ch = logging.StreamHandler() ch.setLevel(logging.INFO) formatter = logging.Formatter("[%(asctime)s ...
from collections import Counter import logging import numpy as np import os from prob_cbr.data.data_utils import get_inv_relation, is_inv_relation logger = logging.getLogger('stream_utils') logger.setLevel(logging.INFO) ch = logging.StreamHandler() ch.setLevel(logging.INFO) formatter = logging.Formatter("[%(asctime)s ...
"""VALIDATORS""" import json import logging from functools import wraps from cerberus import Validator from flask import request from aqueduct.routes.api import error def myCoerc(n): try: return lambda v: None if v in ('null') else n(v) except Exception as e: return None null2int = myCoerc...
"""VALIDATORS""" import json import logging from functools import wraps from cerberus import Validator from flask import request from aqueduct.routes.api import error def myCoerc(n): try: return lambda v: None if v in ('null') else n(v) except Exception as e: return None null2int = myCoerc...
import codecs,os def _verify_python_env(): M='.utf8';L='.utf-8';J=None;I='ascii' try:import locale as A;G=codecs.lookup(A.getpreferredencoding()).name except Exception:G=I if G!=I:return B='' if os.name=='posix': import subprocess as D try:C=D.Popen(['locale','-a'],stdout=D.PIPE,stderr=D.PIPE).communicate()[0...
import codecs,os def _verify_python_env(): M='.utf8';L='.utf-8';J=None;I='ascii' try:import locale as A;G=codecs.lookup(A.getpreferredencoding()).name except Exception:G=I if G!=I:return B='' if os.name=='posix': import subprocess as D try:C=D.Popen(['locale','-a'],stdout=D.PIPE,stderr=D.PIPE).communicate()[0...
from logging import DEBUG, INFO from sys import exit from logzero import setup_logger from requests import post l = setup_logger(name="GraphQL", level=INFO) class Query: __slots__ = ["data", "data_template", "headers", "url", "response", "json"] # Request JSON data template default_template = ( ...
from logging import DEBUG, INFO from sys import exit from logzero import setup_logger from requests import post l = setup_logger(name="GraphQL", level=INFO) class Query: __slots__ = ["data", "data_template", "headers", "url", "response", "json"] # Request JSON data template default_template = ( ...
import re import os import logging from datetime import datetime from weakref import WeakValueDictionary from typing import Dict from airflow_db_logger.handlers import DBLogStreamWriter, DBLogHandler, airflow_db_logger_log from airflow_db_logger.exceptions import DBLoggerException from airflow_db_logger.config import (...
import re import os import logging from datetime import datetime from weakref import WeakValueDictionary from typing import Dict from airflow_db_logger.handlers import DBLogStreamWriter, DBLogHandler, airflow_db_logger_log from airflow_db_logger.exceptions import DBLoggerException from airflow_db_logger.config import (...
import os.path import sys from os import path from traceback import format_exc from unittest import TestCase from unittest.loader import defaultTestLoader, makeSuite from unittest.runner import TextTestRunner from unittest.suite import TestSuite from pdip.logging.loggers.console import ConsoleLogger from pdip.utils im...
import os.path import sys from os import path from traceback import format_exc from unittest import TestCase from unittest.loader import defaultTestLoader, makeSuite from unittest.runner import TextTestRunner from unittest.suite import TestSuite from pdip.logging.loggers.console import ConsoleLogger from pdip.utils im...
import logging import os import io import matplotlib import matplotlib.pyplot as plt import pytz import telegram from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from telegram.ext.dispatcher import run_async import youtube_data as ytd import user from user import User, UserState # Disabling ...
import logging import os import io import matplotlib import matplotlib.pyplot as plt import pytz import telegram from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from telegram.ext.dispatcher import run_async import youtube_data as ytd import user from user import User, UserState # Disabling ...
from unittest import TestCase import logging import os import shutil from datetime import datetime from pathlib import Path from shutil import rmtree from random import randint from offload import utils from offload.utils import File, FileList utils.setup_logger('debug') class TestFile(TestCase): def setUp(self)...
from unittest import TestCase import logging import os import shutil from datetime import datetime from pathlib import Path from shutil import rmtree from random import randint from offload import utils from offload.utils import File, FileList utils.setup_logger('debug') class TestFile(TestCase): def setUp(self)...
"""Support for NiceHash sensors.""" import asyncio import logging from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.entity import ToggleEntity from homeassistant.core import callback # from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.update...
"""Support for NiceHash sensors.""" import asyncio import logging from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.entity import ToggleEntity from homeassistant.core import callback # from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.update...
"""A small utility for generating slurm scripts. The slurm template contains tags of the form {{variable-name}}, which are then replaced with values for submission. Examples: EXP_LIST="seeded-exps.txt" EXP_LIST="msrvtt-ablations.txt" EXP_LIST="lsmdc-ablations.txt" EXP_LIST="activity-net-ablations.txt" EXP_LIST="didem...
"""A small utility for generating slurm scripts. The slurm template contains tags of the form {{variable-name}}, which are then replaced with values for submission. Examples: EXP_LIST="seeded-exps.txt" EXP_LIST="msrvtt-ablations.txt" EXP_LIST="lsmdc-ablations.txt" EXP_LIST="activity-net-ablations.txt" EXP_LIST="didem...
import colorsys import logging import pprint import textwrap from collections import Counter, defaultdict from string import Template from typing import Any, Mapping, Optional, Union from discord import Colour, Embed, Member, Message, Role, Status, utils from discord.ext.commands import BucketType, Cog, Context, Pagin...
import colorsys import logging import pprint import textwrap from collections import Counter, defaultdict from string import Template from typing import Any, Mapping, Optional, Union from discord import Colour, Embed, Member, Message, Role, Status, utils from discord.ext.commands import BucketType, Cog, Context, Pagin...
#!/usr/bin/env python3 """ Copyright 2020 Samuel Huang 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 t...
#!/usr/bin/env python3 """ Copyright 2020 Samuel Huang 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 t...
import json from canvas import tk from tkinter import Button, Entry, Label from helpers import clean_screen from products import render_products def login(username, password): with open('db/user_credentials_db.txt', 'r') as file: lines = file.readlines() for line in lines: user, pas = ...
import json from canvas import tk from tkinter import Button, Entry, Label from helpers import clean_screen from products import render_products def login(username, password): with open('db/user_credentials_db.txt', 'r') as file: lines = file.readlines() for line in lines: user, pas = ...
from settings import NPY_EXT, MODELS_DIR import os import math import numpy as np from datetime import datetime def euc(vec:np.array, pC:np.array): pC_vec = np.full((pC.shape[0], pC.shape[1]), vec) step1 = np.subtract(pC, pC_vec) step2 = np.square(step1) step3 = np.sum(step2, axis=1, dtype=float).re...
from settings import NPY_EXT, MODELS_DIR import os import math import numpy as np from datetime import datetime def euc(vec:np.array, pC:np.array): pC_vec = np.full((pC.shape[0], pC.shape[1]), vec) step1 = np.subtract(pC, pC_vec) step2 = np.square(step1) step3 = np.sum(step2, axis=1, dtype=float).re...
#!/usr/bin/env python ## -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 ...
#!/usr/bin/env python ## -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 ...
from error import * from models import * class Condition(object): """Represents a condition""" def __init__(self): pass def __str__(self): return "condition" class SayCondition(Condition): def __init__(self, phrase): self.phrase = phrase def eval(self, phrase): re...
from error import * from models import * class Condition(object): """Represents a condition""" def __init__(self): pass def __str__(self): return "condition" class SayCondition(Condition): def __init__(self, phrase): self.phrase = phrase def eval(self, phrase): re...
import os from time import sleep from slack import RTMClient from slack.errors import SlackApiError @RTMClient.run_on(event='message') def say_hello(**payload): target_channel_name = os.environ["TARGET_CHANNEL_NAME"] target_channel_id = os.environ["TARGET_CHANNEL_ID"] data = payload['data'] web_clie...
import os from time import sleep from slack import RTMClient from slack.errors import SlackApiError @RTMClient.run_on(event='message') def say_hello(**payload): target_channel_name = os.environ["TARGET_CHANNEL_NAME"] target_channel_id = os.environ["TARGET_CHANNEL_ID"] data = payload['data'] web_clie...
# Copyright 2018 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 2018 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 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...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import Dict, List, Optional, Any import logging from io import BytesIO, StringIO from os import linesep from urllib.parse import urlparse from wsgiref.headers import Headers from ._abc import Context from ._http ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import Dict, List, Optional, Any import logging from io import BytesIO, StringIO from os import linesep from urllib.parse import urlparse from wsgiref.headers import Headers from ._abc import Context from ._http ...
#!/usr/bin/env python3 import json from .constants import constants, BASE_URL from .base import Base class Ticker(Base): """Request information about stock/certificate/fund/etc Args: orderbook_id (int): id of ticker instrument (str): Type of instrument, Defaults to 'stock' auth (bool...
#!/usr/bin/env python3 import json from .constants import constants, BASE_URL from .base import Base class Ticker(Base): """Request information about stock/certificate/fund/etc Args: orderbook_id (int): id of ticker instrument (str): Type of instrument, Defaults to 'stock' auth (bool...
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...
"""This module contains the definition for a pylint HoudiniPackageRunner.""" # ============================================================================= # IMPORTS # ============================================================================= # Future from __future__ import annotations # Standard Library import ...
"""This module contains the definition for a pylint HoudiniPackageRunner.""" # ============================================================================= # IMPORTS # ============================================================================= # Future from __future__ import annotations # Standard Library import ...
# coding: utf-8 import csv import re from .splittingmatcher import SplittingMatcher from .mergingmatcher import MergingMatcher from .replacingmatcher import ReplacingMatcher from ..utils.helpers import decomment_file class AdjustTokens: """ Syntax for the .tsv adjustment rules ===========================...
# coding: utf-8 import csv import re from .splittingmatcher import SplittingMatcher from .mergingmatcher import MergingMatcher from .replacingmatcher import ReplacingMatcher from ..utils.helpers import decomment_file class AdjustTokens: """ Syntax for the .tsv adjustment rules ===========================...
import pymysql.cursors #faz a conexao com o banco de dados conexao = pymysql.connect(host = 'localhost', user = 'root', password = '', db = 'aula', charset = 'utf8mb4', cursorclass = pymy...
import pymysql.cursors #faz a conexao com o banco de dados conexao = pymysql.connect(host = 'localhost', user = 'root', password = '', db = 'aula', charset = 'utf8mb4', cursorclass = pymy...
import shutil from typing import ( List, Union, ) from pathlib import Path from datetime import datetime from bigflow import commons from bigflow.workflow import ( DEFAULT_EXECUTION_TIMEOUT_IN_SECONDS, Workflow, WorkflowJob ) def clear_dags_output_dir(workdir: str) -> None: dags_dir_path = g...
import shutil from typing import ( List, Union, ) from pathlib import Path from datetime import datetime from bigflow import commons from bigflow.workflow import ( DEFAULT_EXECUTION_TIMEOUT_IN_SECONDS, Workflow, WorkflowJob ) def clear_dags_output_dir(workdir: str) -> None: dags_dir_path = g...
""" Search endpoint for annotations """ from imc.endpoints import IMCEndpoint from imc.models import AnnotationSearch, allowed_item_types, codelists from restapi import decorators from restapi.connectors import neo4j from restapi.exceptions import BadRequest, NotFound, ServerError from restapi.models import fields fro...
""" Search endpoint for annotations """ from imc.endpoints import IMCEndpoint from imc.models import AnnotationSearch, allowed_item_types, codelists from restapi import decorators from restapi.connectors import neo4j from restapi.exceptions import BadRequest, NotFound, ServerError from restapi.models import fields fro...
import time from typing import Any, Callable, Dict, List, Optional import torch import torch.nn as nn from torch.utils.data import DataLoader from captum._utils.models.linear_model.model import LinearModel def l2_loss(x1, x2, weights=None): if weights is None: return torch.mean((x1 - x2) ** 2) / 2.0 ...
import time from typing import Any, Callable, Dict, List, Optional import torch import torch.nn as nn from torch.utils.data import DataLoader from captum._utils.models.linear_model.model import LinearModel def l2_loss(x1, x2, weights=None): if weights is None: return torch.mean((x1 - x2) ** 2) / 2.0 ...
""" Built in Scrolls language features. .. include:: pdoc/builtins.md """ import operator import random import typing as t from . import ast, containers, datatypes, interpreter __all__ = ( "StdIoCommandHandler", "BuiltinControlHandler", "BuiltinCommandHandler", "RandomExpansionHandle...
""" Built in Scrolls language features. .. include:: pdoc/builtins.md """ import operator import random import typing as t from . import ast, containers, datatypes, interpreter __all__ = ( "StdIoCommandHandler", "BuiltinControlHandler", "BuiltinCommandHandler", "RandomExpansionHandle...
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2020, 2021 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """`reana-dev`'s wiki commands.""" import click from reana.config import ( CODECOV...
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2020, 2021 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """`reana-dev`'s wiki commands.""" import click from reana.config import ( CODECOV...
from qtpy.QtCore import Qt from qtpy.QtWidgets import QCheckBox, QFrame, QHBoxLayout, QPushButton from ...utils.interactions import KEY_SYMBOLS class QtLayerButtons(QFrame): """Button controls for napari layers. Parameters ---------- viewer : napari.components.ViewerModel Napari viewer conta...
from qtpy.QtCore import Qt from qtpy.QtWidgets import QCheckBox, QFrame, QHBoxLayout, QPushButton from ...utils.interactions import KEY_SYMBOLS class QtLayerButtons(QFrame): """Button controls for napari layers. Parameters ---------- viewer : napari.components.ViewerModel Napari viewer conta...
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
#!/usr/bin/env nix-shell #!nix-shell -p python3Packages.requests python3Packages.tabulate -i python3 """ Jormungandr Analysis Tools """ __version__ = "0.1.0" import argparse, requests, os, json, sys from argparse import RawTextHelpFormatter from requests.exceptions import HTTPError from tabulate import tabulate gl...
#!/usr/bin/env nix-shell #!nix-shell -p python3Packages.requests python3Packages.tabulate -i python3 """ Jormungandr Analysis Tools """ __version__ = "0.1.0" import argparse, requests, os, json, sys from argparse import RawTextHelpFormatter from requests.exceptions import HTTPError from tabulate import tabulate gl...
import unittest from collections import OrderedDict from impromptu.query import Query class QueryTests(unittest.TestCase): def test_initialization(self): """Tests the post-initialization variables. """ cases = [ { 'a': 0, 'b': {'$lt': 0}, ...
import unittest from collections import OrderedDict from impromptu.query import Query class QueryTests(unittest.TestCase): def test_initialization(self): """Tests the post-initialization variables. """ cases = [ { 'a': 0, 'b': {'$lt': 0}, ...
import random from tkinter import * from tkinter import messagebox import pyperclip import json # -------------------------- PASSWORD GENERATOR ----------------------------- # letters = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y'...
import random from tkinter import * from tkinter import messagebox import pyperclip import json # -------------------------- PASSWORD GENERATOR ----------------------------- # letters = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y'...
from dataclasses import dataclass import os import logging import json from functools import lru_cache import cv2 import numpy as np import app from util import cvimage as Image logger = logging.getLogger(__name__) net_file = app.cache_path / 'ark_material.onnx' index_file = app.cache_path / 'index_itemid_relation....
from dataclasses import dataclass import os import logging import json from functools import lru_cache import cv2 import numpy as np import app from util import cvimage as Image logger = logging.getLogger(__name__) net_file = app.cache_path / 'ark_material.onnx' index_file = app.cache_path / 'index_itemid_relation....
import os import json import asyncio import inspect from pathlib import Path from http import HTTPStatus from shutil import make_archive from tempfile import TemporaryDirectory from contextlib import AsyncExitStack, ExitStack from typing import Any, List, Optional, Union, TYPE_CHECKING import aiohttp from aiohttp impo...
import os import json import asyncio import inspect from pathlib import Path from http import HTTPStatus from shutil import make_archive from tempfile import TemporaryDirectory from contextlib import AsyncExitStack, ExitStack from typing import Any, List, Optional, Union, TYPE_CHECKING import aiohttp from aiohttp impo...
import argparse import logging from typing import Tuple from deepdiff import DeepDiff import requests from requests.adapters import HTTPAdapter from urllib3.util import Retry from urllib.parse import quote import pprint from concurrent.futures import ThreadPoolExecutor import os import random import math import json im...
import argparse import logging from typing import Tuple from deepdiff import DeepDiff import requests from requests.adapters import HTTPAdapter from urllib3.util import Retry from urllib.parse import quote import pprint from concurrent.futures import ThreadPoolExecutor import os import random import math import json im...
from marshmallow.exceptions import ValidationError from baselayer.app.access import permissions, auth_or_token from ..base import BaseHandler from ...models import DBSession, Source, Group, Classification, Taxonomy from .internal.recent_sources import RecentSourcesHandler from .internal.source_views import SourceViewsH...
from marshmallow.exceptions import ValidationError from baselayer.app.access import permissions, auth_or_token from ..base import BaseHandler from ...models import DBSession, Source, Group, Classification, Taxonomy from .internal.recent_sources import RecentSourcesHandler from .internal.source_views import SourceViewsH...
import json import os import glob import logging logging.basicConfig(level=logging.INFO) def load_database(): db_entries = [] files = glob.glob("../dynamodb/*.json") for file_name in files: with open(file_name) as file: for line in file: entry = json.loads(line) form_submission = json.l...
import json import os import glob import logging logging.basicConfig(level=logging.INFO) def load_database(): db_entries = [] files = glob.glob("../dynamodb/*.json") for file_name in files: with open(file_name) as file: for line in file: entry = json.loads(line) form_submission = json.l...
# -*- coding: utf-8 -*- from django.contrib import admin from django.utils.translation import gettext_lazy as _ from django.utils.html import format_html from squest_survey.models import Template, Category, Question, Calculation, Operation, Response, Answer from squest_survey.models import MenuItem, VendorItem from sq...
# -*- coding: utf-8 -*- from django.contrib import admin from django.utils.translation import gettext_lazy as _ from django.utils.html import format_html from squest_survey.models import Template, Category, Question, Calculation, Operation, Response, Answer from squest_survey.models import MenuItem, VendorItem from sq...
# -*- coding: UTF-8 -*- """ @author: hhyo、yyukai @license: Apache Licence @file: pgsql.py @time: 2019/03/29 """ import re import psycopg2 import logging import traceback import sqlparse from common.config import SysConfig from common.utils.timer import FuncTimer from sql.utils.sql_utils import get_syntax_type from . ...
# -*- coding: UTF-8 -*- """ @author: hhyo、yyukai @license: Apache Licence @file: pgsql.py @time: 2019/03/29 """ import re import psycopg2 import logging import traceback import sqlparse from common.config import SysConfig from common.utils.timer import FuncTimer from sql.utils.sql_utils import get_syntax_type from . ...
from text_classification import generate_model, model_validation from modify_dataset import modify_dataset_and_raw_data_with_percentage_size_to_keep from modify_dataset import modify_dataset_select_features from sklearn.svm import SVC from sklearn.tree import DecisionTreeClassifier from sklearn.naive_bayes import Comp...
from text_classification import generate_model, model_validation from modify_dataset import modify_dataset_and_raw_data_with_percentage_size_to_keep from modify_dataset import modify_dataset_select_features from sklearn.svm import SVC from sklearn.tree import DecisionTreeClassifier from sklearn.naive_bayes import Comp...
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json import os import pathlib import re import shutil import tempfile from typing import Any, Dict import pytest from integration_tests.dbt_integration_test import DbtIntegrationTest from normalization.destination_type import DestinationType from nor...
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json import os import pathlib import re import shutil import tempfile from typing import Any, Dict import pytest from integration_tests.dbt_integration_test import DbtIntegrationTest from normalization.destination_type import DestinationType from nor...
import math import time import torch from copy import deepcopy from tensornet.engine.ops.regularizer import l1 from tensornet.engine.ops.checkpoint import ModelCheckpoint from tensornet.engine.ops.tensorboard import TensorBoard from tensornet.data.processing import InfiniteDataLoader from tensornet.utils.progress_bar ...
import math import time import torch from copy import deepcopy from tensornet.engine.ops.regularizer import l1 from tensornet.engine.ops.checkpoint import ModelCheckpoint from tensornet.engine.ops.tensorboard import TensorBoard from tensornet.data.processing import InfiniteDataLoader from tensornet.utils.progress_bar ...
from __future__ import print_function, unicode_literals import sys from typing import List from art import tprint from PyInquirer import style_from_dict, Token, prompt from squirrel_maze.resources.actor import Actor from squirrel_maze.resources import action as sm_action from squirrel_maze.resources import combat as...
from __future__ import print_function, unicode_literals import sys from typing import List from art import tprint from PyInquirer import style_from_dict, Token, prompt from squirrel_maze.resources.actor import Actor from squirrel_maze.resources import action as sm_action from squirrel_maze.resources import combat as...
#!/usr/bin/env python3 import multiprocessing import asyncio import logging from concurrent.futures import ThreadPoolExecutor from contextlib import contextmanager from dataclasses import replace from functools import partial import inspect from io import BytesIO, TextIOWrapper import os from pathlib import Path from p...
#!/usr/bin/env python3 import multiprocessing import asyncio import logging from concurrent.futures import ThreadPoolExecutor from contextlib import contextmanager from dataclasses import replace from functools import partial import inspect from io import BytesIO, TextIOWrapper import os from pathlib import Path from p...
from utils.flops_and_params import get_model_complexity_info from models import * from utils.prune_utils import * if __name__ == '__main__': model = '/Users/ioneliabuzatu/PycharmProjects/all-prunings/yolov3.weights' model_def = "/Users/ioneliabuzatu/weight-pruning/config/yolov3-custom.cfg" # device = ...
from utils.flops_and_params import get_model_complexity_info from models import * from utils.prune_utils import * if __name__ == '__main__': model = '/Users/ioneliabuzatu/PycharmProjects/all-prunings/yolov3.weights' model_def = "/Users/ioneliabuzatu/weight-pruning/config/yolov3-custom.cfg" # device = ...
#!/usr/bin/env python3 ''' Decorates organism taxon nodes with the organism types Usage: decorate_organisms.py [-u <neo4j user>] [-p <neo4j password>] [-b <neo4j bolt address>] ''' import argparse import neo4j import getpass import sys import os import json import ontobio __author__ = 'Finn Womack' __copyright_...
#!/usr/bin/env python3 ''' Decorates organism taxon nodes with the organism types Usage: decorate_organisms.py [-u <neo4j user>] [-p <neo4j password>] [-b <neo4j bolt address>] ''' import argparse import neo4j import getpass import sys import os import json import ontobio __author__ = 'Finn Womack' __copyright_...
import asyncio import json import logging import random from pathlib import Path import discord from discord.ext import commands from bot.bot import Bot from bot.constants import Colours log = logging.getLogger(__name__) TIME_LIMIT = 60 # anagram.json file contains all the anagrams with open(Path("bot/resources/fu...
import asyncio import json import logging import random from pathlib import Path import discord from discord.ext import commands from bot.bot import Bot from bot.constants import Colours log = logging.getLogger(__name__) TIME_LIMIT = 60 # anagram.json file contains all the anagrams with open(Path("bot/resources/fu...
#!/usr/bin/python3 __author__ = 'Przemek Decewicz' from argparse import ArgumentParser, RawDescriptionHelpFormatter from glob import glob from os import makedirs, path from sys import argv import matplotlib.pyplot as plt import matplotlib matplotlib.use('Agg') import numpy as np from io import TextIOWrapper import mat...
#!/usr/bin/python3 __author__ = 'Przemek Decewicz' from argparse import ArgumentParser, RawDescriptionHelpFormatter from glob import glob from os import makedirs, path from sys import argv import matplotlib.pyplot as plt import matplotlib matplotlib.use('Agg') import numpy as np from io import TextIOWrapper import mat...
import columbo interactions = [ columbo.Echo("Welcome to the Columbo example"), columbo.Acknowledge("Press enter to start"), columbo.BasicQuestion( "user", "What is your name?", default="Patrick", ), columbo.BasicQuestion( "user_email", lambda answers: f"""Wh...
import columbo interactions = [ columbo.Echo("Welcome to the Columbo example"), columbo.Acknowledge("Press enter to start"), columbo.BasicQuestion( "user", "What is your name?", default="Patrick", ), columbo.BasicQuestion( "user_email", lambda answers: f"""Wh...
# -*- coding: utf-8 -*- import os import click import logging import json import requests from requests.exceptions import Timeout import random from datetime import datetime from pathlib import Path, PurePath from dotenv import find_dotenv, load_dotenv """ This script aims to collect all meeting documents found at: ...
# -*- coding: utf-8 -*- import os import click import logging import json import requests from requests.exceptions import Timeout import random from datetime import datetime from pathlib import Path, PurePath from dotenv import find_dotenv, load_dotenv """ This script aims to collect all meeting documents found at: ...
#!/usr/bin/env python3 """This is a wrapper script around the Saxon command line interface. It attempts to make sure that the classpath is correct and that third party and other libraries are available.""" import os import sys import json import shutil import subprocess from pathlib import Path from xml.dom.minidom i...
#!/usr/bin/env python3 """This is a wrapper script around the Saxon command line interface. It attempts to make sure that the classpath is correct and that third party and other libraries are available.""" import os import sys import json import shutil import subprocess from pathlib import Path from xml.dom.minidom i...
from discord import Embed from redbot.core import Config, commands from .single import Single from .speedevent import Speedevent class TypeRacer(commands.Cog): """A Typing Speed test cog, to give test your typing skills""" def __init__(self, bot): self.bot = bot self.config = Config.get_conf...
from discord import Embed from redbot.core import Config, commands from .single import Single from .speedevent import Speedevent class TypeRacer(commands.Cog): """A Typing Speed test cog, to give test your typing skills""" def __init__(self, bot): self.bot = bot self.config = Config.get_conf...
class Organizations(object): def __init__(self, session): super(Organizations, self).__init__() self._session = session def getOrganizations(self): """ **List the organizations that the user has privileges on** https://developer.cisco.com/meraki/api-v1/#!get-organization...
class Organizations(object): def __init__(self, session): super(Organizations, self).__init__() self._session = session def getOrganizations(self): """ **List the organizations that the user has privileges on** https://developer.cisco.com/meraki/api-v1/#!get-organization...
""" Exercício Python 36: Escreva um programa para aprovar o empréstimo bancário para a compra de uma casa. Pergunte o valor da casa, o salário do comprador e em quantos anos ele vai pagar. A prestação mensal não pode exceder 30% do salário ou então o empréstimo será negado. """ print('-' * 30) print(f'{'Aprovando Empre...
""" Exercício Python 36: Escreva um programa para aprovar o empréstimo bancário para a compra de uma casa. Pergunte o valor da casa, o salário do comprador e em quantos anos ele vai pagar. A prestação mensal não pode exceder 30% do salário ou então o empréstimo será negado. """ print('-' * 30) print(f'{"Aprovando Empre...
############################################################################# # # VFRAME # MIT License # Copyright (c) 2019 Adam Harvey and VFRAME # https://vframe.io # ############################################################################# import click @click.command() @click.option('-i', '--input', 'opt_fp_c...
############################################################################# # # VFRAME # MIT License # Copyright (c) 2019 Adam Harvey and VFRAME # https://vframe.io # ############################################################################# import click @click.command() @click.option('-i', '--input', 'opt_fp_c...
""" This script loads the corresponding to repot text for certain patient IDs """ import json import os import pydicom from PIL import Image import pandas as pd DATA_DIR = "./data/tags" OUTPUT_DIR = "./manual_classification" groups = pd.read_csv(f"{DATA_DIR}/groups.csv", sep=";") tags = pd.read_csv(f"{DATA_DIR}/iu_xr...
""" This script loads the corresponding to repot text for certain patient IDs """ import json import os import pydicom from PIL import Image import pandas as pd DATA_DIR = "./data/tags" OUTPUT_DIR = "./manual_classification" groups = pd.read_csv(f"{DATA_DIR}/groups.csv", sep=";") tags = pd.read_csv(f"{DATA_DIR}/iu_xr...
""" BloomTech Labs DS Data Engineer Role - Database Interface - Visualization Interface """ import os import re import string from random import randint from typing import Iterable, Dict, List import pandas as pd import psycopg2 import plotly.express as px import plotly.graph_objects as go from plotly.graph_objs impor...
""" BloomTech Labs DS Data Engineer Role - Database Interface - Visualization Interface """ import os import re import string from random import randint from typing import Iterable, Dict, List import pandas as pd import psycopg2 import plotly.express as px import plotly.graph_objects as go from plotly.graph_objs impor...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import logging from decimal import Decimal import asyncio import aiohttp from typing import Dict, Any, List, Optional import json import time import ssl import copy from hummingbot.logger.struct_logger import METRICS_LOG_LEVEL from hummingbot.core.utils import async_ttl_cache from hummingbot.core.network_iterator impor...
import logging from decimal import Decimal import asyncio import aiohttp from typing import Dict, Any, List, Optional import json import time import ssl import copy from hummingbot.logger.struct_logger import METRICS_LOG_LEVEL from hummingbot.core.utils import async_ttl_cache from hummingbot.core.network_iterator impor...
from datetime import datetime, timedelta from data_manager import DataManager from flight_search import FlightSearch from notification_manager import NotificationManager ORIGIN_CITY_IATA = 'LON' def main(): data_manager = DataManager() sheet_data = data_manager.read_data() flight_search = FlightSearch() ...
from datetime import datetime, timedelta from data_manager import DataManager from flight_search import FlightSearch from notification_manager import NotificationManager ORIGIN_CITY_IATA = 'LON' def main(): data_manager = DataManager() sheet_data = data_manager.read_data() flight_search = FlightSearch() ...
import os import apsw from typing import Union, Tuple, Set, List from itertools import chain from decimal import Decimal from collections import namedtuple from multiprocessing import Manager from binascii import unhexlify from lbry.wallet.server.leveldb import LevelDB from lbry.wallet.server.util import class_logger f...
import os import apsw from typing import Union, Tuple, Set, List from itertools import chain from decimal import Decimal from collections import namedtuple from multiprocessing import Manager from binascii import unhexlify from lbry.wallet.server.leveldb import LevelDB from lbry.wallet.server.util import class_logger f...
from ._tksheet_vars import * from ._tksheet_other_classes import * from collections import defaultdict, deque from itertools import islice, repeat, accumulate, chain, product, cycle from math import floor, ceil from tkinter import TclError import bisect import csv as csv_module import io import pickle impor...
from ._tksheet_vars import * from ._tksheet_other_classes import * from collections import defaultdict, deque from itertools import islice, repeat, accumulate, chain, product, cycle from math import floor, ceil from tkinter import TclError import bisect import csv as csv_module import io import pickle impor...
from typing import List, Dict, Optional, NamedTuple import pickle import os from enum import Enum from collections import OrderedDict import json import redis import glob import copy from gtmcore.dataset.dataset import Dataset from gtmcore.logging import LMLogger logger = LMLogger.get_logger() class PersistTaskType...
from typing import List, Dict, Optional, NamedTuple import pickle import os from enum import Enum from collections import OrderedDict import json import redis import glob import copy from gtmcore.dataset.dataset import Dataset from gtmcore.logging import LMLogger logger = LMLogger.get_logger() class PersistTaskType...
import discum_c844aef import time import multiprocessing import json import random import re import os try: from tkinter import messagebox use_terminal=False except: use_terminal=True once=False wbm=[12,16] update = 0 class bot: owoid=408785106942164992 #user id of the owo bot with open('settings.json', "w+"...
import discum_c844aef import time import multiprocessing import json import random import re import os try: from tkinter import messagebox use_terminal=False except: use_terminal=True once=False wbm=[12,16] update = 0 class bot: owoid=408785106942164992 #user id of the owo bot with open('settings.json', "w+"...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module containing commands related to android""" import asyncio import math import os import re import tim...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module containing commands related to android""" import asyncio import math import os import re import tim...
import json import logging from json import JSONDecodeError from os import environ from time import sleep from dnacentersdk import DNACenterAPI from dnacentersdk.exceptions import ApiError logger = logging.getLogger() class DNAC(): def __init__(self): verify = environ['DNA_CENTER_VERIFY'].lower() == '...
import json import logging from json import JSONDecodeError from os import environ from time import sleep from dnacentersdk import DNACenterAPI from dnacentersdk.exceptions import ApiError logger = logging.getLogger() class DNAC(): def __init__(self): verify = environ['DNA_CENTER_VERIFY'].lower() == '...
import sklearn from numpy import inf, nan from sklearn.ensemble import ExtraTreesClassifier as Op from lale.docstrings import set_docstrings from lale.operators import make_operator class _ExtraTreesClassifierImpl: def __init__(self, **hyperparams): self._hyperparams = hyperparams self._wrapped_m...
import sklearn from numpy import inf, nan from sklearn.ensemble import ExtraTreesClassifier as Op from lale.docstrings import set_docstrings from lale.operators import make_operator class _ExtraTreesClassifierImpl: def __init__(self, **hyperparams): self._hyperparams = hyperparams self._wrapped_m...
from configparser import ConfigParser from lib.module import Module import psycopg2 class PostgresDriver: """ Driver for PostgredDB """ def __init__(self, config_file: str): """ :param config_file: Configuration file containing Postgres Configuration """ parser = Confi...
from configparser import ConfigParser from lib.module import Module import psycopg2 class PostgresDriver: """ Driver for PostgredDB """ def __init__(self, config_file: str): """ :param config_file: Configuration file containing Postgres Configuration """ parser = Confi...
import argparse import pytest import yaml from allennlp_hydra.utils.testing import BaseTestCase from allennlp_hydra.commands import class_to_yaml class TestClassToYaml(BaseTestCase): """ Tests for the class to yaml command. """ @pytest.mark.parametrize("serialization_arg", ["-s", "--serialization-di...
import argparse import pytest import yaml from allennlp_hydra.utils.testing import BaseTestCase from allennlp_hydra.commands import class_to_yaml class TestClassToYaml(BaseTestCase): """ Tests for the class to yaml command. """ @pytest.mark.parametrize("serialization_arg", ["-s", "--serialization-di...
# Copyright 2019 Joan Puig # See LICENSE for details import importlib import keyword import datetime import networkx as nx from pathlib import Path from typing import Iterable, Optional, List from FIT.profile import Profile, MessageScalarFieldProfile, MessageComponentFieldProfile from FIT.base_types ...
# Copyright 2019 Joan Puig # See LICENSE for details import importlib import keyword import datetime import networkx as nx from pathlib import Path from typing import Iterable, Optional, List from FIT.profile import Profile, MessageScalarFieldProfile, MessageComponentFieldProfile from FIT.base_types ...