repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
tjsavage/djangononrel-starter
refs/heads/master
django/conf/locale/sv/formats.py
16
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'Y-m-d' SHORT_DATETIME_FORMAT = 'Y-m-d H:i' FIRST_DAY_OF_WEEK = 1 DATE_INPU...
vrenaville/OCB
refs/heads/8.0
addons/website_quote/models/order.py
37
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
garyjohnson/pqaut
refs/heads/master
test_apps/3_qwidget_app_with_aut_id.py
1
#!/usr/bin/env python import os, sys sys.path.append(os.path.abspath('.')) import pqaut.server as pqaut import PyQt5.Qt as Qt class Root(Qt.QWidget): def __init__(self): super(Qt.QWidget, self).__init__() widget = Qt.QWidget(self) widget.automation_id = "custom_widget" widget.set...
petricm/DIRAC
refs/heads/integration
Core/Security/m2crypto/__init__.py
2
# List of OIDs used in handling VOMS extension. # VOMS extension is encoded in ASN.1 format and it's surprisingly hard to decode. OIDs describe content of sections # of the data. There is no "official list of OIDs", ones used here are sourced from analyzing VOMS extensions itself # and different pieces of code and pres...
mikalstill/nova
refs/heads/master
nova/virt/powervm/tasks/storage.py
2
# Copyright 2015, 2018 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
Gaia3D/QGIS
refs/heads/master
python/ext-libs/owslib/namespaces.py
29
class Namespaces(object): """ Class for holding and maniputlating a dictionary containing the various namespaces for each standard. """ namespace_dict = { 'atom' : 'http://www.w3.org/2005/Atom', 'csw' : 'http://www.opengis.net/cat/csw/2.0.2', 'dc' : 'http...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/dressed_cardas_guard_m_04.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/deed/pet_deed/deed_3p0_basic.py
85615
import sys def setup(core, object): return
xadahiya/django
refs/heads/master
tests/migrations/test_migrations_run_before/0001_initial.py
427
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Salamander", [ ("id", models.AutoField(primary_key=True)), ("si...
nuagenetworks/monolithe
refs/heads/master
monolithe/generators/lang/java/writers/vanillawriter.py
9
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent 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 # no...
akosel/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/example/abort_handshake_wsh.py
465
# 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 of conditions and the f...
mkminer/p2pool
refs/heads/master
p2pool/util/variable.py
270
import itertools import weakref from twisted.internet import defer, reactor from twisted.python import failure, log class Event(object): def __init__(self): self.observers = {} self.id_generator = itertools.count() self._once = None self.times = 0 def run_and_watch(self, f...
collinjackson/mojo
refs/heads/master
build/android/gyp/insert_chromium_version.py
77
#!/usr/bin/env python # # Copyright 2014 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. """Insert a version string into a library as a section '.chromium.version'. """ import optparse import os import sys import tempfile...
stormi/tsunami
refs/heads/master
src/secondaires/peche/commandes/banc/voir.py
1
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # 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 # l...
sumedhasingla/VTK
refs/heads/master
Imaging/Core/Testing/Python/ResliceBSpline.py
20
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # this script tests vtkImageReslice with different interpolation modes, # with the wrap-pad feature turned on and with a rotation # Image pipeline reader = vtk.vtkImageReader() reader...
ai-se/timm
refs/heads/master
leaner/src/lib.py
1
from __future__ import division,print_function import sys sys.dont_write_bytecode =True """ # Welcome to the future big isn't it """ from config import * print(the)
atomic-labs/zulip
refs/heads/master
zerver/decorator.py
5
from __future__ import absolute_import from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from django.http import QueryDict, HttpResponseNotAllowed from django.http.multipartparser import MultiPartParser from zerve...
varunnaganathan/django
refs/heads/master
tests/test_runner/tests.py
11
""" Tests for django test runner """ from __future__ import unicode_literals import unittest from admin_scripts.tests import AdminScriptTestCase from django import db from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from django.t...
srm912/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/_pytest/assertion/util.py
175
"""Utilities for assertion debugging""" import pprint import _pytest._code import py try: from collections import Sequence except ImportError: Sequence = list BuiltinAssertionError = py.builtin.builtins.AssertionError u = py.builtin._totext # The _reprcompare attribute on the util module is used by the new a...
Averroes/statsmodels
refs/heads/master
statsmodels/datasets/fair/__init__.py
829
from .data import *
RPGOne/Skynet
refs/heads/Miho
numpy-master/benchmarks/benchmarks/bench_io.py
50
from __future__ import absolute_import, division, print_function from .common import Benchmark, get_squares import numpy as np class Copy(Benchmark): params = ["int8", "int16", "float32", "float64", "complex64", "complex128"] param_names = ['type'] def setup(self, typename): dtype...
flashbuckets/seastar
refs/heads/master
scripts/dpdk_nic_bind.py
39
#! /usr/bin/python # # BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. # 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 sou...
mtp1376/youtube-dl
refs/heads/master
youtube_dl/extractor/aljazeera.py
95
from __future__ import unicode_literals from .common import InfoExtractor class AlJazeeraIE(InfoExtractor): _VALID_URL = r'http://www\.aljazeera\.com/programmes/.*?/(?P<id>[^/]+)\.html' _TEST = { 'url': 'http://www.aljazeera.com/programmes/the-slum/2014/08/deliverance-201482883754237240.html', ...
foodszhang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/crashers/underlying_dict.py
189
import gc thingy = object() class A(object): def f(self): return 1 x = thingy r = gc.get_referrers(thingy) if "__module__" in r[0]: dct = r[0] else: dct = r[1] a = A() for i in range(10): a.f() dct["f"] = lambda self: 2 print(a.f()) # should print 1
uberamd/NGECore2
refs/heads/master
scripts/object/static/item/wp_mle_sword_lightsaber_andael.py
85615
import sys def setup(core, object): return
PLyczkowski/Sticky-Keymap
refs/heads/master
2.74/scripts/addons_contrib/io_export_marmalade.py
2
# ***** GPL LICENSE BLOCK ***** # # 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...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/lib2to3/pygram.py
320
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Export the Python grammar and symbols.""" # Python imports import os # Local imports from .pgen2 import token from .pgen2 import driver from . import pytree # The grammar file _GRAMMAR_FILE = os.path.join(os.path....
tkelman/utf8rewind
refs/heads/master
dependencies/gtest-svn-head/scripts/upload.py
2511
#!/usr/bin/env python # # Copyright 2007 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 o...
liuwenf/moose
refs/heads/devel
python/chigger/tests/contours/inline_clip.py
6
#!/usr/bin/env python #pylint: disable=missing-docstring ################################################################# # DO NOT MODIFY THIS HEADER # # MOOSE - Multiphysics Object Oriented Simulation Environment # # #...
sorenk/ansible
refs/heads/devel
lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
42
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: proxysql_mysql_users versi...
meawoppl/babyfood
refs/heads/master
babyfood/pcb/OSHParkPCB.py
1
import os from babyfood.pcb.PCBBase import PCBArtist _layerTupleToExtension = {("top", "overlay"): "GTO", ("top", "mask"): "GTS", ("top", "copper"): "GTL", ("bottom", "copper"): "GBL", ("bottom", "mask"): "GBS", ...
omprakasha/odoo
refs/heads/8.0
addons/l10n_be_invoice_bba/invoice.py
141
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # i...
Fl0rianFischer/sme_odoo
refs/heads/9.0
addons/gamification/models/challenge.py
3
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import SUPERUSER_ID from openerp.osv import fields, osv from openerp.tools import ustr, DEFAULT_SERVER_DATE_FORMAT as DF from openerp.tools.safe_eval import safe_eval as eval from openerp.tools.translate imp...
keen99/SickRage
refs/heads/master
autoProcessTV/lib/requests/packages/chardet/mbcssm.py
1782
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mravikumar281/staging-server
refs/heads/master
teachers/views/teacher_leave_views.py
2
from django.views.generic import * from teachers.models import * from teachers.forms import * from django.shortcuts import * from baseapp.models import * from django.contrib import messages from django.db import * from datetime import * from datetime import datetime, timedelta from django.views.generic import * from dj...
NMGRL/pychron
refs/heads/develop
pychron/graph/regression_time_series_graph.py
2
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
fingeronthebutton/robotframework
refs/heads/master
src/robot/running/importer.py
10
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
THEMVFFINMAN/Python-Games
refs/heads/master
Codingame.com/rollercoaster.py
2
import sys import math from collections import deque # Auto-generated code below aims at helping you parse # the standard input according to the problem statement. l, c, n = [int(i) for i in input().split()] d = deque() for i in range(n): d.appendleft(int(input())) print(l, c, n, d, file=sys.stderr) full = ...
kobe25/gasistafelice
refs/heads/master-dj17
gasistafelice/gf/gas/management/commands/search_gas.py
3
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from gf.gas.models import GAS from lib.djangolib import get_qs_filter_dict_from_str, get_instance_dict_from_attrs from lib import get_params_from_template class Command(BaseCommand): args = "<python string templat...
nischalsheth/contrail-controller
refs/heads/master
src/server-manager/inventory/inventory-daemon/setup.py
15
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import setuptools setuptools.setup( name='server-inventory-collector', version='0.1dev', packages=setuptools.find_packages(), package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, long_description="Server Inventory...
ldoktor/avocado-vt
refs/heads/master
selftests/unit/test_utils_cgroup.py
10
#!/usr/bin/env python import os import unittest import tempfile import sys from avocado.core import exceptions # simple magic for using scripts within a source tree basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(basedir, 'virttest')): sys.path.append(basedir)...
kynikos/outspline
refs/heads/master
src/outspline/conf/extensions/organism.py
7
# Outspline - A highly modular and extensible outliner. # Copyright (C) 2011 Dario Giovannetti <dev@dariogiovannetti.net> # # This file is part of Outspline. # # Outspline is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
kjc88/sl4a
refs/heads/master
python/src/Lib/test/test_codecmaps_jp.py
150
#!/usr/bin/env python # # test_codecmaps_jp.py # Codec mapping tests for Japanese encodings # from test import test_support from test import test_multibytecodec_support import unittest class TestCP932Map(test_multibytecodec_support.TestBase_Mapping, unittest.TestCase): encoding = 'cp932' ...
yfli/django-tastypie
refs/heads/master
tests/settings_gis_spatialite.py
16
from settings_gis import * # flake8: noqa # Run `spatialite tastypie-spatialite.db "SELECT InitSpatialMetaData();"` before # trying spatialite on disk. # "InitSpatiaMetaData ()error:"table spatial_ref_sys already exists" can be ignored. DATABASES['default']['ENGINE'] = 'django.contrib.gis.db.backends.spatialite' DATA...
msiedlarek/qtwebkit
refs/heads/5.4
Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py
124
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mixman/djangodev
refs/heads/master
django/templatetags/i18n.py
80
from __future__ import with_statement import re from django.template import (Node, Variable, TemplateSyntaxError, TokenParser, Library, TOKEN_TEXT, TOKEN_VAR) from django.template.base import _render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import translation regist...
shyamalschandra/copperhead
refs/heads/master
copperhead/runtime/intermediate.py
5
# # Copyright 2008-2012 NVIDIA Corporation # Copyright 2009-2010 University of California # # 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...
stverhae/incubator-airflow
refs/heads/master
airflow/example_dags/subdags/__init__.py
880
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
tulpar008/xadmin
refs/heads/master
tests/settings.py
23
DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MIDDLEWARE_CLASSES = () # Required for Django 1.4+ STATIC_URL = '/static/' # Required for Django 1.5+ SECRET_KEY = 'abc123'
jmerkow/VTK
refs/heads/master
ThirdParty/Twisted/twisted/plugins/twisted_words.py
60
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from zope.interface import classProvides from twisted.plugin import IPlugin from twisted.application.service import ServiceMaker from twisted.words import iwords NewTwistedWords = ServiceMaker( "New Twisted Words", "twisted.words.tap",...
arju88nair/projectCulminate
refs/heads/master
venv/lib/python3.5/site-packages/nltk/internals.py
2
# Natural Language Toolkit: Internal utility functions # # Copyright (C) 2001-2017 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # Nitin Madnani <nmadnani@ets.org> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import ...
mttr/django
refs/heads/master
tests/template_backends/test_django.py
199
from template_tests.test_response import test_processor_name from django.template import RequestContext from django.template.backends.django import DjangoTemplates from django.template.library import InvalidTemplateLibrary from django.test import RequestFactory, ignore_warnings, override_settings from django.utils.dep...
dongxingshui/virt-manager
refs/heads/master
virtinst/devicewatchdog.py
1
# # Copyright 2010, 2013 Red Hat, Inc. # Cole Robinson <crobinso@redhat.com> # # 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 option) any later ve...
metabrainz/acousticbrainz-server
refs/heads/master
hl_extractor/job_calc.py
1
#!/usr/bin/env python from __future__ import print_function import argparse import json import os import subprocess import sys import tempfile from hashlib import sha1 from flask import current_app from setproctitle import setproctitle from threading import Thread from time import sleep import yaml import db import...
xueliu/rt-thread
refs/heads/master
tools/package.py
45
# # File : package.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # 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 ...
x303597316/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/fixtures_regress/tests.py
49
# -*- coding: utf-8 -*- # Unittests for fixtures. from __future__ import absolute_import, unicode_literals import json import os import re import warnings from django.core.serializers.base import DeserializationError from django.core import management from django.core.management.base import CommandError from django.c...
gradel/mezzanine
refs/heads/master
mezzanine/pages/page_processors.py
39
from __future__ import unicode_literals from future.builtins import str as _str from collections import defaultdict from importlib import import_module from django.apps import apps from django.utils.module_loading import module_has_submodule from mezzanine.pages.models import Page from mezzanine.utils.importing impo...
Tayamarn/socorro
refs/heads/master
webapp-django/crashstats/crashstats/context_processors.py
4
from django.conf import settings def help_urls(request): return { 'GOOGLE_AUTH_HELP_URL': settings.GOOGLE_AUTH_HELP_URL, }
kifcaliph/odoo
refs/heads/8.0
addons/stock/controllers/__init__.py
2262
import main
jvrsantacruz/XlsxWriter
refs/heads/master
xlsxwriter/relationships.py
14
############################################################################### # # Relationships - A class for writing the Excel XLSX Worksheet file. # # Copyright 2013-2015, John McNamara, jmcnamara@cpan.org # # Package imports. from . import xmlwriter # Long namespace strings used in the class. schema_root = 'http...
kmonsoor/pyglet
refs/heads/master
tests/image/BUFFER_SAVE.py
15
#!/usr/bin/env python '''Test colour buffer save. A scene consisting of a single coloured triangle will be rendered. The colour buffer will then be saved to a stream and loaded as a texture. You will see the original scene first for up to several seconds before the buffer image appears (because retrieving...
jason-weirather/Au-public
refs/heads/master
iron/utilities/bam_to_bed_depth.py
1
#!/usr/bin/python import argparse, sys, os from shutil import rmtree from multiprocessing import cpu_count, Lock, Pool from tempfile import mkdtemp, gettempdir from Bio.Format.Sam import BAMFile from Bio.Stream import LocusStream from Bio.Range import ranges_to_coverage, sort_genomic_ranges current = 0 glock = Lock() ...
GalaxyTab4/maxicm_kernel_samsung_degaswifi
refs/heads/3.10
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
blacktear23/django
refs/heads/master
tests/regressiontests/admin_widgets/urls.py
107
from django.conf.urls.defaults import * import widgetadmin urlpatterns = patterns('', (r'^', include(widgetadmin.site.urls)), )
waytai/django
refs/heads/master
tests/conditional_processing/tests.py
322
# -*- coding:utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.test import SimpleTestCase, override_settings FULL_RESPONSE = 'Test conditional get response' LAST_MODIFIED = datetime(2007, 10, 21, 23, 21, 47) LAST_MODIFIED_STR = 'Sun, 21 Oct 2007 23:21:47 GMT' LAST_MODIFIED_N...
losnikitos/googleads-python-lib
refs/heads/master
examples/dfp/v201502/order_service/create_orders.py
4
#!/usr/bin/python # # Copyright 2015 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 b...
OpenTherapeutics/transcode
refs/heads/master
transcode/render.py
1
# -*- coding: utf-8 -*- from .renderers import md, rst from .sanitize import sanitize_html from . import regex from . import conf def txwrap(source, spec_cls, base_cls='transcode', tag='div'): return '<{} class="{} {}-{}">\n{}\n</{}>'.format( tag, base_cls, base_cls, spec_cls, ...
tarasane/h2o-3
refs/heads/master
h2o-py/tests/testdir_algos/glm/pyunit_link_functions_poissonGLM.py
5
import sys sys.path.insert(1, "../../../") import h2o, tests import pandas as pd import zipfile import statsmodels.api as sm def link_functions_poisson(): print("Read in prostate data.") h2o_data = h2o.import_file(path=h2o.locate("smalldata/prostate/prostate_complete.csv.zip")) sm_data = pd.rea...
sql-machine-learning/sqlflow
refs/heads/develop
python/runtime/xgboost/explain.py
1
# Copyright 2020 The SQLFlow 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 applicable law o...
Distrotech/intellij-community
refs/heads/master
python/testData/override/returnAnnotation_after.py
83
class A(): def some_method(self) -> "return value": pass class B(A): def some_method(self) -> "return value": <selection>super().some_method()</selection>
adityahase/frappe
refs/heads/develop
frappe/www/qrcode.py
2
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from six.moves.urllib.parse import parse_qsl from frappe.twofactor import get_qr_svg_code def get_context(context): context.no_cache = 1 con...
mbalasso/mynumpy
refs/heads/master
numpy/compat/setup.py
45
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('compat',parent_package,top_path) return config if __name__ == '__main__': from numpy.distutils.core import setup setup(configuration=configurat...
psachin/swift
refs/heads/master
test/unit/account/test_auditor.py
4
# Copyright (c) 2010-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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
slogan621/tscharts
refs/heads/master
apps/xrayuploader/advanced_search.py
1
# advanced_search.py import wx from pubsub import pub class AdvancedSearch(wx.Panel): def __init__(self, parent): super().__init__(parent) self.main_sizer = wx.BoxSizer(wx.VERTICAL) self.free_text = wx.TextCtrl(self) self.ui_helper('Free text search:', self.free_text) ...
KlausTrainer/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Tool/cvf.py
61
"""engine.SCons.Tool.cvf Tool-specific initialization for the Compaq Visual Fortran compiler. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated docume...
CXQERP/ODOOERP
refs/heads/master
openerp/addons/base/tests/test_basecase.py
379
# -*- coding: utf-8 -*- import unittest2 from openerp.tests import common class test_single_transaction_case(common.SingleTransactionCase): """ Check the whole-class transaction behavior of SingleTransactionCase. """ def test_00(self): """Create a partner.""" cr, uid = self.cr, self.u...
nerginer/GrovePi
refs/heads/master
Software/Python/GrovePi_Hardware_Test.py
4
#!/usr/bin/env python # # GrovePi Hardware Test # Connect Buzzer to Port D8 # Connect Button to Analog Port A0 # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.grovepi.com # # Have a question about this example? Ask on the forums here: http://www.dexteri...
UQ-UQx/edx-platform_lti
refs/heads/master
lms/djangoapps/instructor/utils.py
69
""" Helpers for instructor app. """ from xmodule.modulestore.django import modulestore from courseware.model_data import FieldDataCache from courseware.module_render import get_module class DummyRequest(object): """Dummy request""" META = {} def __init__(self): self.session = {} self.u...
feth/velat
refs/heads/master
velat/base.py
1
#coding: utf-8 """ base.py from package velat Author and Copyright © Feth Arezki <feth ×AT× tuttu.info>, 2010-2011 This file is part of velat-core. the program velat-core is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as publish...
tuem/resembla
refs/heads/master
eval/py/count.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Resembla # https://github.com/tuem/resembla # # Copyright 2017 Takashi Uemura # # 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://w...
andres-h/webdc3
refs/heads/master
test/test_inv.py
2
#!/usr/bin/env python # test_inv_load # # How big might a JSON file for our inventory be? # # Begun by Peter L. Evans, June 2013 # <pevans@gfz-potsdam.de> # # ---------------------------------------------------------------------- import datetime import doctest import json import os import tempfile impor...
alanamarzoev/ray
refs/heads/master
python/ray/rllib/models/visionnet.py
3
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim from ray.rllib.models.model import Model class VisionNetwork(Model): """Generic vision network.""" def _init(self, inputs, num_outputs,...
S1m0n5/PyAssistant
refs/heads/master
__init__.py
1
#! /usr/bin/env python import sys logo = ''' _____ _ _ _ | __ \ /\ (_) | | | | | |__) | _ / \ ___ ___ _ ___| |_ __ _ _ __ | |_ | ___/ | | | / /\ \ / __/ __| / __| __/ _` | '_ \| __| | | | |_| |/ ____ \\__ \__ \ \__ \ || (_| | | | ...
google/grr
refs/heads/master
grr/core/grr_response_core/lib/util/text_test.py
1
#!/usr/bin/env python # -*- encoding: utf-8 -*- from absl.testing import absltest from grr_response_core.lib.util import text class AsciifyTest(absltest.TestCase): def testAscii(self): self.assertEqual(text.Asciify(b"foobar"), "foobar") self.assertEqual(text.Asciify(b"+!?#"), "+!?#") def testNonAscii(...
snipsco/ntm-lasagne
refs/heads/master
examples/copy-task.py
1
import theano import theano.tensor as T import numpy as np import matplotlib.pyplot as plt from lasagne.layers import InputLayer, DenseLayer, ReshapeLayer import lasagne.layers import lasagne.nonlinearities import lasagne.updates import lasagne.objectives import lasagne.init from ntm.layers import NTMLayer from ntm.m...
alex8866/cinder
refs/heads/f22-patches
doc/ext/cinder_autodoc.py
51
from __future__ import print_function import gettext import os gettext.install('cinder') from cinder import utils def setup(app): print("**Autodocumenting from %s" % os.path.abspath(os.curdir)) rv = utils.execute('./doc/generate_autodoc_index.sh') print(rv[0])
leansoft/edx-platform
refs/heads/master
lms/envs/devstack.py
16
""" Specific overrides to the base prod settings to make development easier. """ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import # Don't use S3 in devstack, fall back to filesystem del DEFAULT_FILE_STORAGE MEDIA_ROOT = "/edx/var/edxapp/uploads" DEBUG = True USE_I18N = True TEMPLATE_DEB...
renzon/gaepermission
refs/heads/master
tests/facade_tests.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from base import GAETestCase from gaepermission import facade from gaepermission.model import MainUser from mommygae import mommy class GetUserByEmailTests(GAETestCase): def test_get_user(self): user = mommy.save_one(MainUser...
anant-dev/django
refs/heads/master
tests/forms_tests/tests/test_validators.py
119
from __future__ import unicode_literals import re from unittest import TestCase from django import forms from django.core import validators from django.core.exceptions import ValidationError class UserForm(forms.Form): full_name = forms.CharField( max_length=50, validators=[ validato...
brian-yang/mozillians
refs/heads/master
vendor-local/lib/python/django_browserid/base.py
10
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import logging from django.conf import settings from django.core.exceptions import ImproperlyConfigured imp...
SoloVeniaASaludar/mycroft-core
refs/heads/next
mycroft/lock/__init__.py
3
# Time-stamp: <2017-04-06 15:55:05 dmendyke> -*- mode: python; -*- # Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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, ...
sestrella/ansible
refs/heads/devel
lib/ansible/module_utils/facts/network/netbsd.py
232
# 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 distributed in the hope that ...
tedder/ansible
refs/heads/devel
test/units/module_utils/xenserver/test_xenserverobject.py
4
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <bvitnik@mainstream.rs> # 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 pytest from .FakeAnsibleModule import FakeAn...
sajuptpm/neutron-ipam
refs/heads/stable/icehouse
neutron/tests/unit/nuage/test_netpartition.py
5
# Copyright 2014 Alcatel-Lucent USA 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 l...
SKIRT/PTS
refs/heads/master
do/eagle/status.py
1
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
google-research/tensor2robot
refs/heads/master
research/grasp2vec/resnet.py
1
# coding=utf-8 # Copyright 2021 The Tensor2Robot 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 ...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/database/proxysql/proxysql_backend_servers.py
13
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: proxysql_backend_servers v...
chrismeyersfsu/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_nics_facts.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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 #...
slevenhagen/odoo
refs/heads/8.0
addons/web_linkedin/web_linkedin.py
333
# -*- 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...
mfcabrera/luigi
refs/heads/master
examples/elasticsearch_index.py
1
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...