text stringlengths 6.04k 39.5k |
|---|
"""
BRS ANIM LOCATOR TRANSFER TOOL
BY <NAME> (DEX3D)
"""
import maya.cmds as cmds
import maya.mel as mel
locSuffix = '_BRSSnapLoc'
BRSAnimLocGrp = 'BRSAnimLoc_Grp'
redirectGuide = 'BRSRedirectGuide'
def resetViewport(*_):
# Redraw viewport On
cmds.refresh(suspend=False)
if cmds.ogs(q=True, pause=True) =... |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import os
import sys
import re
import subprocess as sp
import json
import tempfile
import datetime
import time
import shutil
import hashlib
image_nonraw_ext = [
"jpg", "jpeg", "tif", "tiff", "heic"
]
image_raw_ext = [
... |
# -*- test-case-name: vumi.dispatchers.tests.test_base -*-
"""Basic tools for building dispatchers."""
import re
import functools
from twisted.internet.defer import inlineCallbacks, returnValue, maybeDeferred
from vumi.service import Worker
from vumi.errors import ConfigError
from vumi.message import TransportUserM... |
import numpy as np
from math import *
from Data.Edges import *
from Data.Events import *
from Data.Nurbs import NurbsSurface
from Data.Vertex import Vertex
from Data.Objects import *
def fsign(value):
if isclose(value, 0, abs_tol=1e-10):
return 0
elif value < 0:
return -1.0
else:
return 1.0
class Surface(... |
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... |
# -*- coding: utf8 -*-
"""
======================================
Project Name: NLP
File Name: train_globalpointer
Author: czh
Create Date: 2022/2/9
--------------------------------------
Change Activity:
======================================
"""
import os
import regex
import glob
import json
impo... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
from PySide2 import QtCore
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
import winreg, locale, os, tempfile, subprocess
from urllib.request import urlopen
import hashlib
from ctypes import windll
import win32gui
tdir = tempfile.TemporaryDirectory()
tempDir = tdir.name
impor... |
# -*- coding: utf-8 -*-
'''
Support for apk
.. important::
If you feel that Salt should be using this module to manage packages on a
minion, and it is using a different module (or gives an error similar to
*'pkg.install' is not available*), see :ref:`here
<module-provider-override>`.
.. versionadded: ... |
# coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
from __future__ import division
# LIBTBX_SET_DISPATCHER_NAME phenix.fmodel
import sys, os
import mmtbx.utils
import iotbx.phil
import iotbx.pdb
from scitbx.array_family import flex
from libtbx import runtime_utils
from libtbx.utils import Sorry
import random
legend = """
phenix.fmodel: a tool to compute structure fac... |
# import shit as usual
import os
import sys
from fetch_cord.args import parse_args
from fetch_cord.bash import exec_bash
from fetch_cord.out import cpumodel, cpuvendor, gpuvendor, sysosid
if os.name != "nt":
from fetch_cord.out import wmid, deid, termid, shellid, sysosid, hostline, termline
# appid for discord app... |
import json
import datetime
import warnings
import copy
from numbers import Integral
from functools import lru_cache
from collections import OrderedDict
from collections.abc import Mapping
from jsonschema import validators as mvalidators
from jsonschema.exceptions import ValidationError
import yaml
import numpy as np... |
# From Python
# It requires OpenCV and Pykinect2 installed for Python
import sys
import cv2
import os
from sys import platform
import argparse
from pathlib import Path
import numpy as np
import math
import time
from numpy.core.fromnumeric import size
# Kinect libraries
from pykinect2.PyKinectV2 import *
from pykinect2... |
import os
import os.path as op
import ast
from werkzeug import secure_filename
from werkzeug.datastructures import FileStorage
from wtforms import ValidationError, fields
from wtforms.widgets import HTMLString, html_params
try:
from wtforms.fields.core import _unset_value as unset_value
except ImportError:
... |
"""Treadmill bootstrap module.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import errno
import io
import json
import logging
import os
import sys
import tempfile
if os.name == 'posix':
import stat
import... |
# -*- coding: utf-8 -*-
from time import time
from collections import deque
import numpy as np
import math,logging
from fastdtw import fastdtw
from concurrent.futures import ProcessPoolExecutor, as_completed
from collections import defaultdict
from .utils import *
import os
limiteDist = 20
def getDegreeListsVertices(... |
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# License: Simplified BSD
import os.path as op
import warnings
from nose.tools import assert_true
import numpy as np
from numpy.testing import asser... |
# Derived classes to use for nginx
from kombit.core import *
import os
import re
import time
import sys
import cogs.llvmapps
class NgxCompileCog(cogs.llvmapps.LLVMAppsCompileCog):
def __init__(self, config_parser):
self.env = {}
cogs.llvmapps.LLVMAppsCompileCog.__init__(self, config_parser)
self.name = config_... |
import tensorflow as tf
import re
import numbers
import numpy as np
TOWER_NAME = 'tower'
def activation_summary(x):
"""Helper to create summaries for activations.
Creates a summary that provides a histogram of activations.
Creates a summary that measures the sparsity of activations.
Args:
x... |
#!/usr/bin/env python
#
# Copyright (C) 2019-2021 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, cop... |
# encoding: utf-8
"""Module to create random test instances of matrix product arrays"""
from __future__ import division, print_function
import functools as ft
import itertools as it
import collections
import numpy as np
from scipy.linalg import qr
from six.moves import range
from . import mparray as mp
from . impo... |
#! /usr/bin/env python3
# This is an example implementation of Bao, with the goal of being as readable
# as possible and generating test vectors. There are a few differences that
# make this code much simpler than the Rust version:
#
# 1. This version's encode implementation buffers all input and output in
# memory... |
# GUI modules
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox
import tkinter.filedialog
import tkinter.font
from datetime import datetime
# Images
from PIL import Image
from PIL import ImageTk
import pickle # Save Data
# Other Modules
import subprocess # Run python file
# Pathfin... |
import collections
import os
import traceback
from datetime import datetime, timedelta
import pandas as pd
from openpyxl.styles import PatternFill
import config
from openpyxl import load_workbook
import numpy as np
import xlrd
def get_date_index(date, dates_values, lookback_index=0):
if isinstance(dates_values[0]... |
import pathlib
import shutil
import os
import json
import re
import copy
import math
from collections import defaultdict
import sys
import http.server
import socketserver
import functools
from .compiler import generate_hierarchy
from .primitive import generate_primitive
from .pnr import generate_pnr
from .gdsconv.json... |
# Copyright 2020 Google
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... |
"""
Interp-level definition of frequently used functionals.
"""
import sys
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
from pypy.interpreter.typedef import TypeDef
from rpython.rl... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown copyright. The Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are me... |
from __future__ import absolute_import
from __future__ import print_function
import sys
import re
import os
import abc
import six
import textwrap
import inspect
from collections import OrderedDict
import related
import kipoi # for .config module
from kipoi.specs import DataLoaderDescription, Info, example_kwargs, Re... |
#gui/installerGui.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2011-2018 NV Access Limited, Babbage B.v.
import os
import ctypes
import buildVersion
import shellapi
import winUser
import wx
im... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import six.moves.http_client as httplib
import xml.dom.minidom
import time
import re
import os
from six.moves.urllib.parse import quote
from operator import itemgetter#, attrgetter
from Plugins.Extensions.SubsDownloader2.SourceCode.archives... |
import torch
import torch.nn as nn
import torchvision
import torch.nn.functional as F
from ibnnet import resnext101_ibn_a,IBN
from senet import se_resnext50_32x4d
def Stconv3x3(in_, out, bias=True):
return nn.Conv2d(in_, out, 3, padding=1, bias=bias)
def Stconv7x7(in_, out, bias=True):
return nn.Conv2d(in_, o... |
#!/usr/bin/env python3
class TypeCacher():
def __init__(self):
self.cached_types = {}
self.num_cached_types = 0
def get_cached_type_str(self, type_str):
if type_str in self.cached_types:
cached_type_str = 'cached_type_%d' % self.cached_types[type_str]
else:
... |
# ******************************************************************************
# Copyright 2019 Intel 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.o... |
# Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
"""
Sparse Regression
=================
We demonstrate how to do (fully Bayesian) sparse linear regression using the
approach described in [1]. This approach is particularly suitable for situations
with many feature dimensions (large ... |
#!/usr/bin/env python3
import os, sys, time, json
from itertools import repeat
import wfdb
import numpy as np
import torch
import scipy.signal as SS
from easydict import EasyDict as ED
try:
import torch_ecg
except ModuleNotFoundError:
import sys
from os.path import dirname, abspath
sys.path.insert(0,... |
import tempfile
from tenable_io.api.workbenches import WorkbenchesApi
from tenable_io.parser.workbenches import WorkbenchParser
from tenable_io.util import wait_until
class WorkbenchHelper(object):
DEFAULT_PAGE_SIZE = 10
def __init__(self, client):
self._client = client
def assets(self, date_r... |
# -*- coding: utf-8 -*-
import unittest
import numpy as np
import os
import contextlib
import re
from testfixtures import TempDirectory
from .. import fluoxas
from ..run import run_sequential
from ...io import nxfs
from ...io import xiaedf
from ...process import nxresult
from ...align import types
from ...utils impor... |
from __future__ import absolute_import, division, print_function
import boost_adaptbx.boost.python as bp
from cctbx.array_family import flex
from six.moves import zip
from six.moves import range
ext = bp.import_ext("mmtbx_masks_ext")
from mmtbx_masks_ext import *
from cctbx.masks import around_atoms, vdw_radii_from_xr... |
'''
Question 1 Skeleton Code
'''
import sklearn
import numpy as np
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.naive_bayes import BernoulliNB
from sklearn.naive_bayes import GaussianNB
from sklearn.neighbors import KNeighbo... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 27 15:59:17 2020
Calibrate the fragmentation model to the data by Song et al. (2017)
Figure 5 of Kaandorp et al. (2021): Modelling size distributions
of marine plastics under the influence of continuous cascading fragmentation
@author: kaandorp
""... |
"""Actions to define on the Input parameters.
This module defines some of the most common actions that a BigDFT user might
like to perform on the input file. Such module therefore sets some of the keys
of the input dictionary to the values needed to perform the operations.
Users might also inspire to the actions perfo... |
#
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Intel 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 app... |
import os
import sys
import glob
import gzip
import multiprocessing
import re
import uuid
from core.log import log
from core.config import HotSOSConfig
class FileSearchException(Exception):
def __init__(self, msg):
self.msg = msg
class FilterDef(object):
def __init__(self, pattern, invert_match=F... |
import sys
import numpy as np
from .orcadaq import OrcaDecoder, get_ccc
class ORCAStruck3302(OrcaDecoder):
"""
ORCA decoder for Struck 3302 digitizer data
"""
def __init__(self, *args, **kwargs):
self.decoder_name = 'ORSIS3302DecoderForEnergy'
self.orca_class_name = 'ORSIS3302Model'
... |
from contextlib import contextmanager
import sys
from _pydevd_bundle.pydevd_constants import get_frame, dict_items, RETURN_VALUES_DICT, \
dict_iter_items, ForkSafeLock, GENERATED_LEN_ATTR_NAME
from _pydevd_bundle.pydevd_xml import get_variable_details, get_type
from _pydev_bundle.pydev_override import overrides
fr... |
# -*- coding: utf-8 -*-
from wbia.plottool import mpl_sift
import numpy as np
import matplotlib as mpl
import utool as ut
ut.noinject(__name__, '[pt.mpl_keypoint]')
# TOOD: move to util
def pass_props(dict1, dict2, *args):
# Passes props from one kwargs dict to the next
for key in args:
if key in dic... |
#!/usr/bin/env python
"""
Takes a cifti map ('dscalar.nii') and outputs a csv of results
Usage:
ciftify_statclust_report [options] <func.dscalar.nii>
Arguments:
<func.dscalar.nii> Input map.
Options:
--min-threshold MIN the largest value [default: -2.85] to consider for being a minimum
--max-th... |
from __future__ import print_function
import logging
from abc import ABCMeta, abstractmethod
import progressbar
from six import add_metaclass
from toolz import first
import re
logger = logging.getLogger(__name__)
def callback(func):
func._is_callback = True
return func
class TrainingExtension(object):
... |
# Copyright 2017, <NAME>. 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 applicable law or agre... |
import csv
import datetime
import os
import os.path as op
import clr
clr.AddReference("RevitAPI")
import Autodesk.Revit.UI
from Autodesk.Revit.DB import FilteredElementCollector as Fec
from Autodesk.Revit.DB import FilteredWorksetCollector as Fwc
from Autodesk.Revit.DB import BuiltInCategory, ModelPathUtils, WorksetKin... |
'''
author:zhujunwen
Guangdong University of Technology
'''
import argparse
import logging
import torch
import matplotlib.pyplot as plt
from torch.utils.data import DataLoader
from torch import autograd, optim
from UNet import Unet,resnet34_unet
from attention_unet import AttU_Net
from channel_unet import myChannelUnet... |
######################################################################
# Copyright (C) 2017 <NAME>(<EMAIL>) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
###############################################################... |
# Copyright 2020 Petuum, Inc. All Rights Reserved.
#
# It includes the derived work based on:
#
# Copyright 2018 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 ... |
# -*- coding: utf-8 -*-
#/usr/bin/python3
'''
Last modified by <NAME>
<EMAIL>
'''
import logging
import tensorflow as tf
from tqdm import tqdm
from data_load import _load_vocab
from modules import get_token_embeddings, ff, positional_encoding, multihead_attention, noam_scheme
from utils import convert_idx_to_token_te... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import math
import shutil
import time
import argparse
import pprint
import random as pyrandom
import logging
import numpy as np
import torch
import torch.nn as nn
import torch.nn.function... |
# -*- coding: UTF-8 -*-
__all__ = ['agregation']
import numpy as np
import scipy
from scipy.sparse import csr_matrix, coo_matrix, isspmatrix_csr, isspmatrix_csc
from pyamg.relaxation import gauss_seidel
#from pyamg.util.linalg import residual_norm
# ...
try:
from petsc4py import PETSc
importPETSc=True
except I... |
import sys
homeCodePath=r"H:\10_Python\005_Scripts_from_others\Laurent\wicking_pnm"
if homeCodePath not in sys.path:
sys.path.append(homeCodePath)
import random
import xarray as xr
import numpy as np
import scipy as sp
import networkx as nx
import time
from collections import deque
from skimage.morphology import c... |
"""Class for symbolic expression object or program."""
import array
import os
import warnings
from textwrap import indent
import numpy as np
from sympy.parsing.sympy_parser import parse_expr
from sympy import pretty
from dsr.functions import PlaceholderConstant
from dsr.const import make_const_optimizer
... |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from .utils import cKDTree, guess_pos_columns
import numpy as np
from pandas import DataFrame
from .utils import pandas_concat
# Maximum number of elements in the array of all distances.
# Should be... |
"""
"""
from numbers import Real
from typing import Union, Optional, Any, List, Tuple, Sequence
import numpy as np
from easydict import EasyDict as ED
from utils import dict_to_str
from cfg import BaseCfg
__all__ = [
"CPSC2020_loss",
"CPSC2020_score",
"eval_score",
]
def CPSC2020_loss(y_true:np.ndarra... |
import os
import sys
import urllib.request, urllib.error, urllib.parse
import copy
import threading
import time
import math
import tempfile
import base64
import hashlib
import socket
import logging
from io import StringIO
import multiprocessing.dummy as multiprocessing
from ctypes import c_int
import json
from . impor... |
import pytest
import numpy as np
from unittest.mock import MagicMock, patch
from qtpy import QtCore, QtGui
from qtpy.QtCore import Qt
from glue.utils.qt import get_qapp, process_events
from glue.core import Data, DataCollection
from glue.utils.qt import qt_to_mpl_color
from glue.app.qt import GlueApplication
from ..... |
# coding=utf-8
# Copyright (c) DIRECT Contributors
# Several of the utilities here are copied/modified from torchvision under the BSD License.
# https://github.com/pytorch/vision/blob/d367a01a18a3ae6bee13d8be3b63fd6a581ea46f/torchvision/datasets/utils.py
import bz2
import gzip
import hashlib
import json
import loggin... |
import binascii
from collections import defaultdict
import json
import logging
from twisted.internet import threads, defer
from lbrynet.core.cryptoutils import get_lbry_hash_obj
from lbrynet.core.client.StandaloneBlobDownloader import StandaloneBlobDownloader
from lbrynet.core.Error import UnknownStreamTypeError, Inva... |
#!/usr/bin/env python
# Copyright 2016 Cisco Systems, 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.... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. codeauthor:: <NAME> <<EMAIL>>
.. codeauthor:: <NAME> <<EMAIL>>
"""
import argparse as ap
import json
import os
import pickle
import shlex
import numpy as np
import pandas as pd
from scipy.stats import rankdata
import sklearn.metrics as metrics
import torch
from tqd... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
def tanh_clip(x, clip_val=10.):
'''
soft clip values to the range [-clip_val, +clip_val]
'''
if clip_val is not None:
x_clip = clip_val * torch.tanh((1. / clip_val) * x)
else:
x_clip = x
retur... |
"""
VASP calculation.
-----------------
The calculation class that prepares a specific VASP calculation.
"""
#encoding: utf-8
# pylint: disable=abstract-method
# explanation: pylint wrongly complains about (aiida) Node not implementing query
from aiida.plugins import DataFactory
from aiida_vasp.parsers.file_parsers.i... |
#!/usr/bin/env python
# author: <NAME>
# email: <EMAIL>
# license: MIT
# Please feel free to use and modify this, but keep the above information.
"""
Functions for Potential and initial wave function :math:`\psi_0`
"""
import sys
import zipfile
import dill
from pathlib import Path
import numpy as np
from ffmpeg im... |
#####################################################################################
# Copyright (c) 2021 <NAME>, <NAME>, Carnegie Mellon University
# Last edit: Feb. 16, 2021
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "S... |
#!/usr/bin/env python
"""Parallax Propeller code uploader
Copyright (C) 2007 <NAME>
This file is part of PropTools.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, version 2.
License: http://www.... |
from utils import log
import config
import cv2
import numpy as np
from flask import Flask, request
from flask import render_template
from flask_cors import CORS
import os
import json
import time
import threading
import sys
print('path: ',os.path.dirname(os.path.abspath(__file__)))
# 获取资源路径
def resource_path(relative_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Monday 3 December 2018
@author: <NAME>
"""
import os
import pandas as pd
import numpy as np
import feather
import time
from datetime import date
import sys
from sklearn.cluster import MiniBatchKMeans, KMeans
from sklearn.metrics import silhouette_score
fr... |
"""
Defines SmartCache and supporting functions
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government r... |
# -*- coding: utf-8 -*-
#
# Author: <NAME> <<EMAIL>>
#
# Tests for stationarity
from __future__ import absolute_import, division
from sklearn.base import BaseEstimator
from sklearn.utils.validation import column_or_1d, check_array
from sklearn.linear_model import LinearRegression
from sklearn.externals import six
fr... |
#!/usr/bin/env python3
"""
model_functions.py
For issues contact <NAME> (<EMAIL>)
This script contains functions for wrapping generated proteasomal cleavage
prediction models and handling fasta protein inputs for easy model
implementation.
"""
import os
import warnings
import pepsickle.sequence_featurization_tools a... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# pylint: disable=missing-docstring
import argparse
import hashlib
import logging
import os
import shutil
import sys
import tempfile
import toml
import subprocess
import time
DEFAULT_PREVHASH = '0x{:064x}'.format(0)
CITA_HOME = os.getenv('CITA_HOME', os.path.abspath(
... |
'''
Author: <NAME>
Sep. 2021
'''
import os
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data as data
import torchvision.transforms as trf
from torch.utils.tensorboard import SummaryWriter
from data_feed import DataFeed
from model import Seq2Seq, Encoder, D... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2020-2021 The SymbiFlow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
# File: bitMapping.py
# Author: <NAME>
# C... |
"""Train CenterNet"""
import argparse
import os
import logging
import warnings
import time
import mxnet as mx
from mxnet import gluon
from mxnet import autograd
from mxnet.contrib import amp
import gluoncv as gcv
gcv.utils.check_version('0.6.0')
from gluoncv import data as gdata
from gluoncv import utils as gutils
from... |
# -*- coding: utf-8 -*-
'''
This code contains methods for pulling data from NBA.com
It depends on the NBA_PY package
'''
#Imports Packages
from nba_py import *
from nba_py import team
from nba_py import game
from nba_py.constants import *
from Dunks_experiment import *
import pandas as pd
import datetime as dt
import... |
import base64
import binascii
import collections
import copy
import json
import logging
import os
import traceback
from abc import abstractmethod, ABCMeta
from typing import Tuple
import requests
import yaml
from cryptography.exceptions import InvalidTag
from cryptography.hazmat.backends import default_backend
from cr... |
# FIXME more descriptive name (as valgrind only applicable to native code)
def invoke_test(tsk):
def print_vg_frame_component(frame, tag, prefix):
o = frame.find(tag)
if o != None:
from xml.sax.saxutils import unescape
print(' ' + prefix + ': ' + unescape(o.text))
# in... |
"""Tools for estimation and analysis of Markovian milestoning models."""
import collections
import msmtools.estimation as estimation
import msmtools.util.types
import numpy as np
import scipy.spatial
import bkit.ctmc as ctmc
class MilestoneState(frozenset):
"""A milestone state identified by a pair of cells.
... |
'''
StationSim
author: aw-west
created: 19/06/18
version: 0.8.1
Changelog:
.0 merged models
.0 batch() moved to experiments
.0 separated figures
.1 checked figures and created experiment notebooks
.1 fixed _heightmap
Todo:
new entering
speeds[-1] separation drawn
set_pickle?
... |
# TODO:
# * modify exports using lief
# * zero out rich header (if it exists) --> requires updating OptionalHeader's checksum ("Rich Header" only in Microsoft-produced executables)
# * tinker with resources: https://lief.quarkslab.com/doc/tutorials/07_pe_resource.html
import lief # pip install https://github.com/lief... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import re
import numpy as np
from astropy.utils import lazyproperty
from gammapy.utils.array import is_power2
from ..utils import INVALID_INDEX
# Approximation of the size of HEALPIX pixels (in degrees) for a particular order.
# Used to convert from HEALP... |
# coding: utf-8
#
# This code is part of dqmc.
#
# Copyright (c) 2022, <NAME>
#
# This code is licensed under the MIT License. The copyright notice in the
# LICENSE file in the root directory and this permission notice shall
# be included in all copies or substantial portions of the Software.
"""Tests for the main dqm... |
import math
from typing import Any, Dict, Optional, Tuple
import torch
from torch import nn, Tensor
from torch.distributions import Distribution, Categorical, Independent
from layer_utils.distributions import independent_continuous_bernoullis
from layer_utils.modes import mode
from layers import ConvLSTMCell, Residua... |
"""
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0
"""
import sys
import ssl
import datetime
import boto3
import botocore
import base64
import re
import itertools
from botocore.signers import RequestSigner
import urllib3
from botocore.vendored import requests
i... |
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 14 08:38:53 2021
@author: matheus.sartor
"""
import plotMalhas as pm
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.tri as mtri
import numpy as np
import os
from pathlib import Path
import glob
from PIL import Image
import meshio
name = 'funcao_co... |
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib.cm import get_cmap
import scipy.linalg as la
plt.rcParams['figure.figsize'] = [8, 8]
plt.rcParams.update({'font.size': 18})
sns.set_style("whitegrid")
np.set_printoptions(precision=3, linewidth=100) #, formatter={'float': '{: 0.... |
"""
Programmer: <NAME>
Purpose: A variety of tools for computing self-similarity matrices (SSMs)
and cross-similarity matrices (CSMs), with a particular
emphasis on speeding up Euclidean SSMs/CSMs.
"""
import numpy as np
import scipy.misc
import scipy.interpolate
import matplotlib.pyplot as plt
import SequenceAlignment... |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
import matplotlib.patches as patches
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1 import make_axes_locatable
import btk
def get_rgb(image, min_val=None, max_val=None):
"""Function to normalize 3 band input image to RGB 0-255 image.
Args:
image (array_like): Image a... |
# Copyright 2018 ETH Zurich, Anapaya Systems
#
# 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... |
# +-------------------------------------------------------------------------
# | ysMultiViewer_teaser.py
# |
# | Author: <NAME>
# +-------------------------------------------------------------------------
# | COPYRIGHT:
# | Copyright <NAME> 2013
# | See the included COPYRIGHT.txt file for further details.
... |
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
"""
packit started as source-git and we're making a source-git module after such a long time, weird
"""
import logging
import os
import shutil
import tarfile
import tempfile
from pathlib import Path
from typing import Optional, Tuple
from g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.