text
stringlengths
6.04k
39.5k
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import argparse import torch import torch.nn as nn from visdom import Visdom import pyro import pyro.distributions as dist from pyro.contrib.examples.util import print_and_log from pyro.infer import SVI, JitTrace_ELBO, JitTraceEn...
""" sentry.interfaces.exception ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import __all__ = ('Exception', 'Mechanism', 'upgrade_legacy_mechanism') import re import six from ...
from dataclasses import dataclass from typing import Dict, List, Union from selfdrive.car import dbc_dict from selfdrive.car.docs_definitions import CarInfo from cereal import car Ecu = car.CarParams.Ecu class CarControllerParams: def __init__(self, CP): if CP.carFingerprint == CAR.IMPREZA_2020: self.STEE...
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import pyttsx3 import datetime import speech_recognition as sr import smtplib import requests import wikipedia import webbrowser as wb import easygui from youtube_search import YoutubeSearch from tkinter import filedialog from tkinter import messagebox as msg import os import pyautogui import psutil impor...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Big Switch Networks, 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...
#!/usr/bin/env python # # Copyright (c) 2013-2017 <NAME> <<EMAIL>> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" ...
# Copyright (c) 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...
# -*- coding: utf-8 -*- """Run dataset CLI.""" import itertools as itt import json import logging import math import pathlib from textwrap import dedent from typing import Iterable, List, Mapping, MutableMapping, Optional, Tuple, Union import click import docdata import pandas as pd import scipy.stats from more_clic...
# -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- # Vision Transformer with Deformable Attention # Modified by <NAME> # --...
import seaborn as sns import pandas import numpy from ..workbench.analysis import feature_scoring from ..viz import heatmap_table from ..scope.box import Box from ..util.arg_processing import design_check def feature_scores( scope, design, return_type='styled', db=None, random_state=None, cmap='viridis',...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from openvino.inference_engine import IENetwork,IECore from .constants import DEVICE_DURATION_IN_SECS, UNKNOWN_DEVICE_TYPE, \ CPU_DEVICE_NAME, GPU_DEVICE_NAME from .logging import logger import json import re import numpy as np de...
__author__ = 'mangalbhaskar' __version__ = '2.0' """ ## Description: # -------------------------------------------------------- # Annotation Parser Interface for Annotation work flow. # It uses the annotations created by VGG VIA tool v2.03 (not tested), v2.05 (tested). # -----------------------------------------------...
# orm/descriptor_props.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Descriptor properties are more "auxiliary" properties that exist as confi...
import ctypes from enum import Enum import numpy as np from PuzzleLib.Cuda.ThirdParty import libnpp class InterpolationMode(Enum): nn = libnpp.NppiInterpolationMode["NPPI_INTER_NN"] linear = libnpp.NppiInterpolationMode["NPPI_INTER_LINEAR"] cubic = libnpp.NppiInterpolationMode["NPPI_INTER_CUBIC"] cubic2pbSpline ...
# -*- coding: utf-8 -*- # @Author: <NAME> # @Email: <EMAIL> # @Date: 2017-07-31 15:20:54 # @Last Modified by: <NAME> # @Last Modified time: 2020-07-21 16:17:08 import numpy as np from ..core import PointNeuron, addSonicFeatures from ..constants import Z_Ca class Thalamic(PointNeuron): ''' Generic thalamic ne...
# Copyright 2020 ByteDance 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 writin...
# -*- coding: utf-8 -*- # Copyright 2018 Telefonica S.A. # # 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 l...
from sklearn.metrics import f1_score, precision_score, recall_score from sklearn.metrics import confusion_matrix, classification_report, mean_squared_error from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor from sklearn.base import is_classifier, is_regressor, clone from sklearn.model_selection im...
import os import time import threading from mutagen.mp3 import MP3 from pygame import mixer from tkinter import * from tkinter import ttk from tkinter.filedialog import askdirectory import tkinter.messagebox PlayerForm = Tk() # dir sounderdir = os.path.dirname(sys.executable) userdir = os.path.expanduser('~...
''' Edits the sector backgrounds, view distance and fog effects. In IEX, some sectors use a short fade distance even when not fogged, which looks iffy. Note: base files have fade distances all over the place, generally not attached to fogging (probably considering fog more of a visual effect, and using fade distan...
# coding: utf-8 # pylint: disable=too-many-locals, too-many-arguments, invalid-name # pylint: disable=too-many-branches """Training Library containing training routines.""" from __future__ import absolute_import import sys import re import numpy as np from .core import Booster, STRING_TYPES, XGBoostError from .compat ...
from tqdm import tqdm from typing import Dict, Optional import torch.nn.functional as F import torch # torch.autograd.set_detect_anomaly(True) def volume_render( rays_o: torch.Tensor, rays_d: torch.Tensor, near: float, far: float, network_fn, network_fn_fine=None, batched: bool = True, ...
# Copyright (c) Microsoft Corporation and contributors. # Licensed under the MIT License. """Threshold Optimization Post Processing algorithm. This is based on <NAME>, <NAME>, <NAME>'s paper "`Equality of Opportunity in Supervised Learning <https://arxiv.org/pdf/1610.02413.pdf>`_" for binary classification with one c...
from __future__ import print_function import FWCore.ParameterSet.Config as cms class MassSearchReplaceAnyInputTagVisitor(object): """Visitor that travels within a cms.Sequence, looks for a parameter and replace its value It will climb down within PSets, VPSets and VInputTags to find its target""" def __...
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ import ctypes import ipaddr...
import sys import random from tkinter import * import time import math, queue from Init_map import * import threading import numpy as np import array import pyglet map_dimension = 10 numberofaction = 4 spacedimension = 2 theta_leng = map_dimension*spacedimension*numberofaction omega_leng = map_dimension*spacedimensi...
import json from tests import BaseTestCase from redash import models from redash.models import db from redash.serializers import serialize_query from redash.permissions import ACCESS_TYPE_MODIFY class TestQueryResourceGet(BaseTestCase): def test_get_query(self): query = self.factory.create_query() ...
#!/usr/bin/env python3 # -*- coding: latin-1 -*- ''' Releasenator will no longer release files that are associated with files in the experiment being released via controlled_by and supersedes relationship Version 1.6 Releasenator changelog Version 1.5 Store individual release logs instead of overwriting. Versio...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import glob import h5py import copy import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from util import quat2mat # Part of the code is referred from...
#!/usr/bin/python import sys import io from collections import OrderedDict import datetime from time import gmtime import re import numpy as np from numpy.fft import fftfreq, fftshift import numpy.dual as npfast from . import TNTdtypes def s(b): """Convert a bytes object to a str, decoding with latin1 if necess...
""" HoloViews can be used to build highly-nested data-structures containing large amounts of raw data. As a result, it is difficult to generate a readable representation that is both informative yet concise. As a result, HoloViews does not attempt to build representations that can be evaluated with eval; such represen...
bl_info = { "name": "keLinearArray", "author": "<NAME>", "category": "Modeling", "version": (2, 0, 2), "blender": (2, 80, 0), } import bpy import blf from .ke_utils import get_selected, get_distance from mathutils import Vector, Matrix from bpy_extras.view3d_utils import region_2d_to_location_3d ...
from Bio import SeqIO from Bio.Seq import Seq, MutableSeq from Bio.SeqRecord import SeqRecord from Bio.Blast import NCBIWWW, NCBIXML from Bio.Blast.Applications import NcbiblastnCommandline import itertools from collections import defaultdict import re from concurrent.futures import ThreadPoolExecutor, ProcessPoolExe...
import logging from collections import OrderedDict from typing import List, Dict import itertools import geopandas import upsetplot import pandas as pd import plotly.express as px import plotly.subplots as sbp import plotly.graph_objects as go from card_live_dashboard.model.CardLiveData import CardLiveData logger = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''macf.py - <NAME> (<EMAIL>) - Oct 2017 This contains the ACF period-finding algorithm from McQuillan+ 2013a and McQuillan+ 2014. ''' ############# ## LOGGING ## ############# import logging from datetime import datetime from traceback import format_exc # setup a log...
from operator import itemgetter from .._abc.function import * from os import getpid from time import time as now from itertools import compress from util.numeral import base_to_binary2 from numpy.random.mtrand import RandomState # seed: 42323 BENT_INDEXES_LIST = [ [[45, 63, 33, 2], [54, 18, 14, 21], [20, 16, 4, ...
import sys import os import logging import numpy as np from tqdm import tqdm import nltk import pickle import json import random from pathlib import Path import multiprocessing as mp from argparse import REMAINDER, ArgumentParser from icebert.cid_mapping import fast_tokenize, encode_cID from transformers import BertTo...
# coding:utf-8 from typing import Optional, Tuple, Dict, Collection, Union import enum from inspect import Parameter from argparse import ArgumentParser, OPTIONAL, ONE_OR_MORE, ZERO_OR_MORE from functools import lru_cache from bourbaki.introspection.types import ( get_generic_args, deconstruct_generic, is_n...
# Software License Agreement (BSD License) # # Copyright (c) 2008, <NAME>, Inc. # 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 copyri...
"""Methods for plotting attributes diagram.""" import numpy from descartes import PolygonPatch import shapely.geometry import matplotlib.colors import matplotlib.pyplot as pyplot DEFAULT_NUM_BINS = 20 RELIABILITY_LINE_COLOUR = numpy.array([228, 26, 28], dtype=float) / 255 RELIABILITY_LINE_WIDTH = 3 PERFECT_LINE_COLOU...
import uuid import json import random from ast import literal_eval from django_filters.rest_framework import DjangoFilterBackend from django.http import HttpResponse, JsonResponse from django.db.models import Q from django.utils.text import slugify from rest_framework.mixins import CreateModelMixin, ListModelMixin, Ret...
# _orienteer_data.py # # Provides a set of Python classes which roughly align with parts of the # International Orienteering Federation (IOF) XML spec at # http://orienteering.org/datastandard/IOF.xsd # # Provides a Reader Object which can read properly structured XML and CSV # files and build the python classes with t...
# coding=utf-8 # Copyright 2020 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...
#Using a edited version of python-sc2 import sc2 from sc2 import run_game, maps, Race, Difficulty, position, Result from sc2.player import Bot, Computer, Human from sc2.constants import * import random import cv2 import numpy as np import time import multiprocessing import os HEADLESS = False class ProtossBot(sc2....
# AoC Utils import re import math import functools import itertools from collections import Counter, defaultdict, deque from enum import IntEnum, auto from typing import Any, Callable, DefaultDict, Deque, Dict, FrozenSet, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Sequence, Set, Tuple, TypeVar, Unio...
""" Particle Swarm Optimizer (PSO) ====================================================================== Particles ---------------------------------------------------------------------- In PSO, a particle represents a set of parameters to be optimised. Each parameter is therefore a degree of freedom of the particl...
"""norm.py Implementations of various normalization layers. Alternate implementations are for compatability with officially unofficial BigGAN release found here: https://github.com/ajbrock/BigGAN-PyTorch """ from torch.nn import Parameter import torch import torch.nn as nn import torch.nn.functional as F from torch.n...
""" training.py ================= Description: Author: Usage: """ import sklearn import numpy import os import csv import sys import random import ast import SimpleITK as sitk from sklearn.externals import joblib from sklearn.ensemble import RandomForestClassifier import pandas as pd import json from .vesselness imp...
# Copyright 2021 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 argparse import os from datetime import datetime import numpy as np import torch import torch.distributed as dist import torch.multiprocessing as mp import torch.nn as nn from torch.utils.data import DataLoader, BatchSampler from torch.utils.data.distributed import DistributedSampler from tqdm import tqdm impo...
""" Framework for general experiments Copyright (C) 2014-2018 <NAME> <<EMAIL>> """ import copy import logging import multiprocessing as mproc import os import time import types import uuid from functools import wraps import tqdm import yaml from sklearn import metrics #: total number of avalaible CPUs/treads CPU_CO...
# coding: utf-8 # # small dataset XRD classification using machine learning # ## Introduction # This is meant to be a (relatively) self-contained example of XRD classifcation on small dataset via physics based data agumentation # The overall procedure is: # 1. Load the experimental and theorectical XRD spectra wi...
# MIT License # # Copyright (c) 2020, <NAME>. # # 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, pub...
#=============================================================================== # Copyright 2008 <NAME> # # 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/license...
#!/usr/bin/env python3 # This file is part of the Astrometry.net suite. # Copyright 2009 <NAME> # Licensed under a 3-clause BSD style license - see LICENSE # https://github.com/dstndstn/astrometry.net from __future__ import print_function import os import sys import time import base64 try: # py3 from urllib....
from typing import List, Set import numpy as np import tensorflow as tf from keras_preprocessing.sequence import pad_sequences from tqdm import tqdm from hotpot.data_handling.dataset import Dataset, QuestionAndParagraphs, QuestionAndParagraphsSpec, \ QuestionAndParagraphsDataset from hotpot.data_handling.relevance...
# 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...
# Compares concept URIs in docs/resource_uri_to_oncocode_mapping.txt to the current concept URIs defined in TopBraid. # # ./validate_topbraid_uris.py --curated-file resource_uri_to_oncotree_mapping_file --properties-file application.properties # # Author: <NAME> and <NAME> # # -*- coding: utf-8 -*- import optparse imp...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy...
import datetime import json import math import os from typing import Any, Iterable, Union import cv2 import matplotlib.pyplot as plt import numpy as np from core.base import BaseClass from tensorflow.keras.utils import to_categorical class BaseHelper(object): """Helper class for basic tasks Can be used with...
""" Copyright 2010 <NAME> <<EMAIL>> This file is part of PyCAM. PyCAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PyCAM is distributed...
""" Robust linear models with support for the M-estimators listed under :ref:`norms <norms>`. References ---------- <NAME>. 'Robust Statistics' John Wiley and Sons, Inc., New York. 1981. <NAME>. 1973, 'The 1972 Wald Memorial Lectures: Robust Regression: Asymptotics, Conjectures, and Monte Carlo.' The Annals...
from ..kernel import core from ..character import characterKernel as ck from functools import partial from ..status.ability import Ability_tool from ..execution.rules import RuleSet, ConcurrentRunRule from . import globalSkill from .jobbranch import pirates from .jobclass import nova from . import jobutils from math im...
import os os.environ['PYOPENGL_PLATFORM'] = 'osmesa' # from mesh_to_sdf import sample_sdf_near_surface import trimesh # import pyrender import numpy as np import json import numpy as np import time import skimage.measure import subprocess import random import pandas as pd from tqdm import tqdm_notebook import matplo...
#!/usr/bin/env python # coding: utf-8 ####### Import packages ######### import numpy as np import pandas as pd import pickle import datetime import time import zipfile import gensim import gensim.corpora as corpora from gensim.utils import simple_preprocess from gensim.models import LdaMulticore import os import spac...
# -*- coding: utf-8 -*- """ Adapted from `oemof.tabular's facades <https://github.com/oemof/oemof-tabular/blob/master/src/oemof/tabular/facades.py>`_ Facade's are classes providing a simplified view on more complex classes. More specifically, the :class:`Facade` s in this module inherit from `oemof.solph`'s generic c...
""" File originally part of the Topographica project. Provides SheetCoordinateSystem, allowing conversion between continuous 'sheet coordinates' and integer matrix coordinates. 'Sheet coordinates' allow simulation parameters to be specified in units that are density-independent, whereas 'matrix coordinates' provide a ...
# ================ AlphaZero algorithm for Connect 4 game =================== # # Name: ResNet.py # Description: Includes both a dense and a resnet. # Almost identical/taken from https://pytorch.org/docs/0.4.0/_modules/torchvision/models/resnet.html # Authors: <NAME> & <...
# 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 time import asyncio import websockets import websockets.http import websockets.exceptions import telnetlib import re import traceback import threading from uao import register_uao register_uao() try: from . import data_type from . import i18n from . import log from . import screens from . i...
import gc import xbmc import xbmcgui import kodigui from lib import colors from lib import util from lib import metadata from plexnet import playlist import busy import episodes import tracks import opener import info import musicplayer import videoplayer import dropdown import windowutils import search from lib.u...
import warnings import random import json import jinja2 import numpy import re import os from ._server import serve from .utils import deprecated, get_id, write_ipynb_local_js from .mpld3renderer import MPLD3Renderer from . import urls #import mplexporter from mplexporter import Exporter __all__ = ["fig_to_html", "fig...
import pandas as pd import os import numpy as np import seaborn as sns import matplotlib.pyplot as plt AVERAGE_SAMPLES = 25 def _acceptance_average(path,n=1): path = '{}/acceptance'.format(path) avg = 0 for i in range(n): accpt = np.genfromtxt('{}_{}.csv'.format(path,i))[1:] avg ...
import numpy as np from scipy import interpolate import ezdxf import h5py from copy import copy from Roadways import * class SplineCurve: def __init__(self,id=None,pts=None,keys=None,tck=None,u=None): self.id = id self.pts = pts self.keys = keys self.tck = tck # spline coefficients ...
# coding: utf-8 import os import time import os.path from importlib import import_module import traceback from datetime import datetime import json from sqlalchemy import or_, and_, func from flask import Blueprint, request, session, url_for, g, send_file from flask_login import LoginManager, login_user, logout_user, ...
#<NAME> import numpy as np import math #from matplotlib import pyplot as plt def bar_MPa(pres): pres=pres/10 return pres def MPa_bar(pres): pres=pres*10 return pres def C_K(temp): temp=temp+273 return temp def K_C(temp): temp=temp-273 return temp def check_ove...
import re import os import shutil import sys import json from datetime import datetime, timedelta import tabulate import tempfile import pytz import kbr.args_utils as args_utils import kbr.datetime_utils as datetime_utils import kbr.file_utils as file_utils import cromwell.api as cromwell_api def group_args(args)...
"""Convert a word from Greek orthography into its hypothesized pronunciation in the International Phonetic Alphabet (IPA). https://raw.githubusercontent.com/j-duff/cltk/ipa/ cltk/phonology/greek/transcription.py """ import re import unicodedata from nltk.tokenize import wordpunct_tokenize from cltkv1.core.cltk_log...
import argparse import sys import os import shutil import time import math import h5py from random import randint import torch import torch.nn as nn import torch.optim import torchvision.transforms as transforms import torch.nn.functional as F import torch.nn.parallel import torch.distributed as dist from torch.nn.pa...
""" Convert from old gallery software to new gallery. Take raw album files and DB info, and translate into new dir structure. """ import argparse import os from collections import Counter import logging from pathlib import Path from pprint import pprint import shutil from html import unescape import pymysql.cursors ...
# coding: utf-8 import torch from torch import nn from .common_layers import Prenet from .attentions import init_attn class BatchNormConv1d(nn.Module): r"""A wrapper for Conv1d with BatchNorm. It sets the activation function between Conv and BatchNorm layers. BatchNorm layer is initialized with the TF def...
''' # ambre.analyze.align_seg.py # # Copyright March 2013 by <NAME> # # This program is free software; you may redistribute it and/or modify its # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License or # any later version. # # This pro...
import errno import os import numpy as np from PIL import Image import torch import torch.nn as nn import torch.nn.functional as F from torch._six import string_classes from torch.utils.data.dataloader import default_collate from torch.nn import init from torch.autograd import Variable import re import collections im...
from itertools import chain from clang.cindex import CursorKind, TypeKind, AccessSpecifier from path import Path from .type_parser import parse_type from .translation_unit import parse_tu from .utils import current_platform def paths_approximately_equal(p1,p2): '''Approximate path equality. This is due to ''...
''' Author <NAME> Date 5/17/2021 preprocess cropped images by shuffling, splitting (training, validation, and test sets) and standardizing augment preprocessed images in-memory ''' from data_processor import preprocess_input, preprocess_output, normalize_input, preprocess_per_input_image from sklearn.model_sel...
from pbxproj.pbxsections import * from pbxproj import PBXList class TreeType: ABSOLUTE = '<absolute>' GROUP = '<group>' BUILT_PRODUCTS_DIR = 'BUILT_PRODUCTS_DIR' DEVELOPER_DIR = 'DEVELOPER_DIR' SDKROOT = 'SDKROOT' SOURCE_ROOT = 'SOURCE_ROOT' @classmethod def options(cls): retu...
from __future__ import print_function import argparse import itertools import os import pickle import sys from datetime import datetime import random import matplotlib import numpy as np import torch import faiss import torch.nn as nn from sklearn.metrics.cluster import normalized_mutual_info_score matplotlib.use('A...
""" The code to deploy a service specified in a Dockerfile. """ import os import time import json from urllib.parse import urlparse from ..utils import dockercall from ._auth import load_config alphabet = "abcdefghijklmnopqrstuvwxyz" identifier_chars = alphabet + alphabet.upper() + "0123456789" + "_" # Cannot map ...
# coding=utf-8 # Copyright 2020 The Compressive Visual Representations 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 r...
# -*- coding: utf-8 -*- import logging import os import pdb import random import shutil import sys import time import numpy as np import torch import torch.backends.cudnn as cudnn import torch.nn.parallel import torch.optim from opts import parser # import torchvision # from tensorboardX import SummaryWriter from torc...
# Copyright (c) 2015 SONATA-NFV, 5GTANGO, UBIWHERE, Paderborn University # 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...
""" instance catalog reader """ from __future__ import division, print_function import os import gc import gzip import warnings from functools import partial import numpy as np import pandas as pd from astropy.cosmology import FlatLambdaCDM from GCR import BaseGenericCatalog __all__ = ['InstanceCatalog'] def _mag2fl...
import ply.lex as lex import ply.yacc as yacc import os import sys LexerError=False #Welcome='Tiger and Buti Compiler 2020 0.2.0\nCopyright (c) 2019: <NAME>, <NAME>' #print(Welcome) tokens=( 'class', 'else', 'false', 'if','fi', 'in', 'inherits', 'isvoid', 'let', 'loop', 'pool', 'then', 'while', 'cas...
import typing from numba import njit import numpy as np from ._lubrication_utils import tdma from slippy.core import _NonDimensionalReynoldSolverABC __all__ = ['UnifiedReynoldsSolver'] class UnifiedReynoldsSolver(_NonDimensionalReynoldSolverABC): # noinspection SpellCheckingInspection """ The unifie...
# -*- coding: utf-8 -*- """ File with auxiliary operations needed to handle the actions, namely: functions to process request when receiving a "serve" action, cloning operations when cloning conditions and actions, and sending messages. """ from __future__ import unicode_literals, print_function import datetime import...
# ############################################################################## # This file is part of df_config # # # # Copyright (C) 2020 <NAME> <<EMAIL>> # # All Rights Res...
# The MIT License (MIT) # # Copyright (c) 2016 Adafruit Industries # # 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, cop...
# Copyright (c) 2008-2009 <NAME>, http://www.aryehleib.com # All rights reserved. # # Modified from original contribution by <NAME>, which was # released under the New BSD license. import unittest from django.contrib.gis.geos.mutable_list import ListMixin class UserListA(ListMixin): _mytype = tuple ...
''' Copyright (c) 2018 Doomhawk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli...