gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from __future__ import absolute_import, unicode_literals
import pytest
import select
import ssl
import socket
import sys
import time
import uuid
from collections import OrderedDict
try:
from collections.abc import Callable
except ImportError:
from collections import Callable
from itertools import count
fro... | |
#!/usr/bin/env python
#
# dewadl
#
# Turn WADL XML into Python API.
#
# Matt Kubilus 2015
#
# This is written to support the uDeploy WADL specifically. Your mileage may vary with other WADLs.
#
#
import os
import re
import cmd
import json
import urlparse
import urllib2
from types import FunctionType
import x... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Cloudbase Solutions Srl
#
# 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/LICE... | |
from __future__ import absolute_import
from django.db.models import Q
from rest_framework import serializers, status
from rest_framework.response import Response
from sentry import roles
from sentry.api.bases.organization import OrganizationEndpoint, OrganizationPermission
from sentry.api.exceptions import ResourceDo... | |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
Helper... | |
from django.utils.translation import ugettext_lazy as _
# ISO 3166-1 country names and codes adapted from http://opencountrycodes.appspot.com/python/
CONTINENTS = [
(u'africa', _(u'Africa')),
(u'antarctica', _(u'Antarctica')),
(u'asia', _(u'Asia')),
(u'europe', _(u'Europe')),
(u'north-america', _(u'... | |
# Copyright 2013 10gen 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 agreed to... | |
import entDevType as edt
class entropyDeviationType:
"""
A class that provides an interface to Chi-Square distribution
testing, Shannon Entropy Analysis and Monte Carlo Pi Approximation
for the purposes of analyzing entropy in unknown binary stream to
locate hidden or encrypted data with a primary intended foc... | |
import os
import os.path as op
import numpy as np
import nibabel as nib
from dipy.reconst import dki
from dipy.reconst import dki_micro
from dipy.core.ndindex import ndindex
import AFQ.utils.models as ut
__all__ = ["fit_dki", "predict"]
def _fit(gtab, data, mask=None):
dkimodel = dki.DiffusionKurtosisModel(g... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
import cPickle as pickle
#from matplotlib.patches import Rectangle
#from matplotlib.pyplot import gca,tight_layout,figure,plot
from pylab import *
#####################################
# Function to calculate theoretical #
# profiles from continuity and #
# flux steady state assumptions #
####################... | |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | |
# Copyright 2013 IBM Corp.
# Copyright 2010 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/LIC... | |
#!/usr/bin/python
"""import23.py - Script to import the data into Gluu Server 2.3.x
"""
# Requires JSON Merge library
# wget https://github.com/avian2/jsonmerge/archive/master.zip
# unzip master.zip
# cd jsonmerge-master
# python setup.py install
# Also requires ldif.py in same folder
import os
import os.path
import... | |
import requests
from slackclient import SlackClient
from kalliope import Utils
from kalliope.core.NeuronModule import NeuronModule, MissingParameterException
Slack_Actions = (
"POST",
"READ",
"USERS"
)
class Slack(NeuronModule):
def __init__(self, **kwargs):
super(Slack, self).__init__(**k... | |
""" manage PyTables query interface via Expressions """
import ast
from functools import partial
import numpy as np
from pandas._libs.tslibs import Timedelta, Timestamp
from pandas.compat.chainmap import DeepChainMap
from pandas.core.dtypes.common import is_list_like
import pandas as pd
from pandas.core.base impor... | |
#!/usr/bin/env python
#==============================================================================
# Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of the... | |
"""Tests for Incremental PCA."""
import numpy as np
import pytest
from sklearn.utils._testing import assert_almost_equal
from sklearn.utils._testing import assert_array_almost_equal
from sklearn.utils._testing import assert_allclose_dense_sparse
from numpy.testing import assert_array_equal
from sklearn import dataset... | |
# python client.py
import json
import hmac
import time
import base64
import hashlib
import requests
from datetime import datetime, timedelta
one_week_ago = datetime.today() - timedelta(days=7)
class BitfinexError(Exception):
pass
class Base(object):
# A base class for the API Client methods that handles interacti... | |
from __future__ import absolute_import, division, print_function
import functools
import sys
import traceback
from tornado.concurrent import Future
from tornado import gen
from tornado.httpclient import HTTPError, HTTPRequest
from tornado.log import gen_log, app_log
from tornado.template import DictLoader
from tornad... | |
# -*- coding: utf-8 -*-
#
# Copyright (C)2006-2009 Edgewall Software
# Copyright (C) 2006 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.e... | |
# Copyright 2014 DreamHost, LLC
#
# Author: DreamHost, 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 applicabl... | |
# Copyright 2013 Brocade Communications System, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | |
import abc
import logging
import math
from collections import defaultdict
from fn import _
from fn.iters import map, filter
from .manipulator import Parameter
from .metatechniques import RecyclingMetaTechnique
from .technique import SequentialSearchTechnique, register
log = logging.getLogger(__name__)
class SimplexT... | |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class UdemyIE(InfoExtractor):
IE_NAME = 'udemy'
_VALID_URL = r'https?://www\.udemy\.com/(?:[^#]+#/lectu... | |
"""The Instrument class holds all events for a single instrument and contains
functions for extracting information from the events it contains.
"""
import numpy as np
try:
import fluidsynth
_HAS_FLUIDSYNTH = True
except ImportError:
_HAS_FLUIDSYNTH = False
import os
import pkg_resources
from .containers im... | |
# coding=utf-8
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2012, Intel Performance Learning Solutions 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
#
# ... | |
# Copyright 2015, Google Inc.
# 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 and the f... | |
# -*- encoding: utf-8 -*-
import re
import os
import glob
import typing
import numpy as np
scores_dict = {
'train_single': ["single_best_train_score", "single_best_optimization_score"],
'test_single': ["single_best_test_score"],
'train_ensamble': ["ensemble_optimization_score"],
'test_ensamble': ["en... | |
from flask import Flask, render_template
from mipframework.hichart_server.algorun import get_algorithm_result
from PCA import PCA
from PEARSON_CORRELATION import Pearson
from LOGISTIC_REGRESSION import LogisticRegression
from CALIBRATION_BELT import CalibrationBelt
from KAPLAN_MEIER import KaplanMeier
from ANOVA_ONEW... | |
# edoAutoHome.py - This Project for HomeAutomation
# URL: https://github.com/engdan77/edoAutoHomeMobile
# Author: Daniel Engvall (daniel@engvalls.eu)
import kivy
kivy.require('1.9.0')
import re
from functools import partial
from collections import namedtuple
import webbrowser
from kivy.app import App
from kivy.lang i... | |
# -*- coding: utf-8 -*-
#
# K9 Forward Sensors Controller
#
# authored by Richard Hopkins December 2017 for AoT Autonomy Team
#
# Licensed under The Unlicense, so free for public domain use
#
# This program turns K9's radar crisps into rotating LIDAR
# sensors that can detect what is in front of the robot dog.
#
# This... | |
#!/usr/bin/env python
# Inject TV show into iTunes
# system
import datetime
import os
import re
import time
import sys
import urllib
from optparse import OptionParser
from ConfigParser import SafeConfigParser
# Mac OS X
import appscript
import mactypes
# To get episode summary, some extra Python packages are require... | |
#!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
:author: Thomas Calmant
:copyright: Copyright 2014, isandlaTech
:license: Apache License 2.0
:version: 0.0.5
:status: Alpha
..
Copyright 2014 isandlaTech
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except ... | |
import unittest
import os.path
import sys
import mtree.tests.fixtures as fixtures
import mtree.tests.fixtures.generator as generator
from mtree import MTree
import mtree.functions as f
class Test(unittest.TestCase):
def setUp(self):
# Removing randomness
def not_random_promotion(data_objects, distance_fun... | |
#!/usr/bin/env python3
# Copyright (c) 2017 The PlanBcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""An example functional test
The module-level docstring should include a high-level description of
what the test... | |
"""
This module provides an optimizer class that is based on an evolution
strategy algorithm.
"""
import random, math
from time import time
from xml.dom import minidom
from extra.schedule import Schedule
from extra.printer import pprint, BLUE
class Optimizer(object):
"""
This class is the implementation of the evolu... | |
#!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | |
# Copyright 2016 Joel Dunham
#
# 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 writi... | |
# Copyright 2016 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... | |
#pylint: skip-file
"""
This module handles all the phishing related operations for
Wifiphisher.py
"""
import os
from wifiphisher.common.constants import *
from shutil import copyfile
import ConfigParser
def config_section_map(config_file, section):
"""
Map the values of a config file to a dictionary.
""... | |
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
timer.py
Created on Wed Apr 24 12:00:00 2013
@author: kyle
"""
from __future__ import print_function
import forseti2
import configurator
import json
import lcm
import threading
import time
import random
import os
import settings
import util
import LCMNode
Node =... | |
"""
drfjsonapi.filters
~~~~~~~~~~~~~~~~~~~
DRF relationship fields to assist with a JSON API spec
compliant API.
"""
import itertools
import re
from django.db.models import Q
from rest_framework.exceptions import ValidationError
from rest_framework.filters import BaseFilterBackend, OrderingFilter
fr... | |
from __future__ import division
import math, random, re
from collections import defaultdict
class Table:
def __init__(self, columns):
self.columns = columns
self.rows = []
def __repr__(self):
"""pretty representation of the table: columns then rows"""
return str(self.columns) +... | |
# Copyright 2015 Cloudbase Solutions Srl
#
# 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... | |
# Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import logging
from coremltools.converters.mil.frontend.tensorflow.basic_graph_ops import (
dis... | |
# Copyright (c) 2016 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 applic... | |
import time
import datetime
import dateutil
import stripe
import hashlib
import re
import redis
import uuid
import mongoengine as mongo
from django.db import models
from django.db import IntegrityError
from django.db.utils import DatabaseError
from django.db.models.signals import post_save
from django.db.models import ... | |
# -*- coding: utf-8 -*-
import os # noqa: F401
import re
import shutil
import time
import unittest
from configparser import ConfigParser
from os import environ
from installed_clients.DataFileUtilClient import DataFileUtil
from GenomeFileUtil.GenomeFileUtilImpl import GenomeFileUtil
from GenomeFileUtil.GenomeFileUtilI... | |
# 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 __future__ import absolute_import, division, print_function
from itertools import count
from operator import getitem
from .compatibility import zip_longest
from .core import add, inc # noqa: F401
from .core import (istask, get_dependencies, subs, toposort, flatten,
reverse_dict, ishashable, ... | |
from functools import reduce
import torch
from torch._utils import _accumulate
from ..function import Function, InplaceFunction
class Index(Function):
def __init__(self, index):
super(Index, self).__init__()
self.index = index
def forward(self, i):
self.input_size = i.size()
... | |
import ui
import dice
class Cell(object):
alias = None
default_kick_msg = "Ouch! You hurt your foot!"
default_open_msg = "You see nothing you could open."
default_close_msg = "You see nothing you could open."
default_enter_msg = "You don't see stairs."
default_descr = "<no-descr>"
default_properties = {}... | |
from typing import List
import numpy as np
from numpy import ndarray
from gdsfactory.components.bend_euler import bend_euler
from gdsfactory.cross_section import strip
from gdsfactory.geometry.functions import path_length
from gdsfactory.routing.manhattan import (
_is_horizontal,
_is_vertical,
remove_flat... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.ml
~~~~~~~~~~~~~~~~~~
Lexers for ML family languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, default, words
from... | |
from modularodm.exceptions import ValidationError
from modularodm import Q
from rest_framework import exceptions
from rest_framework import serializers as ser
from api.base.exceptions import Conflict
from api.base.serializers import (
JSONAPISerializer, IDField,
LinksField, RelationshipField, DateByVersion,
)
... | |
from collections.abc import Iterable
from numbers import Integral, Real
import numpy as np
import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
from .data import EV_PER_MEV
class ProbabilityTables(EqualityMixin):
r"""Unresolved resonance region probability tables.
Parameters
----------... | |
from rpython.rlib.rarithmetic import r_singlefloat, r_uint
from rpython.rtyper.lltypesystem import lltype, rffi
from rpython.translator.tool.cbuild import ExternalCompilationInfo
r_uint32 = rffi.r_uint
assert r_uint32.BITS == 32
UINT32MAX = 2 ** 32 - 1
# keep in sync with the C code in pypy__decay_jit_counters below... | |
# Copyright 2014-2017 Insight Software Consortium.
# Copyright 2004-2009 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
import os
from . import templates
from . import matcher_base_t
from . import variable
from . import cpptypes
from . import n... | |
# ===============================================================================
# Copyright 2012 Jake Ross
#
# 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... | |
# Copyright (C) 2010 Google 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 agreed to in writ... | |
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | |
import numpy as np
import helper
import problem_unittests as tests
from collections import Counter
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
from tensorflow.contrib import seq2seq
data_dir = './data/simpsons/moes_tavern_lines.txt'
text = helper.load_data(data_dir)
# Ignore noti... | |
# -*- coding: utf-8 -*-
"""
werkzeug.http
~~~~~~~~~~~~~
Werkzeug comes with a bunch of utilities that help Werkzeug to deal with
HTTP data. Most of the classes and functions provided by this module are
used by the wrappers, but they are useful on their own, too, especially if
the response and ... | |
from netlib.http import cookies
from netlib.tutils import raises
def test_read_token():
tokens = [
[("foo", 0), ("foo", 3)],
[("foo", 1), ("oo", 3)],
[(" foo", 1), ("foo", 4)],
[(" foo;", 1), ("foo", 4)],
[(" foo=", 1), ("foo", 4)],
[(" foo=bar", 1), ("foo", 4)],
... | |
"""
Test Results for discrete models from Stata
"""
import os
import numpy as np
#### Discrete Model Tests ####
# Note that there is a slight refactor of the classes, so that one dataset
# might be used for more than one model
cur_dir = os.path.abspath(os.path.dirname(__file__))
class Anes(object):
def __init__(... | |
from __future__ import division
from sympy.assumptions.ask import Q
from sympy.core.numbers import oo
from sympy.core.relational import Equality
from sympy.core.singleton import S
from sympy.core.symbol import (Dummy, symbols)
from sympy.sets.sets import (EmptySet, Interval, Union)
from sympy.simplify.simplify import ... | |
# 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, ... | |
# Copyright 2018 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 IBM Corp.
# 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/LIC... | |
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
"""Support for Epson projector."""
import logging
from epson_projector.const import (
BACK,
BUSY,
CMODE,
CMODE_LIST,
CMODE_LIST_SET,
DEFAULT_SOURCES,
EPSON_CODES,
FAST,
INV_SOURCES,
MUTE,
PAUSE,
PLAY,
POWER,
SOURCE,
SOURCE_LIST,
STATE_UNAVAILABLE as EPSON... | |
# sqlalchemy/events.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Core event interfaces."""
from . import event, exc
from .pool import Pool
f... | |
import theano
import logging
from theano import tensor as T
from blocks.bricks.base import application
from blocks.initialization import (Constant, Uniform)
import numpy as np
from toolz.itertoolz import interleave
from collections import Counter
from blocks.bricks.conv import (Convolutional, ConvolutionalSequence,
... | |
#!/Users/lcladm/anaconda2/bin/python
# TODO - python path - assuming condo here
## HEALTH WARNING - BETA CODE IN DEVELOPMENT ##
'''
This standalone application will build a mesh from a nifti classification file.
To keep the procedure as similar as possible to the way mrMesh used to do this,
we will keep this as a s... | |
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | |
# 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
# distributed under the ... | |
from ._base import BaseAPIDispatch, BaseAPIEndpoint
class Usergroups(BaseAPIDispatch):
pass
@Usergroups.register('users')
class Users(BaseAPIDispatch):
pass
@Usergroups.register('create')
class UsergroupsCreate(BaseAPIEndpoint):
"""This method is used to create a User Group.
If successful, the co... | |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
script: univariate-analysis-2.py
followinf univariate-analysis.py, used to explore more features of univariate
analysis
In this script we show how to load/compute univariate analysis on other
types of observables, and how to build good-looking autocorrelation functio... | |
from __future__ import unicode_literals
from future.builtins import super
from datetime import timedelta
from django.contrib.auth.models import User
from django.contrib.messages import info, error
from django.shortcuts import get_object_or_404, redirect
from django.utils.timezone import now
from django.views.generic... | |
import copy
import pymc3 as pm
from lasagne import init
from gelato.specs.base import DistSpec, get_default_testval, smart_init
__all__ = [
'get_default_spec',
'set_default_spec',
'PartialSpec',
'UniformSpec',
'FlatSpec',
'NormalSpec',
'BetaSpec',
'ExponentialSpec',
'LaplaceSpec',
... | |
# Copyright (C) 2016 EMC 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 requ... | |
from tcga_encoder.definitions.locations import *
from tcga_encoder.utils.helpers import *
from tcga_encoder.data.data import *
from tcga_encoder.analyses.dna_functions import *
from sklearn.model_selection import StratifiedKFold
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import average_pre... | |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | |
# -*- coding: utf-8 -*-
# Copyright 2022 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... | |
#!/usr/bin/python
import sys
import copy
import numpy as np
import pos_wrappers
from pos_wrapper_skel import generic_workflow
import pos_parameters
from pos_deformable_wrappers import blank_slice_deformation_wrapper
"""
* Assigning weights for the images by reading them from files or
applying weighting functions... | |
# #
# #
#
# Routes requests to the Data Access Framework through Python Thrift.
#
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 05/21/13 2023 dgilling Initial Creation.
# ... | |
# -*- coding: utf-8 -*-
"""
Class for reading the old data format from Plexon
acquisition system (.plx)
Note that Plexon now use a new format PL2 which is NOT
supported by this IO.
Compatible with versions 100 to 106.
Other versions have not been tested.
This IO is developed thanks to the header file downloadable fr... | |
"""Functions and classes related to optimization (weight updates)."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import re
import tensorflow.compat.v1 as tf
from REDACTED.tensorflow_models.mlperf.models.rough.bert import lamb_optimizer
def create_op... | |
"""Tests for certbot._internal.client."""
import datetime
import contextlib
import platform
import shutil
import tempfile
import unittest
from unittest.mock import MagicMock
from josepy import interfaces
from certbot import errors
from certbot import util
from certbot._internal.display import obj as display_obj
from ... | |
"""Define the `mydriver.main` way of controlling experiments.
"""
import sys
import logging
from .tools import flatten
from .api0 import open_db as sql_db, parse_dbstring
from .sql import HOST, HOST_WORKDIR, EXPERIMENT, FUCKED_UP
from .sql import insert_dict, hash_state
logging.basicConfig(level=logging.DEBUG, stream... | |
# jsb/plugs/core/core.py
#
#
""" core bot commands. """
## jsb imports
from jsb.lib.aliases import setalias
from jsb.lib.config import getmainconfig
from jsb.utils.statdict import StatDict
from jsb.utils.log import setloglevel, getloglevel
from jsb.utils.timeutils import elapsedstring
from jsb.utils.exception import... | |
"""
Tests the TextReader class in parsers.pyx, which
is integral to the C engine in parsers.py
"""
from io import BytesIO, StringIO
import os
import numpy as np
import pytest
import pandas._libs.parsers as parser
from pandas._libs.parsers import TextReader
from pandas import DataFrame
import pandas._testing as tm
f... | |
import ast
import builtins
import traceback
from enum import Enum
from sys import version_info
from textwrap import TextWrapper
from taichi.lang.exception import (TaichiCompilationError, TaichiNameError,
TaichiSyntaxError,
handle_exception_from_cpp)... | |
#!/usr/bin/python3
""" DHT_publish_AWS
##Copyright 2016 Clint H. O'Connor
##
## 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
##
... | |
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | |
import numpy as np
import logging
import collections
from pystella.rf import band
from pystella.rf.lc import SetLightCurve, LightCurve
__author__ = 'bakl'
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
err_prefix = ('er', 'er_', 'err', 'err_')
def read_table_header_float(fname, header=None, sk... | |
# Copyright 2016 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... | |
# Copyright 2011 Google 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 agreed to in writing, so... | |
# Copyright 2013 IBM Corp.
# Copyright (c) 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.