gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#!/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.
"""
Unit tests for the contents of fastboot_utils.py
"""
# pylint: disable=protected-access,unused-argument
import io
import logging
... | |
#!/usr/bin/python
#
# Tobii controller for PsychoPy
# authors: Hiroyuki Sogo, Horea Christian
# - Tobii SDK 3.0 is required
#
import datetime
import os
from math import degrees, atan2
# from psychopy.tools.monitorunittools import pix2deg
from psychopy.misc import pix2deg
import tobii.sdk.mainloop
import tobii.sdk.tim... | |
import os
import time
from collections import OrderedDict
from conans.paths import (CONANFILE, CONANINFO, CONANFILE_TXT, BUILD_INFO, CONANENV)
from conans.client.loader import ConanFileLoader
from conans.client.export import export_conanfile
from conans.client.deps_builder import DepsGraphBuilder
from conans.client.us... | |
# -*- coding:utf-8 -*-
import os
import shutil
import unittest
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
from requests.exceptions import ConnectionError
from .crawler import Crawler
from .exceptions import CrawlerError
from .proxies import ProxyPool
class TestAll(unittest.TestCase):
... | |
from __future__ import unicode_literals
import json
from pprint import pprint
from cloudmesh_client.cloud.hpc.BatchProvider import BatchProvider
from cloudmesh_client.comet.cluster import Cluster
from cloudmesh_client.comet.comet import Comet
from cloudmesh_client.common.hostlist import Parameter
from django.shortcut... | |
# These surface visualization routines are based mainly on work of Julia Huntenburg and Sabine Oligschlaeger.
def plot_surf_stat_map(coords, faces, stat_map=None,
elev=0, azim=0,
cmap='jet',
threshold=None, bg_map=None,
bg_on_s... | |
#
#
# Atrous Python XTension
#
# Copyright (C) 2014 Egor Zindy <egor.zindy@manchester.ac.uk>, MIT license
#
# <CustomTools>
# <Menu name = "Python plugins">
# <Item name="Wavelet analysis" icon="Python" tooltip="Wavelet analysis for Imaris (2D and 3D kernels).">
# <Command>PythonXT::XTAtrous(%... | |
import imp
import time
import yaml
import ConfigParser
from emonitor.extensions import db
from sqlalchemy.orm.collections import attribute_mapped_collection
from emonitor.modules.settings.settings import Settings
class AlarmType(db.Model):
"""AlarmType class"""
__tablename__ = 'alarmtypes'
__table_args__ ... | |
"""
module to perform semi-synthetic simulations:
- take snps
- simulate phenotypes
- perform GWAS with different methods
- measure performance
"""
import logging
import os
import time
import sys
import numpy as np
import scipy as sp
import pandas as pd
import matplotlib
matplotlib.use('Agg') # Must be before importi... | |
##########################################################################
#
# Copyright (c) 2011-2013, Image Engine Design 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:
#
# * Redis... | |
# Copyright 2016 Violin Memory, 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 requi... | |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from datetime import datetime, timedelta
from django.http import HttpRequest
from django.utils.timezone import utc
from django.test impor... | |
import pytz
import unittest
from datetime import datetime
from freezegun import freeze_time
from hamcrest import assert_that, is_, has_entries, equal_to
from mock import patch, MagicMock
from backdrop.transformers.dispatch import (
entrypoint,
run_transform,
get_query_parameters,
get_or_get_and_create... | |
import pytest
import socket
from aiohttp.parsers import StreamWriter, CORK
from unittest import mock
# nodelay
def test_nodelay_default(loop):
transport = mock.Mock()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
transport.get_extra_info.return_value = s
proto = mock.Mock()
reader = mock.... | |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class QueryTestCase(Integration... | |
"""
Notes
-----
Important attributes of continuous (order > 0) :class:`Field` and
:class:`SurfaceField` instances:
- `vertex_remap` : `econn[:, :n_vertex] = vertex_remap[conn]`
- `vertex_remap_i` : `conn = vertex_remap_i[econn[:, :n_vertex]]`
where `conn` is the mesh vertex connectivity, `econn` is the
region-local ... | |
import pandas as pd
from bokeh.embed import components
from bokeh.models import HoverTool
from bokeh.models.formatters import DatetimeTickFormatter
from bokeh.plotting import figure, ColumnDataSource
from app import db
from app.decorators import data_quality
# creates your plot
date_formatter = DatetimeTickFormatter... | |
#!/usr/bin/env python3
# To directly call tably from shell, set a symbolic link by running
# ln -sf $PWD/tably.py /usr/local/bin/tably
import argparse
import csv
import os
PREAMBLE = r"""\documentclass[11pt, a4paper]{article}
\usepackage{booktabs}
\begin{document}"""
HEADER = r"""\begin{{table}}[htb]
{indent}\cent... | |
import warnings
import numpy as np
import pandas.util.testing as tm
from pandas import (Series, DataFrame, MultiIndex,
Int64Index, UInt64Index, Float64Index,
IntervalIndex, CategoricalIndex,
IndexSlice, concat, date_range)
class NumericSeriesIndexing:
... | |
"""The lock tests for the august platform."""
import datetime
from unittest.mock import Mock
from aiohttp import ClientResponseError
import pytest
from yalexs.pubnub_async import AugustPubNub
from homeassistant.components.lock import (
DOMAIN as LOCK_DOMAIN,
STATE_JAMMED,
STATE_LOCKING,
STATE_UNLOCKIN... | |
## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Packet class. Binding mechanism. fuzz() method.
"""
import time,itertools,os
import copy
from fields import StrField... | |
#!/usr/bin/env python
#
# Copyright (C) 2013-2014 Mikkel Krautz <mikkel@krautz.dk>
#
# 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 co... | |
# 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... | |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for the old L{twisted.web.client} APIs, C{getPage} and friends.
"""
from __future__ import division, absolute_import
import os
from errno import ENOSPC
try:
from urlparse import urlparse, urljoin
except ImportError:
from urlli... | |
#!/usr/bin/python
"""
####################################################################################################
TITLE : HPE XP7 Migration, Prepare
DESCRIPTION : Prepare does the setup and start of the CaJ replication
AUTHOR : Koen Schets / StorageTeam
VERSION : Based on previous ODR framework
1.... | |
#!/usr/bin/python
"""
Copyright 2013 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
HTTP server for our HTML rebaseline viewer.
"""
# System-level imports
import argparse
import BaseHTTPServer
import json
import logging
import os
import posixpath
import... | |
from __future__ import annotations
import abc
import shutil
import functools
from pathlib import Path
import urllib.parse
from typing import (
Callable, Any, TypeVar, cast, Tuple, Dict, Optional,
Union, Hashable,
)
import logging
from edgar_code.types import PathLike, Serializer, UserDict
from edgar_code.util.p... | |
import sys, cv2, bisect
import numpy as np
import skimage
from scipy import stats
from skimage import filters, morphology, util
from datetime import datetime
#===============================================================================
class Graph():
def __init__(self, img=None):
self.seed = None
... | |
# Copyright 2009-present MongoDB, 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 wri... | |
"""Zookeeper Partitioner Implementation
:Maintainer: None
:Status: Unknown
:class:`SetPartitioner` implements a partitioning scheme using
Zookeeper for dividing up resources amongst members of a party.
This is useful when there is a set of resources that should only be
accessed by a single process at a time that mul... | |
from autosar.writer.writer_base import ElementWriter
import autosar.portinterface
class XMLPortInterfaceWriter(ElementWriter):
def __init__(self,version, patch):
super().__init__(version, patch)
if self.version >= 3.0 and self.version < 4.0:
self.switcher = {
... | |
# Copyright (c) Facebook, Inc. All Rights Reserved
"""
Processors for all downstream (ds) tasks.
"""
import json
import os
import pickle
import random
import math
import numpy as np
import torch
from collections import defaultdict
from .processor import (
MetaProcessor,
VideoProcessor,
TextProcessor,
... | |
from sqlalchemy.orm import subqueryload, joinedload
from sqlalchemy.orm.exc import NoResultFound
from dataactcore.models.baseInterface import BaseInterface
from dataactvalidator.models.validationModels import TASLookup, Rule, RuleType, FileColumn, FileType ,FieldType, MultiFieldRule, MultiFieldRuleType, RuleTiming
from... | |
'''
Adapter tests
=============
'''
import unittest
from kivy.uix.listview import SelectableView
from kivy.uix.listview import ListItemButton
from kivy.uix.listview import ListItemLabel
from kivy.uix.listview import CompositeListItem
from kivy.uix.label import Label
from kivy.adapters.models import SelectableDataIte... | |
#
# 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... | |
# -*- coding: utf-8 -*-
from __future__ import with_statement
from flask import session
from flask_split import ab_test, finished
from flask_split.core import _get_session
from flask_split.models import Alternative, Experiment
from flexmock import flexmock
from pytest import raises
from redis import ConnectionError, ... | |
# -*- coding: utf-8 -*-
import os
import time
from mlpatches import base
_stash = base._stash
def _get_status(exitcode, killer=0):
"""
calculates the exit status for a command.
see the documentation of os.wait for info about this.
"""
return (exitcode * 256) + killer
class VoidIO(object):
"""no-op I... | |
from __future__ import absolute_import, division, print_function, with_statement
import contextlib
import datetime
import functools
import sys
import textwrap
import time
import platform
import weakref
from tornado.concurrent import return_future, Future
from tornado.escape import url_escape
from tornado.httpclient i... | |
# -*- coding:utf-8 -*-
# Created by Hans-Thomas on 2011-05-28.
#=============================================================================
# db.py --- Tests database
#=============================================================================
from __future__ import absolute_import, print_function, unicode_litera... | |
"""SCons.SConf
Autoconf-like configuration support.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal i... | |
"""Support for the Lovelace UI."""
import logging
import voluptuous as vol
from homeassistant.components import frontend
from homeassistant.config import async_hass_config_yaml, async_process_component_config
from homeassistant.const import CONF_FILENAME, CONF_MODE, CONF_RESOURCES
from homeassistant.core import callb... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""PyLNP main library."""
from __future__ import print_function, unicode_literals, absolute_import
import sys
from tkgui.tkgui import TkGui
import distutils.dir_util as dir_util
import fnmatch
import glob
import os
import re
import shutil
import subprocess
import tempfile... | |
import re
from mysql import connector
from config import get_config as _get_config
from flask import g
# In ascending access level order
ACCESS_LEVELS = ['public', 'user', 'admin']
class Context(object):
def __init__(self, cnx, access_level, current_username):
self.cnx = cnx
self.access_level = ... | |
# 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... | |
""" Copyright 2015 Kris Steinhoff, The University of Michigan
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 ag... | |
# 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 (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module contains classes to wrap Python VTK to make nice molecular plots.
"""
import itertools
import math
import os
import subprocess
import time
import numpy as np
try:
import vtk
from vtk import vtkIntera... | |
"""
A module for DELPHI's Epidata API.
https://github.com/cmu-delphi/delphi-epidata
Notes:
- Requires the `requests` module.
- Compatible with Python 2 and 3.
"""
# External modules
import requests
# Because the API is stateless, the Epidata class only contains static methods
class Epidata:
"""An interface to ... | |
#
# /pycchecker/pycchecker.py
#
# Copyright (C) 2014-2015, Jia Jia
# License: BSD
#
import sys
import getopt
sys.path.extend(['.', '..'])
from pycparser import c_parser, c_ast, parse_file
banner = """
_ _
_ __ _ _ ___ ___| |__ ___ ___| | _____ _ __
| '_ \| | | |/ __/ __| '... | |
# 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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# 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 (t... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2017 Prof. William H. Green (whgreen@mit.edu),
# Prof. Richard H. West (r.west@neu.edu) and the RMG Team (rmg_dev@mit.edu)
#
# ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import json
import subprocess
import threading
import sys
def square_to_coord(square):
bottom_corner = (480, 0)
unit = 60
squarex = square[0]
squarey = square[1]-1
newx = (squarex*unit) - 60
newy = bottom_corner[0] - (unit + squarey*unit... | |
from __future__ import print_function, division
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer
from lasagne.nonlinearities import sigmoid, rectify
from lasagne.objectives import crossentropy, mse... | |
"""
# Written by Petru Paler, Uoti Urpala, Ross Cohen and John Hoffman
Taken from the Bittornado package, which is under the MIT license.
The original License.txt lists the copyright as follows:
Copyright (C) 2001-2002 Bram Cohen
Permission is hereby granted, free of charge, to any person
obtaining a copy of this sof... | |
from pathlib import Path
import platform
import warnings
import numpy as np
import pandas as pd
from pkg_resources import parse_version
import pytest
import pvlib
pvlib_base_version = \
parse_version(parse_version(pvlib.__version__).base_version)
# decorator takes one argument: the base version for which it sh... | |
# Copyright (c) 2014 Andrew Kerr. All rights reserved.
# Copyright (c) 2015 Tom Barron. 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.... | |
import argparse
import sys
import math
import pint
import operator
from silhouette import *
def log(msg):
ts = time.strftime("%c")
msg = "%s] %s" % (ts, msg)
sys.stdout.write(msg)
sys.stdout.flush()
class Worker(object):
def __init__(self):
self._cutter = None
@property
def cutter... | |
# -*- coding: utf-8 -*-
"""
celery.worker.hub
~~~~~~~~~~~~~~~~~
Event-loop implementation.
"""
from __future__ import absolute_import
from kombu.utils import cached_property
from kombu.utils import eventio
from celery.utils.timer2 import Schedule
READ, WRITE, ERR = eventio.READ, eventio.WRITE, eventio.... | |
"""
GCL -- Generic Configuration Language
See README.md for an explanation of GCL and concepts.
"""
import functools
from os import path
import pyparsing as p
from . import functions
__version__ = '0.4.14'
class GCLError(RuntimeError):
pass
class ParseError(GCLError):
pass
class EvaluationError(GCLError)... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Copyright (c) 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.
from code import Code
from model import PropertyType
import cpp_util
import schema_util
import util_cc_helper
from cpp_namespace_environment import CppNa... | |
#!/usr/bin/env python
#
# Copyright (c) 2011, Willow Garage, 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
# not... | |
import skimage.io # bug. need to import this before tensorflow
import skimage.transform # bug. need to import this before tensorflow
import tensorflow as tf
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.training import moving_averages
from config import Config
import datetime
import nump... | |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=1>
# Predicting Patient Retention Rates
# <markdowncell>
# Here I am looking for a simple method to predict which patients are likely to return. My idea is to look at the average time between visits across all patients and then across this spec... | |
# Copyright 2012 Grid Dynamics
# Copyright 2013 Inktank Storage, Inc.
# Copyright 2014 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.or... | |
#Copyright 2009 Almero Gouws, <14366037@sun.ac.za>
"""
This module supplies the classes used to implement different types
of cliques.
"""
__docformat__ = 'restructuredtext'
import numpy as np
import potentials
import general
class clique(object):
"""
A clique with an attached discete potential.
""" ... | |
# Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import pytest
import torch
from pyro.contrib.mue.statearrangers import Profile, mg2k
def simpleprod(lst):
# Product of list of scalar tensors, as numpy would do it.
if len(lst) == 0:
return torch.tensor(1.0)
else... | |
import datetime
import decimal
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import transaction
from django.db.backends import utils
from django.utils import timezone
from django.utils.dateparse import parse_duration
from dja... | |
from tests.base_unittest import BaseUnitTest
from pypokerengine.engine.player import Player
from pypokerengine.engine.poker_constants import PokerConstants as Const
from pypokerengine.engine.action_checker import ActionChecker
class ActionCheckerTest(BaseUnitTest):
""" the case when no action is done before """
d... | |
"""
OpenNSA backend for Juniper EX switches supporting ccc encapsulation.
Even though mpls is used here, mpls to other devices is not supported. MPLS is
merely to facilitate private switching between two units. So only vlan-vlan
connections are supported.
Authors:
Original GTS backend: Tamas Varga <vargat@niif.hu>
Mo... | |
#!/usr/bin/python3
'''
Author : Zachary Harvey
'''
import sqlite3 as sql
from datetime import datetime
import logging
from . import Set, Card, Collection, Deck, get_class
from .sqlments import *
from .externalapis.mtgsdkreader import where_card, where_set, find_many_cards
from .externalapis import scryfalldeale... | |
"Multiclass Scatterplot Module."
from __future__ import annotations
from collections import defaultdict
import numpy as np
from progressivis.core.module import Module, ReturnRunStep, JSon
from progressivis.table.nary import NAry
from progressivis.stats import MCHistogram2D, Sample
from progressivis.table.range_query... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2017, AGB & GC
# Full license can be found in License.md
# -----------------------------------------------------------------------------
""" Tests the ocb_scaling class and functions
"""
from io import StringIO
import logging
import numpy as np
from os impo... | |
#
# persist.py
# Part of SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ryan Hileman and Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter3
# License: MIT
#
"""This module provides persistent global storage for other modules."""
from collections import defaultd... | |
# 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 ... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from __future__ import unicode_literals
from datetime import date
from django import forms
from django.contrib.admin import BooleanFieldListFilter, SimpleListFilter
from django.contrib.admin.options import (
HORIZONTAL, VERTICAL, ModelAdmin, TabularInline,
)
from django.contrib.admin.sites import AdminSite
from d... | |
import sys
import numpy as np
from OpenGL.GL import *
from OpenGL.raw.GL.ARB.vertex_array_object import glGenVertexArrays,glBindVertexArray
class JuMEG_TSV_OGL_VBO(object):
""" Helper class for using GLSL shader programs
"""
def __init__(self):
self.__vbo_data = np.array([],dtype=np.float32)
... | |
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - "text/html+css" Formatter for feeding the GUI editor
@copyright: 2005-2006 Bastian Blank, Florian Festi, Thomas Waldmann, Reimar Bauer
@license: GNU GPL, see COPYING for details.
"""
from MoinMoin import log
logging = log.getLogger(__name__)
from MoinMoin.forma... | |
#!/usr/bin/env python3
# -*- mode: python; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
# vim: set shiftwidth=4 softtabstop=4 expandtab:
"""Support for reading from an NCAR EOL RAF PostgreSQL database of
real-time flight data.
2014 Copyright University Corporation for Atmospheric Research
This file is... | |
#!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2008. All Rights Reserved.
#
'''
base.py
common base for the commands execution framework. Units of work are defined as Operations
as found in other modules like unix.py. These units of work are then packaged up and executed
within a GpCommand. A GpCommand is ju... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import copy
from copy import deepcopy
from time import time
from django.conf import settings
from django.db.models import Q
from django.db.models.base import ModelBase
from django.utils import six
from django.utils import tree
from django.utils.encoding im... | |
"""
Various data structures used in query construction.
Factored out from django.db.models.query to avoid making the main module very
large and/or so that they can be used by other modules without getting into
circular import difficulties.
"""
from __future__ import unicode_literals
import inspect
from collections im... | |
# 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 ... | |
"""The tests for the hassio component."""
import asyncio
import os
from unittest.mock import patch, Mock
import pytest
from homeassistant.auth.const import GROUP_ID_ADMIN
from homeassistant.setup import async_setup_component
from homeassistant.components.hassio import STORAGE_KEY
from homeassistant.components import ... | |
# -*- coding: utf-8 -*-
"""
Tests parsers ability to read and parse non-local files
and hence require a network connection to be read.
"""
import logging
import pytest
import numpy as np
import pandas.util.testing as tm
import pandas.util._test_decorators as td
from pandas import DataFrame
from pandas.io.parsers imp... | |
"""
The MIT License (MIT)
Copyright (c) 2014 Melissa Gymrek <mgymrek@mit.edu>
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, ... | |
"""Helper to deal with YAML + storage."""
from abc import ABC, abstractmethod
import asyncio
import logging
from typing import Any, Awaitable, Callable, Dict, List, Optional, cast
import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant.components import websocket_api
from homeassist... | |
from mock.mock import patch
import os
import pytest
import ca_test_common
import ceph_crush_rule
fake_cluster = 'ceph'
fake_container_binary = 'podman'
fake_container_image = 'quay.ceph.io/ceph/daemon:latest'
fake_name = 'foo'
fake_bucket_root = 'default'
fake_bucket_type = 'host'
fake_device_class = 'ssd'
fake_profil... | |
"""
@package mi.dataset.driver.FLORT_KN.STC_IMODEM.test.test_driver
@file marine-integrations/mi/dataset/driver/FLORT_KN/STC_IMODEM/driver.py
@author Emily Hahn
@brief Test cases for FLORT_KN__STC_IMODEM driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/dsa/test_driver
$ bin/ds... | |
# ===============================================================================
# Copyright 2018 Stephen Cox
#
# 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/licens... | |
# -*- coding: utf_8 -*-
#
# scrollpanel.py
#
# Scrollable widget which contains other widgets, for albow
#
from palette_view import PaletteView
from layout import Column
from utils import blit_in_rect
from pygame import event, Surface, SRCALPHA, Rect, draw
#-------------------------------------------------------------... | |
# coding=utf-8
"""
Copyright 2013 LinkedIn Corp. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | |
#! /usr/bin/env python
import os
import sys
sys.path.append(os.path.abspath('../../'))
from src.util.FileSystem import FileSystem
from src.util.MLClass import MLClass
import MySQLdb as mdb
import logging
from operator import itemgetter
import warnings
import cPickle as pk
# The assumption is that the table that is be... | |
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | |
#!/usr/bin/env python
# encoding: utf-8
#
# 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 Licens... | |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#======================================================================
#
# fzf_cd.py - Change Directory in Total Commander with fzf
#
# Created by skywind on 2020/10/31
# Last Modified: 2020/10/31 22:15:03
#
#===============================================================... | |
# Copyright 2017 Norman Heckscher. 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 la... | |
# 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
# d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.