repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
supercairos/android_kernel_doro_msm8916
refs/heads/cm-12.1
Documentation/target/tcm_mod_builder.py
2358
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
LernaProject/Lerna
refs/heads/master
core/standings/builders/acm.py
3
from django.db import connection from core.util import format_time from .base import BaseStandingsBuilder from .util import LastAttemptsMixin from ..aggregators import * from ..attempt_results import TimedAcmAttemptResult class AcmStandingsBuilder(LastAttemptsMixin, BaseStandingsB...
rghe/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_static_route.py
20
#!/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...
andymckay/mobile-codes
refs/heads/master
mobile_codes/tests.py
2
from unittest import TestCase import mobile_codes class TestCountries(TestCase): def test_mcc(self): countries = mobile_codes.mcc(u'302') self.assertEqual(len(countries), 1) self.assertEqual(countries[0].mcc, u'302') def test_mcc_multiple_codes(self): countries = mobile_code...
susansls/zulip
refs/heads/master
zerver/views/upload.py
8
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.http import HttpRequest, HttpResponse, HttpResponseForbidden, FileResponse, \ HttpResponseNotFound from django.shortcuts import redirect from django.utils.translation import ugettext as _ from zerver.decorator import authenticated_json_pos...
kingmotley/SickRage
refs/heads/master
lib/tornado/concurrent.py
35
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
photoninger/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/rhn_channel.py
81
#!/usr/bin/python # Copyright: (c) Vincent Van de Kussen # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['pr...
saketkc/galaxy_tools
refs/heads/master
toolshed/sift_web/sift_web.py
6
#!/usr/bin/env python import requests import argparse import sys from functools import wraps import time from bs4 import BeautifulSoup __url__ = 'http://provean.jcvi.org/genome_prg_2.php' def stop_err(msg, err=1): sys.stderr.write('%s\n' % msg) sys.exit(err) def retry(ExceptionToCheck, tries=10, delay=3, b...
whitehorse-io/encarnia
refs/heads/master
pyenv/lib/python2.7/site-packages/libpasteurize/main.py
59
""" pasteurize: automatic conversion of Python 3 code to clean 2/3 code =================================================================== ``pasteurize`` attempts to convert existing Python 3 code into source-compatible Python 2 and 3 code. Use it like this on Python 3 code: $ pasteurize --verbose mypython3script...
mheap/ansible
refs/heads/devel
lib/ansible/plugins/action/normal.py
118
# (c) 2012, Michael DeHaan <michael.dehaan@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 License, or # (at your option) any lat...
pratapvardhan/pandas
refs/heads/master
pandas/tests/indexes/datetimes/test_arithmetic.py
1
# -*- coding: utf-8 -*- import warnings from datetime import datetime, timedelta import operator import pytest import pytz import numpy as np import pandas as pd from pandas.compat.numpy import np_datetime64_compat import pandas.util.testing as tm from pandas.errors import PerformanceWarning, NullFrequencyError from ...
Runscope/httpbin
refs/heads/master
httpbin/core.py
3
# -*- coding: utf-8 -*- """ httpbin.core ~~~~~~~~~~~~ This module provides the core HttpBin experience. """ import base64 import json import os import random import time import uuid import argparse from flask import ( Flask, Response, request, render_template, redirect, jsonify as flask_json...
jounex/hue
refs/heads/master
desktop/core/ext-py/django-nose-1.3/testapp/test_only_this.py
43
"""Django's test runner won't find this, but nose will.""" def test_multiplication(): assert 2 * 2 == 4
tedelhourani/ansible
refs/heads/devel
test/units/conftest.py
127
"""Monkey patch os._exit when running under coverage so we don't lose coverage data in forks, such as with `pytest --boxed`.""" import gc import os try: import coverage except ImportError: coverage = None try: test = coverage.Coverage except AttributeError: coverage = None def pytest_configure(): ...
fnugrahendi/saleor
refs/heads/master
saleor/dashboard/product/api.py
8
from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import get_object_or_404 from rest_framework import renderers, serializers, status from rest_framework.decorators import (api_view, parser_classes, renderer_classes) from rest_framework.parsers import Mult...
technologiescollege/Blockly-rduino-communication
refs/heads/master
scripts_XP/Lib/site-packages/flask/testing.py
11
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: © 2010 by the Pallets team. :license: BSD, see LICENSE for more details. """ import werkzeug from contextlib im...
listamilton/supermilton.repository
refs/heads/supermilton.repository
plugin.audio.soundcloud/resources/lib/content/provider.py
3
__author__ = 'bromix' from resources.lib import nightcrawler from resources.lib.nightcrawler.exception import ProviderException from .client import Client class Provider(nightcrawler.Provider): SOUNDCLOUD_LOCAL_STREAM = 30505 SOUNDCLOUD_LOCAL_EXPLORE = 30500 SOUNDCLOUD_LOCAL_TRACKS = 30512 SOUNDCLOUD...
clemsonMakerspace/CATS
refs/heads/devel
Software/scan_key/main.py
3
######################################################################### # USAGE: python3 main.py # # # # MAKE SURE YOU USE PYTHON3 OTHERWISE YOU'RE GOING TO GET ERRORS! # # # ######################################################################### from keypad import * from on_off import *...
kohnle-lernmodule/exe201based
refs/heads/master
twisted/web/__init__.py
14
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted Web: a Twisted Web Server. """ __version__ = '0.5.0'
SimonSapin/servo
refs/heads/master
tests/jquery/run_jquery.py
215
#!/usr/bin/env python # 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 os import re import subprocess import sys import BaseHTTPServer import SimpleHTTPServer im...
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/python2.7/dist-packages/telepathy/_generated/Channel_Interface_Conference.py
2
../../../../../share/pyshared/telepathy/_generated/Channel_Interface_Conference.py
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/aio/operations/_bastion_hosts_operations.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
goliveirab/odoo
refs/heads/8.0
addons/hr/__openerp__.py
260
# -*- 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...
geminy/aidear
refs/heads/master
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/tlslite/tlslite/errors.py
111
# Authors: # Trevor Perrin # Dave Baggett (Arcode Corporation) - Added TLSUnsupportedError. # # See the LICENSE file for legal information regarding use of this file. """Exception classes. @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, TLSAuthenticationError, TLSNoAuthenticationErr...
Manolaru/Python_train
refs/heads/master
Les_4/Task_12/test/test_add_user.py
2
# -*- coding: utf-8 -*- from model.user import User from sys import maxsize def test_add_user(app): old_users=app.user.get_user_list() user=User(fname="Jana", lname="Geddis", title="Manager", company="KPMG", address="Moscow, Smolenskaya emb.", phoneh="9876612", email="jana.geddis@kpmg....
homologus/Pandoras-Toolbox-for-Bioinformatics
refs/heads/master
src/tophat/src/tophat.py
2
#!/usr/bin/env python # encoding: utf-8 """ tophat.py Created by Cole Trapnell on 2008-12-25. Copyright (c) 2008 Cole Trapnell. All rights reserved. Updated and maintained by Daehwan Kim and Geo Pertea since Jul 2010. """ import sys try: import psyco psyco.full() except ImportError: pass import getopt im...
SteveXiSong/ECE757-SnoopingPredictions
refs/heads/master
util/batch/job.py
77
#!/usr/bin/env python # Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyrigh...
HydrelioxGitHub/home-assistant
refs/heads/dev
tests/components/sensor/test_mqtt_room.py
11
"""The tests for the MQTT room presence sensor.""" import json import datetime from unittest.mock import patch from homeassistant.setup import async_setup_component import homeassistant.components.sensor as sensor from homeassistant.components.mqtt import (CONF_STATE_TOPIC, CONF_QOS, ...
ypwalter/fxos-certsuite
refs/heads/master
mcts/web-platform-tests/tests/eventsource/resources/last-event-id.py
212
# -*- coding: utf-8 -*- def main(request, response): response.headers.set("Content-Type", "text/event-stream") last_event_id = request.headers.get('Last-Event-ID', None) if(last_event_id): return "data: " + last_event_id + "\n\n" else: return "id: …\nretry: 200\ndata: hello\n\n"
jetskijoe/headphones
refs/heads/master
lib/yaml/__init__.py
221
from error import * from tokens import * from events import * from nodes import * from loader import * from dumper import * __version__ = '3.11' try: from cyaml import * __with_libyaml__ = True except ImportError: __with_libyaml__ = False def scan(stream, Loader=Loader): """ Scan a YAML stream...
gborri/SickRage
refs/heads/develop
sickrage/clients/deluged.py
1
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
EIT-ICT-RICH/ns-3-dev-TSCH
refs/heads/master
examples/wireless/wifi-ap.py
108
# -*- Mode: Python; -*- # /* # * Copyright (c) 2005,2006,2007 INRIA # * Copyright (c) 2009 INESC Porto # * # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This p...
polaris-/dwc_network_server_emulator
refs/heads/master
gamespy_natneg_server.py
2
"""DWC Network Server Emulator Copyright (C) 2014 polaris- Copyright (C) 2014 ToadKing Copyright (C) 2016 Sepalani 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, eith...
Actifio/ansible_customizevm_windows_newvmmounted_hyperv
refs/heads/master
filter_plugins/custom.py
1
# coding:utf-8 from ansible import errors def ret_macaddress_from_getvmnetadpt ( output, switch ): mac = "" # pick lines including keyword line = [ s for s in output if switch in s ] if len(line) == 0: return mac # pick first line of result output_list = line[0].split() flag = 0 ...
dexterx17/nodoSocket
refs/heads/master
clients/Python-2.7.6/Mac/Demo/applescript/Disk_Copy/Utility_Events.py
34
"""Suite Utility Events: Commands that allow the user to select Disk Copy files Level 1, version 1 Generated from Macintosh HD:Hulpprogramma's:Disk Copy AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'ddsk' class Utility_Events_Events: _argmap_select_disk_image = {...
dfalt974/SickRage
refs/heads/master
lib/chardet/langhungarianmodel.py
269
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
pyoceans/pocean-core
refs/heads/master
pocean/tests/dsg/timeseries/test_timeseries_om.py
1
#!python # coding=utf-8 import os import tempfile import unittest import numpy as np from pocean.dsg import OrthogonalMultidimensionalTimeseries from pocean.tests.dsg.test_new import test_is_mine import logging from pocean import logger logger.level = logging.INFO logger.handlers = [logging.StreamHandler()] class ...
pombredanne/parakeet
refs/heads/master
parakeet/ndtypes/scalar_types.py
2
import numpy as np import dtypes import type_conv from core_types import IncompatibleTypes, ImmutableT # base class for all concrete scalar types # don't actually tag any values with this class ScalarT(ImmutableT): rank = 0 def __init__(self, dtype): self.dtype = dtype self.name = self.dtype.name ...
stevemyers/bitcoinxt
refs/heads/master
qa/rpc-tests/test_framework/bignum.py
230
# # # bignum.py # # This file is copied from python-bitcoinlib. # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # """Bignum routines""" from __future__ import absolute_import, division, print_function, unicode_literals imp...
danaugrs/sdr-generator
refs/heads/master
sdr_utils.py
1
from bitarray import bitarray import bitarray_io wordlist = [] def setList(listname): bitarray_io.setDirectory(listname) _populateWordList(listname) def _populateWordList(listname): """Builds Python lists from file""" global wordlist wordlist = [] with open('lists\{0}.list'.format(listname)) as f: for wordCR...
olhakhomyak/cvMaker
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
1417
#!/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. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ import os impor...
slightperturbation/Cobalt
refs/heads/master
ext/emsdk_portable/emscripten/tag-1.34.1/third_party/ply/test/yacc_error3.py
174
# ----------------------------------------------------------------------------- # yacc_error3.py # # Bad p_error() function # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tokens # ...
TsinghuaX/edx-platform
refs/heads/master
common/djangoapps/mitxmako/makoloader.py
15
import logging from django.conf import settings from django.template.base import TemplateDoesNotExist from django.template.loader import make_origin, get_template_from_string from django.template.loaders.filesystem import Loader as FilesystemLoader from django.template.loaders.app_directories import Loader as AppDirec...
0x0aNL/p2pool-0x0a
refs/heads/master
p2pool/bitcoin/networks/smartcoin.py
8
import os import platform from twisted.internet import defer from .. import data, helper from p2pool.util import pack P2P_PREFIX = 'defaced0'.decode('hex') #pchmessagestart P2P_PORT = 58585 ADDRESS_VERSION = 63 #pubkey_address RPC_PORT = 58583 RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue( ...
ptemplier/ansible
refs/heads/devel
lib/ansible/module_utils/docker_common.py
27
# # Copyright 2016 Red Hat | Ansible # # 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. # # ...
zlsun/VisualAlgorithm
refs/heads/master
src/structures/list.py
1
from .base import * class List(Base, list): def __init__(self, value=[]): Base.__init__(self) list.__init__(self, value) def __getitem__(self, i): item = list.__getitem__(self, i) if isinstance(item, list): item = List(item) return item def get_pen(s...
trankmichael/scipy
refs/heads/master
scipy/spatial/setup.py
44
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from os.path import join def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs from numpy.distutils.system_info import get_info from distutils...
gpfreitas/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/concepts_plotting.py
50
from bokeh.plotting import figure, output_file, show # create a Figure object p = figure(width=300, height=300, tools="pan,reset,save") # add a Circle renderer to this figure p.circle([1, 2.5, 3, 2], [2, 3, 1, 1.5], radius=0.3, alpha=0.5) # specify how to output the plot(s) output_file("foo.html") # display the fig...
andris210296/andris-projeto
refs/heads/master
backend/venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py
1005
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
drawquest/drawquest-web
refs/heads/master
common/boto/route53/record.py
15
# Copyright (c) 2010 Chris Moyer http://coredumped.org/ # 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 restriction, including # without limitation the rights...
melvon22/osmc
refs/heads/master
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x030.py
248
data = ( ' ', # 0x00 ', ', # 0x01 '. ', # 0x02 '"', # 0x03 '[JIS]', # 0x04 '"', # 0x05 '/', # 0x06 '0', # 0x07 '<', # 0x08 '> ', # 0x09 '<<', # 0x0a '>> ', # 0x0b '[', # 0x0c '] ', # 0x0d '{', # 0x0e '} ', # 0x0f '[(', # 0x10 ')] ', # 0x11 '@', # 0x12 'X ', # ...
patrickm/chromium.src
refs/heads/nw
third_party/jinja2/_compat.py
638
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
ChenJunor/hue
refs/heads/master
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/jobs/daily/cache_cleanup.py
35
""" Daily cleanup job. Can be run as a cronjob to clean out old data from the database (only expired sessions at the moment). """ import six from contextlib import contextmanager from django_extensions.management.jobs import DailyJob class Job(DailyJob): help = "Cache (db) cleanup Job" def execute(self): ...
pilou-/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py
55
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
dvliman/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.2/tests/modeltests/mutually_referential/tests.py
91
from django.test import TestCase from models import Parent, Child class MutuallyReferentialTests(TestCase): def test_mutually_referential(self): # Create a Parent q = Parent(name='Elizabeth') q.save() # Create some children c = q.child_set.create(name='Charles') e ...
datsfosure/ansible
refs/heads/devel
contrib/inventory/vbox.py
111
#!/usr/bin/env 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 distr...
4rado/RepositoryForProject
refs/heads/master
Lib/site-packages/numpy/polynomial/tests/test_polynomial.py
54
"""Tests for polynomial module. """ from __future__ import division import numpy as np import numpy.polynomial.polynomial as poly from numpy.testing import * def trim(x) : return poly.polytrim(x, tol=1e-6) T0 = [ 1] T1 = [ 0, 1] T2 = [-1, 0, 2] T3 = [ 0, -3, 0, 4] T4 = [ 1, 0, -8, 0, 8] T5 = [ 0...
htzy/bigfour
refs/heads/master
common/lib/xmodule/xmodule/tests/test_textannotation.py
92
# -*- coding: utf-8 -*- "Test for Annotation Xmodule functional logic." import unittest from mock import Mock from lxml import etree from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from xmodule.textannotation_module import TextAnnotationModule from . import get_test_system class Tex...
tensorflow/benchmarks
refs/heads/master
scripts/tf_cnn_benchmarks/benchmark_cnn_distributed_test_runner.py
1
# 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...
sergio-incaser/odoo
refs/heads/8.0
addons/email_template/tests/test_mail.py
190
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
robbrockbank/calicoctl
refs/heads/master
calico_containers/calico_ctl/utils.py
3
# Copyright 2015 Metaswitch Networks # # 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 w...
Ant-OS/android_packages_apps_OTAUpdates
refs/heads/master
jni/boost_1_57_0/tools/build/src/tools/doxproc.py
50
#!/usr/bin/python # Copyright 2006 Rene Rivera # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) ''' Processing of Doxygen generated XML. ''' import os import os.path import sys import time import string import getopt import ...
ericholscher/pinax
refs/heads/master
pinax/apps/authsub/urls.py
3
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^login/$', 'authsub.views.login', name="authsub_login"), )
samsu/networking-fortinet
refs/heads/master
networking_fortinet/virt/libvirt/volume/quobyte.py
18
# Copyright (c) 2015 Quobyte 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...
Jindam/HPCGISLab
refs/heads/master
pcml/core/BoundingBox.py
1
""" Copyright (c) 2014 High-Performance Computing and GIS (HPCGIS) Laboratory. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Authors and contributors: Eric Shook (eshook@kent.edu); Zhengliang Feng (odayfans@gmail.com, zfeng2@kent.edu) """ from ..u...
bandwidthcom/python-bandwidth-iris
refs/heads/master
iris_sdk/models/maps/note.py
2
#!/usr/bin/env python from iris_sdk.models.maps.base_map import BaseMap class NoteMap(BaseMap): description = None id = None last_date_modifier = None user_id = None
AppEnlight/channelstream
refs/heads/master
channelstream/wsgi_views/server.py
1
import logging from datetime import datetime import gevent import gevent.util from apispec import APISpec from apispec.ext.marshmallow import MarshmallowPlugin from gevent.queue import Queue, Empty from pyramid.httpexceptions import HTTPUnauthorized, HTTPFound from pyramid.security import remember, forget, NO_PERMISSI...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/helpers/pydev/tests_pydevd/test_pydevconsole.py
21
import threading import unittest import sys import os try: import pydevconsole except: sys.path.append(os.path.dirname(os.path.dirname(__file__))) import pydevconsole from _pydev_bundle.pydev_imports import xmlrpclib, SimpleXMLRPCServer, StringIO try: raw_input raw_input_name = 'raw_input' except ...
arnavd96/Cinemiezer
refs/heads/master
myvenv/lib/python3.4/site-packages/future/moves/html/parser.py
82
from __future__ import absolute_import from future.utils import PY3 __future_module__ = True if PY3: from html.parser import * else: from HTMLParser import *
mlperf/training_results_v0.7
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/python/mxnet/symbol/numpy/_internal.py
26
# 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...
windyuuy/opera
refs/heads/master
chromium/src/third_party/python_26/Lib/test/test_iter.py
80
# Test iterators. import unittest from test.test_support import run_unittest, TESTFN, unlink, have_unicode # Test result of triple loop (too big to inline) TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 0, 0), (1,...
lamby/python-social-auth
refs/heads/master
social/backends/soundcloud.py
83
""" Soundcloud OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/soundcloud.html """ from social.p3 import urlencode from social.backends.oauth import BaseOAuth2 class SoundcloudOAuth2(BaseOAuth2): """Soundcloud OAuth authentication backend""" name = 'soundcloud' AUTHORIZATION_URL = ...
mosterta/libyuv
refs/heads/master
setup_links.py
140
#!/usr/bin/env python # Copyright 2014 The LibYuv Project Authors. All rights reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contri...
yyuu/botornado
refs/heads/master
boto/vpc/vpngateway.py
33
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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 restriction, including # without limitation the rights to use, copy, modi...
bbockelm/root-historical
refs/heads/master
interpreter/llvm/src/tools/clang/bindings/python/tests/cindex/test_translation_unit.py
4
import gc import os from clang.cindex import CursorKind from clang.cindex import Cursor from clang.cindex import File from clang.cindex import Index from clang.cindex import SourceLocation from clang.cindex import SourceRange from clang.cindex import TranslationUnitSaveError from clang.cindex import TranslationUnit fr...
iabdalkader/openmv
refs/heads/master
scripts/examples/29-IMU-Shield/imu_read.py
1
from machine import I2C from bno055 import BNO055, AXIS_P7 import time i2c = I2C(2) imu = BNO055(i2c) while True: #temperature = imu.temperature() #print('temperature: ℃',temperature) yaw, roll, pitch = imu.euler() print('yaw, roll, pitch: °', yaw, roll, pitch) #w, x, y, z = imu.quaternion() #pr...
luvit/gyp
refs/heads/luvit-dev
test/same-rule-output-file-name/gyptest-all.py
342
#!/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. """ Tests the use of rules with the same output file name. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('subdirs.gyp', chdir=...
o5k/openerp-oemedical-v0.1
refs/heads/master
openerp/addons/oemedical/oemedical_radiology/oemedical_radiology.py
1
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free sof...
Ichag/odoo
refs/heads/8.0
addons/gamification/wizard/update_goal.py
386
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
ARUP-NGS/BMFtools
refs/heads/master
scripts/get_aaf.py
1
import pysam try: from cytoolz import frequencies as freq except ImportError: try: from stl.util import freq except ImportError: from collections import Counter as freq def plp_pos(bam, contig, pos): """ bampath, contig (string), position """ return c def aaf_pos(bam, cont...
Dr-Willy/blender-mitsuba
refs/heads/master
gen_lookat_params.py
1
# Tool for mtsblend (mitsuba for blender) # # ***** BEGIN GPL LICENSE BLOCK ***** # # 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 lat...
xxsergzzxx/python-for-android
refs/heads/master
python-build/python-libs/gdata/tests/gdata_tests/client_online_test.py
87
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
jylaxp/django
refs/heads/master
django/db/backends/postgresql/schema.py
202
import psycopg2 from django.db.backends.base.schema import BaseDatabaseSchemaEditor class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_alter_column_type = "ALTER COLUMN %(column)s TYPE %(type)s USING %(column)s::%(type)s" sql_create_sequence = "CREATE SEQUENCE %(sequence)s" sql_delete_sequence =...
shaswatsunder/aakashlabs-forum
refs/heads/master
django-taggit/build/lib.linux-i686-2.7/taggit_autocomplete_modified/urls.py
2
# -*- coding: utf-8 -*- # # This file is part of django-taggit-autocomplete-modified. # # django-taggit-autocomplete-modified provides autocomplete functionality # to the tags form field of django-taggit. # # Development Web Site: # - http://www.codetrax.org/projects/django-taggit-autocomplete-modified # Public...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/ARB/clear_texture.py
9
'''OpenGL extension ARB.clear_texture This module customises the behaviour of the OpenGL.raw.GL.ARB.clear_texture to provide a more Python-friendly API Overview (from the spec) Texture objects are fundamental to the operation of OpenGL. They are used as a source for texture sampling and destination for renderin...
yury-s/v8-inspector
refs/heads/master
Source/chrome/tools/gyp/test/mac/gyptest-objc-gc.py
165
#!/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. """ Verifies that GC objc settings are handled correctly. """ import TestGyp import TestMac import sys if sys.platform == 'darwin': # s...
recq-cse/RecQ
refs/heads/master
tool/qmath.py
2
from numpy.linalg import norm from math import sqrt,exp def l1(x): return norm(x,ord=1) def l2(x): return norm(x) def common(x1,x2): # find common ratings common = (x1<>0)&(x2<>0) new_x1 = x1[common] new_x2 = x2[common] return new_x1,new_x2 def cosine_sp(x1,x2): 'x1,x2 are dicts,this...
bt3gl/NetAna-Complex-Network-Analysis
refs/heads/master
src/calculate_features/helpers/save.py
2
#!/usr/bin/env python __author__ = "Mari Wahl" __copyright__ = "Copyright 2014, The Cogent Project" __credits__ = ["Mari Wahl"] __license__ = "GPL" __version__ = "4.1" __maintainer__ = "Mari Wahl" __email__ = "marina.w4hl@gmail.com" ''' Save the feature vectors into a output file. ''' def save_feature(pat...
jessamynsmith/fontbakery
refs/heads/master
bakery_cli/ttfont.py
1
# coding: utf-8 # Copyright 2013 The Font Bakery 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 # # Unles...
marado/pytalker
refs/heads/master
commands-en/go.py
1
# -*- coding: latin -*- MSG = "%s %s" NO_ARGS = "Go where?" GO_USER = "You went to room \"%s\"" NO_SUCH_ROOM = "No such room \"%s\"." HELP = """Usage: .go <room>\r Moves the user to room <room>.""" import os import src.messages from config.config import ROOMS_DIR from src.userdata import ROOM_FIELD class Execute: d...
zottejos/merelcoin_oud
refs/heads/master
qa/rpc-tests/walletbackup.py
131
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send ...
kfcpaladin/sze-the-game
refs/heads/orphan
renpy/minstore.py
1
# Copyright 2004-2017 Tom Rothamel <pytom@bishoujo.us> # # 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 restriction, # including without limitation the rights to use, copy, modify, m...
srikantbmandal/ansible
refs/heads/devel
lib/ansible/executor/process/__init__.py
2520
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 License, or # (at your option) an...
John-Hart/autorest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/operations/date_model.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
akionakamura/scikit-learn
refs/heads/master
examples/cluster/plot_kmeans_digits.py
230
""" =========================================================== A demo of K-Means clustering on the handwritten digits data =========================================================== In this example we compare the various initialization strategies for K-means in terms of runtime and quality of the results. As the gr...
jbedorf/tensorflow
refs/heads/master
tensorflow/examples/adding_an_op/zero_out_grad_2.py
183
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tectronics/engayged
refs/heads/master
vendors/views.py
1
# Copyright 2011 Ryan W Sims (rwsims@gmail.com) # # 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...
turi-code/SFrame
refs/heads/master
oss_src/unity/python/sframe/test/test_image_type.py
5
''' Copyright (C) 2016 Turi All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' import array import unittest from PIL import Image as PIL_Image import os from ..data_structures import image from .. import SArray from ..toolkits.i...
ujjwalwahi/odoo
refs/heads/8.0
addons/event_sale/__init__.py
428
# -*- 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...
Tong-Chen/scikit-learn
refs/heads/master
sklearn/tests/test_init.py
47
# Basic unittests to test functioning of module's top-level __author__ = 'Yaroslav Halchenko' __license__ = 'BSD' from sklearn.utils.testing import assert_equal try: from sklearn import * _top_import_error = None except Exception as e: _top_import_error = e def test_import_skl(): """Test either ab...