repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
deathping1994/treeherder
treeherder/etl/classification_mirroring.py
5
7140
import logging from datetime import datetime import requests import simplejson as json from django.conf import settings from treeherder.model.derived import ArtifactsModel, JobsModel logger = logging.getLogger(__name__) class ElasticsearchDocRequest(object): def __init__(self, project, job_id, bug_id, classif...
mpl-2.0
aweinstock314/aweinstock-ctf-writeups
northsec_2016/ping_management/ping_management_exploit.py
1
2357
#!/usr/bin/env python import requests import re import IPython #url = 'http://ping-management.marcusmadisonbakery.ctf/' url = 'http://ping-management.marcusmadisonbakery.ctf:3003/ping' def poke(ip): s = requests.session() r1 = s.get(url) auth = re.findall('id="authenticity_token" value="([^"]*)" />', r1.t...
agpl-3.0
tonybaloney/st2
st2common/st2common/exceptions/sensors.py
11
1264
# 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...
apache-2.0
simonwydooghe/ansible
test/units/modules/network/junos/test_junos_netconf.py
21
4220
# (c) 2017 Red Hat Inc. # # 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 dis...
gpl-3.0
robertobarreda/django-experiments
experiments/templatetags/experiments.py
1
3713
from __future__ import absolute_import from django import template from django.core.urlresolvers import reverse from experiments.utils import participant from experiments.manager import experiment_manager from experiments import conf from uuid import uuid4 register = template.Library() @register.inclusion_tag('ex...
mit
rgrover/mbed
tools/export/sw4stm32.py
7
5583
""" mbed SDK Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
apache-2.0
hakatashi/youtube-dl
youtube_dl/extractor/roxwel.py
73
1970
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unified_strdate, determine_ext class RoxwelIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?roxwel\.com/player/(?P<filename>.+?)(\.|\?|$)' _TEST = { 'url': 'http://www.roxwel.com/player/passi...
unlicense
rcharp/toyota-flask
venv/lib/python2.7/site-packages/flask/app.py
427
76782
# -*- coding: utf-8 -*- """ flask.app ~~~~~~~~~ This module implements the central WSGI application object. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from threading import Lock from datetime import timedelta from itertools import...
apache-2.0
megaumi/django
django/contrib/gis/gdal/prototypes/generation.py
349
4310
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_int64, c_void_p from functools import partial from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_const_string, check_errcode, check_geom, ...
bsd-3-clause
Bulochkin/tensorflow_pack
tensorflow/compiler/tests/dynamic_stitch_test.py
123
3401
# 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...
apache-2.0
tensorflow/transform
tensorflow_transform/beam/vocabulary_integration_test.py
1
60998
# coding=utf-8 # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
apache-2.0
cejsing/Softwareudvikling
GammelKode/cafeen/tests.py
2
42270
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cafeen.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) import datetime from django.utils import timezone from django.test i...
apache-2.0
sachintaware/sublime-wakatime
packages/wakatime/packages/pygments_py2/pygments/lexers/__init__.py
73
8735
# -*- coding: utf-8 -*- """ pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import types import fnmatch from os.path import basename from pygments.lexers._mapping ...
bsd-3-clause
sirkay/sony-msm8960
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
OptimusGitEtna/RestSymf
Python-3.4.2/Lib/test/lock_tests.py
80
27175
""" Various tests for synchronization primitives. """ import sys import time from _thread import start_new_thread, TIMEOUT_MAX import threading import unittest from test import support def _wait(): # A crude wait/yield function not relying on synchronization primitives. time.sleep(0.01) class Bunch(object)...
mit
ElessarWebb/dummy
src/dummy/viewer/formatting/plotformatters.py
1
2788
from dummy.viewer.formatting import ResultFormatter, Formatter import logging logger = logging.getLogger( __name__ ) try: import pylab import numpy @Formatter.register( 'plot' ) class PlotFormatter( ResultFormatter ): def __init__( self, *args, **kwargs ): super( PlotFormatter, self ).__init__( self, *args...
mit
40223236/2015examQ1
static/Brython3.1.1-20150328-091302/Lib/xml/dom/__init__.py
873
4019
"""W3C Document Object Model implementation for Python. The Python mapping of the Document Object Model is documented in the Python Library Reference in the section on the xml.dom package. This package contains the following modules: minidom -- A simple implementation of the Level 1 DOM with namespace sup...
gpl-3.0
Toshakins/wagtail
wagtail/wagtailadmin/views/home.py
1
3918
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.contrib.auth import get_user_model from django.db import connections from django.shortcuts import render from django.template.loader import render_to_string from wagtail.wagtailadmin.navigation import get_explorable_...
bsd-3-clause
rosmo/ansible
lib/ansible/modules/cloud/vmware/vca_fw.py
104
7967
#!/usr/bin/python # Copyright: (c) 2015, VMware, Inc. All Rights Reserved. # 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', ...
gpl-3.0
kbrebanov/ansible
lib/ansible/modules/system/aix_lvol.py
73
10444
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Alain Dejoux <adejoux@djouxtech.net> # 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',...
gpl-3.0
wilvk/ansible
lib/ansible/modules/cloud/amazon/ec2_vol_facts.py
20
3798
#!/usr/bin/python # Copyright: Ansible Project # 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': ['preview'], ...
gpl-3.0
google/clusterfuzz
src/python/tests/appengine/handlers/cron/manage_vms_test.py
1
40729
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
coderbone/SickRage-alt
lib/urllib3/_collections.py
51
10792
from __future__ import absolute_import try: from collections.abc import Mapping, MutableMapping except ImportError: from collections import Mapping, MutableMapping try: from threading import RLock except ImportError: # Platform-specific: No threads available class RLock: def __enter__(self): ...
gpl-3.0
chuukai/ponyo-kernel-nAa
arch/ia64/scripts/unwcheck.py
916
1718
#!/usr/bin/env python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthe...
gpl-2.0
compneuronmbu/NESTConnectionApp
nett_modules/python_modules/protobuf/google/protobuf/unittest_proto3_arena_pb2.py
30
57479
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/unittest_proto3_arena.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google...
gpl-2.0
DataDog/integrations-extras
lighthouse/tests/test_lighthouse.py
1
3661
import os import pytest from mock import MagicMock from datadog_checks.base.errors import CheckException from datadog_checks.lighthouse import LighthouseCheck HERE = os.path.dirname(os.path.abspath(__file__)) def mock_get_lighthouse_report(cmd, lgr, re=False): if "https" not in cmd[1]: return "", "erro...
bsd-3-clause
yinquan529/pandaboard
Documentation/target/tcm_mod_builder.py
3119
42754
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
Kalyzee/edx-platform
openedx/core/djangoapps/credit/signals.py
79
3915
""" This file contains receivers of course publication signals. """ import logging from django.dispatch import receiver from django.utils import timezone from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.signals.signals import GRADES_UPDATED from openedx.core.djangoapps.credit.verification_acce...
agpl-3.0
MediaKraken/MediaKraken_Deployment
source/database/db_base_sync.py
1
3911
""" Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful...
gpl-3.0
MinimalOS/external_chromium_org_third_party_skia
tools/misc_utils.py
95
1692
# Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Miscellaneous utilities.""" import re class ReSearch(object): """A collection of static methods for regexing things.""" @staticmethod def search_within_stream(input_stream...
bsd-3-clause
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_1_0_6/models/operationdefinition_tests.py
1
3076
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 on 2016-06-23. # 2016, SMART Health IT. import io import json import os import unittest from . import operationdefinition from .fhirdate import FHIRDate class OperationDefinitionTests(unittest.TestCase): def instantiate_from(sel...
bsd-3-clause
unaizalakain/django
django/template/backends/dummy.py
480
2037
# Since this package contains a "django" module, this is required on Python 2. from __future__ import absolute_import import errno import io import string from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template import Origin, TemplateDoesNotExist from django.utils...
bsd-3-clause
westerhofffl/google-appengine-wx-launcher
launcher/runtime.py
24
5759
#!/usr/bin/env python # # Copyright 2008 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...
apache-2.0
bright-sparks/chromium-spacewalk
third_party/jinja2/visitor.py
1401
3316
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
bsd-3-clause
neilLasrado/frappe
frappe/desk/doctype/event/test_event.py
9
4053
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """Use blog post test to test user permissions logic""" import frappe import frappe.defaults import unittest import json from frappe.desk.doctype.event.event import get_events f...
mit
denys-duchier/django
tests/serializers/test_natural.py
31
2658
from django.core import serializers from django.db import connection from django.test import TestCase from .models import FKDataNaturalKey, NaturalKeyAnchor from .tests import register_tests class NaturalKeySerializerTests(TestCase): pass def natural_key_serializer_test(format, self): # Create all the obje...
bsd-3-clause
lsqtongxin/django
django/contrib/admin/__init__.py
562
1243
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.decorators import register from django.contrib.admin.filters import ( AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter, DateFieldListFilter, Fiel...
bsd-3-clause
SUSE-Cloud/nova
nova/tests/api/openstack/compute/contrib/test_fixed_ips.py
27
7686
# Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
matthiasdiener/spack
lib/spack/docs/tutorial/examples/1.package.py
5
1759
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
rjhunter8285/nsc-cloudproject-s22016
prototype/api/FlaskApp/FlaskApp/python_modules/requests/packages/urllib3/util/request.py
780
2128
from __future__ import absolute_import from base64 import b64encode from ..packages.six import b ACCEPT_ENCODING = 'gzip,deflate' def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): """ Shortcuts for generatin...
apache-2.0
maxwellalive/YCDIVFX_MaxPlus
Examples/pyside_example.py
2
2724
import ctypes from PySide import QtGui, QtCore import MaxPlus def make_cylinder(): obj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Cylinder) obj.ParameterBlock.Radius.Value = 10.0 obj.ParameterBlock.Height.Value = 30.0 MaxPlus.Factory.CreateNode(obj) time = MaxPlus.Core.GetCurrentTime() ...
gpl-2.0
austindlawless/cudas
lambda/login/passlib/_setup/docdist.py
8
3109
"""custom command to build doc.zip file""" #============================================================================= # imports #============================================================================= # core import os from distutils import dir_util from distutils.cmd import Command from distutils.errors impor...
mit
ecrespo/django_kanban-agile
kanban/lib/python2.7/site-packages/django/utils/feedgenerator.py
104
16370
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title="Poynter E-Media Tidbits", ... link="http://www.poynter.org/column.asp?id=31", ... description="A group Weblog by the sharpes...
mit
jdinuncio/ansible-modules-extras
univention/udm_dns_zone.py
27
7625
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
gpl-3.0
nervous-laughter/qiime2
qiime2/core/type/primitive.py
2
12746
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
abevac/mitlocate-web
serverus/models.py
1
3768
from django.db import models from fields import MACAddressField class Building(models.Model): number = models.CharField(max_length=6) name = models.CharField(max_length=50,blank=True) def __unicode__(self): return self.name if self.name else "Building " + self.number class AP(models.Model): ...
mit
madhusudancs/test-infra
gubernator/third_party/cloudstorage/errors.py
147
3957
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
miloszz/DIRAC
ResourceStatusSystem/Client/Oldtest/Test_Clients.py
10
11312
#import unittest # #from DIRAC.Core.Base import Script #Script.parseCommandLine() # #from DIRAC.ResourceStatusSystem.Utilities.mock import Mock #from DIRAC.ResourceStatusSystem.Client.JobsClient import JobsClient #from DIRAC.ResourceStatusSystem.Client.PilotsClient import Pilo...
gpl-3.0
tibor95/phatch-python2.7
build/lib.linux-i686-2.7/phatch/actions/rank.py
4
11485
# Phatch - Photo Batch Processor # Copyright (C) 2007-2008 www.stani.be # # 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...
gpl-3.0
neuropil/boltons
boltons/formatutils.py
6
11243
# -*- coding: utf-8 -*- """`PEP 3101`_ introduced the :meth:`str.format` method, and what would later be called "new-style" string formatting. For the sake of explicit correctness, it is probably best to refer to Python's dual string formatting capabilities as *bracket-style* and *percent-style*. There is overlap, but ...
bsd-3-clause
Mitali-Sodhi/CodeLingo
Dataset/python/awsqueryservice.py
79
4434
import os import urlparse import boto import boto.connection import boto.jsonresponse import boto.exception import awsqueryrequest class NoCredentialsError(boto.exception.BotoClientError): def __init__(self): s = 'Unable to find credentials' boto.exception.BotoClientError.__init__(self, s) class ...
mit
bodi000/odoo
addons/hw_escpos/controllers/main.py
125
14043
# -*- coding: utf-8 -*- import commands import logging import simplejson import os import os.path import io import base64 import openerp import time import random import math import md5 import openerp.addons.hw_proxy.controllers.main as hw_proxy import pickle import re import subprocess import traceback from threading ...
agpl-3.0
Yukinoshita47/Yuki-Chan-The-Auto-Pentest
Module/metagoofil/hachoir_parser/container/swf.py
84
16477
""" SWF (Macromedia/Adobe Flash) file parser. Documentation: - Alexis' SWF Reference: http://www.m2osw.com/swf_alexref.html - http://www.half-serious.com/swf/format/ - http://www.anotherbigidea.com/javaswf/ - http://www.gnu.org/software/gnash/ Author: Victor Stinner Creation date: 29 october 2006 """ from ha...
mit
AthinaB/synnefo
snf-cyclades-app/synnefo/logic/management/commands/flavor-modify.py
9
2337
# Copyright (C) 2010-2014 GRNET S.A. # # 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 i...
gpl-3.0
aleksandra-tarkowska/django
django/utils/2to3_fixes/fix_unicode.py
349
1181
"""Fixer for __unicode__ methods. Uses the django.utils.encoding.python_2_unicode_compatible decorator. """ from __future__ import unicode_literals from lib2to3 import fixer_base from lib2to3.fixer_util import find_indentation, Name, syms, touch_import from lib2to3.pgen2 import token from lib2to3.pytree import Leaf,...
bsd-3-clause
xen0l/ansible
lib/ansible/modules/windows/win_region.py
52
3103
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Ansible, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMEN...
gpl-3.0
paulu/deepfeatinterp
render_movie.py
1
4264
#!/usr/bin/env python2 from __future__ import division from __future__ import with_statement from __future__ import print_function import time import numpy import deepmodels import json import os.path import argparse import subprocess import pipes import alignface import imageutils import utils if __name__=='__main_...
gpl-3.0
darren-rogan/CouchPotatoServer
libs/httplib2/iri2uri.py
885
3850
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
gpl-3.0
kmoocdev2/edx-platform
common/djangoapps/student/tests/test_enrollment.py
9
14818
""" Tests for student enrollment. """ import unittest import ddt from django.conf import settings from django.urls import reverse from mock import patch from nose.plugins.attrib import attr from course_modes.models import CourseMode from course_modes.tests.factories import CourseModeFactory from openedx.core.djangoap...
agpl-3.0
chriscrosscutler/scikit-image
doc/ext/plot_directive.py
89
20530
""" A special directive for generating a matplotlib plot. .. warning:: This is a hacked version of plot_directive.py from Matplotlib. It's very much subject to change! Usage ----- Can be used like this:: .. plot:: examples/example.py .. plot:: import matplotlib.pyplot as plt plt.plot...
bsd-3-clause
nriley/NewsBlur
vendor/yaml/resolver.py
474
8972
__all__ = ['BaseResolver', 'Resolver'] from error import * from nodes import * import re class ResolverError(YAMLError): pass class BaseResolver(object): DEFAULT_SCALAR_TAG = u'tag:yaml.org,2002:str' DEFAULT_SEQUENCE_TAG = u'tag:yaml.org,2002:seq' DEFAULT_MAPPING_TAG = u'tag:yaml.org,2002:map' ...
mit
kemalakyol48/python-for-android
python-modules/twisted/twisted/trial/test/erroneous.py
59
3209
# -*- test-case-name: twisted.trial.test.test_tests -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest, util from twisted.internet import reactor, protocol, defer class FoolishError(Exception): pass class TestFailureInSetUp(unittest.TestCase...
apache-2.0
dataxu/ansible
lib/ansible/module_utils/facts/hardware/freebsd.py
101
7355
# 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 in the hope that ...
gpl-3.0
peterlauri/django
django/conf/locale/nl/formats.py
504
4472
# -*- 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 = 'j F Y' # '20 ja...
bsd-3-clause
wengyian/project-manager-system
node_modules/.3.6.0@node-gyp/gyp/pylib/gyp/generator/ninja.py
1284
100329
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
mit
pfmk/folsom
morello/migrations/0006_auto__add_field_client_immigration_status.py
1
6796
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Client.immigration_status' db.add_column('morello_client', 'immigration_status', ...
gpl-2.0
ChanduERP/odoo
addons/base_import/__openerp__.py
317
1227
{ 'name': 'Base import', 'description': """ New extensible file import for OpenERP ====================================== Re-implement openerp's file import system: * Server side, the previous system forces most of the logic into the client which duplicates the effort (between clients), makes the import s...
agpl-3.0
yannickcr/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/mailru.py
7
2068
# encoding: utf-8 from __future__ import unicode_literals import re import datetime from .common import InfoExtractor class MailRuIE(InfoExtractor): IE_NAME = 'mailru' IE_DESC = 'Видео@Mail.Ru' _VALID_URL = r'http://(?:www\.)?my\.mail\.ru/video/.*#video=/?(?P<id>[^/]+/[^/]+/[^/]+/\d+)' _TEST = { ...
gpl-3.0
ga7g08/sympy
sympy/functions/elementary/miscellaneous.py
38
17458
from __future__ import print_function, division from sympy.core import S, sympify from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.operations import LatticeOp, ShortCircuit from sympy.core.function import Application, Lambda, ArgumentIndexError from sympy.core.expr import Expr fro...
bsd-3-clause
sebdelsol/pyload
module/plugins/hoster/FlyFilesNet.py
1
1279
# -*- coding: utf-8 -*- import re from urllib import unquote from module.network.RequestFactory import getURL from module.plugins.internal.SimpleHoster import SimpleHoster class FlyFilesNet(SimpleHoster): __name__ = "FlyFilesNet" __type__ = "hoster" __version__ = "0.1" __pattern__ = r'http:/...
gpl-3.0
elingg/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/transformed_distribution_test.py
7
13831
# Copyright 2015 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...
apache-2.0
git001/openshift-ansible
roles/lib_openshift/src/lib/volume.py
64
2002
# pylint: skip-file # flake8: noqa class Volume(object): ''' Class to represent an openshift volume object''' volume_mounts_path = {"pod": "spec.containers[0].volumeMounts", "dc": "spec.template.spec.containers[0].volumeMounts", "rc": "spec.template.spec.co...
apache-2.0
mkey-mi/U9180_kernel
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
jjdmol/LOFAR
SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/propagator.py
1
7767
#!/usr/bin/env python # Copyright (C) 2015 # ASTRON (Netherlands Institute for Radio Astronomy) # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands # # This file is part of the LOFAR software suite. # The LOFAR software suite is free software: you can redistribute it # and/or modify it under the terms of the GNU General P...
gpl-3.0
tersmitten/ansible
lib/ansible/module_utils/network/f5/bigiq.py
59
5015
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os try: from library.module_utils.network.f5.common import F5B...
gpl-3.0
thodoris/djangoPharma
djangoPharma/env/Lib/site-packages/django/utils/http.py
10
16315
from __future__ import unicode_literals import base64 import calendar import datetime import re import sys import unicodedata import warnings from binascii import Error as BinasciiError from email.utils import formatdate from django.core.exceptions import TooManyFieldsSent from django.utils import six from django.uti...
apache-2.0
adazey/Muzez
libs/nltk/metrics/distance.py
1
6143
# Natural Language Toolkit: Distance Metrics # # Copyright (C) 2001-2016 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # Tom Lippincott <tom@cs.columbia.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # """ Distance Me...
gpl-3.0
timruffles/electron
script/upload-checksums.py
35
1775
#!/usr/bin/env python import argparse import hashlib import os import tempfile from lib.config import s3_config from lib.util import download, rm_rf, s3put DIST_URL = 'https://atom.io/download/atom-shell/' def main(): args = parse_args() url = DIST_URL + args.version + '/' directory, files = download_files...
mit
legalsylvain/OpenUpgrade
addons/report_webkit/webkit_report.py
19
17015
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # Contributor(s) : Florent Xicluna (Wingo SA) # # WARNING: This program as such is intended...
agpl-3.0
andreparrish/python-for-android
python3-alpha/python3-src/Lib/test/test_site.py
49
16063
"""Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. """ import unittest from test.support import run_unittest, TESTFN, EnvironmentVarGuard from test.support import captured_stderr import builtins import os import sys import re import encoding...
apache-2.0
jose36/plugin.video.Jmdl2
servers/nowdownload.py
44
2861
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para nowdownload # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core i...
apache-2.0
team-xue/xue
xue/bandexams/migrations/0001_initial.py
1
4513
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'BandExamResult' db.create_table('bandexams_bandexamresult', ( ('id...
bsd-3-clause
rajalokan/nova
nova/tests/functional/test_list_servers_ip_filter.py
2
5042
# Copyright 2017 IBM Corp. # # 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, s...
apache-2.0
40023255/-w16b_test
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py
738
49593
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def te...
agpl-3.0
dneiter/exabgp
qa/tests/datatype.py
6
2211
#!/usr/bin/env python # encoding: utf-8 """ data.py Created by Thomas Mangin on 2009-09-06. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import unittest from exabgp.configuration.environment import environment environment.setup('') # from exabgp.protocol.family import AFI # from exabgp.protocol.fa...
bsd-3-clause
oas89/iktomi
iktomi/utils/paginator.py
1
8823
# -*- coding: utf-8 -*- from . import cached_property import math, itertools from ..web.reverse import URL def full_page_range(pages_count, page): return range(1, pages_count+1) class FancyPageRange(object): '''Insures there are edge pages are shown at each edge and surround pages around current page.'...
mit
Cadasta/cadasta-platform
setup.py
1
3676
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup def get_pkg_from_git_url(link): """ Given a pip-compatible git-requirement, output a setup.py-compatible install requirement. 'git+https://github.com/user/pkg.git@branch' -> 'pkg' """ try: ...
agpl-3.0
wtl-zju/flask
flask/ctx.py
135
14576
# -*- coding: utf-8 -*- """ flask.ctx ~~~~~~~~~ Implements the objects required to keep the context. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import sys from functools import update_wrapper from werkzeug.excep...
bsd-3-clause
TOTVS/mdmpublic
python/elasticsearch_tool/check_es_gc_count.py
1
2973
#!/usr/bin/env python3 ##------------------------------------------------------------------- ## File: check_es_gc_count.py ## Author : Denny ## Description : List full gc count for all es nodes ## python check_es_gc_count.py --es_host 192.168.0.2 --max_full_gc 300 ## -- ## Created : <2018-03-20> ## Updated: Time-stam...
bsd-2-clause
chuckSMASH/batterystaple
batterystaple/__init__.py
1
4296
from __future__ import division import logging import os import random import time # Set up logger log = logging.getLogger(__name__) ch = logging.StreamHandler() log.addHandler(ch) # Word list file path info BASE_DIR = os.path.dirname(os.path.abspath(__file__)) WORD_LIST_FILENAME = 'word_list_en.txt' WORD_LIST_PATH ...
mit
jymannob/Sick-Beard
lib/enzyme/language.py
180
15146
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public Lice...
gpl-3.0
drglove/SickRage
sickbeard/name_parser/regexes.py
2
20361
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
gpl-3.0
huchoi/edx-platform
common/test/acceptance/tests/video/test_video_module.py
4
38380
# -*- coding: utf-8 -*- """ Acceptance tests for Video. """ import json from unittest import skipIf, skip import requests from box.test.flaky import flaky from ..helpers import UniqueCourseTest, is_youtube_available from ...pages.lms.video.video import VideoPage from ...pages.lms.tab_nav import TabNavPage from ...pag...
agpl-3.0
redhat-openstack/manila
manila/api/views/shares.py
1
4947
# Copyright 2013 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
Jionglun/-w16b_test
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/dummy/connection.py
707
3049
# # Analogue of `multiprocessing.connection` which uses queues instead of sockets # # multiprocessing/dummy/connection.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditi...
agpl-3.0
xmbcrios/xmbcrios.repository
plugin.video.gdrive/resources/lib/gSpreadsheets.py
7
23737
''' gdrive XBMC Plugin Copyright (C) 2013-2015 ddurdle 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. ...
gpl-2.0
maxyeg/beaker-notebook
plugin/ipythonPlugins/src/dist/python3/beaker_runtime3.py
5
18118
# Copyright 2014 TWO SIGMA OPEN SOURCE, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
Maistho/CouchPotatoServer
libs/requests/packages/urllib3/poolmanager.py
678
9406
import logging try: # Python 3 from urllib.parse import urljoin except ImportError: from urlparse import urljoin from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connectionpool import port_by_scheme from .exceptions import LocationValue...
gpl-3.0
NealJMD/Grinbox-server
model.py
1
1934
import web import time db = web.database(dbn='mysql', db='grinbox', user='root') def get_tokens(address): values = {'address': address} matches = db.select('tokens', vars=values, where='address=$address') if len(matches) > 0: return matches[0] return None def new_tokens(address, auth='', refresh=''): values = {...
gpl-3.0
altsen/diandiyun-platform
common/lib/xmodule/xmodule/modulestore/tests/test_location_mapper.py
6
19198
''' Created on Aug 5, 2013 @author: dmitchell ''' import unittest import uuid from xmodule.modulestore import Location from xmodule.modulestore.locator import BlockUsageLocator from xmodule.modulestore.exceptions import ItemNotFoundError, InvalidLocationError from xmodule.modulestore.loc_mapper_store import LocMapperS...
agpl-3.0