repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
anas-taji/sale-workflow
refs/heads/8.0
__unported__/product_special_type/__init__.py
37
# -*- coding: utf-8 -*- # # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
hujiajie/chromium-crosswalk
refs/heads/master
third_party/WebKit/LayoutTests/http/tests/fetch/PRESUBMIT.py
39
# 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. '''Chromium presubmit script for fetch API layout tests. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts. ''' import os import ...
Zac-HD/home-assistant
refs/heads/dev
homeassistant/components/sensor/bom.py
12
""" Support for Australian BOM (Bureau of Meteorology) weather service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.bom/ """ import datetime import ftplib import gzip import io import json import logging import os import re import zipfile impo...
agry/NGECore2
refs/heads/master
scripts/loot/lootItems/armor/ithorian_sentinel/ithorian_sentinel_armor_gloves.py
2
def itemTemplate(): return ['object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff'] def customItemName(): return 'Ithorian Sentinel Armor Gloves' def customItemStackCount(): return 1 def customizationAttributes(): return [] def customizationValues(): return [] def itemSta...
factorlibre/OCB
refs/heads/8.0
addons/l10n_cl/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
Lekanich/intellij-community
refs/heads/master
python/lib/Lib/xml/sax/drivers2/drv_javasax.py
74
""" SAX driver for the Java SAX parsers. Can only be used in Jython. $Id: drv_javasax.py,v 1.5 2003/01/26 09:08:51 loewis Exp $ """ # --- Initialization version = "0.10" revision = "$Revision: 1.5 $" import string from xml.sax import xmlreader, saxutils from xml.sax.handler import feature_namespaces, feature_namesp...
ArchiveTeam/wget-lua
refs/heads/master
testenv/Test-metalink-http-xml-type.py
12
#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile import hashlib from base64 import b64encode """ This is to test Metalink/HTTP with Content-Type Metalink/XML. With --trust-server-names, trust the metalink:file names. Without --trust-serve...
jk1/intellij-community
refs/heads/master
python/testData/completion/moduleStringLiteralCompletion/a.py
36
'm7<caret>'
elijah513/scikit-learn
refs/heads/master
sklearn/linear_model/tests/test_base.py
120
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # # License: BSD 3 clause import numpy as np from scipy import sparse from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.linear_model....
spaceone/mils-secure
refs/heads/master
app/counter.py
2
# Copyright 2008 William T Katz # # 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...
pk-sam/crosswalk-test-suite
refs/heads/master
webapi/webapi-audiosystem-tizen-tests/inst.wgt.py
294
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
infobloxopen/infoblox-netmri
refs/heads/master
infoblox_netmri/api/broker/v3_6_0/auth_role_broker.py
17
from ..broker import Broker class AuthRoleBroker(Broker): controller = "auth_roles" def index(self, **kwargs): """Lists the available auth roles. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most eff...
XueqingLin/tensorflow
refs/heads/master
tensorflow/contrib/grid_rnn/python/ops/grid_rnn_cell.py
21
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kalessin/python-hubstorage
refs/heads/master
tests/test_project.py
2
""" Test Project """ import json from random import randint, random from requests.exceptions import HTTPError from hubstorage import HubstorageClient from hubstorage.utils import millitime from hstestcase import HSTestCase from testutil import failing_downloader class ProjectTest(HSTestCase): def test_projectid(...
offbye/PiBoat
refs/heads/master
pyboat/reboot.py
1
#!/usr/bin/env python # coding=utf-8 # author:ksc import RPi.GPIO as GPIO import time import os,sys import signal GPIO.setmode(GPIO.BOARD) #define GPIO pin pin_btn=11 pin_led=13 GPIO.setup(pin_btn, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(pin_led, GPIO.OUT, initial=GPIO.LOW) press_time=0 count_down=10 led_on=...
chundi/uwsgi
refs/heads/master
tests/grunter.py
21
import uwsgi import time def application(env, start_response): start_response('200 Ok', [('Content-Type', 'text/html')]) yield "I am the worker %d<br/>" % uwsgi.worker_id() grunt = uwsgi.grunt() if grunt is None: print "worker %d detached" % uwsgi.worker_id() else: yield "And n...
gvlproject/bioconda-recipes
refs/heads/master
recipes/peptide-shaker/1.16.13/peptide-shaker.py
47
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
emop/task-worker
refs/heads/master
src/python/Sailing/libs/selenium/webdriver/phantomjs/__init__.py
65
# Copyright 2012 Software Freedom Conservancy # # 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...
pleaseproject/python-for-android
refs/heads/master
python-modules/zope/zope/interface/tests/m2.py
50
############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
mvitr/titanium_mobile
refs/heads/master
support/common/css/parsetab.py
37
# parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '\x10[\xb4\tX\xd3\xad\x04\x9c^\xfa\xd5R\xa8N\xa1' _lr_action_items = {'ANGLE':([40,42,73,119,136,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,177,178,...
joesecurity/joesandboxcloudapi
refs/heads/master
test_jbxapi.py
1
import os import io import pytest import tempfile import shutil import jbxapi # make all network calls fail @pytest.fixture(autouse=True) def no_requests(monkeypatch): def will_fail(*args, **kwargs): raise RuntimeError("Disabled") monkeypatch.setattr("requests.sessions.Session.request", lambda: will_...
pedrobaeza/OpenUpgrade
refs/heads/8.0
addons/share/__openerp__.py
250
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you ...
M4sse/chromium.src
refs/heads/nw12
third_party/simplejson/encoder.py
219
"""Implementation of JSONEncoder """ import re from decimal import Decimal def _import_speedups(): try: from simplejson import _speedups return _speedups.encode_basestring_ascii, _speedups.make_encoder except ImportError: return None, None c_encode_basestring_ascii, c_make_encoder = _im...
defaultnamehere/zzzzz
refs/heads/master
fbapi.py
1
import requests import fetcher def get_user_name(fbid): resp = requests.get("https://www.facebook.com/app_scoped_user_id/" + str(fbid), headers=fetcher.Fetcher.REQUEST_HEADERS, allow_redirects=True) return resp.url.split("/")[-1]
blacklin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_pickle.py
72
import pickle import io import collections from test import support from test.pickletester import AbstractPickleTests from test.pickletester import AbstractPickleModuleTests from test.pickletester import AbstractPersistentPicklerTests from test.pickletester import AbstractPicklerUnpicklerObjectTests from test.picklet...
seibert/numba
refs/heads/master
numba/cuda/tests/cudapy/test_ipc.py
1
import sys import multiprocessing as mp import itertools import traceback import pickle import numpy as np from numba import cuda from numba.cuda.testing import (skip_on_cudasim, skip_under_cuda_memcheck, ContextResettingTestCase, ForeignArray) from numba.tests.support import linux_onl...
newswangerd/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/foo0.py
298
data = 'foo0'
helldorado/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_router_setting.py
21
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
vvv1559/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/hgext/gpg.py
90
# Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''commands to sign and verify changesets''' import os, tempfile, binascii from mercurial import util, comman...
mdworks2016/work_development
refs/heads/master
Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/chardet/mbcssm.py
289
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
morissette/devopsdays-hackathon-2016
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/archive_util.py
520
"""Utilities for extracting common archive formats""" __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", "UnrecognizedFormat", "extraction_drivers", "unpack_directory", ] import zipfile import tarfile import os import shutil import posixpath import contextlib from pkg_resourc...
jhakonen/wot-teamspeak-mod
refs/heads/master
setup.py
1
#!/usr/bin/env python3 from setuptools import setup, find_packages import setup_helpers setup( name = 'tessumod', description = 'Mod for integrating Teamspeak to World of Tanks', author = 'jhakonen', license = 'LGPL 2.1 License', url = 'http://forum.worldoftanks.eu/index.php?/topic/433614-/', ...
PatrickChrist/scikit-learn
refs/heads/master
examples/gaussian_process/plot_gp_probabilistic_classification_after_regression.py
252
#!/usr/bin/python # -*- coding: utf-8 -*- """ ============================================================================== Gaussian Processes classification example: exploiting the probabilistic output ============================================================================== A two-dimensional regression exerci...
ahmetabdi/SickRage
refs/heads/master
lib/hachoir_metadata/misc.py
90
from lib.hachoir_metadata.metadata import RootMetadata, registerExtractor from lib.hachoir_metadata.safe import fault_tolerant from lib.hachoir_parser.container import SwfFile from lib.hachoir_parser.misc import TorrentFile, TrueTypeFontFile, OLE2_File, PcfFile from lib.hachoir_core.field import isString from lib.hacho...
pshen/ansible
refs/heads/devel
lib/ansible/module_utils/facts/system/local.py
144
# 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 ...
mbauskar/tele-erpnext
refs/heads/develop
erpnext/accounts/doctype/purchase_invoice_item/__init__.py
37694
from __future__ import unicode_literals
titansgroup/python-phonenumbers
refs/heads/dev
tools/python/buildprefixdata.py
4
#!/usr/bin/env python """Script to read the libphonenumber per-prefix metadata and generate Python code. Invocation: buildprefixdata.py [options] indir outfile module_prefix Processes all of the per-prefix data under the given input directory and emit generated Python code. Options: --var XXX : use this prefix f...
nanolearningllc/edx-platform-cypress
refs/heads/master
common/djangoapps/student/migrations/0021_remove_askbot.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models ASKBOT_AUTH_USER_COLUMNS = ( 'website', 'about', 'gold', 'email_isvalid', 'real_name', 'location', 'reputation', 'gravatar', 'bronze', 'last_seen', ...
acsone/partner-contact
refs/heads/8.0
setup/partner_auto_salesman/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
yuhcaesar/emacsrc
refs/heads/master
.emacs.d/.python-environments/default/Lib/encodings/cp1250.py
93
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def d...
WZeke/m2_kernel
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
MortalViews/incubator-airflow
refs/heads/master
airflow/migrations/versions/502898887f84_adding_extra_to_log.py
62
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
realisticus/data-science-from-scratch
refs/heads/master
code/network_analysis.py
59
from __future__ import division import math, random, re from collections import defaultdict, Counter, deque from linear_algebra import dot, get_row, get_column, make_matrix, magnitude, scalar_multiply, shape, distance from functools import partial users = [ { "id": 0, "name": "Hero" }, { "id": 1, "name": "Dunn...
eliasgranderubio/dagda
refs/heads/master
tests/exception/test_dagda_error.py
1
# # Licensed to Dagda under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Dagda licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance...
jss-emr/openerp-7-src
refs/heads/master
openerp/addons/l10n_gr/__openerp__.py
170
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 P. Christeas <p_christ@hol.gr>. All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
rbrito/pkg-youtube-dl
refs/heads/master
youtube_dl/extractor/tinypic.py
64
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class TinyPicIE(InfoExtractor): IE_NAME = 'tinypic' IE_DESC = 'tinypic.com videos' _VALID_URL = r'https?://(?:.+?\.)?tinypic\.com/player\.php\?v=(?P<id>[^&]+)&s=\d+' _TESTS = [ ...
nikolas/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/aggregation_regress/tests.py
38
import datetime import pickle from decimal import Decimal from operator import attrgetter from django.conf import settings from django.core.exceptions import FieldError from django.db import DEFAULT_DB_ALIAS from django.db.models import Count, Max, Avg, Sum, StdDev, Variance, F, Q from django.test import TestCase, App...
jcpowermac/ansible
refs/heads/devel
lib/ansible/modules/windows/win_lineinfile.py
46
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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. ...
26fe/jsonstat.py
refs/heads/master
jsonstat-tests/test_cli.py
1
# -*- coding: utf-8 -*- # This file is part of https://github.com/26fe/jsonstat.py # Copyright (C) 2016-2021 gf <gf@26fe.com> # See LICENSE file # stdlib import os # external packages import pytest from click.testing import CliRunner # jsonstat from jsonstat.cli.cli_jsonstat import cli fixture_dir = os.path.join(os...
ULHPC/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/c/cgal.py
1
## # Copyright 2009-2017 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://www.vscentrum.be), # Flemish Research Foundation (F...
eacoin-project/eacore
refs/heads/master
qa/rpc-tests/listtransactions.py
1
#!/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. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
egoitzro/poedit
refs/heads/master
deps/boost/libs/python/test/numarray_tests.py
52
# Copyright David Abrahams 2006. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import printer # So we can coerce portably across Python versions bool = type(1 == 1) ''' >>> from numpy_ext import * >>> x = new_arra...
gacarrillor/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/BarPlot.py
29
# -*- coding: utf-8 -*- """ *************************************************************************** BarPlot.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ******************************...
JBonsink/GSOC-2013
refs/heads/master
tools/lumpy/Gui.py
2
#!/usr/bin/python """Wrapper classes for use with tkinter. This module provides the following classes: Gui: a sublass of Tk that provides wrappers for most of the widget-creating methods from Tk. The advantage of these wrappers is that they use Python's optional argument capability to provide appropriate default va...
Iotic-Labs/py-IoticAgent
refs/heads/dev
src/IoticAgent/Core/RequestEvent.py
1
# Copyright (c) 2016 Iotic Labs Ltd. 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 # # https://github.com/Iotic-Labs/py-IoticAgent/blob/master/LICENSE # # Unless re...
Orav/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_asyncio/test_streams.py
2
"""Tests for streams.py.""" import gc import os import socket import sys import unittest from unittest import mock try: import ssl except ImportError: ssl = None import asyncio from asyncio import test_utils class StreamReaderTests(test_utils.TestCase): DATA = b'line1\nline2\nline3\n...
khchen428/witness
refs/heads/master
witness/migrations/0007_auto__del_field_decision_name.py
1
# -*- 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): # Deleting field 'Decision.name' db.delete_column('witness_decision', 'name') def backwards(self, orm)...
excso/Portfolio
refs/heads/master
utilities.py
1
#------------------------------------------------------------------------------- # Name: utilities # Purpose: Contains functions to be imported by other scripts # # Author: bschnick # # Created: 20/01/2015 # Copyright: (c) bschnick 2015 # License: MIT #-----------------------------------------...
pilou-/ansible
refs/heads/devel
lib/ansible/modules/source_control/_github_hooks.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Phillip Gentry <phillip@cx.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', ...
azureplus/hue
refs/heads/master
desktop/libs/liboozie/src/liboozie/oozie_api.py
7
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
xiaoda99/keras
refs/heads/master
tests/auto/keras/test_activations.py
7
import math import keras import theano import theano.tensor as T import numpy def list_assert_equal(a, b, round_to=7): ''' This will do a pairwise, rounded equality test across two lists of numbers. ''' pairs = zip(a, b) for i, j in pairs: assert round(i, round_to) == round(j, round_...
zeehio/django-haystack
refs/heads/master
test_haystack/multipleindex/tests.py
22
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from django.db import models from haystack import connections from haystack.exceptions import NotHandled from haystack.query import SearchQuerySet from haystack.signals import BaseSignalProcessor from ..whoosh_tests...
ashemedai/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_command.py
58
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
nero64/SIMCOPV
refs/heads/master
SIMCOPV/urls.py
2
"""SIMCOPV URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
crazy-canux/django
refs/heads/master
tests/urlpatterns_reverse/reverse_lazy_urls.py
439
from django.conf.urls import url from .views import LazyRedirectView, empty_view, login_required_view urlpatterns = [ url(r'^redirected_to/$', empty_view, name='named-lazy-url-redirected-to'), url(r'^login/$', empty_view, name='some-login-page'), url(r'^login_required_view/$', login_required_view), ur...
linjoahow/w17g
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/csv.py
637
""" csv.py - read/write/investigate CSV files """ import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ ...
nthall/pip
refs/heads/develop
tests/functional/test_install_extras.py
36
import pytest from os.path import join @pytest.mark.network def test_simple_extras_install_from_pypi(script): """ Test installing a package from PyPI using extras dependency Paste[openid]. """ result = script.pip( 'install', 'Paste[openid]==1.7.5.1', expect_stderr=True, ) initools_fold...
joeydong/endless-lake-player
refs/heads/master
utility/cv.py
1
import cv2 import glob import utility.config import utility.image def template_id(template_path): return template_path.split("/")[-1] def load_template_refs(): template_refs = [] # Character templates for template_path in glob.glob("templates/character/template-down-*.png"): template_refs.ap...
zodman/django-staticfiles
refs/heads/master
staticfiles/urls.py
1
import re from django.conf import settings from django.conf.urls.defaults import patterns, url from django.core.exceptions import ImproperlyConfigured urlpatterns = [] def static(prefix, view='django.views.static.serve', **kwargs): """ Helper function to return a URL pattern for serving files in debug mode. ...
YoQuieroSaber/yournextrepresentative
refs/heads/yqs/prod
elections/uk_general_election_2015/management/commands/uk_general_election_2015_update_candidate_memberships.py
2
import json from slumber.exceptions import HttpServerError, HttpClientError from django.conf import settings from django.core.management.base import BaseCommand from candidates.models.popit import membership_covers_date from candidates.popit import PopItApiMixin, popit_unwrap_pagination class Command(PopItApiMixin,...
codexns/sublime-coverage
refs/heads/master
st2_windows_x64/coverage/backward.py
18
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Add things to old Pythons so I can pretend they are newer.""" # This file does lots of tricky stuff, so disable a bunch of pylint warnings. # pylint: disable=re...
noisymime/zookeepr
refs/heads/master
zk/model/product.py
3
"""The application's model objects""" import sqlalchemy as sa from meta import Base from meta import Session from ceiling import Ceiling from product_category import ProductCategory from product_ceiling_map import product_ceiling_map def setup(meta): category_ticket = ProductCategory.find_by_name('Ticket') ...
fedora-infra/packagedb
refs/heads/develop
pkgdb/dispatcher.py
2
# -*- coding: utf-8 -*- # # Copyright © 2007-2011 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2, or (at your option) any later version. This # program is distributed...
waytai/odoo
refs/heads/8.0
addons/website_sale_options/models/__init__.py
396
import product import sale_order
dahlstrom-g/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_1/_pkg0_1_1_1_0/_mod0_1_1_1_0_3.py
30
name0_1_1_1_0_3_0 = None name0_1_1_1_0_3_1 = None name0_1_1_1_0_3_2 = None name0_1_1_1_0_3_3 = None name0_1_1_1_0_3_4 = None
stef1927/cassandra-dtest
refs/heads/master
upgrade_tests/upgrade_udtfix_test.py
3
import pytest import logging from dtest import RUN_STATIC_UPGRADE_MATRIX, Tester from distutils.version import LooseVersion from tools.misc import add_skip from .upgrade_manifest import build_upgrade_pairs since = pytest.mark.since logger = logging.getLogger(__name__) @pytest.mark.upgrade_test class UpgradeUDTFixTes...
ptroja/spark2014
refs/heads/master
testsuite/gnatprove/tests/O210-006__use_generic/test.py
842
from test_support import * prove_all()
lootr/netzob
refs/heads/next
netzob/test/src/test_netzob/test_Common/suite_Type.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring comm...
sajeeshcs/nested_quota_final
refs/heads/master
nova/virt/ironic/__init__.py
109
# Copyright 2013 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/LICENSE-2.0 # # Unless req...
lxybox1/MissionPlanner
refs/heads/master
Lib/wsgiref/util.py
61
"""Miscellaneous WSGI-related Utilities""" import posixpath __all__ = [ 'FileWrapper', 'guess_scheme', 'application_uri', 'request_uri', 'shift_path_info', 'setup_testing_defaults', ] class FileWrapper: """Wrapper to convert file-like objects to iterables""" def __init__(self, filelike...
nvoron23/hue
refs/heads/master
tools/virtual-bootstrap/virtual-bootstrap.py
31
#!/usr/bin/env python ## WARNING: This file is generated #!/usr/bin/env python """Create a "virtual" Python installation """ __version__ = "12.0.7" virtualenv_version = __version__ # legacy import base64 import sys import os import codecs import optparse import re import shutil import logging import tempfile import ...
vpp-dev/vpp
refs/heads/master
src/plugins/lb/test/test_lb.py
3
import socket import scapy.compat from scapy.layers.inet import IP, UDP from scapy.layers.inet6 import IPv6 from scapy.layers.l2 import Ether, GRE from scapy.packet import Raw from scapy.data import IP_PROTOS from framework import VppTestCase from util import ppp from vpp_ip_route import VppIpRoute, VppRoutePath from...
clk8908/pymc3
refs/heads/master
pymc3/diagnostics.py
8
"""Convergence diagnostics and model validation""" import numpy as np from .stats import autocorr, autocov, statfunc from copy import copy __all__ = ['geweke', 'gelman_rubin', 'effective_n'] @statfunc def geweke(x, first=.1, last=.5, intervals=20): """Return z-scores for convergence diagnostics. Compare th...
nkasvosve/beyondj
refs/heads/master
beyondj-admin/beyondj-web-console/src/main/webapp/js/converse.js-0.9.5/docs/source/conf.py
1
# -*- coding: utf-8 -*- # # Converse.js documentation build configuration file, created by # sphinx-quickstart on Fri Apr 26 20:48:03 2013. # # 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 file. # #...
PyZim/indaba
refs/heads/master
indaba/talks/apps.py
5
from django.apps import AppConfig class TalksConfig(AppConfig): name = 'talks'
ivannotes/luigi
refs/heads/master
test/decorator_test.py
36
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
mixman/djangodev
refs/heads/master
tests/modeltests/proxy_models/models.py
2
""" By specifying the 'proxy' Meta attribute, model subclasses can specify that they will take data directly from the table of their base class table rather than using a new table of their own. This allows them to act as simple proxies, providing a modified interface to the data from the base class. """ from django.db ...
ghorn/debian-casadi
refs/heads/master
experimental/joel/nlp_benchmarks/clnlbeam.py
1
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, # K.U. Leuven. All rights reserved. # Copyright (C) 2011-2014 Greg Horn # # CasADi is free software; you can...
sjsucohort6/openstack
refs/heads/master
python/venv/lib/python2.7/site-packages/netaddr/strategy/eui48.py
4
#----------------------------------------------------------------------------- # Copyright (c) 2008-2015, David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #----------------------------------------------------------------------------- """ IEEE 48-bit EUI (M...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/django-openid-auth-0.5/django_openid_auth/views.py
40
# django-openid-auth - OpenID integration for django.contrib.auth # # Copyright (C) 2007 Simon Willison # Copyright (C) 2008-2013 Canonical Ltd. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions o...
m039/Void
refs/heads/master
third-party/void-boost/tools/build/test/feature_cxxflags.py
31
#!/usr/bin/python # Copyright 2014 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Tests the cxxflags feature import BoostBuild t = BoostBuild.Tester(use_test_config=False) # cxxflags should b...
guschmue/tensorflow
refs/heads/master
tensorflow/contrib/kfac/examples/mlp_mnist_main.py
15
# 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...
nikoonia/gem5v
refs/heads/master
util/gem5img.py
86
#!/usr/bin/python # # gem5img.py # Script for managing a gem5 disk image. # from optparse import OptionParser import os from os import environ as env import string from subprocess import CalledProcessError, Popen, PIPE, STDOUT from sys import exit, argv # Some constants. MaxLBACylinders = 16383 MaxLBAHeads = 16 MaxL...
tfiedor/perun
refs/heads/master
tests/test_add.py
1
"""Basic tests for 'perun add' command. Tests basic functionality of adding profiles to initialized repositories, adding to empty repositories, adding already added profiles, etc. """ import binascii import os import git import perun.logic.store as store import perun.logic.index as index import pytest import termcol...
ojengwa/django-1
refs/heads/master
tests/dbshell/tests.py
442
from django.db.backends.mysql.client import DatabaseClient from django.test import SimpleTestCase class MySqlDbshellCommandTestCase(SimpleTestCase): def test_fails_with_keyerror_on_incomplete_config(self): with self.assertRaises(KeyError): self.get_command_line_arguments({}) def test_bas...
mosbasik/buzhug
refs/heads/master
javasrc/lib/Jython/Lib/test/test_codecencodings_kr.py
19
#!/usr/bin/env python # # test_codecencodings_kr.py # Codec encoding tests for ROK encodings. # from test import test_support from test import test_multibytecodec_support import unittest class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase): encoding = 'cp949' tstring = test_multibytecod...
thomazs/geraldo
refs/heads/master
site/newsite/site-geraldo/django/templatetags/__init__.py
64
from django.conf import settings for a in settings.INSTALLED_APPS: try: __path__.extend(__import__(a + '.templatetags', {}, {}, ['']).__path__) except ImportError: pass
clumsy/intellij-community
refs/heads/master
python/testData/editing/enterDocstringStubWhenFunctionDocstringBelow.py
44
def f(): """<caret> def g(): """ bar """
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/python-dateutil-2.4.2/updatezinfo.py
34
#!/usr/bin/env python import os import hashlib import json import io from six.moves.urllib import request from dateutil.zoneinfo import rebuild METADATA_FILE = "zonefile_metadata.json" def main(): with io.open(METADATA_FILE, 'r') as f: metadata = json.load(f) if not os.path.isfile(metadata['tzdata...
webgeodatavore/django
refs/heads/master
django/contrib/gis/maps/google/__init__.py
287
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...