text stringlengths 6.04k 39.5k |
|---|
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import numpy as np
import matplotlib
matplotlib.use('Agg')
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['svg.fonttype'] = 'none'
from deeptools import cm # noqa: F401
import matplotlib.pyplot as plt
import plotly.offline as py
... |
# Copyright 2013 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 requ... |
'''
script with some of the firefly dependencies
'''
import numpy as np
from scipy.stats import chi2
def hpf(flux, windowsize=0, w_start=0):
''' What does this one do ? High pass filtering ?
'''
D = np.size(flux)
w = w_start
f = flux
# Rita's typical inputs for SDSS:
# w = 10 # 10
... |
# Copyright 2019 The TensorNetwork 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 applicable law or agreed ... |
from itertools import chain
import numpy as np
try: # pragma: no cover
import aesara.scalar as aes
import aesara.tensor as at
from aesara.compile import optdb
from aesara.graph.basic import Variable, graph_inputs
from aesara.graph.fg import FunctionGraph
from aesara.graph.op import get_test_v... |
"""
Utilities to generate embedded C code from OSQP sources
"""
# Compatibility with Python 2
from __future__ import print_function
from builtins import range
# Path of osqp module
import os.path
import osqp
files_to_generate_path = os.path.join(osqp.__path__[0],
'codegen', 'files... |
import logging
import asyncio
import threading
import json
import requests
import time
import urllib
from datetime import datetime
from typing import List
from typing import Dict
from typing import Set
from typing import Union
from collections.abc import Iterable
import websockets
from .td_oauth import silent_sso, r... |
import copy
import re
import struct
import numpy as np
from .exceptions import MeshDecodeError
from .lib import yellow, Vec
NOTICE = {
'vertices': 0,
'num_vertices': 0,
'faces': 0,
}
def deprecation_notice(key):
if NOTICE[key] < 1:
print(yellow("""
Deprecation Notice: Meshes, formerly dicts, are now P... |
"""
Heka Patchmaster .dat file reader
Structure definitions adapted from StimFit hekalib.cpp
Brief example::
# Load a .dat file
bundle = Bundle(file_name)
# Select a trace
trace = bundle.pul[group_ind][series_ind][sweep_ind][trace_ind]
# Print meta-data for this trace
print(trace)
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import collections
import json
import os
import shlex
from collections import defaultdict
from contextlib import contextmanager
from copy import deepcopy
from pathlib import Path
import click
from cached_property import cached_property
from clk.click_helpers import click... |
"""
Slightly modified versions of https://github.com/Acurisu/NieR-Replicant-ver.1.22474487139/blob/main/Editor/src/Nier.ts
+ code used to translate them into the content in structs.
"""
import logging
import re
from typing import Union
log = logging.getLogger(__name__)
Recovery = {
"Medicinal Herb": "uint8",
... |
import requests
import json
import logging
import time
logger = logging.Logger('catch_all')
logging.basicConfig(level=logging.INFO)
class NotAvailableOrderBook(object):
pass
def rx_lower(coin):
return coin.lower() if coin != 'AAVE' else 'AAVE'
def str2float(str_val):
return float(str_val.replace(','... |
import json
from collections import OrderedDict
from bagit import *
from bagit import _, _can_read, _can_bag, _make_tag_file, _make_tagmanifest_file, _encode_filename, _decode_filename, \
_calc_hashes
from bdbag import escape_url_path, VERSION, BAGIT_VERSION, PROJECT_URL
LOGGER = logging.getLogger(__name__)
def ... |
# -*- coding: UTF-8 -*-
# Copyright (c) 2019 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
#
... |
import operator
from tqdm import tqdm
import matplotlib.pyplot as plt
from src.easy_vasp.wannier90 import *
from src.easy_vasp.wannier_tools import *
from sys import platform
class Poscar:
"""
Used for easy manipulation of a POSCAR file.
Easily change any field in the file and save it as a valid POSCAR fi... |
#!/usr/bin/env python3
# Copyright (c) 2020 Leedehai. All rights reserved.
# Use of this source code is governed under the MIT LICENSE.txt file.
# -----
# For more information, see README.md.
# For help: use '--help' and '--docs'.
import sys
py = sys.version_info
if py.major == 2 or (py.major == 3 and py.minor < 7):
... |
import sys
import os
import copy
import random
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import configparser
import functools
hnumlr = range(0, 12)
missionlr = range(0, 5)
mcharr = range(0, 3)
mnumlr = range(0, 5)
config = configparser.ConfigParser()
if not os.path.exists('... |
import re
import sys
import json
from collections import Counter, defaultdict
from statistics import median
from dee.event_types import get_event_template
def load_line_json_iterator(filepath):
with open(filepath, "rt", encoding="utf-8") as fin:
for line in fin:
d = json.loads(line.strip())
... |
# Copyright 2020- Robot Framework Foundation
#
# 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... |
"""
@package mi.instrument.wetlabs.fluorometer.flord_d.test.test_driver
@file marine-integrations/mi/instrument/wetlabs/fluorometer/flort_d/driver.py
@author <NAME>
@brief Test cases for flord_d driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/test_driver
$ bin/test_driver -u ... |
"""
oracle.py: 5-day task marathon oracle script
This file contains a simple Flask app which will serve as an "oracle" to a
series of activities, which have to be chained one by one.
Ideally, one challenge per day will be completed.
The previous day's challenge will yield the key and endpoint to the next
day's chall... |
import os, time
from pdkb.test.utils import read_file, write_file, run_command, parse_output_ipc
from pdkb.rml import parse_rml, Literal
from pdkb.kd45 import PDKB, project
from pdkb.actions import Action
from pdkb.pddl.grounder import GroundProblem
import pdkb
def parse_ma_cond(dcond):
pos_der_cond = []
n... |
# -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... |
# -*- coding: utf-8 -*-
import sys
import gc
import contextlib
from socket import socket
from json import JSONDecodeError
from functools import wraps
import asyncio
from typing import ( # noqa
TYPE_CHECKING,
Any,
Callable,
Iterator,
List,
Optional,
Type,
Union,
)
import httpx
import w... |
# -*- coding: utf-8 -*-
from __future__ import annotations
from datetime import datetime
from json import loads
from time import sleep
from typing import Optional
import click
from pioreactor import config
from pioreactor import error_codes
from pioreactor import utils
from pioreactor import version
from pioreactor ... |
"""
Measures the taskspace tracking error for aslip policies individually for each speed the policy accepts
"""
import os, sys, argparse
sys.path.append("../..")
from cassie.trajectory import get_ref_aslip_global_state_no_drift_correct
from cassie import CassieEnv, CassiePlayground
from rl.policies.actor import Gaus... |
import numpy as np
import torch
from torch import nn as nn
import torch.nn.functional as F
import rlkit.torch.pytorch_util as ptu
from rlkit.torch.core import np_ify
from scipy.stats import multivariate_normal as normal
def _product_of_gaussians(mus, sigmas_squared):
'''
compute mu, sigma of product of gaus... |
from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from .forms import UserRegisterForm, AdditionalPoliceDetailsForm, SightingsForm, VictimDetailsForm
from django.contrib import messages
import time
from django.apps import apps
fro... |
r"""
Module containing the `~halotools.mock_observables.alignments.gi_minus_3d` function used to
calculate the projected gravitational shear-intrinsic ellipticity (GI) correlation
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from math import pi, gamma
from... |
"""
mod:`views` Views for Discovery App
"""
__author__ = "<NAME>"
import json
import os
import random
import bibframe.models
from django.shortcuts import render
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.contrib.syndication.views import Feed
from aristotle.settings import INSTITU... |
"""
Implementation of the decoder proposed in paper [1].
References
----------
1. "`Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. \
<https://arxiv.org/abs/1502.03044>`_" <NAME>, et al. ICML 2015.
"""
from typing import Tuple, Dict
import torch
from torch import nn
import torchvisio... |
# Package used for this project
import argparse
import logging
import os
import os.path as osp
import random
import shutil
import sys
import time
from collections import Counter
import matplotlib
import numpy as np
import sklearn.metrics as evaluator
from nltk.corpus import stopwords
from nltk.stem impo... |
from PIL import Image
from math import floor, log2
import numpy as np
import time
from functools import partial
from random import random
import os
from tensorflow.keras.layers import *
from tensorflow.keras.models import *
from tensorflow.keras.optimizers import *
import tensorflow as tf
import tensorflow.keras.backe... |
import copy
import glob
# import os
import time
from collections import deque
import ast
import argparse
import logging
import os
import sys
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
sys.path.append(os.path.join(os.path.dirname(__file__... |
import os
import pandas as pd
import numpy as np
import soundfile as sf
from tqdm import tqdm
import resampy
import librosa
import math, random
from IPython.display import Audio
import glob
from sklearn.preprocessing import label_binarize
from sklearn.utils import shuffle
import torch
from torch.utils.data import Data... |
"""
@package mi.dataset.driver.mflm.phsen.test.test_driver
@file marine-integrations/mi/dataset/driver/mflm/phsen/driver.py
@author <NAME>
@brief Test cases for mflm_phsen driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/dsa/test_driver
$ bin/dsa/test_driver -i [-t testname]
... |
# coding=utf-8
from __future__ import absolute_import, division, print_function
import logging
import argparse
import os
import random
import numpy as np
from datetime import timedelta
import torch
from torchvision import models
import torch.distributed as dist
from tqdm import tqdm
from torch.utils.tensorboard imp... |
r"""
Quantum computation with neutral atoms
======================================
.. meta::
:property="og:description": Neutral atom quantum devices allow you to place
qubits within interesting three-dimensional configurations.
:property="og:image": https://pennylane.ai/qml/_images/pasqal_thumb... |
from __future__ import absolute_import
import json
import os
from datetime import datetime, timedelta
import pytest
from app import db
from app.models import (
DATETIME_FORMAT, Framework, User, Lot, Brief, Supplier, ContactInformation, Service, BriefClarificationQuestion
)
from app.models.direct_award import Dir... |
"""
pipe_base.py
Unify DriverTask and PipeTask with one abstract base class.
"""
# Using print as a function makes it easier to switch between printing
# during development and using logging.{debug, info, ...} in production.
from __future__ import print_function
from abc import ABCMeta, abstractmethod
import os
imp... |
#! /usr/bin/python
# entrypoint.py
#
# This source file is part of the FoundationDB open source project
#
# Copyright 2018-2019 Apple Inc. and the FoundationDB project authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... |
#
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
import transformers
from transformers import T5ForConditionalGeneration, T5Tokenizer
import argparse
import torch
import os
from tqdm import tqdm
import json
import argparse
import pandas as pd
def get_text(template, input_text_tuple, label, tokenizer, mapping):
def enc(text):
return tokenizer.encode(text,... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... |
# Copyright 2019 Deepmind Technologies Limited.
#
# 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 agr... |
#! /usr/bin/env python
from __future__ import print_function
import argparse
import copy
import os
import subprocess
import sys
import uuid
import yaml
from github import Github, GithubException, UnknownObjectException
_PY3 = sys.version_info[0] >= 3
if _PY3:
from urllib.parse import urlparse
from urllib.re... |
"""
Acessório importantissímo para gerar os gráfico
no console de tal biblioteca. Na verdade o potencial
de reutilização de tal biblioteca é o máximo possível.
"""
# bibliotecas:
import os, sys, copy
class Ponto:
"""
objeto tipo coordenada para cuidar bem dos
pontos do programa, ao decorrer do programa,
... |
# basic library
import os
import shutil
import math
import time
import menpo.io as mio
import menpo3d.io as m3io
import numpy as np
import h5py
import pandas as pd
import datetime
from menpo.shape import ColouredTriMesh, PointCloud
from menpo.image import Image
from menpo.transform import Homogeneous
from menpo3d.rast... |
import numpy as np
import pandas as pd
import torch
from lenstronomy.Sampling.parameters import Param
import baobab.sim_utils.metadata_utils as metadata_utils
import h0rton.losses
__all__ = ['get_lens_kwargs', 'get_ps_kwargs', 'get_ps_kwargs_src_plane', 'get_light_kwargs', 'get_special_kwargs', 'postprocess_mcmc_chain... |
from contextlib import contextmanager
import functools
import inspect
import os
import sys
import warnings
import re
import matplotlib as mpl
#from matplotlib.cbook import dedent
import six
from legacycontour.contourset import LegacyContourSet
# Get the version from the _version.py versioneer file. For a git checkou... |
import types
from typing import List, Tuple, Callable, Union
import numpy as np
from mltk.utils.python import forward_method_kwargs, prepend_exception_msg
from mltk.utils.process_pool_manager import ProcessPoolManager
from mltk.core.utils import (convert_y_to_labels, get_mltk_logger)
from .data_generator_dataset_m... |
#===============================================================================================================
# binning for one variable ------------------------------------------------------------#
def latlonbin(invar,lat,lon,bounds,binwidth = 0.25):
import numpy as np
import pandas as pd
# create... |
#!/usr/bin/python
#coding:utf-8
import os, time, pickle, random, time
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1,2,3"
from datetime import datetime
import numpy as np
from time import localtime, strftime
import logging, scipy
import tensorflow as tf
import tensorlayer as tl
from model_gan import GAN_g1, GAN_g2, GAN_g, ... |
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
from typing import TYPE_CHECKING, Dict, List, NamedTuple, Set, Union
import astroid.bases
from as... |
# standard modules
import ast
import copy
import logging
import os
import sys
import time
# 3rd party modules
import numpy
import xlrd
# PFP modules
import constants as c
import meteorologicalfunctions as pfp_mf
import pfp_ck
import pfp_gf
import pfp_gfALT
import pfp_gfMDS
import pfp_gfSOLO
import pfp_io
import pfp_rp
... |
import sys, math, random, copy
from typing import Union, Callable, Optional, List
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.fft as fft
from torch.utils.data import TensorDataset, DataLoader, Dataset
import numpy as np
from einops import rearrange, repeat, reduce
from models.enco... |
# -*- coding: utf-8 -*-
"""
Created on Jan. 31 2019
@author: dongxucz (<EMAIL>)
Discription:
This module is the real work horse of the backend, a.k.a., the command
executor.
First, all available commands supported by the device should be defined in
the dict named 'CommandSet'. The element's struct... |
import sys
import twitter
import sqlite3
import time
def oauth_login():
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
OAUTH_TOKEN = ''
OAUTH_TOKEN_SECRET = ''
auth = twitter.oauth.OAuth(OAUTH_TOKEN, OAUTH_TOKEN_SECRET,
CONSUMER_KEY, CONSUMER_SECRET)
twitter_api = twitt... |
# The shape of the input dataset is as follows:
# (points, channels, shots, wavelengths, pump states)
#
# The shape of the output dataset is as follows:
# (points, shots, wavelengths)
#
import click
import numpy as np
import json
from dataclasses import dataclass
from itertools import product
from typing import List
fr... |
import pytest
import logging
import contextlib
import os
from appdaemontestframework import automation_fixture
from apps.media_lights_sync.media_lights_sync import MediaLightsSync, PICTURE_ATTRIBUTES
from PIL import Image
test_light_1_base_state = {'brightness': 50, 'rgb_color': [123, 123, 123]}
rgb_images = [
"... |
# MIT License
# Copyright (c) 2020 FT Autonomous Team One
# 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,... |
import sys
sys.path.append("..")
from metric import mean_reciprocal_rank, mean_average_precision
import argparse
import glob
import json
import logging
import logging.handlers
import os
import random
import numpy as np
import torch
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorData... |
# ----------------------------------------------------------------------
# Liftbridge client
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Python mod... |
"""Module responsible to parse Exif information from a image"""
import math
import datetime
import os
from enum import Enum
from typing import Optional, Dict, List, Tuple, Any, Type
# third party
import exifread
import imagesize
import piexif
from exifread.classes import IfdTag, Ratio
from common.models import PhotoMe... |
"""
Copyright (c) 2017 <NAME>. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
@author: eshook (<NAME>, <EMAIL>)
@contributors: (<NAME>, <EMAIL>; <NAME>, <EMAIL>)
@contributors: <Contribute and add your name here!>
"""
from ..bobs.Bob import *
from... |
import os
import pyautogui
import keyboard
from PIL import Image
from time import sleep
from threading import Thread
from ini_parser import Parameters as Pm
# quadro no paint
# -> x=434 y=315------------------ <- x=1273 y=315
# | |
# | CANVAS |
# | ... |
"""
model
-----
Program to make classifiers from input corpus and selected keyword field.
Author: <NAME>
Contact: <EMAIL>
Classes to support document classification.
"""
from collections import Counter
import logging
from multiprocessing import cpu_count
import json
from typing import Dict
from tqdm import tqdm
imp... |
################################################################################
#
# config.py (c) <NAME>
# University of Chicago
# <EMAIL>
#
# Read in and define all of the parameters for voigt profile based on a
# config file; see ./scripts/bvp_write_config.py for producing config file.
# or exampl... |
import random
import requests
from typing import List, Dict
from django.utils.dateparse import parse_datetime
import xml.etree.ElementTree as ET
from data_refinery_common.job_lookup import ProcessorPipeline, Downloaders
from data_refinery_common.logging import get_and_configure_logger
from data_refinery_common.models... |
import operator
import os
import pickle
import re
import sys
import numpy as np
import pandas as pd
import collections
# TODO @Future: Vocab class with methods get_idx(word) / get_word(idx); same for Entity; make constants fields of classes
UNKNOWN_WORD_IDX = 0
UNKNOWN = "unknown_word"
MAIN_ENTITIES = [59, 183, 335,... |
import random
import string
import math
from math import exp
from math import log
from math import pow
from math import sqrt
from scipy.stats import norm
import DBConnection as dbc
class Agent:
"""
Trader, manages positions
"""
def __init__(self, original_threshold=0.01, agent_mode='long'):
... |
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2008, <NAME> <<EMAIL>>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice, this... |
import numpy as np
import imageio
import os
import cv2
import json
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def load_image(img_dir, normalize=True, downsample_factor=1.0):
img = imageio.imread(img_dir)
if downsample_factor != 1.0:
img = cv2.resize(img, None, fx=downsam... |
from __future__ import unicode_literals
import re
import subprocess
from itertools import chain
from os import path
from os.path import sep
from sys import platform as sys_platform
import pytest
import requirements
from trains_agent.commands.worker import Worker
from trains_agent.helper.package.pytorch import Pytorc... |
#!/usr/bin/python3
import unittest
import numpy as np
class Node():
""" A lattice element.
:ivar key: the key value
:ivar north: reference to the node to the north
:ivar south: reference to the node to the south
:ivar east: reference to the node to the east
:ivar west: reference to the node to the west
... |
#!/usr/bin/python3
import time
import os
import subprocess
import random
import time
import glob
import itertools
import carla
import numpy as np
import cv2
import argparse
import yaml
import logging
from common import *
class Configuration:
def __init__(self, client, id, path, scale, resolution, duration, panor... |
import logging
import uuid
import os
import pkg_resources
from datetime import datetime
from rdflib import Graph, Literal, RDF, URIRef, Namespace
from rdflib.namespace import RDFS, XSD, DC, DCTERMS, VOID
from SPARQLWrapper import SPARQLWrapper, POST, JSON
# Importing the data/openpredict-metadata.ttl RDF file to be us... |
import warnings
from itertools import product
from typing import Tuple
import numpy as np
from scipy.ndimage.filters import gaussian_filter
from skimage import img_as_float32, img_as_uint
from starfish import Codebook, ImageStack, IntensityTable
from starfish.core.image.Filter.white_tophat import WhiteTophat
from sta... |
"""
domonic.html
====================================
Generate HTML using python.
"""
from domonic.webapi.url import URL
from domonic.dom import Node, Element, Document, DocumentType, Comment, Text
from domonic.dom import (
HTMLElement,
HTMLAnchorElement,
HTMLAreaElement,
HTMLAudioElement... |
from tensorflow import keras
from tensorflow.keras import layers
import tensorflow as tf
from tensorflow.keras.layers import Conv2D, BatchNormalization, Activation, MaxPooling2D, UpSampling2D, concatenate, Input, Dropout, Conv2DTranspose
def build_model(input_layer, start_neurons):
conv1 = Conv2D(start_neurons * ... |
# -*- coding: latin-1 -*-
"""
Hydrogen Models
---------------
Hydrogen in HII regions is typically assumed to follow Case B recombination
theory.
The values for the Case B recombination coefficients are given by `Hummer &
Storey (1987)
<http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1987MNRAS.224..801H&db_ke... |
from __future__ import print_function
from __future__ import division
from collections import OrderedDict
import shutil
import gc
import numpy as np
from scipy.optimize import linear_sum_assignment, bisect
from scipy.sparse.linalg import svds
from sklearn.utils.extmath import randomized_svd
import torch
import torch.... |
import os
import torch
from torch import nn, optim
import numpy as np
from copy import deepcopy
# from pyprind import ProgBar
from utils import ProgBar
class Embedding_NN(nn.Module):
"""
simple Embedding_NN with dropout regularization
"""
def __init__(self, dim_in, hidden, dim_out, embedding_dim, num... |
"""
Library Features:
Name: drv_model_griso_generic
Author(s): <NAME> (<EMAIL>)
<NAME> (<EMAIL>)
Date: '20211026'
Version: '2.0.0'
"""
# -------------------------------------------------------------------------------------
# -------------------------------------------------... |
# loss function library.
# author: ynie
# date: Feb, 2020
import torch
import torch.nn as nn
import torch.nn.functional as F
from configs.data_config import cls_reg_ratio
from external.pyTorchChamferDistance.chamfer_distance import ChamferDistance
from models.registers import LOSSES
from net_utils.libs import get_layou... |
import itertools
import operator
from abc import ABC
# TODO: symbolic formatting: __add__ -> "+"
BINARY_LEVELS = {
"__add__": 2,
"__sub__": 2,
"__mul__": 1,
"__matmul__": 1,
"__truediv__": 1,
"__floordiv__": 1,
"__mod__": 1,
"__divmod__": 1,
"... |
"""
nitrogen.basis
--------------
Basis set functions including discrete-variable
representations (DVRs) and finite-basis representations
(FBRs). The main objects are the :class:`GriddedBasis` class
and its sub-classes :class:`GenericDVR` and :class:`NDBasis`.
See :doc:`tutorials/dvr` for a tutorial.
==============... |
#!/usr/bin/env python
from datetime import datetime, timedelta
import numpy as np
import time
from opendrift.readers import reader_basemap_landmask
from opendrift.readers import reader_ROMS_native
from opendrift.readers import reader_netCDF_CF_generic
from kelp.kelpClass_v2 import KelpDrift
import os
from netCDF4 imp... |
import os
import json
import zipfile
import hashlib
import requests
from zipfile import ZipFile
from io import BytesIO
class pycritsFetchError(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return self.message
class pycrits(object):
_API_VERSION ... |
# -*- coding: utf-8 -*-
import numpy as np
def generate_traindata_for_train(traindata_all, traindata_label, input_size, label_size, batch_size,
Setting02_AngualrViews, boolmask_img4, boolmask_img6, boolmask_img15):
"""
input: traindata_all (16x512x512x9x9x3) uint8
... |
# mypy: ignore-errors
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2020-present MagicStack Inc. and the EdgeDB 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 ... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import networkx as nx
import numpy as np
import pandas as pd
from scipy.stats import mstats
from statsmodels.stats.multitest import fdrcorrection
import obo
from DataOrganization import DataOrganization
def create_gml(O, G, GML_file='results/figure3/induced_... |
#!/usr/bin/env python3
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
# from requests_ntlm import HTTPNtlmAuth
import dateutil
import argparse, attr, backoff, datetime, itertools, json, os, pytz, requests, sys, time, urllib
import singer
from singer import utils
from singer.catalog import Catalog
import sin... |
import argparse
import os
import signal
import collections
import archinfo
import sys
import yaml
import gc
from .models import configure_models
from . import globs
from . import nvic
from . import interrupt_triggers
from .tracing import trace_bbs, trace_mem, snapshot, trace_ids
from .exit import do_exit
from . import ... |
import sys
from functools import partial
from AnyQt.QtWidgets import QWidget, QGridLayout
from AnyQt.QtCore import Qt, QSortFilterProxyModel, QItemSelection, QItemSelectionModel
from Orange.util import deprecated
from Orange.widgets import gui, widget
from Orange.widgets.data.contexthandlers import SelectAttributesDo... |
from __future__ import print_function
from subprocess import check_output
import argparse
import os
import re
import shlex
import memoize
from sgfs import SGFS
import pymel.core as pm
from ..abc.link import link, unlink
def dummy_progress(value=None, label=None, minimum=None, maximum=None):
pass
def discover... |
# 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 the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
import datetime
import decimal
from unittest import mock
from django.core.cache import cache
from django.test import TestCase
from django.utils.timezone import now as tz_now
from elasticsearch_dsl.response import AggResponse, Hit, HitMeta, Response
from elasticsearch_dsl.search import Search
from elasticsearch_django... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.