gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- coding: utf-8 -*-
from nose.tools import * # flake8: noqa (PEP8 asserts)
import mock
import urlparse
from framework.celery_tasks import handlers
from website.files.models.osfstorage import OsfStorageFile
from website.preprints.tasks import format_preprint
from website.util import permissions
from framework.aut... | |
import datetime
import uuid
from lxml import etree
import webtest
from keystone import auth
from keystone.common import serializer
from keystone.common.sql import util as sql_util
from keystone import config
from keystone.openstack.common import timeutils
from keystone.policy.backends import rules
from keystone impor... | |
"""Tests for the Z-Wave init."""
import asyncio
from collections import OrderedDict
from datetime import datetime
import unittest
from unittest.mock import MagicMock, patch
import pytest
from pytz import utc
import voluptuous as vol
from homeassistant.bootstrap import async_setup_component
from homeassistant.componen... | |
# -*- 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/env python
# -*- coding: utf-8 -*-
#
# Reference:
# WpcapSrc_4_1_3
#
# TODO:
# Remote capture
# AirPcap
#
from ctypes import *
from ctypes.util import find_library
import sys
WIN32 = True if sys.platform.startswith('win') else False
if WIN32:
MSDOS, WPCAP, HAVE_REMOTE = True, True, True
_... | |
# This script generates a Python interface for an Apple Macintosh Manager.
# It uses the "bgen" package to generate C code.
# The function specifications are generated by scanning the mamager's header file,
# using the "scantools" package (customized for this particular manager).
#
# XXXX TO DO:
# - Implement correct m... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | |
# Copyright 2019 DeepMind Technologies Limited.
#
# 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... | |
# Copyright 2021 The Distla Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | |
'''
SequenceBase.py
Copyright (c) 2003 - 2008 James Urquhart(j_urquhart@btinternet.com)
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 right... | |
# orm/strategies.py
# Copyright (C) 2005-2014 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
"""sqlalchemy.orm.interfaces.LoaderStrategy
implementations, and related MapperOp... | |
import configparser
import json
import os
import unittest
import uuid
import pandas as pd
from TM1py import Subset
from TM1py.Objects import Process, Dimension, Hierarchy, Cube
from TM1py.Services import TM1Service
from TM1py.Utils import TIObfuscator
from TM1py.Utils import Utils, MDXUtils
from TM1py.Utils.MDXUtils ... | |
"""Test for certbot_nginx._internal.nginxparser."""
import copy
import operator
import tempfile
import unittest
from pyparsing import ParseException
from certbot_nginx._internal.nginxparser import dump
from certbot_nginx._internal.nginxparser import dumps
from certbot_nginx._internal.nginxparser import load
from cert... | |
import argparse
from . import RedmineCliException
from arguments import Arguments as A
from formatter import BaseFormatter, ListFormatter, ResourceFormatter, UpdateFormatter
from redminelib.resultsets import ResourceSet
BASE_LIST_COMMAND_ARGS = [
A('--limit', type=int, help='Limit', default=100),
A('--offset'... | |
from array import array
import sys
from py.test import raises
from pyvx import vx
import pyvx
if sys.version_info > (3,):
unicode = str
class TestVX(object):
def test_context(self):
c = vx.CreateContext()
assert vx.GetStatus(vx.reference(c)) == vx.SUCCESS
assert vx.QueryReference(vx.... | |
# ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | |
"""
homeassistant.components.api
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides a Rest API for Home Assistant.
"""
import re
import logging
import threading
import json
import homeassistant as ha
from homeassistant.helpers.state import TrackStates
import homeassistant.remote as rem
from homeassistant.const import (
URL_AP... | |
#!/usr/bin/env python
# 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
#
# Authors:
# - Paul Nilsson, paul.nilsson@cern.ch, 2019
import os
import re... | |
import unittest
import sys
import rpy2.rinterface as ri
ri.initr()
def evalr(string):
rstring = ri.StrSexpVector((string, ))
res = ri.baseenv["parse"](text = rstring)
res = ri.baseenv["eval"](res)
return res
def floatEqual(x, y, epsilon = 0.00000001):
return abs(x - y) < epsilon
class WrapperSex... | |
# 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... | |
import wx
import sys
try:
from wx import glcanvas
haveGLCanvas = True
except ImportError:
haveGLCanvas = False
try:
# The Python OpenGL package can be found at
# http://PyOpenGL.sourceforge.net/
from OpenGL.GL import *
from OpenGL.GLUT import *
haveOpenGL = True
except ImportError:
... | |
# ===============================================================================
# Copyright 2013 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... | |
"""
Unit tests for reverse URL lookups.
"""
from __future__ import unicode_literals
import unittest
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
from django.core.urlresolvers import (reverse, reverse_lazy, resolv... | |
#!/usr/bin/env python
"""
Based on Matt Weber es2graphite
https://github.com/mattweber/es2graphite
"""
import re
import sys
import json
import time
import pickle
import struct
import socket
import thread
import urllib2
import argparse
from pprint import pprint
from datetime import datetime
NODES = {}
CLUSTER_NAME = ... | |
"""topology.py test suite."""
import unittest
import numpy as np
import topology as t
class AtomOffsetInvariantTestCase(unittest.TestCase):
def test_molecule(self):
top = t.Molecule('water', ['H', 'O', 'H'])
for idx in range(top.num_atoms):
self.assertEqual(top.offsets_by_atom[idx... | |
from __future__ import absolute_import
from collections import defaultdict
import functools
import itertools
import logging
import os
from pip._vendor import pkg_resources
from pip._vendor import requests
from pip.compat import expanduser
from pip.download import (url_to_path, unpack_url)
from pip.exceptions import ... | |
from __future__ import print_function
import numpy as np
import tensorflow as tf
import argparse
import os
import pickle
import copy
import sys
import html
from utils import TextLoader
from model import Model
def main():
assert sys.version_info >= (3, 3), \
"Must be run in Python 3.3 or later. You are runni... | |
from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
from collections import namedtuple
from time import time, sleep
from threading import Thread, Event
try:
from math import isclose
except ImportError:
from ..compat import isclose
from . ... | |
# 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... | |
# 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
# distribu... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 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/LICE... | |
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from flask_login import current_user
from dashboards.nmr_metabolomics.collection_editor.model import CollectionEditorModel
from data_tools.wrappers.analyses import get_analyses
from data_tools.wrappers.collec... | |
#!/usr/bin/env python3
"""
Template by pypi-mobans
"""
import os
import sys
import codecs
import locale
import platform
from shutil import rmtree
from setuptools import Command, setup, find_packages
PY2 = sys.version_info[0] == 2
PY26 = PY2 and sys.version_info[1] < 7
PY33 = sys.version_info < (3, 4)
# Work around... | |
######################################################################
#
# 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... | |
"""
@package mi.instrument.star_asimet.bulkmet.metbk_a.driver
@file marine-integrations/mi/instrument/star_aismet/bulkmet/metbk_a/driver.py
@author Bill Bollenbacher
@brief Driver for the metbk_a
Release notes:
initial version
"""
__author__ = 'Bill Bollenbacher'
__license__ = 'Apache 2.0'
import re
import time
impo... | |
#
# Secret Labs' Regular Expression Engine
#
# convert template to internal format
#
# Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved.
#
# See the sre.py file for information on usage and redistribution.
#
import _sre
from sre_constants import *
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
MAX... | |
# Copyright 2013 Intel 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 require... | |
"""Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: audio_ops.cc
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _context
from te... | |
#! /usr/bin/env python
# title :reversiboard.py
# description :Creates and controls a Reversi game-board
# author :andresthor
# date :05-02-2017
# python_version :3.5.2
# =============================================================================
from constants import BLACK, WHITE,... | |
#
# 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
# ... | |
# Copyright 2013 Huawei Technologies Co.,LTD.
# 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
#
# Unl... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import frappe.model
import frappe.utils
import json, os
from six import iteritems, string_types, integer_types
from frappe.utils.file_manager i... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
import warnings
import numpy as np
from landlab import ModelParameterDictionary, CLOSED_BOUNDARY, Component
from landlab.core.model_parameter_dictionary import MissingKeyError, \
ParameterValueError
from landlab.field.scalar_data_fields import FieldEr... | |
# -*- coding: utf-8 -*-
"""
pygments.formatters.latex
~~~~~~~~~~~~~~~~~~~~~~~~~
Formatter for LaTeX fancyvrb output.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import division
from pygments.formatter import Forma... | |
"""
Form Widget classes specific to the Django admin site.
"""
import copy
from django import forms
from django.db.models.deletion import CASCADE
from django.urls import reverse
from django.urls.exceptions import NoReverseMatch
from django.utils.encoding import force_text
from django.utils.html import smart_urlquote
f... | |
import ssl
import tempfile
import pytest
from astropy.utils.data import get_pkg_data_filename
from astropy.samp.hub import SAMPHubServer
from astropy.samp.integrated_client import SAMPIntegratedClient
from astropy.samp.errors import SAMPProxyError
# By default, tests should not use the internet.
from astropy.samp i... | |
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# ==============================================================================
# Frank Matranga's Third-party Regis High School Moodle Scraper
# ==============================================================================
import getopt
import json
import os
import s... | |
# Copyright (c) 2012 - 2014 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
#
# Unle... | |
#!/usr/bin/env python
from __future__ import division
from __future__ import print_function
from builtins import input
from builtins import str
from builtins import range
from past.utils import old_div
import sys
import numpy
import matplotlib
if matplotlib.get_backend() != "TKAgg":
matplotlib.use("TKAgg")
from pyla... | |
#
"""Sliver manager API.
This module exposes an XMLRPC interface that allows PlanetLab users to
create/destroy slivers with delegated instantiation, start and stop
slivers, make resource loans, and examine resource allocations. The
XMLRPC is provided on a localhost-only TCP port as well as via a Unix
domain socket th... | |
"""Base class for sparse matrices"""
__all__ = ['spmatrix', 'isspmatrix', 'issparse',
'SparseWarning','SparseEfficiencyWarning']
from warnings import warn
import numpy as np
from sputils import isdense, isscalarlike, isintlike
class SparseWarning(Warning): pass
class SparseFormatWarning(SparseWarning): pa... | |
# --------------------------------------------------------
# Fast/er R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
# from datasets.imdb import imdb
# import datasets.ds_utils as ds_utils
# from fast_rcnn.config imp... | |
#!/usr/bin/env python
# Copyright 2015 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.
"""Tests for chromium.ycm_extra_conf.
These tests should be getting picked up by the PRESUBMIT.py in /tools/vim.
Currently the tests ... | |
import binascii
import hashlib
import re
import struct
from bitcoin import changebase, is_python2, privkey_to_pubkey, pubkey_to_address, ecdsa_raw_sign, encode, \
SIGHASH_ALL, SIGHASH_ANYONECANPAY, SIGHASH_SINGLE, SIGHASH_NONE, \
deserialize, txhash, serialize, sign, mk_pubkey_script, der_encode_sig, serialize_... | |
# 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... | |
# 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... | |
#!/usr/bin/env python2
import argparse
import collections
import os
import pyximport;
import sys
pyximport.install()
from model import BPGraph, CType
import file_ops
import numpy as np
from operator import mul
import itertools
from decimal import Decimal
import random
import matplotlib
matplotlib.use('Agg') # Force m... | |
import sublime
from collections import defaultdict
from collections import namedtuple
import json
vi_user_setting = namedtuple('vi_editor_setting', 'scope values default parser action negatable')
WINDOW_SETTINGS = [
'last_buffer_search',
'_cmdline_cd',
]
SCOPE_WINDOW = 1
SCOPE_VIEW = 2
SCOPE_VI_VIEW = 3
SC... | |
import glob
import importlib
import os
import sys
import typing
import cauldron
from cauldron import environ
from cauldron.environ import Response
from cauldron.runner import source
from cauldron.session.projects import Project
from cauldron.session.projects import ProjectStep
def add_library_path(path: str) -> bool... | |
import copy
from itertools import groupby, starmap, zip_longest
from .content import Content
from .printing import Printing
from .color import Color
from .multipart import CardClass
from ._util import wrapLines, cheap_repr, for_json
sep = ' // '
fields = {
"name": 'Name:',
"cost"... | |
"""
This demo demonstrates how to embed a matplotlib (mpl) plot
into a PyQt4 GUI application, including:
* Using the navigation toolbar
* Adding data to the plot
* Dynamically modifying the plot's properties
* Processing mpl events
* Saving the plot to a file from a menu
The main goal is to serve as a basis for develo... | |
"""
@package mi.instrument.noaa.lily.ooicore.test.test_driver
@file marine-integrations/mi/instrument/noaa/ooicore/test/test_driver.py
@author Pete Cable
@brief Test cases for ooicore driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/test_driver
$ bin/test_driver -u [-t testnam... | |
# Copyright (C) 2011 Midokura KK
# Copyright (C) 2011 Nicira, Inc
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
# Copyright 2016 Red Hat, 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... | |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | |
# Copyright 2020,2021 Sony Corporation.
# Copyright 2021 Sony Group 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 ... | |
# Copyright 2017 The Sonnet Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | |
#!/usr/bin/env python2
# coding:utf-8
import binascii
import os
import socket
import struct
import sys
import time
current_path = os.path.dirname(os.path.abspath(__file__))
if __name__ == "__main__":
root = os.path.abspath( os.path.join(current_path, os.pardir, os.pardir, os.pardir))
data_path = os.path.absp... | |
# Copyright (c) 2006-2009 The Trustees of Indiana University.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without ... | |
# 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... | |
# -*- coding: utf-8 -*-
import os
import warnings
from datetime import date
from django.conf import settings
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db import models
from django.db.models.base import model_unpickle
from django.db.models.query_utils import DeferredAttribute
fr... | |
# 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... | |
################################################################################
# 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... | |
# Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | |
# 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 ... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2016, MIT Probabilistic Computing Project
#
# 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/LICENS... | |
"""
A node and corresponding command to expose transform information about one
transform node with respect to another.
\b Creation \b Info:
\b Donations: http://adammechtley.com/donations/
\b License: The MIT License
Copyright (c) 2011 Adam Mechtley (http://adammechtley.com)
Permission is hereby granted, free of c... | |
# -*- 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... | |
import json
import unittest
from binascii import b2a_hex
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.utils.six.moves import range
from ..test_data import TestDataMixin
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
if... | |
import logging
import signal
import os
import sys
import time
from datetime import datetime
#project
from utils.pidfile import PidFile
from utils.daemon import Daemon
from config import HealthCheckConfig
from config import getconfigpath
from config import getpiddir
from config import getpidname
from healthcheckrepor... | |
# -*- coding: utf-8 -*-
import pytest
from marshmallow import (
Schema,
fields,
pre_dump,
post_dump,
pre_load,
post_load,
validates,
validates_schema,
ValidationError,
)
def test_decorated_processors():
class ExampleSchema(Schema):
"""Includes different ways to invoke ... | |
#!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=u... | |
# Copyright 2017-present Kensho Technologies, LLC.
from collections import OrderedDict
from datetime import date, datetime
from decimal import Decimal
from hashlib import sha256
from itertools import chain
from typing import Any, FrozenSet, Iterable
# C-based module confuses pylint, which is why we disable the check b... | |
# -*- coding: utf-8 -*-
__version__ = "1.1.0"
import os
class NetflixReporter(object):
"""Creates Netflix compliant reports of Episodes/Sequences"""
csv_header = (
"Episode;Shot Name;VFX Shot Status;Shot Methodologies;Scope of Work;Vendors;"
"VFX Turnover to Vendor Date;VFX Next Studio Revi... | |
""" Non-stationary correlation models for Gaussian processes."""
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
import numpy as np
from scipy.special import gamma, kv
from scipy.stats import expon, norm
from sklearn.cluster import KMeans
from .stationary import l1_cross_differences
MACHINE_EPSILON = np... | |
# 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... | |
# polling_location/views_admin.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .models import PollingLocation, PollingLocationManager
from .controllers import filter_polling_locations_structured_json_for_local_duplicates, \
import_and_save_all_polling_locations_data, polling_locations_import_... | |
"""
To run this test, type this in command line <kolibri manage test -- kolibri.content>
"""
import datetime
import os
import shutil
import tempfile
from django.test import TestCase
from django.core.management import call_command
from django.core.urlresolvers import reverse
from django.db import connections
from django... | |
# Copyright 2022 The CLU 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 writ... | |
# -*- coding: utf-8 -*-
import six
import unittest
import requests
import api_toolkit
from .helpers import use_cassette as use_pw_cassette
from passaporte_web.main import PassaporteWeb, ServiceAccount, Account, Identity
from passaporte_web.tests.helpers import TEST_USER, APP_CREDENTIALS
from passaporte_web.tests.serv... | |
from hearthbreaker.cards.minions.neutral import (
BloodfenRaptor,
IronbeakOwl,
NoviceEngineer,
StonetuskBoar,
WarGolem,
MogushanWarden,
FaerieDragon,
KoboldGeomancer,
ElvenArcher,
ArgentSquire,
SilvermoonGuardian,
TwilightDrake,
MagmaRager,
DireWolfAlpha,
Worg... | |
# -*- coding: utf-8 -*-
import logging
import os
import shutil
import subprocess
import zipfile
from enum import Enum
from functools import wraps
from typing import Type
import requests_pkcs12
from django.db import models
import dj_database_url
import requests
from django.conf import settings
from django.core.cache i... | |
import uuid
import pytest
from app.models.organisation import Organisation
from app.models.service import Service
from app.models.user import User
from tests import organisation_json, service_json
from tests.conftest import ORGANISATION_ID
INV_PARENT_FOLDER_ID = '7e979e79-d970-43a5-ac69-b625a8d147b0'
INV_CHILD_1_FOL... | |
#! /usr/bin/env python
"""
signature.py
Written by Geremy Condra
Released on 18 March 2010
Licensed under MIT License
This module provides a basic interface to OpenSSL's EVP
signature functions.
All functions in this module will raise a SignatureError
in the event of a malfunction.
The goal of cryptographic signat... | |
# 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... | |
# Copyright (c) 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 required by applicable law or agreed to in writ... | |
## Central Flask application script. Includes all routes for the REST API,
## error handlers, and business logic. Authenticates route calls via simple HTTP
## username:password auth. Imports SQLAlchemy ORM models in order to interact with
## PostgreSQL datastore.
##
## TODO: Decompose business logic and import via func... | |
"""
Extended math utilities.
"""
# Authors: Gael Varoquaux
# Alexandre Gramfort
# Alexandre T. Passos
# Olivier Grisel
# Lars Buitinck
# Stefan van der Walt
# Kyle Kastner
# Giorgio Patrini
# License: BSD 3 clause
from __future__ import division
import war... | |
"""weighted_graph.py: This file is part of the feyncop/feyngen package.
Implements the WeightedGraph class. """
# See also: http://people.physik.hu-berlin.de/~borinsky/
__author__ = "Michael Borinsky"
__email__ = "borinsky@physik.hu-berlin.de"
__copyright__ = "Copyright (C) 2014 Michael Borinsky"
__license__ = "... | |
'''HokuyoLX class code'''
import socket
import logging
import time
import numpy as np
from codecs import encode, decode
from .exceptions import HokuyoException, HokuyoStatusException
from .exceptions import HokuyoChecksumMismatch
from .statuses import activation_statuses, laser_states, tsync_statuses
class HokuyoLX(ob... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.