repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
shakamunyi/neutron-dvr
refs/heads/master
neutron/tests/unit/ml2/test_ml2_plugin.py
1
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
sinhrks/scikit-learn
refs/heads/master
sklearn/ensemble/gradient_boosting.py
18
"""Gradient Boosted Regression Trees This module contains methods for fitting gradient boosted regression trees for both classification and regression. The module structure is the following: - The ``BaseGradientBoosting`` base class implements a common ``fit`` method for all the estimators in the module. Regressio...
ressu/SickGear
refs/heads/master
lib/guessit/hash_ed2k.py
21
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free...
111pontes/ydk-py
refs/heads/master
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_infra_rcmd_oper.py
1
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
raskolnikova/infomaps
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
1446
#!/usr/bin/env python # Copyright (c) 2012 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. """Unit tests for the MSVSSettings.py file.""" import StringIO import unittest import gyp.MSVSSettings as MSVSSettings class TestSequence...
Dhivyap/ansible
refs/heads/devel
test/units/modules/network/icx/test_icx_interface.py
21
# Copyright: (c) 2019, 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 from units.compat.mock import patch from ansible.modules.network.icx import icx_interface from units...
wido/cloudstack
refs/heads/master
test/integration/component/test_VirtualRouter_alerts.py
4
# 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...
jesonyang001/qarepo
refs/heads/master
askbot/migrations/0155_remove_unused_internal_tags.py
16
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." print 'Deleting unused tags added for internal bookkeeping...' tags =...
GeoODK/onadata
refs/heads/master
onadata/apps/main/tests/test_http_auth.py
13
from django.core.urlresolvers import reverse from onadata.apps.main.tests.test_base import TestBase from onadata.apps.main import views class TestBasicHttpAuthentication(TestBase): def setUp(self): TestBase.setUp(self) self._create_user_and_login(username='bob', password='bob') self._pub...
caebr/webisoder
refs/heads/master
webisoder/resources.py
2
from pyramid.security import Allow, Authenticated class Root(object): __acl__ = [ (Allow, Authenticated, 'view'), (Allow, 'Token', 'token') ] def __init__(self, request): pass
eightbitraptor/CompStats
refs/heads/master
thinkstats2.py
3
"""This file contains code for use with "Think Stats" and "Think Bayes", both by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division """This file contains class definitions for: H...
abreen/socrates.py
refs/heads/master
yaml/serializer.py
293
__all__ = ['Serializer', 'SerializerError'] from .error import YAMLError from .events import * from .nodes import * class SerializerError(YAMLError): pass class Serializer: ANCHOR_TEMPLATE = 'id%03d' def __init__(self, encoding=None, explicit_start=None, explicit_end=None, version=None, ta...
RitwikGupta/pattern
refs/heads/master
examples/02-db/01-database.py
21
# -*- coding: utf-8 -*- import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.db import Database, SQLITE, MYSQL from pattern.db import field, pk, STRING, INTEGER, DATE, NOW from pattern.db import assoc from pattern.db import rel from pattern.db import pd # pd() = parent d...
goinnn/deldichoalhecho
refs/heads/master
ddah_web/migrations/0006_ddahinstanceweb_style.py
4
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import picklefield.fields class Migration(migrations.Migration): dependencies = [ ('ddah_web', '0005_ddahinstanceweb_contact'), ] operations = [ migrations.AddField( mode...
helixyte/tractor
refs/heads/master
setup.py
1
""" This file is part of the everest project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Package setup file. Created on Nov 3, 2011. """ import os from distribute_setup import use_setuptools use_setuptools() from setuptools import setup from setuptools import find_packages here =...
empaket/plugin.video.live.proyectoluzdigital1
refs/heads/master
_verdirect .py
1
import urllib,base64 import os,xbmc,xbmcaddon,xbmcgui,re,xbmcplugin,sys #from resources.lib import commonmyFunctions as cmyFun import commonmyFunctions as cmyFun from bs4 import BeautifulSoup addon = xbmcaddon.Addon('plugin.video.live.proyectoluzdigital') profile = xbmc.translatePath(addon.getAddonInfo('profile').decod...
jahrome/viper
refs/heads/master
modules/pymacho/MachOEncryptionInfoCommand.py
3
# encoding: utf-8 """ Copyright 2013 Jérémie BOUTOILLE 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 distri...
krafczyk/spack
refs/heads/develop
var/spack/repos/builtin/packages/r-genomicranges/package.py
2
############################################################################## # 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...
geektophe/shinken
refs/heads/master
test/test_create_link_from_ext_cmd.py
18
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken 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 F...
ianmiell/OLD-shutitdist
refs/heads/master
docbook/docbook.py
1
"""ShutIt module. See http://shutit.tk/ """ from shutit_module import ShutItModule class docbook(ShutItModule): def is_installed(self, shutit): return False def build(self, shutit): shutit.send('mkdir -p /tmp/build/docbook') shutit.send('cd /tmp/build/docbook') version = shutit.cfg[self.module_id]['ver...
jhutar/GreenTea
refs/heads/master
apps/waiver/models.py
2
#!/bin/python # -*- coding: utf-8 -*- # Author: Pavel Studenik <pstudeni@redhat.com> # Date: 2013-2015 from django.db import models from apps.core.models import Job, Recipe, Task, Test from django.utils import timezone class Comment(models.Model): ENUM_ACTION_NONE = 0 ENUM_ACTION_WAIVED = 1 ENUM_ACTION_...
Nhoya/telegram_lamebuster
refs/heads/master
config.py
1
TOKEN=''
EricSekyere/airmozilla
refs/heads/master
airmozilla/cronlogger/migrations/__init__.py
12133432
sunsrising/xnhb
refs/heads/master
qa/rpc-tests/bip68-sequence.py
8
#!/usr/bin/env python2 # Copyright (c) 2014-2015 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 BIP68 implementation # from test_framework.test_framework import BitcoinTestFramework from test...
ReachingOut/unisubs
refs/heads/staging
apps/videos/migrations/0155_auto__chg_field_subtitlelanguage_new_subtitle_language__add_unique_sub.py
5
# 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): # Changing field 'SubtitleLanguage.new_subtitle_language' db.alter_column('videos_subtitlelanguage', 'new_subtitle...
CodeMath/jinrockets
refs/heads/master
BluePrint/lib/wtforms/ext/appengine/db.py
228
""" Form generation utilities for App Engine's ``db.Model`` class. The goal of ``model_form()`` is to provide a clean, explicit and predictable way to create forms based on ``db.Model`` classes. No malabarism or black magic should be necessary to generate a form for models, and to add custom non-model related fields: ...
python-hyper/hyper-h2
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys from setuptools import setup, find_packages PROJECT_ROOT = os.path.dirname(__file__) with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_: long_description = file_.read() # Get the version version_regex = r'__version__ = ["\'](...
akarol/cfme_tests
refs/heads/master
cfme/common/__init__.py
1
# -*- coding: utf-8 -*- from navmazing import NavigateToSibling from widgetastic.exceptions import NoSuchElementException, RowNotFound from widgetastic_patternfly import BootstrapSelect, Button, CheckableBootstrapTreeview from widgetastic.widget import Table, Text, View from cfme.base.login import BaseLoggedInPage fro...
nischu7/paramiko
refs/heads/master
demos/demo.py
1
#!/usr/bin/env python # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2....
ver228/tierpsy-tracker
refs/heads/master
tierpsy/helper/misc/misc.py
1
import shutil import sys import os import tables import warnings from threading import Thread from queue import Queue, Empty from tierpsy import AUX_FILES_DIR # get the correct path for ffmpeg. First we look in the aux # directory, otherwise we look in the system path. def get_local_or_sys_path(file_name): file_...
tldavies/RackHD
refs/heads/master
test/tests/rackhd20/test_rackhd20_api_catalogs.py
1
''' Copyright 2016, EMC, Inc. Author(s): George Paulos ''' import os import sys import subprocess sys.path.append(subprocess.check_output("git rev-parse --show-toplevel", shell=True).rstrip("\n") + "/test/common") import fit_common # Local methods NODECATALOG = fit_common.node_select() # Select test group here us...
redbo/swift
refs/heads/master
swift/container/sync.py
6
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
nuclear-wizard/moose
refs/heads/devel
python/peacock/Input/ParamsByType.py
15
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html from PyQt5....
Chilledheart/depot_tools
refs/heads/master
third_party/gsutil/gslib/commands/chacl.py
50
# Copyright 2013 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 a...
jburel/openmicroscopy
refs/heads/develop_merge_trigger
components/tools/OmeroFS/src/fsWin-XP-Monitor.py
15
#!/usr/bin/env python # -*- coding: utf-8 -*- """ OMERO.fs Monitor module for Window XP. Copyright 2009 University of Dundee. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import logging import threading import os import time # Third party path package. It provides much...
patricmutwiri/pombola
refs/heads/master
pombola/projects/migrations/0001_initial.py
5
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("core", "0024_auto__add_field_positiontitle_requires_place"), ) def forwards(self, orm): # Adding mode...
seler/djoauth2
refs/heads/master
djoauth2/tests/abstractions.py
3
# coding: utf-8 import json from base64 import b64encode from hashlib import md5 from random import random from django.conf import settings from django.contrib.auth.models import User from django.test import Client as TestClient from django.test import TestCase from django.test.client import RequestFactory from djoau...
DataONEorg/d1Login
refs/heads/master
d1_certificate/__init__.py
1
''' grid_shib: helper for downloading client certificate from CILogon ''' import os import time import logging import webbrowser from . import grid_shib from .certinfo import * LOGIN_SERVICE = { 'production':'https://cilogon.org/?skin=dataone', 'stage':'https://cilogon.org/?skin=dataonestage', 'stage-2':'http...
kittiu/odoo
refs/heads/8.0
openerp/cli/__init__.py
185
import logging import sys import os import openerp from openerp import tools from openerp.modules import module _logger = logging.getLogger(__name__) commands = {} class CommandType(type): def __init__(cls, name, bases, attrs): super(CommandType, cls).__init__(name, bases, attrs) name = getattr(...
denny820909/builder
refs/heads/master
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/_signals.py
25
# -*- test-case-name: twisted.test.test_process,twisted.internet.test.test_process -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module provides a uniform interface to the several mechanisms which are possibly available for dealing with signals. This module is used to integrate ...
insiderr/insiderr-app
refs/heads/master
ios-patches/basemodules/twisted/trial/test/suppression.py
35
# -*- test-case-name: twisted.trial.test.test_tests -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases used to make sure that warning supression works at the module, method, and class levels. See the L{twisted.trial.test.test_tests} module docstring for details about how this c...
40223150/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/formatter.py
751
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
vijayanandnandam/youtube-dl
refs/heads/master
youtube_dl/extractor/spankwire.py
53
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( sanitized_Request, str_to_int, unified_strdate, ) from ..aes import aes_decrypt_text class SpankwireIE(Inf...
herilalaina/scikit-learn
refs/heads/master
examples/plot_anomaly_comparison.py
17
""" ============================================================================ Comparing anomaly detection algorithms for outlier detection on toy datasets ============================================================================ This example shows characteristics of different anomaly detection algorithms on 2D d...
Laeeth/stanford-corenlp-python
refs/heads/master
setup.py
4
import sys from setuptools import setup, find_packages PACKAGE = "corenlp" NAME = "stanford-corenlp-python" DESCRIPTION = "A Stanford Core NLP wrapper (wordseer fork)" AUTHOR = "Hiroyoshi Komatsu, Dustin Smith, Aditi Muralidharan, Ian MacFarland" AUTHOR_EMAIL = "aditi.shrikumar@gmail.com" URL = "https://github.com/Wor...
chanul13/django-basic-apps
refs/heads/master
setup.py
8
import os from distutils.core import setup def fullsplit(path, result=None): """ Split a pathname into components (the opposite of os.path.join) in a platform-neutral way. """ if result is None: result = [] head, tail = os.path.split(path) if head == "": return [tail] + res...
xmission/d-note
refs/heads/master
venv/lib/python2.7/site-packages/requests/packages/urllib3/contrib/__init__.py
12133432
350dotorg/Django
refs/heads/master
django/conf/locale/lt/__init__.py
12133432
ajufrancis/neutronmap
refs/heads/master
neutronmap/tests/__init__.py
12133432
nangia/django-allauth
refs/heads/master
allauth/socialaccount/providers/hubic/__init__.py
12133432
ic-hep/DIRAC
refs/heads/rel-v6r15
RequestManagementSystem/Agent/RequestOperations/ForwardDISET.py
3
######################################################################## # $HeadURL $ # File: ForwardDISET.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2013/03/22 12:40:06 ######################################################################## """ :mod: ForwardDISET ================== .. module: Forwar...
letsencrypt/letsencrypt
refs/heads/master
certbot-dns-nsone/docs/conf.py
3
# -*- coding: utf-8 -*- # # certbot-dns-nsone documentation build configuration file, created by # sphinx-quickstart on Wed May 10 18:30:40 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated f...
linktlh/Toontown-journey
refs/heads/master
toontown/dna/DNAGroup.py
3
from panda3d.core import PandaNode import DNAUtil class DNAGroup: COMPONENT_CODE = 1 def __init__(self, name): self.name = name self.children = [] self.parent = None self.visGroup = None def add(self, child): self.children += [child] def remove(self, child): ...
matheuskiser/pdx_code_guild
refs/heads/master
python/to_to_app/utils.py
1
import datetime class Utils(object): # Convert argument to a different format. Returns string def format_str(self, from_var): return from_var.strftime('%m/%d/%Y') # Convert argument to datetime format def to_date_format(self, from_var): return datetime.datetime.strptime(str(from_...
JamesMura/furry-meme-py
refs/heads/master
stackclient/forms.py
1
from django import forms from django.core.exceptions import ValidationError class UserRegistrationForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput(), required=True, min_length=6) confirmPassword = forms.CharField(widget=forms.PasswordInput(), label="Pass...
fbocharov/au-linux-kernel-spring-2016
refs/heads/master
linux/scripts/gdb/vmlinux-gdb.py
593
# # gdb helper commands and functions for Linux kernel debugging # # loader module # # Copyright (c) Siemens AG, 2012, 2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import os sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb"...
tewk/parrot-select
refs/heads/tewk/select
examples/benchmarks/oofib.py
8
#! python # Copyright (C) 2004-2011, Parrot Foundation. import sys class A: def fib(self,n): if (n < 2): return(n) return( self.fibA(n-2) + self.fibB(n-1) ) def fibA(self,n): if (n < 2): return(n) return( self.fib(n-2) + self.fibB(n-1) ) class B (A): ...
Liamraystanley/dropb.in
refs/heads/master
lib/requests/packages/urllib3/__init__.py
156
""" urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' __license__ = 'MIT' __version__ = 'dev' from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import encod...
jas02/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/m/mcr.py
4
## # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
Changaco/oh-mainline
refs/heads/master
vendor/packages/celery/funtests/suite/test_basic.py
18
import operator import os import sys import time # funtest config sys.path.insert(0, os.getcwd()) sys.path.insert(0, os.path.join(os.getcwd(), os.pardir)) import suite from celery.tests.utils import unittest from celery.tests.functional import tasks from celery.tests.functional.case import WorkerCase from celery.ta...
babyliynfg/cross
refs/heads/master
tools/project-creator/Python2.6.6/Lib/distutils/tests/test_unixccompiler.py
6
"""Tests for distutils.unixccompiler.""" import sys import unittest from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler class UnixCCompilerTestCase(unittest.TestCase): def setUp(self): self._backup_platform = sys.platform self._backup_get_config_var = sysconfig.get_c...
jotes/moto
refs/heads/master
moto/ec2/responses/placement_groups.py
21
from __future__ import unicode_literals from moto.core.responses import BaseResponse class PlacementGroups(BaseResponse): def create_placement_group(self): raise NotImplementedError('PlacementGroups.create_placement_group is not yet implemented') def delete_placement_group(self): raise NotImp...
holmes/intellij-community
refs/heads/master
python/testData/intentions/afterTypeInDocstring5.py
83
def foo3(param): """ :type param: object """ i = param.unresolved()
ProjectSWGCore/NGECore2
refs/heads/master
scripts/loot/lootItems/collections/nightsister_valuables/singing_mountain_clan_bracelet.py
2
def itemTemplate(): return ['object/tangible/loot/creature_loot/collections/shared_nightsister_bracelet.iff'] def STFparams(): return ['static_item_n','col_nightsister_bracelet_01','static_item_d','col_nightsister_bracelet_01'] def AddToCollection(): return 'col_nightsister_valuables' def CollectionItemName...
ibinti/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/geos/prototypes/topology.py
311
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ __all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull', 'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_linemerge', 'geos_pointonsurface', 'geos_pre...
xforce/diorama-native-modding
refs/heads/master
tools/gyp/test/win/gyptest-link-force-symbol-reference.py
237
#!/usr/bin/env python # 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. """ Make sure ForceSymbolReference is translated properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.Tes...
savi-dev/quantum
refs/heads/master
quantum/plugins/ryu/nova/__init__.py
12133432
EdDev/vdsm
refs/heads/master
lib/vdsm/network/netinfo/bonding.py
1
# # Copyright 2015-2017 Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed in t...
gilneidp/FinalProject
refs/heads/master
ALL_FILES/pox/datapaths/__init__.py
44
# Copyright 2013 James McCauley # # 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 writi...
Tranzystorek/servo
refs/heads/master
tests/wpt/css-tests/tools/pytest/testing/test_config.py
166
import py, pytest import _pytest._code from _pytest.config import getcfg, get_common_ancestor, determine_setup from _pytest.main import EXIT_NOTESTSCOLLECTED class TestParseIni: def test_getcfg_and_config(self, testdir, tmpdir): sub = tmpdir.mkdir("sub") sub.chdir() tmpdir.join("setup.cfg"...
dbbhattacharya/kitsune
refs/heads/master
vendor/packages/pyes/pyes/query.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Alberto Paro' import logging try: # For Python >= 2.6 import json except ImportError: # For Python < 2.6 or people using a newer version of simplejson import simplejson as json from es import ESJsonEncoder from utils import clean_string, ES...
Axam/nsx-web
refs/heads/master
fuelclient/fuelclient/objects/__init__.py
3
# Copyright 2014 Mirantis, 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 ...
sharkykh/SickRage
refs/heads/develop
lib/oauthlib/oauth2/rfc6749/parameters.py
86
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains methods related to `Section 4`_ of the OAuth 2 RFC. .. _`Section 4`: http://tools.ietf.org/html/rfc6749#section-4 """ from __future__ import absolute_import, unicode_literals import json import os i...
heisencoder/route-finder
refs/heads/master
third_party/lib/python/django/contrib/formtools/tests/forms.py
123
from django import forms class TestForm(forms.Form): field1 = forms.CharField() field1_ = forms.CharField() bool1 = forms.BooleanField(required=False) date1 = forms.DateField(required=False) class HashTestForm(forms.Form): name = forms.CharField() bio = forms.CharField() class HashTestBlankFo...
tangyiyong/odoo
refs/heads/8.0
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
384
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # 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 Gene...
misska/shopo
refs/heads/master
importers/MetropoleImporter.py
1
#!/usr/bin/env python # coding=utf-8 from Importer import Importer class MetropoleImporter(Importer): name = 'Metropole Zličín' url = 'http://www.metropole.cz/obchody.html' def parse(self): for shopList in self.soup.findAll("ul",{"class":"mt5"}): for link in shopList.findAll("a"): ...
cdaf/cbe
refs/heads/master
cbe/cbe/credit/migrations/0001_initial.py
2
# Generated by Django 2.0.1 on 2018-01-31 15:25 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Credit', fields=[ ('id', mo...
ebukoz/thrive
refs/heads/develop
erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
5
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import today from erpnext.accounts.utils import get_fiscal_year test_dependencies = ["Supplier Group"] class TestTaxWi...
open-synergy/hr
refs/heads/8.0
hr_employee_phone_extension/__openerp__.py
13
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
TomasTomecek/trello-reporter
refs/heads/master
trello_reporter/wsgi.py
1
""" WSGI config for trello_reporter project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJAN...
fladi/django-github-webhook
refs/heads/master
src/django_github_webhook/views.py
1
# -*- coding: utf-8 -*- import hashlib import hmac import json from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseBadRequest, JsonResponse from django.views.generic import...
dakcarto/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/DensifyGeometries.py
10
# -*- coding: utf-8 -*- """ *************************************************************************** DensifyGeometries.py --------------------- Date : October 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ********************...
dednal/chromium.src
refs/heads/nw12
tools/telemetry/telemetry/image_processing/image_util.py
9
# 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. """Provides implementations of basic image processing functions. Implements basic image processing functions, such as reading/writing images, cropping, find...
theochem/horton
refs/heads/master
horton/meanfield/libxc.py
2
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
brunosantos/Bsan-kodi-repo
refs/heads/master
plugin.video.kodi/dns/rcode.py
100
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
postatum/ra
refs/heads/master
ra/request.py
3
import fnmatch import simplejson as json import webtest from .utils import listify from .validate import RAMLValidator def make_request_class(app, base=None): """Create a callable, app-bound request class from a base request class. Request objects built from this class are passed to test functions. The r...
abridgett/boto
refs/heads/develop
tests/integration/sqs/test_connection.py
77
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
rogerhu/django
refs/heads/master
tests/view_tests/tests/__init__.py
12133432
elkingtonmcb/django
refs/heads/master
django/conf/locale/is/__init__.py
12133432
apporc/cinder
refs/heads/master
cinder/backup/rpcapi.py
14
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
lxieyang/simple-amt
refs/heads/master
show_hit_progress.py
4
import argparse from collections import Counter import simpleamt if __name__ == '__main__': parser = argparse.ArgumentParser(parents=[simpleamt.get_parent_parser()]) args = parser.parse_args() mtc = simpleamt.get_mturk_connection_from_args(args) if args.hit_ids_file is None: parser.error('Must specify ...
Ahmad31/Web_Flask_Cassandra
refs/heads/master
flask/lib/python2.7/site-packages/cqlengine/tests/test_consistency.py
2
from cqlengine.management import sync_table, drop_table from cqlengine.tests.base import BaseCassEngTestCase from cqlengine.models import Model from uuid import uuid4 from cqlengine import columns import mock from cqlengine import ALL, BatchQuery class TestConsistencyModel(Model): id = columns.UUID(primary_k...
xme1226/horizon
refs/heads/master
openstack_dashboard/usage/tables.py
3
# 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 # distributed under t...
anarang/robottelo
refs/heads/master
robottelo/cli/activationkey.py
7
# -*- encoding: utf-8 -*- """ Usage:: hammer activation-key [OPTIONS] SUBCOMMAND [ARG] ... Parameters:: SUBCOMMAND subcommand [ARG] ... subcommand arguments Subcommands:: add-host-collection Associate a resource add-subscription Add ...
wouwei/PiLapse
refs/heads/master
picam/picamEnv/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py
1734
from __future__ import absolute_import, division, unicode_literals from . import _base from ..sanitizer import HTMLSanitizerMixin class Filter(_base.Filter, HTMLSanitizerMixin): def __iter__(self): for token in _base.Filter.__iter__(self): token = self.sanitize_token(token) if tok...
nuwainfo/treeio
refs/heads/master
minidetector/useragents.py
13
import os.path def load_from_search_strings_file(): f = None try: f = open(os.path.join(os.path.dirname(__file__), 'search_strings.txt')) ss = f.readlines() finally: if f: f.close() return [s.strip() for s in ss if not s.startswith('#')] search_strings...
koalalorenzo/CacheLayer
refs/heads/master
cachelayer/celery.py
1
from __future__ import absolute_import import os from celery import Celery from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cachelayer.settings.default') app = Celery('cachelayer') # Using a string here means the w...
stonegithubs/odoo
refs/heads/8.0
addons/account_cancel/models/__init__.py
243
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import account_bank_statement
catapult-project/catapult-csm
refs/heads/master
third_party/google-endpoints/cachetools/func.py
9
"""`functools.lru_cache` compatible memoizing function decorators.""" import collections import functools import random import time import warnings try: from threading import RLock except ImportError: from dummy_threading import RLock from .keys import hashkey, typedkey __all__ = ('lfu_cache', 'lru_cache', ...
trulow/namebench
refs/heads/master
libnamebench/config_test.py
173
#!/usr/bin/env python # Copyright 2009 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...