text stringlengths 957 885k |
|---|
""" Module providing unit-testing for `~halotools.utils.value_added_halo_table_functions`.
"""
from __future__ import (absolute_import, division, print_function)
from copy import deepcopy
from collections import Counter
import numpy as np
import pytest
from astropy.extern.six.moves import xrange as range
from ..v... |
import logging
from typing import Callable, Union
from tags_model import (TagCategory, TagCategoryBase, TagCategoryBaseItem, TagItem)
tag_configuration: list[TagCategoryBase] = list()
def load_tag_configuration(config_file_name: str) -> None:
with open(config_file_name, mode='r', encoding='utf-8-sig') as f:
... |
<filename>pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/tests/lldp_output.py
'''LLDP Genie Ops Object Outputs for IOSXR.'''
class LldpOutput(object):
ShowLldp = {
"hello_timer": 30,
"enabled": True,
"hold_timer": 120,
"status": "active",
"reinit_delay": 2
}
ShowL... |
<gh_stars>1-10
"""secp256k1 elliptic curve cryptography interface."""
# The process for using SECP256k1 is complex and more involved than ED25519.
#
# See https://xrpl.org/cryptographic-keys.html#secp256k1-key-derivation
# for an overview of the algorithm.
from __future__ import annotations
from hashlib import sha256
... |
# Copyright 2020 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 matplotlib import pyplot as plt
from matplotlib.patches import Polygon
import seaborn as sns
from utils import *
from analysis import *
from SpikeVidUtils import *
def tidy_axis(ax, top=False, right=False, left=False, bottom=False):
ax.spines['top'].set_visible(top)
ax.spines['right'].set_visible(right)
... |
#! /usr/bin/env python3
import sys
import pickle
import argparse
import numpy as np
import pandas as pd
import scipy.stats as stats
def like_calc(X, y_test, unc):
"""
Given a simulated entry with uncertainty and a test entry, calculates the
likelihood that they are the same.
Parameters
-----... |
#!/usr/bin/env python
""" cmddocs Class """
import os
import cmd
import sys
import signal
import configparser
import git
import pkg_resources
from cmddocs.articles import *
from cmddocs.completions import *
from cmddocs.version import __version__
class Cmddocs(cmd.Cmd):
""" Basic commandline interface class """
... |
<filename>sdk/loadtestservice/azure-mgmt-loadtestservice/azure/mgmt/loadtestservice/models/_models_py3.py<gh_stars>1000+
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.t... |
# Copyright 2011 OpenStack 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 ... |
#!/usr/bin/python
'''
Example of inverse kinematics using the simple gradient descent method
'''
from riglib.bmi import robot_arms
import imp
imp.reload(robot_arms)
import numpy as np
import matplotlib.pyplot as plt
import time
from riglib.stereo_opengl import ik
import cProfile
pi = np.pi
q = np.array([0, 90, 0, 0,... |
<filename>mailchimp_marketing_asyncio/models/rss_options1.py
# coding: utf-8
"""
Mailchimp Marketing API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 3.0.74
Contact: <EMAIL>
Generated by: https://github.c... |
# Copyright (c) 2009-2010 Six Apart Ltd.
# 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 list of conditions an... |
import tensorflow as tf
from utils import FLAT_COLOR_DIMS, COLOR_DIMS
IMAGE_SIZE = 416
# TODO(indutny): there is no reason to not calculate grid_size automatically
GRID_SIZE = 13
GRID_CHANNELS = 7
PRIOR_SIZES = [
[ 0.14377480392797287, 0.059023397839700086 ],
[ 0.20904473801128326, 0.08287369797830041 ],
[ 0.2... |
<reponame>brianhie/trajectorama<filename>bin/dataset_zeisel_adolescent_brain.py
from anndata import AnnData
import loompy
import numpy as np
import os
from scanorama import *
import scanpy as sc
from scipy.sparse import vstack
from sklearn.preprocessing import normalize
from process import process, load_names, merge_d... |
#!/usr/bin/env python
from __future__ import print_function
import matplotlib as mpl
#mpl.use("Agg")
import numpy as np
import matplotlib.pyplot as plt
from costar_models import *
from costar_models.planner import GetOrderedList, PrintTopQ
from costar_models.sampler2 import PredictionSampler2
from costar_models.dat... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 7