gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import sys import signal from django.conf import settings from django.db.models import get_app, get_apps from django.test import _doctest as doctest from django.test.utils import setup_test_environment, teardown_test_environment from django.test.testcases import OutputChecker, DocTestRunner, TestCase from django.utils...
# -*- coding: utf-8 -*- ''' rauth.test_service_oauth1 ------------------------- Test suite for rauth.service.OAuth1Service. ''' from base import RauthTestCase from test_service import HttpMixin, RequestMixin, ServiceMixin from rauth.compat import parse_qsl, quote, is_basestring, iteritems from rauth.serv...
import filesystem import smugmug import connectorbase import json from PIL import Image, ExifTags import time from clint.textui import progress from file import File import file as fileConstants import os import shutil import traceback import ConfigParser from file import FileEncoder import pprint def match_sets(file...
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The Bitcoin Core developers # Copyright (c) 2015-2018 The PIVX developers # Copyright (c) 2018-2019 The Ion developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re impo...
""" :file: enum.py Contains a more natural enum implementation. :date: 10/06/2016 :authors: - Gilad Naaman <gilad@naaman.io> """ from .base import * from .scalars import * import collections __all__ = ('Enum', 'auto') class auto: # This is implemented solely to satisfy PyCharm's type-checker. # In re...
# 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...
#------------------------------------------------------------------------------- # Name: verifyactions.py #------------------------------------------------------------------------------- from __future__ import with_statement __author__ = "Travis Goldie" __email__ = "test_automation@us.sios.com" __date_...
from flatland import String from flatland.schema.properties import Properties import six import pytest def test_empty(): class Base(object): properties = Properties() assert not Base.properties b = Base() assert not b.properties assert not Base.properties assert Base.properties == ...
# 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...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import ipaddress from enum import Enum import six from crypt...
import os import shutil import unittest import pkg_resources import mock from ming.base import Object from ming.orm import ThreadLocalORMSession from alluratest.controller import setup_basic_test, setup_global_objects from allura.lib import helpers as h from allura.tests import decorators as td from allura.tests.mode...
import base64 from datetime import datetime from itertools import repeat import os.path from unittest import main, TestCase from pgpdump import AsciiData, BinaryData from pgpdump.packet import (TAG_TYPES, SignaturePacket, PublicKeyPacket, PublicSubkeyPacket, UserIDPacket, old_tag_length, new_tag_length, ...
import typing import json import logging import numpy as np import os import pickle import warnings from sklearn.base import clone from sklearn.linear_model import LogisticRegression from sklearn.model_selection import GridSearchCV from sklearn.preprocessing import LabelEncoder # noinspection PyProtectedMember from skl...
from urllib.parse import quote from django.test.testcases import TestCase from django.core.exceptions import ObjectDoesNotExist from django.contrib.contenttypes.models import ContentType from rest_framework.test import APIClient from generic_tagging.tests.factories import TagFactory, TaggedItemFactory, UserFactory, \ ...
from neo.Core.IO.BinaryWriter import BinaryWriter from neo.Core.IO.BinaryReader import BinaryReader from neo.Core.UInt160 import UInt160 from neo.Core.BigInteger import BigInteger from neo.Core.Cryptography.Crypto import Crypto from neo.IO.MemoryStream import StreamManager from neo.SmartContract.ContractParameter impor...
''' Copyright (c) 2013-2014, Joshua Pitts All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and t...
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.utils.html import escape, mark_safe from sentry import options from sentry.models import ( GroupSubscription, ProjectOption, UserAvatar, UserOption ) from sentry.utils.avatar import get_email_avatar from sentry.utils.e...
# -*- coding: Latin-1 -*- """peutils, Portable Executable utilities module Copyright (c) 2005-2013 Ero Carrera <ero.carrera@gmail.com> All rights reserved. For detailed copyright information see the file COPYING in the root of the distribution archive. """ from __future__ import division from future import standard...
from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import # pyeq2 is a collection of equations expressed as Python classes # # Copyright (C) 2013 James R. Phillips # 2548 Vera Cruz Drive # Birmingham, AL 35235 USA # # email: zunzun@zunzun.com # ...
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
import datetime from django.test import TestCase import audit_trail from audit_trail.models import AuditTrail from ..models import TestModelTrackAllFields, TestModelTrackOneField, TestModelWithFieldLabels, \ Post, Comment, User, AA, AB, BB, ShortcutTestModel, Post1, Comment1, Person, Animal, SomePerson class Test...
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) import numpy as np from scipy import linalg from . import io, Epochs from .utils import check_fname, logger, verbose from .io.pick import pick_types, pick_types_forward from .io.proj import Projection, _has_eeg_average...
# -*- coding: ascii -*- pylint: disable = too-many-lines r""" :Copyright: Copyright 2012 - 2015 Andr\xe9 Malo or his licensors, as applicable :License: 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 L...
# Natural Language Toolkit: Text Segmentation Metrics # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # David Doukhan <david.doukhan@gmail.com> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT...
#################################################################################################### # The MIT License (MIT) # # Copyright (c) 2015, Alexander I. Mykyta # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentatio...
''' TUIO Input Provider =================== TUIO is the de facto standard network protocol for the transmission of touch and fiducial information between a server and a client. To learn more about TUIO (which is itself based on the OSC protocol), please refer to http://tuio.org -- The specification should be of specia...
# 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 import sys,os from pmagpy import pmag from pmagpy import contribution_builder as cb #from datacite import DataCiteMDSClient from habanero import Crossref import datetime from datetime import timedelta import time as t import dateutil.parser def main(): """ NAME magic_geomagia.py ...
# mapping tools, including: # sextract(fits,sigma=5.,deblend=.005,minpix=10,fwhmlo=0.6,fwhmhi=1.5,cull=False,logfile='salt.log',debug=False) # catid(yxcat_dt, yxcand_ds, offsettol=10., errtol=4.,debug=False,logfile='salt.log',name='') # ccdcenter(image_rc) # gaincor(hdu) # YXcalc(ra_t,dec_t,RAd,DECd,PAd,fps) # RSScol...
import logging import dolfin as df import numpy as np from pySDC.core.Errors import ParameterError from pySDC.core.Problem import ptype from pySDC.implementations.datatype_classes.fenics_mesh import fenics_mesh, rhs_fenics_mesh # noinspection PyUnusedLocal class fenics_heat(ptype): """ Example implementing...
"""The Mayavi UI plugin """ # Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Standard library imports. import logging # Enthought library imports. from traits.api import List, on_trait_change from envisage.api import Plugin from pyface.wor...
#! /usr/local/bin/python import numpy as np import math from six.moves import range from . import steep_desc, downcut, FP from .diffuse import calc_crevasse_dep from .avulsion_utils import ( find_point_in_path, channel_is_superelevated, find_path_length, find_riv_path_length, set_linear_slope, ...
# # 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...
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import kwargs_and_defaults as m def test_function_signatures(doc): assert doc(m.kw_func0) == "kw_func0(arg0: int, arg1: int) -> str" assert doc(m.kw_func1) == "kw_func1(x: int, y: int) -> str" assert doc(m.kw_func2) == "k...
from datetime import datetime import logging import re from nameparser import HumanName from openelex.base.transform import Transform, registry from openelex.models import Candidate, Contest, Office, Party, RawResult, Result from openelex.lib.text import ocd_type_id from openelex.lib.insertbuffer import BulkInsertBuf...
# yellowbrick.base # Abstract base classes and interface for Yellowbrick. # # Author: Rebecca Bilbro <rbilbro@districtdatalabs.com> # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Fri Jun 03 10:20:59 2016 -0700 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE...
# 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 writ...
#!/usr/bin/env python # # -*-python-*- # ################################################################################ # License ################################################################################ # Copyright (c) 2006 Jeremy Whitlock. All rights reserved. # # This program is free software: you can redi...
# Copyright 2016 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 or agreed to in writing, ...
# -*- coding: utf-8 -*- """AppiumEnhanceLibrary is the enhancement of robotframework-appiumlibrary. It will bring back these missing keywords from robotframework selenium2library. Detail imformation could be found on github.com: https://github.com/ScenK/robotframework-AppiumEnhanceLibrary """ import os from robot...
#!/usr/bin/env python import couchdb import json import argparse import logbook import sys import os import ConfigParser from couchdb import PreconditionFailed #Set up logging l = logbook.Logger('CouchDB-Replicator') class Config(object): """Singleton class that holds the confiuration for the CouchDB replicator...
import prophy import pytest def get_integer_class1(_type): class X(prophy.with_metaclass(prophy.struct_generator, prophy.struct)): _descriptor = [("value", _type)] return X def get_optional_class1(_type): class X(prophy.with_metaclass(prophy.struct_generator, prophy.struct)): _descripto...
from cereal import car from selfdrive.config import Conversions as CV from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser from selfdrive.car.interfaces import CarStateBase from selfdrive.car.mazda.values import DBC, LKAS_LIMITS, GEN1 class CarState(CarStateBase): def __init__(self, ...
# Copyright (c) 2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
#! /usr/bin/env python # encoding: utf-8 # Eclipse CDT 5.0 generator for Waf # Richard Quirk 2009-1011 (New BSD License) # Thomas Nagy 2011 (ported to Waf 1.6) """ Usage: def options(opt): opt.load('eclipse') $ waf configure eclipse """ import sys, os from waflib import Utils, Logs, Context, Build, TaskGen, Script...
''' @author: frank ''' import os from zstacklib.utils import shell from zstacklib.utils import linux from zstacklib.utils import log from zstacklib.utils import ordered_set from pyparsing import * logger = log.get_logger(__name__) class IPTablesError(Exception): '''iptables error''' class Node(object): ...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless req...
# -*- coding: utf-8 -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2016 Thomas Voegtlin # # 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 witho...
# 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...
# -*- 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...
# # 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...
# coding:utf-8 import abc import logging LOG = logging.getLogger(__name__) class AbstractChatAdapterFactory(metaclass=abc.ABCMeta): @abc.abstractmethod def slack_adapter(self, bot_plugin): pass @abc.abstractmethod def generic_adpater(self, bot_plugin): pass class ChatAdapterFactory...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
"""Test for certbot_nginx._internal.nginxparser.""" import copy import operator import tempfile import unittest from pyparsing import ParseException from certbot_nginx._internal.nginxparser import dump from certbot_nginx._internal.nginxparser import dumps from certbot_nginx._internal.nginxparser import load from cert...
#!/usr/bin/env python from hashlib import sha256, md5 import struct __VERSION = 2 def __signature(basis_file, block_size): # Yield the identifier string, file type, version number and block size s_block = ('bdif' + 'sig' + struct.pack('i', __VERSION) + struct.pack('i', block_siz...
import os import re import gzip import shutil import gzip import subprocess import nibabel as nib import ntpath import pandas as pd import numpy as np import tempfile import nibabel as nib from nipype.interfaces.base import (TraitedSpec, File, traits, InputMultiPath, CommandLine, CommandLineInputSpec, BaseInt...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch 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...
import pytest from flaky import flaky import deepchem as dc from deepchem.models.optimizers import Adam, PolynomialDecay from tensorflow.keras.layers import Input, Dense, GRU, Reshape, Softmax import numpy as np import tensorflow as tf import unittest class TestPPO(unittest.TestCase): @flaky def test_roulette(s...
""" Tests for the HMAC signed-token registration workflow. """ import datetime import time from django.conf import settings from django.core import signing from django.core.urlresolvers import reverse from django.http import HttpRequest from django.test import modify_settings, override_settings from .. import signa...
# Copyright (c) 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.apache.org/licenses/LICENSE-2.0 # # Unless...
# -*- coding: utf-8 -*- from south.db import db, engine from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Category.slug' db.alter_column('qa_category', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255...
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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...
""" pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> 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...
# -*- coding: utf-8 -*- from __future__ import with_statement from behave import model, i18n DEFAULT_LANGUAGE = 'en' def parse_file(filename, language=None): with open(filename, 'rb') as f: # file encoding is assumed to be utf8. Oh, yes. data = f.read().decode('utf8') return parse_feature(d...
import abc import pandas as pd import copy from .timeframe import TimeFrame from nilmtk.utils import get_tz, tz_localize_naive class Results(object): """Stats results from each node need to be assigned to a specific class so we know how to combine results from multiple chunks. For example, Energy can be s...
# # Copyright 2013 Quantopian, 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 wr...
import logging import sys from logging import StreamHandler from textwrap import dedent import pytest from nose2pytest.script import NoseConversionRefactoringTool log = logging.getLogger('nose2pytest') nosetools = {} pytesttools = {} refac = NoseConversionRefactoringTool() @pytest.fixture(scope="session", autou...
from django import template from django.conf import settings from django.http import HttpRequest from feincms.module.page.models import Page, PageManager from feincms.utils.templatetags import * from feincms.utils.templatetags import _parse_args register = template.Library() class NavigationNode(SimpleAssignmentNode...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A regularized (compressed sensing) version of The Cannon. """ from __future__ import (division, print_function, absolute_import, unicode_literals) __all__ = ["L1RegularizedCannonModel"] import logging import numpy as np import scipy.optimize ...
import keras import keras.backend as K import tensorflow as tf import horovod.tensorflow as hvd class BroadcastGlobalVariablesCallback(keras.callbacks.Callback): """ Keras Callback that will broadcast all global variables from root rank to all other processes during initialization. This is necessary...
#!/usr/bin/env python """Build SysCTypes.chpl module. Determines the size of various C types (e.g. long, size_t, etc) and creates a Chapel module with 'extern types' declaration so Chapel code can refer to the types. Specify the output file as a positional argument, e.g.: %prog path/to/SysCTypes.chpl """ from ...
"""The definition of the base geometrical entity with attributes common to all derived geometrical entities. Contains ======== GeometryEntity """ from __future__ import print_function, division from sympy.core.compatibility import is_sequence from sympy.core.containers import Tuple from sympy.core.basic import Basi...
# -*- coding: utf-8 -*- """ Created on Fri Mar 31 09:50:23 2017 @author: kbefus """ from __future__ import print_function import numpy as np import time, os from pyres import pyres_utils,mesh_utils class meshR3(object): def __init__(self,geom_dict=None,name=None,nelectrodes_per_line=None, nline...
import datetime from unittest import mock from django.test.utils import override_settings from olympia import amo from olympia.amo.tests import addon_factory, TestCase from olympia.amo.urlresolvers import reverse from olympia.constants import applications, promoted from olympia.promoted.models import ( PromotedAd...
#!/usr/bin/python from bs4 import BeautifulSoup from dbconnect import connection import requests import date_module import classes import professors import traceback from compiler.ast import flatten import time def get_html(link): # TODO: Install SSL Certificate Before Production try: r = requests.ge...
from rest_framework.views import APIView from permabots.models import MessengerBot, MessengerMessage from rest_framework.response import Response from rest_framework import status import logging from permabots.tasks import handle_messenger_message from datetime import datetime from permabots import caching import sys i...
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
"""All the views for DrawWrite.""" # Imports {{{ import logging from base64 import b64decode from itertools import zip_longest from django.core.files.base import ContentFile from django.db import IntegrityError from django.http import HttpResponseBadRequest, HttpResponseNotAllowed, JsonResponse from django.shortcut...
"""Provide access to Python's configuration information. The specific names defined in the module depend heavily on the platform and configuration. Written by: Fred L. Drake, Jr. Email: <fdrake@acm.org> Initial date: 17-Dec-1998 """ __revision__ = "$Id: sysconfig.py,v 1.34 2001/02/28 19:40:27 akuchling Exp ...
"""Multidict implementation. HTTP Headers and URL query string require specific data structure: multidict. It behaves mostly like a dict but it can have several values for the same key. """ from collections import abc import os import sys __all__ = ('MultiDictProxy', 'CIMultiDictProxy', 'MultiDict', 'CIM...
# Author: Jean-Remi King <jeanremi.king@gmail.com> import numpy as np from scipy import optimize from scipy.spatial.distance import squareform, pdist from sklearn.preprocessing import PolynomialFeatures class ModelDisplacement(object): """Transformer to fit rigid object rotation + translation. It 1) centers ...
""" .. module:: pysm :platform: Unix :synopsis: module containing primary use classes Sky and Instrument. .. moduleauthor: Ben Thorne <ben.thorne@physics.ox.ac.uk> """ from __future__ import absolute_import, print_funct...
# 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 ...
from setuptools import setup, Extension import sys sys.path.insert(0, ".") from kapteyn import __version__ as version from glob import glob import sys, os # from https://github.com/msabramo/cython-test/ # get cython before running setup(..) #from setuptools.dist import Distribution #Distribution(dict(setup_requires='...
# Copyright (c) 2014 VMware, 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...
# # Errors # from __future__ import absolute_import try: from __builtin__ import basestring as any_string_type except ImportError: any_string_type = (bytes, str) import sys from contextlib import contextmanager from ..Utils import open_new_file from . import DebugFlags from . import Options class PyrexE...
from sqlalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy import Index from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import schema from sqlalchemy import Sequence from sqlalchemy import Table from sqlalchemy.sql.ddl import SchemaDropper from sqlalchemy.sql.ddl impo...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). """Generates and uploads the Pants reference documentation. Dry run: ./pants run build-support/bin/generate_docs.py Live run: ./pants run build-support/bin/generate_docs.py -- ...
#!/usr/bin/env python # # Copyright 2012 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...
import json import unittest from copy import copy from collections import OrderedDict from six import iterkeys from sentinel_s3.converter import (camelcase_underscore, metadata_to_dict, tile_metadata, to_latlon, get_tile_geometry, convert_coordinates) class Test(unittest.TestCase):...
#!/usr/bin/python import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import numpy as np from urlparse import parse_qs from PIL import Image from io import BytesIO import base64 from CharInfo import CharInfo from LocInfo import LocInfo from Point import Point import sys import math from PIL import I...
# # Copyright (c) 2003-2006 Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ utility functionality for fingerprinting s...
import bs import random #add for bunny buddy: import BuddyBunny import SnoBallz import bsPowerup import bsSpaz import Portal from bsPowerup import PowerupMessage, PowerupAcceptMessage, _TouchedMessage, PowerupFactory, Powerup defaultPowerupInterval = 8000 class NewPowerupFactory(PowerupFactory): def __init__(sel...
from integration_test.schemas.v2.definitions import personalisation, uuid template = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "template schema", "type": "object", "title": "notification content", "properties": { "id": uuid, "version": {"type": "integer"...
# -*- coding: utf-8 -*- from django.test import TestCase, override_settings, modify_settings from filer.tests import create_superuser from filer.models import File, Folder from filer_addons.tests.utils import create_django_file from filer_addons.filer_signals import conf as signals_conf try: reload except NameErr...
# Copyright 2015 FUJITSU LIMITED # # 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...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Partially based on AboutMessagePassing in the Ruby Koans # from runner.koan import * class AboutAttributeAccess(Koan): class TypicalObject: pass def test_calling_undefined_functions_normally_results_in_errors(self): typical = self.TypicalObj...
# -*- coding: utf-8 -*- # @Author: massimo # @Date: 2016-03-10 22:49:31 # @Last Modified by: massimo # @Last Modified time: 2016-03-10 23:29:56 import numpy as np import theano import theano.tensor as T from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams import utils from updates import adagrad, a...
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme 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 ...