repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
stephane-martin/salt-debian-packaging
refs/heads/master
salt-2016.3.2/salt/modules/win_task.py
2
# -*- coding: utf-8 -*- # https://msdn.microsoft.com/en-us/library/windows/desktop/aa383608(v=vs.85).aspx ''' Windows Task Scheduler Module .. versionadded:: 2016.3.0 A module for working with the Windows Task Scheduler. You can add and edit existing tasks. You can add and clear triggers and actions. You can list all ...
MoritzS/django
refs/heads/master
tests/model_meta/tests.py
63
from django.apps import apps from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import CharField, Field, related from django.db.models.options import EMPTY_RELATION_TREE, IMMUTABLE_WARNING from djan...
slevenhagen/odoo
refs/heads/8.0
addons/l10n_fr_rib/__init__.py
433
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Numérigraphe SARL. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
gepatino/github-indicator
refs/heads/master
ghindicator/main.py
1
# -*- coding: utf-8 -*- """ Script to start the github-notifier app Author: Gabriel Patiño <gepatino@gmail.com> License: Do whatever you want """ import os import logging from ghindicator import options from ghindicator import gui from ghindicator import language from ghindicator import log from ghindicator import u...
fabian4/trove
refs/heads/master
trove/tests/unittests/guestagent/test_api.py
1
# Copyright 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 l...
intuition-io/intuition
refs/heads/master
tests/data/test_forex.py
1
''' Tests for intuition.data.universe ''' import os import unittest from nose.tools import eq_ import dna.test_utils import intuition.data.forex as forex class TruefxUtilsTestCase(unittest.TestCase): def test__clean_pairs(self): cleaned = forex._clean_pairs('usd/gbp') eq_(cleaned, 'USD/GBP') ...
c3nav/c3nav
refs/heads/master
src/c3nav/editor/migrations/0002_auto_20170612_1615.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-12 16:15 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('editor', '0001_initial'), ...
lbishal/scikit-learn
refs/heads/master
examples/svm/plot_svm_kernels.py
329
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= SVM-Kernels ========================================================= Three different types of SVM-Kernels are displayed below. The polynomial and RBF are especially useful when the data-points are not linearly sep...
argriffing/cvxpy
refs/heads/master
cvxpy/expressions/constants/__init__.py
12
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
bealdav/OpenUpgrade
refs/heads/8.0
addons/l10n_fr_rib/__init__.py
433
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Numérigraphe SARL. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
kneeks/is210-week-03-synthesizing
refs/heads/master
tests/test_task_03.py
26
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests Lesson 03 Task S03.""" # Import Python libs import unittest # Import student file import task_03 class L03S03TestCase(unittest.TestCase): """ Tests for Lesson 03 Task S03. """ def test_napoleon_reversed(self): """ Tests that t...
markYoungH/chromium.src
refs/heads/nw12
tools/memory_inspector/memory_inspector/core/stacktrace.py
89
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import posixpath from memory_inspector.core import symbol class Stacktrace(object): """Models a stack-trace, which is a sequence of stack |Frame|s.""" ...
SteveHNH/ansible
refs/heads/devel
lib/ansible/modules/clustering/pacemaker_cluster.py
26
#!/usr/bin/python #coding: utf-8 -*- # (c) 2016, Mathieu Bultel <mbultel@redhat.com> # 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', ...
dracos/django
refs/heads/master
tests/urls.py
223
"""This URLconf exists because Django expects ROOT_URLCONF to exist. URLs should be added within the test folders, and use TestCase.urls to set them. This helps the tests remain isolated. """ urlpatterns = []
PaoloP74/Arduino
refs/heads/master
arduino-core/src/processing/app/i18n/python/requests/packages/charade/sbcsgroupprober.py
2935
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
Ritsyy/fjord
refs/heads/master
smoketests/tests/generic/test_cards.py
4
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from pages.generic_feedback_form import GenericFeedbackFormPage class TestCards(object): @pytest.ma...
chokribr/PIST
refs/heads/master
modules/bibmatch/lib/bibmatch_validator.py
13
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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...
noroot/zulip
refs/heads/master
zerver/migrations/0003_custom_indexes.py
167
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0002_django_1_8'), ] operations = [ migrations.RunSQL("CREATE INDEX upper_subject_idx ON zerver_message ((upper(su...
wilsonrivera/scalider-v2
refs/heads/master
tools/UnidecodeDataCompiler/data/x0a0.py
253
data = ( 'it', # 0x00 'ix', # 0x01 'i', # 0x02 'ip', # 0x03 'iet', # 0x04 'iex', # 0x05 'ie', # 0x06 'iep', # 0x07 'at', # 0x08 'ax', # 0x09 'a', # 0x0a 'ap', # 0x0b 'uox', # 0x0c 'uo', # 0x0d 'uop', # 0x0e 'ot', # 0x0f 'ox', # 0x10 'o', # 0x11 'op', # 0x12 'ex',...
Qalthos/ansible
refs/heads/devel
lib/ansible/module_utils/network/enos/enos.py
38
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by # Ansible still belong to the author of the module, and may assign their own # license to the complete wo...
darkryder/django
refs/heads/master
django/contrib/gis/geos/prototypes/errcheck.py
486
""" Error checking functions for GEOS ctypes prototype functions. """ from ctypes import c_void_p, string_at from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOSFuncFactory # Getting the `free` routine used to free the memory allocated for # string pointers returne...
cesar2/DAI-BARES
refs/heads/master
rango/urls.py
1
from django.conf.urls import patterns, url from rango import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^about/$', views.about, name='about'), url(r'^add_bar/$', views.add_bar, name='add_bar'), url(r'^add_tapa/(?P<bar_name_slug>[\w\-]+)/$', views.add_tapa, name='add_tapa'), url(...
tback/ansible-modules-core
refs/heads/devel
windows/win_user.py
208
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net>, and others # # 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 t...
mikf/gallery-dl
refs/heads/master
gallery_dl/extractor/photovogue.py
1
# -*- coding: utf-8 -*- # 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. """Extractors for https://www.vogue.it/en/photovogue/""" from .common import Extractor, Message from .. impor...
teknik-eksjo/chronos
refs/heads/develop
web/migrations/versions/942327552051_added_work_hours_for_users.py
1
"""Added work_hours for Users. Revision ID: 942327552051 Revises: 6b54c647496e Create Date: 2016-05-11 09:28:37.858612 """ # revision identifiers, used by Alembic. revision = '942327552051' down_revision = '6b54c647496e' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated...
Endemoniada/Pendla
refs/heads/develop
findstation.py
1
#!/usr/bin/python # coding=utf-8 """Pendla FindStation v1.3.0 - Hjälper dig hitta stationen att hinna hem ifrån! Usage: findstation.py findstation.py <station name> findstation.py -h | --help | -V | --version Options: -h --help Show this screen. -V --version Show version....
gjtorikian/ace
refs/heads/master
static.py
71
#!/usr/bin/env python """static - A stupidly simple WSGI way to serve static (or mixed) content. (See the docstrings of the various functions and classes.) Copyright (C) 2006-2009 Luke Arno - http://lukearno.com/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesse...
rchacon/moticket
refs/heads/master
tix/tests/test_api.py
2
from tastypie.test import ResourceTestCase from .factories import (TicketTypeFactory, TicketTypeFieldFactory, TicketTypeFieldValueOptionFactory) class TestTicketTypeResource(ResourceTestCase): def setUp(self): super(TestTicketTypeResource, self).setUp() self.list_url = '...
nithinmurali/robocomp
refs/heads/master
tools/robocompdsl/cogapp/test_makefiles.py
5
""" Test the cogapp.makefiles modules http://nedbatchelder.com/code/cog Copyright 2004-2015, Ned Batchelder. """ from __future__ import absolute_import import unittest import shutil, os, random, tempfile from . import makefiles class SimpleTests(unittest.TestCase): def setUp(self): # Create a...
rahuldhote/odoo
refs/heads/8.0
addons/portal_project/tests/test_access_rights.py
197
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
avlach/univbris-ocf
refs/heads/ofelia.opticaldevelopment
optin_manager/src/python/openflow/common/utils/formfields.py
4
''' Created on Jul 17, 2010 @author: jnaous ''' from django import forms from expedient.common.utils import validators class MACAddressField(forms.CharField): """ A MAC Address form field. """ default_error_messages = { 'invalid': u'Enter a valid MAC address in "xx:xx:xx:xx:xx:xx" format....
ikoula/cloudstack
refs/heads/master
tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/__init__.py
81
# 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...
raccoongang/edx-platform
refs/heads/ginkgo-rg
common/djangoapps/microsite_configuration/middleware.py
6
""" This file implements the Middleware support for the Open edX platform. A microsite enables the following features: 1) Mapping of sub-domain name to a 'brand', e.g. foo-university.edx.org 2) Present a landing page with a listing of courses that are specific to the 'brand' 3) Ability to swap out some branding elemen...
ProjexSoftware/orb
refs/heads/master
tests/functional/sqlite/conftest.py
2
import pytest @pytest.fixture() def lite_db(): import orb db = orb.Database('SQLite') db.setName('orb_testing') db.activate() def fin(): db.disconnect() return db @pytest.fixture() def lite_sql(lite_db): import orb return orb.Connection.byName('SQLite')
ctruchi/deluge-webui2
refs/heads/master
deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py
6
# # submenu.py # # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # # Deluge is free software. # # You may 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 versi...
dpetzold/django-extensions
refs/heads/master
django_extensions/management/commands/drop_test_database.py
1
import logging from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from six.moves import input from django_extensions.management.mysql import parse_mysql_cnf from django_extensions.management.utils import signalcommand try: from djan...
andreparames/odoo
refs/heads/8.0
addons/account/wizard/account_move_line_reconcile_select.py
385
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
zerkrx/zerkbox
refs/heads/develop
lib/youtube_dl/extractor/radiode.py
64
from __future__ import unicode_literals from .common import InfoExtractor class RadioDeIE(InfoExtractor): IE_NAME = 'radio.de' _VALID_URL = r'https?://(?P<id>.+?)\.(?:radio\.(?:de|at|fr|pt|es|pl|it)|rad\.io)' _TEST = { 'url': 'http://ndr2.radio.de/', 'info_dict': { 'id': 'ndr2...
Nesiehr/osf.io
refs/heads/develop
admin_tests/spam/test_views.py
4
from django.db import transaction from django.test import RequestFactory from django.http import Http404 from django.utils import timezone from nose import tools as nt from datetime import timedelta from website.project.model import Comment from osf.models.admin_log_entry import AdminLogEntry from admin.spam.forms im...
benpatterson/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/assetstore/assetmgr.py
148
""" Asset Manager Interface allowing course asset saving/retrieving. Handles: - saving asset in the BlobStore -and- saving asset metadata in course modulestore. - retrieving asset metadata from course modulestore -and- returning URL to asset -or- asset bytes. Phase 1: Checks to see if an asset's metadata can be f...
kyuupichan/electrum
refs/heads/master
gui/qt/qrtextedit.py
1
from electrum.i18n import _ from electrum.plugins import run_hook from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QFileDialog from .util import ButtonsTextEdit, MessageBoxMixin, ColorScheme class ShowQRTextEdit(ButtonsTextEdit): def __init__(self, text=None): ButtonsTex...
askeing/fxos-certsuite
refs/heads/master
mcts/web-platform-tests/tests/websockets/handlers/echo_wsh.py
91
#!/usr/bin/python from mod_pywebsocket import msgutil _GOODBYE_MESSAGE = u'Goodbye' def web_socket_do_extra_handshake(request): # This example handler accepts any request. See origin_check_wsh.py for how # to reject access from untrusted scripts based on origin value. if request.ws_requested_protocols: ...
agharibi/linchpin
refs/heads/develop
setup.py
1
#!/usr/bin/env python import os import ast from setuptools import setup, find_packages with open('linchpin/version.py') as f: for line in f: if line.startswith('__version__'): ver = ast.parse(line).body[0].value.s break # reading requirements from requirements.txt dir_path = os.pa...
msyriac/alhazen
refs/heads/master
tests/full_cutouts.py
1
from enlib import enmap, curvedsky from orphics.analysis.pipeline import mpi_distribute, MPIStats from mpi4py import MPI import healpy as hp import numpy as np import orphics.analysis.flatMaps as fmaps import orphics.tools.stats as stats import orphics.tools.cmb as cmb import orphics.tools.io as io # Get MPI comm comm...
ianatpn/nupictest
refs/heads/master
nupic/regions/ImageSensorExplorers/ImageSweep.py
17
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
DataDog/integrations-extras
refs/heads/master
sortdb/tests/test_sortdb.py
1
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import json import os import pytest from mock import MagicMock from datadog_checks.sortdb import SortdbCheck CHECK_NAME = 'sortdb' HERE = os.path.dirname(os.path.abspath(__file__)) @pytest.fixture def instance(): ...
skoslowski/gnuradio
refs/heads/master
gr-utils/modtool/cli/add.py
3
# # Copyright 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Module to add new blocks """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import re import getpas...
topisani/sagenb
refs/heads/master
sagenb/flask_version/__init__.py
20578
Jgarcia-IAS/localizacion
refs/heads/master
openerp/addons-extra/odoo-pruebas/odoo-server/addons/account/tests/test_tax.py
449
from openerp.tests.common import TransactionCase class TestTax(TransactionCase): """Tests for taxes (account.tax) We don't really need at this point to link taxes to tax codes (account.tax.code) nor to companies (base.company) to check computation results. """ def setUp(self): super(T...
litleleprikon/FIXTestTask
refs/heads/master
fix_task/__init__.py
3
#!/usr/bin/env python __author__ = 'litleleprikon' def main(): pass if __name__ == '__main__': main()
sudheesh001/oh-mainline
refs/heads/master
vendor/packages/docutils/test/local-reader.py
18
# -*- coding: utf-8 -*- # $Id: local-reader.py 7504 2012-08-27 07:55:20Z grubert $ # Authors: Engelbert Gruber <grubert@users.sourceforge.net> # Toshio Kuratomi <toshio@fedoraproject.org> # Copyright: This module is put into the public domain. """ mini-reader to test get_reader_class with local reader """ im...
asashour/selenium
refs/heads/master
py/selenium/webdriver/phantomjs/service.py
53
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
ForgottenKahz/CloudOPC
refs/heads/master
venv/Lib/site-packages/wtforms/ext/appengine/fields.py
177
from __future__ import unicode_literals import decimal import operator from wtforms import fields, widgets from wtforms.compat import text_type, string_types class ReferencePropertyField(fields.SelectFieldBase): """ A field for ``db.ReferenceProperty``. The list items are rendered in a select. :par...
Yelp/mycroft
refs/heads/master
mycroft/tests/data/etl_record.py
1
# -*- coding: utf-8 -*- # This record is inserted as part of the fixture # of a local DynamoDB SAMPLE_RECORD_IN_DB = { 'hash_key': '1', 'data_date': 'sample_date' } # This record has not been inserted to local # DynamoDB fixture SAMPLE_RECORD_NOT_IN_DB = { 'hash_key': '1', 'data_date': 'some_random_d...
jleclanche/fireplace
refs/heads/master
fireplace/cards/icecrown/neutral_rare.py
1
from ..utils import * ## # Minions class ICC_018: """Phantom Freebooter""" pass class ICC_027: """Bone Drake""" pass class ICC_099: """Ticking Abomination""" pass class ICC_257: """Corpse Raiser""" requirements = { PlayReq.REQ_FRIENDLY_TARGET: 0, PlayReq.REQ_MINION_TARGET: 0, PlayReq.REQ_TARGET_I...
konstruktoid/ansible-upstream
refs/heads/devel
test/units/module_utils/basic/test_no_log.py
53
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017, 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 ansible.compat.tests import un...
Shad0wShayd3/Pydex
refs/heads/alpha
core-files/pokedex.py
1
# -*- coding: utf-8 -*- import sys, os, platform #import whatever from pokefunc import * x = 0 while x in range(0, 1): clear_screen() #clear the screen every time the main menu is reached print("Welcome to the Pokedex, what do...
tectronics/pyafipws
refs/heads/master
wsfex.py
16
#!/usr/bin/python # -*- coding: latin-1 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope...
davidzchen/tensorflow
refs/heads/master
tensorflow/python/keras/preprocessing/text_dataset_test.py
5
# Copyright 2020 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...
difro/kubernetes
refs/heads/master
hack/boilerplate/boilerplate.py
156
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
sss/calibre-at-bzr
refs/heads/upstream/master
src/calibre/gui2/email.py
2
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import print_function __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os, socket, time from binascii import unhexlify from functools import partial ...
au-phiware/compose
refs/heads/master
tests/unit/cli_test.py
10
from __future__ import absolute_import from __future__ import unicode_literals import os import docker import py import pytest from .. import mock from .. import unittest from compose.cli.command import get_project from compose.cli.command import get_project_name from compose.cli.docopt_command import NoSuchCommand ...
Weihonghao/ECM
refs/heads/master
Vpy34/lib/python3.5/site-packages/theano/gof/cc.py
1
""" Defines Linkers that deal with C implementations. """ from __future__ import absolute_import, print_function, division # Python imports from copy import copy import os import sys import logging import numpy as np import theano from theano import config from theano.compat import PY3 from theano.compat import iz...
semonte/intellij-community
refs/heads/master
python/testData/completion/className/submoduleRegularImport/submoduleRegularImport.after.py
83
import pack.submod pack.submod
blueboxgroup/horizon
refs/heads/master
openstack_dashboard/api/fwaas.py
36
# Copyright 2013, Big Switch Networks, 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 applic...
nazeehshoura/crawler
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/staticfiles/__init__.py
802
default_app_config = 'django.contrib.staticfiles.apps.StaticFilesConfig'
leedm777/asterisk
refs/heads/master
contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py
5
"""add user_eq_phone option to pjsip Revision ID: 371a3bf4143e Revises: 10aedae86a32 Create Date: 2014-10-13 13:46:24.474675 """ # revision identifiers, used by Alembic. revision = '371a3bf4143e' down_revision = '10aedae86a32' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects.postgresql import...
bkaradzic/SwiftShader
refs/heads/master
third_party/llvm-7.0/llvm/tools/opt-viewer/optrecord.py
6
#!/usr/bin/env python2.7 from __future__ import print_function import yaml # Try to use the C parser. try: from yaml import CLoader as Loader except ImportError: print("For faster parsing, you may want to install libYAML for PyYAML") from yaml import Loader import cgi from collections import defaultdict ...
karan1276/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treewalkers/lxmletree.py
618
from __future__ import absolute_import, division, unicode_literals from six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from gettext import gettext _ = gettext from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isin...
40223139/203739test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/_struct.py
726
# # This module is a pure Python version of pypy.module.struct. # It is only imported if the vastly faster pypy.module.struct is not # compiled in. For now we keep this version for reference and # because pypy.module.struct is not ootype-backend-friendly yet. # # this module 'borrowed' from # https://bitbucket.org/p...
mSenyor/sl4a
refs/heads/master
python/src/Lib/encodings/cp862.py
593
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.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_map) def decode(self,input,errors='strict'): ...
oinopion/django
refs/heads/master
tests/m2m_multiple/tests.py
228
from __future__ import unicode_literals from datetime import datetime from django.test import TestCase from .models import Article, Category class M2MMultipleTests(TestCase): def test_multiple(self): c1, c2, c3, c4 = [ Category.objects.create(name=name) for name in ["Sports", "N...
mancoast/CPythonPyc_test
refs/heads/master
fail/313_string_tests.py
1
""" Common tests shared by test_str, test_unicode, test_userstring and test_string. """ import unittest, string, sys, struct from test import support from collections import UserList class Sequence: def __init__(self, seq='wxyz'): self.seq = seq def __len__(self): return len(self.seq) def __getitem__(self...
eduNEXT/edunext-platform
refs/heads/master
cms/djangoapps/api/v1/serializers/course_runs.py
4
""" Course run serializers. """ import logging import time # pylint: disable=unused-import import six from django.contrib.auth import get_user_model from django.db import transaction from django.utils.translation import ugettext_lazy as _ from opaque_keys import InvalidKeyError from rest_framework import serializer...
Vauxoo/stock-logistics-warehouse
refs/heads/12.0
stock_warehouse_calendar/__init__.py
9
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import models
robynbergeron/ansible-modules-extras
refs/heads/devel
messaging/rabbitmq_queue.py
78
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@gmail.com> # # 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...
chrisjaquet/FreeCAD
refs/heads/master
src/Mod/Path/PathScripts/nc/drag_knife.py
31
################################################################################ # drag knife.py # # NC code creator for attaching Z coordinates to a surface # # Dan Heeks 26th April 2012 import recreator dragging = False from kurve_funcs import cut_curve as cut_curve import nc import area ###########################...
elifesciences/elife-tools
refs/heads/develop
elifetools/tests/fixtures/test_body_block_content_render/content_09_expected.py
1
from collections import OrderedDict expected = [ OrderedDict( [ ( "content", [ OrderedDict([("type", "paragraph"), ("text", "This")]), OrderedDict( [ ("type", "mathml"), ...
dgwakeman/mne-python
refs/heads/master
examples/datasets/plot_spm_faces_dataset.py
17
# doc:slow-example """ ========================================== From raw data to dSPM on SPM Faces dataset ========================================== Runs a full pipeline using MNE-Python: - artifact removal - averaging Epochs - forward model computation - source reconstruction using dSPM on the contrast : "faces - ...
xguse/bokeh
refs/heads/master
examples/plotting/file/markers.py
45
from numpy.random import random from bokeh.plotting import figure, show, output_file def mscatter(p, x, y, typestr): p.scatter(x, y, marker=typestr, line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, size=12) def mtext(p, x, y, textstr): p.text(x, y, text=[textstr], text_color="...
talishte/ctigre
refs/heads/master
env/lib/python2.7/site-packages/pip/vcs/__init__.py
87
"""Handles all VCS (version control) support""" from __future__ import absolute_import import logging import os import shutil from pip._vendor.six.moves.urllib import parse as urllib_parse from pip.exceptions import BadCommand from pip.utils import (display_path, backup_dir, find_command, rmtr...
srsman/odoo
refs/heads/8.0
addons/mail/mail_thread.py
111
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
unbracketed/snowbird
refs/heads/master
snowbird/analyzer.py
1
def get_related_fields(model): pass def get_table_size(model): pass def get_row_size(model): pass
Adenilson/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/element_state/visibility_test.py
142
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test from selenium.common import exceptions class NaturalNonVisibleElementsTest(base_test.WebDriverBaseTest): def test_0x0_pixel_element_is_not_visible(self): self.driver.get(self.webserv...
keedio/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/postgis/adapter.py
222
""" This object provides quoting for GEOS geometries into PostgreSQL/PostGIS. """ from __future__ import unicode_literals from psycopg2 import Binary from psycopg2.extensions import ISQLQuote class PostGISAdapter(object): def __init__(self, geom): "Initializes on the geometry." # Getting the WKB ...
kuailedeyouzhong/flask
refs/heads/master
tests/test_basics.py
322
import unittest from flask import current_app from app import create_app, db class BasicsTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_context() self.app_context.push() db.create_all() def tearDown(self): ...
mwmuni/LIGGGHTS_GUI
refs/heads/master
trimesh/bounds.py
1
import numpy as np import time from .constants import log from .nsphere import minimum_nsphere from . import util from . import convex from . import triangles from . import grouping from . import transformations try: from scipy import spatial from scipy import optimize except ImportError: log.warning('S...
likaiguo/flask-admin
refs/heads/master
flask_admin/contrib/mongoengine/widgets.py
44
from wtforms.widgets import HTMLString, html_params from jinja2 import escape from mongoengine.fields import GridFSProxy, ImageGridFsProxy from flask_admin.helpers import get_url from . import helpers class MongoFileInput(object): """ Renders a file input chooser field. """ template = ('<div>' ...
holmes/intellij-community
refs/heads/master
python/testData/refactoring/pullup/duplicateImport/SuperClass.py
83
from sys import argv class SuperClass(object): def __init__(self): pass
joebowen/movement_validation_cloud
refs/heads/master
djangodev/lib/python2.7/site-packages/django/contrib/gis/gdal/geomtype.py
90
from django.contrib.gis.gdal.error import OGRException from django.utils import six class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0: 'Unknown', 1: 'Point', ...
doganov/edx-platform
refs/heads/master
lms/djangoapps/notifier_api/urls.py
189
from django.conf.urls import include, patterns, url from rest_framework import routers from notifier_api.views import NotifierUsersViewSet notifier_api_router = routers.DefaultRouter() notifier_api_router.register(r'users', NotifierUsersViewSet, base_name="notifier_users") urlpatterns = patterns( '', url(r'^...
moijes12/oh-mainline
refs/heads/master
vendor/packages/sphinx/sphinx/roles.py
16
# -*- coding: utf-8 -*- """ sphinx.roles ~~~~~~~~~~~~ Handlers for additional ReST roles. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from docutils import nodes, utils from docutils.parsers.rst import roles from sphinx i...
d-ng/Qi-Samples
refs/heads/master
Python/QiPy/__init__.py
2
 # this defines the public classes loaded when a caller imports * __all__ = ["QiClient", "QiType", "QiTypeCode", "QiError", "QiTypeProperty", "QiStream", "QiStreamBehavior", "QiStreamBehaviorOverride", "QiStreamExtrapolation", "QiStreamMode"]
10-01/alc-server
refs/heads/master
lib/i18n.py
27
import re import logging from google.appengine.api.urlfetch_errors import DownloadError from google.appengine.api import urlfetch from webapp2_extras import i18n from babel import Locale def parse_accept_language_header(string, pattern='([a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?'): """ ...
ToBeReplaced/ansible-modules-extras
refs/heads/devel
cloud/cloudstack/cs_user.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
alhashash/odoo
refs/heads/master
addons/website_hr/models/hr.py
9
# -*- coding: utf-8 -*- from openerp.osv import osv, fields class hr_employee(osv.osv): _name = 'hr.employee' _inherit = ['hr.employee', 'website.published.mixin'] _columns = { 'public_info': fields.text('Public Info'), } def _website_url(self, cr, uid, ids, field_name, arg, context=Non...
vidartf/hyperspyUI
refs/heads/master
hyperspyui/plugins/axesconf.py
1
# -*- coding: utf-8 -*- # Copyright 2014-2016 The HyperSpyUI developers # # This file is part of HyperSpyUI. # # HyperSpyUI 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 #...
sillydan1/WhatEverEngine
refs/heads/master
packages/IronPython.StdLib.2.7.5/content/Lib/email/feedparser.py
114
# Copyright (C) 2004-2006 Python Software Foundation # Authors: Baxter, Wouters and Warsaw # Contact: email-sig@python.org """FeedParser - An email feed parser. The feed parser implements an interface for incrementally parsing an email message, line by line. This has advantages for certain applications, such as thos...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/building/poi/endor_dulok_medium7.py
85615
import sys def setup(core, object): return
tmmorin/networking-bgpvpn
refs/heads/master
networking_bgpvpn/tests/base.py
109
# -*- coding: utf-8 -*- # Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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 # # htt...