text
stringlengths
6.04k
39.5k
import io import subprocess import yaml from enum import Enum from typing import Dict str_io = io.StringIO() class Target(Enum): ModelBuilder = 1 OnnxConverter = 2 DaqReader = 3 def clang_format(filename: str): subprocess.run(['clang-format', '-i', filename]) def compile_fbs(): subprocess.run...
from panda3d.core import * from direct.interval.IntervalGlobal import * from lib.odvm.renderer import Renderer from lib.odvm.optimizedvm import OptimizedVM from random import randrange import cProfile import pstats viewport_vert_glsl = """ #version 130 uniform mat4 p3d_ModelViewProjectionMatrix; uniform...
# -*- 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...
from couchdbkit.exceptions import ResourceNotFound from datetime import datetime from casexml.apps.case.dbaccessors import ( get_extension_case_ids, get_indexed_case_ids, get_all_reverse_indices_info, get_open_case_ids_in_domain, get_reverse_indexed_cases, get_related_indices, ) from casexml.ap...
# Copyright 2016 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/local/bin/python3.3 try: import sys import re from tkinter import * #from os import path except ImportError: print("Faild to import modules.") sys.exit(1) if (sys.hexversion < 0x03030000) or (sys.hexversion > 0x03050000): print("noodle-pipe requires Python 3.3.5 or equivilant") sys.exit(1) class App: ...
# -*- coding: utf-8 -*- import warnings from django.db.models import fields, ImageField from django.db.models.fields import related from django.utils.six import with_metaclass import autofixture from autofixture import constraints, generators, signals from autofixture.values import Values from autofixture.compat impor...
from __future__ import print_function import os import sys import pyspark from pyspark import SparkContext from paraview import simple import vtk import numpy as np import scipy.sparse as ss from vtk.numpy_interface import dataset_adapter as dsa from vtk.util import numpy_support from vtk.vtkCommonCore import vtkIntA...
from __future__ import print_function from __future__ import division import random import torch import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data from torch.autograd import Variable import torch.nn.functional as F import numpy as np from torch.nn import CTCLoss import os, shutil...
import struct, traceback from io import SEEK_END from playground.common.datastructures import Bijection from playground.common.io import HighPerformanceStreamIO from playground.common import Version as PacketDefinitionVersion from playground.common import ReturnOrientedGenerator from playground.network.packet...
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator from django.contrib.auth.models import User from django_filters import rest_framework as filters from django.db.models.signals import post_save from django.dispatch import receiver import uuid import enum from datetime ...
# encoding:utf-8 # !/usr/bin/python3 import json import logging import math from multiprocessing import Pool import cv2 import numpy as np import os import random from skimage import exposure from skimage import util logger = logging.getLogger(__name__) MIN_ROTATE_ANGLE = 1 # 旋转的最小角度 MAX_ROTATE_ANGLE = 20 # 旋转的最大...
r"""Convert raw PASCAL like dataset to TFRecord for object_detection. Enable view_mode if you wish to check your annotations If view mode is enabled, then the record file will not be written If plate_split_label != 'none', then the TFRecord will contain separate annotations for the top level boxes, and the 'bottom leve...
import uuid from datetime import date, datetime from typing import Any, Dict, List, Optional, Union import numpy as np import pandas as pd import pyarrow from pydantic import StrictStr from pydantic.typing import Literal from trino.auth import Authentication from feast.data_source import DataSource from feast.errors ...
from __future__ import absolute_import, division, print_function import warnings from collections import OrderedDict from functools import partial import torch from torch.nn.functional import softplus from torch.distributions import constraints from torch.distributions.transforms import AffineTransform, SigmoidTransfo...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from dataclasses import replace import datetime import secrets from neuro_sdk import ResourceNotFound from typing import ( AbstractSet, AsyncIterator, Dict, Iterable, List, Mapping, Optional, Sequence, Type, Union, ) from yarl import URL from neuro_flow.storage.base import ( ...
from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rlib import jit from pypy.interpreter.baseobjspace import W_Root from pypy.interpreter.error import OperationError, oefmt from pypy.interpreter.function import ClassMethod, Method, StaticMethod from pypy.interpreter.gateway import interp2app from pypy.i...
""" Data augmentation (transformations) operations used to generate synthetic training data for the `FactCC` and `FactCCX` models. """ import random import spacy LABEL_MAP = {True: "CORRECT", False: "INCORRECT"} def align_ws(old_token, new_token): # Align trailing whitespaces between tokens if old_token[-1...
# # main.py -- reference viewer for the Ginga toolkit. # # <NAME> (<EMAIL>, <EMAIL>) # # See LICENSE.txt for license information. """This module handles the main reference viewer.""" from __future__ import print_function # stdlib imports import sys import os import logging, logging.handlers import threading import tra...
"""tests/test_types.py. Tests the type validators included with hug Copyright (C) 2016 <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 th...
import datetime import math import requests import json from func import mojang from func.hiddenVars import HYPIXEL_API_KEY ######################################################## #################### Game Modes ######################## ######################################################## def arcade...
""" @author: <NAME> @copyright: Copyright 2019, dialogue-generation @license: MIT @email: <EMAIL> @date: 2019.07.12. """ # pylint: disable=import-error # pylint: disable=no-name-in-module # pylint: disable=no-member # pylint: disable=not-callable # pylint: disable=used-before-assignment import sys i...
import csv import json import multiprocessing as mp import os import time from dataclasses import dataclass from typing import Iterable, Tuple import boto3 import click from mypy_boto3_cloudformation import CloudFormationClient from mypy_boto3_cloudformation.type_defs import ( DescribeStacksOutputTypeDef, Para...
""" Functions related to junction trees. """ import networkx as nx import numpy as np import trilearn.graph.junction_tree_expander as jte class JunctionTree(nx.Graph): def __init__(self, data=None, **attr): nx.Graph.__init__(self, data, **attr) self.log_nus = {} self.separators = None ...
import heapq import itertools import typing from collections.abc import Sequence from functools import wraps __all__ = ("SliceRangeT", "SliceRangeTypeT", "SliceRangeSeqT", "SliceRangeListT", "sAny2Type", "range2slice", "slice2range", "slen", "sdir", "svec", "srev", "sdirect", "snormalize", "ssplit_1_", "ssplit_1", "ss...
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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...
""" Modified from UNITER code """ import os import sys import json import argparse from easydict import EasyDict as edict def parse_with_config(parsed_args): """This function will set args based on the input config file. (1) it only overwrites unset parameters, i.e., these parameters not set from use...
"""Classes relating to BlockingStrategies, which define ways to carve up Images into Blocks. """ import bisect import itertools from numpy import expand_dims, zeros from numpy import dtype as dtypeFunc from thunder.rdds.imgblocks.blocks import BlockGroupingKey, Blocks, PaddedBlockGroupingKey, PaddedBlocks, \ Simpl...
""" Author:@Tera0017 """ import re import yara import struct import pefile from ta505_gen_funcs import * rules_x86 = { # Finds encoded code PART 1 + its length then can find exec code and xor key (strict rule) '$code1': '{68 F4 0B 00 00 68 [4] 8B ?? [4] 5? E8}', # // Finds encoded code PART 1 + its length ...
#!/usr/bin/env python # Make sure to have the server side running in V-REP: # in a child script of a V-REP scene, add following command # to be executed just once, at simulation start: # # simRemoteApi.start(19999) # # then start simulation, and run this program. # # IMPORTANT: for each successful call to simxStart, ...
import numpy as np import fluidsynth import mido import time NUM_HUMAN = 4 def trace(frame, event, arg): print ("%s, %s:%d" % (event, frame.f_code.co_filename, frame.f_lineno)) return trace def initMidiSegPlay(fname): mseg = MidiSegmentation_multitrack(fname) msp = MidiSegPlay(mseg) return msp d...
""" SlipStream Client ===== Copyright (C) 2013 SixSq Sarl (sixsq.com) ===== Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
from datetime import datetime import flask_restful as restful from sqlalchemy.exc import IntegrityError from app.applicationModel.models import Question from app.responses.models import Answer, Response from app.registration.models import RegistrationSection from app.registration.models import RegistrationQuestion from...
# Copyright (C) 2020 <NAME>, NCC Group Plc; Provided under the MIT license # This code follows the (IETF) IRTF CFRG Verifiable Random Functions (VRFs) spec *very* closely. # Please refer to https://tools.ietf.org/pdf/draft-irtf-cfrg-vrf-06.pdf import hashlib import sys if sys.version_info[0] != 3 or sys.version_inf...
# -*- coding: utf-8 -*- # # Copyright (c) 2017 - 2019 Karlsruhe Institute of Technology - Steinbuch Centre for Computing # This code is distributed under the MIT License # Please, see the LICENSE file # """ Created on Mon Sep 3 21:29:57 2018 @author: valentin.kozlov """ import os import time import json import argpa...
""" Copyright (C) 2019 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). """ import cv2 import numpy as np from plane_decoder.utils import * from plane_decoder.modules import * def evaluateDepths(predDepths, gtDepths, p...
import configparser import json import re import textwrap from pathlib import Path, PurePath, PurePosixPath, PureWindowsPath from typing import Any, Dict import pandas as pd import pytest import toml import yaml from pandas.util.testing import assert_frame_equal from kedro import __version__ as kedro_version from ked...
# -*- coding: utf-8 -*- # (c) 2015 MIT License <NAME> # * This code generates plots for the radar lab viewer at https://github.com/ethan-nelson/radarlabviewer/. # * Two functions are defined to help with consistent plotting, then data are loaded and sent to plotting. # * Note that the images directory structure should ...
######################################################################## # # Functions for loading financial data. # # Data from several different files are combined into a single # Pandas DataFrame for each stock or stock-index. # # The price-data is read from CSV-files from Yahoo Finance. # Other financial data (Sale...
# -*- coding: utf-8 -*- # Copyright (C) 2014 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
# 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. """ Set backend platform for OpenGL render (pyrender.OffscreenRenderer) - Pyglet, the same engine that runs the pyrender viewer. This requires...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 15 20:21:20 2020 @author: kutkin """ import glob import os import sys import numpy as np import subprocess # import matplotlib # matplotlib.use('Agg') # import matplotlib.pyplot as plt # import matplotlib.colors as mc from astropy import units as u ...
import re class Fasta_parser: """ This class was writed to parse fasta file. """ def __init__(self, file_name): self.data = {} self.heads = [] with open(file_name) as f_in: for line in f_in: line = line.strip() if line[0] == '>': ...
# Copyright (c) 2009-2011 <NAME>. See LICENSE for details. """ Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. All running greenlets in a group can be waited on with :meth:`Group.join`, or al...
import math import torch from torch import nn, einsum import torch.nn.functional as F from torch.utils.checkpoint import checkpoint_sequential from einops import rearrange, reduce from einops.layers.torch import Rearrange from enformer_pytorch.data import str_to_one_hot, seq_indices_to_one_hot from enformer_pytorch....
# -*- coding: utf-8 -*- ''' This is the python code as a re-implementation of the matlab code from: http://www.openu.ac.il/home/hassner/projects/frontalize/ <NAME>, <NAME>*, <NAME>* and <NAME>, Effective Face Frontalization in Unconstrained Images, IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Bos...
import matplotlib.pyplot as plt import matplotlib.image as im import numpy as np import cv2 import glob import pickle from numpy.linalg import inv from moviepy.editor import VideoFileClip import grad_color_combo as thresh #Binary Thresholding file #To update the parameters of each frame class Line(): def __init...
""" CODE ADAPTED FROM: https://github.com/sjblim/rmsn_nips_2018 Implementation of Recurrent Marginal Structural Networks (R-MSNs): <NAME>, <NAME>, <NAME>, "Forecasting Treatment Responses Over Time Using Recurrent Marginal Structural Networks", Advances in Neural Information Processing Systems, 2018. """ import rmsn....
""" Platform-specific code for Darwin is encapsulated in this module. """ import os import re import tempfile import threading import subprocess try: import Tkinter as tk import Queue as queue except ImportError: import tkinter as tk import queue import numpy import AppKit import Quartz from PIL impor...
# Leo colorizer control file for netrexx mode. # This file is in the public domain. # Properties for netrexx mode. properties = { "commentEnd": "*/", "commentStart": "/*", "indentNextLines": "\\s*(if|loop|do|else|select|otherwise|catch|finally|class|method|properties)(.*)", "lineComment": "--",...
import numpy as np from random import randint, uniform, shuffle boundmax = 10000 num = '0123456789' alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' oper = '+-*/' rel = '=><' class SYM: def __init__(self, name, sys): self.name = name self.bounds = [-boundmax, boundmax] self....
#!/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. from itertools import product from math import pi from unittest import mock import torch from botorch.models.converter...
#!/usr/bin/env python """ servo_controller.py: classes for servo interaction Copyright (c) 2011-2013 Vanadium Labs LLC. All right reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of ...
"""Typing test implementation""" from utils import lower, split, remove_punctuation, lines_from_file from ucb import main, interact, trace from datetime import datetime ########### # Phase 1 # ########### def choose(paragraphs, select, k): """Return the Kth paragraph from PARAGRAPHS for which SELECT called on ...
from __future__ import print_function import matplotlib.pyplot as plt from six.moves import xrange import datetime import numpy as np import tensorflow as tf import time import EvalMetrics import denseCRF import TensorflowUtils as Utils from matplotlib.colors import ListedColormap, BoundaryNorm # Hide the warning me...
import cv2 import numpy from matplotlib import pyplot """ Main routine to process the image and extract the sudoku matrix from it """ def extract_matrix_from_image(image, training_metrics): x_coords, y_coords = get_cell_boundaries(image) # Now extract the images of the cells (between the lines), based on ...
from __future__ import print_function import sys import random import numpy as np from collections import defaultdict from copy import deepcopy from math import exp, log, sqrt, ceil from util.blocks import block_names from vis import png class Placer(object): def __init__(self, blif, pregenerated_cells): ...
""" This program exists to replacement the autoTranslate bash script. Instead of creating and using each file for next operation like in the autoTranslate bash script, it creates Python object and passes it to the next function. Thus, it works as calling a multiple functions in a single program. This new f2grfn.py does...
#! /usr/bin/env python3 ## ## Copyright (C) by Argonne National Laboratory ## See COPYRIGHT in top-level directory ## import sys import argparse sys.path.append('maint/') import yutils sys.path.append('src/backend/') import gencomm ###############################################################################...
import logging from datetime import datetime from uuid import uuid4 from lxml import etree from lxml.builder import E from .common import ( date_format_102, date_format_203, date_format_204, get_attribute_value, get_data_value, get_patient_sex, get_reaction_outcome, get_yes_no, ) from ...
# coding: UTF-8 from FreeCAD import Console from FreeCAD import Vector import math import Part import Sketcher def _enum(*args): enums = dict(zip(args, range(len(args)))) return type("Enum", (), enums) # Brick Options TopStudStyle = _enum("NONE", "CLOSED", "OPEN") SideStudStyle = _enum("NONE", "OPEN", "HO...
import argparse import glob import os import sys import time import traceback import numpy as np import torch # DISTRIBUTED from torch.nn.parallel import DistributedDataParallel as DDP_th from torch.optim import Adam from torch.utils.data import DataLoader from torch.utils.data.distributed import DistributedSampler fr...
import pytest import matplotlib.pyplot as plt import numpy as np from py_wake.deficit_models import VortexCylinder from py_wake.deficit_models.no_wake import NoWakeDeficit from py_wake.deficit_models.noj import NOJDeficit from py_wake.examples.data import hornsrev1 from py_wake.examples.data.hornsrev1 import Hornsrev1S...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 24 12:43:41 2019 @author: nmei simple autoencoder """ import os from glob import glob from tqdm import tqdm from torch.utils.data import Dataset from nibabel import load as load_fmri import torch from torch import nn,no_grad from torch import op...
#!/usr/bin/python3 # ***************************************************************************** # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ...
# Copyright 2016-2021, Pulumi Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
from os.path import join import tensorflow_hub as hub import tensorflow as tf import numpy as np import pytest from os import environ from pliers.tests.utils import get_test_data_path from pliers import config from pliers.extractors import (TensorFlowKerasApplicationExtractor, TFHubExtrac...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 12 17:13:29 2018 @author: pamelaanderson """ from difflib import SequenceMatcher import json import numpy as np import os import operator import pandas as pd def load_adverse_events(path, year, q): """ Loading adverse drug events while perfor...
# -*- coding: utf-8 -*- # # ssa.py # # purpose: Reproduce Julien's hepta_ssa.m in python # author: <NAME> # e-mail: <EMAIL> # web: http://ocefpaf.tiddlyspot.com/ # created: 23-Jul-2012 # modified: Fri 27 Jul 2012 05:42:54 PM BRT # # obs: # from __future__ import division import numpy as np from scipy impor...
import time import wandb import os import numpy as np from itertools import chain import torch from onpolicy.utils.util import update_linear_schedule from onpolicy.runner.shared.base_runner import Runner def _t2n(x): return x.detach().cpu().numpy() class HanabiRunner(Runner): def __init__(self, config):...
from pyinduct.examples.string_with_mass.utils import sym, param, obs_gain from sympy.utilities import lambdify from scipy.integrate import quad import numpy as np import sympy as sp def _sum(iterable): sum = iterable[0] * 0 for v in iterable: sum += v return sum def _discard_small_values(mat, ep...
""" Cloud Provider ============== Combiner for Cloud information. It uses the results of the multiple parsers: * :py:class:`insights.parsers.installed_rpms.InstalledRpms` * :py:class:`insights.parsers.yum.YumRepoList` * :py:class:`insights.parsers.dmidecode.DMIDecode` * :py:class:`insights.parsers.rhsm_conf.RHSMConf`...
# -*- coding: utf-8 -*- # MusicPlayer, https://github.com/albertz/music-player # Copyright (c) 2012, <NAME>, www.az2000.de # All rights reserved. # This code is under the 2-clause BSD license, see License.txt in the root directory of this project. from __future__ import print_function import Traits from utils import s...
"""Transformations.""" import ast import logging from collections import namedtuple from collections import defaultdict from itertools import izip_longest from nodes import VhdlSyncNode from nodes import VhdlConstant from nodes import VhdlModule from nodes import VhdlLibrary from nodes import VhdlAnd from nodes import...
# orm/loading.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used to convert database rows into object instan...
# py 3 # text adventure - type 1 - uses objects and is long. import os # relies on os for 'cls' - possible incompatibility with other operating systems besides Windows. class Location: def __init__(self, locationName, directions, description, people = [], items = [], enemies = []): # The constructor that...
import datetime import logging import json import hashlib import urllib.parse as urlparse from urllib import request from django.template import loader from django.conf import settings from django.contrib import messages from django.contrib.auth import get_user_model from django.db import transaction from django.db.m...
''' HDPSB.py Bayesian nonparametric admixture model via the Hierarchical Dirichlet Process. Uses a direct construction that maintains K active components. Attributes ------- K : # of components gamma : scalar positive real, global concentration alpha : scalar positive real, document-level concentration param Local M...
parse__version__ = "$Revision: 1.3 $" import sys,os import time, datetime import sys try: import xml.etree.cElementTree as ET except ImportError: import cElementTree as ET sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/..") import Utils.ElementTreeUtils as ETUtils import shutil import subprocess...
import os import csv import importlib import utils.properties as props import utils.constants as const import utils.exceptions as e from utils.mutation_utils import save_scores2 from utils.mutation_utils import get_accuracy_list_from_scores, update_mutation_properties, load_scores_from_csv from utils.mutation_utils i...
""" depth_connectivity.py --- Assign bathymetry to a grid based on cell-to-cell connectivity derived from a high-resolution DEM. Adapted from Holleman and Stacey, JPO, 2014. Primary entry point: edge_depths=edge_connection_depth(g,dem,edge_mask=None,centers='lowest') see end of file """ # Copied from .../research...
# nuScenes dev-kit. # Code written by <NAME> and <NAME>, 2019. import random import unittest from typing import Dict, List import numpy as np from pyquaternion import Quaternion from nuscenes.eval.common.config import config_factory from nuscenes.eval.common.data_classes import EvalBoxes from nuscenes.eval.common.ut...
import PyQt5.Qt as qt import asyncio import websockets from re import match, sub from threading import Event, Thread from requests.utils import dict_from_cookiejar from frames import config, session, AsyncRequest from components import CommonDialog, CommonHBox, CommonVBox, CommonBtn from components.avatar_label import...
import base64 import json import logging import os import shutil import struct import subprocess import tarfile import tempfile from typing import Union import zipfile from enum import Enum, auto from io import BytesIO, RawIOBase from pathlib import Path import msgpack import numpy as np from addict import Dict as edi...
#!/usr/bin/python # -*- coding: utf-8 -*- # DATE: 2021/9/15 # Author: <EMAIL> from contextlib import contextmanager from os import getpid from pathlib import Path from sqlite3.dbapi2 import Connection, Cursor, connect, OperationalError from threading import Lock, local, get_ident from time import time as current, slee...
#MethodID="train-simple-dl-v1-1" #still experimental- this vers will attempt to save the #file name and associated array for test/train and label #as a dict, and reference that during mapping function. # #try to avoid tfrecord import pandas as pd import tensorflow as tf import sys import numpy as np #from matplotlib....
from copy import copy as cpy from matplotlib import pyplot as plt from math import log as ln from math import floor as fl from scipy import signal as sig import numpy as np import pandas as pd _delta_lf = 0.5 _delta_hf = 4.0 _theta_lf = _delta_hf _theta_hf = 7.0 _alpha_lf = _theta_hf _alpha_hf = 12.0 _beta_lf = _a...
from .models import Event import calendar import datetime from django.conf import settings from django.db.models import Q from django.http import Http404, HttpResponse, HttpResponseBadRequest from django.shortcuts import render from django.template.defaulttags import register from django.template.loader import render_t...
""" python module for calculating integrals with 2 Bessel / spherical Bessel functions. by <NAME> Feb 22, 2020 """ import numpy as np from scipy.special import gamma from numpy.fft import rfft2, irfft2 class two_sph_bessel(object): def __init__(self, x1, x2, fx1x2, nu1=1.01, nu2=1.01, N_extrap_low=0, N_extrap_high...
from __future__ import division from nipype.interfaces import fsl as fsl # fsl from nipype.interfaces import utility as util # utility from nipype.pipeline import engine as pe # pypeline engine import nipype.interfaces.io as nio import os import os.path as op import shutil from glob import glob im...
from __future__ import absolute_import from __future__ import print_function import sys, os, yaml, glob import subprocess import pandas as pd import re import shutil import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from nougat import common, align from itertools import groupby from collections im...
#!/usr/bin/python3 from collections import Counter import asyncio import asyncpool import filecmp import logging import os import re import shutil import threading import time import traceback from datetime import datetime, timedelta from logzero import logger as log from pyrogram.api.functions.contacts import search ...
import os import argparse import time from utils import configure_agent, compute_n_step_returns from envs.soccer_offense import SoccerOffenseEnv from envs.soccer_goalie import SoccerGoalieEnv import numpy as np import torch from torch.utils.tensorboard import SummaryWriter import hfo_py from agents.random_agent import ...
# github_scanner.py # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # Available subject to the Apache 2.0 License # https://www.apache.org/licenses/LICENSE-2.0 # This file has all the shared logic for interacting with the GitHub service, including keeping # a local cache to speed things up. # # swong: (8/24/21) Added put_githu...
""" Base class for decomposition estimators, utilities for masking and dimension reduction of group data """ from __future__ import division from math import ceil import itertools import glob from distutils.version import LooseVersion import numpy as np from scipy import linalg import sklearn import nilearn from skle...
import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import griddata from scipy.optimize import curve_fit import pdb from utilities.imaging.fitting import circle,circleMerit from utilities.imaging.analysis import ptov,rms import utilities.imaging.man as man import utilities.imaging.fitting as fit i...
#!/usr/bin/env python # # Copyright (c) 2019 Opticks Team. All Rights Reserved. # # This file is part of Opticks # (see https://bitbucket.org/simoncblyth/opticks). # # 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...
""" """ import math import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as model_zoo from torch.nn import init import torch from .ozan_rep_fun import ozan_rep_function,trevor_rep_function,OzanRepFunction,TrevorRepFunction __all__ = ['xception_taskonomy_new','xception_taskonomy_new_fifth...
from itertools import product import numpy as np import param from ...core import CompositeOverlay, Element from ...core import traversal from ...core.util import match_spec, max_range, unique_iterator, unique_array, is_nan from ...element.raster import Image, Raster, RGB from .element import ColorbarPlot, OverlayPlo...