gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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... | |
# Copyright 2014 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 agre... | |
from functools import update_wrapper
from django.conf.urls import url
from django.contrib import admin, messages
from django.contrib.admin.utils import unquote
from django.core.urlresolvers import reverse
from django.db.utils import IntegrityError
from django.http import (
Http404, HttpResponseForbidden, HttpRespo... | |
"""
Pub Web Swervice
"""
import json
from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.python.components import registerAdapter
from twisted.web import http
from twisted.web.client import HTTPClientFactory
from twisted.web.resource import IResource, Resource
from twisted.web.server import ... | |
"""Tools for working with the host system"""
# Copyright 2012 Canonical Ltd.
#
# Authors:
# Nick Moffitt <nick.moffitt@canonical.com>
# Matthew Wedgwood <matthew.wedgwood@canonical.com>
import os
import pwd
import grp
import random
import string
import subprocess
import hashlib
from collections import OrderedDict
... | |
#!/usr/bin/env python
# chadicohen.py Richard P. Muller, 12/99
# This program is the tight-binding program for Diamond/Zincblende
# structures that is presented in Chadi and Cohen's paper
# "Tight-Binding Calculations of the Valence Bands of Diamond and
# Zincblende Crystals", Phys. Stat. Soli. (b) 68, 405 (1975). T... | |
# Copyright 2011 Grid Dynamics
# Copyright 2011 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... | |
# 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... | |
import re
from django.utils.translation import ugettext as _
from eulxml.xpath import parse as parse_xpath
from eulxml.xpath.ast import FunctionCall, Step, UnaryExpression, serialize
from corehq.apps.case_search.xpath_functions import (
XPATH_FUNCTIONS,
XPathFunctionException,
)
from corehq.apps.es import fi... | |
from __future__ import print_function
from typing import Any, Callable, Iterable, List, Optional, Set, Tuple
from django.test import TestCase
from django.test.runner import DiscoverRunner
from django.test.signals import template_rendered
from zerver.lib.cache import bounce_key_prefix_for_testing
from zerver.lib.sqla... | |
#!/usr/bin/python
"""
Creators GET API interface v0.3.2
Full API docs: http://get.creators.com/docs/wiki
@author Brandon Telle <btelle@creators.com>
@copyright (c) 2015 Creators <www.creators.com>
"""
import subprocess, shlex, re, urllib, os.path
# Python 3+ puts urlencode in urllib.parse
try:
from urllib import... | |
# -*- coding: utf-8 -*-
""" Set of ESC/POS Commands (Constants)
This module contains constants that are described in the esc/pos-documentation.
Since there is no definitive and unified specification for all esc/pos-like printers the constants could later be
moved to `capabilities` as in `escpos-php by @mike42 <https:... | |
"""
Object tree representation of GFF3 data and parser for GFF3 files.
See: http://www.sequenceontology.org/gff3.shtml
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import urllib
import copy
import re
import gzip
import bz2
import collections
GFF3_... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
from __future__ import print_function
from collections import OrderedDict
import numpy as np
from numpy import log, exp, logaddexp, asarray, any as npany, c_ as vconcat,\
isinf, isnan, ones_like
from pandas import DataFrame
from scipy import special
from scipy import misc
from lifetimes.utils impor... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# c1219/constants.py
#
# 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 ... | |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | |
__author__ = 'jmeline'
from .. import serviceBase
# from ...ODM2.models import *
from ODM2PythonAPI.src.api.ODM2 import models
# ################################################################################
# Annotations
# ################################################################################
def conver... | |
import numpy as np
import pytest
import warnings
import os
from stingray import Lightcurve
from stingray.crosscorrelation import CrossCorrelation, AutoCorrelation
from stingray.exceptions import StingrayError
try:
import matplotlib.pyplot as plt
HAS_MPL = True
except ImportError:
HAS_MPL = False
class... | |
#!/usr/bin/env python3
import importlib.util
import os
import subprocess
import sys
import git
import github
# Try to import, but its not critical
libnames = ['bot_jokes']
for libname in libnames:
try:
lib = __import__(libname)
except Exception:
print(sys.exc_info())
else:
globals... | |
####################################################################################################
# The MIT License (MIT)
#
# Copyright (c) 2015, Alexander I. Mykyta
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentatio... | |
#-*- coding: utf-8 -*-
"""
TODO:
- Test with a larger dataset.
- Add choice for regression vs classification.
(separate methods or function params)
- Add more algorithms.
"""
import time
import numpy as np
from sklearn import datasets, svm, neighbors, linear_model, naive_bayes, tree, ensemble
from sklearn.grid_sea... | |
#!/usr/bin/python2.4
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software
# Foundation; All Rights Reserved
"""A HTTPSConnection/Handler with additional proxy and cert validation features.
In particular, monkey patches in Python r74203 to provide support for CONNECT
proxies and adds SSL cert val... | |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import os
from pkg_r... | |
"""
Backends for embarrassingly parallel code.
"""
import gc
import os
import sys
import warnings
import threading
from abc import ABCMeta, abstractmethod
from .format_stack import format_exc
from .my_exceptions import WorkerInterrupt, TransportableException
from ._multiprocessing_helpers import mp
from ._compat impo... | |
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# 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... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from tes... | |
from __future__ import unicode_literals
import unittest
import warnings
from datetime import datetime
from django.core.paginator import (
EmptyPage, InvalidPage, PageNotAnInteger, Paginator,
UnorderedObjectListWarning,
)
from django.test import TestCase
from django.utils import six
from .custom import ValidA... | |
# -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | |
import datetime
from authkit.users import *
from paste.util.import_string import eval_import
"""
def authkit_get_conn(mode='write'):
return g.pool.connection()
def authkit_release_conn(conn):
conn.close()
"""
class UsersDriver(Users):
"""
Raw SQL Version
"""
def __init__(self, data, encrypt=N... | |
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | |
#!/usr/bin/env python
from wsgiref.simple_server import make_server
import sys
import json
import traceback
import datetime
from multiprocessing import Process
from getopt import getopt, GetoptError
from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\
JSONRPCError, ServerError, InvalidRequestE... | |
"""
Magic Link.
pymdownx.magiclink
An extension for Python Markdown.
Find HTML, FTP links, and email address and turn them to actual links
MIT license.
Copyright (c) 2014 - 2017 Isaac Muse <isaacmuse@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associa... | |
from dejavu.database import get_database, Database
import dejavu.decoder as decoder
import fingerprint
import multiprocessing
import os
import traceback
import sys
class Dejavu(object):
SONG_ID = "song_id"
SONG_NAME = 'song_name'
CONFIDENCE = 'confidence'
MATCH_TIME = 'match_time'
OFFSET = 'offse... | |
# -*- encoding: utf-8 -*-
#
# 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... | |
#
# 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 us... | |
#
# blast2iso.py
#
# (c) 2013, martin isenburg - http://rapidlasso.com
# rapidlasso GmbH - fast tools to catch reality
#
# uses blast2iso.exe to contour a folder of LiDAR files
#
# LiDAR input: LAS/LAZ/BIN/TXT/SHP/BIL/ASC/DTM
# vector output: SHP/WKT/KML/TXT
#
# for licensing see http://lastools.org/LICENSE.txt
#... | |
#!/bin/env python
import fitsio, numpy as np, json
import esutil as eu
from shear_stacking import *
from sys import argv
from multiprocessing import Pool, current_process, cpu_count
from glob import glob
import pylab as plt
def getValues(s, key, functions):
# what values are used for the slices: functions are di... | |
'''
Code for mmDGM
Author: Chongxuan Li (chongxuanli1991@gmail.com)
Co-author: Tianlin Shi
Version = '1.0'
'''
import sys
import signal
sys.path.append('..')
sys.path.append('../../data/')
import os, numpy as np
import scipy.io as sio
import time
import math
import pdb
import color
import anglepy as ap
import anglep... | |
"""
Calculate error due to thermochemical quantities: heat capacity, entropy, enthalpy.
"""
import logging
from collections import OrderedDict
from typing import List
import symengine
from scipy.stats import norm
import numpy as np
from tinydb import where
from pycalphad import Model, ReferenceState, variables as v
... | |
from insights.parsers import openshift_get
from insights.tests import context_wrap
import datetime
import doctest
OC_GET_POD = """
apiVersion: v1
items:
- apiVersion: v1
kind: Pod
metadata:
annotations:
openshift.io/scc: anyuid
creationTimestamp: 2017-02-10T16:33:46Z
labels:
name: hello-ope... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'DatabaseMigrate'
db.create_table(u'maintenance_databasemi... | |
# 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 u... | |
#!/usr/bin/env python
#
# Copyright 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 o... | |
# Copyright 2011 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... | |
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list o... | |
#
# Copyright 2014 Quantopian, 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 wr... | |
#!/usr/bin/env python3
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# 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
# ... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 17:35:20 2017
@author: xueyunzhe
"""
import tensorflow as tf
w_init = tf.contrib.layers.variance_scaling_initializer()
w_regular = tf.contrib.layers.l2_regularizer(0.0002)
act_fn = tf.nn.relu
train=True
def conv_factory(data, num_filter, kerne... | |
# Copyright 2012 Nebula, 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 agree... | |
try:
from builtins import object
except ImportError:
pass
from transitions.core import Enum
from transitions.extensions.markup import MarkupMachine, HierarchicalMarkupMachine, rep
from .utils import Stuff
from functools import partial
from unittest import TestCase, skipIf
try:
from unittest.mock import ... | |
#
# Copyright 2019, Institute for Systems Biology
#
# 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 o... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# # Deleting field 'Especies.dano'
# db.delete_column(u'ficha_granos_basi... | |
# Copyright 2012 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/LICENSE-2.0
#
# Unless required by applicable ... | |
# Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Locators for all the elements"""
# pylint: disable=too-few-public-methods
from selenium.webdriver.common.by import By
from lib.constants import attribute
from lib.constants import objects
from lib.const... | |
# -*- coding: utf-8 -*-
""" Sahana Eden Document Library
@copyright: 2011-2015 (c) Sahana Software Foundation
@license: MIT
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 wi... | |
# Copyright (c) 2012 Adi Roiban.
# See LICENSE for details.
"""
Utility code for Brink.
"""
from __future__ import (
absolute_import,
print_function,
with_statement,
unicode_literals,
)
from contextlib import closing
from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED
from hashlib import md5, sha256... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the ... | |
import json
from fixture import BadRequest, MusicService, Unknown
from pytest import fixture, mark, raises
from six import text_type
from werkzeug.test import Client as WTestClient
from werkzeug.wrappers import Response
from nirum.deserialize import deserialize_meta
from nirum.rpc import Client, WsgiApp
from nirum.se... | |
# coding: utf-8
from __future__ import absolute_import
from flask import json
from six import BytesIO
from tapi_server.models.inline_object10 import InlineObject10 # noqa: E501
from tapi_server.models.inline_object16 import InlineObject16 # noqa: E501
from tapi_server.models.inline_object21 import InlineObject21 ... | |
# -*- 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... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import logging
impor... | |
"""Strategies for creating new instances of Engine types.
These are semi-private implementation classes which provide the
underlying behavior for the "strategy" keyword argument available on
:func:`~sqlalchemy.engine.create_engine`. Current available options are
``plain``, ``threadlocal``, and ``mock``.
New strategi... | |
import numpy
from numpy.testing import assert_equal, assert_almost_equal
class Toroid(object):
def __init__(self, coeff=None):
self.r_maj = 1e10 # initialize as plane
self.r_min = 1e10 # initialize as plane
if coeff is not None:
self.coeff = coeff.copy()
else:
... | |
"""
The main `CommandLineInterface` class and logic.
"""
from __future__ import unicode_literals
import functools
import os
import signal
import six
import sys
import textwrap
import threading
import time
import types
import weakref
from subprocess import Popen
from .application import Application, AbortAction
from ... | |
import datetime
import logging
import signal
import threading
import time
from huey.exceptions import DataStoreGetException
from huey.exceptions import QueueException
from huey.exceptions import QueueReadException
from huey.exceptions import DataStorePutException
from huey.exceptions import QueueWriteException
from hu... | |
''' Tests for netcdf '''
from __future__ import division, print_function, absolute_import
import os
from os.path import join as pjoin, dirname
import shutil
import tempfile
import warnings
from io import BytesIO
from glob import glob
from contextlib import contextmanager
import numpy as np
from numpy.testing import a... | |
#!/usr/bin/env python
from __future__ import with_statement
from gevent import monkey, spawn, sleep
monkey.patch_all()
from Cookie import Cookie
from cgi import FieldStorage
from logging import getLogger, StreamHandler
from mimetypes import guess_type
import os
import sys
from tempfile import gettempdir
from tracebac... | |
import collections
import copy
import random
random.seed()
class Strategy(object):
def __init__(self, target_strategy, guess_strategy, discard_strategy):
self._last_seen_hand = None
self._target_strategy = target_strategy
self._guess_strategy = guess_strategy
self._discard_str... | |
import sys
import time
import pytest
import ray
from ray.util import ActorPool
@pytest.fixture
def init():
ray.init(num_cpus=4)
yield
ray.shutdown()
def test_get_next(init):
@ray.remote
class MyActor:
def __init__(self):
pass
def f(self, x):
return x + 1... | |
#!/usr/bin/env python
# -*- coding: latin-1 -*-
#------------------------------------------------------------------------------#
# Positive or negative text classifier with the Bayes method #
# ============================================================================ #
# Organization: HE-Arc Engin... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Luis Hdez <luis.munoz.hdez@gmail.com> [npm -> apm]
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'version': '1.0'}
DOCUMENTATION = '''
---
module: apm
short_description: Manage atom packages with a... | |
"""
This code was generated by Codezu.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
"""
from mozurestsdk.mozuclient import default as default_client
from mozurestsdk.mozuurl import MozuUrl;
from mozurestsdk.urllocation import UrlLocation
from mozure... | |
# 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 u... | |
import itertools
import pytest
from tlz import merge
np = pytest.importorskip("numpy")
import dask
import dask.array as da
from dask import config
from dask.array.slicing import (
_sanitize_index_element,
_slice_1d,
make_block_sorted_slices,
new_blockdim,
normalize_index,
sanitize_index,
... | |
from rest_framework.viewsets import ModelViewSet
from rest_framework.filters import SearchFilter, OrderingFilter
from django_filters.rest_framework import DjangoFilterBackend
from datetime import datetime, timedelta
from api.models import *
from api.permission import HasGroupPermission
from api.v340.launch.filters imp... | |
#!/usr/bin/env python3
#
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import argparse
import fnmatch
import logging
import re
import subprocess
from pathlib import Path
from types import SimpleNamespace
import hjson
... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the ... | |
# 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 u... | |
# -*- coding: utf-8 -*-
from os import path
from gluon import *
from gluon.storage import Storage
from s3 import *
# =============================================================================
class index():
""" Custom Home Page """
def __call__(self):
request = current.request
response =... | |
# 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... | |
# Copyright (c) 2013 Qubell Inc., http://qubell.com
#
# 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... | |
# Copyright 2011 the Melange 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 to in wr... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 14, 2011
@author:Isabel Restrepo
Threshold taylor coefficients. Each block is processed in a separate thread.
"""
import os;
import bvpl_octree_batch
import multiprocessing
import Queue
import time
import random
import optparse
import sys
from numpy im... | |
# 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 applica... | |
from __future__ import (division, unicode_literals, print_function,
absolute_import)
import json
from urllib.parse import urlparse
import requests
class RequestError(Exception):
"""An error in the http get/post request."""
def __init__(self, response):
self.response = response
... | |
import numpy as np
from keras.layers import (
Input,
BatchNormalization,
Activation, Dense, Dropout, Merge,
Convolution2D, MaxPooling2D, ZeroPadding2D
)
from keras.models import Model
from keras.engine import Layer
from keras.utils.visualize_util import plot
from keras import backend as K
if K._BACKEND... | |
'''
Module containing `Observation` class.
The `Observation` class is the superclass of all observation classes. Its metaclass
processes declarative observation class definitions to create the observation classes
from which observation instances are created. The `Observation` initializer initializes
all fields of a ne... | |
# ============================================================================
# Author : swc21
# Date : 2018-03-13 20:11:26
# Project : GitHub
# File Name : starcat_gui
# Last Modified by : swc21
# Last Modified time : 2018-03-15 20:46:19
# ============... | |
# 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 appl... | |
#!/usr/bin/env python
"""Usage: python suppress_output.py COMMAND...
Run the given command and print "in progress..." messages to stderr,
one per minute, as long as the command is producing some output. If
the command has not recently produced any output, no further messages
will be printed until it does.
When the c... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
| This file is part of the web2py Web Framework
| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This file specifically includes utilities for security.
---------------------------------------------... | |
from smap.archiver.client import SmapClient
import time
import datetime
import json
import pandas as pd
#pd.options.display.mpl_style = 'default'
client = SmapClient('http://ciee.cal-sdb.org:8079')
# timestamps
end = int(time.time())
start = end - 60*60*24*30 # last month
print start, end
def get_demand():
# get ... | |
# ===============================================================================
# Copyright 2019 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/LICE... | |
"""CLI script to simulate transcriptome reads
"""
import sys, argparse, gzip, os, itertools
from seqtools.format.gpd import GPDStream
from seqtools.format.fasta import FASTAData
from seqtools.structure.transcriptome import Transcriptome
from seqtools.simulation.emitter import TranscriptomeEmitter
from seqtools.simulat... | |
import generic_kalman
import shm
from settings import dt
from conf.vehicle import gravity_force as vehicle_weight
from conf.vehicle import dvl_present
from conf.vehicle import measurement_error
from auv_math.quat import Quaternion
from cupy import array, radians, sin, cos, zeros, eye
class PositionFilter(generic_... | |
# Copyright (c) 2012 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... | |
# Copyright 2020 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, s... | |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# 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 l... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.