text stringlengths 475 200k |
|---|
"""The tests for the camera component."""
import asyncio
from unittest.mock import patch
import pytest
from homeassistant.setup import setup_component
from homeassistant.const import ATTR_ENTITY_PICTURE
import homeassistant.components.camera as camera
import homeassistant.components.http as http
from homeassistant.ex... |
import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... |
""" Python Character Mapping Codec cp874 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,inpu... |
#!/usr/bin/python
# (c) 2013, Paul Durivage <[EMAIL]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['prev... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from django.db import models
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from django.db.models.signals import pre_save
from scrapy.contrib.djangoitem import DjangoItem
from dynamic_scraper.models import Scraper, SchedulerRuntime
class... |
#!/usr/bin/env python
#
# Copyright 2011, 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... |
# Copyright (c) 2013 Boris Pavlovic ([EMAIL]).
# 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
#
# Un... |
# 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.
'''Imports event data obtained from the inspector's timeline.'''
import telemetry.timeline.slice as tracing_slice
import telemetry.timeline.thread as timelin... |
import types
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import DEncode, ThreadScheduler
from DIRAC.Core.Security import Properties
from DIRAC.Core.Base.ExecutorMindHandler import ExecutorMindHandler
from DIRAC.WorkloadManagementSystem.Client.JobState.JobState import JobState
from DIRAC.WorkloadManagement... |
"""
Pages in Django can are served up with custom HTTP headers containing useful
information about those pages -- namely, the content type and object ID.
This module contains utility functions for retrieving and doing interesting
things with these special "X-Headers" (so called because the HTTP spec demands
that custo... |
import time
import math
import sys
start = time.time()
w = dict()
w[1] = "one"
w[2] = "two"
w[3] = "three"
w[4] = "four"
w[5] = "five"
w[6] = "six"
w[7] = "seven"
w[8] = "eight"
w[9] = "nine"
w[10] = "ten"
w[11] = "eleven"
w[12] = "twelve"
w[13] = "thirteen"
w[14] = "fourteen"
w[15] = "fifteen"
... |
""" @todo """
from flask import render_template, request, flash, session, Blueprint, abort
from product.models import Product, Category
from cart.forms import AddToCartForm
from product.utils import get_or_404, first_or_abort, get_for_page, get_by_slug
from cart import ShoppingCart, SessionCart
Products = Blueprint('p... |
from unittest import TestCase
from vidutil.vidstream import Frame
import vidutil.vidanalyze as a
def _num_f(num):
f = Frame(type='P', key_frame=False, width=1, height=1,
coded_picture_number=num)
return f
class TestSplitFramesMissing(TestCase):
def test_no_missing(self):
""" Verifi... |
##########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer [EMAIL]
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Lice... |
"""Heap data structure example
Copyright 2017, Sjors van Gelderen
"""
import random
"""Heap data structure
The 'max' property determines whether this is a max or min heap
"""
class Heap:
def __init__(self, property):
self.property = property
self.keys = []
def __repr__(self):
ret... |
r"""
Alignments and Sequence collections (:mod:`skbio.alignment`)
============================================================
.. currentmodule:: skbio.alignment
This module provides functionality for working with biological sequence
collections and alignments. These can be composed of generic sequences,
nucelotide s... |
#! /usr/bin/env python
"""Conversions to/from quoted-printable transport encoding as per RFC 1521."""
# (Dec 1991 version).
__all__ = ["encode", "decode", "encodestring", "decodestring"]
ESCAPE = '='
MAXLINESIZE = 76
HEX = '0123456789ABCDEF'
EMPTYSTRING = ''
try:
from binascii import a2b_qp, b2a_qp
except Impo... |
#!/usr/bin/env python
#encoding: utf8
import sys, rospy
from pimouse_ros.msg import LightSensorValues
def get_freq():
f = rospy.get_param('lightsensors_freq',10)
try:
if f <= 0.0:
raise Exception()
except:
rospy.logerr("value error: ligtsensors_freq")
sys.exit(1)... |
# -*- coding: utf-8 -*-
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
# non-exclusive licens... |
from system.core.controller import*
import random
import datetime
from time import strftime
class Ninja(Controller):
def __init__(self, action):
super(Ninja, self).__init__(action)
def index(self):
try:
session['gold']
except:
session['gold'] = 0
try:
... |
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import sys
from datetime import datetime
from subprocess import Popen, PIPE
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
import unittest2 as unittest
else:
import unittest
from .. import met... |
# -*- coding: utf-8 -*-
"""
flask
~~~~~
A microframework based on Werkzeug. It's extensively documented
and follows best practice patterns.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
__version__ = '0.10'
# utilities we import from Werkzeug and J... |
# 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... |
"""
.. todo::
WRITEME
"""
from pylearn2.datasets import utlc
import numpy as N
class Avicenna(object):
"""
.. todo::
WRITEME
Parameters
----------
which_set : WRITEME
standardize : WRITEME
"""
def __init__(self, which_set, standardize):
train, valid, test = utl... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright © 2013, IOhannes m zmölnig, IEM
# This file is part of WILMix
#
# 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; either version 2 of th... |
# coding: utf-8
from sqlalchemy.testing import eq_, is_
from sqlalchemy import *
from sqlalchemy.testing import fixtures, AssertsCompiledSQL
from sqlalchemy import testing
class IdiosyncrasyTest(fixtures.TestBase, AssertsCompiledSQL):
__only_on__ = 'mysql'
__backend__ = True
@testing.emits_warning()
... |
# supplies the 'copr' command.
#
# Copyright (C) 2014-2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is dis... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
DOCUMENTATION = """
---
module: kube
short_description: Manage Kubernetes Cluster
description:
- Create, replace, remove, and stop resources within a Kubernetes Cluster
version_added: "2.0"
options:
name:
required: false
default: null
description:
- The n... |
from __future__ import division, print_function, absolute_import
from os import path
from warnings import catch_warnings
DATA_PATH = path.join(path.dirname(__file__), 'data')
import numpy as np
from numpy.testing import (assert_equal, assert_array_equal, run_module_suite,
assert_)
from scipy.io.idl import reads... |
from __future__ import unicode_literals
import codecs
import datetime
from decimal import Decimal
import locale
import warnings
from django.utils.functional import Promise
from django.utils import six
from django.utils.six.moves.urllib.parse import quote
class DjangoUnicodeDecodeError(UnicodeDecodeError):
def __... |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... |
# -*- coding: utf-8 -*-
"""
***************************************************************************
ProcessingLog.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*************************... |
"""Tests for the PolynomialRing classes. """
from sympy.polys.domains import QQ, ZZ
from sympy.polys.polyerrors import ExactQuotientFailed, CoercionFailed, NotReversible
from sympy.abc import x, y
from sympy.utilities.pytest import raises
def test_build_order():
R = QQ.old_poly_ring(x, y, order=(("lex", x), ("... |
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest, frappe
from frappe.utils import flt
from erpnext.accounts.utils import get_actual_expense, BudgetError, get_fiscal_year
class TestJou... |
# Copyright 2014 The University of Edinburgh
#
# 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... |
# Author: Fred L. Drake, Jr.
# [EMAIL]
#
# This is a simple little module I wrote to make life easier. I didn't
# see anything quite like it in the library, though I may have overlooked
# something. I wrote this when I was trying to read some heavily nested
# tuples with fairly non-descriptive... |
from entity import Entity
class RelativeEntity(Entity):
def __init__(self, width, height):
Entity.__init__(self, width, height)
self.margin = [0, 0, 0, 0]
def below(self, entity):
self.y = entity.y + entity.height + self.margin[1]
def above(self, entity):
self.y = entity.y - self.height - self... |
"""
======================
SVM with custom kernel
======================
Simple usage of Support Vector Machines to classify a sample. It will
plot the decision surface and the support vectors.
"""
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
from sklearn import svm, datasets
# import some data... |
#!/usr/bin/env python
"""
@package ion.agents.platform.rsn.simulator.oms_events
@file ion/agents/platform/rsn/simulator/oms_events.py
@author Carlos Rueda
@brief OMS simulator event definitions and supporting functions.
Demo program included that allows to run both a listener server and a
notif... |
from abc import ABCMeta, abstractmethod
class PointMap(object):
""" Interface of mapping a point from one surface to another
(hence the 2 parameters)
"""
__metaclass__ = ABCMeta
@abstractmethod
def map(self, p1, p2):
""" map of point (p1, p2) from one surface to another """
... |
# Generated by Django 2.1 on 2019-07-29 13:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('djconnectwise', '0106_auto_20190722_1524'),
]
operations = [
migrations.AddField(
model_name='con... |
# 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... |
ASCENDING_ORDER = 1
DESCENDING_ORDER = 2
UNSPECIFIED_ORDER = 3
ORDER_VALUE_MAPPING = {
ASCENDING_ORDER : 'Ascending',
DESCENDING_ORDER : 'Descending',
UNSPECIFIED_ORDER : 'Default',
}
class SolutionModifier(object):
def __init__(self,orderClause=None,limitClause=None,offsetClause=None):
... |
#!/usr/bin/python
# Copyright 2015 Google Inc. All Rights Reserved.
#
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your o... |
# Tests for rich comparisons
import unittest
from test import test_support
import operator
class Number:
def __init__(self, x):
self.x = x
def __lt__(self, other):
return self.x < other
def __le__(self, other):
return self.x <= other
def __eq__(self, other):
return... |
# (c) 2012-2014, Michael DeHaan <[EMAIL]>
#
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your option) any later version.
... |
# coding=utf-8
# Copyright 2019 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... |
# GDB 'explore' command.
# Copyright (C) 2012-2014 Free Software Foundation, Inc.
# 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; either version 3 of the License, or
# (at your option) any late... |
# Copyright 2019 Fortinet, Inc.
#
# 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... |
###########################################################################
# Copyright 2017 ZT Prentner IT GmbH (www.ztp.at)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either ver... |
import re
import json
from ..common import get_content
from ..extractors import VideoExtractor
from ..util import log
from ..util.strings import unescape_html
__all__ = ['qq_egame_download']
class QQEgame(VideoExtractor):
stream_types = [
{'id': 'original', 'video_profile': '0', 'container': 'flv'},
... |
def rpad(s,l,pad_string=' '):
return s + (pad_string * (l - len(s)))
def asciitable(dicts,disp_cols=None,none_msg=None,border=True):
"""produce an ASCII formatted columnar table from the dicts"""
dicts = list(dicts)
if not dicts:
if none_msg is not None:
yield none_msg
retur... |
# -*- coding: utf-8 -*-
"""
***************************************************************************
GrassUtils.py
---------------------
Date : February 2015
Copyright : (C) 2014-2015 by Victor Olaya
Email : volayaf at gmail dot com
*********************... |
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
from Converter import Converter
from Poll import Poll
from enigma import iPlayableService
from Components.Element import cached, ElementError
from Components.config import config
class ServicePosition(Poll, Converter, object):
TYPE_LENGTH = 0
TYPE_POSITION = 1
TYPE_REMAINING = 2
TYPE_GAUGE = 3
TYPE_SUMMARY = 4
T... |
#!/usr/bin/env python
# Copyright (c) 2011 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.
"""Extracts registration forms from the corresponding HTML files.
Used for extracting forms within HTML files. This script is use... |
#
# tests/utils
#
"""
Useful functions for all tests
"""
import asyncio
import pytest
from growler.aio.http_protocol import GrowlerHTTPProtocol
import growler
def random_port():
from random import randint
return randint(1024, 2**16)
@asyncio.coroutine
def setup_test_server(unused_tcp_port, event_loop):
... |
"""Implementation of JSONDecoder
"""
from __future__ import absolute_import
import re
import sys
import struct
from .compat import fromhex, b, u, text_type, binary_type, PY3, unichr
from .scanner import make_scanner, JSONDecodeError
def _import_c_scanstring():
try:
from ._speedups import scanstring
... |
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import tensorflow as tf
from tensorflow.python.training import moving_averages
# masao
import cctf
#import tflearn
from .. import utils
from .. import variables as vs
def batch_normalization(incoming, beta=0.0, gamma=1.0, epsil... |
from __future__ import absolute_import
from __future__ import unicode_literals
import functools
import logging
import pprint
from itertools import chain
import six
def format_call(args, kwargs):
args = (repr(a) for a in args)
kwargs = ("{0!s}={1!r}".format(*item) for item in six.iteritems(kwargs))
retur... |
#!/usr/bin/env python3
# Copyright 2014 BitPay Inc.
# Copyright 2016-2017 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 framework for bitcoin utils.
Runs automatically during `make check`.
Ca... |
import sqlite3
import os
import sys
import getopt
import re
from collections import OrderedDict
def get_tperiods(inp_f):
file_ty = re.search(r"(\w+)\.(\w+)\b", inp_f) # Extract the input filename and extension
if not file_ty :
raise "The file type %s is not recognized." % inp_f
elif file_ty.group(2) not in (... |
import json
import time
from features.features_helpers import create_paths_for_cell_line
from features.uniprot_transmem import get_transmembrane_region_features
from features.uniprot_ptm import get_postranscriptional_modification_features
from features.uniprot_elm_read import get_uniprot_elm_features
from features.gene... |
"""Version 1.2 Image-handling functions
Almost all of the 1.2 enhancements are image-handling-related,
so this is, most of the 1.2 wrapper code...
Note that the functions that manually wrap certain operations are
guarded by if simple.functionName checks, so that you can use
if functionName to see if the function is a... |
"""
Javascript code printer
The JavascriptCodePrinter converts single sympy expressions into single
Javascript expressions, using the functions defined in the Javascript
Math object where possible.
"""
from __future__ import print_function, division
from sympy.core import S
from sympy.codegen.ast import Assignment
... |
from django.test import SimpleTestCase
from ..utils import setup
inheritance_templates = {
'inheritance01': "1{% block first %}&{% endblock %}3{% block second %}_{% endblock %}",
'inheritance02': "{% extends 'inheritance01' %}"
"{% block first %}2{% endblock %}{% block second %}4{% endblo... |
#!/usr/bin/python
import mock
import os
class VncTest(mock.TestCase):
def setUp(self):
self.setupModules(["_isys", "block", "logging", "ConfigParser"])
self.fs = mock.DiskIO()
import pyanaconda
pyanaconda.anaconda_log = mock.Mock()
self.OK = 22
import pyanaconda... |
# -*- coding: utf-8 -*-
# /#############################################################################
#
# Stephan Neuhausen.
# Copyright (C) 20014-TODAY Stephan Neuhausen iad.de.
#
# /#############################################################################
from datetime import date
from openerp import m... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2005-2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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; either version 2... |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
# -*- coding: utf-8 -*-
try:
# Python 2.7
from collections import OrderedDict
except:
# Python 2.6
from gluon.contrib.simplejson.ordered_dict import OrderedDict
from gluon import current
from gluon.storage import Storage
from s3.s3forms import S3SQLCustomForm, S3SQLInlineComponent, S3SQLInlineCompone... |
#!/usr/bin/python2.4
# Copyright (c) 2010 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.
"""A bare-bones and non-compliant XMPP server.
Just enough of the protocol is implemented to get it to work with
Chrome's sync noti... |
# -*- coding: utf-8 -*-
import scrapy
import json
from locations.items import GeojsonPointItem
class LifetimeFitnessSpider(scrapy.Spider):
name = "lifetimefitness"
allowed_domains = ['lifetime.life']
start_urls = (
'https://www.lifetime.life/view-all-locations.html',
)
def parse(self, res... |
# WebDriver specification ID: dfn-error-response-data
errors = {
"element click intercepted": 400,
"element not selectable": 400,
"element not interactable": 400,
"insecure certificate": 400,
"invalid argument": 400,
"invalid cookie domain": 400,
"invalid coordinates": 400,
"invalid elem... |
import django.utils.timezone
import model_utils.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('student', '0001_squashed_0031_auto_20200317_1122'),
]
operations = [
migrations.CreateModel(
name='Schedule',
... |
# -*- coding: utf-8 -*-
'''
Exodus Add-on
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, either version 3 of the License, or
(at your option) any later version.
This progra... |
from __future__ import unicode_literals
from django.core.exceptions import FieldError
from django.test import TestCase
from django.utils import six
from .models import (
Entry, Line, Post, RegressionModelSplit, SelfRefer, SelfReferChild,
SelfReferChildSibling, Tag, TagCollection, Worksheet,
)
class M2MRegre... |
# -*- coding: utf-8 -*-
###############################################################################
#
# Insert
# Adds a new media item to an album.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exce... |
#!/usr/bin/env python3
import itertools
import networkx as nx
from pgmpy.base import UndirectedGraph
class DirectedGraph(nx.DiGraph):
"""
Base class for all Directed Graphical Models.
Each node in the graph can represent either a random variable, `Factor`,
or a cluster of random variables. Edges i... |
from __future__ import unicode_literals
import json
import time
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class HypemIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?hypem\.com/track/(?P<id>[^/]+)/... |
#!/usr/bin/env python
import os
import sys
from starcluster.config import StarClusterConfig
print 'Simple wrapper script for s3fs (http://s3fs.googlecode.com/)'
cfg = StarClusterConfig().load()
ec2 = cfg.get_easy_ec2()
buckets = ec2.s3.get_buckets()
counter = 0
for bucket in buckets:
print "[%d] %s" % (counter,b... |
"""
Module for abstract serializer/unserializer base classes.
"""
from StringIO import StringIO
from django.db import models
from django.utils.encoding import smart_unicode
class SerializerDoesNotExist(KeyError):
"""The requested serializer was not found."""
pass
class SerializationError(Exception):
"""... |
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y. F j.'
TIME_FORMAT = 'G.i'
DATE... |
# -*- coding: utf-8 -*-
"""
flask.helpers
~~~~~~~~~~~~~
Implements various helpers.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import pkgutil
import posixpath
import mimetypes
from time import time
from zlib import adler32
from th... |
import unittest
import wikichatter.indentblock as indentblock
import wikichatter.mwparsermod as mwpm
EMPTY = "\n"
LEVEL0 = "Level 0\n"
LEVEL1 = ":Level 1\n"
LEVEL2 = "::Level 2\n"
LEVEL3 = ":::Level 3\n"
LEVEL4 = "::::Level 4\n"
LIST1 = "*Level 1\n"
LIST2 = "**Level 2\n"
LIST3 = "***Level 3\n"
LIST4 = "****Level 4\n... |
"""Tests for distutils.command.check."""
import unittest
from test.test_support import run_unittest
from distutils.command.check import check, HAS_DOCUTILS
from distutils.tests import support
from distutils.errors import DistutilsSetupError
class CheckTestCase(support.LoggingSilencer,
support.Temp... |
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# 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 co... |
"""
A Django command that exports a course to a tar.gz file.
If <filename> is '-', it pipes the file to stdout
"""
import os
import re
import shutil
import tarfile
from tempfile import mktemp, mkdtemp
from textwrap import dedent
from path import path
from django.core.management.base import BaseCommand, CommandErro... |
#-*- coding: utf-8 -*-
from django.http import HttpResponseForbidden, Http404, HttpResponse
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from accueil.models import Classe, Matiere, Colleur, Message, Dest... |
# -*- coding: utf-8 -*-
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class EuroshareEu(SimpleHoster):
__name__ = "EuroshareEu"
__type__ = "hoster"
__version__ = "0.30"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|... |
from .. import util
from . import util as source_util
machinery = util.import_importlib('importlib.machinery')
import codecs
import importlib.util
import re
import sys
import types
# Because sys.path gets essentially blanked, need to have unicodedata already
# imported for the parser to use.
import unicodedata
import... |
# Copyright (c) 2014 Dell Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
# Software License Agreement (BSD License)
#
# Copyright (c) 2013, Willow Garage, 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... |
#!/usr/bin/env python3
"""
FastQC - A quality control analysis tool for high throughput sequencing data
https://github.com/s-andrews/FastQC
"""
import os
import re
from paleomix.common.command import AtomicCmd, InputFile, OutputFile
from paleomix.common.versions import Requirement
from paleomix.node import CommandNod... |
# -*- coding: utf-8 -*-
"""
***************************************************************************
r_statistics.py
---------------
Date : September 2017
Copyright : (C) 2017 by Médéric Ribreux
Email : medspx at medspx dot fr
***************************... |
# vim: ts=4 sw=4 expandtab
import cgi
import os.path
import re
import unittest
_identifier = re.compile('^[A-Za-z_$][A-Za-z0-9_$]*$')
_contenttypes = (
'text/javascript',
'text/ecmascript',
'application/javascript',
'application/ecmascript',
'application/x-javascript',
)
class JSVersion:
def ... |
"""Extras for django-taggit
Includes:
- Handle tag namespaces (eg. tech:javascript, profile:interest:homebrewing)
TODO:
- Permissions for tag namespaces (eg. system:* is superuser-only)
- Machine tag assists
"""
from datetime import date, timedelta
from django.db import models
from django.db.models.fields import BLA... |
# Copyright (C) 2013, Daniel Narvaez
#
# 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed i... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from __future__ import absolute_import, print_function
from builtins import super # provi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.