repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
LordDamionDevil/Lony
refs/heads/master
lib/youtube_dl/extractor/normalboots.py
67
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .jwplatform import JWPlatformIE from ..utils import ( unified_strdate, ) class NormalbootsIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?normalboots\.com/video/(?P<id>[0-9a-z-]*)/?$' _TEST = { 'u...
Elico-Corp/odoo_OCB
refs/heads/9.0
addons/l10n_hr/__openerp__.py
18
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Author: Goran Kliska # mail: goran.kliska(AT)slobodni-programi.hr # Copyright (C) 2011- Slobodni programi d.o.o., Zagreb # Contributions: # Tomislav Bošnjaković, Storm Computers d.o.o. : # - ac...
rue89-tech/edx-platform
refs/heads/master
common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py
189
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'TrackingLog.host' db.add_column('track_trackinglog', 'host', self.gf('...
vvuk/servo
refs/heads/master
tests/wpt/harness/wptrunner/executors/executorservo.py
35
# 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 base64 import hashlib import httplib import json import os import subprocess import tempfile import threading imp...
ktsitsikas/odemis
refs/heads/master
src/odemis/gui/comp/radio.py
2
# -*- coding: utf-8 -*- """ @author: Rinze de Laat Copyright © 2012 Rinze de Laat, Delmic Custom (graphical) radio button control. This file is part of Odemis. Odemis 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 Soft...
avoinsystems/account-financial-tools
refs/heads/12.0
account_chart_update/__manifest__.py
1
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2016 Jacques-Etienne Baudoux <je@bcim.be> # Copyright 2016 Sylvain Van Hoof <sylvain@okia.be> # Copyright 2015-2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Detect changes and update ...
PeterFaiman/ruby-grpc-minimal
refs/heads/v1.8.x-minimal
src/python/grpcio_tests/tests/interop/_intraop_test_case.py
16
# Copyright 2015 gRPC authors. # # 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...
SUSE/azure-sdk-for-python
refs/heads/master
azure-mgmt-compute/azure/mgmt/compute/compute/v2016_04_30_preview/models/image_data_disk.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 ...
kailIII/geraldo
refs/heads/master
site/newsite/django_1_0/django/core/management/commands/runfcgi.py
674
from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Runs this project as a FastCGI application. Requires flup." args = '[various KEY=val options, use `runfcgi help` for help]' def handle(self, *args, **options): from django.conf import settings from djan...
keisuke-umezawa/chainer
refs/heads/master
chainer/functions/array/get_item.py
8
import numpy import chainer from chainer import backend from chainer import function_node from chainer import utils from chainer.utils import type_check from chainer import variable import chainerx _numpy_supports_0d_bool_index = \ numpy.lib.NumpyVersion(numpy.__version__) >= '1.13.0' class GetItem(function_no...
SurfasJones/icecream-info
refs/heads/master
icecream/lib/python2.7/site-packages/djangocms_file/__init__.py
279
__version__ = '0.0.1'
paulsmith/geodjango
refs/heads/master
django/contrib/gis/gdal/prototypes/errcheck.py
7
""" This module houses the error-checking routines used by the GDAL ctypes prototypes. """ from ctypes import c_void_p, string_at from django.contrib.gis.gdal.error import check_err, OGRException, SRSException from django.contrib.gis.gdal.libgdal import lgdal # Helper routines for retrieving pointers and/or values f...
cemoody/chainer
refs/heads/master
cupy/linalg/solve.py
20
# flake8: NOQA # "flake8: NOQA" to suppress warning "H104 File contains nothing but comments" # TODO(okuta): Implement solve # TODO(okuta): Implement tensorsolve # TODO(okuta): Implement lstsq # TODO(okuta): Implement inv # TODO(okuta): Implement pinv # TODO(okuta): Implement tensorinv
QuantConnect/Lean
refs/heads/master
Algorithm.Python/InsightWeightingFrameworkAlgorithm.py
3
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Licen...
jaggu303619/asylum-v2.0
refs/heads/master
openerp/addons/google_base_account/wizard/google_login.py
53
# -*- 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...
tersmitten/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_direct_connect_connection.py
39
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = """ --- module...
stopstalk/stopstalk-deployment
refs/heads/master
aws_lambda/spoj_aws_lambda_function/lambda_code/lxml/html/diff.py
71
import difflib from lxml import etree from lxml.html import fragment_fromstring import re __all__ = ['html_annotate', 'htmldiff'] try: from html import escape as html_escape except ImportError: from cgi import escape as html_escape try: _unicode = unicode except NameError: # Python 3 _unicode = st...
teodoc/home-assistant
refs/heads/master
homeassistant/components/sensor/systemmonitor.py
8
""" homeassistant.components.sensor.systemmonitor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shows system monitor values such as: disk, memory and processor use Configuration: To use the System monitor sensor you will need to add something like the following to your config/configuration.yaml sensor: platform: ...
mumuwoyou/vnpy-master
refs/heads/master
vnpy/trader/app/spreadTrading/stAlgo.py
4
# encoding: UTF-8 from math import floor from vnpy.trader.vtConstant import (EMPTY_INT, EMPTY_FLOAT, EMPTY_STRING, EMPTY_UNICODE, DIRECTION_LONG, DIRECTION_SHORT, STATUS_ALLTRADED, STATUS_CANCELLED, STATUS_REJ...
caterinaurban/Typpete
refs/heads/master
typpete/src/stubs/functions.py
1
"""Stub file for built in functions""" from typing import TypeVar, List, Tuple, Dict, Set, Union, Type, Callable, Generic from sys import IO Tf = TypeVar("Tf") Uf = TypeVar("Uf") Num = TypeVar("Num", bound=complex) IntOrFloat = TypeVar("IntOrFloat", int, float) Str = TypeVar("Str", str, bytes) Seq = TypeVar("Seq", Str...
edx/ansible
refs/heads/stable-1.9-plus-edx
v2/ansible/utils/cli.py
8
# (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...
vlegoff/tsunami
refs/heads/master
src/primaires/objet/types/indefini.py
1
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 copyright notice, this ...
saguas/frappe
refs/heads/develop
frappe/geo/doctype/currency/currency.py
69
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: See license.txt from __future__ import unicode_literals import frappe from frappe import throw, _ from frappe.model.document import Document class Currency(Document): def validate(self): if not frappe.flags.in_install_app: frappe.c...
40223114/2015_g4
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py
733
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
dine1987/Docker
refs/heads/master
tests/test_run_gunicorn.py
37
# -*- coding: utf-8 -*- import unittest import docker_registry.run as run import mock class TestRunGunicorn(unittest.TestCase): @mock.patch('argparse.ArgumentParser.parse_args') @mock.patch('os.execl') def test_exec_gunicorn(self, mock_execl, mock_parse_args): run.run_gunicorn() self.a...
damianrusinek/classes-pas
refs/heads/master
kik/client.py
1
import sys import socket from kikutils import * MY_SIGN = 'x' THEIR_SIGN = 'o' if __name__ == "__main__": if len(sys.argv) != 3: sys.stderr.write("usage: %s ip port\n" % (sys.argv[0], )) exit(1) try: addr = sys.argv[1] port = int(sys.argv[2]) assert port > 0 except: sys.stderr.write("...
cubaeurokatmic/gui
refs/heads/master
lib/python/Components/Renderer/VolumeText.py
52
####################################################################### # # # Volume Text Renderer for Dreambox/Enigma-2 # Coded by Vali (c)2010 # Support: www.dreambox-tools.info # # # This plugin is licensed under the Creative Commons # Attribution-NonCommercial-ShareAlike 3.0 Unported License. # To view...
karllessard/tensorflow
refs/heads/master
tensorflow/lite/testing/op_tests/identity.py
16
# Copyright 2019 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...
robovm/robovm-studio
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/sshserver.py
93
# sshserver.py - ssh protocol server support for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import util, ...
magicrub/MissionPlanner
refs/heads/master
Lib/encodings/iso8859_3.py
93
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.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 decode(self,i...
duke2007/koy
refs/heads/master
blog/tests.py
24123
from django.test import TestCase # Create your tests here.
nerosketch/djing
refs/heads/master
gw_app/urls.py
2
from django.urls import path from gw_app import views app_name = 'gw_app' urlpatterns = [ path('', view=views.NasListView.as_view(), name='home'), path('add/', view=views.NasCreateView.as_view(), name='add'), path('<int:nas_id>/del/', views.NasDeleteView.as_view(), name='del'), path('<int:nas_id>/ed...
srishanbhattarai/Harbor-CLI
refs/heads/dev
packages/cli/tests/utils/test_branch.py
1
''' Test for branch utility. ''' from lib.utils.branch import branch def test_branch_v0(): ''' It works correctly for truthy predicate. ''' truthy_predicate = lambda *args: True string_1 = 'Hello world' string_2 = 'Foo bar' value = branch(truthy_predicate)(string_1, string_2) assert value == ...
LeonBondeLarsen/ATS
refs/heads/master
box1monitor/bin/get_temperature.py
2
from sense_hat import SenseHat sense = SenseHat() print(round(sense.get_temperature(),1))
selaux/ck2launcher-gtk
refs/heads/master
ck2launcher.py
1
#!/usr/bin/python # This is an alternative launcher for Crusader Kings 2 # Dependencies: pygobject, appdirs import os import subprocess import json import glob import re import appdirs from gi.repository import Gtk from gi.repository import Gdk APP_NAME = 'ck2-launcher' DLC_DEFAULT_SELECTION = True MOD_DEFAULT_SELEC...
erudit/eruditorg
refs/heads/master
eruditorg/erudit/fedora/cache.py
1
# -*- coding: utf-8 -*- import typing import random import requests import structlog from django.conf import settings from django.core.cache import cache from django.utils.translation import get_language from requests.exceptions import HTTPError, ConnectionError from sentry_sdk import configure_scope from erudit.cach...
wenhuizhang/neutron
refs/heads/master
neutron/ipam/requests.py
25
# 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 # d...
amasiero/approach_control
refs/heads/master
approach_control_sm/nodes/sm_test_04.py
1
#!/usr/bin/env python import rospy import roslib; roslib.load_manifest('approach_control_sm') import smach import smach_ros import time from approach_control_speech import Say, Recognizer from approach_control_people.skeleton import CheckDistance from approach_control_navigation import GoToLocation, SetInitialPositio...
anthonydillon/horizon
refs/heads/master
doc/source/conf.py
17
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
cyrustabatab/mptcp
refs/heads/master
examples/wireless/mixed-wireless.py
48
# /* # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the ...
edosedgar/xs-pkg
refs/heads/master
algoCourse/hw5/solution_opt.py
1
def calc_wrapping(cost, N): # To convert array of positions of new lines to # number of lines def get_num_of_lines(p, N): if (p[N] == 1): return 1 else: return get_num_of_lines(p, p[N] - 1) + 1 # Generate array of position for each new line # and buffer array...
jmehnle/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py
31
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # # This module 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 opti...
weka-io/boto
refs/heads/develop
tests/integration/s3/mock_storage_service.py
108
# Copyright 2010 Google Inc. # # 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, merge, publish, dis- # trib...
sparkslabs/kamaelia
refs/heads/master
Sketches/RJL/Packages/Kamaelia/Community/RJL/Kamaelia/Util/__init__.py
129
# -*- coding: utf-8 -*- # Needed to allow import # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache Lice...
Zaneh-/bearded-tribble-back
refs/heads/master
taiga/hooks/github/event_hooks.py
1
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
molguin92/paramics_traci
refs/heads/master
traci_client_test/runner.py
1
#!/usr/bin/env python import os import sys import optparse import subprocess import random import time SIMTIME = 0x70 DEPARTEDVHCLST = 0x74 ARRIVEDVHCLST = 0x7a # we need to import python modules from the $SUMO_HOME/tools directory try: sys.path.append(os.path.join(os.path.dirname( __file__), '..', '..',...
techtonik/numpy
refs/heads/master
numpy/matrixlib/__init__.py
140
"""Sub-package containing the matrix class and related functions. """ from __future__ import division, absolute_import, print_function from .defmatrix import * __all__ = defmatrix.__all__ from numpy.testing import Tester test = Tester().test bench = Tester().bench
dya2/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/generator_failure_tests.py
49
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Python 2.5+ test cases for failures thrown into generators. """ import sys import traceback from twisted.trial.unittest import TestCase from twisted.python.failure import Failure from twisted.internet import defer # Re-implement ...
ptisserand/ansible
refs/heads/devel
lib/ansible/modules/database/influxdb/influxdb_write.py
111
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (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...
tinfoil/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
124
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
JioCloud/ceilometer
refs/heads/master
tests/compute/test_notifications.py
3
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # Copyright © 2013 eNovance # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in com...
Alex-Ian-Hamilton/sunpy
refs/heads/master
sunpy/net/helio/parser.py
1
# -*- coding: utf-8 -*- # Author: Michael Malocha <mjm159@humboldt.edu> # Last Edit: September 22nd, 2013 # # This module was developed with funding from the GSOC 2013 summer of code # """ This module is meant to parse the HELIO registry and return WSDL endpoints to facilitate the interfacing between further module...
alexthered/kienhoc-platform
refs/heads/master
common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py
114
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CourseMode.expiration_datetime' db.add_column('course_modes_coursemode', 'expiration_datetim...
hckiang/DBLite
refs/heads/master
boost_1_54_0/tools/build/v2/test/core_typecheck.py
45
#!/usr/bin/python # Copyright 2003 Vladimir Prus # 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) # This tests the typechecking facilities. import BoostBuild t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0) t.write("...
mahak/nova
refs/heads/master
nova/scheduler/filters/compute_capabilities_filter.py
2
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
Pafcholini/linux-3.10.y
refs/heads/linux-3.10.y
tools/perf/tests/attr.py
3174
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/isort/__init__.py
9
"""__init__.py. Defines the isort module to include the SortImports utility class as well as any defined settings. Copyright (C) 2013 Timothy Edmund Crosley 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 t...
googlefonts/nototools
refs/heads/main
setup.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages # with open("README.rst", 'r') as readme_file: # readme = readme_file.read() readme = """Noto font tools are a set of scripts useful for release engineering of Noto and similar fonts""" setup( name="notofonttools", u...
hidekb/espressopp
refs/heads/master
src/tools/lattice.py
7
# Copyright (C) 2012,2013,2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms...
queenp/wakatime
refs/heads/master
wakatime/packages/pygments_py2/pygments/lexers/c_cpp.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.c_cpp ~~~~~~~~~~~~~~~~~~~~~ Lexers for C/C++ languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, using, \ this...
zasdfgbnm/tensorflow
refs/heads/master
tensorflow/contrib/eager/python/examples/gan/mnist_graph_test.py
35
# 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...
shdowofdeath/rally
refs/heads/master
tests/unit/plugins/openstack/scenarios/nova/test_security_group.py
5
# Copyright 2014: Mirantis 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 b...
raspberrywhite/raspberrywhite
refs/heads/master
server/views.py
1
from django.contrib import auth from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contrib.auth import logout as logout_user from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from django.core.paginator import Paginato...
strk/QGIS
refs/heads/master
python/core/auto_additions/qgsnetworkcontentfetcherregistry.py
37
# The following has been generated automatically from src/core/qgsnetworkcontentfetcherregistry.h QgsNetworkContentFetcherRegistry.FetchingMode.baseClass = QgsNetworkContentFetcherRegistry
yonglehou/scikit-learn
refs/heads/master
examples/cluster/plot_lena_compress.py
271
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= Vector Quantization Example ========================================================= The classic image processing example, Lena, an 8-bit grayscale bit-depth, 512 x 512 sized image, is used here to illustrate how ...
GetSomeBlocks/Score_Soccer
refs/heads/master
resources/lib/twisted/twisted/spread/flavors.py
56
# -*- test-case-name: twisted.test.test_pb -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ This module represents flavors of remotely acessible objects. Currently this is only objects accessible through Perspective Broker, but will hopefully encompass all forms of remote acce...
kevinmost/LiteSync
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/distlib/wheel.py
164
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from_file...
shssoichiro/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_handshake_hybi00.py
466
#!/usr/bin/env python # # Copyright 2011, Google Inc. # 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 copyright # notice, this list...
jgraham/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/user_input/clear_test.py
58
# -*- mode: python; fill-column: 100; comment-column: 100; -*- import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test from webdriver import exceptions class ElementClearTest(base_test.WebDriverBaseTest): def test_writable_text_input_element_sho...
pilou-/ansible
refs/heads/devel
lib/ansible/modules/network/frr/frr_facts.py
34
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2019, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
mahantheshhv/ibis
refs/heads/master
ibis/expr/tests/__init__.py
12133432
dweinstein/mitmproxy
refs/heads/master
test/scripts/loaderr.py
44
a = x
dbrattli/python-gearshift
refs/heads/master
gearshift/command/base.py
1
"""Commands for the TurboGears command line tool.""" import glob import optparse import os import sys import pkg_resources import configobj import gearshift from gearshift.util import get_model, load_project_config, \ get_project_config, get_package_name from gearshift.identity import SecureObject, from_any_...
lqhuang/SAXS-tools
refs/heads/master
RAW/SASCalib.py
1
''' Created on Jul 11, 2010 @author: Soren S. Nielsen #****************************************************************************** # This file is part of RAW. # # RAW 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 S...
8191/ansible
refs/heads/devel
lib/ansible/runner/action_plugins/pause.py
9
# Copyright 2012, Tim Bielawa <tbielawa@redhat.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 later...
ordinary-developer/lin_education
refs/heads/master
books/techno/python/fluent_python_l_ramalho/code/ch_2-an_array_of_sequences/04-cartesian_products/main.py
2
if __name__ == '__main__': colors = ['black', 'white'] sizes = ['S', 'M', 'L'] tshirts = [(color, size) for color in colors for size in sizes] print(tshirts) for color in colors: for size in sizes: print((color, size)) tshirts = [(color, size) for size in sizes ...
ryanneufeld/OctoPrint
refs/heads/master
src/octoprint/plugins/softwareupdate/updaters/pip.py
17
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import pkg_r...
windyuuy/opera
refs/heads/master
chromium/src/chrome/test/functional/chromeos_vpn.py
52
#!/usr/bin/env python # Copyright (c) 2011 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 os import subprocess import pyauto_functional import pyauto import chromeos_network class PrivateNetworkTest(chromeos_net...
d33tah/npyscreen
refs/heads/master
npyscreen/compatibility_code/oldtreeclasses.py
15
from .. import wgmultiline as multiline from .. import wgcheckbox as checkbox from ..wgmultilinetree import TreeLine, TreeLineAnnotated ##################################################################################### # The Following are maintained here for compatibility only. # All new Applications should use n...
loechel/lmu.contenttypes.polls
refs/heads/master
src/lmu/contenttypes/polls/browser/__init__.py
12133432
iyer-arvind/PyFR
refs/heads/develop
pyfr/scripts/__init__.py
12133432
san-mate/python-social-auth
refs/heads/master
social/tests/backends/__init__.py
12133432
eemirtekin/edx-platform
refs/heads/master
common/djangoapps/request_cache/__init__.py
12133432
mainakibui/kobocat
refs/heads/master
onadata/libs/mixins/view_permission_mixin.py
10
from django.core.exceptions import ImproperlyConfigured from guardian.shortcuts import get_objects_for_user class ViewPermissionMixin(object): def get_queryset(self): """ Get the list of items for this view based on user's view_%(model_name)s permissions. """ self.model = ...
snahelou/awx
refs/heads/devel
awx/main/south_migrations/0053_v210_changes.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'JobTemplate.survey_enabled' db.add_column(u'main_jobtempl...
ssebastianj/ia2013-tpi-rl
refs/heads/master
src/tests/entrenar_tests.py
1
#!/usr/bin/env python # ! -*- coding: utf-8 -*- from __future__ import absolute_import import csv import decimal import Queue import multiprocessing import numpy import os import sys import threading import time sys.path.append(os.path.abspath(os.path.join(os.pardir))) from core.qlearning.qlearning import QLearning...
artemutin/beets
refs/heads/master
test/test_mediafile_edge.py
10
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
XperiAMM/android_kernel_lge_msm8226
refs/heads/maxi-6.0
tools/perf/scripts/python/sched-migration.py
11215
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
libsmelt/Simulator
refs/heads/master
contrib/python-graph/core/pygraph/algorithms/filters/find.py
26
# Copyright (c) 2008-2009 Pedro Matiello <pmatiello@gmail.com> # # 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,...
AbdealiJK/coala
refs/heads/master
tests/parsing/StringProcessing/EscapeTest.py
17
from coalib.parsing.StringProcessing import escape from tests.parsing.StringProcessing.StringProcessingTestBase import ( StringProcessingTestBase) class EscapeTest(StringProcessingTestBase): # Test escape() using a single character to escape and default parameters. def test_normal_behaviour(self): ...
ol-loginov/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/ja/__init__.py
12133432
roaet/python-neutronclient
refs/heads/master
neutronclient/v2_0/__init__.py
12133432
aligoren/NameParser
refs/heads/master
setup.py
1
from distutils.core import setup setup( name = 'NameParser', version = '0.1', url = 'https://github.com/aligoren/NameParser', download_url = 'https://github.com/aligoren/NameParser/archive/master.zip', author = 'Ali GOREN <goren.ali@yandex.com>', author_email = 'goren.ali@yandex.com', licen...
dturner-tw/pants
refs/heads/master
contrib/node/src/python/pants/contrib/node/__init__.py
12133432
anushbmx/kitsune
refs/heads/master
kitsune/lib/__init__.py
12133432
bobc/Marlin
refs/heads/RC
buildroot/share/scripts/g29_auto.py
184
#!/usr/bin/python3 # This file is for preprocessing gcode and the new G29 Autobedleveling from Marlin # It will analyse the first 2 Layer and return the maximum size for this part # After this it will replace with g29_keyword = ';MarlinG29Script' with the new G29 LRFB # the new file will be created in the same folder....
mikec964/gships
refs/heads/master
spacewarish/__init__.py
12133432
aronsky/home-assistant
refs/heads/dev
homeassistant/components/openuv/config_flow.py
1
"""Config flow to configure the OpenUV component.""" import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from homeassistant.const import ( CONF_API_KEY, CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, CONF_SCAN_INTERVAL) from homeassistant.helpers import ai...
orchidproject/ar2mav
refs/heads/master
scripts/calibrate.py
1
#!/usr/bin/python import rospy from sensor_msgs.msg import CameraInfo from sensor_msgs.srv import SetCameraInfo class CalibrateHelper: def __init__(self, width=640, height=360): self.info = CameraInfo() self.info.width = width self.info.height = height self.info_pub = None def ...
Weuxel/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/variables/variable-in-path/gyptest-variable-in-path.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. """ Make sure <(CONFIGURATION_NAME) variable is correctly expanded. """ import TestGyp import sys test = TestGyp.TestGyp() test.set_confi...