gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from django.views.generic import CreateView, TemplateView from django.shortcuts import redirect from django.core.exceptions import PermissionDenied from django.contrib import messages from django.utils.html import strip_tags from django.contrib.gis.geos import GEOSGeometry from rest_framework import status from rest_f...
import pytz from django.contrib.auth.models import User from django.contrib.staticfiles.templatetags.staticfiles import static from django.http import Http404 from django.utils.datastructures import SortedDict from django.utils.html import conditional_escape from django.utils.translation import ugettext_lazy as _ from...
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) class Bunch(dict): """ Container object for datasets: dictionnary-like object that exposes its keys as attributes. """ def __init__(self, **kwa...
import os import shutil import unittest from mcl.logging.tools import dump_to_csv from mcl.logging.tools import dump_to_list from mcl.logging.tools import dump_to_array _DIRNAME = os.path.dirname(__file__) TMP_PATH = os.path.join(_DIRNAME, 'tmp') LOG_PATH = os.path.join(_DIRNAME, 'dataset') SPT_PATH = os.path.join(_D...
# 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 sys from os import path from datetime import datetime from fabric.api import sudo, put, env, run, settings, prompt, task, hide, puts, show, warn, cd from fabric.contrib.files import upload_template from ezjailremote.utils import kwargs2commandline, jexec, get_flavour, is_ip EZJAIL_JAILDIR = '/usr/jails' EZJAI...
# -*- coding: utf-8 -*- import os import six import sys import time import traceback from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db.backends import utils from django.utils.six import PY3 from django_extensions_shell.management.shells import import_obj...
import sys from math import sqrt import numpy as np from scikits.audiolab import Sndfile, Format try: import libxmp LIBXMP = True except: LIBXMP = False from rawtrack import RawTrack from fade import Fade from segment import Segment from volume import Volume from ..utils import equal_power, RMS_energy, s...
import os import platform import re import subprocess import xml.etree.ElementTree as ET from subprocess import CalledProcessError, PIPE, STDOUT from six.moves.urllib.parse import quote_plus, unquote, urlparse from conans.client.tools import check_output from conans.client.tools.env import environment_append, no_op f...
from __future__ import print_function import warnings import sys import traceback import inspect import pickle import numpy as np from scipy import sparse import struct from sklearn.externals.six.moves import zip from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_equal from skle...
# hgweb/hgwebdir_mod.py - Web interface for a directory of repositories. # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005, 2006 Olivia Mackall <olivia@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any la...
# -*- coding: utf-8 -*- """Copyright 2015 Roger R Labbe Jr. FilterPy library. http://github.com/rlabbe/filterpy Documentation at: https://filterpy.readthedocs.org Supporting book at: https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python This is licensed under an MIT license. See the readme.MD file for mor...
""" This script is used to design the design matrix for our linear regression. We explore the influence of linear and quadratic drifts on the model performance. Script for the filtered data. Run with: python noise-pca_filtered_script.py from this directory """ from __future__ import print_function, division im...
# -*- coding: utf-8 -*- from mock import MagicMock, patch from zerver.lib.test_classes import WebhookTestCase from zerver.lib.webhooks.git import COMMITS_LIMIT class GitlabHookTests(WebhookTestCase): STREAM_NAME = 'gitlab' URL_TEMPLATE = "/api/v1/external/gitlab?&api_key={api_key}&stream={stream}" FIXTURE...
""" Linear dynamical system model for the AP text dataset. Each document is modeled as a draw from an LDS with categorical observations. """ from __future__ import print_function import os import re import gzip import time import cPickle import operator import collections import numpy as np from scipy.misc import logsu...
# -*- coding: utf-8 -*- # ============================================================================= # Tasks to be callable async # ============================================================================= tasks = {} # ----------------------------------------------------------------------------- def maintenan...
import logging,traceback,os,platform,ctypes ''' Joystick abstraction layer ''' HAT_N = 1 HAT_E = 2 HAT_S = 4 HAT_W = 8 HAT_NE = HAT_N | HAT_E HAT_SE = HAT_S | HAT_E HAT_SW = HAT_S | HAT_W HAT_NW = HAT_N | HAT_W class Joystick: MAX_AXIS = 16 def __init__(self, nameOrIndex): self._ax...
"""Philips Hue lights platform tests.""" import asyncio import logging import aiohue from homeassistant import config_entries from homeassistant.components import hue from homeassistant.components.hue import light as hue_light from homeassistant.util import color from tests.async_mock import Mock _LOGGER = logging....
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for numbers, according to PEP 3141. TODO: Fill out more detailed documentation on the operators.""" from abc import ABCMeta, abstractmethod, abstractproperty __all__ = ["Number", "Comp...
# -*- coding: utf-8 -*- import sublime, sublime_plugin import sys import os if sys.version_info < (3, 0): from chardet.universaldetector import UniversalDetector NONE_COMMAND = (None, None, 0) ST3 = False else: from .chardet.universaldetector import UniversalDetector NONE_COMMAND = ('', None, 0) ST3 = True impor...
#!/usr/bin/python import os import re import sys import time import errno import types import atexit import signal import socket import classad import datetime import unittest master_pid = 0 def kill_master(): if master_pid: os.kill(master_pid, signal.SIGTERM) atexit.register(kill_master) def makedirs_ignore_ex...
"""Implementation of the objects for the ArcGIS Server REST Administration API""" import cgi import itertools import os.path import urllib import urlparse import urllib2 from arcrest import server, GenerateToken __all__ = ['Admin', 'Folder', 'Services', 'Service', 'Machine', 'Machines', 'SiteMachines...
# Copyright 2011 OpenStack Foundation # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ...
''' Author : Nitish Reddy Koripalli Date : 14-11-2015 ''' import numpy as np from ActivationFunction import ActivationFunction from LayerStatistics import LayerStatistics class MLP_BP: DEBUG = False WEIGHTS_RANDOM = 1 WEIGHTS_ZEROS = 2 WEIGHTS_ONES = 3 OUTPUT_CLASSIFICATION = 1 O...
#!/usr/bin/env python3 import curses import shutil import traceback from argparse import ArgumentParser from time import sleep from threading import Thread, Semaphore import requests __version__ = '0.2.4' tsize = shutil.get_terminal_size() class JasperCoreController: def __init__(self, args): self.__HOST = arg...
"""A class that performs HTTP-01 challenges for Apache""" import errno import logging from typing import List from typing import Set from certbot import errors from certbot.compat import filesystem from certbot.compat import os from certbot.plugins import common from certbot_apache._internal.obj import VirtualHost # ...
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations from telemetry.page.actions import action_runner as action_runner_module class TestNotSupportedOnPlatformError...
from rest_framework import serializers as ser from rest_framework import exceptions from framework.exceptions import PermissionsError from api.base.exceptions import InvalidModelValueError from api.base.serializers import ValuesListField, RelationshipField, LinksField, HideIfDraftRegistration, IDField from api.base.ut...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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...
"""A module to receive data from UR CB2 robots.""" # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # 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...
def index(): # If user has been logged in already, then # redirect to dashboard. if auth.user: redirect('dashboard') return dict() def dashboard(): # If user has not been logged in, then # redirect to index. if not auth.user: redirect('/') return dict() def get_user()...
# 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...
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
#!/usr/bin/env python # Copyright (c) 2012 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. """Unit tests for Web Development Style Guide checker.""" import os import re import sys import unittest test_dir = os.path.dirna...
#!/usr/bin/env python # # Copyright 2001 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...
import json import unittest from hamcrest import assert_that, is_ from mock import patch from tests.support.performanceplatform_client import fake_data_set_exists from tests.support.test_helpers import is_bad_request, is_ok, \ is_error_response, has_status, is_not_found from tests.support.test_helpers import is_u...
################################################################################ # Copyright (C) 2011-2012,2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Module for the categorical distribution node. """ import...
# MIT License # # Copyright (c) 2017 Matt Boyer # # 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, modify, merge, p...
"""\ Helpers for build scripts under `scripts` directory (these are not build rule templates for helping you write build rules). """ __all__ = [ 'Builder', 'RuleIndex', 'find_default_path', 'find_input_path', 'get_build_image_rules', 'get_build_volume_rules', 'get_specify_app_rule', 'ge...
import re from dnload.common import is_verbose from dnload.glsl_type import interpret_type from dnload.glsl_type import interpret_pseudo_type ######################################## # GlslName ############################# ######################################## class GlslName: """GLSL name identifier.""" ...
# 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 ...
# -*- test-case-name: twisted.web.test.test_web -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This is a web-server which integrates with the twisted.internet infrastructure. """ from __future__ import division, absolute_import import copy import os try: from urllib import quote ...
from __future__ import division import numpy as np import pandas as pd import netCDF4 as nc from datetime import datetime, timedelta import cPickle as pickle import sys import os sys.path.append('/home/wesley/github/UTide/') from utide import ut_solv import scipy.io as sio from stationClass import station from adcpClas...
import io import os import re import rules._is_c_like as _is_c_like import rules._strip_comments as _strip_comments #Any unnecessarily qualified object instance is marked. See # http://stackoverflow.com/questions/29293136/compiler-warning-for-unnecessary-namespaces # This is based on an extremely simple lexical ...
# Author: Giacomo Vianello (giacomov@stanford.edu) # Copyright 2014 EXTraS. # # 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...
from __future__ import division, print_function import copy import numbers import numpy import pandas from scipy.special import expit, logit from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.ensemble._gradient_boosting import _random_sample_mask from sklearn.ensemble.gradient_boosting import LossFu...
import urllib2 import requests from bs4 import BeautifulSoup import time import random import pandas as pd class Scrape(object): SYMBOL_FILES_PATH = '../../symbols/' QUANDL_INDICES = 'https://s3.amazonaws.com/quandl-static-content/Ticker+CSV%27s/Indicies/' QUANDL_FUTURES = 'https://s3.amazonaws.com/quandl-...
######## # Copyright (c) 2014 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...
"""All constants related to the ZHA component.""" from __future__ import annotations import enum import logging import bellows.zigbee.application from zigpy.config import CONF_DEVICE_PATH # noqa: F401 # pylint: disable=unused-import import zigpy_cc.zigbee.application import zigpy_deconz.zigbee.application import zig...
"""Task TQL Filter""" # standard library from enum import Enum # first-party from tcex.api.tc.v3.api_endpoints import ApiEndpoints from tcex.api.tc.v3.filter_abc import FilterABC from tcex.api.tc.v3.tql.tql import Tql from tcex.api.tc.v3.tql.tql_operator import TqlOperator from tcex.api.tc.v3.tql.tql_type import TqlTy...
########################################################################## # # Copyright (c) 2019, Image Engine Design 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: # # * Redistrib...
"""Read records from normal file and compressed file""" import zlib import gzip import re from hanzo.warctools.archive_detect import is_gzip_file, guess_record_type def open_record_stream(record_class=None, filename=None, file_handle=None, mode="rb+", gzip="auto"): """Can take a filename o...
# -*- coding: utf-8 -*- # # Copyright 2018 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...
# lint as python3 # Copyright 2019 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 agr...
# -:- encoding: utf8 -:- # This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
#!/usr/bin/env python """Collects all the information a robot has of its environment. A map has three different parts: its properties, its elements, and its layers. Properties define key intrinsics of the map (such as its boundaries). Elements define the collections of physical objects on the map (robots, walls, etc.)...
# -*- coding: utf-8 -*- """ sphinx.application ~~~~~~~~~~~~~~~~~~ Sphinx application object. Gracefully adapted from the TextPress system by Armin. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_functio...
from base64 import urlsafe_b64encode import glob import json import logging import os import re import requests import time import uuid import centinel.utils as utils logging.getLogger("requests").setLevel(logging.WARNING) class User: def __init__(self, config): self.config = config self.verify...
#!/usr/bin/env python2 from math import* import re import logging import pandas as pd import numpy as np from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.decomposition import PCA, TruncatedSVD import seaborn as sns import nltk as nl from nltk.stem.snowball import SnowballStemmer...
""" @package mi.instrument.harvard.massp.ooicore.driver @file marine-integrations/mi/instrument/harvard/massp/ooicore/driver.py @author Peter Cable @brief Driver for the ooicore Release notes: Driver for the MASSP in-situ mass spectrometer """ import functools import time import mi.core.log from mi.core.driver_sched...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Locaweb. # 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/license...
# 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 functools import hashlib from django import http from django.conf import settings from django.core.cache import cache from django.core.exceptions import PermissionDenied from django.db.models import Q from django.db.transaction import non_atomic_requests from django.shortcuts import get_object_or_404 from djang...
""" Module that holds classes that represent agents. """ import sys import string import abc import random import pygame import entity import interaction import interactionmemory import events from appstate import AppState import settings class Agent(entity.Entity): """ Class that represents an agent. """...
""" Tests for rendering value as selection from list of options """ from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2014, G. Klyne" __license__ = "MIT (http://opensource.org/licenses...
import os,coral,re from RecoLuminosity.LumiDB import nameDealer class correctionTerm(object): constfactor=1.141 # const upshift , same for everyone class nonlinearSingle(correctionTerm): t1=0.076 #slop class nonlinearV2(correctionTerm): drift=0.01258 # drift t1=0.063 # slop1 t2=-0.003...
################################################################### # Numexpr - Fast numerical array expression evaluator for NumPy. # # License: MIT # Author: See AUTHORS.txt # # See LICENSE.txt and LICENSES/*.txt for details about copyright and # rights to use. ##########################################...
from rti_python.Writer.rti_sql import rti_sql from rti_python.Ensemble import Ensemble from datetime import datetime, date, time class RtiProjects: """ Handle the projects. Create projects and add data to the projects. """ def __init__(self, host='localhost', po...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides a class used to describe the elastic tensor, including methods used to fit the elastic tensor from linear response stress-strain data """ import itertools import warnings from collections import Orde...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. __author__ = "Kyle Bystrom" __copyright__ = "Copyright 2019, The Materials Project" __version__ = "0.1" __maintainer__ = "Kyle Bystrom" __email__ = "kylebystrom@gmail.com" __date__ = "5/29/2019" import unittes...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
import json, re, shutil, errno, os from os.path import join from twisted.internet.defer import Deferred from twisted.web.resource import NoResource, ErrorPage from twisted.web.server import NOT_DONE_YET from .errors import BaseError, BaseHTTPError, BadRequest from .projecttemplates import templates from .resource impor...
from __future__ import absolute_import import responses import sentry from mock import MagicMock from six.moves.urllib.parse import urlencode, urlparse from sentry.constants import ObjectStatus from sentry.integrations.github import GitHubIntegrationProvider from sentry.models import Integration, OrganizationIntegra...
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101 import pytest from pandas import DataFrame, Series import pandas as pd from numpy import nan import numpy as np from pandas.util.testing import assert_frame_equal from pandas import get_dummies import pandas.util.testing as tm from pandas.compat import u ...
# coding=utf-8 # Copyright 2022 The ML Fairness Gym 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...
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" from __future__ import absolute_import from six import unichr import six __all__ = [ 'HTMLParserTreeBuilder', ] from six.moves.html_parser import HTMLParser if six.PY2: from six.moves.html_parser import HTMLParseError else: class HT...
import json import logging from go.apps.jsbox.log import LogManager from go.vumitools.api import VumiApiCommand from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.apps.jsbox.view_definition import ( JSBoxReportsView, ConversationReportsView) from go.a...
import sys import os import shutil import collections import pprint from subprocess import call IMG_VIEW_HOME = os.environ.get('XNATIMAGEVIEWER_HOME') LOAD_PATH = IMG_VIEW_HOME + \ "/src/main/scripts/viewer/gxnat" PROVIDE = 'goog.provide(' def filterLastCapital(depLine): """ Filters an isolat...
# 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 use ...
import bpy from math import floor, ceil from mathutils import Vector, Quaternion from mathutils.geometry import distance_point_to_plane import sprytile_utils import sprytile_uv import sprytile_preview class ToolBuild: modal = None left_down = False start_coord = None can_build = False def __init_...
import datetime import mongoengine as mongo import urllib2 import redis from django.conf import settings from apps.social.models import MSharedStory from apps.profile.models import Profile from apps.statistics.rstats import RStats, round_time from utils import json_functions as json from utils import db_functions clas...
# Copyright (c) 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 collections import ctypes import platform import re import subprocess import time try: import pywintypes # pylint: disable=F0401 import win32...
from __future__ import print_function import platform PY3 = False if platform.python_version().startswith('3'): PY3 = True import sys import textwrap import re import math from time import sleep from io import StringIO from subprocess import ( check_output, CalledProcessError) if PY3: get_input = input ...
#!/usr/bin/env python # Copyright 2017 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...
# 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 asyncio import json import logging import time import collections import base64 import binascii import pathlib import inspect import motor.motor_asyncio import itsdangerous from aiohttp import web from itsdangerous import TimestampSigner import litecord.api as api import litecord.managers as managers from .en...
import frappe, urllib from frappe import _ from urlparse import parse_qs, urlparse from oauthlib.oauth2.rfc6749.tokens import BearerToken from oauthlib.oauth2.rfc6749.grant_types import AuthorizationCodeGrant, ImplicitGrant, ResourceOwnerPasswordCredentialsGrant, ClientCredentialsGrant, RefreshTokenGrant, OpenIDConne...
# Copyright 2018 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, ...
################################################################################# # Copyright (c) 2011-2013, Pacific Biosciences of California, Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
import warnings import unittest import sys import os import atexit import numpy as np from scipy import sparse import pytest from sklearn.utils.deprecation import deprecated from sklearn.utils.metaestimators import if_delegate_has_method from sklearn.utils._testing import ( assert_raises, assert_warns, ...
import datetime import json import math import random import re from django.conf import settings from django.contrib.humanize.templatetags import humanize from django.core.cache import cache from django.db.models import Q from django.http import Http404, HttpResponse from django.shortcuts import redirect, get_object_o...
# Copyright 2015 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# # Kivy - Cross-platform UI framework # https://kivy.org/ # import sys build_examples = False if "--build_examples" in sys.argv: build_examples = True sys.argv.remove("--build_examples") from kivy.utils import pi_version from copy import deepcopy import os from os.path import join, dirname, sep, exists, base...
import math from datetime import datetime, timedelta from xmlrpclib import ServerProxy from django.shortcuts import get_object_or_404 from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseForbidden from django.contrib.auth.models import User from django.contrib.auth.decorators import login_r...
#!/usr/bin/env python3 # # Copyright (c) 2019 Cisco and/or its affiliates. # 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...
# Copyright (c) 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...
import json import unittest import webtest from datamodel import Library, Version, Content, Status from api import app import util from test_base import TestBase class ApiTestBase(TestBase): def setUp(self): TestBase.setUp(self) self.app = webtest.TestApp(app) class PublishTest(ApiTestBase): def test_ad...