gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" sentry.models.release ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import logging import re import six from django.db import models, IntegrityError, transac...
# -*- coding: utf-8 -*- import argparse import logging import os import re from .. import __version__ from ..config import ALLOWED_IMAGE_REGEXPS from ..config import ALLOWED_PORT_MAPPINGS from ..config import CAPS_ADD from ..config import CAPS_DROP from ..config import ENV_VARS from ..config import ENV_VARS_EXT from ...
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
from functools import partial from typing import Any, Optional from torchvision.prototype.transforms import ImageClassificationEval from torchvision.transforms.functional import InterpolationMode from ...models.vgg import VGG, make_layers, cfgs from ._api import WeightsEnum, Weights from ._meta import _IMAGENET_CATEG...
## # Copyright (c) 2008-2014 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
import json from django.utils import timezone from django.db import models from django.contrib.auth import login from django.contrib.auth.models import User from social_django.models import UserSocialAuth from ct.models import Role, Course from .utils import ( create_courselets_user, key_secret_generator, hash_lt...
#!/usr/bin/env python # # ESP8266 ROM Bootloader Utility # https://github.com/themadinventor/esptool # # Copyright (C) 2014 Fredrik Ahlberg # # 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 Software # Foundation; eith...
# # 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...
################################################################################ # Copyright (C) 2013-2015 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Unit tests for `gaussian` module. """ import warnings warnin...
# Copyright 2012 NetApp # 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 applic...
# -*- coding: utf-8 -*- # $File: recon.py # $Date: Wed Jan 07 19:54:08 2015 +0800 # $Author: jiakai <jia.kai66@gmail.com> from .config import floatX from .utils import plot_val_with_fft from .analyze import RawSpectrogram import numpy as np import matplotlib.pyplot as plt from scipy.signal import kaiserord, lfilter, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ###### SCHEDULERS # Configure the Schedulers, which decide how to react to incoming changes. from buildbot.schedulers.basic import AnyBranchScheduler, SingleBranchScheduler from buildbot.schedulers.forcesched import * from buildbot.schedulers.timed import Nightly from ...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket 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 applica...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ HTTP Proxy Server in Python. :copyright: (c) 2013 by Abhinav Singh. :license: BSD, see LICENSE for more details. """ VERSION = (0, 2) __version__ = '.'.join(map(str, VERSION[0:2])) __description__ = 'HTTP Proxy Server in Python' _...
# Copyright 2012, Intel, 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 agree...
__author__ = 'luissaguas' import frappe from frappe import _ from jasper_erpnext_report.utils.utils import jaspersession_get_value,get_expiry_in_seconds,\ get_jasper_data, get_jasper_session_expiry_seconds, getFrappeVersion from jasper_erpnext_report.utils.file import remove_directory #call from bench frappe --pyth...
import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, concat, ) import pandas._testing as tm class TestIndexConcat: def test_concat_ignore_index(self, sort): frame1 = DataFrame( {"test1": ["a", "b", "c"], "test2": [...
#! /usr/bin/python # -*- coding: utf8 -*- BOOK_ID = 0 CHAPTER_ID = 1 SENTENCE_ID = 2 TOKEN_ID = 3 HEAD_ID = 7 WORD = 8 NWORD = 10 POSTAG = 11 ENTITY = 12 SYNTAX = 13 CHARACTER_ID = 15 pos_tag_dict = {'``':0, ',':1, ':':2, '.':3, '\'\'':4, '$':5, '#':6, 'CC':7, 'CD':8, 'DT':9, 'EX':10, 'FW':11, 'IN':12, 'JJ':13, 'JJR':1...
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.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....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json, codecs, os, glob, time, dateutil.parser, collections, datetime, pickle, re, math import urllib.request, webbrowser import networkx as nx class communitystatic: @classmethod def from_txt(cls,filename,dataset_path_results,dataset_path_tmp): i...
#!/usr/bin/env python # # Appcelerator Titanium Module Packager # # import os, sys, glob, string import zipfile from datetime import date try: import json except: import simplejson as json cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) os.chdir(cwd) required_module_keys = ['name','versi...
""" Storage backend base class. """ import os import re import io import textwrap from contextlib import contextmanager from django import forms from django.conf import settings from . import registry from PIL import Image from cStringIO import StringIO class BaseConfigForm(forms.Form): """Base class for config...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services implementation based on Herald messaging and xmlrpclib :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.3 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the ...
"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re import warnings from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_str, force_text from django.utils.functional import allow_lazy from django...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.conf import settings from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Adding field ...
#!/usr/bin/python3 # Dragon Story by zb # A fantasy text adventure game where YOU are the dragon! import os import platform from console import * from player import * from item import * from event import * from room import * newgame = True # ---- begin restart loop ---- while newgame: # init console and player ...
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Linux platform implementation.""" from __future__ import division import base64 import errno import functools import os import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Sword York # GitHub: https://github.com/SwordYork/sequencing # No rights reserved. # import json import numpy import sequencing as sq import tensorflow as tf from sequencing import TIME_MAJOR, MODE, LinearOp from sequencing.utils.metrics import Delta_BLEU...
import logging import sys import os import vcf from sv_interval import SVInterval logger = logging.getLogger(__name__) mydir = os.path.dirname(os.path.realpath(__file__)) ''' From https://github.com/genome/breakdancer, the format is described as 1. Chromosome 1 2. Position 1 3. Orientation 1 4. Chromosome 2 5. Po...
# -*- coding: utf-8 -*- """ HTTP form processing for contest pages :copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved. :license: Apache, see LICENSE for more details. """ import re import flask import flask_wtf import wtforms import wtforms.validators as wtfv from ..debug import pp_t fr...
import array import struct import socket from odict import OrderedDict as OD class NLRI: def __init__(self, afi, safi, val): self.afi = afi self.safi = safi self.val = val def encode(self): return self.val class vpnv4(NLRI): def __init__(self, labels, rd, prefix): ...
default_sensors = "Ping,HTTP,Port,SNMPCustom,CPULoad,Memory,Diskspace,SNMPTraffic,CPUTemp,Probehealth,ExternalIP,ADNS,APT,NMAP,MDADM" #!/usr/bin/env python # Copyright (c) 2014, Paessler AG <support@paessler.com> # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, a...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# encoding: utf-8 """ The Base Application class for IPython.parallel apps """ import os import logging import re import sys from IPython.config.application import catch_config_error, LevelFormatter from IPython.core import release from IPython.core.crashhandler import CrashHandler from IPython.core.application impo...
""" Support for Yamaha Receivers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.yamaha/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_...
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
from __future__ import absolute_import, print_function, division import numpy as np import numpy import theano from theano.tests import unittest_tools as utt from theano.tensor.extra_ops import (SearchsortedOp, searchsorted, CumsumOp, cumsum, CumprodOp, cumprod, ...
# 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...
#!/usr/bin/env python3 # # Copyright (c) 2018-2019 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...
import datetime import os from django import forms from django.core import checks from django.core.files.base import File from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django.db.models import signals from django.db.models.fields import Field from django.utils...
""" define extension dtypes """ import re import numpy as np from pandas import compat from pandas.core.dtypes.generic import ABCIndexClass, ABCCategoricalIndex class ExtensionDtype(object): """ A np.dtype duck-typed class, suitable for holding a custom dtype. THIS IS NOT A REAL NUMPY DTYPE """ ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import os import pandas import numpy from biomart_client import BiomartClient from genome_browser_client import GenomeBrowserClient import chrom_tool as CT from allele_tool import flip_allele, build_allele_freq_map def __read_id(src): if not os.path.isfile(src): raise OSError(src + " not found.") rsi...
''' Richards ''' # based on a Java version: # Based on original version written in BCPL by Dr Martin Richards # in 1981 at Cambridge University Computer Laboratory, England # and a C++ version derived from a Smalltalk version written by # L Peter Deutsch. # Java version: Copyright (C) 1995 Sun Microsystems, Inc....
# base.py - the base classes etc. for a Python interface to bugzilla # # Copyright (C) 2007, 2008, 2009, 2010 Red Hat Inc. # Author: Will Woods <wwoods@redhat.com> # # 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 S...
""" Definition and registration of display hooks for the IPython Notebook. """ from functools import wraps from contextlib import contextmanager import os, sys, traceback import IPython from IPython import get_ipython from IPython.display import HTML import holoviews from ..core.options import (Store, StoreOptions, ...
# -*- coding: utf-8 -*- # pylint: disable=W0102 import nose import numpy as np from pandas import Index, MultiIndex, DataFrame, Series, Categorical from pandas.compat import OrderedDict, lrange from pandas.sparse.array import SparseArray from pandas.core.internals import * import pandas.core.internals as internals im...
#------------------------------------------------------------------------------- # bob: bytecode.py # # Bytecode objects and utilities for the Bob VM. # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #------------------------------------------------------------------------------- from __future__...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from six im...
import copy from functools import cmp_to_key import logging from PIL import Image from StringIO import StringIO from couchdbkit import BadValueError import sys from datetime import date, datetime from casexml.apps.case import const from casexml.apps.case.const import CASE_ACTION_COMMTRACK from casexml.apps.case.excepti...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with t...
"""The tests for Climate device conditions.""" import pytest import voluptuous_serialize import homeassistant.components.automation as automation from homeassistant.components.climate import DOMAIN, const, device_condition from homeassistant.helpers import config_validation as cv, device_registry from homeassistant.se...
"""SCons.Tool.Packaging SCons Packaging Tool. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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 Softwa...
# 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...
import numpy as np from fuel.transformers import Transformer from fuel.streams import DataStream from fuel.schemes import SequentialScheme, ShuffledScheme from random import shuffle from deepmonster import config floatX = config.floatX class DefaultTransformer(Transformer): def __init__(self, *args, **kwargs): ...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
import json import traceback from typing import Dict, cast import ansible_runner import demistomock as demisto # noqa: F401 import ssh_agent_setup from CommonServerPython import * # noqa: F401 # Dict to Markdown Converter adapted from https://github.com/PolBaladas/torsimany/ def dict2md(json_block, depth=0): m...
# Copyright (c) 2017 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. """Presubmit script for Android Java code. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presub...
# -*- coding: utf-8 -*- from datetime import timedelta from openprocurement.auctions.core.utils import get_now # AuctionContractResourceTest def patch_auction_contract(self): response = self.app.get('/auctions/{}/contracts'.format(self.auction_id)) contract = response.json['data'][0] response = self.ap...
#!/usr/bin/env python """Tests for grr.lib.client_index.""" from grr.lib import aff4 from grr.lib import client_index from grr.lib import flags from grr.lib import test_lib from grr.lib import utils from grr.lib.aff4_objects import aff4_grr from grr.lib.rdfvalues import client as rdf_client CLIENT_ID = "C.00aaeccbb4...
class SystemStats(object): def __init__(self): self.uptime = 0. self.uptime_idle = 0. self.one_minute_load = 0. self.five_minute_load = 9. self.fifteen_minute_load = 0. self.running_threads = 0 self.total_threads = 0 self.last_pid = 0 self.vmst...
import urwid from todoman import widgets _palette = [ ('error', 'light red', '') ] class TodoEditor: """ The UI for a single todo entry. """ def __init__(self, todo, lists, formatter): """ :param model.Todo todo: The todo object which will be edited. """ self.cur...
# d2b.py # # Decimal to byte(s) and character/string to byte(s) converter. # Any decimal number from 0 to 255 converted to b"\x??" format. # Any standard ASCII string, something like "\x00Some String.\xFF" converted # to b"\x00Some String.\xff". NOTE:- "FF" is displayed as "ff" on conversion # but the end result is the...
""" Expressions ----------- Offer fast expression evaluation through numexpr """ from __future__ import annotations import operator import warnings import numpy as np from pandas._config import get_option from pandas._typing import FuncType from pandas.core.computation.check import NUMEXPR_INSTALLED from pandas....
# 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 from cryptography import utils from cryptography.exceptions import Invali...
# 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...
"""distutils.mwerkscompiler Contains MWerksCompiler, an implementation of the abstract CCompiler class for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on Windows.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys, os, string from types import * from d...
#!/usr/bin/env python3 # import os import sys import time import os import subprocess from PyQt5.QtCore import * from PyQt5.QtGui import * from gui_argument import * class mainTab(argumentTab): layoutNumberRows = 10 layoutNumberColumns = 4 def __init__(self, aff3ctRoot, aff3ctBinary, simUpdateCallFunction, r...
# 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 -*- """ Page template data types definitions. Here are defined custom data types with it's corresponding behavior to interact with the CMS. Project models can be added and will work in a raw_id way. """ from django.conf import settings from django.core.urlresolvers import reverse from django.db impo...
import sys, platform import moderngl import numpy as np import wx, math import wx.glcanvas as glcanvas from .manager import * import os.path as osp from wx.lib.pubsub import pub from .util import * class Canvas3D(glcanvas.GLCanvas): def __init__(self, parent, manager=None): attribList = attribs = (glcanvas...
#!/usr/bin/env python2 # Shamelessly ripped POC from https://gist.github.com/takeshixx/10107280 # CVE-2014-0160 import sys import struct import socket import time import select import re import argparse try: import netaddr except ImportError: print "netaddr required. Install with \"pip install netaddr\"" ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
import math from kraken.core.maths import Vec3 from kraken.core.maths import Math_degToRad from kraken.core.maths.quat import Quat from kraken.core.maths.xfo import Xfo from kraken.core.maths.xfo import xfoFromDirAndUpV from kraken.core.objects.components.base_example_component import BaseExampleComponent from krake...
#!/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. """Flattens a HTML file by inlining its external resources. This is a small script that takes a HTML file, looks for src attribute...
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
""" CISCO_ETHERLIKE_EXT_MIB The MIB module to describe generic objects for ethernet\-like network interfaces. This MIB provides ethernet\-like network interfaces information that are either excluded by EtherLike\-MIB or specific to Cisco products. """ import re import collections from enum import Enum from y...
from __future__ import absolute_import from __future__ import with_statement from mock import patch from kombu import Connection, Exchange from kombu import compat from .mocks import Transport, Channel from .utils import TestCase from .utils import Mock class test_misc(TestCase): def test_iterconsume(self): ...
from flask_sqlalchemy import BaseQuery from sqlalchemy_searchable import SearchQueryMixin from sqlalchemy_utils.types import TSVectorType from lfcsapp import db #phd supervisor table supervising_table = db.Table('supervising_table', db.Column('staff', db.Integer, db.ForeignKey('staff.id')), db.Column('phd', db...
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/...
from collections import OrderedDict import re #------------------------ # shared variables: #------------------------ words = OrderedDict() outputFilename = 'output.txt' filename1 = 'data.txt' allophones = { 'aeiou' : 'a', 'bp' : 'b', 'cjsz' : 'z', 'dt' : 'd', 'fv' : 'v', 'gkq' : 'g', '...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
'''Label ===== .. image:: images/label.png :align: right The :class:`Label` widget is for rendering text. It supports ascii and unicode strings:: # hello world text l = Label(text='Hello world') # unicode text; can only display glyphs that are available in the font l = Label(text=u'Hello world '...
# # Copyright (c) 2017 Intel Corporation # SPDX-License-Identifier: BSD-2-Clause # import copy import numpy as np from llvmlite import ir as lir from numba.core import types, typing, utils, ir, config, ir_utils, registry from numba.core.typing.templates import (CallableTemplate, signature, ...
# 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 agreed to in writing, ...
"""WSGI App Creator This module is responsible for creating the basic Pylons WSGI application. It's generally assumed that it will be called by Paste, though any WSGI application server could create and call the WSGI app as well. """ import gettext import inspect import logging import sys import warnings import past...
""" test the scalar Timedelta """ import pytest import numpy as np from datetime import timedelta import pandas as pd import pandas.util.testing as tm from pandas.core.tools.timedeltas import _coerce_scalar_to_timedelta_type as ct from pandas import (Timedelta, TimedeltaIndex, timedelta_range, Series, ...
# Copyright 2014-2020 Scalyr 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 writin...
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
"Nested Sets" import operator from django.db.models import Q from django.core import serializers from django.db import models, transaction, connection from treebeard.models import Node from treebeard.exceptions import InvalidMoveToDescendant try: from johnny.cache import invalidate INVALIDATE_JOHNNY = True ...
# 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, software # 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...
# SkeletonIRC import sys import logging import string import re import os import types import time import signal import socket from datetime import datetime from itertools import islice from simple_rpcserver import SimpleRPC import logos.utils from copy import copy from logos.roomlib import get_room_option, set_room_...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the REST API.""" import binascii from decimal import Decimal from enum import Enum from io import...
# 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...
# Copyright (c) 2015 Intel Corporation # # 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 ...
# -*- coding: utf-8 -*- # # 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, software ...
# -*- coding: utf-8 -*- """ Basic HTTP access interface. This module handles communication between the bot and the HTTP threads. This module is responsible for - Setting up a connection pool - Providing a (blocking) interface for HTTP requests - Translate site objects with query strings into URLs - UR...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # Copyright (C) 2006 Alec Thomas # Copyright (C) 2007 Eli Carter # Copyright (C) 2007 Christian Boos <cboos@edgewall.org> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...