edited_code
stringlengths
17
978k
original_code
stringlengths
17
978k
from ctypes import sizeof import os from dotenv import load_dotenv from crontab import CronTab from twitchAPI.twitch import Twitch import schedule import time from service.twitch_service import get_streams from service.twitter_service import tweet_stream print('Starting Bot...') load_dotenv() twitch = Twitch(os.env...
from ctypes import sizeof import os from dotenv import load_dotenv from crontab import CronTab from twitchAPI.twitch import Twitch import schedule import time from service.twitch_service import get_streams from service.twitter_service import tweet_stream print('Starting Bot...') load_dotenv() twitch = Twitch(os.env...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os from ezsub import const from ezsub.cache import Cache from ezsub.errors import CacheIsEmptyError from ezsub.utils import to_screen, get_size, get_title, machine_readable, count_children def info(req): cache = Cache() path = cache.subtitles if not ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os from ezsub import const from ezsub.cache import Cache from ezsub.errors import CacheIsEmptyError from ezsub.utils import to_screen, get_size, get_title, machine_readable, count_children def info(req): cache = Cache() path = cache.subtitles if not ...
#!/usr/bin/env python3 # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import argparse import os import platform import subprocess import tempfile from contextlib import contextmanager from enum import Enum, auto from pathlib import Pat...
#!/usr/bin/env python3 # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import argparse import os import platform import subprocess import tempfile from contextlib import contextmanager from enum import Enum, auto from pathlib import Pat...
#!/usr/bin/env drgn # # Copyright (C) 2019 Tejun Heo <tj@kernel.org> # Copyright (C) 2019 Facebook desc = """ This is a drgn script to monitor the blk-iocost cgroup controller. See the comment at the top of block/blk-iocost.c for more details. For drgn, visit https://github.com/osandov/drgn. """ import sys import re ...
#!/usr/bin/env drgn # # Copyright (C) 2019 Tejun Heo <tj@kernel.org> # Copyright (C) 2019 Facebook desc = """ This is a drgn script to monitor the blk-iocost cgroup controller. See the comment at the top of block/blk-iocost.c for more details. For drgn, visit https://github.com/osandov/drgn. """ import sys import re ...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
import os, sys, inspect, ssl, threading currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from PyXTB.api_access import QuerySet, AccessAPI from PyXTB.data_processing import * from PyXTB.settings import * class Te...
import os, sys, inspect, ssl, threading currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from PyXTB.api_access import QuerySet, AccessAPI from PyXTB.data_processing import * from PyXTB.settings import * class Te...
# Copyright 2019 The Glow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright 2019 The Glow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
import pytest import cudf from cuxfilter.charts.core.non_aggregate.core_stacked_line import ( BaseStackedLine, ) from cuxfilter.layouts import chart_view import cuxfilter class TestBaseStackedLine: df = cudf.DataFrame( {"key": [0, 1, 2, 3, 4], "val": [float(i + 10) for i in range(5)]} ) cux_d...
import pytest import cudf from cuxfilter.charts.core.non_aggregate.core_stacked_line import ( BaseStackedLine, ) from cuxfilter.layouts import chart_view import cuxfilter class TestBaseStackedLine: df = cudf.DataFrame( {"key": [0, 1, 2, 3, 4], "val": [float(i + 10) for i in range(5)]} ) cux_d...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. __version__ = "0.6.0.dev" import os import re import sys import copy import yaml import logging import platform import subprocess from pathlib import Path from .utils import can_use_cache, init_instance_by_config, get_module_by_module_path fr...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. __version__ = "0.6.0.dev" import os import re import sys import copy import yaml import logging import platform import subprocess from pathlib import Path from .utils import can_use_cache, init_instance_by_config, get_module_by_module_path fr...
""" utils ~~~~~ Test utils :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). :license: MIT, see LICENSE for more details. """ from contextlib import contextmanager from flask.json.tag import TaggedJSONSerializer from flask.signals import message_flashed from flask_security import Securi...
""" utils ~~~~~ Test utils :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). :license: MIT, see LICENSE for more details. """ from contextlib import contextmanager from flask.json.tag import TaggedJSONSerializer from flask.signals import message_flashed from flask_security import Securi...
import inspect from pathlib import Path from typing import Optional, Tuple, Union from discord import Embed from discord.ext import commands from bot.bot import Bot from bot.constants import URLs SourceType = Union[commands.HelpCommand, commands.Command, commands.Cog, str, commands.ExtensionNotLoaded] class Source...
import inspect from pathlib import Path from typing import Optional, Tuple, Union from discord import Embed from discord.ext import commands from bot.bot import Bot from bot.constants import URLs SourceType = Union[commands.HelpCommand, commands.Command, commands.Cog, str, commands.ExtensionNotLoaded] class Source...
# 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 for kanging stickers or making new ones. Thanks @rupansh""" import io import math import urllib.req...
# 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 for kanging stickers or making new ones. Thanks @rupansh""" import io import math import urllib.req...
import os import importlib import argparse import numpy as np from typing import Optional from torchvision import transforms import pytorch_lightning.loggers as pl_loggers from pytorch_lightning import Trainer from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint from novel_view_data import CLE...
import os import importlib import argparse import numpy as np from typing import Optional from torchvision import transforms import pytorch_lightning.loggers as pl_loggers from pytorch_lightning import Trainer from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint from novel_view_data import CLE...
#!/usr/bin/env python3 import re class Error(Exception): """Base class for exceptions in this module.""" pass def count_space(s): space = 0 for i in s: if i == ' ': space += 1 else: break return space def order_key(a, b): idx_dict = {} idx_dict["all...
#!/usr/bin/env python3 import re class Error(Exception): """Base class for exceptions in this module.""" pass def count_space(s): space = 0 for i in s: if i == ' ': space += 1 else: break return space def order_key(a, b): idx_dict = {} idx_dict["all...
import os from conans import ConanFile, tools, CMake class EncryptionAdapterTestUtilitiesConan(ConanFile): name = "EncryptionAdapterTestUtilities" description = "Test utilities for library-agnostic API for C++ to encrypt data" url = "https://github.com/systelab/cpp-encryption-adapter" homepage = "http...
import os from conans import ConanFile, tools, CMake class EncryptionAdapterTestUtilitiesConan(ConanFile): name = "EncryptionAdapterTestUtilities" description = "Test utilities for library-agnostic API for C++ to encrypt data" url = "https://github.com/systelab/cpp-encryption-adapter" homepage = "http...
import argparse import difflib import logging import os import re import sys import srsly import tqdm def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument( "sample_file", type=str, help="Sample file", ) parser.add_argument( '-v', '--verbose', ...
import argparse import difflib import logging import os import re import sys import srsly import tqdm def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument( "sample_file", type=str, help="Sample file", ) parser.add_argument( '-v', '--verbose', ...
######################################## # Changes compared to 30_11_dDQN_light_tweak71.py # 01. # lr_optimizer = 7.3e-4 ######################################## import sys import numpy as np #import pandas as pd import datetime import json from array import * import os import math from random import randrange imp...
######################################## # Changes compared to 30_11_dDQN_light_tweak71.py # 01. # lr_optimizer = 7.3e-4 ######################################## import sys import numpy as np #import pandas as pd import datetime import json from array import * import os import math from random import randrange imp...
"""Validate integration translation files.""" from __future__ import annotations from functools import partial from itertools import chain import json import re import voluptuous as vol from voluptuous.humanize import humanize_error import homeassistant.helpers.config_validation as cv from homeassistant.util import ...
"""Validate integration translation files.""" from __future__ import annotations from functools import partial from itertools import chain import json import re import voluptuous as vol from voluptuous.humanize import humanize_error import homeassistant.helpers.config_validation as cv from homeassistant.util import ...
# Some m work shifts need fulfilled by some n employees # Available shifts may overlap, i.e. two employees during same time # This problem is reduced by simplifying the available time # into unique slots for both workers and shifts # # Next, we relate worker's availability blocks to the shifts as pairs # This results i...
# Some m work shifts need fulfilled by some n employees # Available shifts may overlap, i.e. two employees during same time # This problem is reduced by simplifying the available time # into unique slots for both workers and shifts # # Next, we relate worker's availability blocks to the shifts as pairs # This results i...
# -*- coding: utf-8 -*- import numpy as np import os import pandas as pd import time import scanpy as sc import scipy.sparse as ssp from .. import help_functions as hf from .. import plotting as CSpl from .optimal_transport import * from .. import settings from .. import logging as logg #################### # Con...
# -*- coding: utf-8 -*- import numpy as np import os import pandas as pd import time import scanpy as sc import scipy.sparse as ssp from .. import help_functions as hf from .. import plotting as CSpl from .optimal_transport import * from .. import settings from .. import logging as logg #################### # Con...
import os import stat import csv import platform import fnmatch from subprocess import run from jinja2 import Template from ..client import Host from .base import BaseCommand from .base import ArgumentRequired from .utils import table_print, simple_print, field_print, ssh_format_print, grep, input_is_ye...
import os import stat import csv import platform import fnmatch from subprocess import run from jinja2 import Template from ..client import Host from .base import BaseCommand from .base import ArgumentRequired from .utils import table_print, simple_print, field_print, ssh_format_print, grep, input_is_ye...
""" MIT License Copyright (c) 2019 GamingGeek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
""" MIT License Copyright (c) 2019 GamingGeek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
#!/usr/bin/env python3 -B import unittest import os import os.path import hashlib import json import uuid import pprint import inspect from pathlib import Path import warnings from tests import TestSalesPipelineOutput from cromulent import vocab vocab.add_attribute_assignment_check() class PIRModelingTest_Destructio...
#!/usr/bin/env python3 -B import unittest import os import os.path import hashlib import json import uuid import pprint import inspect from pathlib import Path import warnings from tests import TestSalesPipelineOutput from cromulent import vocab vocab.add_attribute_assignment_check() class PIRModelingTest_Destructio...
# desy_move_verifier.py """Module to implement the DesyMoveVerifier component of the Long Term Archive.""" import asyncio from logging import Logger import logging import os import sys from typing import Any, Dict, Optional from rest_tools.client import RestClient # type: ignore from rest_tools.server import from_en...
# desy_move_verifier.py """Module to implement the DesyMoveVerifier component of the Long Term Archive.""" import asyncio from logging import Logger import logging import os import sys from typing import Any, Dict, Optional from rest_tools.client import RestClient # type: ignore from rest_tools.server import from_en...
import pickle from typing import List import pytest from pydantic import BaseModel class Model(BaseModel): a: float b: int = 10 def test_simple_construct(): m = Model.construct(dict(a=40, b=10), {'a', 'b'}) assert m.a == 40 assert m.b == 10 def test_construct_missing(): m = Model.constru...
import pickle from typing import List import pytest from pydantic import BaseModel class Model(BaseModel): a: float b: int = 10 def test_simple_construct(): m = Model.construct(dict(a=40, b=10), {'a', 'b'}) assert m.a == 40 assert m.b == 10 def test_construct_missing(): m = Model.constru...
import urllib.parse import codecs from solr import SOLR from semex import init_numberbatch, expand_query from utils import print_homework_header, readfile, trec_eval from utils import ROOTPATH, SRCPATH, DATAPATH, TRECPATH, RESULTSPATH # Solr parameters port = "8983" collection = "trec" fileNumber = 100 # Trec parame...
import urllib.parse import codecs from solr import SOLR from semex import init_numberbatch, expand_query from utils import print_homework_header, readfile, trec_eval from utils import ROOTPATH, SRCPATH, DATAPATH, TRECPATH, RESULTSPATH # Solr parameters port = "8983" collection = "trec" fileNumber = 100 # Trec parame...
# MIT License # Copyright (c) 2022 [FacuFalcone] # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
# MIT License # Copyright (c) 2022 [FacuFalcone] # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
from flask import render_template, request, redirect, url_for, send_from_directory from app import app, mongo from .helper import render_form_data, get_action, get_doc ################################################################################ # PAPGES #############################################################...
from flask import render_template, request, redirect, url_for, send_from_directory from app import app, mongo from .helper import render_form_data, get_action, get_doc ################################################################################ # PAPGES #############################################################...
# 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 os import cv2 import matplotlib.pyplot as plt import tools import normalize import numpy as np import argparse import sys import warnings """ Filename: norm_heatmap.py Author: Alexandre R. Sathler Date: 05/04/2022 Description: Primary interface file users interact with for heatmap production. Mai...
import os import cv2 import matplotlib.pyplot as plt import tools import normalize import numpy as np import argparse import sys import warnings """ Filename: norm_heatmap.py Author: Alexandre R. Sathler Date: 05/04/2022 Description: Primary interface file users interact with for heatmap production. Mai...
class AsyncDevices: def __init__(self, session): super().__init__() self._session = session def getDevice(self, serial: str): """ **Return a single device** https://developer.cisco.com/meraki/api-v1/#!get-device - serial (string): (required) """ ...
class AsyncDevices: def __init__(self, session): super().__init__() self._session = session def getDevice(self, serial: str): """ **Return a single device** https://developer.cisco.com/meraki/api-v1/#!get-device - serial (string): (required) """ ...
import sys import logging from reconcile import queries from reconcile.status import ExitCodes from reconcile.utils.oc import OC_Map from reconcile.utils.vault import VaultClient QONTRACT_INTEGRATION = "cluster-deployment-mapper" def run(dry_run, vault_output_path): """Get Hive ClusterDeployments from cluster...
import sys import logging from reconcile import queries from reconcile.status import ExitCodes from reconcile.utils.oc import OC_Map from reconcile.utils.vault import VaultClient QONTRACT_INTEGRATION = "cluster-deployment-mapper" def run(dry_run, vault_output_path): """Get Hive ClusterDeployments from cluster...
"""TcEx Generate Configurations CLI Command""" # standard library from typing import TYPE_CHECKING, List, Optional # first-party from tcex.app_config.permutation import Permutation from tcex.bin.bin_abc import BinABC if TYPE_CHECKING: # first-party from tcex.app_config import AppSpecYml from tcex.app_conf...
"""TcEx Generate Configurations CLI Command""" # standard library from typing import TYPE_CHECKING, List, Optional # first-party from tcex.app_config.permutation import Permutation from tcex.bin.bin_abc import BinABC if TYPE_CHECKING: # first-party from tcex.app_config import AppSpecYml from tcex.app_conf...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
# -*- coding: future_fstrings -*- # # Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, # Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, # Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, # Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Di...
# -*- coding: future_fstrings -*- # # Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, # Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, # Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, # Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Di...
# -*- coding: utf-8 -*- ################ Server Ver. 28 (2021. 6. 23.) ##################### import sys, os, ctypes import asyncio, discord, aiohttp import random, re, datetime, time, logging from discord.ext import tasks, commands from discord.ext.commands import CommandNotFound, MissingRequiredArgument fr...
# -*- coding: utf-8 -*- ################ Server Ver. 28 (2021. 6. 23.) ##################### import sys, os, ctypes import asyncio, discord, aiohttp import random, re, datetime, time, logging from discord.ext import tasks, commands from discord.ext.commands import CommandNotFound, MissingRequiredArgument fr...
#!/usr/bin/env python3 import argparse import os import http.server import socketserver import requests # Arguments parsing parser = argparse.ArgumentParser( description="Expose acestreams from morningstreams in you local network.", epilog="Source code: https://github.com/S1M0N38/morningstreams", ) parser.ad...
#!/usr/bin/env python3 import argparse import os import http.server import socketserver import requests # Arguments parsing parser = argparse.ArgumentParser( description="Expose acestreams from morningstreams in you local network.", epilog="Source code: https://github.com/S1M0N38/morningstreams", ) parser.ad...
"""Training utilities.""" import os from typing import Any, Dict, Union import pytorch_lightning as pl import torch from loguru import logger from pytorch_lightning.callbacks.base import Callback from pytorch_lightning.callbacks.early_stopping import EarlyStopping from pytorch_lightning.callbacks.model_checkpoint impo...
"""Training utilities.""" import os from typing import Any, Dict, Union import pytorch_lightning as pl import torch from loguru import logger from pytorch_lightning.callbacks.base import Callback from pytorch_lightning.callbacks.early_stopping import EarlyStopping from pytorch_lightning.callbacks.model_checkpoint impo...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import random import re import unittest import warnings import requests from pymatgen.core import SETTINGS, SETTINGS_FILE, yaml from pymatgen.analysis.phase_diagram import PhaseDiagram from pymatgen.analysis.pourbaix_diagram ...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import random import re import unittest import warnings import requests from pymatgen.core import SETTINGS, SETTINGS_FILE, yaml from pymatgen.analysis.phase_diagram import PhaseDiagram from pymatgen.analysis.pourbaix_diagram ...
#!/usr/bin/env python3 """ Licensed under MIT License, (c) B. Kerler 2018-2019 """ default_vid_pid = [ [0x2c7c, 0x0125, -1], # Quectel EC25 [0x1199, 0x9071, -1], # Sierra Wireless [0x1199, 0x9091, -1], # Sierra Wireless [0x0846, 0x68e2, 2], # Netgear [0x05C6, 0x9008, -1], # QC EDL [0x05C6,...
#!/usr/bin/env python3 """ Licensed under MIT License, (c) B. Kerler 2018-2019 """ default_vid_pid = [ [0x2c7c, 0x0125, -1], # Quectel EC25 [0x1199, 0x9071, -1], # Sierra Wireless [0x1199, 0x9091, -1], # Sierra Wireless [0x0846, 0x68e2, 2], # Netgear [0x05C6, 0x9008, -1], # QC EDL [0x05C6,...
#!/usr/bin/env python3 import json import logging import os import sys from github import Github from report import create_build_html_report from s3_helper import S3Helper from get_robot_token import get_best_robot_token from pr_info import PRInfo, get_event from commit_status_helper import get_commit from ci_config ...
#!/usr/bin/env python3 import json import logging import os import sys from github import Github from report import create_build_html_report from s3_helper import S3Helper from get_robot_token import get_best_robot_token from pr_info import PRInfo, get_event from commit_status_helper import get_commit from ci_config ...
import pytest import json from collections import defaultdict import time import brickschema from tqdm import tqdm from rdflib import URIRef from .util import make_readable import sys sys.path.append("..") from bricksrc.version import BRICK_VERSION # noqa: E402 from bricksrc.namespaces import BRICK # noqa: E402 """...
import pytest import json from collections import defaultdict import time import brickschema from tqdm import tqdm from rdflib import URIRef from .util import make_readable import sys sys.path.append("..") from bricksrc.version import BRICK_VERSION # noqa: E402 from bricksrc.namespaces import BRICK # noqa: E402 """...
import math from typing import * import numpy as np from torch.jit import ScriptModule from torch.utils.hooks import RemovableHandle from . import core, nn, random from .core import Tensor, Module, no_grad, rank, jit, assign_data __all__ = [ # utilities 'calculate_fan_in_and_fan_out', 'get_activation_gain', ...
import math from typing import * import numpy as np from torch.jit import ScriptModule from torch.utils.hooks import RemovableHandle from . import core, nn, random from .core import Tensor, Module, no_grad, rank, jit, assign_data __all__ = [ # utilities 'calculate_fan_in_and_fan_out', 'get_activation_gain', ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 13 14:50:24 2021 @author: kunal001 """ import pathlib import pprint import json import logging logger = logging.getLogger(__name__) pp = pprint.PrettyPrinter(indent=4) class ConstraintParser: def __init__(self, pdk_dir: pathlib.Path, input_dir...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 13 14:50:24 2021 @author: kunal001 """ import pathlib import pprint import json import logging logger = logging.getLogger(__name__) pp = pprint.PrettyPrinter(indent=4) class ConstraintParser: def __init__(self, pdk_dir: pathlib.Path, input_dir...
from __future__ import unicode_literals, division, absolute_import import datetime import logging import random from sqlalchemy import Column, Integer, DateTime, Unicode, Index from flexget import options, plugin from flexget.event import event from flexget.plugin import get_plugin_by_name, PluginError, PluginWarning...
from __future__ import unicode_literals, division, absolute_import import datetime import logging import random from sqlalchemy import Column, Integer, DateTime, Unicode, Index from flexget import options, plugin from flexget.event import event from flexget.plugin import get_plugin_by_name, PluginError, PluginWarning...
#!/usr/bin/env python3 ########################################################################################## #### THIS SCRIPT WAS USED TO GENERATE DEPTH vs COVERAGE FIGURES in the IN VIVO PAPER #### ########################################################################################## # Accept S3 dir for re...
#!/usr/bin/env python3 ########################################################################################## #### THIS SCRIPT WAS USED TO GENERATE DEPTH vs COVERAGE FIGURES in the IN VIVO PAPER #### ########################################################################################## # Accept S3 dir for re...
import sys import ast import re,os import pandas as pd import numpy as np import itertools from fmtutil.row.parse_verbose_argvars import ParsedTuple from pathlib import Path from pdb import set_trace as st from typing import Dict, List, Any, Iterable from toolz.functoolz import compose_left from dataclasses import da...
import sys import ast import re,os import pandas as pd import numpy as np import itertools from fmtutil.row.parse_verbose_argvars import ParsedTuple from pathlib import Path from pdb import set_trace as st from typing import Dict, List, Any, Iterable from toolz.functoolz import compose_left from dataclasses import da...
# -*- coding: utf-8 -*- from elasticsearch import AsyncElasticsearch from guillotina import app_settings from guillotina import configure from guillotina.catalog.catalog import DefaultSearchUtility from guillotina.component import get_adapter from guillotina.component import get_utility from guillotina.event import not...
# -*- coding: utf-8 -*- from elasticsearch import AsyncElasticsearch from guillotina import app_settings from guillotina import configure from guillotina.catalog.catalog import DefaultSearchUtility from guillotina.component import get_adapter from guillotina.component import get_utility from guillotina.event import not...
#!/usr/bin/env python3 """Downloads latest player skin renders, and generates HTML for player cards.""" import argparse import json import pathlib import sys import urllib.request import jinja2 REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent RENDERS_DIR = REPO_ROOT / "images" / "players" def parse_args()...
#!/usr/bin/env python3 """Downloads latest player skin renders, and generates HTML for player cards.""" import argparse import json import pathlib import sys import urllib.request import jinja2 REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent RENDERS_DIR = REPO_ROOT / "images" / "players" def parse_args()...
import csv from datetime import ( datetime, time, date, ) from enum import ( auto, Enum, ) from functools import total_ordering from io import StringIO from itertools import groupby from math import ceil from typing import ( Any, Callable, Dict, Iterable, Optional, Type, ...
import csv from datetime import ( datetime, time, date, ) from enum import ( auto, Enum, ) from functools import total_ordering from io import StringIO from itertools import groupby from math import ceil from typing import ( Any, Callable, Dict, Iterable, Optional, Type, ...
import asyncio import os import requests from gql import AIOHTTPTransport, Client, gql from gql.transport.exceptions import TransportQueryError from database import getDB, getPlayerData from sportsdata import getTimeframe # from flask import session class SleeperGraphQLClient: def __init__(self): # TOD...
import asyncio import os import requests from gql import AIOHTTPTransport, Client, gql from gql.transport.exceptions import TransportQueryError from database import getDB, getPlayerData from sportsdata import getTimeframe # from flask import session class SleeperGraphQLClient: def __init__(self): # TOD...
"""Support for Ecobee binary sensors.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_OCCUPANCY, BinarySensorDevice, ) from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Old ...
"""Support for Ecobee binary sensors.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_OCCUPANCY, BinarySensorDevice, ) from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Old ...
# ##################################################################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
# ##################################################################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the REST API.""" from decimal import Decimal from enum import Enum from io import BytesIO import ...
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the REST API.""" from decimal import Decimal from enum import Enum from io import BytesIO import ...
from pandas_profiling.config import config from pandas_profiling.report.formatters import help from pandas_profiling.report.presentation.core import ( Container, FrequencyTable, FrequencyTableSmall, Image, Table, VariableInfo, ) from pandas_profiling.report.presentation.frequency_table_utils imp...
from pandas_profiling.config import config from pandas_profiling.report.formatters import help from pandas_profiling.report.presentation.core import ( Container, FrequencyTable, FrequencyTableSmall, Image, Table, VariableInfo, ) from pandas_profiling.report.presentation.frequency_table_utils imp...
import string # Retomando clase pasada # Estructura de datos ########################### # Listas #########################3 otra_lista = [ 1, 2, 3, 4, 5, 6] # Accediendo a los elementos de una lista print(otra_lista[0]) print(otra_lista[-1]) # Slicing print(otra_lista[0:3]) print(otra_lista[:3]) print(otra_lista[3...
import string # Retomando clase pasada # Estructura de datos ########################### # Listas #########################3 otra_lista = [ 1, 2, 3, 4, 5, 6] # Accediendo a los elementos de una lista print(otra_lista[0]) print(otra_lista[-1]) # Slicing print(otra_lista[0:3]) print(otra_lista[:3]) print(otra_lista[3...
import click import os import requests from colored import fg, attr @click.group(invoke_without_command=True) @click.pass_context def main(ctx): """A simple command line tool to find Air Quality Indices (AQI) from around the world.""" ctx.ensure_object(dict) try: api_token = os.environ["AQI...
import click import os import requests from colored import fg, attr @click.group(invoke_without_command=True) @click.pass_context def main(ctx): """A simple command line tool to find Air Quality Indices (AQI) from around the world.""" ctx.ensure_object(dict) try: api_token = os.environ["AQI...
# 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 sys import json import requests from pathlib import Path # https://stackoverflow.com/a/16696317/4454877 def download_file(url, local_filename): filepath = Path(local_filename) if filepath.is_file(): return # TODO: check file hashes for updates? print(url) #exit() filepath.parents[0].mkdir(parents=True, e...
import sys import json import requests from pathlib import Path # https://stackoverflow.com/a/16696317/4454877 def download_file(url, local_filename): filepath = Path(local_filename) if filepath.is_file(): return # TODO: check file hashes for updates? print(url) #exit() filepath.parents[0].mkdir(parents=True, e...
#!/usr/bin/python3 # coding=utf-8 # pylint: disable=I0011,E0401,W0702,W0703,R0902 # Copyright 2019 getcarrier.io # # 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....
#!/usr/bin/python3 # coding=utf-8 # pylint: disable=I0011,E0401,W0702,W0703,R0902 # Copyright 2019 getcarrier.io # # 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....
import jwt from flask import request from hive.main.hive_file import HiveFile from hive.settings import hive_setting from hive.util.constants import SCRIPTING_EXECUTABLE_CALLER_DID, SCRIPTING_EXECUTABLE_PARAMS, \ SCRIPTING_EXECUTABLE_CALLER_APP_DID, VAULT_ACCESS_R, VAULT_ACCESS_WR, SCRIPTING_SCRIPT_TEMP_TX_COLLEC...
import jwt from flask import request from hive.main.hive_file import HiveFile from hive.settings import hive_setting from hive.util.constants import SCRIPTING_EXECUTABLE_CALLER_DID, SCRIPTING_EXECUTABLE_PARAMS, \ SCRIPTING_EXECUTABLE_CALLER_APP_DID, VAULT_ACCESS_R, VAULT_ACCESS_WR, SCRIPTING_SCRIPT_TEMP_TX_COLLEC...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class Libxslt(Package): source = GitSource('https://github.com/QPYPI/libxslt.git', alias='libxslt', branch='qpyc-1.1.32') patches = [ #LocalPatch('0001-Fix-libtoolize-s-issue-in-au...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class Libxslt(Package): source = GitSource('https://github.com/QPYPI/libxslt.git', alias='libxslt', branch='qpyc-1.1.32') patches = [ #LocalPatch('0001-Fix-libtoolize-s-issue-in-au...
import logging import requests import time import json import requests import libxml2 from os import path, mkdir, makedirs from ..hooks.builtin import pipeline_ended from ..hooks.register import run_on, run_threaded_on from . import hooks LOGGER = logging.getLogger(__name__) # following lines should be controllable b...
import logging import requests import time import json import requests import libxml2 from os import path, mkdir, makedirs from ..hooks.builtin import pipeline_ended from ..hooks.register import run_on, run_threaded_on from . import hooks LOGGER = logging.getLogger(__name__) # following lines should be controllable b...
from __future__ import print_function import datetime import json import logging import os import re import sys from contextlib import contextmanager from queue import Queue from typing import Union, Any, Generator import demisto_client.demisto_api import pytz import requests import urllib3 from google.api_core.excep...
from __future__ import print_function import datetime import json import logging import os import re import sys from contextlib import contextmanager from queue import Queue from typing import Union, Any, Generator import demisto_client.demisto_api import pytz import requests import urllib3 from google.api_core.excep...
__all__ = ["ArangoClient"] from json import dumps, loads from typing import Any, Callable, Optional, Sequence, Union from arango.connection import ( BasicConnection, Connection, JwtConnection, JwtSuperuserConnection, ) from arango.database import StandardDatabase from arango.exceptions import ServerCo...
__all__ = ["ArangoClient"] from json import dumps, loads from typing import Any, Callable, Optional, Sequence, Union from arango.connection import ( BasicConnection, Connection, JwtConnection, JwtSuperuserConnection, ) from arango.database import StandardDatabase from arango.exceptions import ServerCo...
import os import sys import argparse import pandas as pd from scipy import stats sys.path.append(os.path.abspath("..")) from survey._app import CODE_DIR, app from core.models.metrics import gain_mean, rejection_ratio, gain from utils import get_con_and_dfs, get_all_con_and_dfs import metrics STATS_FUNCTIONS = {} ...
import os import sys import argparse import pandas as pd from scipy import stats sys.path.append(os.path.abspath("..")) from survey._app import CODE_DIR, app from core.models.metrics import gain_mean, rejection_ratio, gain from utils import get_con_and_dfs, get_all_con_and_dfs import metrics STATS_FUNCTIONS = {} ...
#!/usr/bin/env python import os import json from getpass import getpass from pathlib import Path from datetime import date, timedelta from itertools import product from book import BookClient, Time, Category, Campus, Place, BookResult CONFIG_PATH = os.getenv('TJU_CLI_CONFIG_PATH', 'config.json') def main(): co...
#!/usr/bin/env python import os import json from getpass import getpass from pathlib import Path from datetime import date, timedelta from itertools import product from book import BookClient, Time, Category, Campus, Place, BookResult CONFIG_PATH = os.getenv('TJU_CLI_CONFIG_PATH', 'config.json') def main(): co...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time import signal import argparse import asyncio import pygazebo import numpy as np from PIL import Image from pynput import keyboard from datetime import datetime from navigation_model import NavigationModel ''' gz topic -l gz joint ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time import signal import argparse import asyncio import pygazebo import numpy as np from PIL import Image from pynput import keyboard from datetime import datetime from navigation_model import NavigationModel ''' gz topic -l gz joint ...
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
from talon import Module, Context, actions, imgui import re mod = Module() ctx = Context() mod.mode("help_formatters", "Mode for showing the formatter help gui") formatters_dict = { # Simple formatters "NOOP": lambda text: text, "TRAILING_PADDING": lambda text: f"{text} ", "ALL_CAPS": lambda text: te...
from talon import Module, Context, actions, imgui import re mod = Module() ctx = Context() mod.mode("help_formatters", "Mode for showing the formatter help gui") formatters_dict = { # Simple formatters "NOOP": lambda text: text, "TRAILING_PADDING": lambda text: f"{text} ", "ALL_CAPS": lambda text: te...
import komand from .schema import ConnectionSchema, Input # Custom imports below from google.oauth2 import service_account import apiclient import json class Connection(komand.Connection): def __init__(self): super(self.__class__, self).__init__(input=ConnectionSchema()) def connect(self, params): ...
import komand from .schema import ConnectionSchema, Input # Custom imports below from google.oauth2 import service_account import apiclient import json class Connection(komand.Connection): def __init__(self): super(self.__class__, self).__init__(input=ConnectionSchema()) def connect(self, params): ...
import copy import json import jsonpatch from collections import deque from enum import Enum from .gu_common import OperationWrapper, OperationType, GenericConfigUpdaterError, \ JsonChange, PathAddressing, genericUpdaterLogging class Diff: """ A class that contains the diff info between ...
import copy import json import jsonpatch from collections import deque from enum import Enum from .gu_common import OperationWrapper, OperationType, GenericConfigUpdaterError, \ JsonChange, PathAddressing, genericUpdaterLogging class Diff: """ A class that contains the diff info between ...
from pykeepass import PyKeePass, create_database def load_db(path, pas): """ :param path: путь к файлу :param pas: пароль :return: объект PyKeePass по указанным параметрам """ kp = PyKeePass(path, password=pas) return kp def load_group(kp, name='Root'): """ :param kp: объект PyK...
from pykeepass import PyKeePass, create_database def load_db(path, pas): """ :param path: путь к файлу :param pas: пароль :return: объект PyKeePass по указанным параметрам """ kp = PyKeePass(path, password=pas) return kp def load_group(kp, name='Root'): """ :param kp: объект PyK...
############################################################################## # # Copyright (c) 2009 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
############################################################################## # # Copyright (c) 2009 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
""" This file is licensed under the terms of the Apache License, Version 2.0. See the LICENSE file in the root of this repository for complete details. """ import copy import sys from typing import List, Set, Tuple, Union class DefaultLabels: """ Some pre-defined labels which can be used in conjunction with ...
""" This file is licensed under the terms of the Apache License, Version 2.0. See the LICENSE file in the root of this repository for complete details. """ import copy import sys from typing import List, Set, Tuple, Union class DefaultLabels: """ Some pre-defined labels which can be used in conjunction with ...
import asyncio import warnings from typing import Dict, Optional, Tuple from mitmproxy import command, controller, ctx, exceptions, flow, http, log, master, options, platform, tcp, websocket from mitmproxy.flow import Error, Flow from mitmproxy.proxy import commands, events, server_hooks from mitmproxy.proxy import se...
import asyncio import warnings from typing import Dict, Optional, Tuple from mitmproxy import command, controller, ctx, exceptions, flow, http, log, master, options, platform, tcp, websocket from mitmproxy.flow import Error, Flow from mitmproxy.proxy import commands, events, server_hooks from mitmproxy.proxy import se...
import os import pickle import time from collections import Counter from typing import Callable, Dict, List, Optional, Tuple, Union import gym import numpy as np import scipy.sparse as sp from active_reward_learning.common.policy import ( BasePolicy, CombinedPolicy, EpsGreedyPolicy, GaussianNoisePolic...
import os import pickle import time from collections import Counter from typing import Callable, Dict, List, Optional, Tuple, Union import gym import numpy as np import scipy.sparse as sp from active_reward_learning.common.policy import ( BasePolicy, CombinedPolicy, EpsGreedyPolicy, GaussianNoisePolic...
# -*- coding: utf-8 -*- from amazoncaptcha import AmazonCaptcha, AmazonCaptchaCollector, ContentTypeError, NotFolderError, __version__ from maliarov import webdriver import unittest import sys import os #----------------------------------------------------------------------------------------------------------...
# -*- coding: utf-8 -*- from amazoncaptcha import AmazonCaptcha, AmazonCaptchaCollector, ContentTypeError, NotFolderError, __version__ from maliarov import webdriver import unittest import sys import os #----------------------------------------------------------------------------------------------------------...
import argparse import math import random import os from PIL import Image import numpy as np import torch from torch import nn, autograd, optim from torch.nn import functional as F from torch.utils import data import torch.distributed as dist from torchvision import datasets, transforms, utils from tqdm import tqdm imp...
import argparse import math import random import os from PIL import Image import numpy as np import torch from torch import nn, autograd, optim from torch.nn import functional as F from torch.utils import data import torch.distributed as dist from torchvision import datasets, transforms, utils from tqdm import tqdm imp...
from __future__ import annotations from typing import Optional import warp.yul.ast as ast from warp.yul.utils import camelize, remove_prefix from warp.yul.WarpException import WarpException, warp_assert, warp_assert_statement _node_to_parser = {} def register_parser(parser): fun_name = parser.__name__ asse...
from __future__ import annotations from typing import Optional import warp.yul.ast as ast from warp.yul.utils import camelize, remove_prefix from warp.yul.WarpException import WarpException, warp_assert, warp_assert_statement _node_to_parser = {} def register_parser(parser): fun_name = parser.__name__ asse...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """Userbot module for kanging stickers or making new ones. Thanks @rupansh""" import io import math import urllib.requ...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """Userbot module for kanging stickers or making new ones. Thanks @rupansh""" import io import math import urllib.requ...
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json import os import random import re import socket import string import subprocess import sys import threading import time from copy import copy from typing import Any, Callable, Dict, List from normalization.destination_type import DestinationTyp...
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json import os import random import re import socket import string import subprocess import sys import threading import time from copy import copy from typing import Any, Callable, Dict, List from normalization.destination_type import DestinationTyp...
"""Utilities module.""" import base64 import hashlib import json import os import traceback from copy import copy from datetime import datetime from functools import wraps from itertools import chain from typing import Callable, List, Optional from ratelimit import sleep_and_retry, limits from pacu.settings import ap...
"""Utilities module.""" import base64 import hashlib import json import os import traceback from copy import copy from datetime import datetime from functools import wraps from itertools import chain from typing import Callable, List, Optional from ratelimit import sleep_and_retry, limits from pacu.settings import ap...
from register_bank import Register from helpers import bin2dec, dec2bin # RISC-V opcodes repo license ''' Copyright (c) 2010-2017, The Regents of the University of California (Regents). All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that t...
from register_bank import Register from helpers import bin2dec, dec2bin # RISC-V opcodes repo license ''' Copyright (c) 2010-2017, The Regents of the University of California (Regents). All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that t...
#!/usr/bin/env python3 import re from ranking.management.modules.common import REQ, BaseModule, parsed_table from ranking.management.modules.excepts import ExceptionParseStandings class Statistic(BaseModule): def get_standings(self, users=None, statistics=None): season = self.get_season() def ...
#!/usr/bin/env python3 import re from ranking.management.modules.common import REQ, BaseModule, parsed_table from ranking.management.modules.excepts import ExceptionParseStandings class Statistic(BaseModule): def get_standings(self, users=None, statistics=None): season = self.get_season() def ...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from thumbor.loaders import LoaderResult from thumbor_aws.config i...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from thumbor.loaders import LoaderResult from thumbor_aws.config i...
from __future__ import annotations from dataclasses import dataclass from datetime import timedelta from typing import Callable, Dict, List, Optional from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, STATE_CLASS_TOTAL, STATE_CLASS_TOTAL_INCREASING, SensorEntity, ) from homeassista...
from __future__ import annotations from dataclasses import dataclass from datetime import timedelta from typing import Callable, Dict, List, Optional from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, STATE_CLASS_TOTAL, STATE_CLASS_TOTAL_INCREASING, SensorEntity, ) from homeassista...
import sys import numpy as np import logging import pickle import itertools import time import copy from . import likelihood_invM as likelihood from . import auxFunctions_invM as auxFunctions from .utils import get_logger logger = get_logger(level=logging.INFO) """ This is an O(N^2) algorithm for a greedy clusteri...
import sys import numpy as np import logging import pickle import itertools import time import copy from . import likelihood_invM as likelihood from . import auxFunctions_invM as auxFunctions from .utils import get_logger logger = get_logger(level=logging.INFO) """ This is an O(N^2) algorithm for a greedy clusteri...
"""Defines the linter class.""" import os import time import logging from typing import ( Any, Generator, List, Sequence, Optional, Tuple, Union, cast, Iterable, ) import pathspec from sqlfluff.core.errors import ( SQLBaseError, SQLLexError, SQLLi...
"""Defines the linter class.""" import os import time import logging from typing import ( Any, Generator, List, Sequence, Optional, Tuple, Union, cast, Iterable, ) import pathspec from sqlfluff.core.errors import ( SQLBaseError, SQLLexError, SQLLi...
"""/** * @author [Jai Miles] * @email [jaimiles23@gmail.com] * @create date 2020-08-16 17:40:01 * @modify date 2020-08-18 17:31:04 * @desc [ Class to save user profiles to csv. ] */ """ ########## # Imports ########## import os from datetime import datetime from typing import Union, Any ## NOTE: Could...
"""/** * @author [Jai Miles] * @email [jaimiles23@gmail.com] * @create date 2020-08-16 17:40:01 * @modify date 2020-08-18 17:31:04 * @desc [ Class to save user profiles to csv. ] */ """ ########## # Imports ########## import os from datetime import datetime from typing import Union, Any ## NOTE: Could...
from pyplan_core.classes.wizards.BaseWizard import BaseWizard import pandas as pd import jsonpickle class Wizard(BaseWizard): def __init__(self): self.code = "DataframeGroupby" def generateDefinition(self, model, params): nodeId = params["nodeId"] if model.existNode(nodeId): ...
from pyplan_core.classes.wizards.BaseWizard import BaseWizard import pandas as pd import jsonpickle class Wizard(BaseWizard): def __init__(self): self.code = "DataframeGroupby" def generateDefinition(self, model, params): nodeId = params["nodeId"] if model.existNode(nodeId): ...
''' timelapse_generator.py - Create a .gif or sequence of .png files using a pixels.log Author: Martín "Netux" Rodriguez ''' import argparse import re from datetime import datetime, timedelta from json import loads from math import floor from pathlib import Path from PIL import Image def find_config_path(): parent...
''' timelapse_generator.py - Create a .gif or sequence of .png files using a pixels.log Author: Martín "Netux" Rodriguez ''' import argparse import re from datetime import datetime, timedelta from json import loads from math import floor from pathlib import Path from PIL import Image def find_config_path(): parent...
"""Implement the Google Smart Home traits.""" import logging from typing import List, Optional from homeassistant.components import ( alarm_control_panel, binary_sensor, camera, cover, fan, group, input_boolean, input_select, light, lock, media_player, scene, script,...
"""Implement the Google Smart Home traits.""" import logging from typing import List, Optional from homeassistant.components import ( alarm_control_panel, binary_sensor, camera, cover, fan, group, input_boolean, input_select, light, lock, media_player, scene, script,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 3 13:23:59 2021 @author: th """ import torch from torch.nn import ReLU, Linear, Softmax, SmoothL1Loss, Tanh, LeakyReLU from torch_geometric.nn import GCNConv, global_max_pool, global_mean_pool, SGConv, GNNExplainer, SAGEConv, GATConv, FastRGCNCon...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 3 13:23:59 2021 @author: th """ import torch from torch.nn import ReLU, Linear, Softmax, SmoothL1Loss, Tanh, LeakyReLU from torch_geometric.nn import GCNConv, global_max_pool, global_mean_pool, SGConv, GNNExplainer, SAGEConv, GATConv, FastRGCNCon...
#!/usr/env/bin python import argparse import functools import logging import multiprocessing import os import sys import time import types import typing from bert import \ utils as bert_utils, \ constants as bert_constants, \ encoders as bert_encoders, \ datasource as bert_datasource, \ aws as ber...
#!/usr/env/bin python import argparse import functools import logging import multiprocessing import os import sys import time import types import typing from bert import \ utils as bert_utils, \ constants as bert_constants, \ encoders as bert_encoders, \ datasource as bert_datasource, \ aws as ber...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Wrappers for E. Maglis's M-CALIC implementation """ __author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>" __date__ = "30/04/2020" import os import sortedcontainers import tempfile import numpy as np import glob import copy import subprocess import shutil...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Wrappers for E. Maglis's M-CALIC implementation """ __author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>" __date__ = "30/04/2020" import os import sortedcontainers import tempfile import numpy as np import glob import copy import subprocess import shutil...
import logging import sys import traceback from datetime import datetime from http.client import HTTPException from socket import timeout from colorama import Fore, Style from uiautomator2.exceptions import UiObjectNotFoundError from AllInOneInstagramBot.core.device_facade import DeviceFacade from AllInOneInstagramBo...
import logging import sys import traceback from datetime import datetime from http.client import HTTPException from socket import timeout from colorama import Fore, Style from uiautomator2.exceptions import UiObjectNotFoundError from AllInOneInstagramBot.core.device_facade import DeviceFacade from AllInOneInstagramBo...
from hpctool import ComsolModel, Task, Solver import numpy as np from utils import grid, pretty_print_individual, get_multipoles_from_res import os import sys from loguru import logger from typing import List, Dict from scipy.optimize import differential_evolution import logging class SquaresModel(ComsolModel): d...
from hpctool import ComsolModel, Task, Solver import numpy as np from utils import grid, pretty_print_individual, get_multipoles_from_res import os import sys from loguru import logger from typing import List, Dict from scipy.optimize import differential_evolution import logging class SquaresModel(ComsolModel): d...