repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
dsfsdgsbngfggb/odoo
refs/heads/8.0
addons/bus/__openerp__.py
299
{ 'name' : 'IM Bus', 'version': '1.0', 'author': 'OpenERP SA', 'category': 'Hidden', 'complexity': 'easy', 'description': "Instant Messaging Bus allow you to send messages to users, in live.", 'depends': ['base', 'web'], 'data': [ 'views/bus.xml', 'security/ir.model.acces...
Holi0317/sms-cc-enrollment
refs/heads/master
enrollment/glo.py
1
#!/usr/bin/env python3 # LICENSE: MIT """ Global object for this module """ import threading obj = {} obj_lock = threading.Lock()
rouge8/pip
refs/heads/develop
src/pip/_vendor/chardet/jisfreq.py
342
######################## 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...
pwoodworth/intellij-community
refs/heads/master
python/testData/quickFixes/AddCallSuperQuickFixTest/kwargs.py
80
class A(object): def __init__(self): pass class B(A): def <warning descr="Call to __init__ of super class is missed">__in<caret>it__</warning>(self, **kwargs): pass
pbmanis/acq4
refs/heads/develop
acq4/modules/TaskMonitor.py
3
from __future__ import print_function from acq4.modules.Module import Module from acq4.util import Qt from acq4.pyqtgraph import DataTreeWidget class TaskMonitor(Module): """Simple module that displays information about tasks submitted to the manager and the results they generate. Useful for debugging iss...
cristiana214/cristianachavez214-cristianachavez
refs/heads/master
python/src/Lib/msilib/text.py
159
import msilib,os;dirname=os.path.dirname(__file__) ActionText = [ (u'InstallValidate', u'Validating install', None), (u'InstallFiles', u'Copying new files', u'File: [1], Directory: [9], Size: [6]'), (u'InstallAdminPackage', u'Copying network install files', u'File: [1], Directory: [9], Size: [6]'), (u'FileCost', u'C...
golismero/golismero-devel
refs/heads/master
tools/sqlmap/tamper/space2morehash.py
8
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os import re import random import string from lib.core.common import singleTimeWarnMessage from lib.core.data import kb from lib.core.enums import DBMS from lib.core.e...
shaggythesheep/OctoPrint
refs/heads/master
src/octoprint/plugins/softwareupdate/exceptions.py
37
# 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" class NoUpdateAvailable(Exc...
janebeckman/gpdb
refs/heads/master
src/test/tinc/tinctest/test/folder2/regress_folder2.py
21
import unittest2 as unittest import tinctest from tinctest import TINCTestCase @unittest.skip('mock test case for discovery tests') class TINCRegressTestCase2(TINCTestCase): """ @maintainer balasr3 """ def test_folder2_sample(self): pass
Stratoscale/rackattack-api
refs/heads/master
py/rackattack/tcp/allocation.py
1
from rackattack import api from rackattack.tcp import node from rackattack.tcp import suicide import threading import logging class Allocation(api.Allocation): def __init__(self, id, requirements, ipcClient, subscribe, heartbeat): self._id = id self._requirements = requirements self._ipcCl...
CamelBackNotation/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/json/tests/test_default.py
145
from json.tests import PyTest, CTest class TestDefault(object): def test_default(self): self.assertEqual( self.dumps(type, default=repr), self.dumps(repr(type))) class TestPyDefault(TestDefault, PyTest): pass class TestCDefault(TestDefault, CTest): pass
amboxer21/scrapy
refs/heads/master
scrapy/utils/deprecate.py
109
"""Some helpers for deprecation messages""" import warnings import inspect from scrapy.exceptions import ScrapyDeprecationWarning def attribute(obj, oldattr, newattr, version='0.12'): cname = obj.__class__.__name__ warnings.warn("%s.%s attribute is deprecated and will be no longer supported " "in Scr...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-62/modules/mysheets/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py
1730
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
sortsimilar/Citation-Tree
refs/heads/master
markjournal.py
1
### This program intends to mark certain journal to GSHF; ### Author: Ye Gao ### Date: 2017-11-1 import os file = open('RootPath.dat', 'r') root = (file.read()).replace("\n", "") # read root path from RootPath.dat; file.close() path = root.replace('root', '') + 'root.html' file = open(path, 'r') JournalName = '...
tupes/School
refs/heads/master
CS313/Asn2/PSIM/sim.py
3
import random import collections class Params(object): def __init__(self, protocol, num_stations, prob, num_slots, num_trials): self.protocol = protocol self.num_stations = num_stations self.prob = prob self.num_slots = num_slots self.num_trials = num_trials class Station(...
taforyou/testtesttest-yo
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
1509
# Copyright (c) 2013 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. """Handle version information related to Visual Stuio.""" import errno import os import re import subprocess import sys import gyp import glob class VisualStudi...
acdha/django-test-utils
refs/heads/master
test_utils/testmaker/processors/django_processor.py
2
import base TEST_TEMPLATE = \ """ def test_{{path}}_{{time}}(self): r = self.client.{{method}}({{request_str}})""" STATUS_TEMPLATE = \ """ self.assertEqual(r.status_code, {{status_code}})""" CONTEXT_TEMPLATE = \ ''' self.assertEqual(unicode(r.context["{{key}}"]), u"""{{value}}""")''' class...
Colonel-Top/Line-Bot-Python
refs/heads/master
python/oauth2client/pyasn1/codec/ber/eoo.py
25
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from pyasn1.type import base, tag class EndOfOctets(base.AbstractSimpleAsn1Item): defaultValue = 0 tagSet = tag.initTagSet( tag.Tag(tag.tagClassUnivers...
zas/picard
refs/heads/master
picard/ui/ui_cdlookup.py
4
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py build_ui` to update it. from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(720, 320) self.vboxlayout = QtWidget...
ominux/scikit-learn
refs/heads/master
scikits/learn/cluster/__init__.py
4
import warnings warnings.warn('scikits.learn is deprecated, please use sklearn') from sklearn.cluster import *
porduna/appcomposer
refs/heads/master
alembic/versions/22c1d227cf84_added_basic_user_det.py
3
"""Added basic user details: email, organization, role, creation_date... Revision ID: 22c1d227cf84 Revises: 33bc14d712b2 Create Date: 2013-09-19 17:03:44.997000 """ # revision identifiers, used by Alembic. revision = '22c1d227cf84' down_revision = '33bc14d712b2' from alembic import op impo...
dementrock/nbgrader
refs/heads/master
nbgrader/apps/__init__.py
2
from .baseapp import NbGrader, BaseNbConvertApp from .assignapp import AssignApp from .autogradeapp import AutogradeApp from .feedbackapp import FeedbackApp from .notebookapp import FormgradeNotebookApp from .formgradeapp import FormgradeApp from .validateapp import ValidateApp from .releaseapp import ReleaseApp from ....
uccgit/the-game
refs/heads/sandbox
src/Character/__init__.py
7
__author__ = 'tootall'
dreamsxin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_asyncio/test_tasks.py
60
"""Tests for tasks.py.""" import re import sys import types import unittest import weakref from test import support from test.script_helper import assert_python_ok from unittest import mock import asyncio from asyncio import coroutines from asyncio import test_utils PY34 = (sys.version_info >= (3, 4)) PY35 = (sys.v...
joelgodia93/ambrosio
refs/heads/master
ambrosio/channels/TextChannel.py
1
class TextChannel(Channel): """Channel class, reads commands from file""" def __init__(self, name="TextChannel"): super(TextChannel, self).__init__(name) self.name = name self.messages = [] with open("messages.txt", "r") as f: for line in f: self.mes...
alrifqi/django
refs/heads/master
tests/template_tests/filter_tests/test_ljust.py
521
from django.template.defaultfilters import ljust from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LjustTests(SimpleTestCase): @setup({'ljust01': '{% autoescape off %}.{{ a|ljust:"5" }}. .{{ b|ljust:"5" }}.{% endautoescape %}'}) def test_lju...
alirizakeles/tendenci
refs/heads/master
tendenci/apps/locations/utils.py
1
import os import csv from django.template.defaultfilters import slugify from django.core.files.storage import default_storage from tendenci.apps.base.utils import normalize_newline def geocode_api(**kwargs): import simplejson, urllib GEOCODE_BASE_URL = 'http://maps.googleapis.com/maps/api/geocode/json' k...
Sweetgrassbuffalo/ReactionSweeGrass-v2
refs/heads/master
.meteor/local/dev_bundle/python/Lib/doctest.py
44
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
Sweetgrassbuffalo/ReactionSweeGrass-v2
refs/heads/master
.meteor/local/dev_bundle/python/Lib/lib2to3/tests/data/py3_test_grammar.py
266
# Python test set -- part 1, grammar. # This just tests whether the parser accepts them all. # NOTE: When you run this test as a script from the command line, you # get warnings about certain hex/oct constants. Since those are # issued by the parser, you can't suppress them by adding a # filterwarnings() call to this...
dorotan/pythontraining
refs/heads/master
env/Lib/site-packages/setuptools/launch.py
464
""" Launch the Python script on the command line after setuptools is bootstrapped via import. """ # Note that setuptools gets imported implicitly by the # invocation of this script using python -m setuptools.launch import tokenize import sys def run(): """ Run the script in sys.argv[1] as if it had been...
GoogleContainerTools/container-diff
refs/heads/master
differs/testDirs/pipTests2/packagesMultiVersion/usr/local/lib/python2.7/site-packages/script3.py
10
#!/usr/bin/env python # Copyright 2018 Google, 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...
SimonXming/MyPyLibary
refs/heads/master
backend/app.py
2
# -*- encoding:utf-8 -*- from flask import Flask app = Flask(__name__) @app.route('/config') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run(host="0.0.0.0", port=8080)
coxley/ansible
refs/heads/devel
test/units/template/test_template_utilities.py
152
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.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 ...
shravan-achar/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/_pytest/_code/code.py
168
import sys from inspect import CO_VARARGS, CO_VARKEYWORDS import py builtin_repr = repr reprlib = py.builtin._tryimport('repr', 'reprlib') if sys.version_info[0] >= 3: from traceback import format_exception_only else: from ._py2traceback import format_exception_only class Code(object): """ wrapper arou...
grengojbo/satchmo
refs/heads/master
satchmo/apps/payment/modules/paypal/views.py
3
from decimal import Decimal from django.conf import settings from django.core import urlresolvers from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.http import urlencode from django.utils.translation im...
hakatashi/youtube-dl
refs/heads/hakatashi
youtube_dl/extractor/rtvs.py
28
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class RTVSIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rtvs\.sk/(?:radio|televizia)/archiv/\d+/(?P<id>\d+)' _TESTS = [{ # radio archive 'url': 'http://www.rtvs.sk/radio/archiv/11224/414872', ...
DIYgod/python
refs/heads/master
burness/0005/change_DPI.py
40
#-*-coding: utf-8-*- class change_DPI: def __init__(self): self.path = None def setPath(self, path): self.path = path def change_DPI(self): import os files = os.listdir(self.path) is_exist = False for f in files: if f.endswith(('.jpg', '.png')):...
django-parler/django-parler
refs/heads/master
parler/tests/testapp/urls.py
2
from django.urls import path from django.conf.urls.i18n import i18n_patterns from django.urls import reverse_lazy from .views import ArticleSlugView # To intru from django.contrib.auth import forms as auth_forms from django.contrib.auth import views as auth_views class PasswordResetForm(auth_forms.PasswordResetForm)...
tensorflow/tensorboard
refs/heads/master
tensorboard/summary/_tf/summary/__init__.py
1
# 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...
acsone/account-financial-reporting
refs/heads/8.0
account_financial_report/model/res_company.py
35
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved # Credits#######################################...
Eigenlabs/EigenD
refs/heads/1.4
tools/packages/SCons/Variables/EnumVariable.py
2
"""engine.SCons.Variables.EnumVariable This file defines the option type for SCons allowing only specified input-values. Usage example: opts = Variables() opts.Add(EnumVariable('debug', 'debug output and symbols', 'no', allowed_values=('yes', 'no', 'full'), map={}, ign...
plxaye/chromium
refs/heads/master
src/native_client_sdk/src/build_tools/tests/easy_template_test.py
60
#!/usr/bin/env python # 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 cStringIO import difflib import os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD...
naritotakizawa/django-torina-blog
refs/heads/master
tests/urls.py
1
from django.conf.urls import url, include urlpatterns = [ url(r'^', include('blog.urls')), ]
SVoxel/R7800
refs/heads/master
git_home/samba.git/python/samba/netcmd/ntacl.py
13
# Manipulate file NT ACLs # # Copyright Matthieu Patou 2010 <mat@matws.net> # # 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 option) any later ver...
gitromand/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/mock_drt_unittest.py
119
# 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
ashishnitinpatil/vnitstudnotifs
refs/heads/master
tweepy/cache.py
65
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. import time import datetime import threading import os try: import cPickle as pickle except ImportError: import pickle try: import hashlib except ImportError: # python 2.4 import md5 as hashlib try: import fcntl excep...
almeidapaulopt/erpnext
refs/heads/develop
erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py
25
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Bank Guarantee') class TestBankGuarantee(unittest.TestCase): pass
reinvantveer/Topology-Learning
refs/heads/develop
model/baseline/building_type_logistic_regression.py
1
""" This script executes the task of estimating the building type, based solely on the geometry for that building. The data for this script can be found at http://hdl.handle.net/10411/GYPPBR. """ import multiprocessing import os import sys from datetime import datetime, timedelta from pathlib import Path from time imp...
Universal-Model-Converter/UMC3.0a
refs/heads/master
data/Python/x86/Lib/site-packages/OpenGL/GL/SGI/color_matrix.py
4
'''OpenGL extension SGI.color_matrix This module customises the behaviour of the OpenGL.raw.GL.SGI.color_matrix to provide a more Python-friendly API Overview (from the spec) This extension adds a 4x4 matrix stack to the pixel transfer path. The matrix operates on RGBA pixel groups, using the equation ...
lukerosiak/inspectors-general
refs/heads/master
inspectors/flra.py
1
#!/usr/bin/env python import datetime import logging import os import re from urllib.parse import urljoin, unquote from utils import utils, inspector, admin # https://www.flra.gov/components-offices/offices/office-inspector-general archive = 1999 # options: # standard since/year options for a year range to fetch ...
ajnirp/servo
refs/heads/master
tests/wpt/run_wpt.py
158
# 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 run import sys paths = {"include_manifest": run.wpt_path("include.ini"), "config": run.wpt_path("config...
YuriGural/erpnext
refs/heads/master
erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
14
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order from erpnext.accounts.doctype.sales_inv...
frreiss/tensorflow-fred
refs/heads/master
tensorflow/python/distribute/remote_mirrored_strategy_eager_test.py
20
# 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...
haeusser/tensorflow
refs/heads/master
tensorflow/contrib/linalg/python/kernel_tests/linear_operator_matrix_test.py
6
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
catapult-project/catapult-csm
refs/heads/master
third_party/html5lib-python/html5lib/treewalkers/pulldom.py
1729
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
zetian/ltl_sampling
refs/heads/master
src/python_vis/sampling/sample_draw.py
1
"""LCM type definitions This file automatically generated by lcm. DO NOT MODIFY BY HAND!!!! """ try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct class sample_draw(object): __slots__ = ["if_draw"] __typenames__ = ["boolean"] __dimensions__ = [None...
MSA-Argentina/adamo-calibrator
refs/heads/master
adamo_calibrator/tools/axes_inversion_verification.py
1
# -*- coding: utf-8 -*- """ This script uses brute force to verify what actions take to make a correct calibration. Operations: Perfect Screen Quadrants Invert X Invert Y Swap XY +---+---+ +---+---+ +---+---+ +---+---+ | 1 | 2 | | 2 | 1 | ...
karnikamit/python
refs/heads/master
lulujianjie/0000/0000.py
38
from PIL import Image, ImageDraw, ImageFont im = Image.open('image.jpg') w,h = im.size font_size = h/4 draw = ImageDraw.Draw(im) fnt = ImageFont.truetype ("Arial.ttf",font_size) text_w,text_h = draw.textsize("8",font=fnt) # 给定文字message,返回所占像素(width,height) draw.text((w-text_w,0), "8", fill=(255,0,0), font=fnt)#图片宽度...
tttthemanCorp/CardmeleonAppEngine
refs/heads/master
django/contrib/localflavor/au/forms.py
309
""" Australian-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re PHONE_DIGITS_RE ...
darylsew/audiolearn
refs/heads/master
supervised/polreg.py
1
from numpy import * import pylab # data to fit x = random.rand(6) y = random.rand(6) # fit the data with a 4th degree polynomial z4 = polyfit(x, y, 4) p4 = poly1d(z4) # construct the polynomial z5 = polyfit(x, y, 5) p5 = poly1d(z5) xx = linspace(0, 1, 100) pylab.plot(x, y, 'o', xx, p4(xx),'-g', xx, p5(xx),'-b') p...
SurfasJones/icecream-info
refs/heads/master
icecream/lib/python2.7/site-packages/cms/toolbar_base.py
10
# -*- coding: utf-8 -*- from cms.exceptions import LanguageError from cms.utils import get_language_from_request from cms.utils.i18n import get_language_object from django.contrib.sites.models import Site class CMSToolbar(object): def __init__(self, request, toolbar, is_current_app, app_path): self.reque...
rgayon/plaso
refs/heads/master
tests/analysis/sessionize.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the sessionize analysis plugin.""" from __future__ import unicode_literals import unittest from plaso.analysis import sessionize from plaso.lib import definitions from tests.analysis import test_lib class SessionizeAnalysisPluginTest(test_lib.AnalysisPlu...
MozillaSecurity/peach
refs/heads/master
Peach/Utilities/common.py
3
# 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 sys import logging from Peach.Engine.common import highlight def isSupportedOS(platforms): return filter(la...
cedk/odoo
refs/heads/8.0
addons/web_tests_demo/__openerp__.py
384
{ 'name': "Demonstration of web/javascript tests", 'category': 'Hidden', 'description': """ OpenERP Web demo of a test suite ================================ Test suite example, same code as that used in the testing documentation. """, 'depends': ['web'], 'data' : [ 'views/web_tests_dem...
gr-vt/gr-mapper
refs/heads/master
docs/doxygen/doxyxml/generated/indexsuper.py
348
#!/usr/bin/env python # # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # import sys import getopt from string import lower as str_lower from xml.dom import minidom from xml.dom import Node # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these metho...
hackaugusto/raiden
refs/heads/master
raiden/tests/integration/long_running/test_token_networks.py
1
import gevent import pytest from raiden import routing, waiting from raiden.api.python import RaidenAPI from raiden.exceptions import InvalidAmount from raiden.tests.utils.detect_failure import raise_on_failure from raiden.transfer import channel, views from raiden.transfer.state import CHANNEL_STATE_OPENED def wait...
rsreese/namebench
refs/heads/master
nb_third_party/jinja2/sandbox.py
284
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
bertucho/epic-movie-quotes-quiz
refs/heads/master
dialogos/build/cryptography/src/cryptography/hazmat/primitives/ciphers/modes.py
13
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import six from cryptography import utils @six.add_metacla...
Execut3/CTF
refs/heads/master
IRAN Cert/2016/1- Easy/PPC & Web/project/manage.py
404
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
thewisenerd/android_kernel_htc_pico
refs/heads/android-4.4
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
ddmendes/SmartPendant
refs/heads/master
arduino/libraries/ArduinoJson-master/third-party/gtest-1.7.0/test/gtest_xml_outfiles_test.py
2526
#!/usr/bin/env python # # Copyright 2008, 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...
rmcgurrin/Qlab
refs/heads/master
common/util/Fig2Plone.py
4
""" Created on Wed Mar 21 11:35:40 2012 Some convenience functions for uploading figures to the wiki. These are mainly built around dumping figures to a particular day-to-day folder for lab-book entries. @author: Colm Ryan """ import os, sys from xmlrpclib import ServerProxy, Binary import time import argparse ...
EdTsft/pyswip
refs/heads/master
examples/coins/coins.py
10
# -*- coding: utf-8 -*- # pyswip -- Python SWI-Prolog bridge # Copyright (c) 2007-2012 Yüce Tekol # # 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 ...
blakfeld/ansible
refs/heads/devel
v1/ansible/runner/action_plugins/assert.py
138
# Copyright 2012, Dag Wieers <dag@wieers.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 versi...
chinmaygarde/mojo
refs/heads/ios
sky/tools/webkitpy/common/config/urls.py
26
# Copyright (c) 2010, 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 of conditions and the...
mxrrow/zaicoin
refs/heads/master
src/deps/boost/tools/build/v2/test/core_parallel_multifile_actions_1.py
5
#!/usr/bin/python # Copyright 2007 Rene Rivera. # Copyright 2011 Steven Watanabe # 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) import BoostBuild t = BoostBuild.Tester(pass_toolset=0, pass_d0=False) t.write("sleep.bat"...
luanfonceca/speakerfight
refs/heads/master
organization/apps.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class OrganizationConfig(AppConfig): name = 'organization'
belmiromoreira/nova
refs/heads/master
nova/tests/functional/v3/test_pause_server.py
27
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
kidmaple/CoolWall
refs/heads/nios2
user/python/Lib/bdb.py
4
"""Debugger basics""" import sys import os import types BdbQuit = 'bdb.BdbQuit' # Exception to give up completely class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class should implement user interaction. The standard debugger c...
robbi/pyload
refs/heads/stable
module/plugins/hoster/SolidfilesCom.py
7
# -*- coding: utf-8 -*- # # Test links: # http://www.solidfiles.com/d/609cdb4b1b from ..internal.SimpleHoster import SimpleHoster class SolidfilesCom(SimpleHoster): __name__ = "SolidfilesCom" __type__ = "hoster" __version__ = "0.08" __status__ = "testing" __pattern__ = r'http://(?:www\.)?solid...
inspyration/odoo
refs/heads/master
addons/stock_account/__openerp__.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...
ClodoCorp/bernhard
refs/heads/master
example/ssl_client.py
4
import bernhard c = bernhard.SSLClient(host='127.0.0.1', port=5555, keyfile='example/ssl/client.pkcs8', certfile='example/ssl/client.crt', ca_certs='example/ssl/cacert.pem') c.send({'host': 'myhost.foobar.com', 'service': 'myservice', 'metric': 12}) q = c.query('true')
perezg/infoxchange
refs/heads/master
BASE/lib/python2.7/site-packages/django/contrib/gis/utils/srs.py
210
from django.contrib.gis.gdal import SpatialReference def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None, database=None): """ This function takes a GDAL SpatialReference system and adds its information to the `spatial_ref_sys` table of the spatial backend. Doing th...
ryanlerch/pkgdb2
refs/heads/master
alembic/versions/1f179f37f12b_add_a_koschei_settings_to_the_package_.py
7
"""Add a koschei settings to the package table Revision ID: 1f179f37f12b Revises: 1adacdcd3910 Create Date: 2015-06-26 10:38:16.996889 """ # revision identifiers, used by Alembic. revision = '1f179f37f12b' down_revision = '1adacdcd3910' from alembic import op import sqlalchemy as sa def upgrade(): ''' Add the...
maurofaccenda/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_selfip.py
59
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # 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 # ...
chdecultot/frappe
refs/heads/develop
setup.py
6
# imports - standard imports import os, shutil from distutils.command.clean import clean as Clean from setuptools import setup, find_packages import re, ast # get version from __version__ variable in frappe/__init__.py _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('requirements.txt') as f: install_r...
apixandru/intellij-community
refs/heads/master
python/testData/inspections/PyUnusedLocalInspection/tupleUnpacking.py
40
def foo(): for x, y in [(1, 2)]: print x def test_vlu(): <error descr="Python versions < 3.0 do not support starred expressions as assignment targets">*<weak_warning descr="Local variable 'h' value is not used">h</weak_warning></error>, <weak_warning descr="Local variable 't' value is not used">t</weak...
hardc0d3/scalint
refs/heads/master
checks/ch_data.py
3
data = { 'tuple-tuple':( ( (100,1), (200,1), (300,1), (400,1) ), ( (100,2), (300,2), (400,2) ), ( (200,4), (300,5), (400,4) ), ( (100,3,1), (200,3,1), (300,4,1), (400,5,1) ), ( (100,3,2,1), (200,3,2,1), (400,5,2,1) ) ) }
0xFAIL/lantern
refs/heads/master
rodney/palette.py
1
import ctypes class _CONSOLE_SCREEN_BUFFER_INFO_EX(ctypes.Structure): _fields_ = [("cbSize", ctypes.c_int), ("dwSizeX", ctypes.c_short), ("dwSizeY", ctypes.c_short), ("dwCursorPositionX", ctypes.c_short), ("dwCursorPositionY", ctypes.c_short), ...
noxora/flask-base
refs/heads/master
flask/lib/python3.4/site-packages/sqlalchemy/dialects/postgresql/psycopg2cffi.py
33
# testing/engines.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+psycopg2cffi :name: psycopg2cffi :dbapi: psyco...
advoretsky/nose-gae
refs/heads/master
support/bad_app/bad_app.py
2
import socket import wsgiref.handlers class App: def __call__(self, environ, start_response): # This won't work under GAE, since this is app code here = socket.gethostbyname('localhost') start_response('200 OK', [('Content-type', 'text/plain')]) return ['Hello %s' % here] def appli...
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/host/lib/scons-2.1.0/SCons/Scanner/RC.py
21
"""SCons.Scanner.RC This module implements the depenency scanner for RC (Interface Definition Language) files. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this softwar...
bjpop/blip
refs/heads/master
test/regression/features/tail_call/count_rec.py
3
def count(m,n): if m >= n: return m else: return count(m+1,n) print(count(0,10))
louyihua/edx-platform
refs/heads/master
openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py
33
""" Command to load course overviews. """ import logging from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps.content.course_overviews.models...
dajohnso/cfme_tests
refs/heads/master
cfme/tests/configure/test_session_timeout.py
8
# -*- coding: utf-8 -*- import pytest import time from cfme.configure.configuration import AuthSetting from utils.browser import ensure_browser_open, quit from utils.wait import wait_for @pytest.mark.tier(3) @pytest.mark.sauce def test_session_timeout(request): """Sets the timeout to shortest possible time and ...
brendandahl/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/mockParser.py
452
from __future__ import absolute_import, division, unicode_literals import sys import os if __name__ == '__main__': # Allow us to import from the src directory os.chdir(os.path.split(os.path.abspath(__file__))[0]) sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, "src"))) from html5lib.tokenizer ...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/numpy/core/tests/test_arrayprint.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.compat import sixu from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal ) class TestArrayRepr(object): def test_nan_inf(self): ...
myang321/django
refs/heads/master
django/contrib/gis/geos/prototypes/predicates.py
339
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import check_predicate # #...
duyunchen/bogglequizbowl
refs/heads/master
bqb.py
1
#!/usr/bin/env python # This file is part of Boggle Quiz Bowl. # # Boggle Quiz Bowl 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...
Makochin/robosys2
refs/heads/master
scripts/morse_output.py
1
#!/usr/bin/env python """ MIT License Copyright (c) 2017 Takuya Nogami 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, ...