gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "... | |
# coding: utf-8
from django.conf import settings
from django.contrib.contenttypes.generic import generic_inlineformset_factory
from django.test import TestCase
# local test models
from models import Episode, EpisodeExtra, EpisodeMaxNum, EpisodeExclude, \
Media, EpisodePermanent, MediaPermanentInlin... | |
"""Maintains the ball count for a ball device."""
import asyncio
from typing import Optional
from mpf.devices.ball_device.physical_ball_counter import PhysicalBallCounter, EjectTracker
from mpf.devices.ball_device.entrance_switch_counter import EntranceSwitchCounter
from mpf.devices.ball_device.switch_counter import S... | |
"""Tests for certbot._internal.cli."""
import argparse
import copy
from importlib import reload as reload_module
import io
import tempfile
import unittest
from acme import challenges
from certbot import errors
from certbot._internal import cli
from certbot._internal import constants
from certbot._internal.plugins impo... | |
# Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
# -*- coding: utf-8 -*-
"""
Sutra YAML Processor
@author: kmadathil
"""
from sanskrit_parser.generator.sutra import LRSutra
from sanskrit_parser.generator.maheshvara import * # noqa: F403
from sanskrit_parser.generator.paribhasha import * # noqa: F403
from sanskrit_parser.generator.pratyaya import * # noqa: F403
fr... | |
#!/usr/bin/env python3
#
# 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, softwa... | |
# -*- coding: utf-8 -*-
import json
import re
import datetime
from dateutil.parser import parse
from django.core.exceptions import ObjectDoesNotExist
from django.core.management import CommandError
import pytz
import requests
from events.exporter.base import register_exporter, Exporter
from events.models import Event, ... | |
import textwrap
import warnings
import inspect
import uuid
import collections
from .compat import callable, exec_, string_types, with_metaclass
from sqlalchemy.util import format_argspec_plus, update_wrapper
from sqlalchemy.util.compat import inspect_getfullargspec
class _ModuleClsMeta(type):
def __setattr__(cl... | |
# 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... | |
import sys
import re
import textwrap
from doctest import OutputChecker, ELLIPSIS
from tests.test_pip import reset_env, run_pip, write_file, get_env, pyversion
from tests.local_repos import local_checkout, local_repo
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)
def _check_output(result, expecte... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import logging
from saml2 import BINDING_HTTP_REDIRECT, BINDING_SOAP, BINDING_HTTP_POST
from saml2.config import SPConfig, IdPConfig, Config
from saml2.metadata import MetaData
from py.test import raises
from saml2 import root_logger
sp1 = {
"entityid" : ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import json
import os
import random as _random
import sys
import traceback
from getopt import getopt, GetoptError
from multiprocessing import Process
from os import environ
from wsgiref.simple_server import make_server
import requests as _requests
from json... | |
# subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2004 by Peter Astrand <astrand@lysator.liu.se>
#
# By obtaining, using, and/or copying this software and/or its
# associated documentation, you agree that you have read, understood,
# ... | |
from fontbakery.callable import check
from fontbakery.checkrunner import FAIL, PASS, WARN, INFO
from fontbakery.message import Message
# used to inform get_module_profile whether and how to create a profile
from fontbakery.fonts_profile import profile_factory # NOQA pylint: disable=unused-import
profile_imports = [
... | |
from __future__ import unicode_literals
import logging
import sys
from raven.utils.testutils import TestCase
from raven.utils import six
from raven.base import Client
from raven.handlers.logging import SentryHandler
from raven.utils.stacks import iter_stack_frames
class TempStoreClient(Client):
def __init__(self... | |
import rethinkdb as r
from mockthink.test.common import assertEqUnordered
from mockthink.test.functional.common import MockTest
def common_join_data():
people_data = [
{'id': 'joe-id', 'name': 'Joe'},
{'id': 'tom-id', 'name': 'Tom'},
{'id': 'arnold-id', 'name': 'Arnold'}
]
job_data... | |
from io import BytesIO
import json
import logging
import uuid
import os
from celery import uuid as celery_uuid
from celery.result import AsyncResult
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth import login
from django.contrib import messages
from django.core... | |
# Copyright 2009 Facebook
#
# 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, sof... | |
from django.test import TestCase, Client
from django.contrib.auth.models import User
from django.core.urlresolvers import resolve, reverse
from account.views import ForgotPasswordView, ResetPasswordView
from mock import patch
from account.emails import SendGrid
from resources.models import Resource
from pairprogram.mod... | |
# 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 ... | |
"""
Create metrics for Dataverses.
This may be used for APIs, views with visualizations, etc.
"""
from collections import OrderedDict
from django.db import models
from dv_apps.utils.date_helper import get_month_name_abbreviation,\
get_month_name
from dv_apps.dataverses.models import Dataverse, DATAVERSE_TYPE_UNCA... | |
import os,io
import pandas as pd
from shlex import quote
from contextlib import redirect_stdout
from igf_data.utils.fileutils import get_temp_dir,remove_dir,check_file_path,copy_local_file
def run_plotCoverage(bam_files,output_raw_counts,plotcov_stdout,output_plot=None,
blacklist_file=None,thre... | |
"""Float class.
Represents an unbounded float using a widget.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distribute... | |
#!/usr/bin/env python
"""Memory Map File Analyser for ARM mbed"""
import sys
import os
import re
import csv
import json
import argparse
from prettytable import PrettyTable
from tools.utils import argparse_filestring_type, \
argparse_lowercase_hyphen_type, argparse_uppercase_type
DEBUG = False
RE_ARMCC = re.comp... | |
import sublime
import unittest
from unittest.mock import patch, MagicMock
from Terminality.macro import Macro
def file_content(region):
contents = """
Hello, World!
This might be a long file
In which use to test something
Blah blah blah...
"""
return contents[region.begin():region.end()]
... | |
# 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.
from measurements import oilpan_gc_times
from telemetry.core import util
from telemetry.results import page_test_results
from telemetry.timeline import mode... | |
from __future__ import print_function
from spectrum import *
from scipy.stats import kurtosis
from sklearn.linear_model import LogisticRegression, LassoCV
from sklearn.metrics import auc, roc_curve
from datetime import datetime
import numpy ... | |
# -*- coding: utf-8 -*-
import pytest
from marshmallow import (
Schema,
fields,
pre_dump,
post_dump,
pre_load,
post_load,
validates,
validates_schema,
ValidationError,
)
def test_decorated_processors():
class ExampleSchema(Schema):
"""Includes different ways to invoke ... | |
# Created By: Eric Mc Sween
# Created On: 2008-05-29
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-... | |
# coding=utf-8
from django import forms
from django.contrib.auth.forms import (UserCreationForm, UserChangeForm,
AdminPasswordChangeForm, PasswordChangeForm)
from django.contrib.auth.models import Group, Permission
from django.core.exceptions import PermissionDenied
from django.te... | |
# TNC Python interface
# @(#) $Jeannot: tnc.py,v 1.11 2005/01/28 18:27:31 js Exp $
# Copyright (c) 2004-2005, Jean-Sebastien Roy (js@jeannot.org)
# 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 Soft... | |
import sys
import time
import subprocess
from subprocess import Popen
from subprocess import PIPE
import json
import os
import re
import base64, uuid, io, codecs, mimetypes
import shutil
import shlex
import xml.dom.minidom
try:
from urllib2 import Request, urlopen
from urllib2 import URLError, HTTPError
from httplib... | |
# -*- coding: utf-8 -*-
"""
Parse, stream, create, sign and verify Bitcoin transactions as Tx structures.
The MIT License (MIT)
Copyright (c) 2013 by Richard Kiss
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... | |
#!/usr/bin/env python
import argparse
import logging
import subprocess
import sys
import os
import re
# Set logging
logging.basicConfig(filename="smrtsv.log", level=logging.DEBUG)
# Set cluster parameters
CLUSTER_SETTINGS = ' -V -cwd -e ./log -o ./log {cluster.params} -w n -S /bin/bash'
CLUSTER_FLAG = ("--drmaa", CLU... | |
import contextlib
import blinker
import blinker._saferef
import pprint
import copy
import functools
import os
import typing
import textwrap
import ruamel.yaml
from mitmproxy import exceptions
from mitmproxy.utils import typecheck
"""
The base implementation for Options.
"""
unset = object()
class _Option:
... | |
from typing import Callable, Optional
import bitcoin
from PyQt5 import QtCore
from PyQt5.QtCore import pyqtSlot, Qt, QTimer
from PyQt5.QtGui import QTextDocument
from PyQt5.QtWidgets import QWidget, QLineEdit, QMessageBox, QAction, QApplication, QActionGroup
import dash_utils
import hw_intf
from app_config import Mas... | |
# -*- coding: utf-8 -*-
# This coding header is significant for tests, as the debug view is parsing
# files to search for such a header to decode the source file content
from __future__ import unicode_literals
import importlib
import inspect
import os
import re
import shutil
import sys
from tempfile import NamedTempor... | |
# Copyright 2014 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# standard library modules, , ,
import logging
import re
import functools
# requests, apache2
import requests
# PyGithub, LGPL, Python library for Github API v3, pip install PyGithub
import github
from gith... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
import pyconde.attendees.validators
class Migration(migrations.Migration):
dependencies = [
('contenttyp... | |
import numpy as _np
import scipy.sparse as _sp
from ._basis_utils import _shuffle_sites
####################################################
# set of helper functions to implement the partial #
# trace of lattice density matrices. They do not #
# have any checks and states are assumed to be #
# in the non-sym... | |
#!/usr/bin/python
#
# Copyright (C) 2007, 2008 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 applicabl... | |
# -*- test-case-name: twisted.web.test.test_error -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Exception definitions for L{twisted.web}.
"""
from __future__ import division, absolute_import
try:
from future_builtins import ascii
except ImportError:
pass
__all__ = [
'Err... | |
"""The tests the for Locative device tracker platform."""
from http import HTTPStatus
from unittest.mock import patch
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components import locative
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAI... | |
#!/usr/bin/env python
import rospy;
import math;
import threading;
import numpy as np;
from nav_msgs.srv import GetPlan ,GetPlanRequest;
from nav_msgs.msg import Path , OccupancyGrid, Odometry;
from communication_node.msg import Data_Goal,Data_Map;
from geometry_msgs.msg import Point , PoseStamped
from std_msgs.msg im... | |
import mock
import pytest
import hmac
import hashlib
import lxml.etree
from django.utils import timezone
from osf_tests import factories
from website import settings
@pytest.mark.django_db
class TestCrossRefEmailResponse:
def make_mailgun_payload(self, crossref_response):
mailgun_payload = {
... | |
# -*- coding: utf-8 -*-
import os
import unittest
import datetime
from decimal import Decimal
from dateutil.relativedelta import relativedelta
import pycountry
import trytond.tests.test_tryton
from trytond.tests.test_tryton import (
POOL, USER, CONTEXT,
ModuleTestCase, with_transaction
)
from trytond.transact... | |
from typing import Undefined, Any
from flask.ext.restful import Resource, fields
from flask import request
import inspect
import functools
import re
from . import registry, registered, api_spec_endpoint
from . import html
basestring = str
resource_listing_endpoint = Undefined(Any)
resource_listing_endpoint = None
de... | |
#
#
# All Rights Reserved.
# Copyright 2011 OpenStack LLC.
# Copyright 2010 Jacob Kaplan-Moss
# 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.a... | |
"""
The :mod:`sklearn.feature_extraction.image` submodule gathers utilities to
extract features from images.
"""
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Olivier Grisel
# Vlad Niculae
# License: BSD 3 clause
fro... | |
# These are the run-once tasks to get AWS ready-for-use, in addition to
# utilities used by our scripts to access AWS.
import os
import time
import boto.ec2
import boto.exception
import boto.manage.cmdshell
import boto.sdb
import pprint
SSH_FOLDER = os.path.expanduser("~/.ssh/")
AWS_REGION = "us-east-1" # US East (Vi... | |
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | |
"""Here we define the exported functions, types, etc... which need to be
exported through a global C pointer.
Each dictionary contains name -> index pair.
Whenever you change one index, you break the ABI (and the ABI version number
should be incremented). Whenever you add an item to one of the dict, the API
needs to ... | |
"""
Test derivatives by comparing analytic to finite difference.
"""
from __future__ import print_function
import unittest
import numpy as np
from openmdao.api import Problem, IndepVarComp
from openmdao.utils.assert_utils import assert_rel_error, assert_check_partials
from CADRE.attitude import Attitude_Angular, At... | |
# 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... | |
from __future__ import division
from .eigenframe import EigenFrame
from astropy.coordinates import SkyCoord
from astropy.table import Table
from astropy.utils.console import ProgressBar
from astropy.utils.misc import NumpyRNGContext
import healpy as hp
import numpy as np
import numpy.linalg as nl
from scipy.stats impor... | |
import json
import logging
import os
import simplejson
from redash.query_runner import *
from redash.settings import parse_boolean
from redash.utils import SimpleJSONEncoder
logger = logging.getLogger(__name__)
ANNOTATE_QUERY = parse_boolean(os.environ.get('ATHENA_ANNOTATE_QUERY', 'true'))
SHOW_EXTRA_SETTINGS = parse... | |
# mako/util.py
# Copyright (C) 2006-2015 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
import re
import collections
import codecs
import os
from mako import compat
import operator
def upd... | |
"""Test zha lock."""
from unittest.mock import patch
import pytest
import zigpy.profiles.zha
import zigpy.zcl.clusters.closures as closures
import zigpy.zcl.clusters.general as general
import zigpy.zcl.foundation as zcl_f
from homeassistant.components.lock import DOMAIN
from homeassistant.const import STATE_LOCKED, S... | |
from __future__ import print_function
import json
import urlparse
from utils import ProgressBar, Color, Symbol
from pprint import pprint
from settings import Settings
from influxdbclient import InfluxdbClient
import requests
class Query:
DEFAULT_FUNC = "mean"
def __init__(self, measurement, field):
... | |
"""Testing utilities."""
import os
import re
import threading
import functools
from tempfile import NamedTemporaryFile
from numpy import testing
import numpy as np
from ._warnings import expected_warnings
import warnings
from .. import data, io, img_as_uint, img_as_float, img_as_int, img_as_ubyte
SKIP_RE = re.com... | |
#!/usr/bin/env python
# Jay Smith
# jay.smith@fireeye.com
#
########################################################################
# Copyright 2012 Mandiant
# Copyright 2014 FireEye
#
# Mandiant licenses this file to you under the Apache License, Version
# 2.0 (the "License"); you may not use this file except in com... | |
"""Subset the genome into standard sets of regions surrounding transcripts.
Provides a central place to bin the genome into smaller transcript-based regions
for structural variant calling and prioritization.
"""
import collections
import itertools
import math
import operator
import os
import numpy as np
import pybedt... | |
# Copyright 2013-2015 DataStax, 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 writi... | |
# Copyright 2021 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | |
from __future__ import absolute_import
import datetime
import unittest
from django.test import TransactionTestCase
from django.db import connection, DatabaseError, IntegrityError
from django.db.models.fields import IntegerField, TextField, CharField, SlugField
from django.db.models.fields.related import ManyToManyFiel... | |
"""
Generate allele sequences for pan-class I models.
Additional dependency: biopython
"""
from __future__ import print_function
import sys
import argparse
import numpy
import pandas
import Bio.SeqIO # pylint: disable=import-error
from mhcflurry.common import normalize_allele_name
parser = argparse.ArgumentParse... | |
import six
import theano
import theano.tensor as T
from .graph import TreeanoGraph
from .update_deltas import UpdateDeltas
from .variable import VariableWrapper
from .. import utils
class MissingHyperparameter(Exception):
pass
class Network(object):
"""
contains the state of multiple nodes
"""
... | |
from __future__ import unicode_literals
from datetime import datetime
from dateutil.tz import tzutc
import boto3
from freezegun import freeze_time
import httpretty
import requests
import sure # noqa
from moto import mock_apigateway
@freeze_time("2015-01-01")
@mock_apigateway
def test_create_and_get_rest_api():
... | |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-10-08 15:04:08
import os, requests, json
from six.moves.urllib.parse import urlparse, parse_qs
def connect_database(url):
"""
create databas... | |
import pyspheregl.sphere.touch_sphere as touch_lib
import time
import pyspheregl.sphere.sphere as sphere
import numpy as np
import calibration
calib_mode = 'cubic'
class SmoothedTracker(object):
"""
Class for managing a smoothed value
"""
def __init__(self, alpha=0.1, max_jump=1e6):
self.ddelta... | |
# Jordi Torrents
# Test for k-cutsets
from operator import itemgetter
from nose.tools import assert_equal, assert_false, assert_true, assert_raises
import networkx as nx
from networkx.algorithms import flow
from networkx.algorithms.connectivity.kcutsets import _is_separating_set
flow_funcs = [
flow.boykov_kolmog... | |
"""The airvisual component."""
from __future__ import annotations
from collections.abc import Mapping
from datetime import timedelta
from math import ceil
from typing import Any
from pyairvisual import CloudAPI, NodeSamba
from pyairvisual.errors import (
AirVisualError,
InvalidKeyError,
KeyExpiredError,
... | |
"""
Support for local control of entities by emulating the Phillips Hue bridge.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/emulated_hue/
"""
import asyncio
import json
import logging
import voluptuous as vol
from homeassistant import util
from hom... | |
import types
from django.db import models
from django.db.models.fields import Field
from django.db.models import Q
from django.db.models.expressions import F, ExpressionNode
from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet
from django.utils.encoding import smart_str, force_unicode
clas... | |
# Copyright 2011 OpenStack Foundation
# Copyright 2011 - 2012, 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-... | |
md_icons = {
'md-3d-rotation':
u"\uf000",
'md-accessibility':
u"\uf001",
'md-account-balance':
u"\uf002",
'md-account-balance-wallet':
u"\uf003",
'md-account-box':
u"\uf004",
'md-account-child':
u"\uf005",
'md-account-circle':
u"\uf006",
'md-add-shopping-cart':
u"\uf007",
'md-alarm':
... | |
# -*- coding: utf-8 -*-
"""The old AMQP result backend, deprecated and replaced by the RPC backend."""
from __future__ import absolute_import, unicode_literals
import socket
from collections import deque
from operator import itemgetter
from kombu import Consumer, Exchange, Producer, Queue
from celery import states
f... | |
# coding=utf-8
from bisect import bisect_left, bisect_right
from collections import namedtuple, defaultdict
from datetime import datetime, timezone
from functools import total_ordering
from itertools import groupby, tee
from operator import itemgetter
import random
from intervaltree import IntervalTree, Interval
#
#... | |
#!/usr/bin/env python3
# Copyright (c) Klaudisz Staniek.
# See LICENSE for details.
"""
This is an example application demonstrating the event driven driver capabilities and API usage
"""
from has.manager.manager import Manager
from has.utils.notification import Notification
from threading import Lock, RLock, Condi... | |
"""Renewable certificates storage."""
import datetime
import glob
import logging
import re
import shutil
import stat
from typing import Optional
import configobj
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
from cryptography.hazmat.pri... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2016 Ericsson 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 applic... | |
#!/usr/bin/python
import urwid
import mainview
"""
NOTES
-----
This module builds the widget to allow the user to enter in their own SQL query
This module will also run the sql query and show a success message if it works
"""
class Qinfo:
def __init__(self):
self.query_text = None
self.query_status = Non... | |
# Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | |
# coding: utf-8
"""
Wavefront REST API Documentation
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
from datetime import datetime
import numpy as np
import pytest
from pandas.compat import lrange
import pandas as pd
from pandas import DataFrame, Index, Series, Timestamp, date_range
from pandas.tests.frame.common import TestData
import pandas.util.test... | |
'''
Documentation Builder Environments
'''
import os
import re
import sys
import logging
import subprocess
import traceback
import socket
from datetime import datetime
from django.utils.text import slugify
from django.utils.translation import ugettext_lazy as _
from docker import Client
from docker.utils import creat... | |
# -*- coding: utf-8 -*-
# Copyright 2012 splinter 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 __future__ import with_statement
from splinter.driver import ElementAPI
from splinter.element_list import ElementList
class Find... | |
from SBaaS_base.postgresql_orm_base import *
class data_stage01_quantification_MQResultsTable(Base):
#__table__ = make_table('data_stage01_quantification_mqresultstable')
__tablename__ = 'data_stage01_quantification_mqresultstable'
id = Column(Integer, Sequence('data_stage01_quantification_mqresultstable_i... | |
# ----------------------------------------------------------------------------
# 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 unittest
from mock import MagicMock
from steinlib.exceptions import SteinlibParsingException, \
UnrecognizedSectionException
from steinlib.instance import SteinlibInstance
from steinlib.parser import RootSectionParser
from steinlib.section import CommentSectionParser
from steinl... | |
#!/usr/bin/python
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import pyauto_functional # Must be imported before pyauto
import pyauto
import test_utils
class PasswordTest(pyauto.PyUIT... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010-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 obtain
# a copy of the License at
#
# http://www.apache... | |
# coding: utf-8
import hashlib, datetime, sys
import tornado.httpclient
from tornado.web import HTTPError
from tornado.options import options
from apps import BaseRequestHandler
from apps.models import User, Loud
from utils.decorator import authenticated, admin, owner
from utils.mkthings import QDict
class LoudHan... | |
'''Wrapper for SDL_mixer.h
Generated with:
/usr/bin/ctypesgen -lSDL_mixer /usr/include/SDL/SDL_mixer.h -o sdlmixer.py
Do not modify this file.
'''
__docformat__ = 'restructuredtext'
# Begin preamble
import ctypes, os, sys
from ctypes import *
_int_types = (c_int16, c_int32)
if hasattr(ctypes, 'c_int64'):
# S... | |
from django.core.exceptions import ObjectDoesNotExist
from django.test import TestCase
from django.urls import reverse
from core.models import ValidationScenario
from tests.utils import TestConfiguration
class ValidationScenarioTestCase(TestCase):
python_validation_payload = """def test_record_has_words(record, ... | |
# -*- coding: utf-8 -*-
"""This file contains MRUListEx Windows Registry plugins."""
import abc
import logging
import construct
from plaso.events import windows_events
from plaso.lib import binary
from plaso.parsers import winreg
from plaso.parsers.shared import shell_items
from plaso.parsers.winreg_plugins import i... | |
# 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... | |
from direct.directnotify import DirectNotifyGlobal
from otp.avatar import DistributedAvatarAI
from toontown.battle import BattleExperienceAI
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import ToontownBattleGlobals
from toontown.toon import InventoryBase
from toontown.battle import DistributedBa... | |
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: traceback
import linecache
import sys
import types
__all__ = ['extract_stack',
'extract_tb',
'format_exception',
'format_exception_only',
'format_list',
'format_stack',
'format_tb',
'print_exc',
'format_exc',
'print_exception',
'print_last',
'print_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.