repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
diorcety/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/webdesign/templatetags/webdesign.py
350
from django.contrib.webdesign.lorem_ipsum import words, paragraphs from django import template register = template.Library() class LoremNode(template.Node): def __init__(self, count, method, common): self.count, self.method, self.common = count, method, common def render(self, context): try: ...
ludwiktrammer/odoo
refs/heads/9.0
addons/rating_project_issue/models/__init__.py
78
# -*- coding: utf-8 -*- import project_issue
airspeed-velocity/asv
refs/heads/master
test/test_repo_template/setup.py
3
import os from setuptools import setup with open('asv_test_repo/build_time_env.py', 'w') as f: f.write("env = {{}}\n".format(repr(dict(os.environ)))) setup(name='asv_test_repo', version="{version}", packages=['asv_test_repo'], # The following forces setuptools to generate .egg-info directory, ...
fivejjs/PTVS
refs/heads/master
Python/Tests/TestData/RemoveImport/Import.py
25
import oar
aipescience/django-daiquiri
refs/heads/master
daiquiri/metadata/views.py
1
from django.http import Http404 from django.views.generic import TemplateView from daiquiri.core.views import ModelPermissionMixin from daiquiri.core.utils import get_model_field_meta from .models import Schema, Table, Column, Function class ManagementView(ModelPermissionMixin, TemplateView): template_name = 'm...
jtyuan/racetrack
refs/heads/master
src/cpu/testers/networktest/NetworkTest.py
54
# Copyright (c) 2009 Advanced Micro Devices, 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...
BirkbeckCTP/janeway
refs/heads/master
src/press/migrations/0021_auto_20190329_1202.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-29 12:02 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('press', '0020_auto_20190319_1555'), ] operations = [ migrations.AlterModelOptions(...
redoufu/swoole
refs/heads/master
examples/process/echo.py
57
import sys def main(): s = raw_input() print "Python:" + s main()
bred86/robotCrawl
refs/heads/master
epoca_cosmeticos/LibUrl/__init__.py
2
from urlhandler import getUrl
cstipkovic/spidermonkey-research
refs/heads/master
testing/web-platform/tests/tools/pytest/doc/en/conf.py
190
# -*- coding: utf-8 -*- # # pytest documentation build configuration file, created by # sphinx-quickstart on Fri Oct 8 17:54:28 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
eduNEXT/edx-platform
refs/heads/master
openedx/core/djangoapps/course_apps/models.py
3
""" Models for course apps. """
jarshwah/django
refs/heads/master
tests/template_tests/syntax_tests/test_named_endblock.py
521
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class NamedEndblockTests(SimpleTestCase): @setup({'namedendblocks01': '1{% block first %}_{% block second %}' '2{% endblock second %}_{% endblock first %}3'}) def ...
ralphbean/moksha
refs/heads/dev
moksha/api/widgets/selectable/__init__.py
2
# This file is part of Moksha. # Copyright (C) 2008-2010 Red Hat, 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 ...
blu3b0lt/crypto
refs/heads/master
Blowfish.py
1
''' Copyright (c) 2014 blu3b0lt Blowfish implementation ''' from Crypto.Cipher import Blowfish from Crypto import Random from struct import pack bs = Blowfish.block_size key = b'Long key len from 4 to 56 bytes' iv = Random.new().read(bs) cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv) plaintext = raw_input("Enter s...
40223211/w16b_test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/xml/etree/ElementPath.py
785
# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fix...
fredericlepied/ansible
refs/heads/devel
lib/ansible/modules/network/iosxr/iosxr_user.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', ...
nick6918/ThingCloud
refs/heads/master
ThingCloud/WorkerSystem/views.py
6445
from django.shortcuts import render # Create your views here.
2015fallproject/2015fallcase2
refs/heads/master
static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_wait4.py
111
"""This test checks for correct wait4() behavior. """ import os import time import sys from test.fork_wait import ForkWait from test.support import run_unittest, reap_children, get_attribute # If either of these do not exist, skip this test. get_attribute(os, 'fork') get_attribute(os, 'wait4') class Wait4Test(ForkW...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/site-packages/pyasn1-0.1.7-py2.7.egg/pyasn1/type/char.py
220
# ASN.1 "character string" types from pyasn1.type import univ, tag class UTF8String(univ.OctetString): tagSet = univ.OctetString.tagSet.tagImplicitly( tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 12) ) encoding = "utf-8" class NumericString(univ.OctetString): tagSet = univ.OctetStri...
pwhelan/djshouts
refs/heads/master
django/db/models/sql/where.py
289
""" Code to manage the creation and SQL rendering of 'where' constraints. """ import datetime from itertools import repeat from django.utils import tree from django.db.models.fields import Field from django.db.models.query_utils import QueryWrapper from datastructures import EmptyResultSet, FullResultSet # Connection...
jofusa/datadogpy
refs/heads/master
datadog/dogshell/event.py
3
import datetime import time import re import sys from datadog.util.compat import json from datadog.dogshell.common import report_errors, report_warnings from datadog import api def prettyprint_event(event): title = event['title'] or '' text = event.get('text', '') or '' handle = event.get('handle', '') o...
apache-spark-on-k8s/spark
refs/heads/branch-2.2-kubernetes
examples/src/main/python/transitive_closure.py
128
# # 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 us...
swcloud/api-client-staging
refs/heads/master
generated/python/gapic-google-cloud-spanner-admin-database-v1/test/google/cloud/gapic/spanner_admin_database/v1/test_database_admin_client.py
7
# Copyright 2017, 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 required by applicable law or ...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/build/lib/paste/cowbell/__init__.py
50
# Cowbell images: http://commons.wikimedia.org/wiki/Image:Cowbell-1.jpg import os import re from paste.fileapp import FileApp from paste.response import header_value, remove_header SOUND = "http://www.c-eye.net/eyeon/WalkenWAVS/explorestudiospace.wav" class MoreCowbell(object): def __init__(self, app): se...
justinslee/Wai-Not-Makahiki
refs/heads/master
makahiki/apps/widgets/group_status_scoreboard/__init__.py
19
"""Implements the scoreboard widget."""
NL66278/odoo
refs/heads/8.0
addons/website_partner/models/__init__.py
1273
import res_partner
aselle/tensorflow
refs/heads/master
tensorflow/python/ops/cond_v2_impl.py
1
# Copyright 2018 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...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/unidecode/x0fa.py
252
data = ( 'Chey ', # 0x00 'Thak ', # 0x01 'Thak ', # 0x02 'Thang ', # 0x03 'Thayk ', # 0x04 'Thong ', # 0x05 'Pho ', # 0x06 'Phok ', # 0x07 'Hang ', # 0x08 'Hang ', # 0x09 'Hyen ', # 0x0a 'Hwak ', # 0x0b 'Wu ', # 0x0c 'Huo ', # 0x0d '[?] ', # 0x0e '[?] ', # 0x0f 'Zhong ', ...
jddixon/xlattice_py
refs/heads/master
src/xlattice/connection.py
1
# xlattice_py/xlattice/connection.py """ An XLattice Connection is a relationship between two EndPoints. In XLattice, one EndPoint will have an Address on this Node. The other EndPoint will have an Address associated with a second Node. There is always a transport protocol associated with the connection; both EndP...
kelseyoo14/Wander
refs/heads/master
venv_2_7/lib/python2.7/site-packages/numpy/distutils/exec_command.py
63
#!/usr/bin/env python """ exec_command Implements exec_command function that is (almost) equivalent to commands.getstatusoutput function but on NT, DOS systems the returned status is actually correct (though, the returned status values may be different by a factor). In addition, exec_command takes keyword arguments fo...
lamby/dak
refs/heads/master
tests/dbtest_session.py
10
#!/usr/bin/env python from db_test import DBDakTestCase from daklib.dbconn import DBConn, Uid from sqlalchemy.exc import InvalidRequestError import time import unittest class SessionTestCase(DBDakTestCase): """ This TestCase checks the behaviour of SQLAlchemy's session object. It should make sure the S...
boompieman/iim_project
refs/heads/master
project_python2/lib/python2.7/site-packages/IPython/core/tests/test_debugger.py
4
"""Tests for debugging machinery. """ from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2012, The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, ...
loopCM/chromium
refs/heads/trunk
chrome/common/extensions/docs/server2/handler.py
4
# 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. from branch_utility import BranchUtility from cron_servlet import CronServlet from patch_servlet import PatchServlet from instance_servlet import Instanc...
Hernanarce/pelisalacarta
refs/heads/master
python/main-classic/lib/megaserver/cursor.py
10
import urllib2 from Crypto.Cipher import AES from Crypto.Util import Counter class Cursor(object): def __init__(self, file): self._file=file self.pos=0 self.conn =None self.initial_value = file.initial_value self.k = file.k def mega_request(self,offset, retry=False): ...
biskett/mic
refs/heads/master
mic/3rdparty/pykickstart/commands/fcoe.py
10
# # Hans de Goede <hdegoede@redhat.com> # # Copyright 2009 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be us...
win0x86/Lab
refs/heads/master
mitm/jinja2/lexer.py
635
# -*- coding: utf-8 -*- """ jinja2.lexer ~~~~~~~~~~~~ This module implements a Jinja / Python combination lexer. The `Lexer` class provided by this module is used to do some preprocessing for Jinja. On the one hand it filters out invalid operators like the bitshift operators we don't allow...
stevehof/CouchPotatoServer
refs/heads/master
couchpotato/core/notifications/boxcar2.py
68
from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'Boxcar2' class Boxcar2(Notification): url = 'https://new.boxcar.io/api/notifications' def notify(self, message = ...
alexef/pygobject
refs/heads/gptrarray
codegen/docextract_to_xml.py
1
#!/usr/bin/env python # -*- Mode: Python; py-indent-offset: 4 -*- # # This litte script outputs the C doc comments to an XML format. # So far it's only used by gtkmm (The C++ bindings). Murray Cumming. # Usage example: # # ./docextract_to_xml.py -s /gnome/head/cvs/gtk+/gtk/ -s /gnome/head/cvs/gtk+/docs/reference/gtk/tm...
MHatmaker/maplinkr
refs/heads/master
node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
428
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
da-x/ghc
refs/heads/master
testsuite/driver/testutil.py
16
# ----------------------------------------------------------------------------- # Utils import subprocess def version_to_ints(v): return [ int(x) for x in v.split('.') ] def version_lt(x, y): return version_to_ints(x) < version_to_ints(y) def version_le(x, y): return version_to_ints(x) <= version_to_int...
sungkim11/mhargadh
refs/heads/master
django/contrib/localflavor/uk/uk_regions.py
347
""" Sources: English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales Scottish regions: http://...
jabesq/home-assistant
refs/heads/dev
tests/components/meraki/test_device_tracker.py
8
"""The tests the for Meraki device tracker.""" import asyncio import json import pytest from homeassistant.components.meraki.device_tracker import ( CONF_VALIDATOR, CONF_SECRET) from homeassistant.setup import async_setup_component import homeassistant.components.device_tracker as device_tracker from homeassistan...
HyunsukBaek/etherpad-lite
refs/heads/master
src/node_modules/npm/node_modules/node-gyp/gyp/test/win/gyptest-cl-buffer-security-check.py
344
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure buffer security check setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = Tes...
PyGotham/pygotham
refs/heads/master
migrations/versions/9d0181579c_.py
3
"""Require email addresses for users. Revision ID: 9d0181579c Revises: 22ec375d28e Create Date: 2014-01-19 01:02:12.456219 """ # revision identifiers, used by Alembic. revision = '9d0181579c' down_revision = '22ec375d28e' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generate...
nischalshrestha/sampleAppEngine
refs/heads/master
lib/pyasn1_modules/rfc2459.py
72
# # X.509 message syntax # # ASN.1 source from: # http://www.trl.ibm.com/projects/xml/xss4j/data/asn1/grammars/x509.asn # http://www.ietf.org/rfc/rfc2459.txt # # Sample captures from: # http://wiki.wireshark.org/SampleCaptures/ # from pyasn1.type import tag,namedtype,namedval,univ,constraint,char,useful MAX = 64 # XX...
Mhynlo/SickRage
refs/heads/master
lib/sqlalchemy/sql/compiler.py
76
# sql/compiler.py # Copyright (C) 2005-2014 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 """Base SQL and DDL compiler implementations. Classes provided include: :class:`.com...
nwswanson/checkin
refs/heads/master
server/vendor/wtforms/ext/i18n/form.py
139
import warnings from wtforms import form from wtforms.ext.i18n.utils import get_translations translations_cache = {} class Form(form.Form): """ Base form for a simple localized WTForms form. **NOTE** this class is now un-necessary as the i18n features have been moved into the core of WTForms, and wi...
NewpTone/stacklab-nova
refs/heads/master
debian/tmp/usr/lib/python2.7/dist-packages/nova/tests/api/openstack/compute/contrib/test_quota_classes.py
7
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
yetilinux/yetiweb
refs/heads/master
retro/templatetags/retro.py
5
from django import template from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() @register.simple_tag def retro_static(year, path): """Like the built-in {% static %} tag but with a little extra magic.""" full_path = "%s/%s" % (year, path) return staticfiles_sto...
terbolous/SickRage
refs/heads/master
lib/enzyme/__init__.py
46
# -*- coding: utf-8 -*- __title__ = 'enzyme' __version__ = '0.4.2' __author__ = 'Antoine Bertin' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2013 Antoine Bertin' import logging from .exceptions import * from .mkv import * class NullHandler(logging.Handler): def emit(self, record): pass logging....
shookari/cassandra
refs/heads/cassandra-1.0
pylib/cqlshlib/pylexotron.py
7
# 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...
hortonworks/hortonworks-sandbox
refs/heads/master
desktop/core/ext-py/Django-1.2.3/tests/modeltests/get_object_or_404/models.py
14
""" 35. DB-API Shortcuts ``get_object_or_404()`` is a shortcut function to be used in view functions for performing a ``get()`` lookup and raising a ``Http404`` exception if a ``DoesNotExist`` exception was raised during the ``get()`` call. ``get_list_or_404()`` is a shortcut function to be used in view functions for...
ElvishArtisan/drouter
refs/heads/master
python/api/Gpi.py
1
# Gpi.py # # Container class for a Protocol D GPI # # (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # Th...
havard024/prego
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py
169
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElement...
tommy-u/chaco
refs/heads/master
chaco/chaco_version.py
3
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only # under the conditions described in the a...
drasmuss/numpy
refs/heads/master
numpy/fft/fftpack.py
5
""" Discrete Fourier Transforms Routines in this module: fft(a, n=None, axis=-1) ifft(a, n=None, axis=-1) rfft(a, n=None, axis=-1) irfft(a, n=None, axis=-1) hfft(a, n=None, axis=-1) ihfft(a, n=None, axis=-1) fftn(a, s=None, axes=None) ifftn(a, s=None, axes=None) rfftn(a, s=None, axes=None) irfftn(a, s=None, axes=None...
wenluma/swift
refs/heads/master
utils/swift_build_support/swift_build_support/cache_util.py
48
# swift_build_support/cache_util.py -----------------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
insertnamehere1/maraschino
refs/heads/master
lib/flask/testsuite/blueprints.py
14
# -*- coding: utf-8 -*- """ flask.testsuite.blueprints ~~~~~~~~~~~~~~~~~~~~~~~~~~ Blueprints (and currently modules) :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import flask import unittest import warnings from fl...
askdaddy/nw.js
refs/heads/nw13
tests/automation/buff_from_string/internal/test.py
169
#!/usr/bin/env python from selenium import webdriver import os import traceback import time from selenium import webdriver from platform import platform import socket from sys import argv port = 13013 if len(argv) >= 2: port = int(argv[1]) path = os.path dirname = path.abspath(path.dirname(__file__)) chromedriv...
nihlaeth/lilyflower
refs/heads/master
lilyflower/tools.py
1
"""Some tools.""" import re from lilyflower.schemedata import ( String, SignedInt, UnsignedInt, SignedFloat, UnsignedFloat, Axis, Direction, Symbol, Procedure, Color, Pair, List, AssociationList, Boolean) from lilyflower.errors import InvalidArgument def compare...
Zoruk/PokemonGo-Map
refs/heads/develop
pogom/utils.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import configargparse import uuid import os import json from datetime import datetime, timedelta import logging import shutil import platform import pprint import time from . import config log = logging.getLogger(__name__) def parse_unicode(bytestring): deco...
mattrobenolt/django
refs/heads/master
tests/auth_tests/test_forms.py
21
from __future__ import unicode_literals import datetime import re from django import forms from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ) from dja...
israelbenatar/boto
refs/heads/develop
boto/s3/resumable_download_handler.py
152
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
broferek/ansible
refs/heads/devel
test/units/modules/network/fortimanager/test_fmgr_secprof_waf.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...
joopert/home-assistant
refs/heads/dev
homeassistant/components/person/__init__.py
3
"""Support for tracking people.""" from collections import OrderedDict from itertools import chain import logging from typing import Optional import uuid import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.device_tracker import ( DOMAIN as DEVICE_TRACKER_DOMAI...
VanushVaswani/amcparser
refs/heads/master
tests/test_motion.py
1
from . import skeleton_path, m_walking_path from numpy.testing import assert_allclose from amcparser import Skeleton, SkelMotion def test_motion_root(): sk = Skeleton(skeleton_path) skm = SkelMotion(sk, m_walking_path, (1.0 / 120.0)) skm.traverse('root', 0, 10) root_pos = sk.root.xyz_data assert_a...
blois/AndroidSDKCloneMin
refs/heads/master
ndk/prebuilt/linux-x86_64/lib/python2.7/lib2to3/tests/data/fixers/no_fixer_cls.py
357
# This is empty so trying to fetch the fixer class gives an AttributeError
theoryno3/scikit-learn
refs/heads/master
examples/exercises/plot_cv_diabetes.py
231
""" =============================================== Cross-validation on diabetes Dataset Exercise =============================================== A tutorial exercise which uses cross-validation with linear models. This exercise is used in the :ref:`cv_estimators_tut` part of the :ref:`model_selection_tut` section of ...
shinyChen/browserscope
refs/heads/master
test/test_util.py
9
#!/usr/bin/python2.5 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the 'License') # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
dragly/conan
refs/heads/develop
conans/paths.py
1
import os from conans.model.ref import ConanFileReference, PackageReference from conans.util.files import load, save from os.path import join, normpath import platform import tempfile from conans.errors import ConanException EXPORT_FOLDER = "export" SRC_FOLDER = "source" BUILD_FOLDER = "build" PACKAGES_FOLDER = "pack...
psteinb/vigra
refs/heads/master
vigranumpy/examples/eccentricity/eccentricity_transform.py
3
import vigra import numpy import vigra.graphs as vigraph import matplotlib.pyplot as plt import scipy.misc import sys gamma = 0.0001 percentage = 2 f = "figure_1.png" ## img: image segment with 0: inside, 1: outside ## distFunc: function applied after distance transform, must be one of "exponential", "linear", ...
caphrim007/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_hsrp.py
47
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
thwindbell/pox
refs/heads/master
pox/messenger/__init__.py
37
# Copyright 2011,2012 James McCauley # # 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 ...
tszym/ansible
refs/heads/devel
lib/ansible/modules/storage/zfs/zpool_facts.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', ...
40223117cda/w17test
refs/heads/master
gear.py
28
#@+leo-ver=5-thin #@+node:office.20150407074720.1: * @file gear.py #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:office.20150407074720.2: ** <<declarations>> (application) #@@language python import cherrypy import os import sys # 這個程式要計算正齒輪的齒面寬, 資料庫連結希望使用 pybean 與 SQLite # 導入 pybean 模組與所要使用的 Store 及 S...
yuezhou/telephony
refs/heads/master
telephony/Classes/pjproject-2.2.1/tests/pjsua/scripts-sendto/401_fmtp_g7221_with_bitrate_32000.py
42
# $Id: 401_fmtp_g7221_with_bitrate_32000.py 3664 2011-07-19 03:42:28Z nanang $ import inc_sip as sip import inc_sdp as sdp # Answer with codec G722.1 should choose the same bitrate # which in this test is 32000 sdp = \ """ v=0 o=- 3428650655 3428650655 IN IP4 192.168.1.9 s=pjmedia c=IN IP4 192.168.1.9 t=0 0 a=X-nat:0...
youprofit/scikit-image
refs/heads/master
skimage/color/tests/test_colorconv.py
10
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for color conversion functions. Authors ------- - the rgb2hsv test was written by Nicolas Pinto, 2009 - other tests written by Ralf Gommers, 2009 :license: modified BSD """ from __future__ import division import os.path import numpy as np from numpy.testing im...
JackDandy/SickGear
refs/heads/master
lib/hachoir_py3/parser/file_system/reiser_fs.py
2
""" ReiserFS file system version 3 parser (other version have not been tested). Author: Frederic Weisbecker Creation date: 8 december 2006 Sources: - http://p-nand-q.com/download/rfstool/reiserfs_docs.html - http://homes.cerias.purdue.edu/~florian/reiser/reiserfs.php - file://usr/src/linux-2.6.16.19/include/linux/...
wemanuel/smry
refs/heads/master
smry/server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/httplib2/python2/httplib2/test/smoke_test.py
310
import os import unittest import httplib2 from httplib2.test import miniserver class HttpSmokeTest(unittest.TestCase): def setUp(self): self.httpd, self.port = miniserver.start_server( miniserver.ThisDirHandler) def tearDown(self): self.httpd.shutdown() def testGetFile(self...
retomerz/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/flatpages/tests/templatetags.py
94
import os from django.conf import settings from django.contrib.auth.models import AnonymousUser, User from django.template import Template, Context, TemplateSyntaxError from django.test import TestCase class FlatpageTemplateTagTests(TestCase): fixtures = ['sample_flatpages'] urls = 'django.contrib.flatpages.te...
erhuabushuo/python-periphery
refs/heads/master
periphery/i2c.py
3
import os import ctypes import array import fcntl class I2CError(IOError): """Base class for I2C errors.""" pass class _CI2CMessage(ctypes.Structure): _fields_ = [ ("addr", ctypes.c_ushort), ("flags", ctypes.c_ushort), ("len", ctypes.c_ushort), ("buf", ctypes.POINTER(ctypes...
nithishdivakar/utilities
refs/heads/master
src/image/patch.py
1
from PIL import Image import numpy from skimage.util import shape as skshape import math import padding from itertools import product def patch_dimen(patch_radius): if len(patch_radius)==1: patch_shape = (2*patch_radius+1,2*patch_radius+1) else: patch_shape = (2*patch_radius[0]+1,2*patch_radi...
corona10/Simple-MiniC-Compiler
refs/heads/master
lib/llvm-3.5.0.src/test/CodeGen/SystemZ/Large/branch-range-04.py
13
# Test 64-bit COMPARE AND BRANCH in cases where the sheer number of # instructions causes some branches to be out of range. # RUN: python %s | llc -mtriple=s390x-linux-gnu | FileCheck %s # Construct: # # before0: # conditional branch to after0 # ... # beforeN: # conditional branch to after0 # main: # 0xffcc by...
epiqc/ScaffCC
refs/heads/master
llvm/utils/lit/setup.py
25
import lit import os from setuptools import setup, find_packages # setuptools expects to be invoked from within the directory of setup.py, but it # is nice to allow: # python path/to/setup.py install # to work (for scripts, etc.) os.chdir(os.path.dirname(os.path.abspath(__file__))) setup( name = "lit", ver...
ddelemeny/calligra
refs/heads/master
3rdparty/google-breakpad/src/tools/gyp/test/subdirectory/gyptest-top-all.py
240
#!/usr/bin/env 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. """ Verifies building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
niravdsouza/LeetCode
refs/heads/master
maxSubArray.py
1
"""Max Subarray Incomplete""" class Solution(object): def maxSubArray(self, nums): self.input=nums self.memo=[[-1 for i in range(len(self.input))] for j in range(len(self.input))] self.max=nums[0] op = self.rec(0,len(nums)-1) return self.max def rec...
zhuwenping/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/plugin_extra2.py
61
# Copyright (c) 2005 Divmod, Inc. # Copyright (c) 2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Test plugin used in L{twisted.test.test_plugin}. """ from zope.interface import classProvides from twisted.plugin import IPlugin from twisted.test.test_plugin import ITestPlugin class FourthTestPlugi...
windyuuy/opera
refs/heads/master
chromium/src/third_party/python_26/Lib/site-packages/win32com/server/util.py
35
""" General Server side utilities """ import pythoncom import policy import winerror from exception import COMException def wrap(ob, iid=None, usePolicy=None, useDispatcher=None): """Wraps an object in a PyGDispatch gateway. Returns a client side PyI{iid} interface. Interface and gateway support must ex...
nberliner/SRVis
refs/heads/master
lib/visualiseLocalisations.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 dis...
GabrielNicolasAvellaneda/riak_cs
refs/heads/develop
client_tests/python/boto_tests/boto_test.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- ## --------------------------------------------------------------------- ## ## Copyright (c) 2007-2013 Basho Technologies, Inc. All Rights Reserved. ## ## This file is provided to you under the Apache License, ## Version 2.0 (the "License"); you may not use this file ## ex...
hajuuk/asuswrt
refs/heads/master
release/src/router/avahi-0.6.31/tests/c-plus-plus-test-gen.py
30
#!/usr/bin/python # This file is part of avahi. # # avahi is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # avahi is distribu...
allotria/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameTarget.py
83
if True: <caret>foo = {} else: foo = object() if "a" == "b": foo.x = 1 foo.save() if "c" == "d": foo.y = 1 foo.save()
cgstudiomap/cgstudiomap
refs/heads/develop
main/eggs/Django-1.9-py2.7.egg/django/conf/locale/sv/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # 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' DATETI...
infobloxopen/infoblox-netmri
refs/heads/master
infoblox_netmri/api/broker/v3_7_0/if_group_broker.py
16
from ..broker import Broker class IfGroupBroker(Broker): controller = "if_groups" def index(self, **kwargs): """Lists the available if groups. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most effici...
novapost/django-i18nurl
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- # # django-i18nurl documentation build configuration file, created by # sphinx-quickstart on Mon Aug 27 11:37:23 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
sonuyos/couchpotato
refs/heads/master
libs/CodernityDB/lfu_cache.py
82
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2013 Codernity (http://codernity.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
2rs2ts/moto
refs/heads/master
moto/redshift/utils.py
37694
from __future__ import unicode_literals
AdmiralNemo/ansible-modules-extras
refs/heads/devel
monitoring/bigpanda.py
36
#!/usr/bin/python DOCUMENTATION = ''' --- module: bigpanda author: BigPanda short_description: Notify BigPanda about deployments version_added: "1.8" description: - Notify BigPanda when deployments start and end (successfully or not). Returns a deployment object containing all the parameters for future module call...
indirectlylit/kolibri
refs/heads/develop
kolibri/plugins/hooks.py
3
""" Kolibri Hooks API ----------------- What are hooks ~~~~~~~~~~~~~~ Hooks are classes that define *something* that happens at one or more places where the hook is looked for and applied. It means that you can "hook into a component" in Kolibri and have it do a predefined and parameterized *thing*. For instance, Kol...
pombredanne/django-avocado
refs/heads/develop
avocado/migrations/0008_auto__add_field_perspective_previous__chg_field_perspective_store__add.py
1
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Perspective.previous' db.add_column('avocado_perspective', 'previous', self.gf('avocado.store.fiel...