text
stringlengths
8.04k
46.5k
import numpy as np import os from shutil import copyfile import fnmatch import os.path import scipy import scipy.ndimage import collections from PIL import Image from AnetLib.data.file_loader import FileLoader from AnetLib.data.folder_dataset import FolderDataset from AnetLib.data.image_utils import CenterCropNumpy L...
import copy import csv import itertools import json import logging import yaml from collections import defaultdict import pandas as pd import numpy as np from scipy.optimize import linear_sum_assignment from tqdm import tqdm from yacs.config import CfgNode as CN from tao.toolkit.tao import Tao, TaoEval, TaoResults fr...
""" Author: <NAME> Email: <EMAIL> Description: Part of the code package corresponding to my master thesis. This file implements a 3d optimal control problem example. Year: 2019/2020 """ #####################################################################################################################...
"""Perform actions based on new file(s) becoming available in swift Recieves notifications over kafka about new files that are available in swift and performs actions with them. Actions might import those files into elasticsearch indices. """ from collections import namedtuple import gzip import json import logging i...
#!/bin/env python # # settings.py: handle configuration settings for autoprocessing # Copyright (C) University of Manchester 2014-2021 <NAME> # ######################################################################### # # settings.py # ######################################################################### "...
# Import stuff import numpy as np import matplotlib.pyplot as plt from astropy import units as u from scipy.signal import convolve2d from astroduet.config import Telescope from astropy.convolution import convolve, convolve_fft, Gaussian2DKernel # def gaussian_psf(fwhm,patch_size,pixel_size): # ''' # Return 2D ...
# emailextractor.py # Copyright 2014 <NAME> # Licence: See LICENCE (BSD licence) """Extract text from selected emails and save for results extraction. These classes assume results for an event are held in files in a directory, with no sub-directories, where each file contains a single email. Each file may start with...
# coding: utf-8 import os, sys from os.path import join import cv2 as cv import time import numpy as np import imutils from PIL import Image from skimage import feature from random import randint sys.path.append('/vframe/core/app') from utils import imx # image utils from utils import fiox # file utils from config imp...
from pynput import keyboard from tkinter import * import math import serial from PIL import Image, ImageTk import os import numpy as np import time import threading from mapping import mapping from pygame.time import Clock # keyboard.KeyCode(13) A_DPAD_CENTER = 0x08 A_DPAD_U = 0x00 A_DPAD_U_R = 0x01 A_DPAD_R = 0x02 A...
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. Pytorch modules some classes are modified from HuggingFace (https://github.com/huggingface/transformers) """ import copy import json import logging from io import open import torch from torch import nn from apex.normalization.fused_layer_norm im...
from datetime import datetime from traceback import format_exc from re import search as re_search from json import loads as json_loads from asyncio import sleep as asyncio_sleep from discord import Embed, Colour, Member, Object from discord.errors import Forbidden from discord.ext.commands import command, Cog, Greedy ...
import numpy as np import matplotlib.pyplot as plt from math import factorial #rodrigues vector rotation formula def rodrigues(vector, axis, angle): axis = axis / np.linalg.norm(axis) return vector * np.cos(angle) + np.cross(axis, vector) * np.sin(angle) + axis * np.dot(axis, vector) * (1 - np.cos(ang...
from decimal import Decimal from functools import cmp_to_key from xml.etree import ElementTree from itertools import chain __RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" __RDFS_NS = "http://www.w3.org/2000/01/rdf-schema#" __CIMS_NS = "http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#" __UML_NS ...
# -*- coding: utf-8 -*- ''' Module containing some predefined form converters - objects designed to convert and validate form field's data. ''' import six import re from ..utils import weakproxy, replace_nontext from datetime import datetime from collections import OrderedDict from ..utils.dt import strftime from ..ut...
#!/usr/bin/env python3 import argparse from argparse import RawTextHelpFormatter from collections import defaultdict, namedtuple import configparser import itertools import multiprocessing from pathlib import Path from problem import Problems import sys from textwrap import TextWrapper from typing import Dict, Sequence...
# -*- coding: utf-8 -*- """ Created on Sun Mar 1 18:24:35 2020 @author: <NAME> """ from __future__ import print_function import pygame import numpy as np import os import tensorflow as tf from tensorflow import keras import pickle import time import matplotlib.pyplot as plt import glob import gc os.environ['TF_CPP...
# Copyright 2017-2020 Spotify AB # # 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 writi...
# coding=utf-8 # Copyright 2020 The Google Research Team 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 app...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import os from scipy import signal import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Ellipse sys.path.append("../") # go to parent dir sys.path.append("../../") # ...
import gzip import json import logging import os import pickle import re import shutil import subprocess import uuid from concurrent.futures import ThreadPoolExecutor from datetime import date from multiprocessing import cpu_count from random import sample, seed from time import sleep import cloudscraper import lmdb i...
"""Tasks graph in the GUI.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import numpy as np import pandas as pd from qtools import inthread, inprocess from qtools import QtGui, QtCore from k...
from dis import EXTENDED_ARG, opmap, opname import opcode from types import CodeType from typing import Tuple from typing import Generator NOP = opmap["NOP"] BINARY_ADD = opmap["BINARY_ADD"] BINARY_AND = opmap["BINARY_AND"] BINARY_FLOOR_DIVIDE = opmap["BINARY_FLOOR_DIVIDE"] BINARY_LSHIFT = opmap["BINARY_LSHIFT"] BINA...
# import numpy as np # import pyspark import random #import constraint_graph equiv_bias = 1e-6 bias = 0.1 def reverse(op): if op == ">": return "<=" elif op == ">=": return "<" elif op == "<": return ">=" elif op == "<=": return ">" elif op == "=": return ...
# coding: utf-8 # # Two-dimensional shallow water equations # v1.68, 14 March 2018, by <NAME> # $\newcommand{\V}[1]{\vec{\boldsymbol{#1}}}$ # $\newcommand{\I}[1]{\widehat{\boldsymbol{\mathrm{#1}}}}$ # $\newcommand{\pd}[2]{\frac{\partial#1}{\partial#2}}$ # $\newcommand{\pdt}[1]{\frac{\partial#1}{\partial t}}$ # $\newc...
# -*- coding: utf-8 -*- """ Created on Fri Jul 27 16:37:21 2018 @author: tageldim """ import sys from pandas import read_sql_query, DataFrame, read_csv from typing import Union from collections import OrderedDict import os from os.path import join as opj BASEPATH = opj(os.path.expanduser('~'), 'Desktop', 'NuCLS') sys...
# -*- coding: utf-8 -*- from __future__ import unicode_literals # core from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden from django.shortcuts import render, get_object_or_404 from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from pro...
#!/usr/bin/env python """ Creates pdb data files from lammps data files, given a template pdb file. """ from __future__ import print_function # noinspection PyCompatibility from collections import defaultdict import re import csv import sys import argparse from md_utils.md_common import InvalidDataError, warning, proc...
#!/usr/bin/env python3 from olctools.accessoryFunctions.accessoryFunctions import combinetargets, make_path, SetupLogging from genemethods.geneseekr.geneseekr import GeneSeekr from Bio.Blast.Applications import NcbiblastnCommandline, NcbitblastnCommandline from Bio.Blast import NCBIWWW from Bio.Blast import NCBIXML fro...
""" Methods to extract size distributions from various raw data Creates a python dictionary representing the target object catalogue """ import os import csv import argparse import sys from functools import reduce import operator import numpy as np import matplotlib.pyplot as plt import scipy.stats as stats import jso...
#!/usr/bin/env python import math import numpy as np from numpy import radians, cos, sin, arccos, array from matplotlib import cm from matplotlib.colors import Normalize import pandas as pd def lattice_from_params(a, b, c, alpha, beta, gamma): """ Compute lattice vectors from unit cell lengths and angles (in ...
import json import os from collections import namedtuple from torchvision.datasets.utils import extract_archive, verify_str_arg, iterable_to_str from .datasets import VisionDataset from torch.utils import data from PIL import Image from . import uniform import numpy as np CV_SPLITS = 3 CLASS_UNIFORM_PCT = 0.0 class ...
#!/usr/bin/env python # Copyright 2015 <NAME> <<EMAIL>> # # 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 la...
""" class to process superpoint net # may be some duplication with model_wrap.py # PointTracker is from Daniel's repo. """ import numpy as np import torch from torch.autograd import Variable import torch.backends.cudnn as cudnn import torch.optim import torch.nn as nn import torch.nn.functional as F import torch.utils...
import os, sys from multiprocessing import Process, Pipe, Array import multiprocessing from setproctitle import setproctitle, getproctitle import inspect import time import ctypes import numpy as np import copy import re import psutil from .plasma_handler import plasma_info from .tokens import Token, GroupToken, Mu...
#!/usr/bin/env python3 # # Copyright (c) 2022 <NAME> # # MIT License - See LICENSE file accompanying this package. # """Wrapper for standard Pulumi CLI that passes xpulumi envionment forward""" from typing import (Any, Dict, List, Optional, Union, Set, Type, TextIO, Sequence, Tuple) from copy import deepcopy from li...
# -- Import packages --------------------------------------------------------------------------------------------------- import numpy as np import datetime as dt import time import sys import os np.set_printoptions(linewidth=200, precision=2, suppress=True) # -- Import constant ---------------------------------------...
import datetime from collections import OrderedDict import numpy as np import pandas as pd import pytest from numpy.testing import assert_almost_equal, assert_allclose from pandas.util.testing import assert_frame_equal, assert_series_equal from pvlib.location import Location from pvlib import clearsky from pvlib im...
# -*- coding: utf-8 -*- # ============================================================================== # SBEMimage, ver. 2.0 # Acquisition control software for serial block-face electron microscopy # (c) 2018-2019 <NAME> Institute for Biomedical Research, Basel. # This software is licensed under the terms of...
import json from abc import ABC, abstractmethod from datetime import datetime from urllib.parse import urlparse import pytz from core_data_modules.data_models import validators from dateutil.parser import isoparse from configuration import coding_plans class PipelineConfiguration(object): RQA_CODING_PLANS = [] ...
import numpy as np import pdb import prinzdb import scipy import scipy.signal from delfi.summarystats.BaseSummaryStats import BaseSummaryStats from copy import deepcopy neutypes = prinzdb.neutypes ref_neuron = neutypes[0] silent_thresh = 1 # minimum number of spikes per second for a neuron not to be consid...
# The MIT License (MIT) # Copyright (c) 2019 <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...
# -*- coding: utf-8 -*- from __future__ import print_function import sublime import sublime_plugin import os import threading import subprocess import functools import re from copy import copy IS_ST3 = sublime.version().startswith('3') def get_settings(): return sublime.load_settings("Modific.sublime-settings"...
# ovm "spec" -- list of opcodes and translation utils # This module implements a limited subroutine system. # It rewrites opcodes like <x> <y> SSTORE # into PUSH _return_label <x> <y> PUSH _ovm_sstore JUMP _return_label JUMPDEST # (relying on the subroutine, _ovm_sstore, to jump back) # # Note the main difference betw...
""" openconfig_lacp This module describes configuration and operational state data for Link Aggregation Control Protocol (LACP) for managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models. """ from collections import OrderedDict from ydk.types import E...
# # @file # This file is used to parse and evaluate range expression in Pcd declaration. # # Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # # Import Modules # from __future__ import print_function from edk2basetools.Common.GlobalData import * fro...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import glob import os import platform import sys import py import pytest import llnl.util.filesystem as fs import spack....
#!/bin/python3 from sympy import Symbol, IndexedBase, Idx, S, Sum, Range from sympy.core.sympify import _sympify from sympy.codegen.ast import Element, For, AddAugmentedAssignment, Assignment, CodeBlock, Declaration, Variable, Token, Print from sympy.codegen.cnodes import PreIncrement from functools import reduce from...
import csv import json import math import time from collections import defaultdict from datetime import datetime from io import BytesIO, StringIO import pytz import six from flask import Flask from structlog import get_logger from werkzeug.http import http_date from .config import configure from .encoders import JSON...
import numpy as np import astropy.units as u import astropy.constants as c def KeplersConstant(m1,m2): '''Compute Kepler's constant for two gravitationally bound masses k = G*m1*m2/(m1+m2) = G + (m1+m2) Inputs: m1,m2 (arr,flt): masses of the two objects in solar masses. Must be astropy objects...
__author__ = 'maartenbreddels' import os import sys import collections import numpy as np import logging import concurrent.futures import threading import vaex import vaex.utils import vaex.execution import vaex.file.colfits import vaex.file.other from vaex.column import ColumnStringArrow, str_type, _to_string_sequenc...
import numpy as np from .agent_old import Agent import matplotlib.pyplot as plt import random ACTIONS = {'MOVE_LEFT': [0, -1], # Move left 'MOVE_RIGHT': [0, 1], # Move right 'MOVE_UP': [-1, 0], # Move up 'MOVE_DOWN': [1, 0], # Move down 'STAY': [0, 0] # don't move ...
"""Configuration file updater. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. The basic idea of ConfigUpdater is that a configuration file consists of three kinds of building blocks: sections, comment...
import json import lark from pathlib import Path import pprint import dataclasses import marshmallow from marshmallow import Schema from marshmallow_dataclass import dataclass from dataclasses import field from typing import List, Optional, Dict, Union @dataclass class ChildQuantity: exists: bool required: bo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Beat and tempo ============== .. autosummary:: :toctree: generated/ beat_track plp tempo """ import numpy as np import scipy import scipy.stats from ._cache import cache from . import core from . import onset from . import util from .feature import tempog...
"""""" import os import sys import uuid import bz2 import pickle import traceback import zlib import json from abc import ABC from copy import copy from typing import Any, Callable from logging import INFO, ERROR from datetime import datetime from vnpy.trader.constant import Interval, Direction, Offset, Status, OrderTy...
# -*- test-case-name: twisted.test.test_usage -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ twisted.python.usage is a module for parsing/handling the command line of your program. For information on how to use it, see U{http://twistedmatrix.com/projects/core/documentation/howto/opti...
import sys import os sys.path.insert(0,os.path.abspath('.')) sys.path.insert(0,os.path.abspath('..')) sys.path.insert(0,os.path.abspath('../easyreg')) import numpy as np from functools import reduce from easyreg.reg_data_utils import make_dir import random import SimpleITK as sitk from multiprocessing import Pool ...
# pylint: disable=invalid-name, unused-variable, too-many-locals, unused-argument """Conv2D operators""" from __future__ import absolute_import as _abs from collections import namedtuple import tvm from .pad import pad from .util import get_pad_tuple from ..util import simplify # workload description of conv2d Workloa...
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.> """make util to project RGB values onto the point cloud""" import json import logging from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union, overload import imageio import numpy as np from typing_extensions import Literal ...
__all__ = ["FontBuilder"] """ This module is *experimental*, meaning it still may evolve and change. The `FontBuilder` class is a convenient helper to construct working TTF or OTF fonts from scratch. Note that the various setup methods cannot be called in arbitrary order, due to various interdependencies between Op...
# # Copyright 2015 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...
import os import re import sys from typing import Tuple from pathlib import Path import logging from logging.handlers import RotatingFileHandler import json import yaml from dateutil.relativedelta import relativedelta from datetime import datetime from tzlocal import get_localzone from pytz import all_timezones import ...
import asyncio import contextlib import copy import os import random import textwrap import pytest import sys import uuid from _pytest.monkeypatch import MonkeyPatch from _pytest.python import Function from spacy import Language from rasa.engine.caching import LocalTrainingCache from rasa.engine.graph import Executi...
#!/usr/bin/python #!/usr/local/bin/python from __future__ import print_function import numpy as np import time import sys import re import os import math import collections import operator import random import MusicTheory # 0 1 2 3 4 5 6 7 8 9 10 11 Pi...
# !/usr/bin/env python # # Copyright 2019 YugaByte, Inc. and Contributors # # Licensed under the Polyform Free Trial License 1.0.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://github.com/YugaByte/yugabyte-db/blob/master/license...
from contextlib import contextmanager import base64 import hashlib import imp import json import os import pkg_resources import re import shlex import sqlite3 import tempfile import time import shutil import urllib import numbers # From https://www.sqlite.org/lang_keywords.html reserved_words = set(( 'abort actio...
#! /usr/bin/env python3 # # Copyright 2019-2020 Garmin Ltd. or its subsidiaries # # 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...
#only Python 3 (3.6) from tkinter import * try: import tkinter as tk from tkinter import ttk from tkinter.filedialog import askopenfilename import tkinter.messagebox as tkMessageBox import tkinter.simpledialog as tkSimpleDialog from tkinter.simpledialog import Dialog except: pass...
import os.path import ctypes import copy import itertools from collections import namedtuple import windows import windows.generated_def as gdef from windows import winproxy from windows.pycompat import basestring DEFAULT_DBG_OPTION = gdef.SYMOPT_DEFERRED_LOADS + gdef.SYMOPT_UNDNAME def set_dbghelp_path(path): ...
# 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...
import os from vowpalwabbit import pyvw from vowpalwabbit.pyvw import vw import pytest BIT_SIZE = 18 # Since these tests still run with Python 2, this is required. # Otherwise we could use math.isclose def isclose(a, b, rel_tol=1e-05, abs_tol=0.0): return abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol) ...
# Copyright (C) 2018 by eHealth Africa : http://www.eHealthAfrica.org # # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with # the License. Y...
# Carbon Calculator API # <NAME> (<EMAIL>) # Updated April 3 #imports from datetime import date,datetime from .models import Action,Question,Event,Station,Group,ActionPoints,CarbonCalculatorMedia,Org from django.utils import timezone from io import BytesIO from django.core.files.uploadedfile import InMemoryUploadedFil...
import tensorflow as tf import time from datetime import datetime import math from pynvml import * import tensorpack import os from tqdm import tqdm, trange import numpy as np from dnnweaver2.tf_utils.dataset import ImageNetProducer from dnnweaver2.tf_utils.helper import DataSpec import logging def time_tensorflow_r...
import collections from collections import defaultdict import sys import json import random from jsmin import jsmin from io import StringIO import numpy as np import copy import importlib from functools import partial sys.path.insert(0, '/n/groups/htem/Segmentation/shared-dev/cb2_segmentation/segway.graph.tmn7') from ...
#%% import pickle import matplotlib.pyplot as plt from matplotlib import rcParams rcParams.update({'figure.autolayout': True}) import numpy as np import pandas as pd from itertools import product import seaborn as sns import matplotlib.gridspec as gridspec #%% def unpickle(file): with open(file, 'rb') as fo: ...
#!/usr/bin/env python # coding: utf-8 """ Implementation of Soft Actor Critic (SAC) network using PyTorch. See https://arxiv.org/pdf/1801.01290.pdf for algorithm details. @author: <NAME>20 (<EMAIL>) and <NAME> (<EMAIL>) Project for CityLearn Competition. Based on code from Pranjal Tandon (https://github.com/pranz...
import requests import json import traceback import math import os import csv from tqdm import tqdm from ratelimit import limits import pandas as pd from query_list import query_list import numpy as np @limits(calls=3, period=1) def call_scopus_search_api(url, apikey): """ Search Scopus _Search_ AP...
# Copyright (c) 2021, EleutherAI contributors # This file is based on code by the authors denoted below and has been modified from its original version. # # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file excep...
from __future__ import annotations __copyright__ = """Copyright (C) 2020 <NAME>""" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitat...
''' Application data structures. Mostly dataclasses inheriting from utils.DataclassSerializer. ''' from dataclasses import asdict, dataclass, field import datetime import decimal import functools import json import hashlib import os import pathlib import shutil from typing import Any, cast, Dict, Generator, Iterator, L...
# Copyright (c) 2019 Western Digital Corporation or its affiliates. # https://github.com/open-mmlab/mmdetection/pull/1695/files#diff-ab0814f43cd90c8eaaebe477f5812b77R74 import torch import torch.nn as nn import torch.nn.functional as F import logging from ..builder import build_loss from ..registry import HEADS from...
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
from functools import cmp_to_key from xml.etree import ElementTree as ET from gomatic.gocd.authorization import Authorization from gomatic.gocd.artifacts import Artifact from gomatic.gocd.generic import EnvironmentVariableMixin, ResourceMixin from gomatic.gocd.materials import GitMaterial, Materials, PackageMaterial f...
#!/usr/bin/env python # -*- coding: utf8 -*- # python setup.py build_ext --inplace """ setup.py file """ import multiprocessing import os import pathlib import platform import re import shutil import subprocess import sys import sysconfig import time import unittest import warnings from abc import ABC import distut...
""" A set of useful plotting tools and widgets that can be used in a Jupyter notebook. """ IPY_AVAILABLE = False try: from ipywidgets import interact, interactive import ipywidgets as widgets IPY_AVAILABLE = True except ImportError: pass import collections import logging import numpy as np import vtk...
from __future__ import print_function """ pie - Python Interactive Executor Enables a user to execute predefined tasks that may accept parameters and options from the command line without any other required packages. Great for bootstrapping a development environment, and then interacting with it. """ __VERSION__ = '0.3...
# Copyright 2021 The Cirq Developers # # 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 ...
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved. # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: <NAME> (@agsolino) # # Description: # [MS-RPRN] Interface impleme...
import fnmatch import time import re from typing import Callable, Optional, Set from src.context import IRCContext, Features, lower, equals from src import settings as var from src import db from src.events import EventListener from src.debug import CheckedDict, CheckedSet from src.match import Match import botconfig...
import dataclasses import io import ipaddress import logging import os import re import shlex import tarfile import tempfile from abc import ABCMeta, abstractmethod from enum import Enum, unique from pathlib import Path from typing import Dict, List, Optional, Protocol, Tuple, Union from localstack import config from ...
#!/usr/bin/env python """ Does some simple calculations to test trace gas PACE calculations Adapted from benchmark4Amir.py <NAME>, April 2020 """ import os import sys from netCDF4 import Dataset from netCDF4 import Dataset as ncread import numpy as np from MAPL.constants import * from py_leo_vlid...
from dataclasses import dataclass from datetime import datetime, timedelta from random import choice as random_choice from typing import List, Optional from django.conf import settings from django.contrib.auth.models import Group from django.contrib.contenttypes.fields import GenericRelation from django.core.exception...
#!/usr/bin/env python3 # # Copyright 2018 <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/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import math import os import random import time import dgl import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from matplotlib import pyplot as plt from matplotlib.ticker import AutoMinorLocator, MultipleLocator from...
from __future__ import annotations from typing import TYPE_CHECKING, List, Optional, Tuple import random import numpy as np import tcod from actions import Action, BumpAction, MeleeAction, MovementAction, WaitAction # for bfs agent from queue import Queue from actions import PickupAction from entity import Item imp...
import random import numpy as np import pandas as pd import six import shapely import shapely.affinity import shapely.geometry from shapely.geometry.base import CAP_STYLE, JOIN_STYLE import shapely.wkb from shapely._buildcfg import geos_version import geopandas from geopandas.array import ( GeometryArray, fr...
# Copyright 2017 <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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
#!/usr/bin/python3 -i # # Copyright (c) 2018-2019 Valve Corporation # Copyright (c) 2018-2019 LunarG, 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/licens...
#!/usr/bin/env python """ This is a script for quick VTK-based visualizations of finite element computations results. Examples -------- The examples assume that run_tests.py has been run successfully and the resulting data files are present. - View data in output-tests/test_navier_stokes.vtk. $ python res...