repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
justincassidy/scikit-learn
refs/heads/master
examples/plot_cv_predict.py
173
""" ==================================== Plotting Cross-Validated Predictions ==================================== This example shows how to use `cross_val_predict` to visualize prediction errors. """ from sklearn import datasets from sklearn.cross_validation import cross_val_predict from sklearn import linear_model ...
miptliot/edx-platform
refs/heads/ginkgo_openedu_docker
common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py
247
""" Simple test to ensure that modulestore base classes remain abstract """ from unittest import TestCase from xmodule.modulestore import ModuleStoreRead, ModuleStoreWrite class AbstractionTest(TestCase): """ Tests that the ModuleStore objects are properly abstracted """ def test_cant_instantiate_ab...
togaurav1981/Hello-World
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_phpbuiltins.py
95
# -*- coding: utf-8 -*- """ pygments.lexers._phpbuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file loads the function names and their modules from the php webpage and generates itself. Do not alter the MODULES dict by hand! WARNING: the generation transfers quite much data over your ...
thoughtpolice/bf-pypy
refs/heads/master
t/conftest.py
1
def pytest_addoption(parser): group = parser.getgroup("pypy options") group.addoption('--view', action="store_true", default=False, dest="view", help="show only the compiled loops") group.addoption('--viewloops', action="store_true", default=False, dest="viewloops", ...
dzipet/controlling-board
refs/heads/master
SaberTooth/src/i2clibraries/i2c_itg3205.py
3
import math from i2clibraries import i2c from time import * class i2c_itg3205: WhoAmI = 0x0 SampleRateDivider = 0x15 DLPFAndFullScale = 0x16 InterruptConfig = 0x17 InterruptStatus = 0x1A TempDataRegisterMSB = 0x1B TempDataRegisterLSB = 0x1C GyroXDataRegisterMSB = 0x1D GyroXDataRegisterLSB = 0x1E GyroYDataR...
noamelf/Open-Knesset
refs/heads/master
laws/constants.py
1
STANDS_FOR_THRESHOLD = 0.66
jokey2k/pyClanSphere
refs/heads/master
pyClanSphere/plugins/shoutbox/versions/001_increase_textsize.py
1
"""increase textsize""" # Keep __doc__ to a single line from pyClanSphere.upgrades.versions import * # use this or define your own if you need metadata = db.MetaData() # Define tables here shoutboxentries = db.Table('shoutboxentries', metadata, db.Column('entry_id', db.Integer, primary_key=True), db.Column('a...
ryano144/intellij-community
refs/heads/master
python/testData/resolve/callee/WrappedStaticMethod.py
83
class A: def foo(self): pass foo = staticmethod(foo) A.f<caret>oo()
taylorhughes/done-zo
refs/heads/master
dnzo/templating/templating.py
1
from django import template from django.template import Library, Node, Context, loader, resolve_variable from django.template.defaultfilters import date from django.utils.html import escape from datetime import datetime import environment register = Library() # STOLEN FROM Django 1.0 _base_js_escapes = ( ('\\',...
caramucho/ns3-ndnsim
refs/heads/mybranch
src/visualizer/visualizer/__init__.py
203
from core import start, register_plugin, set_bounds, add_initialization_hook
DanCech/graphite-web
refs/heads/master
webapp/graphite/metrics/views.py
1
"""Copyright 2009 Chris Davis 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 dist...
hwu25/AppPkg
refs/heads/trunk
Applications/Python/Python-2.7.2/Lib/test/test_softspace.py
14
from test.test_support import run_unittest import unittest import StringIO class SoftspaceTests(unittest.TestCase): def test_bug_480215(self): # SF bug 480215: softspace confused in nested print f = StringIO.StringIO() class C: def __str__(self): print...
protatremy/buildbot
refs/heads/master
master/buildbot/db/migrate/versions/042_add_build_properties_table.py
11
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even...
joopert/home-assistant
refs/heads/dev
homeassistant/components/yweather/sensor.py
5
"""Support for the Yahoo! Weather service.""" from datetime import timedelta import logging import voluptuous as vol from yahooweather import ( # pylint: disable=import-error UNIT_C, UNIT_F, YahooWeather, get_woeid, ) from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.cons...
chugunovyar/factoryForBuild
refs/heads/master
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py
2761
######################## 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...
mdibaiee/servo
refs/heads/master
tests/wpt/web-platform-tests/encoding/resources/text-plain-charset.py
243
def main(request, response): response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label")) response.content = "hello encoding"
dudonwai/dudonsblog
refs/heads/master
Lib/site-packages/django/contrib/messages/constants.py
837
DEBUG = 10 INFO = 20 SUCCESS = 25 WARNING = 30 ERROR = 40 DEFAULT_TAGS = { DEBUG: 'debug', INFO: 'info', SUCCESS: 'success', WARNING: 'warning', ERROR: 'error', } DEFAULT_LEVELS = { 'DEBUG': DEBUG, 'INFO': INFO, 'SUCCESS': SUCCESS, 'WARNING': WARNING, 'ERROR': ERROR, }
sebalix/OpenUpgrade
refs/heads/8.0
openerp/addons/test_workflow/tests/__init__.py
259
# -*- coding: utf-8 -*- from . import test_workflow # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
joram/sickbeard-orange
refs/heads/ThePirateBay
lib/hachoir_parser/archive/ace.py
90
""" ACE parser From wotsit.org and the SDK header (bitflags) Partial study of a new block type (5) I've called "new_recovery", as its syntax is very close to the former one (of type 2). Status: can only read totally file and header blocks. Author: Christophe Gisquet <christophe.gisquet@free.fr> Creation date: 19 jan...
illicitonion/givabit
refs/heads/master
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_0_96/django/contrib/admin/views/auth.py
32
from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.forms import UserCreationForm, AdminPasswordChangeForm from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django import oldforms, template from django.shortcuts import rende...
Mac-FF/opencv-examples
refs/heads/master
python/sharpening/sharpening.py
1
#!/usr/bin/python """**sharpening.py v1.0, Python v2.7.6 - 2.7.12, 2017, kmlajceps@gmail.com** - This module sharpens of images in dir 'sample' using:: OpenCV v2.4.9 NumPy v1.11.1""" import cv2 import numpy as np import glob import os import time class Kernel: def __init__(self): ...
ErintLabs/django-openapi-gen
refs/heads/master
djsw_wrapper/models.py
1
# -*- coding: utf-8 -*- # just to make ./manage.py check happy
edgedb/edgedb
refs/heads/master
edb/tools/gen_types.py
1
# # This source file is part of the EdgeDB open source project. # # Copyright 2016-present MagicStack Inc. and the EdgeDB 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...
ujenmr/ansible
refs/heads/devel
test/units/modules/network/nos/nos_module.py
52
# (c) 2018 Extreme 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 # (at your option) any later version. # # Ansib...
explosion/spaCy
refs/heads/master
spacy/tests/vocab_vectors/test_vectors.py
1
import pytest import numpy from numpy.testing import assert_allclose, assert_equal from thinc.api import get_current_ops from spacy.vocab import Vocab from spacy.vectors import Vectors from spacy.tokenizer import Tokenizer from spacy.strings import hash_string from spacy.tokens import Doc from ..util import add_vecs_t...
tarkatronic/opbeat_python
refs/heads/master
tests/utils/wsgi/tests.py
4
from django.test import TestCase from opbeat.utils.wsgi import get_headers, get_host, get_environ class GetHeadersTest(TestCase): def test_tuple_as_key(self): result = dict(get_headers({ ('a', 'tuple'): 'foo', })) self.assertEquals(result, {}) def test_coerces_http_name(se...
monouno/site
refs/heads/master
judge/migrations/0013_private_contests.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('judge', '0012_organization_perms'), ] operations = [ migrations.AddField( model_name='contest', name...
powerjg/gem5-ci-test
refs/heads/master
util/cpt_upgraders/arm-sysreg-mapping-ns.py
15
# Copyright (c) 2016 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality o...
heeraj123/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/words/test/test_jabberjstrports.py
17
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.jabber.jstrports}. """ from twisted.trial import unittest from twisted.words.protocols.jabber import jstrports from twisted.application.internet import TCPClient class JabberStrPortsPlaceHolderTest(unitt...
aperigault/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_firewall_service_category.py
22
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
avistous/QSTK
refs/heads/master
qstkutil/utils.py
8
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Apr 22, 2011 @author: shreyas @contact: dbratcher@gatech.edu @summary: This is intended to be a collection ...
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/ubiquity/ubiquity/qtwidgets.py
1
from PyQt4.QtCore import Qt from PyQt4.QtGui import QLabel, QHBoxLayout, QPixmap, QFrame, QPalette import sys class StateBox(QFrame): def __init__(self, parent, text=''): QFrame.__init__(self, parent) self.setFrameStyle(QFrame.StyledPanel|QFrame.Sunken) self.setAutoFillBackground(True) ...
rversteegen/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/ctypes/test/test_find.py
51
import unittest import sys from ctypes import * from ctypes.util import find_library from ctypes.test import is_resource_enabled if sys.platform == "win32": lib_gl = find_library("OpenGL32") lib_glu = find_library("Glu32") lib_gle = None elif sys.platform == "darwin": lib_gl = lib_glu = find_library("O...
rplevka/robottelo
refs/heads/master
tests/foreman/ui/test_discoveryrule.py
1
"""Test class for Foreman Discovery Rules :Requirement: Discoveryrule :CaseAutomation: Automated :CaseLevel: System :CaseComponent: DiscoveryPlugin :Assignee: rplevka :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from airgun.session import Session from fauxfactory import gen_intege...
sunze/py_flask
refs/heads/master
venv/lib/python3.4/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
58
# postgresql/pg8000.py # Copyright (C) 2005-2015 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+pg8000 :name: pg8000 :dbapi: pg8000 :co...
proxysh/Safejumper-for-Mac
refs/heads/master
buildlinux/env32/lib/python2.7/encodings/unicode_internal.py
827
""" Python 'unicode-internal' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is in...
yjhjstz/gyp
refs/heads/master
test/analyzer/gyptest-analyzer.py
8
#!/usr/bin/env python # Copyright (c) 2014 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. """Tests for analyzer """ import json import TestGyp found = 'Found dependency' found_all = 'Found dependency (all)' not_found = 'No depend...
hmronline/home-assistant
refs/heads/dev
homeassistant/remote.py
3
""" Support for an interface to work with a remote instance of Home Assistant. If a connection error occurs while communicating with the API a HomeAssistantError will be raised. For more details about the Python API, please refer to the documentation at https://home-assistant.io/developers/python_api/ """ from dateti...
yanivel/fb-data-extractor
refs/heads/master
script/xlwt-0.7.5/xlwt-0.7.5/xlwt/examples/unicode1.py
45
#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman from xlwt import * w = Workbook() ws1 = w.add_sheet(u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL LETTER GAMMA}') ws1.write(0, 0, u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL ...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7/Lib/plat-mac/Carbon/CarbonEvents.py
81
# Generated from 'CarbonEvents.h' def FOUR_CHAR_CODE(x): return x def FOUR_CHAR_CODE(x): return x false = 0 true = 1 keyAEEventClass = FOUR_CHAR_CODE('evcl') keyAEEventID = FOUR_CHAR_CODE('evti') eventAlreadyPostedErr = -9860 eventTargetBusyErr = -9861 eventClassInvalidErr = -9862 eventClassIncorrectErr = -9864 eventH...
xindus40223115/w17_test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/csv.py
637
""" csv.py - read/write/investigate CSV files """ import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ ...
nuagenetworks/tempest
refs/heads/master
tempest/test.py
1
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
wdurhamh/statsmodels
refs/heads/master
statsmodels/sandbox/nonparametric/kernel_extras.py
34
""" Multivariate Conditional and Unconditional Kernel Density Estimation with Mixed Data Types References ---------- [1] Racine, J., Li, Q. Nonparametric econometrics: theory and practice. Princeton University Press. (2007) [2] Racine, Jeff. "Nonparametric Econometrics: A Primer," Foundation and Trends in Econ...
rspavel/spack
refs/heads/develop
lib/spack/spack/util/spack_yaml.py
1
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Enhanced YAML parsing for Spack. - ``load()`` preserves YAML Marks on returned objects -- this allows us to access f...
titienmiami/mmc.repository
refs/heads/master
plugin.video.tvalacarta/lib/atom/core.py
26
#!/usr/bin/env python # # Copyright (C) 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...
Vixionar/django
refs/heads/master
tests/flatpages_tests/urls.py
462
from django.conf.urls import include, url from django.contrib.flatpages.sitemaps import FlatPageSitemap from django.contrib.sitemaps import views # special urls for flatpage test cases urlpatterns = [ url(r'^flatpages/sitemap\.xml$', views.sitemap, {'sitemaps': {'flatpages': FlatPageSitemap}}, name...
nachandr/cfme_tests
refs/heads/master
cfme/utils/appliance/services.py
2
import attr from cfme.utils.appliance.plugin import AppliancePlugin from cfme.utils.appliance.plugin import AppliancePluginException from cfme.utils.log import logger_wrap from cfme.utils.quote import quote from cfme.utils.wait import wait_for class SystemdException(AppliancePluginException): pass @attr.s clas...
darina/omim
refs/heads/master
tracking/pytracking/setup.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys module_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(module_dir, '..', '..')) from pyhelpers.setup import setup_omim_pybinding NAME = "pytracking" setup_omim_pybinding(name=NAME)
Kabele/ZCR-Shellcoder
refs/heads/master
lib/generator/osx/download_execute.py
40
#!/usr/bin/env python ''' ZCR Shellcoder ZeroDay Cyber Research Z3r0D4y.Com Ali Razmjoo ''' def run(url,filename,command): return 'N'
tectronics/mythbox
refs/heads/master
resources/lib/twisted/twisted/protocols/wire.py
62
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Implement standard (and unused) TCP protocols. These protocols are either provided by inetd, or are not provided at all. """ # system imports import time, struct from zope.interface import implements # twisted import from twisted.i...
mcieslik-mctp/papy
refs/heads/master
src/papy/__init__.py
1
# -*- coding: utf-8 -*- """ **PaPy** - Parallel Pipelines in Python ####################################### The ``papy`` package provides an implementation of the flow-based programming paradigm in Python that enables the construction and deployment of distributed workflows. The package is tested on Python 2.7 """ ...
bmander/dancecontraption
refs/heads/master
django/contrib/sitemaps/management/commands/ping_google.py
591
from django.core.management.base import BaseCommand from django.contrib.sitemaps import ping_google class Command(BaseCommand): help = "Ping Google with an updated sitemap, pass optional url of sitemap" def execute(self, *args, **options): if len(args) == 1: sitemap_url = args[0] ...
grepme/CMPUT410Lab01
refs/heads/master
virt_env/virt1/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7-linux-x86_64.egg/markupsafe/__init__.py
701
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re import string from collections import Mapping from markupsafe._compat import text_type, string_types, int_types, \ u...
renyi533/tensorflow
refs/heads/master
tensorflow/lite/python/convert_saved_model.py
17
# 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...
abantam/pmtud
refs/heads/master
nsc/scons-local-1.2.0.d20090223/SCons/compat/__init__.py
19
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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 limitati...
analurandis/Tur
refs/heads/master
backend/venv/Lib/site-packages/github/tools/gh_pages.py
1
""" Github-tools Models. """ from __future__ import with_statement from urllib import urlencode from ConfigParser import RawConfigParser import urllib2 import os try: import json #@UnresolvedImport except ImportError: import simplejson as json from git import Git, Repo as _Repo class Credentials(object): ...
denisff/python-for-android
refs/heads/master
python-modules/twisted/twisted/conch/test/test_text.py
62
# -*- test-case-name: twisted.conch.test.test_text -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.conch.insults import helper, text A = text.attributes class Serialization(unittest.TestCase): def setUp(self): self.att...
JVillella/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/preprocessing/tests/text_test.py
137
# encoding: utf-8 # 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 r...
arnaudsj/pybrain
refs/heads/master
pybrain/tools/kwargsprocessor.py
5
__author__ = 'Michael Isik' class KWArgDsc(object): def __init__(self, name, **kwargs): self.name = name self.private = False self.mandatory = False keys = ['private', 'default', 'mandatory'] for key in keys: if kwargs.has_key(key): setattr(self,...
ahelsing/geni-tools
refs/heads/develop
src/omni-configure.py
3
#!/usr/bin/env python #---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without ...
russss/Diamond
refs/heads/master
src/collectors/files/files.py
52
# coding=utf-8 """ This class collects data from plain text files #### Dependencies """ import diamond.collector import os import re _RE = re.compile(r'([A-Za-z0-9._-]+)[\s=:]+(-?[0-9]+)(\.?\d*)') class FilesCollector(diamond.collector.Collector): def get_default_config_help(self): config_help = sup...
Netuitive/Diamond
refs/heads/master
src/collectors/files/files.py
52
# coding=utf-8 """ This class collects data from plain text files #### Dependencies """ import diamond.collector import os import re _RE = re.compile(r'([A-Za-z0-9._-]+)[\s=:]+(-?[0-9]+)(\.?\d*)') class FilesCollector(diamond.collector.Collector): def get_default_config_help(self): config_help = sup...
phenoxim/cinder
refs/heads/master
cinder/volume/drivers/hpe/hpe_3par_fc.py
1
# (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the Licen...
hassoon3/odoo
refs/heads/8.0
addons/delivery/partner.py
383
# -*- 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...
xingwu1/autorest
refs/heads/master
AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/setup.py
10
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
jiangzhixiao/odoo
refs/heads/8.0
addons/website_forum_doc/controllers/main.py
338
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website.models.website import slug class WebsiteDoc(http.Controller): @http.route(['/forum/how-to', '/forum/how-to/<model("forum.documentation.toc"):toc>'], type='http', auth="public", website=True) def toc...
lebronhkh/pythondotorg
refs/heads/master
peps/management/commands/dump_pep_pages.py
10
from django.core import serializers from django.core.management.base import NoArgsCommand from pages.models import Page class Command(NoArgsCommand): """ Dump PEP related Pages as indented JSON """ help = "Dump PEP related Pages as indented JSON" def handle_noargs(self, **options): qs = ...
lilac/iASP
refs/heads/iASP
benchmark/fmc/darwin_v1.4.5/eval/StatsRated.py
1
#! /usr/bin/python import sys import os import re import math #TPTP_PATH = "/home/alex/TPTP/protein/" TPTP_PATH = "/mnt/data/TPTP-v3.1.0/TPTP2X/protein/" SUMMARY_TYPES = [ "problems", "solved", "time", "memory", ] RESULT_TYPES = [ "theorem", "non_thm", "timeout", "memory", "c...
vertical-knowledge/flask-ripozo
refs/heads/master
setup.py
1
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from setuptools import setup, find_packages version = '1.0.5' setup( author='Tim Martin', author_email='tim.martin@vertical-knowledge.com', classifiers=[ ...
Hitechverma/zamboni
refs/heads/master
mkt/ratings/forms.py
12
from django import forms from django.forms.models import modelformset_factory import happyforms from quieter_formset.formset import BaseModelFormSet from tower import ugettext_lazy as _lazy import mkt from mkt.ratings import (REVIEW_MODERATE_DELETE, REVIEW_MODERATE_KEEP, REVIEW_MODERATE_SKIP)...
UdK-VPT/Open_eQuarter
refs/heads/master
mole/extensions/calc_geometry/__init__.py
51
import os, glob modules = glob.glob(os.path.join(os.path.dirname(__file__), "*.py")) __all__ = [os.path.basename(f).split('.')[0] for f in modules if not f.endswith("__init__.py")] #from . import *
cpennington/edx-platform
refs/heads/master
lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py
4
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('verify_student', '0001_initial'), ] operations = [ migrations.AddField( model_name='historicalverificationdeadline', name='deadline_is_expl...
ustramooner/CouchPotato
refs/heads/NzbIndexCom
library/hachoir_core/field/field.py
84
""" Parent of all (field) classes in Hachoir: Field. """ from hachoir_core.compatibility import reversed from hachoir_core.stream import InputFieldStream from hachoir_core.error import HachoirError, HACHOIR_ERRORS from hachoir_core.log import Logger from hachoir_core.i18n import _ from hachoir_core.tools import makePr...
paplorinc/intellij-community
refs/heads/master
python/testData/hierarchy/call/Static/ArgumentList/file_1.py
80
def target_func(): pass def func1(f): f() def func2(f): return f
aaronmartin0303/blaze
refs/heads/master
blaze/catalog/tests/test_catalog.py
1
from __future__ import absolute_import, division, print_function import unittest import datashape import blaze from blaze.optional_packages import tables_is_here from blaze.catalog.tests.catalog_harness import CatalogHarness from blaze.py2help import skipIf class TestCatalog(unittest.TestCase): def setUp(self):...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/ship/components/engine/eng_kessel_rebel_novaldex_blackhole_elite.py
85615
import sys def setup(core, object): return
stuarteberg/numpy
refs/heads/master
numpy/distutils/command/install_headers.py
264
from __future__ import division, absolute_import, print_function import os from distutils.command.install_headers import install_headers as old_install_headers class install_headers (old_install_headers): def run (self): headers = self.distribution.headers if not headers: return ...
GitHublong/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/paste/auth/basic.py
50
# (c) 2005 Clark C. Evans # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php # This code was written with funding by http://prometheusresearch.com """ Basic HTTP/1.0 Authentication This module implements ``Basic`` authentication...
davidyezsetz/kuma
refs/heads/master
vendor/packages/translate-toolkit/translate/storage/test_php.py
6
#!/usr/bin/env python # -*- coding: utf-8 -*- from translate.storage import php from translate.storage import test_monolingual from translate.misc import wStringIO def test_php_escaping_single_quote(): """Test the helper escaping funtions for 'single quotes' The tests are built mostly from examples from the ...
alexcuellar/odoo
refs/heads/8.0
addons/hr_holidays/wizard/hr_holidays_summary_employees.py
337
# -*- 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...
oculusstorystudio/kraken
refs/heads/develop_OSS
DCCIntegrations/kl/presetGen.py
1
import os import sys import optparse os.environ['KRAKEN_DCC'] = 'KL' from kraken import plugins from kraken.core.kraken_system import KrakenSystem from kraken.core.objects.rig import Rig def argOpts(): prog = os.path.basename(__file__) usage = "usage: %prog krg_file output_directory [options]" parser =...
rybak/gpodder
refs/heads/master
src/gpodder/gtkui/desktop/deviceplaylist.py
3
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2011 Thomas Perl and the gPodder Team # # gPodder 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...
apache/airflow
refs/heads/main
airflow/providers/google/suite/__init__.py
5130
# # 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...
otherness-space/myProject003
refs/heads/master
my_project_003/lib/python2.7/site-packages/django/conf/locale/tr/formats.py
118
# -*- 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 = 'd F Y' TIME_FORMAT = 'H:i:s' DATE...
tschijnmo/osmABTS
refs/heads/master
doc/source/conf.py
1
# -*- coding: utf-8 -*- # # osmABTS documentation build configuration file, created by # sphinx-quickstart on Sat Dec 6 15:57:26 2014. # # 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. # # A...
Videoclases/videoclases
refs/heads/master
videoclases/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django.core.validators class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations...
knipknap/SpiffGtkWidgets
refs/heads/master
src/SpiffGtkWidgets/color.py
1
# -*- coding: utf-8 -*- ############################################################################## # Copyright (C) 2010 Samuel Abels # 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 GNU Affero General Public ...
Khan/reviewboard
refs/heads/master
docs/manual/_ext/webapidocs.py
2
""" Sphinx plugins for web API docs. """ import inspect import re import sys try: import json except ImportError: import simplejson as json from django.contrib.auth.models import User from django.http import HttpRequest from django.template.defaultfilters import title from djblets.webapi.core import WebAPIRes...
contracode/python-social-auth
refs/heads/master
social/apps/django_app/middleware.py
70
# -*- coding: utf-8 -*- import six from django.conf import settings from django.contrib import messages from django.contrib.messages.api import MessageFailure from django.shortcuts import redirect from django.utils.http import urlquote from social.exceptions import SocialAuthBaseException from social.utils import soc...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/lazy_object_proxy/__init__.py
5
try: import copy_reg as copyreg except ImportError: import copyreg from .utils import identity copyreg.constructor(identity) try: from .cext import Proxy from .cext import identity except ImportError: from .slots import Proxy else: copyreg.constructor(identity) __version__ = "1.2.2" __all__...
veger/ansible
refs/heads/devel
lib/ansible/modules/notification/jabber.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@ansible.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.1', ...
Shaps/ansible
refs/heads/devel
lib/ansible/cli/arguments/option_helpers.py
14
# Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import copy import operator import argparse import os import os.path import sys import time import...
lstorchi/teaching
refs/heads/master
xyzviewer/datastr/tuples.py
2
t = (1,3.5,8,10.0) for i in range(len(t)): print(t[i]) for val in t: print(val) # ma posso modificare un valore ? t[1] = 0
dnsdhrj/graduate-adventure
refs/heads/master
backend/api/main/urls.py
5
from django.conf.urls import url from api.main.views import main_data, SearchModal urlpatterns = [ url(r'^$', main_data), url(r'^search/', SearchModal.as_view()), ]
mmautner/follows
refs/heads/master
follows/feed/__init__.py
1
import json from flask import Blueprint, request, jsonify from models import Item from follows.db import rconn, db_session from tasks import publish_item, add_leader_to_follower_feed from uuid import uuid4 from constants import * import logging logging.basicConfig() log = logging.getLogger() feed = Blueprint(__name__...
Yen-Chung-En/2015cd_midterm2
refs/heads/master
ref/gear.py
64
import cherrypy import os import sys # 這個程式要計算正齒輪的齒面寬, 資料庫連結希望使用 pybean 與 SQLite # 導入 pybean 模組與所要使用的 Store 及 SQLiteWriter 方法 from pybean import Store, SQLiteWriter import math # 確定程式檔案所在目錄, 在 Windows 有最後的反斜線 _curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) # 將所在目錄設為系統搜尋目錄 sys.path.append(_curdir) if 'O...
hkernbach/arangodb
refs/heads/devel
3rdParty/V8/v5.7.492.77/tools/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py
100
#!/usr/bin/env python # Copyright (c) 2014 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. """ Verify that running gyp in a different directory does not cause actions and rules to rerun. """ import os import sys import TestGyp te...
mancoast/CPythonPyc_test
refs/heads/master
cpython/265_test_atexit.py
54
import sys import unittest import StringIO import atexit from test import test_support class TestCase(unittest.TestCase): def setUp(self): s = StringIO.StringIO() self.save_stdout = sys.stdout self.save_stderr = sys.stderr sys.stdout = sys.stderr = self.subst_io = s self.sav...
avadacatavra/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/test/client_for_testing.py
451
#!/usr/bin/env python # # Copyright 2012, 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...
minhpqn/chainer
refs/heads/master
tests/cupy_tests/linalg_tests/test_decomposition.py
24
import unittest from cupy import testing @testing.gpu class TestDecomposition(unittest.TestCase): _multiprocess_can_split_ = True