gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from numpy.testing import assert_, assert_allclose, assert_equal
from pytest import raises as assert_raises
import numpy as np
from scipy.optimize._lsq.common import (
step_size_to_bound, find_active_constraints, make_strictly_feasible,
CL_scaling_vector, intersect_trust_region, build_quadratic_1d,
minimiz... | |
#!/usr/bin/env python
"""A TestCase that initializes the library with standard API methods."""
import unittest
import ee
class ApiTestCase(unittest.TestCase):
def setUp(self):
self.InitializeApi()
def InitializeApi(self):
"""Initializes the library with standard API methods.
This is normally in... | |
try:
from . import generic as g
except BaseException:
import generic as g
class PlyTest(g.unittest.TestCase):
def test_ply_dtype(self):
# make sure all ply dtype strings are valid dtypes
dtypes = g.trimesh.exchange.ply.dtypes
for d in dtypes.values():
# will raise if d... | |
import gzip
import logging
import os
import pickle
from email.utils import mktime_tz, parsedate_tz
from importlib import import_module
from time import time
from weakref import WeakKeyDictionary
from w3lib.http import headers_raw_to_dict, headers_dict_to_raw
from scrapy.http import Headers, Response
from scrapy.respo... | |
import unittest
from emma.model.account import Account
from emma.enumerations import Report, DeliveryType
from emma import get_report
from tests.model import MockAdapter
class ReportingTest(unittest.TestCase):
def setUp(self):
Account.default_adapter = MockAdapter
self.account = Account(
... | |
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import collections
import contextlib
import fnmatch
import hashlib
import logging
import os
import platform
import posixpath
import shutil
im... | |
"""Tests for autocompletion."""
import imp
import sublime
import platform
from os import path
from EasyClangComplete.plugin.settings import settings_manager
from EasyClangComplete.plugin.utils import action_request
from EasyClangComplete.plugin.utils.subl import row_col
from EasyClangComplete.plugin.view_config import... | |
#
# 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... | |
# coding=utf-8
import hashlib
from raco import compile
from raco.algebra import Store, Select, Apply, Scan, CrossProduct, Sequence, \
ProjectingJoin, UnionAll, Sink, GroupBy, \
Limit, Intersection, Difference, Distinct, OrderBy, EmptyRelation, FileScan
from raco.backends.logical import OptLogicalAlgebra
from ... | |
DOMAIN_REGULAR = 'ibsear.ch/'
DOMAIN_NSFW = 'ibsearch.xxx/'
IMAGES_PATH = 'api/v1/images.json'
import random
import asyncio
import io
from urllib.parse import urlencode, unquote
class NoResults(Exception):
pass
class UnexpectedResponseCode(Exception):
pass
class Image:
def __init__(self, loop, baseurl,... | |
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | |
"""
Tasks for volume operations.
"""
import re
import time
from datetime import datetime
from celery import current_app as app
from celery.result import allow_join_result
from celery.decorators import task
from celery import chain
from threepio import celery_logger
from rtwo.driver import EucaDriver, OSDriver
from r... | |
from baseModule import SimpleBlackbox, BaseImplementation, execType
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLineEdit, QCheckBox, QSpacerItem, QSizePolicy
import os
__nodes__ = ["IfThenElse", "FileWatch", "MonitorName", "Compare", "Bool", "String"]
class IfThenElseImplement... | |
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.test import TestCase
from django.urls import reverse
from wagtail.core.models import Page, Site
from wagtail.tests.utils import WagtailTestUtils
class TestSiteIndexView(TestCase, WagtailTestUtils):
def se... | |
# coding=utf-8
# Copyright 2019 The Google AI Language Team 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 ... | |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | |
# 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... | |
# General Utility Methods for Algorithms
import random as rand
import numpy as np
import numpy.matlib
import matplotlib.pyplot as pyplot
import matplotlib.colors as plotcolors
# James
def multiply_matrix(matrix_1, matrix_2):
if matrix_1.shape[1] != matrix_2.shape[0]:
return None
result = np.empty((m... | |
# -*- coding: utf-8 -*-
import collections
from ecoxipy import _unicode
from ecoxipy import _helpers
from ._common import _string_repr
class NamespaceNameMixin(object):
'''\
Contains functionality implementing `Namespaces in XML
<http://www.w3.org/TR/REC-xml-names/>`_.
'''
_slots = {'_namespace_p... | |
import copy
import datetime
import unittest
from test import libvtd_test
import libvtd.node
from third_party import six
class TestNode(unittest.TestCase):
"""Test various "node" types (Project, Next Action, Comment, etc.)"""
def testParsingDueDates(self):
""" Check that valid due dates get parsed,... | |
######################################################################
#
# Copyright (C) 2013
# Associated Universities, Inc. Washington DC, USA,
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published by
# the Free Software Fo... | |
# -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation t... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""recipe.py: the main functionality of this program"""
__author__ = "Daniel O'Connell"
__copyright__ = "BSD-3"
import logging
import wx
import wx.richtext as rt
import sqlalchemy.exc
import GUI
from widgets.recipePanel import RecipePanel
from widgets.editRecipe import... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC
# Copyright 2011 Ilya Alekseyev
#
# 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://w... | |
from __future__ import absolute_import # Same name as silme library.
"""
Parser for silme-compatible translation formats.
"""
import codecs
import os
from collections import OrderedDict
from copy import copy
import silme
from silme.format.dtd import FormatParser as DTDParser
from silme.format.ini import FormatParser ... | |
#!/usr/bin/env python
#
# Copyright 2010 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 o... | |
# By Samhan Salahuddin
# 25th November 2016
from midiutil.MidiFile import MIDIFile
from random import randint
from random import randrange
class MIDIGenerator(object):
def __init__(self,fileName):
self.outputFileName = fileName
self.MIDIObject = MIDIFile(1)
self.track = 0
self.MI... | |
from pathlib import Path
import pandas as pd
from sqlalchemy import create_engine, inspect, Table, Column
from collections import defaultdict
from ilxutils.tools import light_degrade, open_pickle, create_pickle
import os
#ELASTIC = 'https://5f86098ac2b28a982cebf64e82db4ea2.us-west-2.aws.found.io:9243/interlex/term/'
TE... | |
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection
from django.db.models import Prefetch, QuerySet
from django.db.models.query import get_prefetcher
from django.test import TestCase, override_settings
from django.test.utils i... | |
# __init__.py - fsmonitor initialization and overrides
#
# Copyright 2013-2016 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''Faster status operations with the Watchman file monitor (EXPERIMENTAL)
Integrates th... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import sys
import warnings
from optparse import OptionParser, make_option as Option
from .. import __version__, Celery
from ..exceptions import CDeprecationWarning, CPendingDeprecationWarning
# always enable DeprecationWarnings, so our users ... | |
from __future__ import absolute_import, print_function
import os
import sys
import requests
import json
import numpy as np
import time
import logging
cur_dir = os.path.dirname(os.path.abspath(__file__))
import torch
import torch.utils.data as data
from torch import nn, optim
from torch.autograd import Variable
import... | |
# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Start and stop Web Page Replay."""
import atexit
import logging
import os
import re
import signal
import subprocess
import sys
import tempfile
import url... | |
# Django settings for django-photographer - deployment with Heroku.
import os
import sys
import urlparse
import django.conf.global_settings as DEFAULT_SETTINGS
import dj_database_url
DEBUG = bool(os.environ.get('DJANGO_DEBUG', ''))
TEMPLATE_DEBUG = DEBUG
ADMINS = (
(os.environ.get('ADMIN_NAME', ''), os.environ.... | |
# -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import re
import socket
from errno import ENOTCONN
from gunicorn.http.unreader import SocketUnreader
from gunicorn.http.body import ChunkedReader, LengthReader, EOFReader, Body
from gunicorn.... | |
# -*- coding: UTF-8 -*-
# YaBlog
# (c) Regis FLORET
# 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 fol... | |
# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
from __future__ import absolute_import
import os
import boto3
import pytest
from moto import mock_s3
from instana.singletons import tracer
from ...helpers import get_first_span_by_filter
pwd = os.path.dirname(os.path.abspath(__file__))
upload_filenam... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import bytes_to_native_str as n
from past.builtins import long
import argparse
import csv
import locale
import logging
import mmap
import os
import sys
import traceback
import types
from .compat i... | |
# Copyright (c) 2014 Openstack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | |
import datetime
import json
import os
import traceback
from dateutil.parser import parse
from great_expectations import DataContext
from great_expectations.cli.upgrade_helpers.base_upgrade_helper import BaseUpgradeHelper
from great_expectations.data_context.store import (
DatabaseStoreBackend,
HtmlSiteStore,
... | |
"""
Generate a random sample of rows from a relational database that preserves
referential integrity - so long as constraints are defined, all parent rows
will exist for child rows.
Good for creating test/development databases from production. It's slow,
but how often do you need to generate a test/development databa... | |
'''
An RMI framework for synapse.
'''
import copy
import getpass
import threading
import threading
import traceback
import synapse.link as s_link
import synapse.async as s_async
import synapse.crypto as s_crypto
import synapse.dyndeps as s_dyndeps
import synapse.eventbus as s_eventbus
import synapse.lib.pki as s_pki
... | |
""" Vanilla RNN
@author Graham Taylor
"""
import numpy as np
import theano
import theano.tensor as T
from sklearn.base import BaseEstimator
import logging
import time
import os
import datetime
import pickle as pickle
import math
import matplotlib.pyplot as plt
plt.ion()
mode = theano.Mode(linker='cvm')
#mode = '... | |
'''
Kivy framework
==============
Kivy is an open source library for developing multi-touch applications. It is
completely cross-platform (Linux/OSX/Win) and released under the terms of the
MIT License.
It comes with native support for many multi-touch input devices, a growing
library of multi-touch aware widgets and... | |
# Skytraq Venus module
import serial
import time
import datetime
import math
from ftplib import FTP
import struct
class Venus6:
"Venus6 GPS object"
MSG_TYPE_SOFT_VERSION_Q = 0x02
MSG_TYPE_SOFT_CRC_Q = 0x03
MSG_TYPE_CONF_SERIAL = 0x05
MSG_TYPE_LOG_STATUS_Q = 0x17
MSG_TYPE_LOG_CL... | |
import mock
from django import test
from django.conf import settings
from django.http import Http404
from cradmin_legacy import cradmin_testhelpers
from cradmin_legacy.crinstance import reverse_cradmin_url
from model_bakery import baker
from devilry.apps.core.models import Assignment
from devilry.devilry_admin.views.a... | |
import ray
import os
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import torchvision.datasets as dset
import torchvision.transforms as transforms
import torchvision.utils as vutils
import numpy as np
from torch.autograd import Variable
from torch.nn import functional as F
from s... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import sys
import core.bonds
import core.control
from gui.tabs.file_tab import FileTabDock
from gui.tabs.view_tab import ViewTabDock
from gui.tabs.image_video_tab import ImageVideoTabDock
from gui.tabs.statistics_tab import StatisticsTabDock
f... | |
#
# 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
# ... | |
# 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... | |
""" Performance test for pika
"""
import logging
from optparse import OptionParser
import sys
import pika
g_log = logging.getLogger("pika_perf")
ROUTING_KEY = "test"
#logging.getLogger("pika").setLevel(logging.DEBUG)
def main():
logging.basicConfig(
level=logging.INFO,
format='%(asctime)-15s %(name)s(%... | |
"""Unit tests for qrscp.py verification service."""
import logging
import os
import subprocess
import sys
import tempfile
import time
import pytest
from pydicom import dcmread
from pydicom.uid import (
ExplicitVRLittleEndian, ImplicitVRLittleEndian,
DeflatedExplicitVRLittleEndian, ExplicitVRBigEndian
)
from... | |
#!/usr/bin/env python
"""
Created by stevertaylor
Copyright (c) 2014 Stephen R. Taylor
Code contributions by Rutger van Haasteren (piccard) and Justin Ellis (PAL/PAL2).
"""
import numpy as np
from numpy import *
import os
import math
from scipy import integrate
from scipy import optimize
from scipy import constants... | |
"""Compressed Sparse Row matrix format"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['csr_matrix', 'isspmatrix_csr']
import numpy as np
from scipy.lib.six import xrange
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
... | |
# Copyright 2010 Google Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# trib... | |
import logging
log = logging.getLogger(__name__)
import lmfit
import numpy as np
from scipy import optimize
from collections import OrderedDict
from pycqed.analysis import fitting_models as fit_mods
from pycqed.analysis_v3 import fitting as fit_mod
from pycqed.analysis_v3 import plotting as plot_mod
from pycqed.analys... | |
from core.clients import ProximityClient
from core.models import Interface, Method, Trigger, MethodParameter
from django.conf import settings
from django.test.testcases import TestCase
from mock import patch
import json
# Patch the MirriClient used by forms with a mock object in every test
@patch('core.forms.MirriClie... | |
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Classify protein backbone structure according to Kolodny et al's fragment
libraries.
I... | |
from unittest import mock
from django.contrib.contenttypes.models import ContentType
from django.db.models import Count, Q
from django.test import TestCase
from wagtail.core.models import Locale, Page, PageViewRestriction, Site
from wagtail.core.signals import page_unpublished
from wagtail.search.query import MATCH_A... | |
# 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... | |
import uuid, json
from esprit import raw, util, tasks
from copy import deepcopy
import time
class StoreException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class DAO(object):
@classmethod
def makeid(cls):
return uui... | |
# 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 ... | |
#!/usr/bin/env python
#
# Copyright 2015 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... | |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sys
import os
import time
import tempfile
import re
import traceback
sys.path.insert(0, os.path.abspath(os.path.... | |
"""Config flow for Plex."""
import copy
import logging
from aiohttp import web_response
import plexapi.exceptions
from plexapi.gdm import GDM
from plexauth import PlexAuth
import requests.exceptions
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.http.view import HomeAs... | |
import boto
import six
class FieldLists():
ADDRESS = [
'allocation_id',
'association_id',
'domain',
'instance_id',
'network_interface_id',
'network_interface_owner_id',
'private_ip_address',
'public_ip'
]
BLOCK_DEVICE_TYPE = [
'attac... | |
import math
import operator
import sys
import pickle
import multiprocessing
import ctypes
import warnings
from distutils.version import LooseVersion
import re
import numpy as np
from numba import njit, jit, vectorize, guvectorize, objmode
from numba.core import types, errors, typing, compiler, cgutils
from numba.core... | |
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | |
#! /usr/bin/env python
__author__ = "Jose Caballero"
__email__ = "jcaballero@bnl.gov"
"""
Code to store and manipulate data.
-------------------------------------------------------------------------------
class StatusInfo
-------------------------------------------------------------------... | |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: xmlrpclib.py
"""
An XML-RPC client interface for Python.
The marshalling and response parser code can also be used to
implement XML-RPC servers.
Ex... | |
from celery.schedules import crontab
import djcelery
from django.conf.global_settings import EMAIL_BACKEND
import os, sys, logging
import subprocess
###############################
# MISC #
##############################
ROOT_PATH = os.path.dirname(__file__)
def to_absolute_path(path):
re... | |
from __future__ import print_function, absolute_import, division
import pytest
import warnings
from astropy.io import fits
import numpy as np
from ..wcs_utils import (WCS, drop_axis, wcs_swapaxes, add_stokes_axis_to_wcs,
axis_names, slice_wcs, check_equality, strip_wcs_from_header)
from . im... | |
"""Module/script to byte-compile all .py files to .pyc (or .pyo) files.
When called as a script with arguments, this compiles the directories
given as arguments recursively; the -l option prevents it from
recursing into directories.
Without arguments, if compiles all modules on sys.path, without
recursing into subdir... | |
"""
sentry.testutils.cases
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
__all__ = (
'TestCase', 'TransactionTestCase', 'APITestCase', 'AuthProviderTestCase',
'RuleTest... | |
'''
Created on 2009/07/17
@author: kamiya
'''
import sys, os
import itertools
import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from pyrem_torq.treeseq import *
from pyrem_torq.expression import *
def mc4la_to_readable(r):
if r is None: return None
nodes, literals, epsilon = r.no... | |
# 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 (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2011, James Vega
# 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 copyri... | |
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models import Q
from django.http import HttpResponseRedirect, HttpResponseForbidden, Http404
from django.shortcuts import render_to_response, ge... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.rebol
~~~~~~~~~~~~~~~~~~~~~
Lexers for the REBOL and related languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups
from pygmen... | |
'''
PIPELINE
BETA 1.0.0
Project manager for Maya
Ahutor: Lior Ben Horin
All rights reserved (c) 2016
liorbenhorin.ghost.io
liorbenhorin@gmail.com
---------------------------------------------------------------------------------------------
install:
Place the pipeline folder in your maya scripts folder. Ru... | |
# 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... | |
data = (
'jjwaels', # 0x00
'jjwaelt', # 0x01
'jjwaelp', # 0x02
'jjwaelh', # 0x03
'jjwaem', # 0x04
'jjwaeb', # 0x05
'jjwaebs', # 0x06
'jjwaes', # 0x07
'jjwaess', # 0x08
'jjwaeng', # 0x09
'jjwaej', # 0x0a
'jjwaec', # 0x0b
'jjwaek', # 0x0c
'jjwaet', # 0x0d
'jjwaep', # 0x0e
'jjw... | |
"""
Utility classes and methods to pickle parts of symbolic graph.
These pickled graphs can be used, for instance, as cases for
unit tests or regression tests.
"""
import numpy
import os
import pickle
import sys
import tempfile
import zipfile
import warnings
from collections import defaultdict
from contextlib import c... | |
"""Tools to generate simulated TESS images."""
import numpy as np
import zachopy.utils
import astropy.io.fits
import scipy.ndimage.measurements
import os
import matplotlib.pylab as plt
import matplotlib.gridspec as gridspec
import Cosmics
import Stamper
import logging
from settings import log_file_handler
logger = log... | |
"""SIESTA calculator interface."""
# Copyright (C) 2015 Henrique Pereira Coutada Miranda
# All rights reserved.
#
# This file is part of phonopy.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions o... | |
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Raw data collector for coverage.py."""
import os, sys
from coverage import env
from coverage.backward import iitems
from coverage.files import abs_file
from co... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2014, Ocean Systems Laboratory, Heriot-Watt University, UK.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follow... | |
from collections import namedtuple
from games import (Game)
from queue import PriorityQueue
from copy import deepcopy
class GameState:
def __init__(self, to_move, board, label=None, depth=8):
self.to_move = to_move
self.board = board
self.label = label
self.maxDepth = depth
def... | |
# Copyright 2020 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... | |
# 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 serial
# import time
# import sys
import platform
class sms_motor(object):
def __init__(self, motorId, resolution_bits, limits, homing_position_ticks):
self.motorId = motorId
self.resolution_bits = resolution_bits
self.limits = limits
self.homing_position_ticks = homing_pos... | |
#
# Copyright (c) 1996-2005, SR Research Ltd., All Rights Reserved
#
#
# For use by SR Research licencees only. Redistribution and use in source
# and binary forms, with or without modification, are NOT permitted.
#
#
#
# Redistributions in binary form must reproduce the above copyright
# notice, this list of condition... | |
# 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... | |
"""Tests for Climacell weather entity."""
from __future__ import annotations
from datetime import datetime
from typing import Any
from unittest.mock import patch
import pytest
from homeassistant.components.climacell.config_flow import (
_get_config_schema,
_get_unique_id,
)
from homeassistant.components.clim... | |
__author__ = 'linus'
def create_query(search_dict):
""" Creates a query parts dictionary
:search_dict search_dict:
Dict contains:
peptide
ms_run
source_name
source (organ/tissue/dignity)
person
source_hla_typing (TODO)
spectrum_hit (ionscore, e-val... | |
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Test for Kconfig checker"""
import contextlib
import io
import os
import pathlib
import re
import sys
import tempfile
import unittest
import kconfig_c... | |
import logging
import os
import re
from textwrap import dedent
import pytest
from ufo2ft.errors import InvalidFeaturesData
from ufo2ft.featureCompiler import parseLayoutFeatures
from ufo2ft.featureWriters import ast
from ufo2ft.featureWriters.markFeatureWriter import (
MarkFeatureWriter,
NamedAnchor,
pars... | |
#! python
# -*- coding: utf-8 -*-
"""
WavyTool is a simple program that allows you to acquire data from input devices,
i.e microphones, and save them as file (csv, png). Also, you can perform
some simple processing as spectral analysis.
:authors: Daniel Cosmo Pizetta, Wesley Daflita
:contact: daniel.pizetta@usp.br, w... | |
"""
==========================
Mel To Python Translator
==========================
Convert mel scripts into python scripts.
Known Limitations
=================
array index assignment
----------------------
In mel, you can directly assign the value of any element in an array, and all intermediate elements will be
... | |
import json
import logging
import webapp2
from google.appengine.ext import ndb
from consts.auth_type import AuthType
from controllers.api.api_base_controller import ApiTrustedBaseController
from datafeeds.parsers.json.json_alliance_selections_parser import JSONAllianceSelectionsParser
from datafeeds.parsers.json.js... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.