gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import simplejson as json from jsonfield.fields import JSONFormField, JSONField from django import forms from django.utils.translation import ugettext_lazy as _ from widgets import NullWidget class BaseContactField(object): """ A contact field allows contact information to be stored using a relatively ...
""" Forms used throughout the DISBi app. """ # standard library from collections import namedtuple # third-party from more_itertools import unique_everseen # Django from django import forms from django.conf import settings from django.db.models.fields.related import ForeignKey from django.utils.translation import uge...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2016 Vedams Inc. # Copyright (C) 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 ...
# Copyright 2015, Google 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 the f...
# Copyright (c) 2018 PaddlePaddle 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 app...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2019 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """REST API resources.""" from __future__ import absolute_import, print_function im...
""" tagplay.py refactored based on Jukebox Activity Copyright (C) 2007 Andy Wingo <wingo@pobox.com> Copyright (C) 2007 Red Hat, Inc. Copyright (C) 2008-2010 Kushal Das <kushal@fedoraproject.org> Copyright (C) 2010 Walter Bender """ # This program is free software; you can redistribute it and/or # modify it under...
"""FoundationDB Blob Layer. Provides the Blob() class for storing potentially large binary objects in FoundationDB. """ import fdb import fdb.tuple from directory import directory fdb.api_version(100) ######## # Blob # ######## SIZE_KEY = 'S' ATTRIBUTE_KEY = 'A' DATA_KEY = 'D' CHUNK_LARGE = 10000 # all chunks will...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module implements classes (called Fitters) which combine optimization algorithms (typically from `scipy.optimize`) with statistic functions to perform fitting. Fitters are implemented as callable classes. In addition to the data to fit, the ``__c...
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. All rights reserved. # Copyright (c) 2016 Mike Rooney. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this...
# Copyright (c) 2015-2019, Activision Publishing, 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: # # 1. Redistributions of source code must retain the above copyright notice, this # list of ...
""" Django settings for djangoecommerce project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ impo...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (...
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the l...
# -*- coding: utf-8 -*- import datetime from .._globals import IDENTITY from .._compat import integer_types from ..drivers import couchdb from ..objects import Field, Query from ..helpers.classes import SQLALL from ..helpers.methods import uuid2int from ..helpers.serializers import serializers from .base import BaseAd...
# -*- coding: utf-8 -*- try: from thread import start_new_thread, get_ident except ImportError: # Python 3? from _thread import start_new_thread, get_ident import threading import unittest import time import sys import gc from fastrlock import rlock IS_PYTHON3 = sys.version_info[0] >= 3 try: _next =...
"""Utilities for assertion debugging""" import pprint from collections.abc import Sequence import _pytest._code from _pytest import outcomes from _pytest._io.saferepr import saferepr # The _reprcompare attribute on the util module is used by the new assertion # interpretation code and assertion rewriter to detect thi...
#!/usr/bin/env python import fileinput import pydoc import re import sys import unittest # TODO: Implement proper lexer + parser. # TODO: Add header date corrector, if a header date and weekday is off. # ============================================================================ # C O N F I G U R A T I O N INDENT...
# # 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...
import pdb import numpy as np from astropy.wcs import WCS from utils import circle_mask from utils import dist_idl from utils import gauss_kern from utils import pad_and_smooth_psf from utils import shift_twod from utils import smooth_psf from lmfit import Parameters, minimize, fit_report from collections import Order...
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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 # ...
#!/usr/bin/python # # Copyright (c) 2015, 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, # t...
import math import textwrap import sys import pytest import threading import traceback import time import numpy as np from numpy.testing import assert_, assert_equal, IS_PYPY from . import util class TestF77Callback(util.F2PyTest): code = """ subroutine t(fun,a) integer a cf2py intent(out) a ...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division """ Imported from CalcLoads.bas """ import logging import numpy as np log = logging.getLogger(__name__) def CalculateLoads(z, Y): PrecipitationTotal = 0 RunoffTotal = 0 ...
#!/usr/bin/env python # Copyright 2014 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 json import os import pipes import shutil import subprocess import sys script_dir = os.path.dirname(os.path.realpath(__file__)...
__author__ = 'mramire8' __copyright__ = "Copyright 2013, ML Lab" __version__ = "0.2" __status__ = "Development" import sys import os sys.path.append(os.path.abspath(".")) sys.path.append(os.path.abspath("../")) sys.path.append(os.path.abspath("../experiment/")) from experiment.experiment_utils import split_data_sent...
""" Integration testing for the binary streaming protocol. This is for the backend, as opposed to the frontend binary protocol. """ import os import os.path import shutil import socket import subprocess import sys import tempfile import time import random import struct try: import pytest except ImportError: pr...
# coding: utf-8 # # Copyright 2015 The Oppia 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 requi...
from operator import sub import numpy as np from sklearn import metrics from sklearn.neighbors import NearestNeighbors from toolz import curry def global_false_nearest_neighbors(x, lag, min_dims=1, max_dims=10, **cutoffs): """ Across a range of embedding dimensions $d$, embeds $x(t)$ with lag $\tau$, finds a...
# # 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...
import unittest from pokemongo_bot.inventory import * class InventoryTest(unittest.TestCase): def test_types(self): td = Types self.assertIs(types_data(), td) self.assertEqual(len(td.STATIC_DATA), 18) self.assertEqual(len(td.all()), 18) for name, s in td.STATIC_DATA.iteri...
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softwar...
# -*- coding: utf-8 -*- """ Combines contents of common.py, client.py, server.py into a single module. There are 3 sections: Common Code -- used by both client and server Server Code -- Specific to the web service Client Code -- Compiled to JS by Transcrypt You can search for the above names in your edito...
# coding: utf-8 """ Module ``selector`` ------------------- Mock of :mod:`selectors` and compatible objects performing asynchronous IO. This module provides classes to mock objects performing IO (files, sockets, etc). These mocks are compatible with :class:`~asynctest.TestSelector`, which can simulate the behavior of...
import datetime from operator import attrgetter from .models import ( Country, Person, Group, Membership, Friendship, Article, ArticleTranslation, ArticleTag, ArticleIdea, NewsArticle) from django.test import TestCase from django.utils.translation import activate from django.core.exceptions import FieldError f...
import os import socket import StringIO import tempfile import time import traceback from django.conf import settings import commonware.log import elasticsearch import requests from cache_nuggets.lib import memoize from PIL import Image from lib.crypto import packaged, receipt from lib.crypto.packaged import Signing...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A modular python bot based on the twisted matrix irc library @author Riku 'Shrike' Lindblad (shrike@addiktit.net) @copyright Copyright (c) 2006 Riku Lindblad @license New-Style BSD """ from __future__ import print_function, division import sys import os.path import t...
import json from mock import MagicMock from spacel.model import SpaceService, SpaceServicePort, SpaceDockerService from spacel.provision import base64_decode from spacel.provision.app.alarm import AlarmFactory from spacel.provision.app.app_spot import AppSpotTemplateDecorator from spacel.provision.app.cloudwatch_logs...
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
""" This module contains classes for dealing with pip and setuptools requirements classes """ import sys import pkg_resources as pr import pip.req import tempfile import shutil import subprocess import os import re from glob import glob from os import path from pydep import setup_py from pydep.vcs import parse_repo_u...
# Copyright (c) 2016 SUSE. 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 agreed...
""" Elevator.py elevator bank/passenger Simulator: Models an bank of elevators in a building that respond to passengers. WORK-IN-PROGRESS """ import time import os import sys ################ # GLOBAL ENUMERATIONS - Yeah, I know that Enums is supported in 3.4, but this works in 2.7 ################ def enum(**enum...
from itertools import product from string import ascii_uppercase import pandas as pd from pandas.tseries.offsets import MonthBegin from six import iteritems from .futures import CME_CODE_TO_MONTH def make_rotating_equity_info(num_assets, first_start, frequ...
# -*- coding: utf-8 -*- import json import logging import unittest import os from StringIO import StringIO import yaml import gevent import arrow from mongrey import constants from mongrey.server.core import PolicyServer, logger as server_logger from mongrey.server.core import DEFAULT_CONFIG as SERVER_CONFIG from m...
"""Use Bayesian Inference to trigger a binary sensor.""" from collections import OrderedDict import voluptuous as vol from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from homeassistant.const import ( CONF_ABOVE, CONF_BELOW, CONF_DEVICE_CLASS, CONF_ENTITY_ID, ...
#!/bin/python from flask import Flask, jsonify, abort,request,Response import InfluxDBInterface import json import IoTtoolkit #from elasticsearch import Elasticsearch from ElasticsearchInterface import ESinterface import os, sys import time import pandas as pd app = Flask(__name__) app.config.update(dict( # DATAB...
import calendar from django.core.urlresolvers import reverse from corehq.apps.accounting.async_handlers import ( SubscriberFilterAsyncHandler, SubscriptionFilterAsyncHandler, AccountFilterAsyncHandler, DomainFilterAsyncHandler, BillingContactInfoAsyncHandler, SoftwarePlanAsyncHandler, ) from cor...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # 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...
# -*- coding: utf-8 -*- # """ This models contains the Kernels for Kernel smoothing. Hopefully in the future they may be reused/extended for other kernel based method References: ---------- Pointwise Kernel Confidence Bounds (smoothconf) http://fedc.wiwi.hu-berlin.de/xplore/ebooks/html/anr/anrhtmlframe62.html """ #...
"""Responses. responses serve both testing purpose aswell as dynamic docstring replacement """ responses = { "_v3_accounts_accountID_positions": { "url": "v3/accounts/{accountID}/positions", "response": { "positions": [ { "short": { ...
import functools import operator from collections import defaultdict from contextlib import suppress from typing import TYPE_CHECKING, Any, Dict, Hashable, Mapping, Optional, Tuple, Union import numpy as np import pandas as pd from . import dtypes, utils from .indexing import get_indexer_nd from .utils import is_dict...
""" Cisco_IOS_XR_infra_infra_locale_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR infra\-infra\-locale package configuration. This module contains definitions for the following management objects\: locale\: Define the geographical locale Copyright (c) 2013\-2016 by Cisco Systems, Inc...
# Copyright 2013: Mirantis 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 b...
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function """ given * a list of default packages * a list of installed packages * apt-cache dependency graph find the minimal set of packages that would install everything installed costs: * time to generate solution benefits: * (un) mark manua...
#!/usr/bin/env python """ @package mi.idk.test.test_comm_config @file mi.idk/test/test_comm_config.py @author Bill French @brief test metadata object """ __author__ = 'Bill French' __license__ = 'Apache 2.0' from os.path import basename, dirname from os import makedirs from os import remove from os.path import exist...
from __future__ import division, absolute_import, print_function import sys import math import numpy.core.numeric as _nx from numpy.core.numeric import ( asarray, ScalarType, array, alltrue, cumprod, arange ) from numpy.core.numerictypes import find_common_type, issubdtype from . import function_base import ...
#!/usr/bin/env python3 # 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. from writers import gpo_editor_writer import re NEWLINE = '\r\n' POLICY_LIST_URL = '''https://cloud.google.com/docs/chrome-enterp...
# coding=utf-8 """Module that provides a cron-like task scheduler. This task scheduler is designed to be used from inside your own program. You can schedule Python functions to be called at specific intervals or days. It uses the standard 'sched' module for the actual task scheduling, but provides much more: * repea...
import random try: from com.xhaus.jyson import JysonCodec as json except ImportError: import json from utils import * from net.grinder.script import Test from net.grinder.plugin.http import HTTPRequest from HTTPClient import NVPair import itertools class AbstractQuery(object): one_day = (1000 * 60 * 60 *...
''' .. autoclass:: TestLoader :members: :member-order: bysource ''' import os import re import sys import unittest from importlib import import_module from .utils import LOGGER __all__ = ['TestLoader'] def issubclass_safe(cls, base_cls): try: return issubclass(cls, base_cls) except TypeError...
''' @author: frank ''' import os import socket import subprocess import time import tempfile import traceback import struct import netaddr import functools import threading import re from zstacklib.utils import shell from zstacklib.utils import log from zstacklib.utils import lock from zstacklib.utils import sizeunit...
#!/usr/bin/env python3 # for command formats, see http://www.gpsinformation.org/dale/nmea.htm import serial from datetime import datetime, tzinfo, timedelta from pymongo import MongoClient class Zone(tzinfo): def __init__(self, offset, isdst, name): self.offset = offset self.isdst = isdst ...
""" General code related to all optimization techniques. """ from __future__ import absolute_import from __future__ import division import copy import collections import logging import logging.config import numpy as np import re import textwrap import sys import calculate import compare import constants as co import ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Big Switch Networks, 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/lice...
import json from datetime import datetime import mock from pyquery import PyQuery as pq from olympia import amo from olympia.amo.tests import ESTestCase, TestCase, version_factory from olympia.amo.urlresolvers import reverse from olympia.addons.models import Addon, AppSupport from olympia.addons.utils import generate...
from __future__ import absolute_import from sentry import tagstore from sentry.plugins.bases import notify from sentry.utils import json from sentry.utils.http import absolute_uri from sentry.integrations import FeatureDescription, IntegrationFeatures from .client import SlackApiClient from sentry_plugins.base import...
# -*- coding: utf-8 -*- # # City Energy Analyst documentation build configuration file, created by # sphinx-quickstart on Tue Jan 31 15:57:58 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
''' The MIT License (MIT) Copyright (c) 2016 Nordeus LLC 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...
# Create your views here from django.http import HttpResponse, HttpResponseNotFound, Http404 from django.shortcuts import render from django.shortcuts import redirect from django.contrib.auth import logout from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.con...
# python imports import locale import math import json # django imports from django.conf import settings from django.core.cache import cache from django.core.paginator import Paginator, EmptyPage, InvalidPage from django.core.urlresolvers import reverse from django.http import Http404 from django.http import HttpRespo...
from __future__ import unicode_literals import time import json import requests import calendar import difflib import hashlib from random import uniform from operator import itemgetter, methodcaller from datetime import datetime from itertools import izip from pokemongo_bot import inventory from pokemongo_bot.item_li...
# 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...
import time from xbmcswift2 import Plugin, xbmc, SortMethod, logger import requests from course_utils import (extractDuration, getContentURL, getSylabus, isSettingsBad, loadClasses) from coursera_login import getClassCookies plugin = Plugin() if plugin.get_setting('enable_debug', bool): ...
""" neuralnetwork module tests """ import os.path as path import numpy as np import tensorflow as tf import pytest import yaml import yass from yass.batch import BatchProcessor from yass import neuralnetwork from yass.neuralnetwork import NeuralNetDetector, KerasModel, AutoEncoder from yass.neuralnetwork.apply import...
#!/usr/bin/env python # # Copyright (C) 2013-2015 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 a...
#!/usr/bin/python # # Copyright (C) 2009 Google 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of...
""" 2.5D DC inversion of with Iterative Reweighted Least Squares ============================================================ This is an example for 2.5D DC Inversion with Iterative Reweighted Least Squares (IRLS). Earth includes a topography, and below the topography conductive and resistive cylinders are embedded. U...
# 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 ...
#!/usr/bin/python2 # Author: John Kennedy # Email: kissotdragon@gmail.com # Date: 04/26/2016 # # This is a derivative work from the stix_import.py script created by IBM-Security # # import sys, socket, os, types, collections, json, re, io, urllib2, dateutil, datetime, time, pytz #from IPython.Debugger import Tracer; ...
from __future__ import absolute_import import os import six import stat import uuid import logging import requests from requests.cookies import MockRequest from requests.exceptions import HTTPError from six import string_types, integer_types from six.moves.urllib.parse import urlparse from six.moves.http_cookiejar i...
# Copyright 2020 The HuggingFace Team. 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 applicabl...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
from datetime import datetime from distutils.version import StrictVersion from itertools import groupby from zipfile import ZipFile from couchdbkit.exceptions import BadValueError, ResourceNotFound from dimagi.ext.couchdbkit import * from corehq.apps.app_manager.const import APP_V2 from corehq.apps.builds.fixtures i...
#!/usr/bin/python # # Copyright (c) 2015, 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, # t...
import unittest import sys import _ast import types from test import support from test.support import check_impl_detail class TestSpecifics(unittest.TestCase): def compile_single(self, source): compile(source, "<single>", "single") def assertInvalidSingle(self, source): self.assertRaises(Synt...
import logging import numpy as np from smac.tae.execute_ta_run import ExecuteTARun from smac.tae.execute_ta_run_old import ExecuteTARunOld from smac.tae.execute_func import ExecuteTAFuncDict from smac.tae.execute_ta_run import StatusType from smac.stats.stats import Stats from smac.scenario.scenario import Scenario f...
# Copyright (c) 2013 Rackspace, 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...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
from __future__ import absolute_import, print_function import logging import six from django.conf import settings from django.db import IntegrityError, transaction from django.utils import timezone from django.utils.safestring import mark_safe from six.moves.urllib.parse import parse_qsl, urlencode, urlparse, urlunpa...
# Copyright 2014 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 ...
# Copyright (c) 2014 Alex Meade # Copyright (c) 2015 Yogesh Kshirsagar # Copyright (c) 2015 Michael Price # 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 # # ...
# -*- coding: utf-8 -*- """ static_file Static File """ from boto.s3 import connection from boto.s3 import key from boto import exception import base64 import json from trytond.config import config from trytond.model import fields from trytond.pyson import Eval, Bool from trytond.transaction import Transacti...
""" ============================ ``ctypes`` Utility Functions ============================ See Also --------- load_library : Load a C library. ndpointer : Array restype/argtype with verification. as_ctypes : Create a ctypes array from an ndarray. as_array : Create an ndarray from a ctypes array. References ----------...
################################################################################ # 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...
#!/usr/bin/env python # created my Massimo Di Pierro # license MIT/BSD/GPL import re import cgi import sys import doctest from optparse import OptionParser __all__ = ['render','markmin2latex'] META = 'META' regex_newlines = re.compile('(\n\r)|(\r\n)') regex_dd=re.compile('\$\$(?P<latex>.*?)\$\$') regex_code = re.comp...
"""Utilities for fast persistence of big data, with optional compression.""" # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import pickle import sys import io import zlib import gzip import bz2 import warnings import contextlib ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...