gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
"""
This module implements classes and utility functions to manage STC application.
:author: yoram@ignissoft.com
"""
from os import path
import time
from enum import Enum
from trafficgenerator.tgn_utils import ApiType, TgnError
from trafficgenerator.tgn_app import TgnApp
from testcenter.api.stc_tcl import StcTclWra... | |
import ConfigParser
import importlib
import inspect
import logging
_log = logging.getLogger(__name__)
# A copy of this is made for each instance of Controller when it is initialized
DEFAULT_SUBSTITUTIONS = {}
class Module(object):
"""A single module that can be loaded into a Controller."""
def __init__(se... | |
import time
import signal
import sys
import tensorflow as tf
import numpy as np
import dataset
np.set_printoptions(threshold=np.nan)
f1 = open('log_ds_%d' % (time.time()), 'w+')
def log(str):
f1.write(str)
f1.flush()
print(str)
def weight_variable(shape):
initial = tf.truncated_normal(shape, mean=0.0... | |
# 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/python
#
# Interactive shell for testing SMDS
#
# $Id:
#
import os
import pydoc
import xmlrpclib
import sys
sys.path.append("/usr/share/SMDS")
from SMDS.mdapi import MDAPI
from SMDS.parameter import Mixed
from SMDS.auth import Auth
from SMDS.config import Config
from SMDS.method import Method
from SMDS.AP... | |
from itertools import product
import cvxpy as cvx
import numpy as np
from sklearn.metrics import r2_score
from sklearn.utils import check_X_y
from fri.model.base_lupi import (
LUPI_Relevance_CVXProblem,
split_dataset,
is_lupi_feature,
)
from fri.model.regression import Regression_Relevance_Bound
from .bas... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 4 14:47:47 2017
@author: slerp4
Compared with _debug version, this version excludes RMSprop optimizer
"""
#import tensorflow as tf
from keras import backend as K
from keras.applications.mobilenet import MobileNet
from keras.preprocessing.image im... | |
print "importing stuff..."
import numpy as np
import pdb
# import matplotlib
# matplotlib.use('Agg')
import matplotlib.pylab as plt
from scipy import special
from .context import aep
from .datautils import step, spiral
from .context import config
def run_regression_1D():
np.random.seed(42)
print "create dat... | |
#!/usr/bin/env python
"""Tests for `rechunker` package."""
import hypothesis.strategies as st
import pytest
from hypothesis import assume, given
from rechunker.algorithm import consolidate_chunks, rechunking_plan
from rechunker.compat import prod
@pytest.mark.parametrize("shape, chunks", [((8, 8), (1, 2))])
@pytest... | |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | |
import base64
import logging
import time
from collections import OrderedDict
from ledger.compact_merkle_tree import CompactMerkleTree
from ledger.stores.chunked_file_store import ChunkedFileStore
from ledger.tree_hasher import TreeHasher
from ledger.merkle_tree import MerkleTree
from ledger.serializers.mapping_seriali... | |
from numpy.testing import assert_equal, assert_almost_equal
from falass import readwrite, dataformat
import os
import unittest
import sys
if sys.version_info >= (3, 0):
from io import StringIO
else:
from StringIO import StringIO
class TestFiles(unittest.TestCase):
def test_files_standard(self):
pd... | |
# 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... | |
"""
Work with Nix packages
======================
.. versionadded:: 2017.7.0
Does not require the machine to be Nixos, just have Nix installed and available
to use for the user running this command. Their profile must be located in
their home, under ``$HOME/.nix-profile/``, and the nix store, unless specially
set up,... | |
# -*- coding: utf-8 -*-
""" QuerySet for PolymorphicModel
Please see README.rst or DOCS.rst or http://chrisglass.github.com/django_polymorphic/
"""
from __future__ import absolute_import
import copy
from collections import defaultdict
import django
from django.db.models.query import QuerySet, Q
from django.contri... | |
"""
Profile Views
TODO: GET api/profile?role=ORG_STEWARD for view (shown on create/edit listing page)
TODO: POST api/profile/self/library - add listing to library (bookmark)
params: listing id
TODO: DELETE api/profile/self/library/<id> - unbookmark a listing
"""
import logging
from rest_framework import filters
... | |
#################################################################################
#
# Low-level API for IKOS
#
# Author: Maxime Arthaud (maxime@arthaud.me)
#
# Copyright (c) 2014 Carnegie Mellon University
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated... | |
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 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/... | |
"""
Copyright (c) 2015 Michael Bright and Bamboo HR 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... | |
import json
import logging
from unittest import TestCase
from parameterized import parameterized, param
from hvac import exceptions
from tests import utils
from tests.utils.hvac_integration_test_case import HvacIntegrationTestCase
class TestGcp(HvacIntegrationTestCase, TestCase):
TEST_MOUNT_POINT = "gcp-test"
... | |
import subprocess
import time
from threading import Thread, Lock
import serial
from PyQt5.QtCore import pyqtSignal, Qt
from PyQt5.QtWidgets import QDialog, QScrollBar, QMessageBox, QFileDialog
from gui.flash_dialog import Ui_FlashDialog
from src.connection.connection_scanner import ConnectionScanner
from src.utility.... | |
# coding: utf-8
"""
Copyright 2015 SmartBear Software
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... | |
MerlianParts = ['/\\\n/--\\\n|__|', '|::|', '\'\+/', '\+/\'', './:|', '|:\\.', '/|=', '=|\\', ' ** ', ' || ', '||', '/\'\'\\' ]
ParasolParts = ['/', '\\']
# Takes a ship object and returns a rendered ship string
def drawShip(ship):
shipString = ''
shipSize = ship.blocks
shipBlocks = [ship.weapons, ship.armor... | |
"""ADMM CORE ALGORITHM
Copyright (c) 2017 The ADMML 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 require... | |
#!/usr/bin/env python
#
# tournament.py -- implementation of a Swiss-system tournament
#
# Allows recording of tied matches.
# Matches opponents of relative standings.
# Pairs players in unique matches.
#
# TODO: implement match byes
# TODO: implement pairing for odd number of players
# TODO: implement Opponent match w... | |
from unittest import mock
from unittest.mock import patch
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core import mail
from rest_framework.reverse import reverse
from test_project import settings
from test_project.test_app.models import Post, Art... | |
#
# datatypes.py
# CloudKitPy
#
# Created by James Barrow on 27/04/2016.
# Copyright (c) 2016 James Barrow - Pig on a Hill Productions.
#
# !/usr/bin/env python
# References for Types and Dictionaries can be found at:
# https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/CloutKitWebService... | |
# -*- coding: utf-8 -*-
'''
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
'''
from __future__ import unicode_literals
from .item_request import I... | |
import inspect
import logging
import pickle
from typing import Dict, Optional, Type, Union, List, Sequence
from ray.tune.result import DEFAULT_METRIC
from ray.tune.sample import Categorical, Domain, Float, Integer, LogUniform, Quantized
from ray.tune.suggest.suggestion import (
UNRESOLVED_SEARCH_SPACE,
UNDEFIN... | |
# Copyright 2017-2021 TensorHub, 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... | |
import logging
from flask import flash, redirect, request, url_for
from flask_login import current_user
from scout.constants import CASE_SEARCH_TERMS
from scout.server.extensions import store
from scout.server.utils import user_institutes
from .forms import DashboardFilterForm
LOG = logging.getLogger(__name__)
de... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | |
class DESCRIPTOR_TYPE:
# source: http://www.usb.org/developers/docs/usb_31_120516.zip, 2017-01-07
# and: http://www.usb.org/developers/docs/usb20_docs/usb_20_120516.zip, 2017-01-07
DEVICE = 1
CONFIGURATION = 2
STRING = 3
INTERFACE = 4
ENDPOINT = 5
DEVICE_QUALIFIER = 6
OTHER_SPEED_CO... | |
#import bson
import pymongo
import json
from bson import ObjectId
from pymongo import MongoClient
import string
import tangelo
import sys
# is a value a number or a string?
# from http://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-is-a-number-float-in-python
def is_integer(s):
try:
int(... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the resolution of forks via avalanche."""
import random
from test_framework.mininode import P2PInterface, m... | |
import os
import time
import numpy as np
import OpenGL.GL as gl
import OpenGL.GLU as glu
import OpenGL.GLUT as glut
import Image
import PIL.ImageOps as iops
from fos.core.utils import list_indices as lind
from os.path import join as pjoin
from dipy.core import track_metrics as tm
import fos.core.collision as cll
dat... | |
# Copyright (c) 2017, Matt Layman
import os
import tempfile
import mock
from handroll.configuration import Configuration
from handroll.director import Director
from handroll.resolver import FileResolver
from handroll.site import Site
from handroll.tests import TestCase
class TestDirector(TestCase):
def test_g... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 The SymbiFlow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
class AssertStateVariable():
""" Abstract asserted state variab... | |
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | |
# -*- coding: utf-8 -*-
import pickle
import sqlite3
import threading
from abc import ABCMeta, abstractmethod
from collections import namedtuple
InternalEvent = namedtuple(
'InternalEvent',
('identifier', 'state_change_id', 'block_number', 'event_object'),
)
# TODO:
# - snapshots should be used to reduce the... | |
""" Classes and functions for fitting ivim model """
import numpy as np
from scipy.optimize import least_squares, differential_evolution
import warnings
from dipy.reconst.base import ReconstModel
from dipy.reconst.multi_voxel import multi_voxel_fit
from dipy.utils.optpkg import optional_package
cvxpy, have_cvxpy, _ = ... | |
import mido
import numpy as np
from . import GridController, lights, buttons
class Push(GridController):
pad_offset = 36
color_table = np.array([
(0, 0, 0),
(30, 30, 30),
(127, 127, 127),
(255, 255, 255),
(255, 76, 76),
(255, 0, 0),
(89, 0, 0),
... | |
import logging
import cv2
import PIL
from PIL import Image
import scipy
import scipy.ndimage
import numpy as np
from face_utils.Face import Face
from skimage.transform._geometric import _umeyama
def get_face_mask(face: Face, mask_type,
erosion_size=None,
dilation_kernel=None,
... | |
import itertools
import math
from copy import copy
from django.core.exceptions import EmptyResultSet
from django.db.models.expressions import Func, Value
from django.db.models.fields import DateTimeField, Field, IntegerField
from django.db.models.query_utils import RegisterLookupMixin
from django.utils.functional impo... | |
# 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 ... | |
#
# 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 us... | |
from write import write, writebr
import sys
IN_BROWSER = sys.platform in ['mozilla', 'ie6', 'opera', 'oldmoz', 'safari']
IN_JS = sys.platform in ['mozilla', 'ie6', 'opera', 'oldmoz',
'safari', 'spidermonkey', 'pyv8']
if IN_BROWSER:
from pyjamas.Timer import Timer
class UnitTest:
def... | |
#!/usr/bin/env python3
#
# This file is part of the MicroPython project, http://micropython.org/
#
# The MIT License (MIT)
#
# Copyright (c) 2016 Damien P. George
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | |
from fractions import Fraction
from unittest import TestCase
from unittest.mock import Mock, patch, PropertyMock
from inferi.probability import Event, SimpleEvent, EventSpace
class EventTest(TestCase):
def setUp(self):
self.simple_events = [Mock(SimpleEvent) for _ in range(10)]
self.events = [Mock... | |
from django.conf import settings
from residue.models import Residue
from protein.models import Protein, ProteinSegment
from structure.models import Structure
from structure.functions import BlastSearch, BlastSearchOnline
from Bio import SeqIO, pairwise2
from Bio.PDB import PDBParser, PPBuilder
import Bio.PDB.Polypept... | |
"""distutils.unixccompiler
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
* macros defined with -Dname[=value]
* macros undefined with -Uname
* include search directories specified with -Idir
* libraries specified with -lllib
* library... | |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | |
from __future__ import unicode_literals
import codecs
import logging
import sys
from io import BytesIO
from threading import Lock
from django import http
from django.core import signals
from django.core.handlers import base
from django.core.urlresolvers import set_script_prefix
from django.utils import datastructures... | |
import webapp2
import os
import jinja2
import time
import webapp2_extras.appengine.auth.models
import logging
from webapp2_extras import auth
from webapp2_extras import sessions
from webapp2_extras.auth import InvalidAuthIdError
from webapp2_extras.auth import InvalidPasswordError
from webapp2_extras import security
f... | |
from inspect import isclass
from django.conf import settings
from django.core.files.storage import get_storage_class
from celery.datastructures import AttributeDict
from tower import ugettext_lazy as _
__all__ = ('LOG', 'LOG_BY_ID', 'LOG_KEEP',)
class _LOG(object):
action_class = None
class CREATE_ADDON(_LOG... | |
#!/usr/bin/env python
# coding: utf-8
from libtasks import xisbn as isbn
import base64
import bz2
import os
import unittest
# http://www.amazon.de/Algorithmen-Eine-Einf%C3%BChrung-Thomas-Cormen/dp/3486590022
ISBNS_LIKE_3486590022 = (
'0138134596',
'3486590022',
'3897217201',
'0273751506',
'3827329... | |
#!/usr/bin/env python
# Copyright 2020 The Crashpad 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
#
# Unles... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
import time
import atexit
import heapq
from subprocess import Popen
from threading import Thread
from plumbum.lib import IS_WIN32, six
try:
from queue import Queue, Empty as QueueEmpty
except ImportError:
from Queue import Queue, Empty as QueueEmpty
try:
from io import StringIO
except ImportError:
fro... | |
# -*- coding: utf-8 -*-
########################################################################
#
# License: BSD
# Created: December 17, 2004
# Author: Francesc Alted - faltet@pytables.com
#
# $Id$
#
########################################################################
"""Declare exceptions and warnings that are... | |
from django.db.models import Q, Count, FieldDoesNotExist
from django.http import HttpResponseBadRequest
from rest_framework import permissions, mixins, status
from rest_framework import schemas, viewsets
from rest_framework import views
from rest_framework.decorators import api_view, renderer_classes
from rest_framewor... | |
# yucca -- dialect-agnostic static analyzer for 8-bit BASIC programs
# Version 1.2
# Copyright (c)2012-2021 Chris Pressey, Cat's Eye Technologies
#
# 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 Sof... | |
from __future__ import print_function
from __future__ import absolute_import
import sys
import json
import logging
import logging.handlers
import os
import time
import six
from .utilities import (generate_machine_id,
write_to_disk,
write_registered_file,
... | |
# This code is licensed under the MIT License (see LICENSE file for details)
from PyQt5 import Qt
class PropertyTableModel(Qt.QAbstractTableModel):
"""PropertyTableModel: Glue for making a Qt.TableView (or similar) in which the elements of a
SignalingList are rows whose columns contain the values of the eleme... | |
#!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2010. All Rights Reserved.
#
#
# THIS IMPORT MUST COME FIRST
# import mainUtils FIRST to get python version check
#
from gppylib.mainUtils import *
import os, sys
import pickle, base64
from optparse import Option, OptionGroup, OptionParser, OptionValueError
from... | |
from typing import Callable, List, Union
import Gnuplot
from spectrum import Iterable, Spectrum
def __fix_outpath( path: str, filename: str = None ) -> str:
"""
Simple wrapper to ensure that the output path sent to Gnuplot is properly formatted.
The path returned works in both Linux and Windows systems.... | |
import asyncio
import collections
import socket
import traceback
from . import helpers
from .log import internal_logger
__all__ = (
'EMPTY_PAYLOAD', 'EofStream', 'StreamReader', 'StreamWriter', 'DataQueue',
'ChunksQueue', 'FlowControlStreamReader',
'FlowControlDataQueue', 'FlowControlChunksQueue')
DEFAUL... | |
import os
import numpy as np
from vsm.structarr import arr_add_field
from vsm.split import split_corpus
__all__ = [ 'BaseCorpus', 'Corpus', 'add_metadata', 'align_corpora' ]
class BaseCorpus(object):
"""
A BaseCorpus object stores a corpus along with its tokenizations
(e.g., as sentences, paragraphs ... | |
from ethereum import utils
from ethereum.state import State
from ethereum import vm
from ethereum.state_transition import apply_transaction, apply_const_message, validate_block_header, initialize
from ethereum.transactions import Transaction
from ethereum.chain import Chain
from ethereum.parse_genesis_declaration impor... | |
"""
Support for Todoist task management (https://todoist.com).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/calendar.todoist/
"""
from datetime import datetime, timedelta
import logging
import voluptuous as vol
from homeassistant.components.calendar ... | |
import os
import sys
import signal
import pexpect
import threading
import time
from apscheduler.schedulers.background import BackgroundScheduler
from shutil import copyfile
class ProcessRenewer(object):
path_process = None
path_renew = None
safe_stop = None
run_args = None
subprocess_thread = None... | |
# Copyright 2013 Getlogic BV, Sardar Yumatov
#
# 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... | |
from test.support import verbose, TESTFN, check_impl_detail
import random
import os
# From SF bug #422121: Insecurities in dict comparison.
# Safety of code doing comparisons has been an historical Python weak spot.
# The problem is that comparison of structures written in C *naturally*
# wants to hold on to things ... | |
# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>
# Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com>
# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.
# Copyright (c) 2016, Rackspace Australia
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING... | |
# -*- coding: utf-8 -*-
# The MIT License (MIT) - Copyright (c) 2016-2021 Dave Vandenbout.
"""
Handles part pins.
"""
from __future__ import ( # isort:skip
absolute_import,
division,
print_function,
unicode_literals,
)
import re
from builtins import range, super
from collections import defaultdict
... | |
from __future__ import print_function
import sys
from threading import Lock
from py4j.java_gateway import java_import
import constants
import java_gateway
import mapopgenerator
from rastermapop import RasterMapOp
from vectormapop import VectorMapOp
# python3 doesn't have a long type, this masks long to int
if sys.v... | |
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
DON'T USE THIS MODULE DIRECTLY! The classes here should be imported
via collections; they are defined here only to alleviate certain
bootstrappin... | |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
# -*- coding: utf-8 -*-
import mock
from django.contrib import messages
from django.core import mail
from django.http import Http404
from django.utils import timezone
from model_bakery import baker
from django.test import TestCase, override_settings
from django.conf import settings
from django.core.files.uploadedfil... | |
# -*- coding: utf-8 -*-
"""The Apple System Log Parser."""
import construct
import logging
import os
from plaso.lib import errors
from plaso.lib import event
from plaso.lib import eventdata
from plaso.lib import timelib
from plaso.parsers import interface
from plaso.parsers import manager
__author__ = 'Joaquin More... | |
##########################################################################
#
# Copyright (c) 2011-2013, John Haddon. All rights reserved.
# Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | |
# Copyright 2014 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | |
"""
Augeas implementation of the ParserNode interfaces.
Augeas works internally by using XPATH notation. The following is a short example
of how this all works internally, to better understand what's going on under the
hood.
A configuration file /etc/apache2/apache2.conf with the following content:
# First comme... | |
# Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: imputil.py
"""
Import utilities
Exported classes:
ImportManager Manage the import process
Importer Base class for replacing standa... | |
from numpy.testing import assert_equal, assert_array_equal
from nose.tools import assert_true, assert_raises, assert_not_equal
from copy import deepcopy
import os.path as op
import numpy as np
from scipy import sparse
import os
import warnings
from mne.utils import (set_log_level, set_log_file, _TempDir,
... | |
"""This plugin provides test results in the standard XUnit XML format.
It's designed for the `Jenkins`_ (previously Hudson) continuous build
system, but will probably work for anything else that understands an
XUnit-formatted XML representation of test results.
Add this shell command to your builder ::
nosetests... | |
"""Incremental Principal Components Analysis."""
# Author: Kyle Kastner <kastnerkyle@gmail.com>
# Giorgio Patrini
# License: BSD 3 clause
import numpy as np
from scipy import linalg
from .base import _BasePCA
from ..utils import check_array, gen_batches
from ..utils.extmath import svd_flip, _incremental_mean... | |
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from toontown.toonbase import ToontownGlobals
import HouseGlobals
import time
from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI
from toontown.fishing.DistributedFishing... | |
import functools
import inspect
import types
import sys
from unittest import defaultTestLoader, TestResult
import unittest.mock
from test_helper import failed, passed
def abort_tests(message="Critical failure; aborting tests."):
print(message)
sys.exit(0)
def reload_module(module):
if sys.version_info ... | |
import datetime
from django.core.exceptions import ObjectDoesNotExist
from django.core.validators import MinValueValidator, MaxValueValidator
from django.db import models
from django.utils.datastructures import SortedDict
from model_utils.managers import InheritanceManager
from rapidsms.contrib.locations.models import... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from GestureAgents.Events import Event, EventClient
import GestureAgents.Reactor as Reactor
try:
from classlogger import ClassLogged
except ImportError:
ClassLogged = type
class RecognizerFailedException(Exception):
pass
class Autonamed(object):
__numc... | |
'''extra statistical function and helper functions
contains:
* goodness-of-fit tests
- powerdiscrepancy
- gof_chisquare_discrete
- gof_binning_discrete
Author: Josef Perktold (josef-pktd)
'''
import numpy as np
#fix these imports
import scipy
from scipy import stats
# copied from regression/stats.utils
de... | |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
from __future__ import absolute_import, unicode_literals
from .core import *
from ctypes import c_int32, c_uint32, c_uint64, c_float, byref, pointer
__all__ = [
'Mode', 'Format7', 'mode_map'
]
class Mode(object):
"""
Video mode fo... | |
#!/usr/bin/env python
import rospy
import yaml
import numpy as np
import rospkg
from teresa_driver.srv import Teresa_leds
from hri_common import SpencerLocalizationInterface
from upo_decision_making.msg import IDArray, HRIControlMode, HRIFeedbackStateInfo
#from hri_feedback_msgs.msg import HRIControlMode, HRIFeedbackSt... | |
# Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2004, 2006 Sean C. Gillies
# Copyright (c) 2005 Nuxeo SARL <http://nuxeo.com>
#
# Authors : Sean Gillies <sgillies@frii.com>
# Julien Anguenot <ja@nuxeo.com>
#
# Contact email: sgillie... | |
# -*- coding: utf-8 -*-
"""
continuity.tests
~~~~~~~~~~~~~~~~
Continuity test suite.
:copyright: 2015 by Jonathan Zempel.
:license: BSD, see LICENSE for more details.
"""
from ConfigParser import SafeConfigParser, NoSectionError
from continuity.cli import main
from continuity.cli.commons import M... | |
from __future__ import absolute_import
import logging
from collections import defaultdict
from django.db import transaction
from sentry import tagstore
from sentry.app import tsdb
from sentry.constants import DEFAULT_LOGGER_NAME, LOG_LEVELS_MAP
from sentry.event_manager import (
ScoreClause, generate_culprit, ge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.