text
stringlengths
3.07k
22.1k
import torch import torch.nn as nn import torch.nn.functional as F def passthrough(x, **kwargs): return x def ELUCons(elu, nchan): if elu: return nn.LeakyReLU(inplace=True) else: return nn.PReLU(nchan) # normalization between sub-volumes is necessary # for good performance class ContBatc...
import datetime import time from urllib import quote_plus, unquote_plus from models import ProductCategory, Company, Fuel, CompanySuppling from collections import OrderedDict from django.core.cache import cache def doUrlify(name): name = str(name.encode('utf8')) name = name.lower() name = quote_plus(nam...
#!/usr/bin/python3 # imports {{{ import logging import threading import time import datetime import sys import tty, termios import random import argparse import atexit # }}} ################## Global stuff ################## {{{ x0 = 0 y0 = 0 sec = 0 sec_inc = 1 lock=threading.Lock() # Set up unbuffered read fr...
import collections import re import string import numpy import six import cupy def calc_single_view(ioperand, subscript): """Calculates 'ii->i' by cupy.diagonal if needed. Args: ioperand (cupy.ndarray): Array to be calculated diagonal. subscript (str): Specifies the subscripts. ...
# Copyright 2017 <NAME> data table package to manage sparse columnar data """ module that implements a remote data table proxy over ssh connection to the dashboard running as a table server """ import sys import os import re from datetime import datetime import threading import time import csv import json from io impo...
import os import logging import numpy as np import pandas as pd from collections import OrderedDict from model_learning.algorithms.max_entropy import THETA_STR from model_learning.clustering.evaluation import evaluate_clustering from model_learning.util.io import create_clear_dir, change_log_handler from model_learning...
# uncompyle6 version 3.3.5 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] # Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\ableton\v2\control_surface\control\control_list.py # Compiled at: 201...
# -*- coding: utf-8 -*- """ shepherd.eeprom ~~~~~ Defines the format of BeagleBone cape info and shepherd calibration data that is stored on the shepherd cape's EEPROM. Provides a class for accessing EEPROM through Linux I2C device driver. :copyright: (c) 2019 by <NAME>. :license: MIT, see LICENSE for more details. ...
#!/usr/bin/python3 import argparse import json import os import re import time from collections import defaultdict from pysnmp.entity.engine import SnmpEngine from pysnmp.hlapi import ContextData, CommunityData, UdpTransportTarget, nextCmd, getCmd, ObjectType, ObjectIdentity from pysnmp.proto.errind import ErrorIndica...
import numpy as np import pandas as pd import os import matplotlib.pyplot as plt from sklearn.utils import shuffle import tensorflow as tf from tensorflow.keras.models import load_model from functions.sub_data_prep import create_trainingdata_baseline from functions.tf_model_base import create_baseline_model_ffn, creat...
# # 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, software # distributed under ...
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from .managers import CustomUserManager class Stop(models.Model): """ A class to represent a Dublin Bus stop Attr...
import pytest import numpy as np from pyckmeans.io import NucleotideAlignment from pyckmeans.distance.c_interop import \ p_distance,\ jc_distance,\ k2p_distance @pytest.fixture(scope='session') def prepare_alignments(): aln_0 = NucleotideAlignment( ['s0', 's1', 's2', 's3'], np.array([...
# -*- coding: utf8 -*- ''' Definiciones del endpoint de la web @author: <NAME> @version: 3.5 ''' from clusterServer.connector.threads.databaseUpdateThread import VMServerMonitoringThread, UpdateHandler from clusterServer.connector.threads.commandMonitoringThread import CommandMonitoringThread from clusterServer.networ...
""" Operator Interface This module exports a set of functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function names are those used for special methods; variants without leading and trailing '__' are also provided for conveni...
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
from os import path from os.path import isfile from prompt_toolkit import prompt from prompt_toolkit.completion import WordCompleter import pickle from prompt_toolkit.filters import cli from selenium import webdriver from selenium.webdriver.chrome.options import Options import os.path import time from googleapiclient...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Red Hat 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,...
#============================================================================== # Copyright 2011 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. # You may obtain a copy of the ...
import codes.my_helper as helper import cv2 import numpy as np import random # TODO: megcsinálni def create_skeleton(labels): skeletons = [] for img in labels: # shape: (256, 320) size = np.size(img) skel = np.zeros(img.shape, np.uint8) ret, img = cv2.threshold(img, 127, 255, ...
#-*- coding:utf-8 -*- from __future__ import with_statement from collections import defaultdict import re from functools import wraps from contextlib import contextmanager from subprocess import Popen, PIPE from threading import Thread from Queue import Queue import os import signal from pqs import Parser from flask...
# -*- coding: utf-8 -*- #The MIT License (MIT) # #Copyright (c) 2014 <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 us...
import unittest import glob import os.path as op def BOLD_FIR_files( analysis_info, experiment, fir_file_reward_list = '', glm_file_mapper_list = '', behavior_file_list = '', mapper_contrast ...
import pymel.core as pmc import pymel.core.datatypes as dt import pymel.core.nodetypes as nt import Maya_UtilLib as Utils import copy pi = 3.14159 class BakeData: def __init__(self, from_origin=False, from_center=False, from_pivot=False, from_po...
# Copyright 2020 <NAME> and collaborators. # This program is distributed under the MIT license. from __future__ import annotations import math import inspect import re import abc import random import itertools import collections.abc import statistics import concurrent.futures import enum import functools import numbe...
# use pretty printing for json responses # import the response functionality from response_func import chip_response, chip_w_context_response, event_response from retrieve_from_gdf import retrieve_event_index, retrieve_found_events from sb_db_request import get_accessibility_ids from video_builder import make_video_arr...
""" POVM effect representation classes for the `statevec_slow` evolution type. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 wi...
from dataclasses import dataclass import logging import re import sys import time import types import pygame from pygame import display from pygame import event from pygame import transform import requests @dataclass(frozen=True) class Symbol: name: str def __repr__(self): return "S-" + self.name ...
"""Methods for generate test data""" from collections import ChainMap from http import HTTPStatus from typing import NamedTuple, List import attr import pytest from _pytest.mark.structures import ParameterSet from tests.utils.api_objects import Request, ExpectedResponse from tests.utils.endpoints import Endpoints fr...
# -*- coding: utf-8 -*- # # Developed by <NAME> <<EMAIL>> # # References: # - https://github.com/ultralytics/yolov5/blob/master/utils/datasets.py import os import cv2 import torch import numpy as np from torch.utils.data import Dataset, DataLoader from util.common import exr2normal, exr2depth, img2bgr, pkl2mesh, re...
# # Copyright 2016 Quantopian, 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 wr...
__author__ = """<NAME>""" __email__ = "<EMAIL>" __version__ = '0.1.0' import uharfbuzz as hb from fontTools.ttLib import TTFont import re class FakeBuffer(): def __init__(self): pass class FakeItem(): def __init__(self): pass class Vharfbuzz: """A user-friendlier way to use Harfbuzz in ...
"""Tests for skio/codec.py""" from skio import intdecode, intencode import pytest import numpy as np from numpy.testing import assert_equal, assert_almost_equal IDAT = np.array(((0, 1, 2), (3, 4, 5))) # Integer data FDAT = np.array(((0.0, 0.5, 1.0), (1.5, 2.0, 2.5))) # Float data FDAT_NEG = np.array(((-2.0, -1.0, 0...
#!/usr/bin/python3 #----------------------------------------------------------------------------- # HTML conversion tool for PDF Create 2021.07 # for Windows # このツールは、Windows10 で、PDFファイルから英文を取り出し、htmlファイルとして # 保存します。ツール処理完了後にhtmlファイルをブラウザで表示し、ブラウザの翻訳機能 #  を使うことで翻訳することができます。 # # オプション指定 ...
""" This simple sensor-network environment consists of a few parts: - The node-graph to explore. - Each node has a 'name' vector for directing the traversal, and the node's resource amount (never less than 0). - Each node has directed edges to a few neighbors. - Nodes mostly form a tree, sometimes with...
# -*- coding: utf-8 -*- from torch.nn import functional as F import torch.nn as nn from PIL import Image import numpy as np from skimage.io import imsave import cv2 import torch.nn as nn import torch from torch.autograd import Variable from torchvision import models from collections import namedtuple import pdb import...
# -*- coding: utf-8 -*- """ The :func:`ground_truth_normalizer()`, :func:`ground_truth_normalize_row` and :class:`TestLocalResponseNormalization2DLayer` implementations contain code from `pylearn2 <http://github.com/lisa-lab/pylearn2>`_, which is covered by the following license: Copyright (c) 2011--2014, Universit...
import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import cv2 import time import zmq from numpy.core.multiarray import ndarray from pygame import mixer from System.Data.CONSTANTS import * from System.Controller.JsonEncoder import JsonEncoder class WorkerThread(QObject): ...
#!/usr/bin/env python # from nltk.classify.megam import config_megam, call_megam #from nltk.classify.weka import WekaClassifier, config_weka from datetime import time from nltk import ELEProbDist from nltk.classify.naivebayes import NaiveBayesClassifier from nltk.classify.positivenaivebayes import PositiveNaiveBayesCl...
#!/usr/bin/python import re import sys from types import NoneType single_ops = ['push', 'sar', 'sal', 'shl', 'shr'] arithmetic_ops = ['add', 'sub', 'mul', 'div', 'neg', 'adc', 'sbb', 'inc', 'dec'] control_ops = ['jmp', 'je', 'jn', 'jg', 'ja', 'jl', 'jb', 'jo', 'jz', 'js', 'call', 'loop',...
import numpy import scipy import scipy.special from typing import NoReturn from cryspy.B_parent_classes.cl_1_item import ItemN from cryspy.B_parent_classes.cl_2_loop import LoopN # FIXME: estimate d by time for epithermal neutrons class TOFParameters(ItemN): """Parameters of the reflexion positions in time-of-f...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import numpy as np import blosum as bl from random import randint def load_pssm(namefile, aa) : """ Lecture d'un fichier .aamtx et renvoie matrice PSSM """ with open (namefile, 'r') as f : for line in f : if line[0] == '>'...
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.spectral_norm as SpectralNorm def get_norm(norm_type, size): if(norm_type == 'batchnorm'): return nn.BatchNorm2d(size) elif(norm_type == 'instancenorm'): return nn.InstanceNorm2d(size) class N...
""" The utils module contains functions to parse nuclide strings and manipulate lists and dictionaries. The docstring code examples assume that ``radioactivedecay`` has been imported as `rd`: .. highlight:: python .. code-block:: python >>> import radioactivedecay as rd """ from typing import Dict, List, Union...
#!/usr/bin/python # coding=utf-8 import os import sys import threading import logging import base64 import xml.dom.minidom from six.moves import queue from six.moves import http_client from six import u, b, PY3 if PY3: from urllib.parse import unquote, quote else: from urllib import unquote, quote logger = ...
# -*- coding: utf-8 -*- from glob import glob import csv import os import random import matplotlib import matplotlib.pyplot as plt import numpy as np from numpy import genfromtxt matplotlib.use('Agg') def make_batches(size, batch_size): """Returns a list of batch indices (tuples of indices). Copied from ht...
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) <NAME> <<EMAIL>> # Copyright (C) <NAME> <<EMAIL>> # Copyright (C) <NAME> <<EMAIL>> # This program is published under a GPLv2 license # scapy.contrib.description = OnBoardDiagnosticScanner # scapy.contrib.status...
import os import random from statistics import mean import string import uuid import sys import tracery import spacy import pyocr import pyocr.builders from PIL import Image, ImageDraw, ImageFilter BOUND_PADDING = 50 BOX_PADDING = 50 # 10 WOBBLE_MAX = 2 nlp = spacy.load('en') def draw_vertical_lines(draw, boxes, d...
# <NAME> - GIS and Data Services - Brown University - April 1, 2022 import os import requests import sys import pandas as pd import urllib.parse parent_folder = os.path.dirname(os.getcwd()) file_path = parent_folder + '\\stolen-relations-data-export.csv' sr = pd.read_csv(file_path) # ----- geonames stuff...
# Copyright 2020 The TensorFlow 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 applica...
#!/usr/bin/env python3 import json import sys import os import yaml import argparse from argparse import ArgumentParser, RawDescriptionHelpFormatter import datetime import traceback from enum import Enum import signal import functools from i3ipc.aio import Connection from dbus_next.service import ServiceInterface, me...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. PYTHON_VERSION_COMPATIBILITY = 'PY2+3' DEPS = [ 'infra_checkout', 'depot_tools/bot_update', 'depot_tools/gclient', 'depot_tools/git', 'r...
from openvino.inference_engine import IENetwork, IEPlugin from argparse import ArgumentParser from PIL import Image, ImageDraw import logging as log import numpy as np import time import cv2 import sys import os def build_argparser(): parser = ArgumentParser() parser.add_argument("-m", "--model", help="Path to an .x...
import tushare as ts from sqlalchemy import create_engine import pymysql import constant import time import numpy as np import pandas as pd import datetime def get_ts(): ts.set_token(constant.g_token) return ts def get_conn(): conn = create_engine( "mysql://{0}:{1}@{2}:{3}/{4}?charset=utf8".form...
import numpy import pandas import scipy import sklearn.metrics as metrics from sklearn.model_selection import train_test_split import statsmodels.api as stats # The SWEEP Operator def SWEEPOperator (pDim, inputM, tol): # pDim: dimension of matrix inputM, positive integer # inputM: a square and sy...
#!/usr/bin/env python3 # This file is Copyright (c) 2020 <NAME> <<EMAIL>> # License: BSD import csv import logging import argparse from operator import and_ from functools import reduce from itertools import zip_longest from migen import * from migen.genlib.misc import WaitTimer from litex.build.sim.config import S...
import cv2 from PIL import Image from matplotlib import pyplot as plt #******************************************# from sklearn.metrics import precision_score,recall_score,f1_score from sklearn.metrics import accuracy_score,jaccard_score #******************************************************************# import os imp...
''' Function: 复现论文"Combining Sketch and Tone for Pencil Drawing Production" Author: Charles 微信公众号: Charles的皮卡丘 ''' import os import cv2 import math import numpy as np from PIL import Image from scipy import signal from ..base import BaseBeautifier from scipy.ndimage import interpolation from scipy.sparse.li...
import asyncio from copy import deepcopy from dataclasses import dataclass from importlib.resources import path from subprocess import Popen from typing import List, Optional import google.protobuf from multiaddr import Multiaddr import hivemind.hivemind_cli as cli import hivemind.p2p.p2p_daemon_bindings.p2pclient as...
import pytest import numpy as np from lumicks.pylake.detail.image import reconstruct_image, reconstruct_num_frames, save_tiff, ImageMetadata, line_timestamps_image def test_metadata_from_json(): json = { 'cereal_class_version': 1, 'fluorescence': True, 'force': False, 'scan ...
#!/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. import argparse import time import torch import time import habitat from config.default import get_config as cfg_baseli...
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
# Importing the libraries import os import datetime import csv import json import random import math import logging import boto3 import uuid import faker import dicttoxml from botocore.exceptions import ClientError # Importing custom modules from defaults import * # Setting print level and other varidables verbose =...
import argparse from typing import Any, Dict, List, Optional, Tuple DEBUG=False def _debug_log(*args): if DEBUG: print(*args) class NestedArgumentParser(argparse.ArgumentParser): def __init__(self, prog=None, nest_dir=None, nest_separator='__', nest...
# Implementation of Inception-v4 architecture # Author: <NAME> # e-mail: <EMAIL> # Importing the libraries from keras.layers import Input from keras.layers.merge import concatenate from keras.layers import Dense, Dropout, Flatten, Activation, Conv2D from keras.layers.convolutional import MaxPooling2D, AveragePooling2D...
# Copyright 2019 The TensorFlow 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 applica...
''' ======================================================================= 2016 Changes by ARM (abhilashreddy.com) - made to work with Python 3+ - made to work with recent versions of matplotlib ======================================================================= Author: <NAME> (<EMAIL> where cu=columbia.edu...
from datetime import datetime from time import time from typing import TYPE_CHECKING import pytest from grouper.entities.group import GroupJoinPolicy from grouper.graph import NoSuchGroup, NoSuchUser from grouper.plugin.base import BasePlugin if TYPE_CHECKING: from tests.setup import SetupTest def build_test_g...
from __future__ import absolute_import import datetime import flask from flask_seasurf import SeaSurf import json import os from six import iteritems from .auth import Auth from . import api_requests AUTH_COOKIE_NAME = 'plotly_auth' class PlotlyAuth(Auth): def __init__(self, app, app_name, sharing, app_url): ...
# Mrs # Copyright 2008-2012 Brigham Young University # # 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 o...
# -*- coding: utf-8 -*- import pandas as pd import json from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components as html from plotly import graph_objs as go import ast from pyspark.sql import functions as F from datetime import datetime as dt from app import rev...
""" main file to create an index from the the begining """ import logging import os from pprint import pprint as pp from typing import Dict, Optional, Union import multiprocessing import faiss import fire from autofaiss.external.build import ( build_index, estimate_memory_required_for_index_creation, get...
from django import forms from django.utils.safestring import mark_safe from django.forms.util import flatatt from django.conf import settings from django.contrib.gis.geos import fromstr class SliderWidget(forms.TextInput): """ http://pastebin.com/f34f0c71d """ def __init__(self, min=0, max=100, step=N...
import logging from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Any, Optional import re from netaddr import AddrFormatError, IPAddress, IPNetwork logger = logging.getLogger(__name__) def create_cidr_notation(subnet, mask): try: cidr = IPNetwork(f"{subnet}/{mask}").pr...
# # 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...
''' Naive implementation of non-typed datalog. There's no optimizations and will be surely very slow ''' from itertools import product from operator import and_ from typing import AbstractSet, Any, Callable, Tuple from warnings import warn from .datalog import NULL, UNDEFINED from .datalog import DatalogProgram as Dat...
# -*- coding: utf-8 -*- """ The module contains functions to evaluate the optical depth, to convert this to observed transmission and to convolve the observed spectrum with the instrumental profile. """ __author__ = '<NAME>' import numpy as np from scipy.signal import fftconvolve, gaussian from numba import jit # =...
"""Test cases for working with iov42 identities.""" import json import typing import uuid import pytest from iov42.core import CryptoProtocol from iov42.core import hashed_claim from iov42.core import PrivateIdentity from iov42.core import PrivateKey from iov42.core import PublicIdentity from iov42.core import Public...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
import os import jieba import numpy as np import pandas as pd import torch from elmoformanylangs import Embedder from gensim.models import Word2Vec from sentence_transformers import SentenceTransformer from transformers import AutoModel, AutoTokenizer from bert_text_classification.predict import bert_classification_pr...
""" Search KeePassXC password databases and copy passwords to the clipboard. """ import logging import os import sys from threading import Timer from typing import Optional import gi from ulauncher.api.client.Extension import Extension from ulauncher.api.client.EventListener import EventListener from ulauncher.api.shar...
import taichi as ti from utils.tools import Pair from pcg_method import PCG_Solver import numpy as np @ti.data_oriented class Thin_Flame: def __init__(self , resolution = 512 ) : shape = (resolution , resolution) self._sd_cur = ti.var(dt = ti.f32 , shape= shape) self._sd_nxt = ti.var(dt = ...
# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this open-source project. import os import sys import json import random import argparse import essentia import essentia.streaming from essentia.standard import * import librosa import numpy as np from extractor ...
""" Core implementation of :mod:`facet.simulation.partition` """ import logging import math import operator as op from abc import ABCMeta, abstractmethod from typing import Any, Generic, Iterable, Optional, Sequence, Tuple, TypeVar import numpy as np import pandas as pd from pytools.api import AllTracker, inheritdoc...
# coding=utf-8 from collections import defaultdict, OrderedDict from material_parser.core.utils import simplify import regex as re import sympy as smp import material_parser.core.regex_parser as rp import material_parser.core.chemical_sets as cs import material_parser.core.constants as cnst from pprint import pprint ...
#!/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', ...
from matplotlib.testing import setup import numpy as np import numpy.testing as npt import matplotlib.pyplot as plt import matplotlib as mpl import packaging.version import pytest import animatplot as amp from tests.tools import animation_compare from animatplot.blocks import Block, Title setup() class TestTitleB...
from .base import AbstractDataloader from .negative_samplers import negative_sampler_factory import torch import torch.utils.data as data_utils class BertDataloader(AbstractDataloader): def __init__(self, args, dataset): """ This is the data loader class for the unpersonalised bidirectional model...
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np import pytest from affine import Affine from odc.geo import CRS, geom from odc.geo.geobox import ( GeoBox, bounding...
''' Author: <NAME> Date: November 3, 2018 @: University of Tulsa Question #12: What is the value of the first triangle number to have over five hundred divisors? Example: The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3...
# -*- coding: utf-8 -*- """ se2cnn/layers.py Implementation of tensorflow layers for operations in SE2N. Details in MICCAI 2018 paper: "Roto-Translation Covariant Convolutional Networks for Medical Image Analysis". Released in June 2018 @author: <NAME>, Eindhoven University of Technology, The Netherlands @author: <NA...
#!python3 """ An implementation of a PROPm allocation algorithm. Reference: <NAME>, <NAME>, <NAME>, and <NAME> (2021). ["PROPm Allocations of Indivisible Goods to Multiple Agents"](https://arxiv.org/abs/2105.11348). Programmer: <NAME> Since: 2021-05 """ import networkx as nx import numpy as np from fairpy ...
########### Python 3.6 ############# import http.client, urllib.request, urllib.parse, urllib.error, base64, requests, json, cv2 import numpy as np import cv2 import os import keyboard from time import sleep import pygame import sys import random import keyboard ############################################### #### Up...
""" The GA4GH data model. Defines all the methods required to translate data in existing formats into GA4GH protocol types. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import base64 import collections import glob import os import ga4gh.exceptions a...
import math import numpy as np from rclpy.qos import QoSDurabilityPolicy from rclpy.qos import QoSHistoryPolicy from rclpy.qos import QoSProfile from rclpy.qos import QoSReliabilityPolicy import rclpy from rclpy.node import Node from geometry_msgs.msg import Twist, Vector3 from turtlesim.msg import Pose from rclpy.para...
#!/usr/bin/env python3 # # Copyright (c) Viveris Technologies. # Licensed under the MIT license. See LICENSE file in the project root for details. # # kivy modules import kivy kivy.require('1.11.0') from kivy.app import App from kivy.lang import Builder from kivy.uix.label import Label from kivy.uix.button import But...
from functools import partial import logging import math from typing import List, Optional, Dict, Tuple, Any import pandas as pd import stopit from gama.genetic_programming.operator_set import OperatorSet from gama.logging.evaluation_logger import EvaluationLogger from gama.search_methods.base_search import BaseSearc...
# hfav/codegen.py; code generation base class # Copyright 2017 Intel Corporation # # GENERATED CODE EXEMPTION # # The output of this tool does not automatically import the Apache # 2.0 license, except the output will continue to be subject to the # limitation of liability clause in the Apache 2.0 license. Users may # ...