gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozil...
# # Copyright (c) 2014, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of condit...
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
#!/usr/bin/env python import logging import re import sys from collections import defaultdict from lxml.etree import tostring from lxml.etree import tounicode from lxml.html import document_fromstring from lxml.html import fragment_fromstring from cleaners import clean_attributes from cleaners import html_cleaner fro...
# coding: utf-8 from __future__ import unicode_literals import pytest from django.core.paginator import Paginator as DjangoPaginator from django.db import models from django.test import TestCase from rest_framework import ( exceptions, filters, generics, pagination, serializers, status ) from rest_framework.pagin...
#!/usr/bin/env python """A `Property Lists`_ is a data representation used in Apple's Mac OS X as a convenient way to store standard object types, such as string, number, boolean, and container object. This file contains a class ``XmlPropertyListParser`` for parse a property list file and get back a python native data...
import boto3, botocore import os, uuid, json, sys from urlparse import urlparse from boto3.s3.transfer import S3Transfer from pyntaws.services._session import AWSSession import __builtin__ __builtin__.validated_templates = list() class AWSCloudFormation(AWSSession): def __init__(self, **kwargs): super(self.__...
# Copyright 2019 The Magenta 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 in ...
import logging import hashlib import multiprocessing import os import re import shutil import subprocess import time from smqtk.utils import file_utils, string_utils __author__ = "paul.tunison@kitware.com" class VideoMetadata (object): """ Simple container for video file metadata values """ def __...
# -*- coding: utf-8 -*- """ The Gymkhana houses competitions running on the system. PythonPro Limited 2013-02-21 """ import json import logging from greplin import scales from pp.latchpony.service.utils import redis_from_config from pp.latchpony.model.competition import LocalCompetition def get_log(extra=None): ...
# -*- coding: utf-8 -*- from __future__ import with_statement import copy import difflib import itertools import os.path import time import traceback from behave import step_registry from behave.compat.os_path import relpath class Argument(object): '''An argument found in a *feature file* step name and extracted...
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2012 Grid Dynamics # Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: booopooob@gmail.com # # Info: # # import asyncio from typing import Callable, Tuple, Dict import constants import settings from constants import STAGE_SOCKS5_UDP_ASSOCIATE, \ STAGE_SOCKS5_TCP_RELAY, \ STRUCT_BBB, STRUCT_BB, STRUCT_B, STRUCT_SOCK5_REPLY ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apache License, Version 2.0 (the "License")...
""" module for accessing a USB HID YubiKey """ # Copyright (c) 2010, 2011, 2012 Yubico AB # See the file COPYING for licence statement. __all__ = [ # constants # functions # classes 'YubiKeyUSBHID', 'YubiKeyUSBHIDError', 'YubiKeyUSBHIDStatus', ] from .yubico_version import __version__ from . import yubi...
#!/usr/bin/env python # # Copyright 2011 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 a...
#!/usr/bin/python # Copyright 2016 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 ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import tempfile from telemetry import decorators from telemetry.core import exceptions from telemetry.core import platform from telemetry.cor...
# 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 applicable ...
import base64 import calendar import datetime import re import unicodedata import warnings from binascii import Error as BinasciiError from email.utils import formatdate from urllib.parse import ( ParseResult, SplitResult, _coerce_args, _splitnetloc, _splitparams, quote, quote_plus, scheme_chars, unquote, unquo...
# -*- coding: utf-8 -*- # Copyright 2015 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 requir...
"""Test the search module""" import pickle import sys from collections import Iterable, Sized from itertools import chain, product import numpy as np import scipy.sparse as sp from scipy.stats import bernoulli, expon, uniform from sklearn.base import BaseEstimator from sklearn.datasets import make_blobs from sklearn....
# Copyright (c) 2012, Calxeda Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
from google.appengine.ext import ndb from flask import Markup, render_template from forms import Form import cgi, datetime date_format="%Y-%m-%d %H:%M" class Field(object): """docstring for Field""" def __init__(self,name=None, the_type=None, title=None, identifier=None, placeholder=None, tag="input", optio...
# 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...
import logging import datetime, re, stackauth, stackexchange, stackexchange.web, unittest import stackexchange.sites as stacksites from stackexchange.core import StackExchangeError # for Python 3 compatiblity try: import htmlentitydefs except ImportError: import html.entities as htmlentitydefs QUESTION_ID = 4...
# 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 py from rpython.rtyper.lltypesystem import lltype, llmemory, llarena from rpython.memory.gc.incminimark import IncrementalMiniMarkGC, WORD from rpython.memory.gc.incminimark import GCFLAG_VISITED from test_direct import BaseDirectGCTest T = lltype.GcForwardReference() T.become(lltype.GcStruct('pinning_test_stru...
import pytest from flask import Flask, url_for from flask_sqlalchemy import SQLAlchemy from werkzeug.wrappers import BaseResponse from flask_marshmallow import Marshmallow from flask_marshmallow.sqla import HyperlinkRelated from marshmallow import ValidationError from tests.conftest import Bunch try: from marshma...
from types import GeneratorType from django.utils.copycompat import copy, deepcopy class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than one of the given d...
"""Psyrun's task loading API.""" from __future__ import print_function import os import os.path import re import sys import traceback import warnings from psyrun.backend import DefaultBackend from psyrun.pspace import Param from psyrun.store import DefaultStore from psyrun.scheduler import ImmediateRun class TaskD...
# 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...
# # 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...
#!/usr/bin/env python """Preprocess a C source file using gcc and convert the result into a token stream Reference is C99: * http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf """ __docformat__ = "restructuredtext" import os, re, shlex, sys, tokenize, traceback, subprocess import ctypes from . import l...
# Copyright (c) 2021, Frappe Technologies and contributors # License: MIT. See LICENSE import frappe, json from frappe.model.document import Document from frappe.permissions import (get_valid_perms, update_permission_property) from frappe import _ from frappe.utils import cstr from frappe.core.utils import find from f...
# Copyright (c) 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
import base64 from datetime import timedelta import os import shutil import string import tempfile import unittest import warnings from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DatabaseSession from django.contrib.sessions.backends.cache import SessionStore as CacheSes...
#!/usr/bin/env python import os import sys import numpy as np import warnings from astropy.io import fits from astropy.utils.exceptions import AstropyWarning from astropy.table import Table, vstack, Column from astropy.time import Time import healpy as hp from dlnpyutils import utils as dln, coords, bindata import sub...
# (c) Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. from __future__ import absolute_import, division, print_function, unicode_literals from logging import...
# -*- 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...
# 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 ...
import sys import time from django.conf import settings from django.db.backends.base.creation import BaseDatabaseCreation from django.db.utils import DatabaseError from django.utils.functional import cached_property from django.utils.six.moves import input TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' ...
from typing import List, Union, Text, Optional, Any, Tuple, Dict import logging import scipy.sparse import numpy as np import tensorflow as tf from rasa.utils.tensorflow.constants import SEQUENCE, BALANCED from rasa.utils.tensorflow.model_data import RasaModelData, Data, FeatureArray logger = logging.getLogger(__nam...
import pytest from tests.utils import async import io import hashlib import aiohttpretty from waterbutler.core import streams from waterbutler.core import metadata from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.providers.s3 import S3Provider from waterbut...
# Copyright 2014 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 a...
# # Copyright (c) 2012 Patrice Munger # This file is part of pynetdicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at http://pynetdicom.googlecode.com # import dsutils from DIMSEparameters import * import DIMSEprovider import ACSEprovider i...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import * from django.test import TestCase from django.utils.safestring import mark_safe class AssertFormErrorsMixin(object): def assertFormErrors(self, expected, the_cal...
""" Use DeepFool to craft adversarials on MNIST. """ import os import numpy as np import matplotlib matplotlib.use('Agg') # noqa: E402 import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import tensorflow as tf from attacks import deepfool os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' im...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
# # 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...
#!/usr/bin/env python # Copyright (c) 2017,2018, F5 Networks, 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 app...
#!/usr/bin/env python # This file is part of tcollector. # Copyright (C) 2011 StumbleUpon, Inc. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at ...
import threading, time from sqlalchemy import pool, interfaces, select, event import sqlalchemy as tsa from test.lib import testing from test.lib.util import gc_collect, lazy_gc from test.lib.testing import eq_, assert_raises from test.lib.engines import testing_engine from test.lib import fixtures mcid = 1 class Mock...
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# 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/python """Script to poll metrics from MySQL Database and push them to Wavefront.""" from __future__ import print_function import os import sys import re import time import datetime import socket import signal import itertools import mysql.connector from wavefront_sdk.client_factory import WavefrontClientF...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
# Copyright (c) 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
# -*- coding: utf-8 -*- """ karnickel ~~~~~~~~~ AST macros for Python. :copyright: Copyright 2010 by Georg Brandl. :license: BSD, see LICENSE for details. """ import os import ast import imp import new import sys from copy import deepcopy from itertools import izip def macro(func): """Decor...
# Lint as: python2, python3 # 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 # ...
import re import sys from django.core.cache import cache from django.conf import settings from django.contrib.auth.models import Permission from django.core.urlresolvers import clear_url_caches from django.http import Http404 from django.template import Variable from django.test.utils import override_settings from cm...
#!/usr/bin/env python # encoding: utf-8 # # MP4.py # Copyright (c) 2012 Thorsten Philipp <kyrios@kyri0s.de> # # 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 restriction, including w...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ ==================================== rsfMRI: ANTS, FS, FSL, SPM, aCompCor ==================================== A preprocessing workflow for Siemens resting state data. This work...
# # Copyright (C) 2000 greg Landrum # """ handles doing cross validation with decision trees This is, perhaps, a little misleading. For the purposes of this module, cross validation == evaluating the accuracy of a tree. """ from __future__ import print_function from rdkit.ML.DecTree import ID3 from rdkit.ML.Data ...
from troposphere import Ref, Template, Parameter, GetAZs, Output, Join, GetAtt from troposphere.autoscaling import LaunchConfiguration, AutoScalingGroup, Tag from troposphere.ec2 import Instance, SecurityGroup, SecurityGroupRule, EIP from troposphere.elasticloadbalancing import LoadBalancer, AccessLoggingPolicy from tr...
################################################################################ # Copyright (c) 2011-2021, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License at # # ...
""" This module implements the class `truncated_gaussian` which performs (conditional) UMPU tests for Gaussians restricted to a set of intervals. """ import numpy as np from ..distributions.pvalue import (norm_pdf, truncnorm_cdf, norm_q, ...
#!/usr/bin/env python """Client utilities common to all platforms.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import hashlib import logging import os import platform import subprocess import threading import time from future.utils import itervalue...
#------------------------------------------------------------------------------- # Name: opan_utils_vector # Purpose: Test objects for opan.utils.vector # # Author: Brian Skinn # bskinn@alum.mit.edu # # Created: 19 Apr 2016 # Copyright: (c) Brian Skinn 2016 # License: The MIT Li...
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or bow...
# basic dependencies import os import sys import subprocess from glob import glob import math # main dependencies: numpy, nibabel import numpy import nibabel # nighresjava and nighres functions import nighresjava from ..io import load_volume, save_volume from ..utils import _output_dir_4saving, _fname_4saving, \ ...
# # topology_writer_json - writes a topology in JSON format # # Copyright (c) 2014 Benocs GmbH # # author: Robert Wuttke <robert@benocs.com> # # See the LICENSE file included in this distribution. # import json from core.misc.netid import NetIDSubnetMap from coretopogen.topology_readwriter import TopologyWriter clas...
import os import xml.dom.minidom import pycmark.cmarkgfm as cmark import io from ..ast.DocumentTree import DocumentTree from .CodeHighlighter import highlight, HIGHLIGHT_LANGUAGES, highlight_css from .Katex import processLatex, escapeUnicode from .AssetLoader import loadAsset, loadBinaryAsset, ROOT ##################...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class Video(object): """ NOTE: This class is auto genera...
"""Support for a Hue API to control Home Assistant.""" import logging from aiohttp import web from homeassistant import core from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_TEMPERATURE, SERVICE_TURN_OFF, SERVICE_TURN_ON, SERVICE_VOLUME_SET, SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER, STATE_ON, STATE_O...
"""evaluate.py Script to create a system response for a given gold standard and then compare the system response to that gold standard. USAGE: $ python evaluate.py --run --gold DIR1 --system DIR2 [OPTIONS] $ python evaluate.py --comp --gold DIR1 --system DIR2 [OPTIONS] $ python evaluate.py --diff --gold DIR...
__all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack', 'stack', 'vstack'] import functools import itertools import operator import warnings from . import numeric as _nx from . import overrides from ._asarray import array, asanyarray from .multiarray import normalize_axis_index from . impor...
import numpy as np import pytest from astropy import time, units as u from astropy.coordinates import CartesianRepresentation from astropy.tests.helper import assert_quantity_allclose from hypothesis import given, settings, strategies as st from numpy.testing import assert_allclose from pytest import approx from polia...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ The classes in scene.visuals are visuals that may be added to a scenegraph using the methods and properties defined in `vispy.scene.Node` such as name, visible, parent, chi...
import asyncio import datetime import enum import json import math import time import warnings from email.utils import parsedate from multidict import CIMultiDict, CIMultiDictProxy from . import hdrs, payload from .helpers import HeadersMixin, SimpleCookie, sentinel from .http import RESPONSES, SERVER_SOFTWARE, HttpV...
if __name__ == "__main__": import argparse import json from git import Repo import os from multiprocessing import Pool import numpy as np from ..data.dataset import Dataset, NotAllign from ..features.helpers import scale_simple, scale_named, scale_named2, scale_named4, scale_named4s ...
import numpy import openravepy import logging from .exceptions import UnsupportedTypeSerializationException TYPE_KEY = '__type__' serialization_logger = logging.getLogger('prpy.serialization') deserialization_logger = logging.getLogger('prpy.deserialization') # Serialization. def serialize(obj): from numpy impor...
## # Copyright (c) 2005-2014 Apple Inc. All rights reserved. # # 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 restriction, including without limitation the rights # to use, copy, mod...
# Copyright (c) 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
#!/usr/bin/env python3 #============================================================================ # Copyright (C) Microsoft Corporation, All rights reserved. #============================================================================ from contextlib import contextmanager import os import sys import imp import re...
import braintree from django.conf import settings from django.test import TestCase from django.utils.unittest.case import skipIf from billing import get_gateway, CreditCard from billing.signals import * from billing.gateway import CardNotSupported, InvalidData from billing.utils.credit_card import Visa @skipIf(not ...
# 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 ...
#!/usr/bin/env python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from urllib import urlencode class HTTPError(Exception): default_status = 500 def __init__(self, status=None, body=None, exception=None, traceback=None, **more_headers): self.exception = exception self.traceback = trace...
# 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 ...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ # :Author: a Pygments author|contributor; Felix Wiemann; Guenter Milde # :Date: $Date$ # :Copyright: This module has been placed in the public domain. # # This is a merge of `Using Pygments in ReST documents`_ from the pygments_ # documentati...
"""Provide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions are a...
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2014 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
import pathlib import pytest from sectionproperties.pre.geometry import * from sectionproperties.pre.library.primitive_sections import * from sectionproperties.pre.library.steel_sections import * from sectionproperties.pre.library.nastran_sections import * from sectionproperties.analysis.section import Section from se...
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/local/bin/python from sprint import sprint as print import datetime import functools import getopt import glob import http.client from io import open import os import pprint import pymysql import random import sys import time import traceback import config import crawls import logger import pifile import usefu...
# -*- coding: utf-8 -*- import neo import numpy as np import quantities as pq import unittest import elephant.change_point_detection as mft from numpy.testing.utils import assert_array_almost_equal, assert_allclose # np.random.seed(13) class FilterTestCase(unittest.TestCase): def setUp(self): self.test_...
# -*- coding: utf-8 -*- """A module for writing, reading, and searching files for persistance of brags. Implements the three public methods necessary for the bragly.persist API: write : saves a message. read : reads all messages in the relevant timeframe. search: searches all messages accord...
""" Utilities to download NeuroImaging datasets Author: Gael Varoquaux """ import fnmatch import glob import json import os import re import warnings import nibabel as nib import numpy as np import pandas as pd from nilearn.datasets.utils import (_fetch_file, _fetch_files, ...
# Copyright (c) 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 agreed to in writi...