text
stringlengths
3.07k
22.1k
# Copyright 2013-2019 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" fil...
import argparse import math from pathlib import Path import numpy as np import torch import torch.optim as optim from torch import LongTensor from torch.cuda.amp import autocast, GradScaler from torch.utils.data import DataLoader from tqdm import tqdm from data import TextDataset from model import Encoder def infin...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 UnitedStack 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.or...
# Copyright 2019 Xilinx 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 writing...
""" Class with will be used as an API for the PRIM algorithm and upgrade """ from rich import print MATRIX = [ # matrice des distances [0,376,555,377,475,632,536,594,424,639,334,263,157,300,558,630,230,428,593,716,822,402], [376,0,185,245,646,803,347,466,586,800,649,652,307,462,719,945,221,662,685,693,651,187]...
#!/usr/bin/env python3 """ rpm_db_function_finder is a utility to connect the undefined functions in an executable to the executable and rpm where it is defined. """ from .rpm_db_processor import Organizer from argparse import ArgumentParser from json import dumps, load from .rpm_db_print import DBPrinter from os impo...
# -*- coding: utf-8 -*- # Copyright 2014, <NAME> # Released under the MIT License. """bqlib tests""" import os import sys from inspect import isclass from contextlib import nested import pytest from mock import patch, Mock from bqlib import BQJob, BQJobGroup, BQTable, BQHelper, BQError ### fixtures _fixtures_conver...
import git import numpy as np import os import argparse import sys import json import torch from utils.spec_reader import SpecReader from policy_gradients import models from policy_gradients.agent import Trainer from cox.store import Store, schema_from_dict # Tee object allows for logging to both stdout and to file...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import xrange import numpy as np from util import log from model import Model from input_ops import create_input_ops, check_data_id import tensorflow as tf import time import imageio import sc...
""" Data-driven tests for variants. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import glob import vcf import ga4gh.datamodel as datamodel import ga4gh.datamodel.datasets as datasets import ga4gh.datamodel.variants as variants import ga4...
import plotly as py import plotly.graph_objs as go import glob import os def main_plotly(generate_city_data, kuksa_file_csv): new_members_for_disctrict = 0 kotikunta = 0 empty_field = 0 no_sex = 0 data_structure = {2014: {}, 2015: {}} #This for the whole group(piiri) district_whole_year = ...
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
import argparse import os import ruamel.yaml as yaml import numpy as np import random import time import datetime import json from pathlib import Path import torch import torch.nn as nn import torch.nn.functional as F import torch.backends.cudnn as cudnn import torch.distributed as dist from torch.utils.data import Da...
#!/usr/bin/env python # pylint: disable=C0116,W0613 # This program is dedicated to the public domain under the CC0 license. """ First, a few callback functions are defined. Then, those functions are passed to the Dispatcher and registered at their respective places. Then, the bot is started and runs until we press Ctr...
"""Generates capacity diagrams for the bottleneck. This method accepts as input a csv file containing the inflows and outflows from several simulations as created by the file `examples/sumo/density_exp.py`, e.g. 1000, 978 1000, 773 1500, 1134 ... And then uses this data to generate a capacity diagram...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
import datetime import os from decimal import Decimal from itertools import groupby from dateutil import parser from dateutil.relativedelta import relativedelta from dateutil.rrule import MONTHLY, rrule from django.http import HttpResponse from django.utils.translation import ugettext_lazy as _ from rest_framework imp...
# coding=utf-8 # Copyright 2021 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...
from attr import evolve, attrib, attrs from ...fileio.adm.elements import ObjectPolarPosition, ObjectCartesianPosition from ..geom import azimuth, inside_angle_range, local_coordinate_system, relative_angle import numpy as np def to_polar(block_format): block_format = _fix_cartesian_flag(block_format) if not ...
from django.contrib.contenttypes.models import ContentType from django.core import serializers from django.db import IntegrityError import json from Poem.api.internal_views.utils import one_value_inline, two_value_inline, \ inline_metric_for_db from Poem.api.views import NotFound from Poem.helpers.history_helpers...
import cv2 import numpy as np from .draw import draw_filled_polygon from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QErrorMessage, QLabel from PyQt5.QtCore import Qt, QPointF, QRectF from PyQt5.QtGui import QPolygonF, QPen from qtwidgets import QImageViewer import sys __all__ ...
import os import time import numpy as np import torch.nn as nn import torch from torch import optim import prepare_multi_sources_data import func from torch.autograd.variable import Variable from torch.utils.data import DataLoader train_data_path = "/Work18/2021/fuyanjie/exp_data/exp_nnsslm/train_data_dir/train_data...
""" Transducer loss implementation (depends on numba) Authors * <NAME> 2020 """ import torch from torch.autograd import Function from torch.nn import Module try: from numba import cuda except ImportError: err_msg = "The optional dependency Numba is needed to use this module\n" err_msg += "Cannot import ...
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
"""Functions for generating trees.""" from collections import defaultdict import networkx as nx from networkx.utils import py_random_state __all__ = ["prefix_tree", "random_tree"] #: The nil node, the only leaf node in a prefix tree. #: #: Each predecessor of the nil node corresponds to the end of a path #: used to ...
# Copyright (c) 2020 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...
# MIT License # # Copyright (c) 2020 <NAME> (Talendar) # # 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, m...
''' Function: 随机生成迷宫 Author: Charles 微信公众号: Charles的皮卡丘 ''' import pygame import random from .misc import showText, Button, Interface '''一个游戏地图块''' class Block(): def __init__(self, coordinate, block_size, border_size, **kwargs): # (col, row) self.coordinate = coordinate self.b...
# coding=utf-8 # Copyright 2014 <NAME> """ Gra w kółko i krzyżyk """ import pygame import pygame.locals import logging # Konfiguracja modułu logowania, element dla zaawansowanych logging_format = '%(asctime)s %(levelname)-7s | %(module)s.%(funcName)s - %(message)s' logging.basicConfig(level=logging.DEBUG, format=log...
# coding: utf-8 from __future__ import print_function import sys import base64 import binascii from decimal import Decimal, ROUND_FLOOR from fractions import Fraction import hashlib import hmac import io import os import struct from mnemonic import Mnemonic from pbkdf2 import PBKDF2 try: from crc16 import crc16xm...
from cdkk.cdkkSprite import * from cdkk.cdkkColours import * sprite_extra_styles = { "Label": {"fillcolour":None, "outlinecolour":None, "textsize":36 }, "DynamicText": {"outlinecolour":None, "textsize":36 }, "Button": {"fillcolour":"gray80", "outlinecolour":"black", "textsize":36 }, "GameOver": { "text...
import random import time import PIL import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.datasets as dset import torchvision.transforms as transforms from PIL import Image from torch.autograd import Variable from to...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import os import http import subprocess import infra.network import infra.path import infra.proc import infra.net from ccf.ledger import NodeStatus import infra.e2e_args import suite.test_requirements as reqs import inf...
import os import string from configparser import ConfigParser from shlex import shlex from typing import Any, List, Optional, Tuple, Type, TypeVar, Union from loguru import logger T = TypeVar("T") class DfParams: def __init__(self): self.sr: int = config("SR", cast=int, default=48_000, section="DF") ...
import os import logging import time import librosa import numpy as np import struct import array import torch from scipy.io.wavfile import read as wavread # import distoptim as dist def print_rank(str): # time_stamp = datetime.datetime.now().strftime("%I %M %p %B %d %Y") # str = "{} | rank {}: {}".format(tim...
import django from django import forms from django.db.models.fields import FieldDoesNotExist from django.forms.forms import pretty_name from django.views.generic.base import TemplateView from pyston.filters.default_filters import OPERATORS from is_core.config import settings from is_core.filters import UIFilterMixin,...
''' Auxillary functions ''' import torch from PIL import Image from torch import eye import torch.nn.functional as F from torchvision import transforms def load_img(file_path, img_size): ''' loading images Args: file_path (str): the path of loadding image Returns: Tensor: si...
import numpy as np from numpy import std, mean, sqrt from networkx import Graph, number_connected_components # Need to import IO def overlap_function(base_arr, input_arr, input_ids_list, input_mode = 'separate',\ base_ids_list = None, basis = 'DICE'): ''' Measures the overlap between the base and values ...
import io import codecs import json import csv import contextlib import os import shutil import tarfile from collections import defaultdict from typing import NamedTuple, Tuple from pathlib import Path import ir_datasets from ir_datasets.util import Lazy, DownloadConfig from ir_datasets.datasets.base import Dataset, Fi...
import datetime as dt from fabric.api import env, local, task, lcd, settings import json import time from time import sleep from .heroku_utils import first_colour_database from .utils import repeat_run_local, FabricSupportException, wait_for_dyno_to_run # Global environment variables See documentation HEROKU_APP_NAME...
# -*- coding: utf-8; -*- """Classes for representing various elements of the protocol.""" from collections import namedtuple import six from httpolice.util.text import force_bytes, force_unicode ############################################################################### # Commonly useful structures @six.pyt...
from typing import Optional, List import matplotlib.pyplot as plt import numpy as np from flatland.core.env_observation_builder import DummyObservationBuilder from flatland.envs.agent_utils import RailAgentStatus from flatland.envs.rail_env import RailEnv, RailEnvActions, fast_count_nonzero from reinforcement...
import math from typing import Dict, List, Optional, Tuple, Set import matplotlib.pyplot as plt import numpy as np from flatland.core.grid.grid4 import Grid4TransitionsEnum from flatland.core.grid.grid4_utils import get_new_position from flatland.core.transition_map import GridTransitionMap from flatland.envs.agent_u...
import os import sys import enum import importlib from os import listdir from gadgethiServerUtils.GadgethiClient import * from gadgethiServerUtils.file_basics import * import hmac from hashlib import sha1 from flask import session, request, abort from werkzeug.security import safe_str_cmp class FamcyFileImportMode(e...
from builtins import object from collections import OrderedDict, namedtuple from nineml.exceptions import ( NineMLInvalidElementTypeException, NineMLDualVisitException, NineMLDontVisitChildrenException) class OrderedDefaultOrderedDictDict(OrderedDict): def __missing__(self, key): self[key] = valu...
import argparse import torch import torch.utils.data from torch import nn, optim, lgamma from torch.nn import functional as F from torchvision import datasets, transforms from torch.distributions import Normal, Categorical, Beta, Binomial from torchvision.utils import save_image import numpy as np parser = argparse.Ar...
import os import json import requests from bs4 import BeautifulSoup, element from typing import Optional, Union, Tuple, List from source.course import Course, Program from source import utils from source.gui import gui_popups SPECIAL_MESSAGES = {'ERSPE1038': ['Two of (CSC422H5, CSC423H5, CSC427H5, CSC490H5)'], ...
# -*- coding: utf-8 -*- """ An Experiment regroups multiple scenarios and enables to run them and analyze their results. """ import datetime import os import uuid from pathlib import Path from shutil import copyfile import matplotlib.pyplot as plt import pandas as pd from loguru import logger from . import scenario ...
"""Parser functions, based on www.github.com/tusharsadhwani/json_parser""" from ast import literal_eval from collections import deque from dataclasses import dataclass, field from typing import Optional, AbstractSet, Union from Cat.utils.collections_ import OrderedMultiDict from Cat.utils.profiling import ProfiledFunc...
import collections import sys if sys.version_info[0] == 2: import Queue as queue string_classes = basestring else: import queue string_classes = (str, bytes) import threading import traceback import math import time import torch from torch.utils import data import torch.multiprocessing as multiprocessi...
import collections import datetime import os.path import tempfile from django.conf import settings from django.utils.functional import cached_property from django.utils.http import quote_etag import freezegun from unittest import mock import pytest from babel import Locale from olympia import amo from olympia.addon...
import torch import numpy as np from argparse import ArgumentParser from torch.nn.functional import one_hot from torch.nn import MSELoss from torch.optim import Adam from tqdm import tqdm import h5py def extract_couplings_fitting(samples_dist, logp_dist, sam...
# -------------------------------------------------------- # SiamMask # Licensed under The MIT License # Written by <NAME> (wangqiang2015 at ia.ac.cn) # -------------------------------------------------------- from pycocotools.coco import COCO from os.path import join import json import numpy as np import matplotlib.py...
import math import os import traceback import numpy as np import tensorflow as tf from bage_utils.date_util import DateUtil from bage_utils.num_util import NumUtil from bage_utils.timer_util import TimerUtil from bage_utils.watch_util import WatchUtil from nlp4kor_tensorflow.config import SAMPLE_DATA_DIR, TENSORBOARD...
import os import pickle import numpy from data import get_eval_loader import time import numpy as np from vocab import Vocabulary import torch from model import VGNSL from collections import OrderedDict from utils import generate_tree, clean_tree from IPython import embed class AverageMeter(object): """Computes...
import gym import requests import pandas as pd import numpy as np class CovidChallengeCalibrationEnv(gym.Env): def __init__(self, baseuri="https://reward-service.eu-gb.mybluemix.net/covid19modelv1", userID="61122946-1832-11ea-ssss-github", base_data="calibration_input.json", driver_data="casesdata.csv", numdays = ...
# -*- coding: utf-8 -*- ''' NAPALM BGP ========== Manages BGP configuration on network devices and provides statistics. :codeauthor: <NAME> <<EMAIL>> & <NAME> <<EMAIL>> :maturity: new :depends: napalm :platform: unix Dependencies ------------ - :mod:`napalm proxy minion <salt.proxy.napalm>` .. versionadded:...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th def random_manifold_gaussian_params(): ...
#!/usr/bin/env python from distutils.core import setup from distutils.extension import Extension from distutils.cmd import Command from distutils.version import LooseVersion import warnings import sys, os import os.path as op from functools import reduce import numpy import configure # Sticky-options configuration ...
"""Convert labeled vectors into folded training inputs Currently converts to svmrank and xgboost formats. """ import multiprocessing.dummy import os from typing import Any, List, Optional, TypeVar from pyspark.sql import DataFrame, functions as F, Row, types as T from mjolnir.training.tuning import group_k_fold impo...
# Copyright (c) Microsoft Corporation and Fairlearn contributors. # Licensed under the MIT License. import numpy as np import pandas as pd import pytest from fairlearn.postprocessing._constants import ( LABEL_KEY, SCORE_KEY, SENSITIVE_FEATURE_KEY, ) from fairlearn.postprocessing._threshold_operation impor...
"""This file contains some convenience utilities to figure out which pinacs are good to use at a given moment. """ from lxml import html import requests import pandas as pd import numpy as np import os DEFAULT_PINAC_PAGE = "https://people.cs.kuleuven.be/~sebastijan.dumancic/pinacs/" def parse_table_row(table): ...
# -*- coding: utf-8 -*- """ Created on Fri Jan 28 11:15:36 2022 @author: teohz @brief: this program graphs the computed trajectory against a smoothing spline fit the trajectory's derivatives are computed up to jerk using discrete-time derivatives. the smoothing fit ...
import stripe import time from django.conf import settings from django.views.generic.base import TemplateView from django.shortcuts import redirect, get_object_or_404, render from django.http import JsonResponse from django.utils import timezone from django.db import transaction, DatabaseError from .models import * ...
""" Apply a (possibly multi-file) per-pixel spatial reference. Author: <NAME>, <EMAIL> """ import argparse import numpy as np import pandas as pd from osgeo import gdal from spectral.io import envi import logging import ray from typing import List import os import multiprocessing GLT_NODATA_VALUE=-9999 CRITERIA_NODA...
#!/usr/bin/python3 """ KernelParamExtractor is built for extracting kernel parameter values by executing the GPU application through the GPU profiler """ import profiling_executor from kernel_parameters import KernelParameters import re import csv import json, datetime, os, platform import glob def strip_parenthesis...
from __future__ import print_function import time # import socket # import subprocess # import argparse # import base64 import uuid import threading import tornado.web import tornado.ioloop import tornado.options import tornado.httpserver # import tornado.httpclient # import tornado.websocket import tornado.gen impor...
from lib.maze import MazeRunner, Obstacle from lib.utilities import KeyBoard, TextPrinter from config.snake_minigame import Snake ## # @name stage_4 # @type maze instance # # @usage The final stage of the demo config # is a 16x16 maze with a few additional # obstacles to demonst...
#!/usr/bin/python # -*- coding: UTF-8 -*- """ Scenario test, stress test tool for BitShares based on JSON and pybitshares. """ # Since simplejson is backwards compatible, you should feel free to import # it as `json` import simplejson as json import csv import logging import argparse import time import itertools impor...
#!/usr/bin/env python """Top-BLAST hit detection Compare tree-based method to straight-forward sequence-based approach """ from __future__ import division import csv import logging import re import tempfile from Bio import SeqIO from collections import namedtuple from subprocess import check_output, CalledProcessE...
"""Dataset adapters for re-purposing a dataset for a different kind of training task.""" import os import json import numpy as np from .. import backend as F from ..convert import graph as create_dgl_graph from ..sampling.negative import _calc_redundancy from .dgl_dataset import DGLDataset from . import utils from .....
from aqt.qt import ( QRegExp, QRegularExpression, QColor, QTextCharFormat, QFont, QSyntaxHighlighter, Qt, ) from aqt import mw class JSHighlighter(QSyntaxHighlighter): def __init__(self, parent=None): super(JSHighlighter, self).__init__(parent) is_night_mode = mw.pm.ni...
import pandas as pd from sqlalchemy.orm.session import sessionmaker from itertools import combinations from typing import Tuple, Set import builtins import types from ..processors import MdProcessor from ..processors import CodeProcessor from ..connector import Connector from .write_to_db import write_notebook_to_db, ...
# -*- coding: utf-8 -*- import sqlite3 import threading import sys from . import sitecfg from . import esi_calls class EsiNamesResolver: def __init__(self, cfg: sitecfg.SiteConfig): self.cfg = cfg self.error_str = '' self.ids_limit = 10 self.universe_ids_limit = 1000 def reso...
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # import functools from django import forms from django.core.exceptions import ValidationError from django.db.models import Q from django.utils import six from django_filters.filterset imp...
### edubit-audio-spectrogram.py v1.0 ### A spectrogram using CLUE microphone with Edu:bit peak meter ### Waterfall FFT demo adapted from ### https://teaandtechtime.com/fft-circuitpython-library/ ### to work with ulab on Adafruit CLUE ### https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython/fft-exampl...
import shutil from copy import deepcopy from pathlib import Path import numpy as np import torch from PIL import Image from homura.liblog import get_logger from homura.utils.reproducibility import set_seed from torch.utils.data import RandomSampler, DataLoader, ConcatDataset from torchvision import transforms from tor...
import os.path from bootstrapvz.base import Task from bootstrapvz.common import phases from bootstrapvz.common.tasks import kernel class InstallDHCPCD(Task): description = 'Replacing isc-dhcp with dhcpcd' phase = phases.preparation @classmethod def run(cls, info): # isc-dhcp-client before je...
# # Copyright (c) 2020 <NAME> <<EMAIL>> # # 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, ...
#!/usr/bin/python """ @file routecheck.py @author <NAME> @author <NAME> @author <NAME> @date 2007-03-09 @version $Id$ This script does simple checks for the routes on a given network. Warnings will be issued if there is an unknown edge in the route, if the route is disconnected, or if the route definition doe...
''' mri-specific helper functions ''' import os.path import torch import numpy as np import math import sigpy path_m = os.path.abspath(os.path.join(os.path.dirname(__file__),'..')) + '/masks/' def apply_mask(ksp_orig, accel, calib=None, expmt=False): ''' apply mask default: 512x80 mask zero padded to 51...
from collections import namedtuple import json import logging from threading import RLock import greenlet from api.core.data_structures.queues import QueueEx from api.core.signals.events import EventHandler from api.core.utility import getUniqueId, Timer from api.web.web_utility import SignalActions import gevent impor...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
import numpy as np import cvxopt from collections import (namedtuple, defaultdict) def initLPMatrices(params,Bld_Net): #Initializing the matrix for the LP A = np.zeros((params['NUM_BLD_NODES'], params['NUM_BLD_NODES']*(params['NUM_DEM_NODES']+params['NUM_PARALLEL_LINKS']))) for i in range(params['NUM_BLD...
#coding=utf-8 from unittest import TestCase from nose.tools import eq_, ok_, assert_raises from parsimonious.exceptions import ParseError, IncompleteParseError from parsimonious.expressions import (Literal, Regex, Sequence, OneOf, Not, Optional, ZeroOrMore, OneOrMore, Expression) from parsimonious.grammar import ...
import os import sys MY_DIRNAME = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.join(MY_DIRNAME, '..')) import torch import torch.nn as nn import numpy as np import math from dac_sdc_2020.dac_dataset import DAC_SDC_2020_Dataset from nets.yolo_v3 import Yolo_v3 from common.utils import bbox_iou ...
# Natural Language Toolkit: Combinatory Categorial Grammar # # Copyright (C) 2001-2022 NLTK Project # Author: <NAME> <<EMAIL>> # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT """ The lexicon is constructed by calling ``lexicon.fromstring(<lexicon string>)``. In order to construct ...
## @file # This file is used to provide method for process AsBuilt INF file. It will consumed by InfParser # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License ...
# Copyright 2014, Big Switch Networks # 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...
from typing import Any, Generic, List, Optional, TextIO, TypeVar, Union, overload from . import get_console from .console import Console from .text import Text, TextType PromptType = TypeVar("PromptType") DefaultType = TypeVar("DefaultType") class PromptError(Exception): """Exception base class for prompt relat...
import ytmusicapi from pprint import pprint import typing from time import sleep from datetime import datetime import unicodedata import re import difflib import traceback from common import Seed, YTMusicResult, create_ytmusic_url, output_line, output_header, get_album_detail def seed_v2_to_v1(columns): def a_or_b...
"""Generation of new problem instances""" import time # fork of multiprocessing that uses dill for pickling (usage of lambdas) from queue import Queue import multiprocess as multiprocessing import psutil import numpy as np from scipy import stats import networkx as nx from overlay import OverlayNetwork from infrast...
# Copyright (c) 2019 Cisco and/or its affiliates. # 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 ag...
# -*- coding: iso-8859-1 -*- """ MoinMoin - DataBrowserWidget @copyright: 2002 <NAME> <<EMAIL>>, 2010 MoinMoin:ReimarBauer, 2010 MoinMoin:EugeneSyromyatnikov @license: GNU GPL, see COPYING for details. """ from MoinMoin.widget import base from MoinMoin import wikiutil def _...
#!/usr/bin/env python # 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 "Licen...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np from scipy.sparse import vstack, hstack from pandapower.pypower.idx_brch import F_BUS, T_BUS from pand...
from functools import partial import numpy as np import torch.nn as nn import torch from unet3d.models.pytorch.classification.decoder import MyronenkoDecoder, MirroredDecoder from unet3d.models.pytorch.classification.myronenko import MyronenkoEncoder, MyronenkoConvolutionBlock from unet3d.models.pytorch.classificatio...
""" Utilities for ingesting Stack data products into the MySQL tables. """ from __future__ import absolute_import, print_function, division import os import sys from collections import OrderedDict import sqlite3 import numpy as np import astropy.io.fits as fits import lsst.afw.math as afwMath import lsst.daf.persistenc...
""" resource for biobox tasks. """ import binascii import datetime import hashlib import json import os import re import time import requests import yaml from flask import abort, g from flask_restful import marshal, Resource, fields, reqparse from bioboxgui import app from bioboxgui.api import auth, roles_accepted #...
"""This module is used for computing social and map features for motion forecasting baselines. Example usage: $ python compute_features.py --data_dir ~/val/data --feature_dir ~/val/features --mode val """ import argparse import os import pickle as pkl import shutil import tempfile import time from typing...