text stringlengths 8.04k 46.5k |
|---|
#!/usr/bin/env python
"""
@package mi.dataset.parser.vel3d_l_wfp
@file marine-integrations/mi/dataset/parser/vel3d_l_wfp.py
@author <NAME> (Raytheon)
@brief Parser for the vel3d_l_wfp dataset driver"
This file contains classes for both the vel3d_l_wfp parser (recovered data)
and the vel3d_l_wfp_sio_mule parser... |
from __future__ import print_function, division
from sympy.core import S, sympify, Mul, Add, Expr
from sympy.core.function import expand_mul, count_ops, _mexpand
from sympy.core.symbol import Dummy
from sympy.functions import sqrt, sign, root
from sympy.polys import Poly, PolynomialError
from sympy.utilities import de... |
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 Neongecko.com Inc.
# Contributors: <NAME>, <NAME>, <NAME>, <NAME>,
# <NAME>, <NAME>, <NAME>, <NAME>
# BSD-3 License
# Redistribution and use in source and ... |
#!/usr/bin/env python2.7
#
# 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, soft... |
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... |
# -*- coding: utf-8 -*-
# Copyright (C) 2005-2006 <NAME>
# Copyright (C) 2006-2007 <NAME>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Read and write ASF (Window Media Aud... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import os
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5 import QtCore, QtGui, QtWidgets
import cv2
import imutils
import numpy as np
import torch
from PIL import ImageDraw, ImageFont
from PIL import Imag... |
from __future__ import unicode_literals
import collections
import io
import zlib
from .compat import (
compat_str,
compat_struct_unpack,
)
from .utils import (
ExtractorError,
)
def _extract_tags(file_contents):
if file_contents[1:3] != b'WS':
raise ExtractorError(
'Not an SWF fi... |
"""
read_flashes
filterer.filt_ev_fl
brancher(events_flashes_receiever, other_analysis_targets=timeframe_targets)
ev_fl_rx ->
histogrammer
energy calculation
plotter
timeframe_targets is
ev_fl_rx ->
bound_filt (on time)
read_flashes -> filterer.filt_ev_fl -> length_for_these_flashes -> brancher -> timeframe_target... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
# -*- coding: utf-8 -*-
'''
Finite state machine library.
'''
class anything_else_cls:
'''
This is a surrogate symbol which you can use in your finite state machines
to represent "any symbol not in the official alphabet". For example, if your
state machine's alphabet is {"a", "b", "c", "d", fsm.anything_else}... |
import warnings
import numpy as np
import pandas as pd
from . import encoding
from . encoding import read_plain
import fastparquet.cencoding as encoding
from .compression import decompress_data, rev_map, decom_into
from .converted_types import convert, simple, converts_inplace
from .schema import _is_list_like, _is_ma... |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2014 SoftLayer Technologies, Inc.
# Copyright 2015 Mirantis, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... |
import tkinter
from tkinter.simpledialog import *
from tkinter.filedialog import *
import math
import os
import os.path
import numpy as np
import struct
import matplotlib.pyplot as plt
import threading
import time
from PIL import Image, ImageFilter, ImageEnhance, ImageOps
import colorsys
import random
import tempfile
... |
# -*- coding: utf-8 -*-
"""
Defines FlightGui, a class that provides a main loop for flight.
Call FlightGui.draw() in the main loop to update positions in the GUI.
Call FlightGui.pop_commands() to collect user input.
"""
import logging
from datetime import datetime
from enum import Enum
from pathlib import Path
from ... |
# GUI Application automation and testing library
# Copyright (C) 2006-2018 <NAME> and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# ... |
# coding: utf-8
import sys
#from AppTestStringObjectWithDict
def test_format_item_dict():
d = {'i': 23}
assert 'a23b' == 'a%(i)sb' % d
assert '23b' == '%(i)sb' % d
assert 'a23' == 'a%(i)s' % d
assert '23' == '%(i)s' % d
def test_format_two_items():
d = {'i': 23, 'j': 42}
assert 'a23b42c' =... |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
from __future__ import print_function
from builtins import range
import sys
import os.path
import logging
import re
from Vispa.Share.BasicDataAccessor import BasicDataAccessor
from Vispa.Share.RelativeDataAccessor import RelativeDataAccessor
from Vispa.Main.Exceptions import PluginIgnoredException,exception_traceback
... |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... |
import json
import os
from packaging.version import parse as parse_version
import shutil
import time
from random import randint
from bdbag import bdbag_api
from datapackage import Package
from fair_research_login import NativeClient
import git
import globus_automate_client
import globus_sdk
import requests
from cfde... |
"""
Implementation of the decision tree in Deep Forest.
This class is modified from:
https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tree/_classes.py
"""
__all__ = [
"DecisionTreeClassifier",
"DecisionTreeRegressor",
"ExtraTreeClassifier",
"ExtraTreeRegressor",
"PowerTreeClassi... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 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
#
# Unl... |
import uuid
from django.contrib.auth.models import User
from django.db import models
from django.utils import timezone
from django.core.serializers.json import DjangoJSONEncoder
from django.core.validators import MinLengthValidator
from simple_history.models import HistoricalRecords
from loader.config import get_mol... |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2018 Kyoto University (<NAME>)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Base class for loading dataset for ASR.
In this class, all data will be loaded at each step.
You can use the multi-GPU version.
"""
import kaldiio
import num... |
import asyncio
import enum
import warnings
from dataclasses import dataclass, field
from datetime import datetime, timedelta
import binascii
from typing import Optional, Iterable, Union, List
from asn1crypto import crl, ocsp, x509
from asn1crypto.util import timezone
from ._errors import pretty_message
from ._types i... |
import functools
import json
import logging
import random
import sqlite3
import string
import warnings
from collections import OrderedDict
from contextlib import contextmanager
from datetime import datetime
from functools import partial
from itertools import groupby
from types import MappingProxyType
from typing import... |
"""Test functions for matrix module
"""
from numpy.testing import (
assert_equal, assert_array_equal, assert_array_max_ulp,
assert_array_almost_equal, assert_raises, assert_
)
from numpy import (
arange, add, fliplr, flipud, zeros, ones, eye, array, diag, histogram2d,
tri, mask_indices, triu_indic... |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#------------------------------------------------------------------------... |
# -*- coding: utf-8 -*-
'''
This module provides the point of entry to SPM, the Salt Package Manager
.. versionadded:: 2015.8.0
'''
# Import Python libs
from __future__ import absolute_import, print_function
import os
import yaml
import tarfile
import shutil
import msgpack
import datetime
import hashlib
import loggin... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import json
import re
from typing import List, Optional, Tuple, Type
import torch
from pytext.common import Padding
from pytext.config.component import Component, ComponentType, create_component
from pytext.data.sources.data... |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license. See LICENSE.rst except
# for parts explicitly labelled as being (largely) copies of numpy
# implementations; for those, see licenses/NUMPY_LICENSE.rst.
"""Helpers for overriding numpy functions.
We override numpy functions in `~astropy.units.Quanti... |
from datetime import datetime, time
from itertools import product
import numpy as np
import pytest
import pytz
import pandas as pd
from pandas import (
DataFrame,
DatetimeIndex,
Index,
MultiIndex,
Series,
date_range,
period_range,
to_datetime,
)
import pandas.util.testing as tm
import... |
"""
Authors:
<NAME> (<EMAIL>)
<NAME>, <NAME>, <NAME>, <NAME>
Dr. <NAME> (<EMAIL>)
--- Versions ---
0.1 - initial version
"""
# https://doc.qt.io/qtforpython/gettingstarted.html
import os
import sys
import getopt
import shutil
from pathlib import Path
import xml.etree.ElementTree as ET # https://docs.python.org/2/lib... |
import synapseclient
from synapseclient import File, Project, Folder, Table, Schema, Link, Wiki, Entity, Activity
from synapseclient.cache import Cache
from synapseclient.exceptions import SynapseHTTPError
import re
import json
############################################################
# Copy Functio... |
import os
import gym
from ffai import FFAIEnv
from torch.autograd import Variable
import torch.optim as optim
from multiprocessing import Process, Pipe
from ffai.ai.layers import *
import torch
import torch.nn as nn
import torch.nn.functional as F
import matplotlib.pyplot as plt
import sys
from a2c_agent import A2CAgen... |
""" types.py
"""
from __future__ import division
import abc
import base64
import binascii
import bisect
import codecs
import collections
import operator
import os
import re
import warnings
import weakref
import mmap
from enum import EnumMeta
from enum import IntEnum
import six
from .decorators import sdproperty
fr... |
# coding=utf-8
# Copyright 2020 The TF-Agents 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
from dataclasses import dataclass
from typing import List, Optional, Tuple, Set, Union, Sequence, cast, Iterable, Dict
import pygame
import pygame_gui
from neighborly.core.character import GameCharacter
from neighborly.core.ecs import GameObject, Component
from neighborly.core.engine import AbstractFactory, Component... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
# :coding: utf-8
# :copyright: Copyright (c) 2013 ftrack
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import range
from builtins import object
import collections
import urllib.parse
import threading
import queue as... |
# container-service-extension
# Copyright (c) 2017 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
import functools
import hashlib
import json
import os
import pathlib
import stat
import sys
import traceback
from urllib.parse import urlparse
from cachetools import LRUCache
import click
from ... |
"""Functions used in the provincial and national-scale network failure analysis
"""
import ast
import copy
import csv
import itertools
import math
import operator
import os
import sys
import json
import igraph as ig
import networkx as nx
from collections import defaultdict
from itertools import chain
import numpy as n... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# OpenSubtitlesDownload.py / Version 3.2
# https://github.com/emericg/OpenSubtitlesDownload
# This software is designed to help you find and download subtitles for your favorite videos!
# Copyright (c) 2014 by <NAME> <<EMAIL>>
#
# This program is free software: you can re... |
# Copyright 2018 Google 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.0
#
# Unless required by applicable law or ag... |
import copy
import logging
import random
import math
import hexgrid
import catanlog
import undoredo
import catan.states
import catan.board
import catan.pieces
class Game(object):
"""
class Game represents a single game of catan. It has players, a board, and a log.
A Game has observers. Observers registe... |
# Common library for Admin Component
import hashlib
import logging
import os
import time
from datetime import datetime
import arrow
import transaction
from pyramid.httpexceptions import exception_response
from sqlalchemy.exc import IntegrityError, ProgrammingError
from dbas.database import DBDiscussionSession
from d... |
# This file is part of Buildbot. Buildbot 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.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
# -*- coding: utf-8 -*-
# _utils.py
# Miscellaneous functions and stdlib wrappers for MATLAB functions
# that do not find a direct replacement in numpy/scipy.
# Copyright 2013 <NAME>
# This file is part of python-deltasigma.
#
# python-deltasigma is a 1:1 Python replacement of Richard Schreier's
# MATLAB delta sigma to... |
"""
Mapping routines to map to and from linear conductivities (what is used
internally) to other representations such as resistivities or logarithms
thereof.
Interpolation routines mapping values between different grids.
"""
# Copyright 2018-2021 The emsig community.
#
# This file is part of emg3d.
#
# Licensed under ... |
import sys, os
from readfq import readfq
from fileutil import opener
trans_revcomp = str.maketrans('ATCGatcg', 'TAGCtagc')
trans_nothing = str.maketrans('ATCGatcg', 'ATCGatcg')
import numpy as np
from multiprocessing import Pool
def find_TSD_r3e_core(FLKleft, FLKright):
verbose = 0
i1=0
i2 = 0
i_m... |
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import time
from django.core import mail
from nose.tools import eq_
import amo
import amo.tests
from amo.tests import addon_factory
from addons.models import Addon
from versions.models import Version, version_uploaded, ApplicationsVersions
from files.m... |
###############################################################################
# Name: sql.py #
# Purpose: Define SQL syntax for highlighting and other features #
# Author: <NAME> <<EMAIL>> #
# Copyright... |
###############################################################################
## SuperMem for Windows Memory Analysis v1.0
## Written by <NAME> - CrowdStrike
## Copyright 2021 CrowdStrike, Inc.
###############################################################################
import threading
import queue
import tqdm
i... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pathlib import Path
from typing import List, Optional, Union, Tuple, Set, MutableMapping, Any
import logging
import uuid
import json
from .helper import find_external_ressources, rebuild_url
from io import BytesIO
from urllib.parse import unquote_plus, urlparse, urljo... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
import torch
import builtins
import functools
import numpy as np
from onnx import onnx_pb as onnx_proto
from typing import List, Tuple, Optional, Union, Any, ContextManager, overload, Iterator, NamedTuple
from torch.types import _int, _float, _bool, Number, _dtype, _device, _qscheme, _size, _layout # noqa
from torch i... |
r"""
Asymptotic Expansions --- Miscellaneous
AUTHORS:
- <NAME> (2015)
ACKNOWLEDGEMENT:
- <NAME>, <NAME> and <NAME> are supported by the
Austrian Science Fund (FWF): P 24644-N26.
- <NAME> is supported by the Google Summer of Code 2015.
Functions, Classes and Methods
==============================
"""
#********... |
# Released under the MIT License. See LICENSE for details.
#
"""Functionality related to building python for ios, android, etc."""
from __future__ import annotations
import os
from typing import TYPE_CHECKING
from efrotools import PYVER, run, readfile, writefile, replace_one
if TYPE_CHECKING:
from typing import... |
"""
.. moduleauthor:: <NAME> <<EMAIL>>
"""
from numpy import exp, log, mean, std, sqrt, tanh, cos, cov
from numpy import array, linspace, sort, searchsorted, pi, argmax, argsort, logaddexp
from numpy.random import random
from scipy.integrate import quad, simps
from scipy.optimize import minimize, minimize_scalar, diff... |
from itertools import compress
from scipy.ndimage import correlate1d
from scipy.special._ufuncs import gamma
from skimage.util import view_as_windows
from PIL import Image
from vmaf.core.executor import NorefExecutorMixin
__copyright__ = "Copyright 2016-2018, Netflix, Inc."
__license__ = "Apache, Version 2.0"
impor... |
import copy
from collections import defaultdict
import time
import numpy as np
import scipy.sparse as sparse
import scipy.sparse.linalg
import scipy.linalg
from scipy.optimize import linprog
import pyFM.spectral as spectral
from tqdm import tqdm
from sklearn.neighbors import KDTree, NearestNeighbors
try:
import... |
# Copyright 2018 ETH Zurich
#
# 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, sof... |
import numpy as np
import SlowQuant as HFrun
import slowquant.basissets.BasisSet as BS
import slowquant.hartreefock.DIIS as DIIS
import slowquant.hartreefock.runHartreeFock as HF
from slowquant.hartreefock.HartreeFock import HartreeFock
import slowquant.molecularintegrals.runMolecularIntegrals as MI
from slow... |
import warnings
import matplotlib.pyplot as plt
from matplotlib import lines
import matplotlib.transforms as mtransforms
from matplotlib.font_manager import FontProperties
import numpy as np
import pandas as pd
import seaborn as sns
from seaborn.utils import remove_na
from .utils import raise_expected_got, assert_is_... |
#!/usr/bin/env python3
import sys
import copy
import rospy
import math
import numpy as np
import time
import open3d as o3d
import cv2
import random
import signal
from scipy.spatial.transform import Rotation as R
from pathlib import Path
import os
import argparse
#import actionlib
import geometry_msgs.msg
from geometr... |
# coding: utf-8
# pew in st-venv python ~/wm-dist-tmp/WebCrawler/webcrawler/httpbrowser.py
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
# warnings.filterwarnings("ignore", message="numpy.core.umath_tests is ... |
#############################################################
################### LEXICAL ANALYZER ######################
#############################################################
import ply.lex as lex
#tokens part
tokens = [
'NAME',
'LESSEQ',
'GREATEREQ',
'GREATER',
'LESS',
'NOTEQ',
'ASS... |
import torch
import torch.nn as nn
# two layers of GRU
class Gru_cond_layer(nn.Module):
def __init__(self, params):
super(Gru_cond_layer, self).__init__()
self.fc_Wyz0 = nn.Linear(params['m'], params['n'])
self.fc_Wyr0 = nn.Linear(params['m'], params['n'])
self.fc_Wyh0 = nn.Linear(... |
"""Visualization Module for Natural Language Processing"""
import os
import gc
import itertools
import IPython.display
from io import BytesIO
from PIL import Image
from collections import defaultdict, Counter
import datetime as datetime
import pandas as pd
import numpy as np
from tqdm import tqdm
from sklearn import ... |
import os
from flask import Flask, request, render_template, redirect, send_file, url_for
import json
import time
import random
import subprocess
import multiprocessing
from cryptography.fernet import Fernet
import paho.mqtt.publish as publish
import paho.mqtt.client as mqtt
from homewareData import readJSON, writeJSON... |
#!/usr/bin/env python3
import argparse
import os
import numpy as np
from param_stamp import get_param_stamp_from_args
import visual_plt
import main
import utils
from param_values import set_default_values
description = 'Compare CL strategies using various metrics on each scenario of permuted, split MNIST or cifar10.'... |
import configparser
import numpy as np
import os as os
import os.path as osp
from pandas import concat, DataFrame, Series, read_sql_query
###############################################################################
#Non-Standard Import
##################################################################... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
"""
import meep as mp
import numpy as np
# import h5py as h5
#import scipy as sp
from scipy import optimize as op
from scipy import interpolate as itp
from matplotlib import pyplot as plt
# from multiprocessing import Pool
# from mpl_toolkits.mplot3d import Axes3D
im... |
import numpy as np
import statsmodels.api as sm
from scipy import stats
from scipy.stats import poisson, nbinom
from numpy.testing import assert_allclose, assert_equal
from statsmodels.distributions.discrete import (
DiscretizedCount, DiscretizedModel)
from statsmodels.tools.tools import Bunch
class TestGenpo... |
#! /usr/bin/python
import os
import sys
import socket
import datetime
import pandas as pd
import numpy as np
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
import matplotlib.pyplot as plt
from matplotl... |
import six
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.views import redirect_to_login
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.core.seri... |
"""passlib.pwd -- password generation helpers"""
#=============================================================================
# imports
#=============================================================================
from __future__ import absolute_import, division, print_function, unicode_literals
# core
import codecs... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 16 21:48:23 2019
@author: mtslazarin
"""
##%% Importando bibliotecas
import pytta
from pytta.classes import _to_dict
import numpy as np
import copy as cp
import time
import pickle
import matplotlib.pyplot as plot
from os import getcwd, listdir, mk... |
# Implementation of simple BDD package
from functools import total_ordering
import sys
import resolver
class BddException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return "BDD Exception: " + str(self.value)
# Place holder to allow program to run without p... |
import scanpy as sc
import numpy as np
import scipy as sp
from statsmodels.stats.multitest import multipletests
from scipy.stats import rankdata
import pandas as pd
import time
def score_cell(data,
gene_list,
suffix='',
trs_opt='mean',
nullset_opt='random',... |
'''
function result = johansen(x,p,k)
% PURPOSE: perform Johansen cointegration tests
% -------------------------------------------------------
% USAGE: result = johansen(x,p,k)
% where: x = input matrix of time-series in levels, (nobs x m)
% p = order of time polynomial in the null-hypothesis
... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
@version: ??
@author: zzh
@file: alpha.py
@time: 2019-05-06 11:06
"""
import time
from numpy import abs
from numpy import log
from numpy import sign
from sqlalchemy import create_engine
from src.factor_util import *
class Alpha101Z26(object):
def __init__(self, ... |
import lmfit
from uncertainties import ufloat
from pycqed.analysis import measurement_analysis as ma
from collections import OrderedDict
from mpl_toolkits.axes_grid1 import make_axes_locatable
import pycqed.analysis_v2.base_analysis as ba
import numpy as np
from pycqed.analysis.tools.data_manipulation import \
popu... |
# Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import logging
import os
import time
from unittest import TestCase
import numpy as np
import pytest
import torch
import pyro
import pyro.distributions as dist
import pyro.optim as optim
from pyro.distributions.testing import fake... |
#!/usr/bin/env python3
# ~ https://dataportals.pangaea.de/bsrn/?q=LR0100
import pandas as pd
from pandas._libs.tslibs.timestamps import Timestamp
import datetime
import matplotlib.pyplot as plt
from sklearn.metrics import r2_score
from pysolar.solar import *
import numpy as np
from scipy.special import lambertw
from ... |
"""
In this module, we implement forward stepwise model selection for $K$ steps.
The main goal of this is to produce a set of linear inequality constraints satisfied by
$y$ after $K$ steps.
"""
import warnings
from copy import copy
import numpy as np
from scipy.stats import norm as ndist
# local imports
from ..c... |
"""Functions and classes for managing collision tests between multiple objects.
This module defines the :class:`WorldCollider` class, which makes it easy to
ignore various collision pairs in a WorldModel.
For groups of objects, the :meth:`self_collision_iter` and
:meth:`group_collision_iter` functions perform broad-p... |
__author__ = "<NAME>"
__copyright__ = "Copyright 2015, <NAME>"
__email__ = "<EMAIL>"
__license__ = "MIT"
import os
import shutil
import re
import stat
import time
import json
import copy
import functools
from itertools import product, chain
from collections import Iterable, namedtuple
from snakemake.exceptions import ... |
import sys
import torch
import torch.nn as nn
from torch.nn import functional as F
from PIL import Image
import numpy as np
import os
import torchvision
import imageio
from torchvision import transforms
import argparse
from attack_ops import apply_attacker
from tqdm import tqdm
from tv_utils import ImageNet,Permute
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Perform a functional test for branching."""
import os
import pytest
import orion.core.cli
from orion.core.io.evc_builder import EVCBuilder
from orion.core.worker.experiment import ExperimentView
@pytest.fixture
def init_full_x(clean_db, monkeypatch):
"""Init ori... |
# coding: utf-8
#
# Copyright 2018 <NAME>
"""
Basic module that provides the means for evaluating the B-Splines basis
functions and their derivatives. In order to simplify automatic Fortran code
generation with Pyccel, no object-oriented features are employed.
References
----------
[1] <NAME> and <NAME>. The NURBS Bo... |
import sys
import datetime
import json
import logging
import os
import random
import time
from pathlib import Path
import pandas as pd
from translation import utils
from translation.autonmt import commands
from translation.autonmt.toolkits import fairseq_entry, custom_entry
# Global vars
random.seed(123)
def prepr... |
""" Common utilities """
import time
import datetime
from math import ceil
from math import radians
from math import degrees as rad2deg
from math import cos
import random
import re
import regex
import signal
import os
import sys
from sys import exit as clean_exit
from platform import system
from platform import python_... |
"""
Bridging Composite and Real: Towards End-to-end Deep Image Matting [IJCV-2021]
Main network file (GFM).
Copyright (c) 2021, <NAME> (<EMAIL>)
Licensed under the MIT License (see LICENSE for details)
Github repo: https://github.com/JizhiziLi/GFM
Paper link (Arxiv): https://arxiv.org/abs/2010.16188
"""
import torch... |
import ply.lex as lex
reserved = {
'if' : 'IF',
'else' : 'ELSE',
'while': 'WHILE',
'int': 'INT',
'float': 'FLOAT',
'char': 'CHAR',
'void': 'VOID',
'return': 'RETURN',
'include': 'INCLUDE',
'define': 'DEFINE',
}
tokens = [
'NUMBER',
'CHARACTER',
'ST... |
################################################################################
# Copyright (c) 2017-2021, National Research Foundation (SARAO)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the License at
#
# ... |
import torch.utils.data as data
from torch.nn.utils.rnn import pad_sequence
import os
import os.path
import numpy as np
from numpy.random import randint
from ops.I3D_Pooling import I3D_Pooling
from ops.io import load_proposal_file
from ops.utils import temporal_iou
from ops.detection_metrics import segment_tio... |
import loja_funcoes_auxiliares as aux
import bcrypt as bc
def dados_registrados(arquivo_dados):
"""
Essa funcao checa se já tem o arquivo com os dados. Se não tem, cria.
Se ja tem, tenta ler os dados (dicionario).
Se o arquivo estiver vazio ou não for um dicionário, cria um dicionario vazio e ... |
# -*- coding: utf-8 -*-
import math
import matplotlib.pyplot as plt
import numpy as np
import random
import yaml
from copy import copy
from multiprocessing import Pool
from multiprocessing import Process
from pprint import pprint
from time import time
CORE = 8
class Individual(object):
'''
个体类
'''
de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.