repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
VishvajitP/python-social-auth
refs/heads/master
social/backends/rdio.py
79
""" Rdio OAuth1 and OAuth2 backends, docs at: http://psa.matiasaguirre.net/docs/backends/rdio.html """ from social.backends.oauth import BaseOAuth1, BaseOAuth2, OAuthAuth RDIO_API = 'https://www.rdio.com/api/1/' class BaseRdio(OAuthAuth): ID_KEY = 'key' def get_user_details(self, response): ful...
joshkh/intermine
refs/heads/beta
testmodel/webapp/selenium/test/templates-my-star-test.py
18
from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from test.testmodeltestcase import TestModelTestCase as Super import unittest, re from imuser import TemporaryUser c...
amenonsen/ansible
refs/heads/devel
test/units/module_utils/test_distribution_version.py
21
# -*- coding: utf-8 -*- # Copyright: (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from itertools import product import pytest from ansible.module_utils.six.m...
gangadhar-kadam/sapphire_app
refs/heads/1310
stock/doctype/item_supplier/item_supplier.py
132
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl
ncultra/linux-stable
refs/heads/master
tools/perf/scripts/python/net_dropmonitor.py
2669
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
alanch-ms/PTVS
refs/heads/master
Python/Product/PythonTools/pip_downloader.py
2
# Python Tools for Visual Studio # Copyright(c) Microsoft Corporation # 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 # # THI...
JaapJoris/bps
refs/heads/master
autodidact/migrations/new/0011_programme_degree.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-29 11:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('autodidact', '0010_clear_obsolete_cdns_from_pandocfields'), ] operations = [ ...
aabbox/kbengine
refs/heads/master
kbe/src/lib/python/Tools/pynche/__init__.py
2547
# Dummy file to make this directory a package.
noinil/euler_pysolution
refs/heads/master
python_solutions/p030_Digit_fifth_powers.py
1
#!/usr/bin/env python3 def main(): total = 0 N = 9999999 + 1 for i in range(11, N): if i == sum([int(x)**5 for x in str(i)[:]]): print(i) total = total + i print(total) if __name__ == '__main__': main()
AAROC/invenio
refs/heads/master
invenio/legacy/websearch/templates.py
1
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, # 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software F...
thfield/sf-base-election-data
refs/heads/master
venv/lib/python3.4/site-packages/django/utils/version.py
104
from __future__ import unicode_literals import datetime import os import subprocess from django.utils.lru_cache import lru_cache def get_version(version=None): "Returns a PEP 386-compliant version number from VERSION." version = get_complete_version(version) # Now build the two parts of the version num...
samedder/azure-cli
refs/heads/master
src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/_client_factory.py
5
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
billbonney/ardupilot
refs/heads/master
Tools/autotest/param_metadata/rstemit.py
20
#!/usr/bin/env python from __future__ import print_function import re from param import known_param_fields from emit import Emit import cgi # Emit docs in a RST format class RSTEmit(Emit): def blurb(self): return """This is a complete list of the parameters which can be set (e.g. via the MAVLink protocol)...
lmorchard/django
refs/heads/master
django/db/backends/mysql/operations.py
208
from __future__ import unicode_literals import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import six, timezone from django.utils.encoding import force_text class DatabaseOperations(BaseDatabaseOperations): compiler_module = "djan...
manassolanki/erpnext
refs/heads/develop
erpnext/patches/v7_0/create_warehouse_nestedset.py
21
from __future__ import unicode_literals import frappe, erpnext from frappe import _ from frappe.utils import cint from frappe.utils.nestedset import rebuild_tree def execute(): """ Patch Reference: 1. check whether warehouse is associated to company or not 2. if warehouse is associated with company a. create...
uberamd/NGECore2
refs/heads/master
scripts/object/static/particle/pt_airport_race_light.py
85615
import sys def setup(core, object): return
dsaraujo/circulante
refs/heads/master
django/db/backends/postgresql/operations.py
229
import re from django.db.backends import BaseDatabaseOperations # This DatabaseOperations class lives in here instead of base.py because it's # used by both the 'postgresql' and 'postgresql_psycopg2' backends. class DatabaseOperations(BaseDatabaseOperations): def __init__(self, connection): super(Databas...
easmetz/inasafe
refs/heads/develop
safe/gui/tools/save_scenario.py
4
# coding=utf-8 """ Save Scenario Dialog. Contact : ole.moller.nielsen@gmail.com .. note:: 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 ...
ollie314/browserscope
refs/heads/master
categories/richtext/handlers.py
9
#!/usr/bin/python2.5 # # Copyright 2009 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 or ...
kasioumis/invenio
refs/heads/master
invenio/modules/deposit/testsuite/helpers.py
13
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
davehunt/bedrock
refs/heads/master
bedrock/base/tests/test_static.py
5
from django.test import TestCase from mock import Mock, patch from whitenoise.base import StaticFile from bedrock.base.static import BedrockWhiteNoise class TestBedrockWhiteNoise(TestCase): wn = BedrockWhiteNoise(Mock()) def test_immutable_files(self): with patch.object(self.wn, 'is_immutable_file'...
frankosan/pypers
refs/heads/master
pypers/steps/qc/bamautoqc.py
1
from pypers.core.step import Step import os import re from datetime import datetime class BamAutoQc(Step): """ Run AutoQc against a bam file, parsing outputs from Qplot and bamcheck """ spec = { 'version' : '0.0.1', 'descr' : [ 'Run AutoQc against a bam file, parsing out...
frankvdp/django
refs/heads/master
tests/contenttypes_tests/test_fields.py
130
import json from django.contrib.contenttypes.fields import GenericForeignKey from django.db import models from django.test import SimpleTestCase, TestCase from django.test.utils import isolate_apps from .models import Answer, Question @isolate_apps('contenttypes_tests') class GenericForeignKeyTests(SimpleTestCase):...
msebire/intellij-community
refs/heads/master
python/testData/optimizeImports/sameModuleImportedWithDifferentAliases.py
35
import foo as b import foo import foo as a print(foo, a, b)
jorgehortelano/yowsup-commandserver
refs/heads/master
yowsup_ext/commandserver/layer.py
1
import os import string import subprocess from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback class CommandServerLayer(YowInterfaceLayer): __allowed_users = [] def __init__(self, allowed_users): super(CommandServerLayer, self).__init__() ...
kennedyshead/home-assistant
refs/heads/dev
homeassistant/components/arest/__init__.py
36
"""The arest component."""
JulienMcJay/eclock
refs/heads/master
windows/Python27/Lib/site-packages/pygments/formatters/svg.py
362
# -*- coding: utf-8 -*- """ pygments.formatters.svg ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for SVG output. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt, get...
allenta/vac-templater
refs/heads/master
vac_templater/models/deployment.py
1
# -*- coding: utf-8 -*- ''' :copyright: (c) 2015 by Allenta Consulting S.L. <info@allenta.com>. :license: BSD, see LICENSE.txt for more details. ''' from __future__ import absolute_import from django.db import models from django.utils.translation import ugettext_lazy as _ from vac_templater.models.base import JSONFie...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/connection_reset_shared_key.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 ...
ahb0327/intellij-community
refs/heads/master
python/testData/selectWord/literal/after3.py
83
x = <selection>r"hello world again"</selection>
rsalmaso/django-allauth
refs/heads/master
allauth/socialaccount/providers/patreon/provider.py
2
""" Provider for Patreon """ from django.conf import settings from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider API_VERSION = ( getattr(settings, "SOCIALACCOUNT_PROVIDERS", {}) .get("patreon", {}) .get("VERSION", "...
bop/bauhaus
refs/heads/master
lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/develop.py
65
from setuptools.command.easy_install import easy_install from distutils.util import convert_path, subst_vars from pkg_resources import Distribution, PathMetadata, normalize_path from distutils import log from distutils.errors import DistutilsError, DistutilsOptionError import os, setuptools, glob class develop(easy_in...
imclab/CoECI-CMS-Healthcare-Fraud-Prevention
refs/heads/master
partnerclient/hfppnetwork/partner/appliance/claim_file_processor.py
3
""" Copyright (C) 2010 - 2013 TopCoder Inc., All Rights Reserved. This file contains claim processor. ClaimProcessor is the processor that provides the public methods for writing file data into the persistence and querying data from the persistence into a file. The processor is meant to be the utility used from anoth...
shreyasp/erpnext
refs/heads/develop
erpnext/demo/user/fixed_asset.py
11
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.make_random import get_random from erpnext.accounts.doctype.asset.asset import make_purchase_invoice, make_sales_invoi...
CXQERP/ODOOERP
refs/heads/master
openerp/addons/test_inherit/__openerp__.py
290
# -*- coding: utf-8 -*- { 'name': 'test-inherit', 'version': '0.1', 'category': 'Tests', 'description': """A module to verify the inheritance.""", 'author': 'OpenERP SA', 'maintainer': 'OpenERP SA', 'website': 'http://www.openerp.com', 'depends': ['base'], 'data': [ 'ir.model...
abdellatifkarroum/odoo
refs/heads/8.0
addons/l10n_mx/__init__.py
975
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
zstackio/zstack-woodpecker
refs/heads/master
integrationtest/vm/multihosts/vm_snapshots/paths/sblk_path72.py
1
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=8, path_list=[ [TestAction.create_vm, 'vm1', ], [TestAction.create_volume, 'volume1', 'flag=scsi'], [TestAction.attach_volume, 'vm1', 'volume1'], ...
mscherer/ansible-modules-core
refs/heads/devel
files/assemble.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@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 Lice...
kionetworks/openstack-dashboard-havana
refs/heads/master
openstack_dashboard/api/vpn.py
9
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Mirantis Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
MortalViews/incubator-airflow
refs/heads/master
tests/core.py
2
# -*- 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 ...
CenterForOpenScience/SHARE
refs/heads/develop
share/transformers/org_socarxiv.py
3
from share.transform.chain import links as tools, ChainTransformer from . import io_osf from .io_osf_preprints import ThroughSubjects class Preprint(io_osf.Project): subjects = tools.Map( tools.Delegate(ThroughSubjects), tools.Concat(tools.Static({'text': 'Social and behavioral sciences'})) )...
scotthartbti/android_external_chromium_org
refs/heads/kk44
tools/telemetry/telemetry/unittest/tab_test_case.py
23
# Copyright (c) 2012 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 unittest from telemetry.core import browser_finder from telemetry.unittest import options_for_unittests class TabTestCase(unittest.TestCase): d...
gizmoguy/faucet
refs/heads/master
tests/unit/gauge/test_main.py
7
#!/usr/bin/env python """Test GAUGE main.""" # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
accross/softeng-py
refs/heads/master
teach/3.functions/continue.py
1
for letter in 'Python': if letter == 'h': continue print ('Current Letter :', letter) var = 10 while var > 0: var = var -1 if var == 5: continue print ('Current variable value :', var) print ("Good bye!")
Jaccorot/python
refs/heads/master
kamen/0002/gene_key_save_in_mysql.py
38
import mysql.connector import uuid config={ 'host':'127.0.0.1', 'user':'root', 'password':'', 'port':3306, 'database':'class', 'charset':'utf8' } class sql_struct(): def __init__(self,config): self.config=config def conn_sql(self): try: conn=mysql.con...
ycaihua/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py
2926
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
ABaldwinHunter/django-clone
refs/heads/master
tests/auth_tests/backend_alias.py
512
# For testing that auth backends can be referenced using a convenience import from .test_auth_backends import ImportedModelBackend __all__ = ['ImportedModelBackend']
etuna-SBF-kog/Stadsparken
refs/heads/master
env/lib/python2.7/site-packages/pkg_resources.py
64
"""Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipula...
jkbradley/spark
refs/heads/master
python/setup.py
2
#!/usr/bin/env python3 # # 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 "L...
akhilari7/pa-dude
refs/heads/master
lib/python2.7/site-packages/bs4/tests/test_html5lib.py
38
"""Tests to ensure that the html5lib tree builder generates good trees.""" import warnings try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError, e: HTML5LIB_PRESENT = False from bs4.element import SoupStrainer from bs4.testing import ( HTML5TreeBuilderSmokeTest, ...
qtile/qtile
refs/heads/master
libqtile/widget/sensors.py
2
# -*- coding:utf-8 -*- # Copyright (c) 2012 TiN # Copyright (c) 2012, 2014 Tycho Andersen # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014-2015 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Foster McLane # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
SFPD/rlreloaded
refs/heads/master
3rdparty/climin/util.py
1
# -*- coding: utf-8 -*- import inspect import itertools import random import warnings import numpy as np from gd import GradientDescent from bfgs import Lbfgs from cg import NonlinearConjugateGradient from rprop import Rprop from rmsprop import RmsProp try: from sklearn.grid_search import ParameterSampler exce...
chaos95/fluxxbot
refs/heads/master
pyGBot/Plugins/games/fluxxfiles/goals.py
1
from pyGBot.Plugins.games.fluxxfiles.fluxx import FluxxCard from pyGBot.Plugins.games.fluxxfiles.game import pretty_print_list class GoalCard(FluxxCard): information = """ When you play this card, place it face up in the center of the table. Discard the previous Goal, if any. """.strip() type = "...
axbaretto/beam
refs/heads/master
sdks/python/.tox/lint/lib/python2.7/site-packages/google/protobuf/service.py
242
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
tkwon/dj-stripe
refs/heads/tk
tests/test_card.py
1
""" .. module:: dj-stripe.tests.test_card :synopsis: dj-stripe Card Model Tests. .. moduleauthor:: Alex Kavanaugh (@kavdev) """ from copy import deepcopy from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.test import TestCase from mock.mock import patch ...
afloren/nipype
refs/heads/master
nipype/algorithms/tests/test_auto_MeshWarpMaths.py
8
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.algorithms.mesh import MeshWarpMaths def test_MeshWarpMaths_inputs(): input_map = dict(float_trait=dict(), ignore_exception=dict(nohash=True, usedefault=True, ), in_surf=dict(mandatory=True, ...
barnsnake351/nova
refs/heads/master
nova/scheduler/client/report.py
51
# Copyright (c) 2014 Red Hat, 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 require...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/qwtpolar/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Qwtpolar(QMakePackage): """The QwtPolar library contains classes for displaying values on ...
aifil/odoo
refs/heads/8.0
openerp/report/render/html2html/html2html.py
49
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.report.render.rml2pdf import utils import copy import base64 import cStringIO import re from reportlab.lib.utils import ImageReader _regex = re.compile('\[\[(.+?)\]\]') utils._regex = re.compile('\[\[\s*(.+...
bugobliterator/MAVProxy
refs/heads/master
MAVProxy/modules/mavproxy_rally.py
2
""" MAVProxy rally module """ from pymavlink import mavwp from pymavlink import mavutil import time, os, platform from MAVProxy.modules.lib import mp_module from MAVProxy.modules.lib import mp_util if mp_util.has_wxpython: from MAVProxy.modules.lib.mp_menu import * class RallyModule(mp_module.MPModule): ...
gregvonkuster/tools-iuc
refs/heads/master
tools/calculate_contrast_threshold/calculate_contrast_threshold.py
17
#!/usr/bin/python import getopt import math import sys import numpy as np """ Program to calculate the contrast thresholds for heatmap from tagPileUp CDT """ def rebin(a, new_shape): M, N = a.shape m, n = new_shape if m >= M: # repeat rows in data matrix a = np.repeat(a, math.ceil(float...
grlee77/scipy
refs/heads/master
scipy/optimize/tests/test_minimize_constrained.py
12
import sys import numpy as np import pytest from scipy.linalg import block_diag from scipy.sparse import csc_matrix from numpy.testing import (TestCase, assert_array_almost_equal, assert_array_less, assert_, suppress_warnings, assert_allclose) from pytest import ra...
mihail911/nupic
refs/heads/master
examples/opf/simple_server/demo.py
8
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
saurabh6790/omnit-app
refs/heads/master
stock/page/stock_analytics/__init__.py
37694
from __future__ import unicode_literals
michaelpacer/scikit-image
refs/heads/master
skimage/_shared/tests/test_testing.py
31
""" Testing decorators module """ import numpy as np from nose.tools import (assert_true, assert_raises, assert_equal) from skimage._shared.testing import doctest_skip_parser, test_parallel def test_skipper(): def f(): pass class c(): def __init__(self): self.me = "I think, ther...
simonwydooghe/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_wanopt_content_delivery_network_rule.py
7
#!/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...
google-code-export/django-hotclub
refs/heads/master
apps/core_apps/friends_app/forms.py
6
from django import forms from django.contrib.auth.models import User from friends.models import * from friends.importer import import_vcards try: from notification import models as notification except ImportError: notification = None # @@@ move to django-friends when ready class ImportVCardForm(forms.Form...
fsmos/FSMServer
refs/heads/master
fsm_mn111_python/.ropeproject/config.py
41
# The default ``config.py`` # flake8: noqa def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_fil...
mwringe/kubernetes
refs/heads/master
cluster/juju/return-node-ips.py
583
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
azureplus/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/writer/worksheet.py
61
# file openpyxl/writer/worksheet.py # Copyright (c) 2010 openpyxl # # 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, cop...
c00clupea/measurement
refs/heads/master
cutil/measure_tar.py
1
#!/usr/bin/env python import sys import tempfile from datetime import datetime from os import urandom from os import path from os import access from os import W_OK from os import remove import subprocess def create_file(filename,filesize): record_block = 1024 rand_bytes = urandom(record_block) with open(f...
thienluong/SAFplus-Availability-Scalability-Platform
refs/heads/s7
src/ide/genshi/genshi/template/text.py
7
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
josephlewis42/magpie
refs/heads/master
magpie/lib/jinja2/testsuite/utils.py
415
# -*- coding: utf-8 -*- """ jinja2.testsuite.utils ~~~~~~~~~~~~~~~~~~~~~~ Tests utilities jinja uses. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import gc import unittest import pickle from jinja2.testsuite import JinjaTestCase from jinja2.utils imp...
OakNinja/svtplay-dl
refs/heads/master
lib/svtplay_dl/service/youplay.py
1
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import import re import json import copy from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils import get_http_data from svtplay_dl.utils.urllib import unquote_plus from ...
msunardi/blog
refs/heads/master
RL/Cat vs Mouse exploration/qlearn.py
10
import random class QLearn: def __init__(self, actions, epsilon=0.1, alpha=0.2, gamma=0.9): self.q = {} self.epsilon = epsilon self.alpha = alpha self.gamma = gamma self.actions = actions def getQ(self, state, action): return self.q.get((state, ac...
GNOME/gcompris
refs/heads/master
src/administration-activity/admin/module_groups.py
4
# gcompris - module_groups.py # # Copyright (C) 2005, 2008 Bruno Coudoin and Yves Combe # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your ...
Lyokovic/HomeSound
refs/heads/master
homeSound/populateRedis.py
1
#! /usr/bin/python2 # -*- coding:utf-8 -*- import redis r = redis.StrictRedis() r.set('/radio/current','0') r.set('/airPlaying','0') r.set('/radioPlaying','0') r.set('/device/gpioMode','bcm') r.set('/radio/0/name','Europe 1') r.set('/radio/0/uri','http://vipicecast.yacast.net/europe1') r.set('/radio/1/name','RTL')...
suncycheng/intellij-community
refs/heads/master
python/testData/intentions/PyConvertFormatOperatorToMethodIntentionTest/starWidth.py
33
s = '%*d' % (4, 5)
redshodan/lazarus-ssh
refs/heads/master
contrib/test.py
1
import os, pwd, socket, sys, commands, re, random, types, struct import tty, termios, signal, select, fcntl, errno, time, threading from lssh import sendfd timeout = 5 muxpath = "/home/baron/.ssh/master-baron@myth:22" #class SSHMuxClient(threading.Thread): class SSHMuxClient(object): SSHMUX_VER = 2 SSHMUX_COM...
GEMScienceTools/CatalogueTool-Lite
refs/heads/master
OQCatk/MagRules.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010-2017 GEM Foundation # # The OQ-CATK (Lite) 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, or (at ...
joerg84/arangodb
refs/heads/devel
3rdParty/rocksdb/v5.6.X/tools/db_crashtest.py
5
#! /usr/bin/env python import os import re import sys import time import random import logging import tempfile import subprocess import shutil import argparse # params overwrite priority: # for default: # default_params < blackbox|whitebox_default_params < args # for simple: # simple_default_params < b...
mattaw/SoCFoundationFlow
refs/heads/master
admin/waf/waf-1.8.14/utils/verify-sig.py
5
#! /usr/bin/env python # encoding: ISO8859-1 # Thomas Nagy, 2014-2015 """ A simple file for verifying signatures in signed waf files This script is meant for Python >= 2.6 and the encoding is bytes - ISO8859-1 Distributing detached signatures is boring """ import sys, os, re, subprocess if __name__ == '__main__': ...
h2oai/h2o-2
refs/heads/master
py/testdir_0xdata_only/sphere_gen.py
11
import time, sys, random, math sys.path.extend(['.','..','py']) # a truly uniform sphere # http://stackoverflow.com/questions/5408276/python-uniform-spherical-distribution # he offers the exact solution: http://stackoverflow.com/questions/918736/random-number-generator-that-produces-a-power-law-distribution/918782#918...
mlperf/training_results_v0.7
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/version_converter.py
1
"""onnx version converter This enables users to convert their models between different opsets within the default domain ("" or "ai.onnx"). """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import onnx import onnx.on...
ostwald/scrapi
refs/heads/develop
tests/test_oai_harvester.py
1
from __future__ import unicode_literals import mock import pytest from datetime import date from scrapi import requests from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC @pytest.fixture(autouse=True) def mock_requests(monkeypatch): mock_req = mock.Mock()...
7WebPages/snakepit-game
refs/heads/master
simple/game_loop_global.py
1
import asyncio from aiohttp import web async def handle(request): index = open("index.html", 'rb') content = index.read() return web.Response(body=content, content_type='text/html') async def wshandler(request): app = request.app ws = web.WebSocketResponse() await ws.prepare(request) if ...
oxfordyang2016/learnfluentpython
refs/heads/master
12-inheritance/diamond.py
7
class A: def ping(self): print('ping:', self) class B(A): def pong(self): print('pong:', self) class C(A): def pong(self): print('PONG:', self) class D(B, C): def ping(self): super().ping() print('post-ping:', self) def pingpong(self): self.pin...
Kozea/Radicale
refs/heads/master
radicale/storage/multifilesystem/discover.py
1
# This file is part of Radicale Server - Calendar Server # Copyright © 2014 Jean-Marc Martins # Copyright © 2012-2017 Guillaume Ayoub # Copyright © 2017-2018 Unrud <unrud@outlook.com> # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
Ingenico-ePayments/connect-sdk-python2
refs/heads/master
examples/merchant/disputes/__init__.py
128
# # This file was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1 #
gtko/CouchPotatoServer
refs/heads/develop
libs/guessit/transfo/guess_country.py
94
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gborri/SickRage
refs/heads/develop
sickrage/clients/putio.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...
SPlanzer/AIMS
refs/heads/master
__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py # # Copyright 2009 Chris Crook (ccrook@linz.govt.nz) # # 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;...
dmoon4117/mutagen
refs/heads/master
docs/id3_frames_gen.py
6
#!/usr/bin/python # Copyright 2013 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. """ ./id3_frames_gen.py > api/id3_frames.rst """ import sys import os sys.pa...
Sodki/ansible
refs/heads/devel
lib/ansible/cli/pull.py
30
# (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...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/lib/django-1.4/django/conf/locale/ga/formats.py
433
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = ...
zhukaixy/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py
2930
######################## 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...
proversity-org/edx-platform
refs/heads/master
openedx/core/djangoapps/embargo/urls.py
5
"""URLs served by the embargo app. """ from django.conf.urls import url from .views import CheckCourseAccessView, CourseAccessMessageView urlpatterns = [ url( r'^blocked-message/(?P<access_point>enrollment|courseware)/(?P<message_key>.+)/$', CourseAccessMessageView.as_view(), name='blocke...
SkiTiSu/MissionPlanner
refs/heads/master
ExtLibs/Mavlink/pymavlink/generator/lib/minixsv/xsvalXmlIf.py
79
# # minixsv, Release 0.9.0 # file: xsvalXmlIf.py # # XML interface classes (derived wrapper classes) # # history: # 2007-07-04 rl created # # Copyright (c) 2004-2008 by Roland Leuthe. All rights reserved. # # -------------------------------------------------------------------- # The minixsv XML schema va...
privateip/ansible
refs/heads/devel
lib/ansible/modules/windows/win_msi.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net>, and others # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of t...
demis001/scikit-bio
refs/heads/master
skbio/alignment/tests/test_ssw.py
10
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...