gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
""" Initiate jobs at Browserstack Screenshots and downloads the images when
they are complete. Optionally renames and slices images for use with
PhantomCSS visual regression testing tool """
import math
import os
import sys
import time
import re
import getopt
import ConfigParser
from PIL import Image
import r... | |
# -*- coding: utf-8 -*-
import os
"""
General Django settings for FST webservice
"""
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ROOT = os.path.abspath(os.path.dirname(__file__))
make_root_path = lambda *args: os.path.join(ROOT, *args)
# Read SECRET_KEY from file at project level
# To repla... | |
#Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/renderPS.py
__version__=''' $Id: renderPS.py 3550 2009-09-11 16:56:43Z rgbecker $ '''
__doc__="""Render drawing objects in Postscript"""
impo... | |
"""
This module contains the Schema-class definition
"""
from .fields import Field
from .exceptions import ValidationError
from .db import get_default_handler, create_handler
class Schema:
__config__ = None
def __init__(self, *args, **kwargs):
"""
Instantiate new object
:param __dic... | |
# Lint as: python2, python3
# 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
#
... | |
# Copyright 2012 Josh Durgin
# Copyright 2013 Canonical 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/LICENS... | |
#!/usr/bin/env python
"""This modules contains regression tests for clients API handlers."""
from grr.gui import api_regression_test_lib
from grr.gui.api_plugins import client as client_plugin
from grr.lib import aff4
from grr.lib import flags
from grr.lib import flow
from grr.lib import queue_manager
from grr.lib... | |
from discord.ext import commands
import discord
from cogs.utils import checks, context, db
from cogs.utils.config import Config
import datetime, re
import json, asyncio
import copy
import logging
import traceback
import aiohttp
import sys
from collections import Counter, deque, defaultdict
import config
import asyncpg... | |
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2005, Tim Potter <tpot@samba.org>
# Copyright 2006 John-Mark Gurney <gurney_j@resnet.uroegon.edu>
# Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com).
# Copyright 2006,2007,2008,2009 Frank Scholz <coherence@beebits.net>
#
# ... | |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ---------------... | |
#!/usr/bin/python
#
# Open SoundControl for Python
# Copyright (C) 2002 Daniel Holth, Clinton McChesney
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the Licen... | |
import logging
import sys
import os
import re
import json
import base64
from splunk.clilib.bundle_paths import make_splunkhome_path
from splunk import ResourceNotFound
import splunk.entity as entity
from splunk.rest import simpleRequest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from google_driv... | |
# Copyright (c) 2019 UAVCAN Consortium
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <pavel@uavcan.org>
# pylint: disable=protected-access
from __future__ import annotations
import sys
import time
import typing
import socket
from pyuavcan.transport import MessageDataSpeci... | |
"""Implements operations on bytes and str (unicode) array items."""
import operator
import numpy as np
from llvmlite import ir
from numba.core import types, cgutils
from numba.core.extending import (overload, intrinsic, overload_method,
lower_cast, register_jitable)
from numba.core.cg... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2010 OpenStack 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... | |
from datetime import (
datetime,
timedelta,
tzinfo,
)
from io import (
BufferedIOBase,
RawIOBase,
TextIOBase,
TextIOWrapper,
)
from mmap import mmap
from os import PathLike
from typing import (
IO,
TYPE_CHECKING,
Any,
AnyStr,
Callable,
Collection,
Dict,
Hashab... | |
"""
This file is part of the pyquaternion python module
Author: Kieran Wynn
Website: https://github.com/KieranWynn/pyquaternion
Documentation: http://kieranwynn.github.io/pyquaternion/
Version: 1.0.0
License: The MIT License (MIT)
Copyright (c) 2015 Kieran Wynn
Permission is hereby g... | |
"""Kintaro extension for integrating Kintaro into Grow sites."""
import copy
import datetime
import json
import logging
import os
import re
import grow
import httplib2
import slugify
from googleapiclient import discovery
from grow.common import oauth
from grow.common import utils
from grow.documents import document as ... | |
from omgeo.processor import _Processor
import re
# Python 2/3 compatibility: set up 'unicode' for use in string type checking
try:
unicode
except NameError:
unicode = str
class _PreProcessor(_Processor):
"""Takes, processes, and returns a geocoding.places.PlaceQuery object."""
def process(self, pq):
... | |
# -*- coding: utf-8 -*-
"""
Various functions to visualize connectivity, activity and accuracy of the
network.
@author: rbodo
"""
import os
import numpy as np
import matplotlib.pyplot as plt
from snntoolbox.utils.utils import get_pearson_coefficients, extract_label, \
wilson_score
from snntoolbox.conversion.util... | |
#!/usr/bin/env python
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WIT... | |
#!/usr/bin/env python
"""
A simple library for controlling VMware vCenter / ESXi servers.
Copyright:
(C) COPYRIGHT Cambridge Consultants Ltd 2017-2018
Licence:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obta... | |
# from __future__ import unicode_literals
from rmathics.expression import (
BaseExpression, Expression, Symbol, String, fully_qualified_symbol_name,
Integer, Rational, Real,
)
from rmathics.rpython_util import all
from rmathics.convert import int2Integer, int2Rational, float2Real
from rmathics.gmp import c_mpz... | |
"""Define the API for geneparse."""
# This file is part of geneparse.
#
# The MIT License (MIT)
#
# Copyright (c) 2017 Pharmacogenomics Centre
#
# 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 Softwa... | |
# coding=utf-8
# Copyright 2022 The Edward2 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 o... | |
#!/usr/bin/env python
"""
================================================================
rsfMRI: AFNI, ANTS, DicomStack, FreeSurfer, FSL, Nipy, aCompCorr
================================================================
A preprocessing workflow for Siemens resting state data.
This workflow makes use of:
- AFNI
- A... | |
# -*- coding: utf-8 -*-
# Copyright 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 requi... | |
# Copyright 2012-2013 NEC 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 requ... | |
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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... | |
# -*- coding: utf-8 -*-
"""This module investigates the properties of paths of length two (A - B - C)."""
from typing import Dict, Iterable, List, Mapping, Tuple
from pybel import BELGraph
from pybel.constants import (
ACTIVITY, CAUSAL_RELATIONS, DEGRADATION, LINE, MODIFIER, RELATION, SOURCE, TARGET, TRANSLOCATI... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2010-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
#
# ... | |
# -*- coding: utf-8 -*-
__version__ = '1.6.1'
import os
import xml.etree.ElementTree as ET
import urllib.parse
from collections import namedtuple
from docutils import nodes, utils
from sphinx.util.nodes import split_explicit_title
from sphinx.util.console import bold, standout
from sphinx import __version__ as sphin... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import unittest
import pickle
import warnings
from pymatgen.util.testing import PymatgenTest
from pymatgen.core.periodic_table import Element, Specie, DummySp... | |
"""
utilities
"""
import os
import sys
import time
import zlib
import uuid
import math
import fcntl
import base64
import random
import inspect
import datetime
import threading
import traceback
import functools
import Cryptodome.Random
import Cryptodome.Hash.HMAC
import Cryptodome.Cipher.AES
from future.utils import i... | |
# coding: utf-8
# Copyright 2013 The Font Bakery 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 re... | |
# these is a list of the xy values for a Hue Go light, mapped to the 411 FM frequencies. See also analysis/color_space_analysis.py
gamut_c = [
[0.153942405912,0.0489619046827],
[0.153479136279,0.0485072480838],
[0.155116311657,0.0491626216677],
[0.158374010263,0.0506764684199],
[0.16277231031,0.052797231326],
[0.... | |
#!/usr/bin/env python
import random
import dijkstra
import goal
import math as np
import pygame
class PRMGenerator:
"""
Class used to hold methods and variables that are important
for the global path planning problem. This class generates
the roadmap and finds the shortest path to the the goals by
... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012-2013 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.... | |
#
# 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... | |
from toontown.coghq.SpecImports import *
GlobalEntities = {1000: {'type': 'levelMgr',
'name': 'LevelMgr',
'comment': '',
'parentEntId': 0,
'cogLevel': 0,
'farPlaneDistance': 1500,
'modelFilename': 'phase_11/models/lawbotHQ/LB_Zone7a',
'wantDoors': 1},
1001: {'typ... | |
#!/usr/bin/env python
import time, math
from log import Log
# Set debug
log = Log("SensorFusion")
DEG2RAD = 0.0174532925
## Algorithms and functions for 9DOF fusion
#
# Uses data from accelerometers, gyroscopes and magnetometers to
# do sensor fusion and obtain orientation of the device in a quaternion
# representati... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
from email.MIMEText import MIMEText
import smtplib
import time
import datetime
from datetime import date
from django.core.mail import EmailMultiAlternatives
from env_settings import HOME_PATH
sys.path.append(HOME_PATH)
from django.core import management... | |
import os
import tempfile
import unittest
import unittest.mock
from . import profile
from . import test_helper
@unittest.mock.patch.object(
profile.Profile,
'generate',
autospec=True,
)
@unittest.mock.patch.object(
profile.Profile,
'__abstractmethods__',
new=set(),
)
class TestProfile(unittest.TestCa... | |
# -*- coding: utf-8 -*-
import httplib as http
import mock
import unittest # noqa
from nose.tools import * # noqa (PEP8 asserts)
import datetime
from modularodm import fields, storage, Q
from tests.base import OsfTestCase
from tests import factories
from tests.utils import mock_archive, assert_logs
from framework.... | |
#!/usr/bin/python
# (c) 2018-2019, NetApp, Inc
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],... | |
"""Rest API for Home Assistant."""
import asyncio
import json
import logging
from aiohttp import web
from aiohttp.web_exceptions import HTTPBadRequest
import async_timeout
import voluptuous as vol
from homeassistant.auth.permissions.const import POLICY_READ
from homeassistant.bootstrap import DATA_LOGGING
from homeas... | |
# -*- 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 'CategoryImage.banner'
db.add_column('product_categoryimag... | |
#!/usr/bin/env python
from __future__ import print_function
import os
import sys
import argparse
import markdown
import pygments
from pygments.lexers import CppLexer, JavaLexer, CLexer, PythonLexer
from pygments.formatters import HtmlFormatter, TerminalFormatter, NullFormatter
start_delimiter = "/* START SOLUTION *... | |
import os.path
import pickle
import shutil
import tempfile
import unittest
import pcl
import numpy as np
from numpy.testing import assert_array_equal
_data = [(i,2*i,3*i+0.2) for i in range(5)]
_DATA = \
"""0.0, 0.0, 0.2;
1.0, 2.0, 3.2;
2.0, 4.0, 6.2;
3.0, 6.0, 9.2;
4.0, 8.0, 12.2"""
class TestListIO(unittest.Test... | |
"""Implement Prometheus statistics."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the ... | |
#!/usr/bin/python
import sys
import os
import time
import ConfigParser
import tempfile
import codecs
from StringIO import StringIO
from sfa.util.xml import XML
default_config = \
"""
"""
def isbool(v):
return v.lower() in ("true", "false")
def str2bool(v):
return v.lower() in ("true", "1")
clas... | |
#!/usr/bin/python
# Copyright (c) 2011-2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module that contains unittests for validation_pool module."""
import contextlib
import copy
import functools
import iterto... | |
"""
This paver file is intented to help with the release process as much as
possible. It relies on virtualenv to generate 'bootstrap' environments as
independent from the user system as possible (e.g. to make sure the sphinx doc
is built against the built numpy, not an installed one).
Building a fancy dmg from scratch... | |
#!/usr/bin/env python
"""
Handle background (invisible) tasks for the telescope UI
History:
2003-02-27 ROwen Error messages now go to the log, not stderr.
2003-03-05 ROwen Modified to use simplified KeyVariables.
2003-05-08 ROwen Modified to use RO.CnvUtil.
2003-06-18 ROwen Modified to test for StandardErr... | |
# 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... | |
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | |
#!/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... | |
#!/usr/bin/env python
"""This plugin renders the client search page."""
import urllib
from grr.gui import renderers
from grr.gui.plugins import forms
from grr.gui.plugins import semantic
from grr.lib import aff4
from grr.lib import flow
from grr.lib import rdfvalue
from grr.lib import utils
class NotificationCount(... | |
# Tai Sakuma <tai.sakuma@gmail.com>
import logging
import time
from operator import itemgetter
from collections import deque
##__________________________________________________________________||
class TaskPackageDropbox:
"""A drop box for task packages.
This class puts task packages in a working area and hav... | |
# -*- coding: utf-8 -*-
"""
pysteps.io.nowcast_importers
============================
Methods for importing nowcast files.
The methods in this module implement the following interface::
import_xxx(filename, optional arguments)
where xxx is the name (or abbreviation) of the file format and filename is the
name of ... | |
# Copyright 2018 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 ... | |
"""Builder for Grade Reports."""
import os
import pdb
import sys
import traceback
from itertools import groupby
try:
import numpy as np
except ImportError:
np = None
try:
import scipy.stats as st
except ImportError:
st = None
from regolith.builders.basebuilder import LatexBuilderBase
from regolith.to... | |
"""
Support for lowering generators.
"""
from llvmlite.llvmpy.core import Constant, Type, Builder
from numba.core import types, config, cgutils
from numba.core.funcdesc import FunctionDescriptor
class GeneratorDescriptor(FunctionDescriptor):
"""
The descriptor for a generator's next function.
"""
__... | |
import numpy as np
import pandas as pd
from sklearn import preprocessing
import matplotlib.pyplot as plt
import matplotlib
#
# TODO: Parameters to play around with
PLOT_TYPE_TEXT = False # If you'd like to see indices
PLOT_VECTORS = True # If you'd like to see your original features in P.C.-Space
matplotl... | |
import gobject
import gobject.constants
import weakref
from weak import weak_connect
from util import append_attr
SSIGNAL = gobject.SIGNAL_RUN_LAST | gobject.SIGNAL_NO_RECURSE | gobject.SIGNAL_ACTION
SACTION = gobject.SIGNAL_RUN_LAST | gobject.SIGNAL_ACTION
def attach_signal_connect_info(attr, obj, func, after, idle... | |
# -*- encoding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | |
"""
.. module: lemur.certificates.views
:platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
import base64
from builtins import str
from flask import Blueprint, make_response, js... | |
"""
See also: test_reindex.py:TestReindexSetIndex
"""
from datetime import (
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas import (
Categorical,
DataFrame,
DatetimeIndex,
Index,
MultiIndex,
Series,
date_range,
period_range,
to_datetime,
)
import panda... | |
# -*- coding: utf-8 -*-
import six
from django.conf import settings
from django.core import validators
from django.db import models
from django.utils.translation import gettext_lazy
from modeltranslation.manager import MultilingualManager
class TestModel(models.Model):
title = models.CharField(gettext_lazy('titl... | |
"""Support for UK public transport data provided by transportapi.com.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.uk_transport/
"""
import logging
import re
from datetime import datetime, timedelta
import requests
import voluptuous as vol
imp... | |
from wagtail.wagtailcore.models import Page, PageRevision
import requests
from django.core.files.base import ContentFile
import urllib
import hashlib
import json
from PIL import Image
from django.conf import settings
from celery.decorators import task
from StringIO import StringIO
from django.core.files.uploadedfile im... | |
from decimal import Decimal as D
import logging
from django.views.generic import RedirectView as DjangoRedirectView
from django.views.generic import View
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.contrib import messages
from django.... | |
# -*- 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... | |
from rest_framework import generics
from rest_framework import permissions as drf_permissions
from rest_framework.exceptions import NotAuthenticated
from django.contrib.auth.models import AnonymousUser
from modularodm import Q
from framework.auth.core import Auth
from framework.auth.oauth_scopes import CoreScopes
fr... | |
import subprocess as sub
# -----> * Filing * <-----
# ask the user the name of the game to create a .txt file
print("Enter game's name:")
name_file = input("")
name_file_string = str(name_file)
file_name = name_file_string + ".txt"
# create a writable .txt file
safile = open(file_name, "w")
safile.write("This game's... | |
import logging
import os
from insights.util.subproc import call
from subprocess import STDOUT
log = logging.getLogger(__name__)
GLOBAL_PRODUCTS = []
PRODUCT_NAMES = []
DEFAULT_VERSION = ["-1", "-1"]
FSRoots = []
def fs_root(thing):
FSRoots.append(thing)
return thing
def product(klass):
GLOBAL_PRODUCTS... | |
"""
Load an analysis file and redo the predictions on the validation set / test set,
this time with augmented data and averaging. Store them as numpy files.
"""
import numpy as np
# import pandas as pd
import theano
import theano.tensor as T
import layers
import cc_layers
import custom
import load_data
import realtime... | |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
#
# License: BSD (3-clause)
from copy import deepcopy
import re
import numpy as np
from .constants import FIFF
from ..utils import logge... | |
#!/usr/bin/env python
# pkgsearch.py - Print information about installed Python packages
# and modules.
import sys, os.path
import compiler
import site
from imp import *
__usage__="""Usage: %s [optional paths] % sys.argv[0])"""
class PkgUtil(object):
""" Utility class for querying information about
install... | |
"""
Module for handling OpenStack Heat calls
.. versionadded:: 2017.7.0
:depends: - heatclient Python module
:configuration: This module is not usable until the user, password, tenant, and
auth URL are specified either in a pillar or in the minion's config file.
For example::
keystone.user: admin
... | |
'''
Exploring the properties of the skewness and kurtosis arrays.
'''
from spectral_cube import SpectralCube
from spectral_cube.lower_dimensional_structures import Projection
import numpy as np
import matplotlib.pyplot as p
from astropy.io import fits
import astropy.units as u
from astropy.coordinates import Angle
im... | |
'''
Code for processing tables in the LEMON parser generator.
'''
from struct import *
from ccruft import *
# There is one instance of the following structure for each
# associative array
s_x = struct(
's_x', (
'size', # The number of available slots.
# Must be a power of 2 greater t... | |
# coding: utf-8
"""
Phaxio API
API Definition for Phaxio
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
import json
import ssl
import certifi
import logging
import re
import requests
# python 2... | |
# Copyright 2012 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... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# -*- coding: utf-8 -*-
""" PolymorphicModel Meta Class
Please see README.rst or DOCS.rst or http://chrisglass.github.com/django_polymorphic/
"""
from __future__ import absolute_import
import sys
import inspect
import django
from django.db import models
from django.db.models.base import ModelBase
from django.db.m... | |
#!/usr/bin/env python
# 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
#
# Unle... | |
#
# 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... | |
#!/usr/bin/env python
# Copyright (c) 2013 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.
"""Installs deps for using SDK emulator for testing.
The script will download the SDK and system images, if they are not present, ... | |
# Copyright (c) 2015 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 ... | |
# Copyright 2017 Max Planck Society
# Distributed under the BSD-3 Software license,
# (See accompanying file ./LICENSE.txt or copy at
# https://opensource.org/licenses/BSD-3-Clause)
"""Training AdaGAN on various datasets.
Refer to the arXiv paper 'AdaGAN: Boosting Generative Models'
Coded by Ilya Tolstikhin, Carl-Joha... | |
import json
import logging
import re
from urllib import urlencode
from urlparse import urlparse
from google.appengine.api import urlfetch
from BeautifulSoup import BeautifulSoup
from consts.media_type import MediaType
class MediaHelper(object):
SOCIAL_SORT_ORDER = {
MediaType.FACEBOOK_PROFILE: 0,
... | |
from functools import total_ordering, lru_cache
import logging
import re
import requests
from eva_cttv_pipeline.trait_mapping.ols import get_ontology_label_from_ols, is_in_efo
from eva_cttv_pipeline.trait_mapping.ols import is_current_and_in_efo
from eva_cttv_pipeline.trait_mapping.utils import json_request
logger =... | |
# 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... | |
"""Plotting functions for linear models (broadly construed)."""
from __future__ import division
import itertools
import numpy as np
import pandas as pd
from scipy import stats
from scipy.spatial import distance
import statsmodels.api as sm
import statsmodels.formula.api as sf
import matplotlib as mpl
import matplotlib.... | |
#!/usr/bin/env python
"""A lightweight wrapper around MySQLdb.
Originally part of the Tornado framework. The tornado.database module
is slated for removal in Tornado 3.0, and it is now available separately
as torndb.
Edited by haoming li:
- Connection pool support with PooledDB implemented.
- The first row ... | |
"""Support for generic GeoJSON events."""
from __future__ import annotations
from datetime import timedelta
import logging
from geojson_client.generic_feed import GenericFeedManager
import voluptuous as vol
from homeassistant.components.geo_location import PLATFORM_SCHEMA, GeolocationEvent
from homeassistant.const i... | |
# -*- coding: utf-8 -*-
""" Simple Generic Location Tracking System
@copyright: 2011-12 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the So... | |
#!/usr/bin/env python
# Purpose: Annotate transposon insertion locations using
# one or more .ptt files for the genome
#
# Copyright (c) 2014 University of Washington
#-----------------------------------------------------
# modules
#-----------------------------------------------------
import sys
import optparse
impor... | |
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.