gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import unittest #from pyramid import testing class UtilTests(unittest.TestCase): def setUp(self): pass # #request = testing.DummyRequest() # self.config = testing.setUp() # def tearDown(self): # testing.tearDown() def test_Base62(self): from m4ed.util.base62 impo...
"""CatBoost coding""" import numpy as np import pandas as pd from sklearn.base import BaseEstimator import category_encoders.utils as util from sklearn.utils.random import check_random_state __author__ = 'Jan Motl' class CatBoostEncoder(BaseEstimator, util.TransformerWithTargetMixin): """CatBoost coding for cat...
# 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, sof...
# 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...
# Copyright 2015 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 a...
import re import numpy as np def parse_file(self): if self.prog == "GAUSSIAN": parse_file_gaussian(self) elif self.prog == "CQ": parse_file_cq(self) def parse_file_cq(self): # All CQ quantities are in AU # Parse AppliedField FieldData = np.genfromtxt(self.fieldFile,delimiter = ',') FieldData = n...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # name: file.py # author: Harold Bradley III # email: harold@bradleystudio.net # created on: 11/04/2015 # # pylint: disable=no-member,line-too-long """ ext_pylib.files.file ~~~~~~~~~~~~~~~~~~~~ A class to manage and creat...
# 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 required by applicable law or agre...
# -*- coding: utf-8 -*- """ General approach to calucations """ import math from dynamic_dynamodb.log_handler import LOGGER as logger def decrease_reads_in_percent( current_provisioning, percent, min_provisioned_reads, log_tag): """ Decrease the current_provisioning with percent % :type current_prov...
#------------------------------------------------------------------------------ # Copyright (c) 2009 Richard W. Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restricti...
import os import re import json import time import logging import pytest try: from unittest.mock import patch, call, MagicMock # Python 3 except ImportError: from mock import patch, call, MagicMock # Python 2 from requests_oauthlib import OAuth1Session import requests import twarc """ You will need to hav...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): depends_on = ( ('catalogue', '0001_initial'), ) def forwards(self, orm...
# pyOCD debugger # Copyright (c) 2015-2020 Arm Limited # Copyright (c) 2021 Chris Reed # SPDX-License-Identifier: Apache-2.0 # # 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...
# -*- coding: utf-8 -*- # Copyright 2015 Metaswitch 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 applicab...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function from six import iteritems, text_type, string_types, PY2 """ frappe.translate ~~~~~~~~~~~~~~~~ Translation tools for frappe """ import frappe, os, re, io, co...
import unittest from unittest import mock import lib.bitcoin as bitcoin import lib.keystore as keystore import lib.storage as storage import lib.wallet as wallet from plugins.trustedcoin import trustedcoin # TODO passphrase/seed_extension class TestWalletKeystoreAddressIntegrity(unittest.TestCase): gap_limit =...
""" :codeauthor: Rahul Handay <rahulha@saltstack.com> """ import salt.states.iptables as iptables from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase class IptablesTestCase(TestCase, LoaderModuleMockMixin): """ Va...
""" Create an author. This is the information we have 0 Blank - this is just the id 1 ORCID 2 acronym 3 Last Name 4 First Name 5 Middle Initial 6 Email Address 7 Department 8 Institution 9 Street Address 10 City 11 State / Region 12 ZIP / Postcode 13 Country 14 Order in the list 15 Contribution 16 17 Department 18 In...
from pyowm.webapi25.location import Location from pyowm.abstractions.decorators import deprecated from pkg_resources import resource_stream """ Module containing a registry with lookup methods for OWM-provided city IDs """ class CityIDRegistry: MATCHINGS = { 'exact': lambda city_name, toponym: city_name...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
# 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 ...
"""Generic lvsm CommandPrompt""" import cmd import logging import shutil import socket import subprocess import sys import tempfile import utils import termcolor import firewall import lvs logger = logging.getLogger('lvsm') class CommandPrompt(cmd.Cmd): """ Generic Class for all command prompts used in lvs...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
"""Test different accessory types: Sensors.""" from homeassistant.components.homekit import get_accessory from homeassistant.components.homekit.const import ( DEVICE_CLASS_MOTION, PROP_CELSIUS, THRESHOLD_CO, THRESHOLD_CO2, ) from homeassistant.components.homekit.type_sensors import ( BINARY_SENSOR_S...
# Copyright 2014 NeuroData (http://neurodata.io) # # 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...
# K-means clustering in 2d # Code is from chapter 9 of # https://github.com/ageron/handson-ml2 import superimport import numpy as np import matplotlib.pyplot as plt from matplotlib import cm # To plot pretty figures #%matplotlib inline import matplotlib as mpl import matplotlib.pyplot as plt mpl.rc('axes', labelsi...
import base64 import os import sys import time from optparse import OptionParser import internal from internal.connect import Connection from internal.listener import ConnectionListener, StatsListener from internal.exception import NotConnectedException def get_commands(): """ Return a list of commands avai...
from __future__ import with_statement from datetime import datetime, tzinfo try: import pytz except ImportError: pytz = None from django.template import Node from django.template import TemplateSyntaxError, Library from note import timezone register = Library() # HACK: datetime is an old-style class, cre...
from pytest import fixture, raises from hoomd.conftest import pickling_check from hoomd.pytest.dummy import DummyOperation, DummySimulation from hoomd.operation import Operation from hoomd.data.syncedlist import SyncedList, _PartialIsInstance @fixture def op_list(): return [DummyOperation(), DummyOperation(), Dum...
# -*- encoding: utf-8 -*- from __future__ import print_function import os import signal import time from HPOlibConfigSpace import configuration_space from autosklearn.data.abstract_data_manager import AbstractDataManager from autosklearn.data.competition_data_manager import CompetitionDataManager from autosklearn.ev...
# Copyright 2012 Pedro Navarro Perez # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
#!/usr/bin/env python2.7 # Copyright 2015 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 requi...
import logging from PySide import QtGui, QtCore from PySide.QtGui import QMenu, QMenuBar, QToolBar, QAction from juma.core import signals, app from Menu import MenuManager from juma.qt.IconCache import getIcon class ToolBarItem(object): def __init__( self, name, **option ): option = option or {} self.name =...
# 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, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # from ceilometer project # https://github.com/openstack/ceilometer : ceilometer/openstack/common/setup.py # Copyright 2011 OpenStack Foundation. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License,...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Automated bot for testing recipes. """ from __future__ import absolute_import, print_function import argparse from argparse import RawDescriptionHelpFormatter as RawDescriptionHelp import glob import mmap import os import re import sys __version__ = '0.1.0' TEMPLATE = ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from babelfish import Language, language_converters import pytest from vcr import VCR from subliminal.exceptions import AuthenticationError, ConfigurationError from subliminal.providers.addic7ed import Addic7edProvider, Addic7edSubtitle vcr =...
#!/usr/bin/env python3 import gen_universe import json import logging import os import re from enum import Enum from http import HTTPStatus from http.server import HTTPServer, BaseHTTPRequestHandler from urllib.error import URLError, HTTPError from urllib.parse import parse_qsl, urlparse from urllib.request import Re...
import warnings import neuroml.arraymorph as am import neuroml import numpy as np import neuroml.writers as writers import neuroml.loaders as loaders try: import unittest2 as unittest except ImportError: import unittest class TestObjectBuiltMorphology(unittest.TestCase): def setUp(self): """ ...
# oracle/cx_oracle.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle+cx_oracle :name: cx-Oracle :dbapi: cx_oracle ...
from django.db import models from django.test import TestCase from django.utils import timezone from analytics.lib.counts import CountStat, COUNT_STATS, process_count_stat, \ zerver_count_user_by_realm, zerver_count_message_by_user, \ zerver_count_message_by_stream, zerver_count_stream_by_realm, \ do_fill_...
import numpy as np from numpy.testing import assert_array_equal from nose.tools import (assert_equal, assert_raises, raises, assert_true, assert_false) from nose.tools import with_setup try: from nose.tools import assert_is, assert_is_instance except ImportError: from landlab.testing.to...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Lic...
from __future__ import print_function, absolute_import import os import subprocess import sys import tempfile from .common import safe_mkdtemp, safe_rmtree from .interpreter import PythonInterpreter, PythonCapability from .tracer import TRACER from pkg_resources import Distribution, PathMetadata __all__ = ( 'Inst...
# Copyright 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # Copyright 2008 Michael Terry <mike@mterry.name> # Copyright 2011 Canonical Ltd # # This file is part of duplicity. # # Duplicity is free software; you can red...
"""The tests for the Input number component.""" # pylint: disable=protected-access import asyncio from homeassistant.core import CoreState, State, Context from homeassistant.components.input_number import ( ATTR_VALUE, DOMAIN, SERVICE_DECREMENT, SERVICE_INCREMENT, SERVICE_SET_VALUE, ) from homeassi...
from datetime import time from pytz import utc from behave import given, when, then, step from launchkey.entities.service import TimeFence, GeoFence from launchkey.entities.service.policy import FactorsPolicy # Retrieve Organization Service Policy from launchkey.entities.service.policy import ConditionalGeoFencePol...
#!/usr/bin/python # # Autofocosing routines. # # You will need: scipy matplotlib sextractor # This should work on Debian/ubuntu: # sudo apt-get install python-matplotlib python-scipy python-pyfits sextractor # # If you would like to see sextractor results, get DS9 and pyds9: # # http://hea-www.harvard.edu/saord/ds9/ # ...
# 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...
import os import tempfile from pathlib import Path from unittest import mock import numpy as np import pytest import yaml import bigbang from bigbang.ingress.listserv import ( ListservMessageParser, ListservMailList, ListservMailListDomain, ) from config.config import CONFIG dir_temp = tempfile.gettempdi...
from django.core.exceptions import NON_FIELD_ERRORS, FieldDoesNotExist, ValidationError __ALL__ = ( "_get_pk_val", "serializable_value", "full_clean", "_get_unique_checks", "_perform_unique_checks", "_perform_date_checks", "validate_unique", "clean", "clean_fields", ) def _get_pk_...
# # Test suite for the textwrap module. # # Original tests written by Greg Ward <gward@python.net>. # Converted to PyUnit by Peter Hansen <peter@engcorp.com>. # Currently maintained by Greg Ward. # # $Id$ # import unittest from textwrap import TextWrapper, wrap, fill, dedent, indent, shorten class BaseTestCase(unit...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
''' This file contains classes and functions that implement the PyPXE TFTP service ''' import socket import struct import os import select import time import logging import math class ParentSocket(socket.socket): '''Subclassed socket.socket to enable a link-back to the client object.''' parent = None clas...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright (C) 2013, 2014, 2017 by Kevin L. Mitchell <klmitch@mit.edu> # # 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 # # ...
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import decimal from os.path import expanduser from qrl import __version__ as version import os import yaml from math import ceil, log class UserConfig(object): ...
import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import pybullet as p import numpy as np import copy import math import pybullet_data class Kuka: def __init__(self, ur...
from astropy.io import fits from astropy.table import Table from astropy.time import Time import astropy.units as u import os import numpy as np from srttools.io import ( mkdir_p, locations, read_data_fitszilla, get_chan_columns, classify_chan_columns, ) from srttools.utils import scantype, force_mo...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sys...
import json from ichnaea.conftest import GB_LAT, GB_LON, GB_MCC from ichnaea.models import ( BlueObservation, BlueReport, CellObservation, CellReport, constants, Radio, Report, ReportSource, WifiObservation, WifiReport, ) from ichnaea.tests.factories import ( BlueObservation...
################################################################### # Semi-supervised EA-Regularized multilayer perceptron ensembles. # ################################################################### import numpy as np import numpy.random as npr import theano import theano.tensor as T import cPickle #from theano.t...
''' Author: Dr. Mohamed A. Bouhlel <mbouhlel@umich.edu> Dr. John T. Hwang <hwangjt@umich.edu> This package is distributed under New BSD license. ''' #TODO: Extend to multifidelity problems by adding training_points = {'approx': {}} #TODO: Complete the mixture of expert model: verify from if self.options['name'...
'''Server module. Handle and response challenge requests from the frontend server. ''' import sys import json import traceback from collections import deque from tornado import gen, concurrent from tornado.ioloop import IOLoop, PollIOLoop from tornado.web import Application, RequestHandler from tornado.websocket imp...
#!/usr/bin/env python3 # cardinal_pythonlib/openxml/find_recovered_openxml.py """ =============================================================================== Original code copyright (C) 2009-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of cardinal_pythonlib. Licensed under the Apache L...
# 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...
# Copyright 2012-2017 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import e...
# 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...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
import pyactiveresource.connection from pyactiveresource.activeresource import ActiveResource, ResourceMeta import pyactiveresource.util as util import shopify.yamlobjects import shopify.mixins as mixins import shopify import threading import urllib import urllib2 import urlparse import sys # Store the response from t...
from __future__ import absolute_import, division, unicode_literals from datetime import timedelta from operator import attrgetter import requests from basic_site.models import UniquelySlugable from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.core.validators import MaxValueValidator...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
""" GWR is tested against results from GWR4 """ import unittest import pickle as pk from crankshaft.regression.gwr.gwr import GWR, FBGWR from crankshaft.regression.gwr.sel_bw import Sel_BW from crankshaft.regression.gwr.diagnostics import get_AICc, get_AIC, get_BIC, get_CV from crankshaft.regression.glm.family import ...
#!/usr/bin/env python """ runtests.py [OPTIONS] [-- ARGS] Run tests, building the project first. Examples:: $ python runtests.py $ python runtests.py -t {SAMPLE_TEST} $ python runtests.py --ipython $ python runtests.py --python somescript.py Run a debugger: $ gdb --args python runtests.py [...o...
import os import math from PySide6 import QtGui, QtCore, QtWidgets from Settings import ZOOMANCHOR, SCALEINC, MINZOOM, MAXZOOM, \ MARKERSIZE, RUBBERBANDSIZE, VIEWSTYLE # put constraints on rubberband zoom (relative rectangle wdith) RUBBERBANDSIZE = min(RUBBERBANDSIZE, 1.0) RUBBERBANDSIZE = max(...
#!/usr/bin/env python #@author: Prahlad Yeri #@description: Small daemon to create a wifi hotspot on linux #@license: MIT import sys import os import argparse import cli import json import socket import platform import time class Proto: pass const = Proto() #global const = Proto() #struct to hold startup parameter...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import copy import inspect from itertools import product import imp import logging import os from pprint import pformat import sys import time import traceback import unittest import json # project from ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2014-2016 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
# coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Chris Behrens # # 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 # # ...
#!/usr/bin/env python # # $Id$ # import os import errno import socket import struct import sys import base64 import re import _psutil_posix import _psutil_linux from psutil import _psposix from psutil.error import AccessDenied, NoSuchProcess, TimeoutExpired from psutil._common import * __extra__all__ = [ "IOPRIO...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
#=============================================================================== # Copyright 2007 Matt Chaput # # 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/li...
# Copyright 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 required ...
""" PySQL An abstraction layer for databases, accessible via a MySQL connection. """ __author__ = "Jon Botelho" import SocketServer import struct import os from types import StringType import pymongo import re class MySQLPacket (object): def __init__ (self, data=None, length=0, number=0): """ For cre...
from concurrent.futures import Future import pytest from ray.util.client import _ClientContext from ray.util.client.common import ClientActorRef, ClientObjectRef from ray.util.client.ray_client_helpers import ray_start_client_server from ray.util.client.ray_client_helpers import ( ray_start_client_server_pair, ...
import sys import os from nlpReaders.annotated_text import AnnotatedText as A from nlpReaders.parc_reader import AnnotatedText as B from parc_reader.parc_reader.reader import ParcCorenlpReader as P from nltk.tree import * import csv #fixes all the omnipresent unicode issues print sys.getdefaultencoding() reload(sys) s...
import operator import os import pprint import random import signal import time import uuid import logging import pytest import psutil from collections import defaultdict, namedtuple from multiprocessing import Process, Queue from queue import Empty, Full from cassandra import ConsistencyLevel, WriteTimeout from cass...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ These routines perform some hierrachical agglomerative clustering of some input data. The following alternatives are proposed: - Distance based average-link - Similarity-based average-link - Distance ba...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_popularity_prediction.features import comment_tree from reveal_popularity_prediction.features import user_graph from reveal_popularity_prediction.features import temporal from reveal_popularity_prediction.features import author def wrapper_comment_count(...
"""SCons.Tool.tex Tool-specific initialization for TeX. Generates .dvi files from .tex files There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, ...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # 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.apach...
import json import tornado.ioloop import tornado.web import tornado.httpserver from tornado.platform.asyncio import AsyncIOMainLoop from graph.filter_base import FilterBase, FilterState, FilterType from graph.input_pin import InputPin from graph.output_pin import OutputPin class MainHandler(tornado.web.RequestHandler...
# -*- coding: utf-8 -*- import json import mimetypes import os from datetime import datetime from zipfile import ZipFile from django import forms from django.conf import settings from django.core.validators import URLValidator from django.forms import widgets from django.forms.extras.widgets import SelectDateWidget fr...
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 from __future__ import absolute_import import urllib3 import unittest import requests import tests.apps.flask_app from ..helpers import testenv from instana.singletons import agent, tracer class TestUrllib3(unittest.TestCase): def setUp(self): ...