text stringlengths 6.04k 39.5k |
|---|
# Copyright (c) 2013 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the S... |
"""This module provides ``docutils.nodes.GenericNodeVisitor`` subclasses,
which generates JSONable, 'database friendly', information about the document.
This can be used for fast-lookup of the position of elements in the document,
and to reference/target mappings.
The visitor should be run via the ``LSPTransform`` cla... |
"""
Main script that performs clustering experiments taking tweets stored on a
database as the main corpus.
"""
import argparse
import logging
import os
import time
from pathlib import Path
from typing import Callable, Dict, List
import numpy as np
from sklearn.metrics import (calinski_harabasz_score, davies_bouldin... |
import base64
import email
from email.message import Message as EmailMessage
from email.utils import formatdate, parseaddr
from email.encoders import encode_base64
import mimetypes
import os.path
from quopri import encode as encode_quopri
import sys
import uuid
from django.conf import settings
from django.core.mail.me... |
# Copyright (c) 2017 Sony Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
import numpy as np
import math
from constants import *
from utils import deg3_real_roots, intersect, get_sorting
_apply_vectorized = np.vectorize(lambda f, x: f(x), otypes=[np.dtype('float')])
class PiecewiseFunction:
def __init__(self, xs, fns):
self._xs = np.array(xs)
self._fns = np.array(fns)
... |
import math
from .modules.layers import *
from .utils import load_url, download_url
model_urls = {'mobilenetv2': {"weight": "http://file.lzhu.me/hancai/74.3/model.pth.tar",
"config": "http://file.lzhu.me/hancai/74.3/net.config"}}
class MobileInvertedResidualBlock(BasicUnit):
def __init__(self, mobile_inverted_co... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import warnings
from django.utils.text import slugify
from django.utils.lru_cache import lru_cache
from functools import partial
from django.forms import TypedChoiceField
import re
from collections import n... |
#!/usr/bin/env python
# coding:utf-8
import os
import sys
import time
import signal
import getpass
import logging
import argparse
import threading
from . import dag
from .job import *
from .config import load_config, print_config
from .qsub import myQueue, QsubError
from .sge import ParseSingal
from .version import ... |
import numpy as np
from scipy.optimize import curve_fit
import scipy.fftpack as fft
import matplotlib.pyplot as plt
np.set_printoptions(linewidth=500)
def savitzky_golay(y, window_size, order, deriv=0, rate=1):
r"""
Smooth (and optionally differentiate) data with a
Savitzky-Golay filter.
The Savi... |
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
""" propositions.exemples, pour https://github.com/Naereen/ParcourSup.py.
- Auteurs : <NAME>, <NAME> et al, (C) 2018.
- Adresse : https://github.com/Naereen/ParcourSup.py
- Licence : MIT License (http://lbesson.mit-license.org).
"""
__author__ = "<NAME>, <NA... |
import argparse
import pickle
import numpy as np
import os
import pandas as pd
import scipy.sparse as sp
import torch
from torch import nn
import torch.nn.functional as F
from scipy.sparse import linalg
from torch.autograd import Variable
from torch.utils.data.dataset import Dataset
from pygsp import graphs, filters
i... |
# Python Code implementation for Class_Reg ALGORITHM
import pandas as pd
import numpy as np
import itertools
from sklearn.model_selection import train_test_split
from models import *
from sklearn.metrics import accuracy_score,mean_squared_error
from tqdm import tqdm
import random
from sklearn.metrics import median_abs... |
import robin_stocks as r
import pytz
import datetime as dt
import re
import holidays
import numpy as np
username = ''
password = ''
login = r.login(username, password)
#rlt = r.load_account_profile()
#rlt = r.load_portfolio_profile()
#rlt = r.get_all_option_positions() #Returns all option positions ever held for the a... |
# pbmqtt.py Implement MQTT on Pyboard using an ESP8266
# The ESP8266 runs mqtt.py on startup.
# Boards are electrically connected as per the README.
# asyncio version
# On fatal error performs hardware reset on ESP8266.
# Author: <NAME>.
# Copyright <NAME> 2017-2018 Released under the MIT license.
# SynCom throughput... |
from __future__ import division
from past.utils import old_div
from proteus import FemTools as ft
from proteus import MeshTools as mt
from proteus import SplitOperator
from proteus.Archiver import ArchiveFlags
from proteus.Profiling import logEvent
from builtins import object
from proteus.TwoPhaseFlow.utils import Para... |
from __future__ import annotations
import functools
import os
from collections import defaultdict
from typing import Any, Callable, Container, Dict, Iterable, List, Optional, TYPE_CHECKING, Type, TypeVar, Union
from warnings import warn
import discord
from discord.application_commands import (
ApplicationCommand,... |
# -*- coding: iso-8859-1 -*-
"""
MIT License
Copyright (c) 2017 marrakchino (<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
... |
from __future__ import print_function
import errno
import os
import timeit
import numpy as np
from numpy.testing import assert_equal
import pytest
import nengo
from nengo.cache import DecoderCache, Fingerprint, get_fragment_size
from nengo.utils.compat import int_types
class SolverMock(object):
n_calls = {}
... |
#!/usr/bin/env python3
# import pdb;
import os, subprocess, sys, glob, datetime, time, shutil, atexit, platform, smtplib, ssl, email, re, fnmatch, copy
from email.message import EmailMessage
from universal import *
from textwrap import TextWrapper
if platform.system() == "Windows":
from windowsLocals import *
... |
from copy import copy, deepcopy
from loguru import logger
from prompt_toolkit.application.current import get_app
from prompt_toolkit.formatted_text.base import merge_formatted_text
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.layout.containers import Window
from prompt_toolkit.la... |
import src.database.build_db as db
import src.weather as weather
import src.send_email as email
import pandas as pd
from sqlalchemy import create_engine
from sqlalchemy_utils import database_exists, create_database
from dotenv import load_dotenv
import requests
import os
import pymysql
import sys
import json
import str... |
# 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... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 13 15:34:27 2020
@author: ombretta
"""
import os
import sys
if "../../" not in sys.path: sys.path.append("../../")
if "../../kinetics_i3d_pytorch/" not in sys.path: sys.path.append("../../kinetics_i3d_pytorch/")
import torch
import numpy as np
i... |
"""
(C) Copyright 2019 IBM Corp.
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
... |
from collections import OrderedDict
import copy
from itertools import zip_longest
import json
import logging
import random
import time
from BaseClasses import World, CollectionState, Item, Region, Location, Entrance, Shop
from Regions import create_regions, mark_light_world_regions
from EntranceShuffle import link_ent... |
import copy
import numpy as np
import numpy.linalg as la
from scipy.optimize import linprog # TODO: REMOVE
from _errors import ConvergenceError
# ======================================================================================================================
# Root-finding Methods
# ================... |
import numpy as np
from pyyeti import psd
from nose.tools import *
import scipy.signal as signal
def test_get_freq_oct():
assert np.allclose(
np.array(psd.get_freq_oct(1, [1, 5])),
np.array(
[
[1.0, 1.99526231, 3.98107171],
[0.70794578, 1.41253754, 2.818... |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
from poly_parser import construct_expression_tree, order_prefix, parse_function, decide_operation, InputError
from orderings import order_lex as order
from orderings import graded_lex as graded_order
from number_objects.collect_like_terms import collect_like_terms
from formulas import solve
from number_objects.primitiv... |
import torch
import models
from torch import distributions, nn
from torch.nn import functional as F
from probability import distributions_
class AEM(nn.Module):
def __init__(self, autoregressive_net, energy_net, context_dim,
n_proposal_mixture_components, proposal_component_family,
... |
import os
from .instance import Instance
from .solution import Solution
from . import tools as di
from zipfile import ZipFile
from typing import List, Union, Any
from cornflow_client import ExperimentCore
import xml.etree.ElementTree as ET
from .tools import indent
from pytups import SuperDict, TupList
from functools i... |
#!/usr/bin/python
import pygame
from pygame.locals import *
from random import *
pygame.init()
pygame.display.set_caption("Click Blocks")
screen = pygame.display.set_mode((600, 500), 0, 32)
pygame.font.init()
pygame.mixer.pre_init(44100, 32, 2, 4096)
# Fonts
font = pygame.font.get_default_font()
font_game = pygam... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 11 12:50:13 2018
@author: madcas
"""
import math
import numpy as np
import h5py
import matplotlib.pyplot as plt
import scipy
from PIL import Image
from scipy import ndimage
import tensorflow as tf
from tensorflow.python.framework import ops
from cn... |
#!/usr/bin/env python3
import os
import argparse
import time
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('clint.mpl')
from pprint import pprint
import scipy.signal as signal
import itertools
from pygama import DataSet
import pygama.utils as pu
import pygama.analysis.histograms ... |
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#
from behave import *
import sys
import json
import time
import random
import string
import subprocess
import config_util
@when(u'a user sets up a channel named "{channelId}"')
def setup_channel_impl(context, channelId):
# Be sur... |
import pygame
from general_functions import *
from random import shuffle
# From card.py
pygame.font.init()
pygame.init()
class Card:
colors = get_colors()
default_width, default_height = 70, 100 # 106, 150
def __init__(self, cost, gem_count, points=0, one_use_only=False, category=0, parent_surfa... |
import sys
import os.path
sys.path.insert(0, os.path.abspath("./simple-dnn"))
#Import the libraries we will need.
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
from tensorflow.examples.tutorials.mnist import input_data
import scipy.misc
import scipy
import scipy.io
from sklearn impo... |
# -*- coding: utf-8 -*-
"""
Created on Mon May 25 22:33:04 2020
@author: kkrao
"""
import pandas as pd
from init import dir_data, lc_dict, color_dict
import seaborn as sns
import os
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import mannwhitneyu, pearsonr
from sklearn.ensemble import RandomFo... |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 27 20:52:33 2021
@author: hsauro
"""
import tellurium as te
import roadrunner
import teUtils as tu
import numpy as np
import random
import matplotlib.pyplot as plt
import readObjData
import evalFitness
from commonTypes import TModel_
import copy, sys, os,... |
#!/usr/bin/python3
# This code originated as a project for the COMP 520 class at McGill
# University in Winter 2015. Any subsequent COMP 520 student who is
# viewing this code must follow the course rules and report any viewing
# and/or use of the code.
import sys, os, logging, argparse, cmd, posixpath
from subproces... |
import os
import random
from datetime import datetime
class IllegalMoveException(Exception):
pass
class Move:
GTP_COORD = "ABCDEFGHJKLMNOPQRSTUVWYXYZ"
PLAYERS = "BW"
SGF_COORD = [chr(i) for i in range(97, 123)]
_move_id_counter = -1
def __init__(self, player, coords=None, gtpcoords=None, sg... |
import numpy as np
import os, sys, time, shutil, tempfile
from tqdm import trange, tqdm
from urllib.request import urlopen
from urllib.parse import urlparse
import tempfile
from scipy.ndimage import median_filter
import cv2
from mxnet import gluon, nd
from mxnet.gluon import nn
import mxnet as mx
from . import trans... |
from __future__ import annotations
import numpy
import numpy as np # type: ignore
import tcod
from tcod.console import Console
import csv
import colorsys
import random
from typing import Iterable, Iterator, Optional, TYPE_CHECKING
from Entities import entity_factories
from Map import tile_types
from Entities.entit... |
import sys, os
sys.path.append(os.pardir)
import numpy as np
import datetime
import pickle
from lib.MNIST import MNIST
from lib.layers import DenseLayer, SigmoidLayer, SoftmaxCrossEntropyLayer, ReluLayer
from collections import OrderedDict
class ConvolutionLayer:
def __init__(self, W, b, padding=0, stride=1):
... |
# -*- coding: utf-8 -*-
"""
zine.importers
~~~~~~~~~~~~~~
Package for all kinds of importers. This implements the basic import
API as well as some core importers we implement as part of the software
and not as plugin.
:copyright: (c) 2010 by the Zine Team, see AUTHORS for more details.
:l... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Creates run length distribution figures for the comparison of 2 algorithms."""
from __future__ import absolute_import
import os
import numpy
import matplotlib.pyplot as plt
from bbob_pproc import toolsstats, pproc
from bbob_pproc.ppfig import saveFigure, consecutiveN... |
# Copyright 2017 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 numpy.testing import *
import numpy.core.umath as ncu
import numpy as np
import nose
from numpy import inf, nan, pi
class TestDivision(TestCase):
def test_division_int(self):
# int division should return the floor of the result, a la Python
x = np.array([5, 10, 90, 100, -5, -10, -90, -100, -12... |
import argparse
import time
import torch
from Models import get_model
from Process import *
from Utils import *
import torch.nn.functional as F
from Optim import CosineWithRestarts
from Batch import create_masks
from Beam import beam_search
from torch.autograd import Variable
import dill as pickle
from torch.utils.tens... |
# MIT License
#
# Copyright (c) 2020 Ubisoft
#
# 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, publ... |
import pytest
from helpers.cluster import ClickHouseCluster
import random
import string
import os
import time
from multiprocessing.dummy import Pool
cluster = ClickHouseCluster(__file__)
node = cluster.add_instance('node', main_configs=['configs/enable_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True)
from k... |
# 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 parlai.mturk.core.worlds import MTurkOnboardWorld
from parlai.mturk.core.agents import TIMEOUT_MESSAGE
from parlai.core.worlds import valida... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import warnings
import attr
import py
import six
import _pytest._code
from _pytest.compat import getfslineno
from _pytest.mark.structures import MarkInfo
from _pytest.mark.structures import NodeKeyw... |
"""Display useful info on an e-ink display"""
# Core packages
import re
import json
from urllib.request import urlopen
import datetime
from collections import namedtuple
from pathlib import Path
# External packages
import dateutil.parser
import dateutil.utils
from PIL import Image, ImageFont, ImageDraw
from font_hank... |
__author__ = 'CwT'
OPCODE = {0: "nop", 1: "move", 2: "move/from16", 5: "move-wide/from16", 7: "move-object", 8: "move-object/from16",
0xa: "move-result", 0xb: "move-result-wide", 0xc: "move-result-object", 0xd: "move-exception",
0xe: "return-void", 0xf: "return", 0x10: "return-wide", 0x11: "return-... |
"""
Shor's Order Finding Algorithm Benchmark - Cirq
"""
from collections import defaultdict
import math
import sys
import time
import cirq
import numpy as np
sys.path[1:1] = ["_common", "_common/cirq", "shors/_common", "quantum-fourier-transform/cirq"]
sys.path[1:1] = ["../../_common", "../../_common/cirq", "../../s... |
import numpy as np
import time
import torch
from lietorch import SE3, LieGroupParameter
from scipy.spatial.transform import Rotation as R
import cv2
import configargparse
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
from utils import *
from render_utils i... |
# -*- coding: UTF-8 -*-
import datetime
import logging
import re
import traceback
import simplejson as json
import sqlparse
from django.contrib.auth.decorators import permission_required
from django.core.exceptions import PermissionDenied
from django.db import transaction
from django.db.models import Q
from django.htt... |
# This is python script for Metashape Pro. Scripts repository: https://github.com/agisoft-llc/metashape-scripts
import Metashape
from PySide2 import QtGui, QtCore, QtWidgets
# Checking compatibility
compatible_major_version = "1.5"
found_major_version = ".".join(Metashape.app.version.split('.')[:2])
if found_major_ve... |
import cv2
import gym
import numpy as np
import torch
def ReplayBuffer(state_dim, is_atari, atari_preprocessing, batch_size, buffer_size, device):
if is_atari:
return AtariBuffer(state_dim, atari_preprocessing, batch_size, buffer_size, device)
else:
return StandardBuffer(state_dim, batch_size, buffer_size, dev... |
# -*- coding: utf-8 -*-
"""
Created 5 March 2019
epsc_peak_x.y.z.py
"""
# from __main__ import *
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import elephant
from neo.io import IgorIO
import os
from collections import OrderedDict
import math
def get_metadata(file, data_notes):
'''Takes... |
import torch
import torch.nn as nn
import torch.optim as optim
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import torchvision
import torchvision.transforms as transforms
import os
import numpy as np
import argparse
import csv
import shutil
import sys
sys.path.append("..")
import matplotlib... |
import numpy as np
from constants import *
from animation.animation import Animation
from animation.creation import ShowCreation
from animation.creation import Write
from animation.transform import ApplyFunction
from animation.transform import ApplyPointwiseFunction
from animation.creation import FadeOut
from anima... |
"""Internationalization and localization support.
This module provides internationalization (I18N) and localization (L10N)
support for your Python programs by providing an interface to the GNU gettext
message catalog library.
I18N refers to the operation by which a program is made aware of multiple
languages. L10N r... |
from __future__ import absolute_import
import collections
import inspect
import warnings
from itertools import cycle
from random import sample
import matplotlib
import numpy as np
from fcsparser import parse as parse_fcs
from pandas import DataFrame
import FlowCytometryTools.core.graph as graph
from FlowCytometryToo... |
"""Adds typed dataclasses for the "config" yaml files.
"""
from collections import OrderedDict
from dataclasses import dataclass
from enum import Enum
from pathlib import Path
from simple_parsing.helpers.serialization.serializable import SerializableMixin
from test.testutils import raises, TestSetup
from typing import ... |
'''
Module: jelephant.analysis.rate_estimation
Contains utility functions for instantaneous rate estimation of SpikeTrains.
'''
import quantities as pq
import numpy as np
import numpy
import scipy.signal
import neo
#def make_kernel(form, sigma, resolution, direction=1):
#
#
# """Creates kernel functions for convo... |
# Copyright (c) 2014 OpenStack Foundation.
# 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... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017-2020 The Project X-Ray 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
import json
import io
import os
impor... |
import base64
from contextlib import closing
import gzip
from http.server import BaseHTTPRequestHandler
import os
import socket
from socketserver import ThreadingMixIn
import sys
import threading
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
from urllib.error import HTTPError
from urllib.parse... |
'''
Contains Field class and field related routines.
Note: g2g functionality was moved to gridtile.py due to dependence on f2py.
pca method is moved to pca.py module due to dependence on f2py.
'''
import scipy as sp
from scipy import interpolate
import matplotlib.pyplot as pl
from matplotlib import dates, mlab
... |
"""Create OpenEye fingerprints
"""
# Copyright (c) 2010 <NAME> Scientific, AB (Gothenburg, Sweden)
# Licensed under "the MIT license"
# See the contents of COPYING or "__init__.py" for full license details.
from __future__ import absolute_import
import sys
import os
import errno
import ctypes
import warnings
impor... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
import struct
import binascii
import logging
from gzip import GzipFile
from time import time
from collections import defaultdict
from itertools import cycle, count
from io import BytesIO
import gevent
import gevent.socket as socket
from random import shuffle
from steam.steamid import SteamID
from steam.enums import ... |
"""This is Gratipay's payday algorithm.
Exchanges (moving money between Gratipay and the outside world) and transfers
(moving money amongst Gratipay users) happen within an isolated event called
payday. This event has duration (it's not punctiliar).
Payday is designed to be crash-resistant. Everything that can be rol... |
"""
A catch-all module for miscellaneous pmf-based operations.
Eventually, we will need to reorganize.
"""
import dit
from ..exceptions import ditException
import numpy as np
__all__ = (
'convex_combination',
'downsample',
'jittered',
'perturb_support',
'replace_zeros',
)
def perturb_support(p... |
# -*- coding: utf-8 -*-
# =============================================================================
# Global Sensitivity Analysis (GSA) functions and class for the Delta
# Moment-Independent measure based on Monte Carlo simulation LCA results.
# see: https://salib.readthedocs.io/en/latest/api.html#delta-moment-ind... |
#!/usr/bin/env python
"""Minimum Variance Analysis and boundary normal crd tools"""
from __future__ import print_function, division
import os
import numpy as np
import viscid
__all__ = ["paraboloid", "paraboloid_normal", "fit_paraboloid",
"get_mp_info", "find_mp_edges"]
_dtf = 'f8'
_paraboloid_dt = np.d... |
####
####
##
## Project PairsDB
##
## Copyright (C) 2002 <NAME> All rights reserved
##
## Author: <NAME> <<EMAIL>>
##
## $Id: Nrdb.py,v 1.1.1.1 2002/07/02 10:46:57 heger Exp $
##
##
####
####
USAGE="""python blat2adda.py [OPTIONS] > output
map blat output onto domains
"""
import sys, re, string, optparse, time, os, ... |
"""Copyright 2008 Orbitz WorldWide
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... |
'''
BARER_share
@author:
<NAME>
@ created:
30/3/2021
@references:
'''
import os
import numpy as np
import tensorflow.compat.v1 as tf
import dill as pickle
import time
import matplotlib.pyplot as plt
import BARER_nonshare
from tensorflow.python import debug as tf_debug
from tqdm import tqdm
dataset_name = "toys"
tf... |
# with Gaze ------------------
import bpy
import numpy as np
from itertools import repeat
import random
import os
import sys
from sympy.geometry import Point
from numpy import cos, sin
from math import radians
import mathutils
from bpy import context
"""
Render the images, Depth and capture the metadata
Sce... |
"""Various utility functions to use throughout the project."""
import collections
import copy
import sys
import functools
import heapq
import os
import io
import numpy as np
import tensorflow as tf
import tensorflow_addons as tfa
from tensorflow.python.training.tracking import graph_view
def get_devices(count=1, f... |
import pytest
import numpy as np
from numpy.testing import assert_allclose
from sklearn.compose import ColumnTransformer
from sklearn.datasets import load_diabetes
from sklearn.datasets import load_iris
from sklearn.datasets import make_classification
from sklearn.datasets import make_regression
from sklearn.dummy im... |
from quart import Quart, request, jsonify, abort, redirect, url_for
from collections import Counter
from functools import reduce
from keras import models
from sklearn.preprocessing import LabelEncoder
import asyncio
import base64
import gc
import hashlib
import httpx
import io
import itsdangerous
import json
import num... |
#
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... |
from statsmodels.compat.python import iterkeys
from statsmodels.regression.linear_model import GLS
import numpy as np
from statsmodels.base.model import LikelihoodModelResults
from scipy import sparse
# http://www.irisa.fr/aladin/wg-statlin/WORKSHOPS/RENNES02/SLIDES/Foschi.pdf
__all__ = ['SUR', 'Sem2SLS']
#probably... |
from collections import defaultdict
import logging
from typing import Any, Dict, List, Tuple, Type
from eth.vm.forks.constantinople.transactions import ConstantinopleTransaction
from eth_abi import decode_abi
from eth_abi.exceptions import InsufficientDataBytes
import fastjsonschema
from flask import Blueprint
from fl... |
import numpy as np
import torch
import gym
import time
import os
import json
from copy import deepcopy
from functools import partial
from mrl.import_all import *
from mrl.configs.make_continuous_agents import *
from mrl.utils.misc import batch_block_diag
from envs.customfetch.custom_fetch import DisentangledFetchPush... |
import numpy as np
import matplotlib.pyplot as plt
#%%# WAVES ####################################################################
def complex_to_polar(x):
return np.angle(x), np.abs(x)
def sines(freqs, plot=False, N=120):
freqs = freqs if isinstance(freqs, (list, np.ndarray, tuple)) else [freqs]
theta = ... |
from django.shortcuts import render
from django.http import HttpResponse
from django.core.files.storage import FileSystemStorage
import docx2txt,re,docx,minecart
import spacy,io
import re
import docx
import csv
from docx.opc.constants import RELATIONSHIP_TYPE as RT
import tabula
from tika import parser
from collection... |
# -*- coding: utf-8 -*-
# Copyright 2013 Fanficdownloader team, 2020 FanFicFare 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
#
# Un... |
import os
import json
import numpy as np
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
import constants
from timeit import default_timer as timer
from datetime import timedelta
from utils import augment_node_data, augment_edge_data,\
read_nodes_file, read_edges_file... |
"""Model training interface."""
import torch
import torch as th
from torch.distributions import Beta
from torch.nn import functional as F
import ttools
from ttools.modules import image_operators as imops
from ool.metrics import align_masks_iou, dices, ari, ari2
from experiments.framework.vis_mixin import SpatialVisMix... |
#!/usr/bin/env python
import sys, os
import pickle
import time
sys.path.append(r'../alicptfts')
sys.path.append(r'./alicptfts')
from cmd import Cmd
from re import match
import socket
from io import StringIO
from functools import wraps
import argparse
import threading
from alicptfts import AlicptFTS, FTSState
if ( ... |
"""Dynamic holoviews-based waveform display
Note imports are inside function, to keep 'import straxen'
free of holoviews.
"""
import numpy as np
import pandas as pd
import straxen
straxen._BOKEH_X_RANGE = None
@straxen.mini_analysis(requires=['hitlets_nv', 'events_nv', 'event_positions_nv'])
def plot_nveto_event_d... |
import os
import shutil
import logging
import mdtraj.utils
from distutils.spawn import find_executable
import parmed
# If ParmEd is older than 2.0.4 then halt - newer ParmEd is required to have correct FudgeLJ/FudgeQQ retained in GROMACS topologies.
# Ensure ParmEd is sufficiently recent
# TODO: Instead, check if the ... |
"""Test CZT package.
To run:
pytest test_czt.py -v
To run (with coverage):
pytest --cov . --cov-report html test_czt.py
"""
import numpy as np
import matplotlib.pyplot as plt
import pytest
import scipy
import czt
def test_compare_different_czt_methods(debug=False):
print("Compare different CZT calc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.