text stringlengths 8.04k 46.5k |
|---|
# Copyright 2021 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
#!/usr/bin/env python
# Welcome to the Intel Extension for PyTorch setup.py.
#
# Environment variables you are probably interested in:
#
# DEBUG
# build with -O0 and -g (debug symbols)
#
# RELEASE
# build with optimization level -O2
#
# REL_WITH_DEB_INFO
# build with optimization level -O2 and -g (de... |
# #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import numpy as np
from datetime import datetime
import dynesty
from .fitutils import airtovacuum
class FitMS(object):
"""docstring for FitMS"""
def __init__(self,**kwargs):
from .likelihood import likelihood
from .prior import... |
"""
This script is designed to take already processed matrix timing and properties
files and perform a variety of machine learning techniques using the Scikit-Learn
Python library.
""" # Written using Anaconda with Python 3.5
# <NAME>
# 1-22-17
import time
from os import path as path
import matplotlib.pyplot as plt
... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 UnitedStack 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.or... |
from datetime import datetime, timedelta
from functools import wraps
from typing import List, Tuple, Union, Optional
import re
import isodate
from isodate.isoerror import ISO8601Error
import inflect
from inflection import pluralize
from pandas.tseries.frequencies import to_offset
from flask import request, current_app... |
# coding:utf-8
__author__ = 'dawei.leng'
__version__ = '1.48'
"""
Another CTC implemented in theano.
The `cost()` function of `CTC_Timescale` and `CTC_Logscale` classes return the average NLL over a batch samples given query sequences and score matrices.
This implementation features:
1) batch / mask supported.
... |
import copy
import datetime
import json
import logging
from django.http import HttpResponse
from django.utils.decorators import classonlymethod, method_decorator
from django.views.generic import View
from elasticsearch.exceptions import ElasticsearchException, NotFoundError
from casexml.apps.case.models import CommC... |
#!/usr/bin/env python3
# Correlator (USB Host Utility)
# <NAME> 2020-07-05
#
# Usage:
# 1. Plug in the board.
# 2. Program with `make prog` or with the `--prog` option.
# 3. `python3 correlator_tui.py &`
#
# A bitfile implementing the correlator logic is required to be build from
# the SystemVerilog2005 implemen... |
import sys
import warnings
import numpy as np
import pandas as pd
import scipy.sparse as sp
import scipy.sparse.linalg as linalg
from scipy.interpolate import interp1d
from astropy import units as u
from tardis import constants as const
from numba import njit, char, float64, int64, typeof, byte, prange
from numba.exper... |
"""
Support for reading and writing the LAV format produced by the `blastz`_
pairwise aligner.
.. _blastz: http://www.bx.psu.edu/miller_lab/
"""
from __future__ import print_function
import sys
from six import Iterator, StringIO
import bx.seq
from bx.align import (
Alignment,
Component,
src_merge,
s... |
from multiprocessing import context
import re
from unicodedata import category
from django.http import HttpResponse
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import authenticate, login, logout
from django.core.mail im... |
# 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
#
# Unless required by app... |
import os
import sys
import pymol
from pymol.Qt import QtGui, QtCore, QtWidgets
from pymol.Qt.utils import getSaveFileNameWithExt, AsyncFunc
from pymol.Qt.utils import PopupOnException
import urllib.request as urllib
def _get_cms_traj_file(fname):
"""For a .cms file, get the filename of the corresponding trajec... |
#!/usr/bin/env python
import argparse
import os
import sys
import olefile
import numpy as np
from scipy.ndimage import percentile_filter
import scipy.ndimage
import sys
import h5writer
import h5py
import spts
import spts.camera
from spts.camera import CXDReader
import matplotlib.pyplot as plt
import matplotlib.cm
im... |
import argparse
import logging
from logging.handlers import QueueHandler, SocketHandler
from multiprocessing import Process, Queue
import os
import platform
from queue import Empty
import signal
import socket
from subprocess import PIPE, Popen
from threading import Thread
from time import sleep, time
from utils.io impo... |
"""
Code to generate an RGG using a KD-Tree
based approach to speed up the nearest
nieghbour computation.
Allows for different choices of boundary
conditions and node distributions.
Currently contains functions for generating
positions and storing them as data.
Also contains class for using constructing
and comput... |
"""
Package WAGL HDF5 Outputs
This will convert the HDF5 file (and sibling fmask/gqa files) into
GeoTIFFS (COGs) with datacube metadata using the DEA naming conventions
for files.
"""
import contextlib
import os
import re
import sys
from datetime import timedelta, datetime
from pathlib import Path
from typing import L... |
# pylint: disable=E0213,E1121,E1101,C0301
# Copyright (c) 2016 Pony ORM, LLC. All rights reserved. team (at) ponyorm.com
#
# Most of the content of this file is copied from https://github.com/ponyorm/pony/blob/orm/pony/orm/decompiling.py
# and is released under the Apache 2.0 license: https://www.apache.org/licenses/L... |
# PGD code, merging Santiago's improvements
import time
import pandas as pd
import numpy as np
import sys
from math import *
# from mpmath import mp
# mp.dps = 100
pd.options.display.precision = 2
pd.set_option('display.precision', 2)
def progress_bar(i, n, size): # show the percentage
percent = float(i) / fl... |
#!/usr/bin/env python
import curses
import os
import sys
from itertools import groupby, tee, chain
from operator import attrgetter, itemgetter
from random import randint
################################
# next things to do:
# -- support ? and show help window
# -- shortcuts like 'perf report'
# -- search
# - ESC / ... |
"""This module provides functions which determine various observatory
specific policies for JWST:
1. How to convert reference file basenames to fully specified paths.
2. How to manage parameters for reference file Validator objects used
in the certification of reference files.
"""
import os.path
import re
# ========... |
from openpyxl import Workbook, load_workbook
import re
import pywikibot
from pgvbotLib import *
from urllib.request import urlopen, quote, Request
from urllib.error import URLError
import json, sys, os
#import SPARQLWrapper
import requests
date_pattern = r'[-]{0,1}[0-9]+-[0-9]+-[0-9]+'
#print(re.match(date_pattern,'t2... |
# -*- coding: utf-8 -*-
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Pu... |
import datetime
from dateutil.relativedelta import relativedelta
from enum import Enum
import graphviz
import matplotlib.pyplot as plt
import numpy as np
import os
os.environ["PATH"] += os.pathsep + "C:/Program Files (x86)/Graphviz2.38/bin/"
import pickle
import re
from sklearn import calibration, metrics, model_select... |
r"""
Double Description Algorithm for Cones
This module implements the double description algorithm for extremal
vertex enumeration in a pointed cone following [FP1996]_. With a
little bit of preprocessing (see
:mod:`~sage.geometry.polyhedron.double_description_inhomogeneous`)
this defines a backend for polyhedral com... |
import collections
import itertools
from decimal import Decimal
from typing import Optional
import bleach
from django.contrib.auth.decorators import login_required
from django.db.models import Q, Prefetch
from django.http import JsonResponse
import simplejson as json
from django.utils import dateformat, timezone
from... |
#!/usr/bin/env python3
import os
import argparse
import json
import sys
import traceback
import re
from sonic_py_common import device_info, logger
from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector, SonicDBConfig
INIT_CFG_FILE = '/etc/sonic/init_cfg.json'
# mock the redis for unit test purposes #... |
#AUTHOR: <NAME> , <EMAIL>
from Scripts.BEseqType import *
from Bio.Seq import Seq
import csv
from Scripts.baseEditorsTable import CBElist, CBElistMinor, ABElist, ABElistMinor, BEletter
from Scripts.transverse import SpecialCleanMatch,origPro
def importSNPS(SNPfile):
rslts=[]
with open(SNPfile,"r") as ... |
"""
3D-LanNet: predict 3D lanes from a single image.
This arch is an unofficial implementation of:
"3d-lanenet: end-to-end 3d multiple lane detection", <NAME>, etal., ICCV 2019"
Overall dimension of the output tensor would be: N * W * 3 *(3 * K + 1), where
K : number of y samples.
(2 * K + 1): Eac... |
"""Extension to python-markdown to support LaTeX (rather than html) output.
Original Source URL: https://github.com/rufuspollock/markdown2latex
Authored by <NAME>: <http://www.rufuspollock.org/>
Reworked by <NAME> (<EMAIL>) and
<NAME> (<EMAIL>)
Usage:
======
1. Command Line. A script entitled markdown2latex.py is au... |
# coding=utf-8
# Original Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# Modifications Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
"""Megatron optimizer."""
from abc import ABC, abstractmethod
from contextlib... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import collections
import glob
import itertools
import os
import pickle
import warnings
import h5py
import numpy as np
import numpy.testing as npt
import scipy.signal
import matplotlib.pyplot as plt
import seaborn as sns
from antlia.util import reduce_runs
from antlia.tri... |
# ***** 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 distributed ... |
from __future__ import print_function
from ortools.sat.python import cp_model
import cvxpy as cvx
import json
import numpy as np
import pandas as pd
import sys
#sys.path.insert(0,'../..')
from meal_balancer.grouping import create_batches
from gurobipy import *
# optimisation algorithm for balanced meal creation
# cv... |
"""Load the USDA Nutritional database"""
from __future__ import print_function
import os.path
import sqlalchemy as sa
import pandas as pd
import numpy as np
FD_GROUP_TABLE_NAME="fd_group"
FD_GROUP_KEYS=['<KEY>']
def _defineFoodGroupTable(metadata):
return sa.Table(
FD_GROUP_TABLE_NAME,
metadata,... |
import numpy as np
import torch
from torch import nn
from batchgenerators.augmentations.utils import pad_nd_image
from nnunet.network_architecture.generic_UNet import Generic_UNet, StackedConvLayers, Upsample
from nnunet.utilities.nd_softmax import softmax_helper
from nnunet.network_architecture.initialization import I... |
from collections import OrderedDict
from sqlalchemy import or_
from pyramid.httpexceptions import HTTPBadRequest, HTTPOk
import json
from src.models import DBSession, Dbentity, Locusdbentity, Dnasequencealignment, \
Proteinsequencealignment, Sequencevariant, Taxonomy, Goannotation,\
Proteindomainannotation, D... |
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 9 07:50:39 2018
@author: RockyZhou
"""
import tensorflow as tf
import keras.layers as KL
import keras.engine as KE
import keras.backend as K
from keras.initializers import Constant
from net_backbone import BatchNorm
import numpy as np
def log2_graph(x):
... |
from .schema import (ActionSchema, PermissionLevelSchema, ChainInfoSchema, BlockInfoSchema,
TransactionSchema,
AbiRicardianClauseSchema, AbiTableSchema, AbiSchema, AbiTypeSchema,
AbiActionSchema, AbiStructFieldSchema, AbiStructSchema, AbiErrorMessagesSchem... |
# -----------------------------------------------------------------------------
# Copyright (c) 2015-2021, NeXpy Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING, distributed with this software.
# -------------------------------------------------... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: <NAME>
# Year: 2020
# Project: master-thesis
import sys
sys.path.append('/nfs/kryo/work/maxsimon/master-thesis/s... |
from PyQt4 import Qt, QtCore
from PyQt4.QtCore import pyqtSignal, pyqtSlot
from OkTagHandler import OkTagHandler
from OkScroll import OkScrollBar
from OkConfig import OkConfig
class OkTypeBox(Qt.QComboBox):
changeType = pyqtSignal(int, QtCore.QModelIndex)
def __init__(self, parent=None):
Qt.QComboBox._... |
from .clients import neutron
from neutronclient.common.exceptions import NotFound
import json
__all__ = [
'get_network',
'get_network_id',
'create_network',
'delete_network',
'update_network',
'list_networks',
'get_subnet',
'get_subnet_id',
'create_subnet',
'delete_subnet',
... |
"""
This module is an extension for xarray to provide rasterio capabilities
to xarray datasets/dataarrays.
"""
import math
import numpy as np
import pyproj
import rasterio.warp
import rasterio.windows
import xarray
from affine import Affine
from rasterio.crs import CRS
from rioxarray.crs import crs_to_wkt
from rioxar... |
#!/usr/bin/python
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['pre... |
# generator functions to simplify and streamline signal injection and recovery of filterbanks
import setigen as stg
import numpy as np
import pandas as pd
import os
import astropy.units as u
from turbo_seti.find_doppler.find_doppler import FindDoppler
from turbo_seti.find_event.find_event import read_dat
from blimpy im... |
from six import iteritems, itervalues
from six.moves import range
from ..interfaces import ISnapshotable
from ..errors import AccessViolationError, InvalidResourceError
from ..util import align, sizeof_fmt, Flags
from ..snapshot import SnapshotNode
import enum
DEFAULT_MEMORY_SIZE = 0x1000000
# Types
from ctypes imp... |
import numpy as np
import scipy.linalg as la
from gncpy.math import get_state_jacobian, get_input_jacobian
class BaseLQR:
r""" Implements a Linear Quadratic Regulator (LQR) controller.
This implements an LQR controller for the cost function
.. math::
J = \frac{1}{2} \left[x_f^T Q x_... |
"""Support for Climate devices of (EMEA/EU) Honeywell evohome systems.
Specifically supports a temperature control system (TCS, controller) with 0-12
heating zones (e.g. TRVs, relays).
For more details about this platform, please refer to the documentation at
https://github.com/zxdavb/evohome/
"""
# pylint: disable=d... |
"""
#
#-----------------------------
# <NAME> Institut
# 2019
#-----------------------------
# Author:
#
# <NAME>
#
#------------------------------
"""
import re
import argparse
import urllib.request
from datetime import date
import logging
from Download import Download
from TaxonGraph import TaxonGraph
from ... |
"""
Contains some module wrappers, and the implementation of multi-scale batch normalization (MS-BN).
"""
__author__ = "<NAME>"
__copyright__ = "Copyright (c) 2021 Futurewei Inc."
__credits__ = ["<NAME> https://github.com/sxhxliang/detectron2_backbone"]
__license__ = "MIT License"
__version__ = "0.1"
__maintainer__ = "... |
"""
This module is used for detecting stopped vehicle(s) from camera footage.
For example if used on footage of vehicles stopping in front of traffic lights, Detector.detect() should only yield one
image per one stopped vehicle. This is achieved by comparing every frame against static background image, when there's
a ... |
__all__ = ['Terminal', 'NonTerminal', 'Grammar', 'EmptyWord', 'Derivation']
from typing import Union, Dict, List, Set, Tuple
import copy
import itertools
import grammar
# Types
Terminal = chr
NonTerminal = int
Derivation = Tuple[Union[Terminal, NonTerminal]]
EmptyWord = tuple()
Rule = Tuple[NonTerminal, Derivation]
Ra... |
import nipype.interfaces.fsl as fsl
import nipype.pipeline.engine as pe
import nipype.interfaces.utility as util
import nipype.interfaces.ants as ants
import nipype.interfaces.c3 as c3
from CPAC.registration.utils import change_itk_transform_type, check_transforms, generate_inverse_transform_flags
from nipype.interfac... |
import re
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from helpers import xroad
from tests.xroad_parse_users_inputs import xroad_parse_user_inputs as parse_input
from tests.xroad_client_registration_in_ss_221.client_registration_in_ss import get_expected... |
#!/usr/bin/env python3
from sys import argv, exit
import os
import argparse
# Default options
COL = 0
STDIN = "" # made to hold standard input for multiple functions
# get column length
try:
COL = int(os.get_terminal_size()[0])
except:
try:
COL = int(os.get_terminal_size(0)[0])
except:
CO... |
import oscar_mws
from collections import OrderedDict
from django.db import models
from django.conf import settings
from django.utils.timezone import now as tz_now
from django.utils.translation import ugettext_lazy as _
from lxml.builder import E
Partner = models.get_model('partner', 'Partner')
StockRecord = models.... |
### --------------------------------------- ###
#-# ZERN #-#
### --------------------------------------- ###
"""
Python package for the evaluation of Zernike polynomials
Date: Jan 2018
Author: <NAME> - University of Oxford
Email: <EMAIL>
Version: 0.1
Description: this package implem... |
import argparse
import io
import json
import os
import re
import sys
import xml.etree.ElementTree as ElementTree
from collections import OrderedDict, namedtuple, defaultdict
from copy import copy
from datetime import datetime
from json_signature import compute_signature_from_json_content
ATTRIBS_TO_IMPORT = [
't... |
import tensorflow as tf
from absl import logging
import albumentations as A
import random
import os
import hashlib
import lxml.etree
import tqdm
import cv2
from typing import DefaultDict, Tuple
import numpy as np
@tf.function
def transform_targets_for_output(y_true, grid_size, anchor_idxs):
# y_true: (N, boxes, (... |
# Copyright 2019 The Bazel 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 applicable law... |
#
# This file is part of Brazil Data Cube Collection Builder.
# Copyright (C) 2019-2020 INPE.
#
# Brazil Data Cube Collection Builder is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Define Brazil Data Cube utils."""
# Python Nat... |
import numpy as np
from scipy.optimize import minimize
from sys import stdout
from time import time
import multiprocessing
from itertools import repeat
class BLPException(Exception):
""" A basic exception class """
pass
class BLPResult:
""" A class to hold the results
Attributes:
----------
... |
from __future__ import division
import warnings
import torch
import torch.nn as nn
import numpy as np
import torch.optim as optim
import ctypes
import json
from torch.autograd import Variable
import os
from sklearn.cluster import KMeans
from sklearn.model_selection import train_test_split
from sklearn.linear_model imp... |
"""
Control Center for SubT Urban
"""
import threading
import math
import random
import sys
import platform
import json
from datetime import timedelta
from contextlib import suppress
from PyQt5.QtCore import pyqtSignal, QSize, Qt, QPointF, QLineF
from PyQt5.QtGui import QPalette, QKeySequence, QPainter, QColor, Q... |
# Copyright 2015 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... |
#!/usr/bin/env python
# encoding: utf-8
# Modifications copyright Amazon.com, Inc. or its affiliates.
# <NAME>, 2006 (dv)
# <NAME>, 2007 (folti)
# <NAME>, 2009
# <NAME>, 2012
# System Imports
import os
import sys
import tempfile
winreg_available = True
try:
import winreg
except ImportError:
winreg_available... |
import logging
import multiprocessing as mp
import os
import timeit
import numpy as np
# np.seterr(over='ignore', invalid='ignore')
# import tqdm
import scipy.cluster as cluster
from scipy import ndimage
from skimage.feature import blob_dog, blob_log
from hexrd import constants as const
from hexrd import matrixuti... |
#!/usr/bin/env python3
"""
#############################################################################
Project to divide a Database of Genomes (RefSeq) according to their
k-mer frequency, for a lower RAM requirement of taxonomic classifiers.
This script pre-classifies reads/sequences from a fastq file, and calls a
... |
import os
import cv2
import json
import math
import pickle
import numpy as np
import xml.etree.ElementTree as ET
import torch
import torch.utils.data as data
import pycocotools.coco as coco
from utils.image import get_border, get_affine_transform, affine_transform, color_aug
from utils.image import draw_umich_gaussia... |
from abc import ABC, abstractmethod
from tempfile import TemporaryDirectory, NamedTemporaryFile, gettempdir
from os.path import join, getsize, basename, relpath, isdir, isfile
from os import makedirs, rename, listdir, walk
from re import compile
from filecmp import cmp
from subprocess import run, DEVNULL
from lxml impo... |
import copy
import itertools
import numpy as np
from operator import attrgetter, itemgetter
from skmultiflow.utils import get_dimensions, normalize_values_in_dict, calculate_object_size
from skmultiflow.core import BaseSKMObject, ClassifierMixin
from skmultiflow.rules.base_rule import Rule
from ._split_criterion impo... |
import numpy as np
import galsim
import galsim.config.input as gsinput
import ngmix
import os
import copy
from numpy.lib.recfunctions import append_fields
# Balrog files
import mathutil as util
import grid
# TODO: Implement as needed
class BalObject(object):
'''
'''
def __init__(self):
pass
clas... |
"""
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
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 lim... |
# Nuclei Marker Script
# <NAME>
# 9/26/2019
# Importing neccessary dependencies
import os
import czifile as czi
import numpy as np
import pandas as pd
import skimage
import cv2
from scipy import ndimage
from skimage.feature import peak_local_max
from tqdm import tqdm
import matplotlib.pyplot as plt
from skimage.morp... |
from common import *
from submit import *
from dataset.carvana_cars import *
from net.segmentation.my_unet import SoftDiceLoss, BCELoss2d, UNet_double_1024_5 as Net
from net.tool import *
## experiment setting here ----------------------------------------------------
def criterion(logits, labels):
#l = BCELoss2d(... |
"""All functionality needed to setup a computer."""
from os import path
from copy import copy
from subprocess import check_output, call
import pexpect
import ipywidgets as ipw
from IPython.display import clear_output
from traitlets import Bool, Dict, Instance, Int, Unicode, Union, link, validate
from aiida.common im... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests the API defined in astropy APE 14 (https://doi.org/10.5281/zenodo.1188875).
"""
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
import astropy.units as u
from astropy import time
from astropy import... |
#!/usr/bin/env python
"""
A Web UI for RED, the Resource Expert Droid.
"""
__author__ = "<NAME> <<EMAIL>>"
__copyright__ = """\
Copyright (c) 2008-2013 <NAME>
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 ... |
import asyncio
import datetime
import discord
import typing
import random
from discord.ext import commands
from deprecated.commands.lottery.lottery import LotteryParticipant
from utils.utils import USER_MENTION_REGEX
from utils.deprecated.configuration_manager import ConfigurationManager
from services.credit_service im... |
# (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import socket
import time
from concurrent.futures.thread import ThreadPoolExecutor
import mock
import psycopg2
import pytest
from semver import VersionInfo
from datadog_checks.base.utils.db.sql import compute_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import OrderedDict
from codegen.types import MachineValueType, ValueType
class SubRegDescription:
def __init__(self, name, size_in_bit, offset_in_bit=0):
self.name = name
self.size_in_bit = 0
self.offset_in_bit = 0
class Co... |
from ..kernel.graph import DynamicVariableOperation
from ..kernel import core
from ..kernel.core import CharacterModifier as MDF
from ..character import characterKernel as ck
from functools import partial
from ..status.ability import Ability_tool
from . import globalSkill
from .jobclass import heroes
from .jobbranch im... |
'''
The aim of a beat detection algorithm is to report the times at which a typical
human listener might tap their foot to a piece of music. As a result, most
metrics for evaluating the performance of beat tracking systems involve
computing the error between the estimated beat times and some reference list of
beat loca... |
import os
from os.path import split
from functools import partial
import numpy as np
from scipy import sparse, signal
from scipy.io import loadmat
import mne
from mne.stats import permutation_cluster_test, ttest_1samp_no_p
import borsar
from borsar.utils import find_index
from borsar.cluster import Clusters, constru... |
"""
Functions and objects to work with mzML data and tabular data obtained from
third party software used to process Mass Spectrometry data.
Objects
-------
MSData: reads raw MS data in the mzML format. Manages Chromatograms and
MSSpectrum creation. Performs feature detection on centroid data.
Functions
---... |
from imports import *
import metrics
import data_management
import interactive_plot
def load_model_unet(file, use_dice_loss=False, use_jaccard_loss=False, use_focal_loss=False):
from keras.models import load_model
cobj = {'keras_precision': metrics.keras_precision, 'keras_recall': metrics.keras_recall, 'keras_... |
import logging
from celery import shared_task
from django import forms
from django.conf import settings
from django.contrib import admin, messages
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
from django.contrib.admin.widgets import AutocompleteSelect
from django.contrib.auth import get_user_model
fro... |
from __future__ import absolute_import, division, print_function
from six.moves import range
import math
import scitbx.math
from scitbx.array_family import flex
from rstbx.outlier_spots.fit_distribution import fit_cdf
from rstbx.indexing_api import rayleigh_cpp
from rstbx_ext import * # gets us SpotClass
from six.moves... |
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from collections import defaultdict
from copy import deepcopy
import re
import sys
__all__ = [
'SYSTEM_EXIT_OFF',
'PRINT_DOC_OFF',
'GUIDELINE_8_OFF',
'clidoc',
]
SYST... |
# Copyright 2018-2019 Xanadu Quantum Technologies 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 applicable law or... |
# -------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# ----------------------------------------------------------------------... |
#!/usr/bin/env python3
#!bin/bash
# /etc/init.d/telem_sim_and_video_stream.py
### BEGIN INIT INFO
# Provides: telem_sim_and_video_stream.py
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enab... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: github.com/openconfig/gnmi/proto/gnmi/gnmi.proto
# plugin: python-betterproto
import warnings
from dataclasses import dataclass
from typing import AsyncIterable, AsyncIterator, Dict, Iterable, List, Optional, Union
import betterproto
import grpclib
... |
import os
import re
import subprocess
import sys
from collections import defaultdict
from functools import partial
from weakref import WeakValueDictionary
from snakeoil import klass
from snakeoil.demandload import demand_compile_regexp
from snakeoil.mappings import ImmutableDict, OrderedFrozenSet, inject_getitem_as_ge... |
import numpy as np
import tensorflow as tf
from tensorflow.contrib.rnn import RNNCell, GRUCell
from tensorflow.python.ops import rnn_cell_impl
from tensorflow.contrib.framework import nest
from tensorflow.contrib.seq2seq.python.ops.attention_wrapper import _bahdanau_score, _BaseAttentionMechanism, BahdanauAttention, Ba... |
import math
import numpy as np
import numpy.random as npr
import torch
import torch.utils.data as data
import torch.utils.data.sampler as torch_sampler
from torch.utils.data.dataloader import default_collate
from torch._six import int_classes as _int_classes
from core.config import cfg
from roi_data.minibatch import ... |
import pickle
from copy import deepcopy
from typing import List
import numpy as np
from .graph_search import modified_a_star
from .helper_classes import DirectedHeuristicGraph, Edge, Polygon, PolygonVertex, Vertex
from .helper_fcts import check_data_requirements, convert_gridworld, find_within_range, inside_polygon, ... |
# -*- coding: utf-8 -*-
import json
import numpy as np
import pytest
from astropy import units as u
import csdmpy as cp
from csdmpy.units import ScalarQuantity
# linear dimension
def test_linear_new():
data = cp.new()
dim = {
"type": "linear",
"increment": "10 m/s",
"count": 10,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.