repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
EvanK/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_firewall_policy64.py
24
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 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...
jkyeung/XlsxWriter
refs/heads/master
xlsxwriter/test/comparison/test_chart_data_labels20.py
1
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
coursemdetw/2014cdb
refs/heads/master
wsgi/static/Brython2.1.3-20140704-213726/Lib/ui/dialog.py
109
import widget from browser import html, doc class Dialog(widget.DraggableWidget): def __init__(self, id=None): self._div_shell=html.DIV( Class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable", style={'position': 'absolute', 'height': 'auto', 'width': '3...
shermanng10/superathletebuilder
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/sessions/backends/__init__.py
12133432
foursquare/fsqio
refs/heads/master
src/python/fsqio/util/memo/__init__.py
12133432
neiudemo1/django
refs/heads/master
tests/project_template/views.py
1387
from django.http import HttpResponse def empty_view(request, *args, **kwargs): return HttpResponse('')
rmcgibbo/psi4public
refs/heads/master
psi4/share/psi4/databases/A24alt.py
3
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
devberry/cliduino
refs/heads/master
cliduino/cmds/find_serial.py
1
from ..util import get_board, find_serial def define( subparsers ): parser = subparsers.add_parser( 'find-serial', help='Resolves the serial port name into the device file' ) parser.add_argument( 'port', help = 'Comma separated list of serial ports to match. May be either /dev/ttyX, ttyX or U...
2014c2g4/2015cda_g7
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/colorsys.py
1066
"""Conversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc_to_rgb(a, b, c) --> r, g, b All inputs and outputs are triples of floats in the range [0.0...1.0] (with the exception of I and Q, which covers a slightly...
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/mac/Python-2.7.5/lib/python2.7/test/test_pkg.py
128
# Test packages (dotted-name import) import sys import os import tempfile import textwrap import unittest from test import test_support # Helpers to create and destroy hierarchies. def cleanout(root): names = os.listdir(root) for name in names: fullname = os.path.join(root, name) if os.path....
ryandvill/flask
refs/heads/master
scripts/flask-07-upgrade.py
148
#!/usr/bin/env python # -*- coding: utf-8 -*- """ flask-07-upgrade ~~~~~~~~~~~~~~~~ This command line script scans a whole application tree and attempts to output an unified diff with all the changes that are necessary to easily upgrade the application to 0.7 and to not yield deprecation warnings. ...
kirca/odoo
refs/heads/master
openerp/addons/test_convert/tests/__init__.py
123
# -*- coding: utf-8 -*- from . import test_convert checks = [ test_convert ]
Distrotech/MPlayer
refs/heads/distrotech-MPlayer
TOOLS/mphelp_check.py
23
#!/usr/bin/python # Tool to compare MPlayer translation files against a base file. Reports # conflicting definitions, mismatching arguments, extra definitions # not present in the base file and (optionally) missing definitions. # Written by Uoti Urpala import sys import re def parse(filename): r = {} f = op...
jhadvig/origin
refs/heads/master
Godeps/_workspace/src/github.com/ugorji/go/codec/test.py
670
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). # Ensure msgpack-python and cbor are installed first, using: # pip install --user msgpack-python # pip inst...
OmarIthawi/edx-platform
refs/heads/master
common/djangoapps/student/tests/factories.py
33
"""Provides factories for student models.""" from student.models import (User, UserProfile, Registration, CourseEnrollmentAllowed, CourseEnrollment, PendingEmailChange, UserStanding, ) from course_modes.models import CourseMode from dja...
M4sse/chromium.src
refs/heads/nw12
tools/telemetry/telemetry/wpr/archive_info.py
9
# Copyright 2013 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 json import logging import os import re import shutil import tempfile from telemetry import page as page_module from telemetry.util import cloud_stor...
vjagadish/samza-clone
refs/heads/master
samza-test/src/main/python/templates.py
25
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
mattesno1/Sick-Beard
refs/heads/master
cherrypy/_cprequest.py
35
from Cookie import SimpleCookie, CookieError import os import sys import time import types import warnings import cherrypy from cherrypy import _cpreqbody, _cpconfig from cherrypy._cperror import format_exc, bare_error from cherrypy.lib import httputil, file_generator class Hook(object): """A cal...
tarikkdiry/Flock
refs/heads/master
flask/lib/python2.7/site-packages/migrate/changeset/util.py
43
from migrate.changeset import SQLA_10 """ Safe quoting method """ def safe_quote(obj): # this is the SQLA 0.9 approach if hasattr(obj, 'name') and hasattr(obj.name, 'quote'): return obj.name.quote else: return obj.quote def fk_column_names(constraint): if SQLA_10: return [ ...
Andrwe/py3status
refs/heads/master
py3status/modules/timer.py
1
# -*- coding: utf-8 -*- """ A simple countdown timer. This is a very basic countdown timer. You can change the timer length as well as pausing, restarting and resetting it. Currently this is more of a demo of a composite. Each part of the timer can be changed independently hours, minutes, seconds using mouse button...
avneesh91/django
refs/heads/master
tests/template_tests/syntax_tests/test_basic.py
252
from django.template.base import Context, TemplateSyntaxError from django.test import SimpleTestCase from ..utils import SilentAttrClass, SilentGetItemClass, SomeClass, setup basic_templates = { 'basic-syntax01': 'something cool', 'basic-syntax02': '{{ headline }}', 'basic-syntax03': '{{ first }} --- {{ s...
yhoshino11/pytest_example
refs/heads/master
.tox/flake8/lib/python2.7/site-packages/setuptools/py26compat.py
805
""" Compatibility Support for Python 2.6 and earlier """ import sys from setuptools.compat import splittag def strip_fragment(url): """ In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and later was patched to disregard the fragment when making URL requests. Do the same for Python 2.6 and earlier...
codename13/android_kernel_samsung_kylessopen-CAF
refs/heads/jb_mr1_chocolate
tools/perf/util/setup.py
2554
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] cflags += getenv('CFLAGS', '').split() perf = Extension('perf', sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', 'util/evsel.c', 'util/cpumap.c', 'util/...
mikepenz/muzei
refs/heads/master
web/handlers/main.py
19
# Copyright 2014 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 agreed to in writing, ...
ssaeger/scikit-learn
refs/heads/master
examples/plot_kernel_ridge_regression.py
39
""" ============================================= Comparison of kernel ridge regression and SVR ============================================= Both kernel ridge regression (KRR) and SVR learn a non-linear function by employing the kernel trick, i.e., they learn a linear function in the space induced by the respective k...
ondrokrc/gramps
refs/heads/master
gramps/plugins/quickview/attributematch.py
3
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Douglas S. Blank # # 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 o...
dimitardanailov/learn-hadoop
refs/heads/master
JoiningData/join1_mapper.py
4
#!/usr/bin/env python import sys # -------------------------------------------------------------------------- #This mapper code will input a <date word, value> input file, and move date into # the value field for output # # Note, this program is written in a simple style and does not full advantage of Python # ...
simpeg/simpegExamples
refs/heads/master
SciPy2016/MTwork/CleanedNotebook/datafiles/findDiam_inversion_offdiagonal.py
2
# Import modules import numpy as np, sys, os, time, gzip, cPickle as pickle, scipy #sys.path.append('/tera_raid/gudni/gitCodes/simpeg') #sys.path.append('/tera_raid/gudni') from pymatsolver import MumpsSolver import SimPEG as simpeg from SimPEG import NSEM from numpy.lib import recfunctions as rFunc # Function to get ...
ryanGT/sympy
refs/heads/master
sympy/functions/elementary/piecewise.py
2
from sympy.core.basic import Basic, S from sympy.core.function import Function, diff from sympy.core.numbers import Number from sympy.core.relational import Relational from sympy.core.sympify import sympify from sympy.utilities.decorator import deprecated class ExprCondPair(Basic): """Represents an expression, c...
aospx-kitkat/platform_external_chromium_org
refs/heads/kitkat
ppapi/generators/idl_option.py
178
# 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 getopt import sys from idl_log import ErrOut, InfoOut, WarnOut OptionMap = { } def GetOption(name): if name not in OptionMap: raise Runt...
BrotherPhil/django
refs/heads/master
tests/gis_tests/layermap/models.py
67
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=25) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
andymckay/django
refs/heads/master
tests/regressiontests/requests/tests.py
4
import time import warnings from datetime import datetime, timedelta from StringIO import StringIO from django.conf import settings from django.core.handlers.wsgi import WSGIRequest, LimitedStream from django.http import HttpRequest, HttpResponse, parse_cookie, build_request_repr, UnreadablePostError from django.test....
Opentrons/labware
refs/heads/master
api/tests/opentrons/conftest.py
2
# Uncomment to enable logging during tests # import logging # from logging.config import dictConfig from opentrons.config import robot_configs try: import aionotify except OSError: aionotify = None # type: ignore import asyncio import os import io import json import pathlib import re import shutil import temp...
cortesi/qtile
refs/heads/master
test/layouts/test_wmii.py
1
# # 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, distribute, sublicense, and/or sell # co...
mdaniel/intellij-community
refs/heads/master
python/testData/intentions/googleDocStubCustomIndent.py
24
def <caret>f(x, y): z = x ** y return z
hurricup/intellij-community
refs/heads/master
python/testData/refactoring/pullup/fieldMove/SuperClass.after.py
80
import sys class SuperClass(object): COPYRIGHT = sys.copyright def __init__(self): self.version = sys.api_version
endlessm/chromium-browser
refs/heads/master
third_party/grpc/src/src/python/grpcio_tests/tests/testing/_application_common.py
26
# Copyright 2017 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...
j33433/MPowerTCX
refs/heads/master
source/equipment/echelon.py
1
# # MPowerTCX: Share Schwinn A.C. indoor cycle data with Strava, GoldenCheetah and other apps # Copyright (C) 2017 James Roth # # 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 versi...
rspavel/spack
refs/heads/develop
lib/spack/external/jsonschema/_utils.py
30
import itertools import json import pkgutil import re from jsonschema.compat import str_types, MutableMapping, urlsplit class URIDict(MutableMapping): """ Dictionary which uses normalized URIs as keys. """ def normalize(self, uri): return urlsplit(uri).geturl() def __init__(self, *args...
kyroskoh/phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/test/lib/TestGyp.py
137
#!/usr/bin/python # Copyright (c) 2009 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. """ TestGyp.py: a testing framework for GYP integration tests. """ import os import re import shutil import stat import sys import TestCommon...
ujjvala-addsol/addsol_hr
refs/heads/master
openerp/tools/parse_version.py
380
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Photonomie/raven-python
refs/heads/master
raven/contrib/django/middleware/__init__.py
17
""" raven.contrib.django.middleware ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import threading import logging from django.conf import settings def is_ig...
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/encodings/uu_codec.py
383
""" Python 'uu_codec' Codec - UU content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were adapted from uu.py which was written by Lance Ell...
cchurch/ansible
refs/heads/devel
test/units/modules/network/fortimanager/test_fmgr_fwobj_service.py
38
# Copyright 2018 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 License, or # (at your option) any later version. # # This program is distributed in the...
gtko/CouchPotatoServer
refs/heads/develop
libs/rsa/prime.py
194
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
kedyy/pyWechat
refs/heads/master
WXApi/WXApi/WXError.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ 本文件是整个接口的错误方法定义 微信官方全局错误码 http://mp.weixin.qq.com/wiki/index.php LastUpdate:2017/3/19 """ import logging import traceback __all__ = ["WXApiError", "WeChatError", "NetworkError"] class WXApiError(Exception): """ Api接口异常,一般是处理参数不符合要求 """...
DanielSBrown/osf.io
refs/heads/develop
website/project/views/__init__.py
40
from . import contributor, node, register, tag, file, comment, drafts # noqa
garg10may/youtube-dl
refs/heads/master
youtube_dl/extractor/facebook.py
74
from __future__ import unicode_literals import json import re import socket from .common import InfoExtractor from ..compat import ( compat_http_client, compat_str, compat_urllib_error, compat_urllib_parse_unquote, compat_urllib_request, ) from ..utils import ( ExtractorError, int_or_none,...
dzbarsky/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_stream_hixie75.py
496
#!/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...
gram526/VTK
refs/heads/master
ThirdParty/Twisted/twisted/conch/scripts/cftp.py
23
# -*- test-case-name: twisted.conch.test.test_cftp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the I{cftp} command. """ import os, sys, getpass, struct, tty, fcntl, stat import fnmatch, pwd, glob from twisted.conch.client import connect, default, options ...
jabesq/home-assistant
refs/heads/dev
homeassistant/components/alexa/flash_briefings.py
10
"""Support for Alexa skill service end point.""" import copy from datetime import datetime import logging import uuid from homeassistant.components import http from homeassistant.core import callback from homeassistant.helpers import template from .const import ( ATTR_MAIN_TEXT, ATTR_REDIRECTION_URL, ATTR_STREAM_...
nathanial/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/multiple_database/models.py
90
from django.conf import settings from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models class Review(models.Model): source = models.CharField(max_length=100) content_type = models.Foreig...
frouty/odoo_oph
refs/heads/dev_70
addons/crm_partner_assign/report/__init__.py
443
# -*- 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...
MrLoick/python-for-android
refs/heads/master
python3-alpha/extra_modules/gdata/tlslite/utils/TripleDES.py
48
"""Abstract class for 3DES.""" from .compat import * #For True class TripleDES: def __init__(self, key, mode, IV, implementation): if len(key) != 24: raise ValueError() if mode != 2: raise ValueError() if len(IV) != 8: raise ValueError() self.isB...
mKeRix/home-assistant
refs/heads/dev
homeassistant/components/lutron/scene.py
7
"""Support for Lutron scenes.""" import logging from typing import Any from homeassistant.components.scene import Scene from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Lutron s...
alvarolopez/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/240_placeholder.py
728
# 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...
s-crow-project/s-crow
refs/heads/master
test/functional/reindex.py
29
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running bitcoind with -reindex and -reindex-chainstate options. - Start a single node and generat...
louietsai/python-for-android
refs/heads/master
python3-alpha/python3-src/Tools/scripts/copytime.py
49
#! /usr/bin/env python3 # Copy one file's atime and mtime to another import sys import os from stat import ST_ATIME, ST_MTIME # Really constants 7 and 8 def main(): if len(sys.argv) != 3: sys.stderr.write('usage: copytime source destination\n') sys.exit(2) file1, file2 = sys.argv[1], sys.argv...
allthroughthenight/aces
refs/heads/master
web2py/gluon/packages/dal/tests/smart_query.py
27
from ._compat import unittest from ._adapt import DEFAULT_URI, IS_GAE, IS_IMAP, drop from pydal._compat import integer_types from pydal import DAL, Field from pydal.helpers.methods import smart_query @unittest.skipIf(IS_IMAP, "Skip nosql") class TestSmartQuery(unittest.TestCase): def testRun(self): db = D...
VisheshHanda/production_backup
refs/heads/master
erpnext/schools/doctype/assessment_result/assessment_result.py
18
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from frappe.model.document import Document from erpnext.schools.api impo...
BondAnthony/ansible
refs/heads/devel
test/integration/targets/plugin_config_for_inventory/test_inventory.py
28
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' name: test_inventory plugin_type: inventory authors: - Pierre-Louis Bonicoli (@pilou-) short_description: test inventory description: - test inventory (fetch parameters using c...
cromulus/check-list
refs/heads/master
app/auth/auth_utility.py
2
#******************************************************************************** #-------------------------------------------------------------------------------- # # Significance Labs # Brooklyn, NYC # # Author: Alexandra Berke (aberke) # Written: Summer 2014 # # # /auth/auth_utility.py # #------------------------...
juanyaw/python
refs/heads/develop
cpython/Tools/scripts/win_add2path.py
27
"""Add Python to the search path on Windows This is a simple script to add Python to the Windows search path. It modifies the current user (HKCU) tree of the registry. Copyright (c) 2008 by Christian Heimes <christian@cheimes.de> Licensed to PSF under a Contributor Agreement. """ import sys import site import os imp...
codenote/chromium-test
refs/heads/master
third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_SPARC_asm.py
33
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004 # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # on the...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
third_party/cython/src/Cython/Compiler/AutoDocTransforms.py
96
from Cython.Compiler.Visitor import CythonTransform from Cython.Compiler.StringEncoding import EncodedString from Cython.Compiler import Options from Cython.Compiler import PyrexTypes, ExprNodes class EmbedSignature(CythonTransform): def __init__(self, context): super(EmbedSignature, self).__init__(contex...
alexhanson/intercom
refs/heads/main
setup.py
1
#!/usr/bin/env python from setuptools import setup setup( name='intercom', version='0.0.1', url='https://github.com/alexhanson/intercom', license='ISC License', python_requires='>=3.8', install_requires=[ 'click==7.1.2', 'CherryPy==18.6.0', 'Jinja2==2.11.3', 'pyt...
marcosdiez/ansible-modules-extras
refs/heads/devel
packaging/os/dnf.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Cristian van Ee <cristian at cvee.org> # Copyright 2015 Igor Gnatenko <i.gnatenko.brain@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 pu...
merrovingo/Python
refs/heads/master
Paquetes/claseUtil.py
1
class claseUtil: ''' Clase util para otros modulos. ''' pass def main(): '''Crea una clase util''' util = claseUtil() print (util) if __name__ == "__main__": main()
asedunov/intellij-community
refs/heads/master
python/helpers/pycharm/runpy_compat.py
85
import sys from types import ModuleType import os, imp class ImpLoader: code = source = None def __init__(self, fullname, file, filename, etc): self.file = file self.filename = filename self.fullname = fullname self.etc = etc def load_module(self, fullname): self._reopen() try: mod...
anbasile/flask_sample
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py
224
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import logging __version__ = '0.2.1' class DistlibException(Exception): pass try: from logging import NullHandler except Impor...
rolandovillca/python_introduction_basic
refs/heads/master
iterators/example01.py
4
# 1. An object can be iterated over with "for" if it implements # __iter__() or __getitem__(). # 2. An object can function as an iterator if it implements next().
davidobrien1985/ansible-modules-core
refs/heads/devel
source_control/subversion.py
28
#!/usr/bin/python # -*- coding: utf-8 -*- # (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...
SahilC/reinforcement-learning
refs/heads/master
assign3/sarsa.py
1
from collections import defaultdict import random class Sarsa: def __init__(self, actions, epsilon=0.05, gamma=0.99): self.q = {} self.dalpha = defaultdict(lambda: defaultdict(int)) self.epsilon = epsilon self.gamma = gamma self.actions = actions def getQ(s...
snoack/jinja2
refs/heads/master
jinja2/exceptions.py
398
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ class TemplateError(Exception): """Baseclass for all template errors.""" def __init__(self, message=None): i...
Slezhuk/ansible
refs/heads/devel
test/integration/targets/module_utils/library/test.py
91
#!/usr/bin/python results = {} # Test import with no from import ansible.module_utils.foo0 results['foo0'] = ansible.module_utils.foo0.data # Test depthful import with no from import ansible.module_utils.bar0.foo results['bar0'] = ansible.module_utils.bar0.foo.data # Test import of module_utils/foo1.py from ansible...
shannonjlove/namebench
refs/heads/master
nb_third_party/jinja2/bccache.py
284
# -*- coding: utf-8 -*- """ jinja2.bccache ~~~~~~~~~~~~~~ This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much. Situations whe...
castroflavio/ryu
refs/heads/master
ryu/services/protocols/bgp/operator/commands/show/neighbor.py
5
import logging from time import strftime from ryu.services.protocols.bgp.operator.command import Command from ryu.services.protocols.bgp.operator.command import CommandsResponse from ryu.services.protocols.bgp.operator.command import STATUS_ERROR from ryu.services.protocols.bgp.operator.command import STATUS_OK from r...
mmauroy/SickRage
refs/heads/master
lib/tmdb_api/tmdb_api.py
57
""" tmdbsimple.py is a wrapper for The Movie Database API. Refer to the official API documentation for more information. http://docs.themoviedb.apiary.io/ Created by Celia Oakley on 2013-10-31. """ import json import requests class TMDB: def __init__(self, api_key, version=3): TMDB.api_key = str(api_key)...
qiniu/python-sdk
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import re try: import setuptools setup = setuptools.setup except ImportError: setuptools = None from distutils.core import setup packages = [ 'qiniu', 'qiniu.services', 'qiniu.services.storage', 'qiniu.services.process...
Mirantis/mos-horizon
refs/heads/master
openstack_dashboard/dashboards/admin/instances/urls.py
9
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
britcey/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_port_facts.py
49
#!/usr/bin/python # Copyright (c) 2016 IBM # # 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 option) any later version. # # This software is distri...
probablytom/tomwallis.net
refs/heads/master
venv/lib/python2.7/site-packages/markdown/extensions/codehilite.py
100
""" CodeHilite Extension for Python-Markdown ======================================== Adds code/syntax highlighting to standard Python-Markdown code blocks. See <https://pythonhosted.org/Markdown/extensions/code_hilite.html> for documentation. Original code Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/...
codeforboston/snowranger
refs/heads/master
chatbot/main.py
5
from client import * from Bot import * from IrcEndpoint import * import FirebaseAPI import Boston311 from datetime import datetime, timedelta bot = None def main(): CreateBot() #ConnectToIRC() #FB_Test() #ConnectToFacebook() B311Test() while 1: pass def CreateBot(): global bot ...
cpenv/autocpenv
refs/heads/master
packages/cpenv/vendor/yaml/yaml3/nodes.py
986
class Node(object): def __init__(self, tag, value, start_mark, end_mark): self.tag = tag self.value = value self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): value = self.value #if isinstance(value, list): # if len(value) == 0: ...
abhinavp13/IITBX-edx-platform-dev
refs/heads/master
common/lib/capa/setup.py
120
from setuptools import setup, find_packages setup( name="capa", version="0.1", packages=find_packages(exclude=["tests"]), install_requires=["distribute>=0.6.28"], )
mzdaniel/oh-mainline
refs/heads/master
vendor/packages/gdata/tests/gdata_tests/apps/migration/service_test.py
38
#!/usr/bin/python2.4 # # Copyright 2008 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...
boberfly/gaffer
refs/heads/master
python/GafferDispatch/TaskList.py
11
########################################################################## # # Copyright (c) 2014, Image Engine Design 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: # # * Redistrib...
nicolargo/intellij-community
refs/heads/master
python/testData/completion/oldStyleClassAttributes.after.py
83
class C: pass c = C() c.__class__
avble/pjproject-2.4
refs/heads/master
tests/pjsua/scripts-pesq/201_codec_l16_8000_stereo.py
59
# $Id: 201_codec_l16_8000_stereo.py 2075 2008-06-27 16:18:13Z nanang $ # from inc_cfg import * # Call with L16/8000/2 codec test_param = TestParam( "PESQ defaults pjsua settings", [ InstanceParam("UA1", "--stereo --max-calls=1 --clock-rate 8000 --add-codec L16/8000/2 --play-file wavs/input.2.8.wav --null-audio"...
fintech-circle/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_vertical.py
28
""" Tests for vertical module. """ import ddt from mock import Mock from fs.memoryfs import MemoryFS from xmodule.tests import get_test_system from xmodule.tests.helpers import StubUserService from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml import factories as xml from xmodule.x_module import ...
kkragenbrink/los-angeles
refs/heads/master
typeclasses/characters.py
1
""" Characters Characters are (by default) Objects setup to be puppeted by Players. They are what you "see" in game. The Character class in this module is setup to be the "default" character type created by the default creation commands. """ from evennia import DefaultCharacter class Character(DefaultCharacter): ...
frankhale/nyana
refs/heads/master
nyana/plugins/SearchReplaceBarPlugin.py
1
# SearchReplaceBarPlugin - Provides a search and replace bar for the editor. # # Copyright (C) 2006-2010 Frank Hale <frankhale@gmail.com> # # ##sandbox - irc.freenode.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...
ofanoyi/scrapy
refs/heads/master
scrapy/tests/test_crawl.py
10
import json import socket import mock from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.utils.test import docrawl, get_testlog from scrapy.tests.spiders import FollowAllSpider, DelaySpider, SimpleSpider, \ BrokenStartRequestsSpider, SingleRequestSpider, DuplicateStartRequest...
heromod/migrid
refs/heads/master
mig/shared/confparser.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # confparser - [insert a few words of module description on this line] # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms o...
splav/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/py/testing/log/__init__.py
12133432
Korkki/django
refs/heads/master
tests/serializers_regress/__init__.py
12133432
mauricioabreu/speakerfight
refs/heads/master
deck/migrations/__init__.py
12133432
MounirMesselmeni/django
refs/heads/master
tests/gis_tests/relatedapp/__init__.py
12133432
mr-niels-christensen/environment-scotland-dot-rural
refs/heads/master
src/main/dotruralsepake/search/__init__.py
12133432
campbe13/openhatch
refs/heads/master
vendor/packages/Django/django/contrib/sitemaps/management/__init__.py
12133432