gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
#!/usr/bin/env python
#
# $Id: build.py 9318 2011-06-10 02:37:10Z nathan_george $
#
# Proprietary and confidential.
# Copyright $Date:: 2011#$ Perfect Search Corporation.
# All rights reserved.
#
import datetime
import optparse
import os
import shutil
import subprocess
import sys
import time
import traceback
import c... | |
# 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 ag... | |
#
# Copyright 2014 Rackspace. 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 ap... | |
#!/usr/bin/env python3
'''
lib/util/fs.py
File-system utilities.
'''
import itertools
import json
import logging
import os
logger = logging.getLogger('sublime-ycmd.' + __name__)
def is_directory(path):
'''
Returns true if the supplied `path` refers to a valid directory, and
false otherwise.
'''
... | |
#!/usr/bin/python
# Copyright 2015 SICS Swedish ICT AB
#
# 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 random
from dataclasses import dataclass
from logging import Logger
from typing import Any, Dict, List, Optional, Union
import virtool.utils
from virtool.db.transforms import AbstractTransform
from virtool.db.utils import get_non_existent_ids, handle_exists, id_exists, oid_exists
from virtool.errors import Data... | |
# coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | |
#!/usr/bin/env python
# Copyright (c) 2014 Arista Networks, Inc. All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
"""The EOS SDK Policy Router.
The policy router is an EOS SDK application usable on Arista switches
supporting policy based routing, such as the Arista 7500E with second
generat... | |
from datetime import datetime
import pandas as pd
import numpy as np
from ..timeframe import merge_timeframes, TimeFrame
from disaggregator import Disaggregator
from matplotlib import pyplot as plt
from datetime import timedelta
from scipy.stats import poisson, norm
from sklearn import mixture
class MLE(Disaggregator... | |
from datetime import datetime
from decimal import Decimal
from django import forms
from django.conf import settings
from django.contrib.admin import helpers
from django.contrib.admin.utils import (
NestedObjects, display_for_field, display_for_value, flatten,
flatten_fieldsets, label_for_field, lookup_field, q... | |
# Copyright (c) 2010, 2011 Arek Korbik
#
# 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... | |
import unittest
import importlib
#source: http://stackoverflow.com/a/11158224/5343977
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import ant_colony as module
class TestAntColonyInit(... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'MonsterAttackModifier.option2'
db.add_column('main_monste... | |
"""
Load pp, plot and save
"""
import os, sys
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcParams
from matplotlib.colors import from_levels_and_colors
from mpl_to... | |
import cv2
import numpy as np
# Define color ranges in HSV with lower & upper ranges
# NOTE: HSV value range in OpenCV:
# H: 0 -> 180
# S: 0 -> 255
# V: 0 -> 255
#
# NOTE: In HSV, red wraps around the beginning and end of the hue range
#
# Major colors encompass a range of ~40 H values
# Minor colors encompass a... | |
# script to publish a level
import urlparse, urllib, datetime, os.path, hashlib, sys, getpass, uuid, zipfile
import xml.etree.ElementTree as ET
# usage:
# python2.7 publish.py <rss_feed> <level_dir>
# The script expects a manifest.xml file in the level dir, that is a stripped-down item entry for the rss feed (i.e. min... | |
########
##
## The arena which runs tournaments of bots
##
########
import random
import bot_player as bp
import tournament_results as tr
import morality_calculator as mc
class Arena(object):
"""
Hosts tournaments of bots
"""
def __init__(self):
pass
def generate_interaction_lengths(se... | |
from .models import Users
from .conftest import USER_CREDENTIALS
import pytest
PRIVATE_ROUTES = [
('/search'),
('/add/{name}/{id}'),
('/delete/{sym}'),
('/portfolio'),
('/details/{sym}'),
]
PUBLIC_ROUTES = [
('/login'),
('/about'),
('/new_user')
]
@pytest.mark.parametrize('route', PU... | |
# Copyright 2016 Red Hat, 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... | |
# Copyright 2013 Mirantis Inc.
# Copyright 2013 Rackspace Hosting.
#
# 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
#
# Unles... | |
XXXXXXXXX XXXXX
XXXX
XXXXXXXXX XXX XXXXXXXXXX XXXXXXXX X XXXXXXXXX XXXXXXXX XXX XXXXXX XXXXXXXXX
XXX XXXXXXXXXX XXX XXXXXXXXXX XX XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXX
XXXXXX
XXXXXX
XXXXX XXXXXXXXXXXXXXXX
XXXXXXXXXXXX XXXXXXXXX XXXXXX XXXXXXX XXXXXXXX XXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX... | |
import tables
import os, os.path
from time import time
import random
import numarray
from numarray import random_array
from numarray import records
# in order to always generate the same random sequence
random.seed(19)
random_array.seed(19, 20)
def open_db(filename, remove=0):
if remove and os.path.exists(filenam... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Mario Vilas
# 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... | |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015 Diamond Light Source <stuart.fisher@diamond.ac.uk>
#
# 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:... | |
# 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... | |
"""
Hadoop task
Install and cofigure hadoop -- requires that Ceph is already installed and
already running.
"""
from cStringIO import StringIO
import contextlib
import logging
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.parallel import parallel
from ..orchestra import ... | |
# coding: utf-8
"""
Picarto.TV API Documentation
The Picarto.TV API documentation Note, for fixed access tokens, the header that needs to be sent is of the format: `Authorization: Bearer yourTokenHere` This can be generated at https://oauth.picarto.tv/ For chat API, see https://docs.picarto.tv/chat/chat.pr... | |
import unittest, json, cPickle as pickle
from cStringIO import StringIO
from scrapy.item import Item, Field
from scrapy.utils.python import str_to_unicode
from scrapy.contrib.exporter import BaseItemExporter, PprintItemExporter, \
PickleItemExporter, CsvItemExporter, XmlItemExporter, JsonLinesItemExporter, \
J... | |
import datetime
import urllib
import pprint
import flask
import requests
from pluss.app import app, full_url_for
from pluss.util.cache import Cache
from pluss.util.config import Config
from pluss.util.db import TokenIdMapping
GOOGLE_API_TIMEOUT = 5
OAUTH2_BASE = 'https://accounts.google.com/o/oauth2'
OAUTH2_SCOPE =... | |
# Copyright (c) 2014 VMware, 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... | |
"""JSON (de)serialization framework.
The framework presented here is somewhat based on `Go's "json" package`_
(especially the ``omitempty`` functionality).
.. _`Go's "json" package`: http://golang.org/pkg/encoding/json/
"""
import abc
import binascii
import logging
import OpenSSL
import six
from acme.jose import b... | |
# -*- coding: utf-8 -*-
import pytest
import pytz
import ioex.datetimeex
import datetime
@pytest.mark.parametrize(('start', 'end'), [
[datetime.datetime(2016, 7, 24, 12, 21),
datetime.datetime(2016, 7, 24, 12, 22)],
[None, datetime.datetime(2016, 7, 24, 12, 22)],
[datetime.datetime(2016, 7, 24, 12, ... | |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | |
import os
import sys
import platform
def is_active():
return True
def get_name():
return "X11"
def can_build():
if (os.name!="posix"):
return False
if sys.platform == "darwin":
return False # no x11 on mac for now
errorval=os.system("pkg-config --version > /dev/null")
if (errorval):... | |
# Copyright 2019 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) 2009, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... | |
import re
import six
from . import messages
from .unicode_block import (
unicode_block,
UNICODE_BASIC_LATIN,
UNICODE_LATIN_1_SUPPLEMENT,
UNICODE_LATIN_EXTENDED_B,
UNICODE_GENERAL_PUNCTUATION,
UNICODE_ARABIC,
UNICODE_LATIN_EXTENDED_ADDITIONAL,
UNICODE_HIRAGANA,
UNICODE_KATAKANA,
... | |
__author__ = 'rensholmer'
from gffsubpart import GffSubPart
from itertools import groupby #groupby for fasta parsing
import pprint
from intervaltree import IntervalTree, Interval
class Gff(object):
"""
Work in progess: holds GffSubParts object
"""
_combos = [{'gene':{'mRNA':['CDS','exon','five_prime_UTR','three_p... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from gym.spaces import Tuple, Discrete, Dict
import os
import logging
import numpy as np
import torch as th
import torch.nn as nn
from torch.optim import RMSprop
from torch.distributions import Categorical
imp... | |
from pyramid.view import view_config
from pyramid.renderers import render
import deform
import colander
from pyramid.response import Response
import pyramid.httpexceptions as exc
from pyramid.view import (
view_config,
forbidden_view_config,
)
from pyramid.security import (
remember,
forget,
)... | |
from django.forms import models as model_forms
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponseRedirect
from django.views.generic.base import TemplateResponseMixin, ContextMixin, View
from django.views.generic.detail import (SingleObjectMixin,
SingleOb... | |
#!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | |
"""Detaches any ISO file (if any) currently attached to a virtual machine."""
from baseCmd import *
from baseResponse import *
class detachIsoCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "true"
"""The ID of the virtual machine"""
"""Required"""
self.virtualm... | |
"""This module allows the user to place text on the screen.
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2005, Enthought, Inc.
# License: BSD Style.
from distutils.version import StrictVersion
# Enthought library imports.
from traits.api import Instance, Range, Str, Bool, Property, \
... | |
# -*- coding: utf-8 -*-
"""
Limiters for high order DG methods
"""
import numpy as nm
from sfepy.discrete.dg.poly_spaces import iter_by_order
from sfepy.discrete.dg.fields import get_raveler, get_unraveler
from sfepy.base.base import output
MACHINE_EPS = 1e-30
def minmod(a, b, c):
"""Minmod function of three va... | |
# 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 ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2011 Midokura KK
# Copyright (C) 2011 Nicira, Inc
# Copyright 2011 OpenStack LLC.
# 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 obtai... | |
from __future__ import print_function
import sys
import logging
from . import _stringio
from .types import TOKEN_TYPES, TokenType
logger = logging.getLogger(__name__)
class TokenOffsets(dict):
def __init__(self, parent, default_type=None):
self.logger = logger.getChild(self.__class__.__name__)
... | |
# Copyright 2014 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.
"""Generates java source files from a mojom.Module."""
import argparse
import os
import re
from jinja2 import contextfilter
import mojom.generate.generato... | |
# Copyright 2010-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 required by ap... | |
from __future__ import unicode_literals
from datetime import datetime
from decimal import Decimal
from django import forms
from django.conf import settings
from django.contrib.admin import helpers
from django.contrib.admin.utils import (
NestedObjects, display_for_field, display_for_value, flatten,
flatten_fi... | |
#
# 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
# ... | |
"""Component to allow running Python scripts."""
import datetime
import glob
import logging
import os
import time
from RestrictedPython import (
compile_restricted_exec,
limited_builtins,
safe_builtins,
utility_builtins,
)
from RestrictedPython.Eval import default_guarded_getitem
from RestrictedPython.... | |
"""
This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.
Example usage::
from urllib3 import PoolManager
from urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox
if is_appengine_sandbox():
... | |
"""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 HomeA... | |
"""
Module for controlling deliveries os samples and projects to GRUS
"""
import glob
import time
import requests
import datetime
import os
import logging
import json
import subprocess
import sys
import re
import shutil
from dateutil.relativedelta import relativedelta
from ngi_pipeline.database.classes import Char... | |
from collections import defaultdict
import numpy as np
import param
from bokeh.models import (
CategoricalColorMapper, CustomJS, FactorRange, Range1d, Whisker
)
from bokeh.models.tools import BoxSelectTool
from bokeh.transform import jitter
from ...core.data import Dataset
from ...core.dimension import dimension... | |
"""
Support for MQTT discovery.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/mqtt/#discovery
"""
import asyncio
import json
import logging
import re
from homeassistant.components import mqtt
from homeassistant.components.mqtt import ATTR_DISCOVERY_HA... | |
from __future__ import print_function
__author__ = "shekkizh"
import tensorflow as tf
tfconfig = tf.ConfigProto(allow_soft_placement=True)
tfconfig.gpu_options.allow_growth=True
import numpy as np
import os, sys, inspect
import time
utils_folder = os.path.realpath(
os.path.abspath(os.path.join(os.path.split(ins... | |
# -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder Team
#
# 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/l... | |
"""
FlexGet build and development utilities - unfortunately this file is somewhat messy
"""
from __future__ import print_function
import glob
import os
import shutil
import sys
from paver.easy import environment, task, cmdopts, Bunch, path, call_task, might_call, consume_args
# These 2 packages do magic on import, eve... | |
## 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
import struct
from scapy.packet import *
from scapy.fields import *
from scapy.layers.inet import UDP,TCP
from scapy.laye... | |
import unittest
from Orange.data import Table, Variable, ContinuousVariable
from Orange.preprocess.continuize import DomainContinuizer
from Orange.preprocess import Continuize
from Orange.preprocess import transformation
class ContinuizerTest(unittest.TestCase):
def setUp(self):
Variable._clear_all_cache... | |
'''
------------------------------------------------------------------------
Last updated 7/13/2015
Functions for generating omega, the T x S array which describes the
demographics of the population
This py-file calls the following other file(s):
utils.py
data\demographic\demographic_data.csv
... | |
# coding: utf-8
#
# Esri start of added variables
g_ESRI_variable_1 = r'%scratchGDB%\tempSortedPoints'
# Esri end of added variables
#
#------------------------------------------------------------------------------
# Copyright 2015 Esri
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not ... | |
# Copyright 2015 IBM Corp.
#
# 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 t... | |
# Simplex
"""Provides classes to draw different types of two dimensional simplex
diagrams. A two dimensional simplex diagram is an equal sided triangle,
where each point inside the triangle represents a ratio of three
variables. This could for example be the population ratio of three
species in biology.
"""
import ma... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
# Copyright (c) 2011 OpenStack Foundation
# (c) Cop... | |
# Copyright (C) 2013 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... | |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from canvas.models import FollowCategory
import itertools
class Migration(DataMigration):
def forwards(self, orm):
# Delete dupes.
have_dupes = FollowCategory.objects.raw('sele... | |
# coding: utf-8
"""
Vericred API
Vericred's API allows you to search for Health Plans that a specific doctor
accepts.
## Getting Started
Visit our [Developer Portal](https://developers.vericred.com) to
create an account.
Once you have created an account, you can create one Application for
Production and an... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
#
# 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/LICEN... | |
import urllib2
import urllib
import urlparse
import json
import mimetypes
import mimetools
class MapLargeConnector(object):
###
# Creates a connection to a MapLarge API server
###
###
# When NO_WEB_CALLS is true all MapLargeConnectors will not make remote
# calls. Instead, the response will b... | |
#!/usr/bin/env python
# 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.
"""A tool to kill any leftover test processes, executed by buildbot.
Only works on Windows."""
import optparse
import os
import r... | |
from django.db import models
from django.urls import reverse
from taggit.managers import TaggableManager
from dcim.fields import ASNField
from dcim.models import CableTermination, PathEndpoint
from extras.models import ChangeLoggedModel, CustomFieldModel, ObjectChange, TaggedItem
from extras.utils import extras_featur... | |
#!/usr/local/sci/bin/python
# PYTHON2.7
#
# Author: Kate Willett
# Created: 23 April 2016
# Last update: 23 April 2016
# Location: /data/local/hadkw/HADCRUH2/MARINE/EUSTACEMDS/EUSTACE_SST_MAT/
# GitHub: https://github.com/Kate-Willett/HadISDH_Marine_Build/
# -----------------------
# CODE PURPOSE AND OUTPUT
# ---... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | |
import collections
import xml.etree.ElementTree as ET
import fiona.crs
import geopandas as gpd
from pandas.io.common import urlopen, urlencode
import pandas as pd
from shapely.geometry import Point, LineString
from six import string_types
OSMData = collections.namedtuple('OSMData', ('nodes', 'waynodes', 'waytags',
... | |
#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2017 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""Check in on the status of this machine's MegaRAID array and log information
to the M&C system.
We assume that there is one controller with one big old RAID array.
This sc... | |
###############################################################################
##
## Copyright (C) 2012-2014 Tavendo GmbH
##
## 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
##
## h... | |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
from pycket.error import SchemeException
from pycket import values
path_home_dir = values.W_Symbol.make("home-dir")
path_pref_dir = values.W_Symbol.make("pref-dir")
path_pref_file = values.W_Symbol.make("pref-file")
path_temp_dir = values.W_Symbol.make("temp-dir... | |
# mako/codegen.py
# Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""provides functionality for rendering a parsetree constructing into module source code."""
impo... | |
# coding: utf-8
from sqlalchemy import all_
from sqlalchemy import and_
from sqlalchemy import any_
from sqlalchemy import Boolean
from sqlalchemy import cast
from sqlalchemy import Column
from sqlalchemy import false
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import or_
from sqla... | |
# Copyright 2020 The Oppia 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 ... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import unittest
from datetime import datetime
from unittest import TestCase
from mock import patch, Mock
from click.testing import CliRunner
from statuspage import cli, update, create, iter_systems, get_severity, SYSTEM_LAB... | |
################################################################################
# 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... | |
import pytest, py
from _pytest.main import Session
class TestCollector:
def test_collect_versus_item(self):
from pytest import Collector, Item
assert not issubclass(Collector, Item)
assert not issubclass(Item, Collector)
def test_compat_attributes(self, testdir, recwarn):
modc... | |
"""
mweigert@mpi-cbg.de
"""
from __future__ import absolute_import
from __future__ import print_function
import numpy as np
from biobeam import Bpm3d
from gputools import convolve_spatial3
from collections import namedtuple
from six.moves import range
from functools import reduce
def _perm_inverse(perm):
inver... | |
#!/usr/bin/python
import glob
import argparse
import numpy as np
from dicom_tools.pyqtgraph.Qt import QtCore, QtGui
import dicom_tools.pyqtgraph as pg
import dicom
from dicom_tools.FileReader import FileReader
#from dicom_tools.read_files import read_files
from scipy import ndimage
import os
from dicom_tools.roiFileHan... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitsend Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test decoding scripts via decodescript RPC command."""
from test_framework.messages import CTransactio... | |
"""
Import the given MODIS tile into the provided NDVI and QA worldgrid.
Assert that the MODIS tile contains (at least) the requested dates.
Note that this require a .csv file with NDVI dates to import. This file
can be create with the ``ndvi_collect_dates.py`` script.
Example invocation::
python rastercube/scri... | |
'''
XbrlPublicPostgresDB.py implements a relational database interface for Arelle, based
on the XBRL US Public Database. The database schema is described by "XBRL US Public Database",
published by XBRL US, 2011. This is a syntactic representation of XBRL information.
This module provides the execution context for s... | |
# Copyright 2013: Mirantis 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 b... | |
from __future__ import print_function, division
from sympy.tensor.indexed import Idx
from sympy.core.mul import Mul
from sympy.core.singleton import S
from sympy.concrete.expr_with_intlimits import ExprWithIntLimits
from sympy.functions.elementary.exponential import exp, log
from sympy.polys import quo, roots
from sym... | |
# 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 ... | |
'''
Created on Mar 7, 2011
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
'''
import inspect, os
from arelle import XmlUtil, XbrlConst, XPathParser, Locale, XPathContext
from arelle.ModelDtsObject import ModelResource
from arelle.ModelInstanceObject import ModelDimensio... | |
# Copyright 2013 Donald Stufft and individual contributors
#
# 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... | |
""" Cisco_IOS_XR_crypto_sam_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR crypto\-sam package configuration.
This module contains definitions
for the following management objects\:
crypto\: Crypto configuration
Copyright (c) 2013\-2015 by Cisco Systems, Inc.
All rights reserved.
"""... | |
# Copyright (c) 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 copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.