text
stringlengths
6.04k
39.5k
# 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...
# Copyright (c) 2017, <NAME> # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Peer management.''' import asyncio import random import socket import ssl import time from collections import defaultdict, Counter from functools import parti...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pandas as pd from .alignment import deep_align from .pycompat import OrderedDict, basestring from .utils import Frozen from .variable import as_variable, assert_unique_multiindex_level_names PANDAS_TYP...
#!/usr/bin/env python ############################################################################### # # mkroctabs.py - Make table of AUC scores or slrtab from multiquery output file # # File: mkroctabs.py # Author: <NAME> # Created: February 2010 # # $Id: mkroctabs.py 3625 2010-05-07 07:54:39Z alexs $ # ########...
# - coding: utf-8 - # Copyright (C) 2013-2014 <NAME> <<EMAIL>> import datetime as dt from gi.repository import Gdk as gdk import math import random import itertools from . import sprites from .lib import game_utils from .lib import graphics from .lib import layout from .lib import utils from .lib.pytweener import E...
# -*- coding: utf-8 -*- from ..Qt import QtGui, QtCore try: from ..Qt import QtOpenGL HAVE_OPENGL = True except: HAVE_OPENGL = False import numpy as np from .GraphicsObject import GraphicsObject from .. import functions as fn from ..Point import Point import struct, sys from .. import getConfigOption from ...
#!/usr/bin/env python3 from math import log10 from random import sample from time import sleep, time from multiprocessing.pool import ThreadPool import os from typing import Iterable NOMBRE_MOTS_A_RETENIR = 5 TEMPS_AFFICHAGE = 5 TEMPS_ECRITURE = 20 NOMBRE_DIFFERENCE_MAX = 2 MOTS = ['abandonner', 'accepter', 'accompa...
# To use this code, make sure you # # import json # # and then, to convert JSON from a string, do # # result = pin_added_payload_from_dict(json.loads(json_string)) from dataclasses import dataclass from typing import Optional, Any, List, TypeVar, Type, cast, Callable T = TypeVar("T") def from_str(x: Any) -...
import numpy as np from .. import util from ..element import Element from ..ndmapping import NdMapping, item_check, sorted_context from .dictionary import DictInterface from .interface import Interface, DataError class MultiInterface(Interface): """ MultiInterface allows wrapping around a list of tabular dat...
""" The util module provides a collection of general purpose methods. """ from . import numeric import sys import os import numpy import collections.abc import inspect import functools import operator import numbers import pathlib import ctypes import io import contextlib supports_outdirfd = os.open in os.supports_di...
import codecs import csv from datetime import datetime from django.conf import settings from django.db import transaction import xlwt from ibms.models import ( IBMData, GLPivDownload, CorporateStrategy, NCStrategicPlan, NCServicePriority, ERServicePriority, GeneralServicePriority, PVSServicePriority, ...
# -*- coding: utf-8 -*- """Pibooth configuration. """ import io import ast import os import os.path as osp import itertools import inspect from configparser import RawConfigParser from collections import OrderedDict as odict from pibooth.utils import LOGGER, open_text_editor from pibooth import language def values_...
#!/usr/bin/env python """ This module implements more advanced transformations. """ from __future__ import division __author__ = "<NAME>, <NAME>" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "1.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __date__ = "Jul 24, 2012" import numpy as np f...
"""This module contains functions and classes for creating and issuing events. For a list of the events that are built into Designer, check the :ref:`Event List<ref.events>`. .. attribute:: keys A special attribute for accessing the constants associated with a given key. For instance, ``designer.k...
# 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...
"""Utils to check the samplers and compatibility with scikit-learn """ # Adapted from imbalanced-learn # Adapated from scikit-learn # Authors: <NAME> <<EMAIL>> # License: MIT import sys import traceback import warnings from collections import Counter from functools import partial import pytest import numpy as np f...
import os import sys import re import json import pickle import h5py import nltk import numpy as np import jsonlines from collections import defaultdict from sklearn.model_selection import StratifiedKFold import config def pickle_loader(filename): if sys.version_info[0] < 3: return pickle.load(open(file...
# Copyright (C) 2016 <NAME> at Chongqing University # of Posts and Telecommunications, Chongqing, China. # Copyright (C) 2016 <NAME> at Beijing University of Posts # and Telecommunications. www.muzixing.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complia...
#!/usr/bin/env python # coding: utf-8 import os import sys import json import random import argparse try: from tkinter import * # noqa py3 from tkinter import ttk from tkinter import filedialog from tkinter import messagebox except ImportError: try: from Tkinter import * # noqa py2 ...
import sys import datetime import itertools from blessings import Terminal class Progress(object): """ Handle progress indication using callbacks. This class will create an object that stores information about a running yumsync process. It stores information about each repository being synced, includi...
import math import threading from dataclasses import dataclass from typing import List import numpy as np import torch from falkon.utils.stream_utils import sync_current_stream from falkon.cuda.cublas_gpu import * from falkon.cuda.cudart_gpu import cuda_memcpy2d_async from falkon.utils.helpers import choose_fn, sizeo...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# -*- coding: utf-8 -*- """ This module bundles all the tools of the SNN conversion toolbox. Important functions: .. autosummary:: :nosignatures: test_full update_setup @author: rbodo """ from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import os...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader,Dataset import one_torch_utils as otu from torchvision import datasets, transforms import os import cv2 from PIL import Image import itertools import glob import random from torchvision.utils im...
from itertools import islice from abc import ABCMeta, abstractmethod, abstractstaticmethod from dataclasses import dataclass from functools import partial from typing import List import numpy as np from sklearn.base import ( BaseEstimator, ClassifierMixin, MultiOutputMixin, RegressorMixin, ) from sklea...
from loss import * import img_utils import h5py from keras import backend as K from keras.models import Model from keras.layers import Input, merge, BatchNormalization, Activation from keras.layers.convolutional import Convolution2D, AveragePooling2D, MaxPooling2D, Deconvolution2D, Cropping2D from keras.utils.data_uti...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import tensorflow as tf import tensorflow_addons as tfa import numpy as np from random import randint, choice, shuffle import os from glob import glob from PIL import Image import math from pathlib import Path import matplotlib.pyplot as plt def load_cub_masked(): train_images = np.load('data/cub_train_seg_14x14_...
# -*- coding: utf-8 -*- import functools import os import re import warnings TEMPLATE_PATH = ['./', './views/', './templates/'] TEMPLATES = {} DEBUG = False def html_escape(string): ''' Escape HTML special characters ``&<>`` and quotes ``'"``. ''' return string.replace('&', '&amp;').replace('<', '&lt;').repl...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module description ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is re-pack of some json utility functions. - :func:`load_js`: Load Json from file. If file are not exists, returns user defined ``default value``. ...
import ctypes import itertools import logging import multiprocessing import os import pickle import textwrap import unittest import warnings from importlib import import_module from io import StringIO from django.core.management import call_command from django.db import connections from django.test import SimpleTestCa...
import warnings import typing import zipfile import tinydb import slippy import os import numpy as np from collections.abc import Sequence if slippy.CUDA: import cupy as cp __all__ = ['OutputRequest', 'OutputSaver', 'OutputReader', 'read_output'] class OutputSaver: """ A context manager for saving model ...
import re from collections import defaultdict import html5lib import attr from . import constants from .h import * from .messages import * @attr.s(slots=True) class BiblioEntry: linkText = attr.ib(default=None) originalLinkText = attr.ib(default=None) title = attr.ib(default=None) authors = attr.ib(...
import json import time import requests import csv import keyring import pandas as pd import traceback from datetime import datetime as dt from Logger import Logger logger = Logger() DEFAULT_BATCH_SIZE = 150 HEADER = [ "Employee_Number", "Commute_Miles", "Commute_Minutes", "Work_Lat...
# Copyright (c) 2019-2020, NVIDIA CORPORATION. # 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...
import distutils.sysconfig import logging as log import platform import zipfile import sys from distutils.command.build import build as _build from distutils.command.build_py import build_py as _build_py from distutils.errors import DistutilsSetupError from distutils.spawn import find_executable from distutils.sysconfi...
import logging import pandas as pd from easysparql import easysparqlclass import seaborn as sns import matplotlib.pyplot as plt from pandas.api.types import CategoricalDtype from tadaqq.util import compute_scores PRINT_DIFF = True def get_logger(name, level=logging.INFO): logger = logging.getLogger(name) for...
import logging import re import sys from jinja2 import Environment, FileSystemLoader from jupyter_core.application import JupyterApp, NoStart from tornado.log import LogFormatter from tornado.web import RedirectHandler from traitlets import Any, Bool, Dict, HasTraits, List, Unicode, default from traitlets.config impor...
# -*- encoding: utf-8 -*- import datetime import json from django.utils.encoding import force_text import re import operator import logging try: from functools import reduce except ImportError: pass from django.views.generic.list import ListView, MultipleObjectMixin from django.http import HttpResponse, HttpR...
import pandas as pd import os import portalocker import contextlib import yaml import subprocess from gnn_acopf.experimental.opf_dataset import OPFDataset from gnn_acopf.training.training_run import QualityMetric from gnn_acopf.utils.timer import Timer from pathlib import Path import copy from gnn_acopf.utils.observers...
from pathlib import Path from typing import List, Tuple, Optional from medical_ood.datasets.NIH_Chest import NIHChest from medical_ood.datasets.DRIMDB import DRIMDB from medical_ood.datasets.DRD import DRD from medical_ood.datasets.RIGA import RIGA from medical_ood.datasets.PCAM import PCAM from medical_ood.datasets.ma...
""" wsproto/frame_protocol ~~~~~~~~~~~~~~~~~~~~~~ WebSocket frame protocol implementation. """ import os import struct from codecs import getincrementaldecoder, IncrementalDecoder from enum import IntEnum from typing import Generator, List, NamedTuple, Optional, Tuple, TYPE_CHECKING, Union if TYPE_CHECKING: from...
""" Some codes from https://github.com/Newmu/dcgan_code """ from __future__ import division import math import json import random import pprint import scipy.misc import matplotlib import csv import re # matplotlib.use('TkAgg') import matplotlib.pyplot as plt import numpy as np from time import gmtime, strftime from ...
#coding=utf-8 import cv2 import numpy as np import os import copy import lib.dataset_handler import torch import lib.draw_image import Net.net as Net import lib.utils #import lib.nms import math import random import shutil import sys anchor_height = [11, 16, 22, 32, 46, 66, 94, 134, 191, 273] IMG_ROOT = "../common/OC...
#!/usr/bin/env python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
# 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 copy import logging import os import tempfile import warnings import numpy as np import pytest import torch from torch import nn import pfrl from pfrl.agents import acer from pfrl.envs.abc import ABC from pfrl.experiments.train_agent_async import train_agent_async from pfrl.experiments.evaluator import run_eva...
import ssl from datetime import timezone from typing import Any, Dict, Tuple, List, Optional from dateparser import parse from mailparser import parse_from_bytes from imap_tools import OR from imapclient import IMAPClient import demistomock as demisto from CommonServerPython import * class Email(object): def __...
"""Definition of base container controllers. It contains functionality concerning the management of containers and related objects, e.g. clusters, that are common among different cloud providers. """ import copy import json import ssl import logging import datetime import requests from bson import json_util import j...
__ssl = __import__('ssl') from eventlet.patcher import slurp_properties slurp_properties(__ssl, globals(), srckeys=dir(__ssl)) import sys from eventlet import greenio, hubs from eventlet.greenio import ( set_nonblocking, GreenSocket, CONNECT_ERR, CONNECT_SUCCESS, ) from eventlet.hubs import trampoline, IOClosed f...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import os import re from shutil import copyfile from astropy.table import Table from astropy.tests.helper import pytest from astropy.coordinates import SkyCoord from astropy.io import fits import astropy.units as u...
import copy import itertools import numpy as np import pandas as pd from scipy.special import erf from scipy import stats class JointNormal(object): """ :type labels: list :param labels: A list of string labels for the variables in this distribution :type mu: iterable of numbers or N x 1 numpy.matri...
#!/usr/bin/env python import json import os import pytest import sys import time import unittest from collections import defaultdict from datetime import datetime, timedelta from unittest import mock import requests from requests import Request import requests_cache from requests_cache import CachedSession CACHE_BAC...
import os import pickle import config as cfg import numpy as np import math import openpyxl import tqdm from openpyxl.styles import PatternFill, colors, Font def f1_score_max(gt, pred, thresh): from sklearn.metrics import precision_score, recall_score P = [] R = [] for i in thresh: new_pred = ...
import io import logging import shutil import subprocess from collections import namedtuple from pathlib import Path from subprocess import CompletedProcess, Popen from tempfile import TemporaryDirectory from textwrap import dedent import pytest from Pegasus import yaml from Pegasus.braindump import Braindump from Pe...
# Copyright 2020 The Trieste Contributors # # 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...
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
import datetime import os import arrow import matplotlib.pyplot as plt import numpy as np import open3d as o3 import progressbar import scipy.interpolate import cluster import kittiwrapper import mapping import particlefilter import polesdetection as poles import util import makegif as mkgif dataset = kittiwrapper...
import scipy.ndimage as nd from scipy.optimize import curve_fit import numpy as np import matplotlib.pyplot as p import astropy.units as u from astropy.table import QTable from .profile import profile_line eight_conn = np.ones((3, 3)) end_structs = [np.array([[1, 0, 0], [0, 1, 0], ...
# Copyright 2016 VMware, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
# Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/) # # 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...
""" ESQuery ======= ESQuery is a library for building elasticsearch queries in a friendly, more readable manner. Basic usage ----------- There should be a file and subclass of ESQuery for each index we have. Each method returns a new object, so you can chain calls together like SQLAlchemy. Here's an example usage: ...
""" Authenticated HTTP proxy for Jupyter Notebooks Some original inspiration from https://github.com/senko/tornado-proxy """ import inspect import socket import os from urllib.parse import urlunparse, urlparse, quote import aiohttp from asyncio import Lock from tornado import gen, web, httpclient, httputil, process,...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Provide functionality for loading images. """ import parlai.core.build_data as build_data from parlai.core.opt impo...
# Copyright (c) 2013-2014 OpenStack Foundation # 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 # # Un...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pandas from pandas.io.common import _infer_compression import inspect from io import BytesIO import os import py import ray import re import warnings import numpy as np from .dataframe import DataFrame...
import math from collections import defaultdict from typing import Any, Dict, List, Union import cv2 import numpy as np from .producing import FeatureProducerBase from ..proto import Scene from ..utils import ( get_tracks_polygons, transform_2d_points, transform_2d_vectors, ) from ..utils.map import ( ...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2004-2021 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
import numpy as np import numba from det3d.ops.nms.nms_gpu import rotate_iou_gpu_eval from det3d.ops.nms.nms_gpu import inter from det3d.core import box_np_ops def get_split_parts(num, num_part): same_part = num // num_part remain_num = num % num_part if remain_num == 0: return [same_part] * num_...
from datetime import timedelta from django.urls import reverse from django.http import HttpResponseRedirect from atlas.prodtask.ddm_api import DDM from atlas.prodtask.models import WaitingStep, StepExecution, InputRequestList, ProductionTask, ProductionDataset from django.shortcuts import render from django.utils imp...
import enum class PlayerType(enum.IntEnum): Human = 0 CPU = 1 Demo = 2 Unselected = 3 class Character(enum.IntEnum): Doc = 0 Mario = 1 Luigi = 2 Bowser = 3 Peach = 4 Yoshi = 5 DK = 6 Falcon = 7 Ganon = 8 Falco = 9 Fox = 10 Ness = 11 Icies = 12 ...
"""Module for creating strawberry types for entity models.""" import dataclasses import enum import sys from inspect import isclass from typing import Any, Dict, ForwardRef, List, Optional, Tuple, Type, Union, cast import strawberry from strawberry.annotation import StrawberryAnnotation from strawberry.arguments impo...
# Copyright 2013 Openstack Foundation # 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 requ...
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from collections import namedtuple import os import numpy as np import pytest from angela2 import prefs, clear_cache, _cache_dirs_and_extensions from angela2.codegen.optimisation import optimise_statements from angela2.codegen.translation import (analyse_identifiers, get_ident...
# -*- coding: utf-8 -*- # Imports from sklearn.svm import SVC, SVR import os,sys import argparse as ap import pandas as pd from sklearn.preprocessing import StandardScaler, MinMaxScaler, RobustScaler,PowerTransformer, QuantileTransformer from sklearn.model_selection import train_test_split, cross_val_score, GridSearc...
#!/bin/python3 from contextlib import contextmanager # pip3 install datetime import datetime import errno import time import shutil import sys import tempfile from os import sep as os_sep from os import listdir from os.path import isdir, join # local imports import consts from args import Arguments, UpdateType from g...
""" Typographeur, pour faire respecter les règles de typographie à la française. """ from argparse import ArgumentParser, FileType from collections import Counter import re import sys from .ligatures import ligature_dictionaries __version__ = '0.6.0.dev0' __all__ = ('typographeur',) TAGS_TO_SKIP = ['pre', 'samp', 'c...
import types import time from sfa.util.faults import * from sfa.util.prefixTree import prefixTree from sfa.util.record import SfaRecord from sfa.util.table import SfaTable from sfa.util.record import SfaRecord from sfa.trust.gid import GID from sfa.util.xrn import Xrn, get_leaf, get_authority, hrn_to_urn, urn_to_hrn...
# Adapted from https://github.com/sergionr2/RacingRobot # Author: <NAME> import argparse import os import time import cv2 from threading import Event, Thread import numpy as np import pygame from pygame.locals import * from stable_baselines.bench import Monitor from stable_baselines.common.vec_env import VecFrameStack...
import inspect import json import os import shlex import sys from pathlib import Path, PurePath from subprocess import CalledProcessError, CompletedProcess from typing import Any, Dict, List, Optional, Sequence, Union from . import log, util from .exceptions import RequiredFilesNotFoundError from .render import call_p...
"""RefineNet-LightWeight RefineNet-LigthWeight PyTorch for non-commercial purposes Copyright (c) 2018, <NAME> (<EMAIL>) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code...
#!/usr/bin/env python3 """ translation protein sequences in Clusters or lists of Proteins. <NAME> """ import logging import uuid from collections import defaultdict, OrderedDict from functools import partial from itertools import combinations, product from multiprocessing import Pool import numpy as np from scipy...
#!/usr/bin/python # -*- coding: utf-8 -*- # _ _ # | |_| |__ ___ ___ __ _ # | __| '_ \ / _ \/ __/ _` | # | |_| | | | __/ (_| (_| | # \__|_| |_|\___|\___\__,_| # # licensed under the MIT license <http://opensource.org/licenses/MIT> # # theca-packer.py - v0.9.0 # fabric based tool to package...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
#!/usr/bin/python3 -OO # Copyright 2007-2021 The SABnzbd-Team <<EMAIL>> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version...
import json import time import logging import os import random import re import shutil from contextlib import contextmanager from pathlib import Path from typing import Callable, Dict, List, NamedTuple, Optional, Tuple import numpy as np import torch from torch import nn from torch.utils.data.dataloader import DataLoa...
""" Copyright (c) Facebook, Inc. and its affiliates. """ import os import sys import math import copy import time import logging from collections.abc import Iterable from prettytable import PrettyTable import Pyro4 import numpy as np if "/opt/ros/kinetic/lib/python2.7/dist-packages" in sys.path: sys.path.remove("/...
# Import packages import os import sys import commands from nipype.interfaces.utility import Function import nipype.algorithms.rapidart as ra import nipype.interfaces.afni as afni import nipype.interfaces.fsl as fsl import nipype.interfaces.io as nio import nipype.interfaces.utility as util import nipype.interfaces.an...
from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2012 <NAME>" __license__ = """ 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 witho...
# SPDX-License-Identifier: Apache-2.0 # Copyright 2019 Blue Cheetah Analog Design Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
from commonLib.nerscLib import * import sys from . import filemanager as fm import numpy as np from numpy.random import * from commonLib import nerscPlot import scipy.cluster.vq as vq #from scipy.spatial import Voronoi, voronoi_plot_2d from scipy.stats import scoreatpercentile from commonLib import timeLib from commo...
import hashlib import hmac import json import logging from metagov.core.plugin_manager import Registry, Parameters, VotingStandard import metagov.plugins.discourse.schemas as Schemas import requests from metagov.core.errors import PluginErrorInternal from metagov.core.models import GovernanceProcess, Plugin, AuthType,...
#!/usr/bin/env python3 """ Surrogate utility. Attributes ---------- LGR Logger """ import logging from copy import deepcopy from math import factorial, floor, ceil import numpy as np from nigsp.operations.timeseries import graph_fourier_transform from nigsp.operations.laplacian import decomposition LGR = log...
# Copyright (c) 2019-2020 <NAME> # License: MIT License from typing import TYPE_CHECKING, Iterable, Sequence, Tuple, Union, List, Dict import array import copy from itertools import chain from contextlib import contextmanager from ezdxf.lldxf import validator from ezdxf.lldxf.attributes import ( DXFAttr, DXFAttribu...
__copyright__ = "Copyright (C) 2009-2021 <NAME>" __license__ = """ 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...
#!/usr/bin/env python # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, thi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # """RAMSES RF - a RAMSES-II protocol decoder & analyser. Works with (amongst others): - evohome (up to 12 zones) - sundial (up to 2 zones) - chronotherm (CM60xNG can do 4 zones) - hometronics (16? zones) """ import asyncio import json import logging import os import sig...
import re, inspect, os.path from difflib import SequenceMatcher try: import colorama colorama.init() WARNING = colorama.Fore.LIGHTYELLOW_EX ERROR = colorama.Fore.LIGHTRED_EX def cprint(color, *args, **kwargs): print(end=(color)) print(*args, **kwargs) print(end=(colorama....
#!/usr/bin/env python3 import math from datetime import datetime import time import numpy as np from common.params import Params from common.numpy_fast import interp import cereal.messaging as messaging from cereal import car from common.realtime import sec_since_boot from selfdrive.swaglog import cloudlog from selfdr...