repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
TurboStake/TurboStake
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
markeTIC/server-tools
refs/heads/8.0
users_ldap_push/models/__init__.py
16
# -*- coding: utf-8 -*- ############################################################################## # # This module copyright (C) 2015 Therp BV <http://therp.nl>. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
mccheung/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/sqlite3/dbapi2.py
126
# pysqlite2/dbapi2.py: the DB-API 2.0 interface # # Copyright (C) 2004-2005 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use of this sof...
gonzalorodrigo/sremote
refs/heads/master
test/test_ssh_connector.py
2
"""UNIT TESTS for ssh connector. It executes locally and requires that the current user can do "passwordless" ssh to localhost. python -m unittest test_ssh_connector.TestSsh """ from test_connector import TestClientChannel import sremote.connector.ssh as ssh from getpass import getuser class TestSsh(TestClientCh...
ghostwords/localore
refs/heads/master
localore/productions/migrations/0004_productionpagerelatedlink_social_site.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('productions', '0003_auto_20160310_1922'), ] operations = [ migrations.AddField( model_name='productionpagerelate...
simplyharsh/pytimezone
refs/heads/master
api.py
1
#!/usr/bin/python import os import re import math import pytz import pickle import logging import datetime try: import json except ImportError: import simplejson as json class pytimezone(object): SHORTCUT_DEGREES_LATITUDE = 1 SHORTCUT_DEGREES_LONGITUDE = 1 DEFAULT_FILENAME = os.path.join(os.path...
dfdx2/django
refs/heads/master
tests/test_discovery_sample/tests_sample.py
98
import doctest from unittest import TestCase from django.test import SimpleTestCase, TestCase as DjangoTestCase, tag from . import doctests class TestVanillaUnittest(TestCase): def test_sample(self): self.assertEqual(1, 1) class TestDjangoTestCase(DjangoTestCase): def test_sample(self): ...
izapolsk/integration_tests
refs/heads/master
cfme/tests/control/test_rest_control.py
1
"""This module contains control REST API specific tests.""" import fauxfactory import pytest from manageiq_client.api import APIException from cfme import test_requirements from cfme.rest.gen_data import conditions as _conditions from cfme.rest.gen_data import policies as _policies from cfme.utils.rest import assert_r...
EricSchles/regulations-site
refs/heads/master
regulations/tests/layers_interpretations_tests.py
7
from mock import Mock, patch from django.conf import settings from unittest import TestCase from regulations.generator.layers.interpretations import InterpretationsLayer class InterpretationsLayerTest(TestCase): def setUp(self): if not settings.configured: settings.configure(TEMPLATE_DEBUG=Fa...
JohnnyKing94/pootle
refs/heads/master
tests/pootle_profile/profile.py
5
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from datetime import timedelta import pytes...
jlorieau/mollib
refs/heads/master
mollib/pa/fixers.py
1
""" Tools to fix mistakes and errors in partial alignment (RDC and RACS) data. """ from copy import deepcopy from mollib import Molecule from mollib.utils.interactions import interaction_type from .process_molecule import Process from .svd import calc_pa_SVD from .analysis import find_outliers from . import settings ...
Argon-Zhou/django
refs/heads/master
tests/transaction_hooks/models.py
326
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Thing(models.Model): num = models.IntegerField() def __str__(self): return "Thing %d" % self.num
Snergster/virl-salt
refs/heads/master
openstack/nova/files/mitaka/nova+exception.py
1
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
rshk/datapub
refs/heads/master
datapub/graph.py
1
from rdflib import Graph, Namespace, BNode, plugin from rdflib.namespace import RDF, DC, XSD, FOAF from rdflib.store import Store from flask import request, g from werkzeug.local import LocalProxy from datapub import app DCAT = Namespace('http://www.w3.org/ns/dcat#') catalog_node = BNode('catalog') def get_site_n...
ShadowsDemise/nFanControl
refs/heads/master
CreateSettings.py
1
#!/usr/bin/python3 # #CreateSettings.py # #Copyright (C) 2011-2012 Nicholas Polach <npolach@hotmail.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 3 of the License, or #(at y...
Meshu/three.js
refs/heads/master
utils/exporters/blender/addons/io_three/exporter/api/light.py
195
from bpy import data, types from .. import utilities, logger def _lamp(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(name, types.Lamp): lamp = name ...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
script.module.streamlink.base/resources/lib/streamlink/plugins/funimationnow.py
5
from __future__ import print_function import logging import random import re from streamlink.plugin import Plugin, PluginArguments, PluginArgument from streamlink.plugin.api import useragents from streamlink.plugin.api import validate from streamlink.plugin.api.utils import itertags from streamlink.stream import HLSS...
intel-analytics/analytics-zoo
refs/heads/master
pyzoo/zoo/chronos/model/tcmf/__init__.py
1
# Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
grahamhayes/will
refs/heads/master
will/storage/redis_storage.py
11
import redis import urlparse class RedisStorage(object): """ A storage backend using Redis. You must supply a REDIS_URL setting that is passed through urlparse. Examples: * redis://localhost:6379/7 * redis://rediscloud:asdfkjaslkdjflasdf@pub-redis-12345.us-east-1-1.2.ec2.garantiadata.com:12...
FlaskGuys/Flask-Imagine
refs/heads/master
tests/filters/test_rotate.py
2
import os import unittest from copy import copy from PIL import Image from flask.ext.imagine.filters.rotate import RotateFilter class TestRotateFilter(unittest.TestCase): image_png = None image_jpg = None image_tif = None image_bmp = None def setUp(self): assets_path = os.path.abspath(os....
zcoinofficial/zcoin
refs/heads/master
qa/rpc-tests/sigma_blocklimit.py
1
#!/usr/bin/env python3 from decimal import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class SigmaBlockLimitTest(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 4 self.setup_clean_chain = False def ...
Antiun/odoo
refs/heads/8.0
addons/account_payment/account_move_line.py
241
# -*- 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...
BrynCooke/incubator-tinkerpop
refs/heads/master
gremlin-python/src/main/jython/gremlin_python/__init__.py
35
''' 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 use this ...
samdowd/drumm-farm
refs/heads/master
drumm_env/lib/python2.7/site-packages/pip/req/req_file.py
343
""" Requirements file parsing """ from __future__ import absolute_import import os import re import shlex import sys import optparse import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves import filterfalse import pip from pip.download import get_file_content from ...
Jun1113/MapReduce-Example
refs/heads/master
contrib/hod/hodlib/Common/util.py
182
#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 use thi...
janez-svetin/resrc
refs/heads/master
resrc/list/tests/models_tests.py
3
from django.test import TestCase from resrc.userprofile.tests.factories import UserFactory, ProfileFactory from resrc.link.tests.factories import LinkFactory from resrc.list.tests.factories import ListFactory from resrc.list.models import List, ListLinks class UserprofileTestCase(TestCase): def setUp(self): ...
indautgrp/erpnext
refs/heads/develop
erpnext/setup/doctype/email_digest/test_email_digest.py
76
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Email Digest') class TestEmailDigest(unittest.TestCase): pass
dqnykamp/sympy
refs/heads/master
sympy/strategies/tree.py
29
from __future__ import print_function, division from functools import partial from sympy.strategies import chain, minimize import sympy.strategies.branch as branch from sympy.strategies.branch import yieldify identity = lambda x: x def treeapply(tree, join, leaf=identity): """ Apply functions onto recursive cont...
sodafree/backend
refs/heads/master
django/contrib/gis/utils/layermapping.py
78
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: http://geodjango.org/docs/layermapping.html """ impo...
ArcherSys/CafeSync
refs/heads/master
togetherjs/tests/doctestjs/.resources/retemplate.py
21
#!/usr/bin/env python import re section_re = re.compile(r''' (?P<front1><!--\s*) (?P<name>[A-Z_]+) (?P<front2>\s*-->) (?P<value>[^\000]*) (?P<back1><!--\s*) /(?P=name) (?P<back2>\s*-->) ''', re.VERBOSE | re.MULTILINE) value_sub_re = re.compile(r'(?P<front><[^>]*")(?:__)(?P<name>[A-Z_]+)(?:__)(?P<back>"[^>]*>)')...
JoeyCodinja/INFO3180PROJECT3
refs/heads/master
lib/flask/testsuite/deprecations.py
563
# -*- coding: utf-8 -*- """ flask.testsuite.deprecations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests deprecation support. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest from flask.testsuite import FlaskTestCase, catch_warnings class ...
pete318/TrinityCore
refs/heads/3.3.5
contrib/enumutils_describe.py
7
from re import compile, MULTILINE from os import walk, getcwd notice = ('''/* * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information * * 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 th...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/tests/unit/beanstalk/test_layer1.py
5
#!/usr/bin/env python import json from tests.unit import AWSMockServiceTestCase from boto.beanstalk.layer1 import Layer1 # These tests are just checking the basic structure of # the Elastic Beanstalk code, by picking a few calls # and verifying we get the expected results with mocked # responses. The integration t...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7.2/Lib/test/test_slice.py
114
# tests for slice objects; in particular the indices method. import unittest from test import test_support from cPickle import loads, dumps import sys class SliceTest(unittest.TestCase): def test_constructor(self): self.assertRaises(TypeError, slice) self.assertRaises(TypeError, slice, 1, 2, 3, ...
vvv1559/intellij-community
refs/heads/master
python/testData/inspections/PyAugmentAssignmentInspection/numeric.py
74
var_3 = var_3 var_4 = 1 <weak_warning descr="Assignment can be replaced with augmented assignment">var_6 = var_6 + var_4</weak_warning> #PY-2482 <weak_warning descr="Assignment can be replaced with augmented assignment">var = 2 + var</weak_warning>
davemehringer/keplerpp
refs/heads/master
apps/zonal_acc.py
1
# zonal_acc.py # Copyright (C) 2016 David Mehringer # # 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. # ...
linjeffrey/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checker.py
120
# Copyright (C) 2009 Google Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # Copyright (C) 2010 ProFUSION embedded systems # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
sebrandon1/nova
refs/heads/master
nova/tests/functional/notification_sample_tests/test_service_update.py
14
# 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 agreed to in...
RusDavies/ansible-modules-core
refs/heads/devel
packaging/os/apt_key.py
131
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2012, Jayson Vantuyl <jayson@aggressive.ly> # # 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 #...
TribeMedia/synapse
refs/heads/master
synapse/util/caches/response_cache.py
2
# -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd # # 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 la...
aaronkurtz/gourmand
refs/heads/master
gourmand/feeds/migrations/0002_articles_and_extras.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('feeds', '0001_initial'), ] operations = [ migrations.CreateModel( name='Article', fields=[ ...
wpgallih/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py
158
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestArrayBuffer { attribute ArrayBuffer bufferAttr; void bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, ArrayBuffer[] arg3, sequence<ArrayBuffer> arg4); attribute ArrayBufferView viewAttr; ...
XeCycle/indico
refs/heads/master
indico/util/fossilize/__init__.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
tux-00/ansible
refs/heads/devel
lib/ansible/modules/cloud/rackspace/rax_mon_notification.py
70
#!/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 distributed...
with-git/tensorflow
refs/heads/master
tensorflow/python/training/server_lib_same_variables_clear_test.py
133
# Copyright 2017 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...
ARMmbed/yotta_osx_installer
refs/heads/master
workspace/lib/python2.7/site-packages/yotta/owners.py
3
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , from __future__ import print_function import argparse import logging import os # Component, , represents an installed component, internal from .lib import component # Target,...
vityagi/azure-linux-extensions
refs/heads/master
VMEncryption/main/oscrypto/rhel_72/encryptstates/EncryptBlockDeviceState.py
3
#!/usr/bin/env python # # VM Backup extension # # Copyright 2015 Microsoft Corporation # # 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 # # U...
ArturGaspar/scrapy
refs/heads/master
scrapy/utils/log.py
8
# -*- coding: utf-8 -*- import sys import logging import warnings from logging.config import dictConfig from twisted.python.failure import Failure from twisted.python import log as twisted_log import scrapy from scrapy.settings import Settings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.utils....
dudepare/django
refs/heads/master
django/template/engine.py
199
import warnings from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache, six from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import Context, Template f...
dushu1203/chromium.src
refs/heads/nw12
tools/perf/page_sets/__init__.py
63
# 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. import inspect import os import sys from telemetry.core import discover from telemetry.page import page_set # Import all submodules' PageSet classes. star...
genialis/resolwe
refs/heads/master
resolwe/flow/management/commands/cleantestdir.py
1
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage impo...
Dixon3/lammps
refs/heads/master
tools/moltemplate/src/dump2data.py
10
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dump2data.py Extract dynamical degrees of freedom from a lammps DUMP file (from the stdin) and construct a new DATA file (to the stdout). A reference DATA file is needed (argument). basic usage ./dump2data.py orig_file.data < dump.lammpstrj > new_file.data (Thi...
elliotpeele/prism_rest_client
refs/heads/master
prism_rest_client/client.py
1
# # Copyright (c) Elliot Peele <elliot@bentlogic.net> # # This program is distributed under the terms of the MIT License as found # in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licenses/mit-license.php. # # This program is distributed in the hope that it...
peterbe/airmozilla
refs/heads/master
vendor-local/lib/python/vobject/change_tz.py
23
"""Translate an ics file's events to a different timezone.""" from optparse import OptionParser from vobject import icalendar, base import sys try: import PyICU except: PyICU = None from datetime import datetime def change_tz(cal, new_timezone, default, utc_only=False, utc_tz=icalendar.utc): for vevent i...
Vogeltak/pauselan
refs/heads/master
lib/python3.4/site-packages/pip/_vendor/distlib/version.py
426
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Implementation of a flexible versioning scheme providing support for PEP-386, distribute-compatible and semantic versioning. """ import logging import re from .compat import string_types ...
fotinakis/sentry
refs/heads/master
src/sentry/web/frontend/restore_organization.py
4
from __future__ import absolute_import import logging import six from django.contrib import messages from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from sentry.models import Organization, OrganizationStatus, AuditLogEntryEvent from sentry.web.frontend.base import...
karesansui/karesansui
refs/heads/develop
karesansui/lib/net/http.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Karesansui Core. # # Copyright (C) 2009-2012 HDE, 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 restric...
felixbuenemann/sentry
refs/heads/master
src/sentry/db/models/fields/foreignkey.py
34
""" sentry.db.models.fields.foreignkey ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.db.models import ForeignKey from south.modelsinspector import add_i...
jtraver/dev
refs/heads/master
python/selenium/apihelper.py
3
#!/usr/bin/python """Cheap and simple API helper This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. """ __author__ = "Mark Pilgrim (mark@diveintopython.org)" __version__ = "$Revision: 1.3 $" __date__ = "$Date: 2004/05/...
ahb0327/intellij-community
refs/heads/master
python/testData/copyPaste/Indent1.after.py
83
def bar(): x = 1 y = 2 var = "string"
CiuffysHub/MITMf
refs/heads/master
mitmflib-0.18.4/mitmflib/watchdog/__init__.py
35
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 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 # # ...
dreamsxin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_generators.py
72
import gc import sys import unittest import weakref from test import support class FinalizationTest(unittest.TestCase): def test_frame_resurrect(self): # A generator frame can be resurrected by a generator's finalization. def gen(): nonlocal frame try: yie...
opennode/waldur-mastermind
refs/heads/develop
src/waldur_core/server/admin/menu.py
1
from admin_tools.menu import Menu, items from django.urls import reverse from django.utils.text import capfirst from django.utils.translation import ugettext_lazy as _ from waldur_core.core.utils import flatten class CustomAppList(items.AppList): def init_with_context(self, context): context_items = self...
davidgbe/scikit-learn
refs/heads/master
sklearn/covariance/robust_covariance.py
198
""" Robust location and covariance estimators. Here are implemented estimators that are resistant to outliers. """ # Author: Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause import warnings import numbers import numpy as np from scipy import linalg from scipy.stats import chi2 from . import empir...
RadioFreeAsia/RDacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-metro.lv2/waflib/Tools/errcheck.py
331
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file typos={'feature':'features','sources':'source','targets':'target','include':'includes','export_include':'export_includes','define':'defines','importpath':'includes','installpa...
njncalub/storm
refs/heads/master
stormapp/deadbodies/forms.py
1
from django import forms from stormapp.deadbodies.models import DeadBody class DeadBodyForm(forms.ModelForm): class Meta: model = DeadBody exclude = {'date_reported', 'status', 'nlat', 'nlong', }
MrColwell/PythonProfessionalLearning
refs/heads/master
PythonForTeachers/StudentCode/Example6_BrickBreaker.py
1
#breakout.py #A. Colwell (2015) # graphics2 module returns a TUPLE when using .getOverlap() # The tuple will have two numbers, indicating which objects # have overlapped. Only useful if you know the corresponding # object. In this case, the first brick (brick1) is the first # object drawn in the window, and the...
mwalzer/Ligandomat
refs/heads/master
ligandomat/tools/queries.py
1
__author__ = 'Backert' """File contains queries strings """ query_source_info = """ SELECT source.name, source.organ, source.dignity, source.tissue, GROUP_CONCAT(DISTINCT hlaallele.gene_group SEPARATOR ', ') as 'hlatype' FROM LigandosphereDB_dev.source INNER JOIN LigandosphereDB_dev.source_hlatyping O...
Serg09/socorro
refs/heads/master
webapp-django/crashstats/signature/urls.py
6
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url( r'^reports/$', views.signature_reports, name='signature_reports', ), url( r'^comments/$', views.signature_comments, name='signature_comments', ), url(...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/wearables/necklace/item_pvp_imperial_sergeant_major_medal_03_01.py
2
import sys def setup(core, object): object.setStfFilename('static_item_n') object.setStfName('item_pvp_imperial_sergeant_major_medal_03_01') object.setDetailFilename('static_item_d') object.setDetailName('item_pvp_imperial_sergeant_major_medal_03_01') object.setIntAttribute('no_trade', 1) object.setIntAttribute...
ayushagrawal288/zamboni
refs/heads/master
mkt/zadmin/forms.py
19
from django import forms from django.conf import settings import commonware.log import happyforms LOGGER_NAME = 'z.zadmin' log = commonware.log.getLogger(LOGGER_NAME) class DevMailerForm(happyforms.Form): _choices = [('apps', 'Developers of active apps (not add-ons)'), ('free_apps_region_enable...
zdary/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/Yield33.after.py
79
def f(xs): found = False found = yield from bar(found, xs) print(found) def bar(found_new, xs_new): for x in xs_new: yield x found_new = True return found_new
funningboy/zerorpc-python
refs/heads/master
tests/test_server.py
72
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
cervinko/calibre-web
refs/heads/master
vendor/sqlalchemy/orm/dynamic.py
14
# orm/dynamic.py # Copyright (C) 2005-2013 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 """Dynamic collection API. Dynamic collections act like Query() objects for read opera...
TeamEOS/external_chromium_org
refs/heads/lp5.0
third_party/jinja2/exceptions.py
977
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2._compat import imap, text_type, PY2, implements_to_string class TemplateError(Exception): """Baseclass for al...
flyfei/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_html.py
89
""" Tests for the html module functions. """ import html import unittest from test.support import run_unittest class HtmlTests(unittest.TestCase): def test_escape(self): self.assertEqual( html.escape('\'<script>"&foo;"</script>\''), '&#x27;&lt;script&gt;&quot;&amp;foo;&quot;&lt;/s...
btrzcinski/AdventOfCode
refs/heads/master
AdventOfCode/Day23.py
1
# program = [('inc', 'a'), ('jio', 'a', 2), ('tpl', 'a'), ('inc', 'a')] # returns (a, b) def run(program, a_init=0, b_init=0): registers = {'a': a_init, 'b': b_init} pc = 0 # halt when out of bounds while pc < len(program) and pc >= 0: instruction, arg1 = program[pc][0], program[pc][1] ...
svn2github/audacity
refs/heads/master
lib-src/lv2/serd/waflib/Runner.py
330
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import random,atexit try: from queue import Queue except ImportError: from Queue import Queue from waflib import Utils,Task,Errors,Logs GAP=10 class TaskConsumer(Utils.threa...
danakj/chromium
refs/heads/master
chrome/common/extensions/docs/server2/whats_new_data_source.py
37
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from itertools import groupby from operator import itemgetter import posixpath from data_source import DataSource from extensions_paths import JSON_TEMPLATE...
ian-garrett/meetMe
refs/heads/master
env/lib/python3.4/site-packages/pymongo/errors.py
25
# Copyright 2009-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
GunnerJnr/_CodeInstitute
refs/heads/master
Stream-3/Full-Stack-Development/17.Create-A-Django-Based-Forum/2.Extend-The-User-Model/we_are_social/threads/models.py
11
# -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils import timezone from tinymce.models import HTMLField # Create your models here. class Subject(models.Model): """ name: description: is a new field that comes packaged with django-tinymce. It enables...
asimshankar/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/linalg_grad_test.py
1
# Copyright 2015 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/django_extensions/management/base.py
8
# -*- coding: utf-8 -*- import sys from django.core.management.base import BaseCommand from logging import getLogger logger = getLogger('django.commands') class LoggingBaseCommand(BaseCommand): """ A subclass of BaseCommand that logs run time errors to `django.commands`. To use this, create a management...
tchellomello/home-assistant
refs/heads/dev
homeassistant/components/iota/__init__.py
10
"""Support for IOTA wallets.""" from datetime import timedelta import logging from iota import Iota import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import load_platform from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__nam...
misterlihao/network-programming-project
refs/heads/master
online_check.py
1
import wait_socket_messages as wsm import socket check_online_ip='127.0.0.1' check_online_port=12346 check_online_type='TCP' def ReceivingOnlineChecks(): global check_online_ip global check_online_port global check_online_type s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(sock...
urbn/kombu
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'kombu', __file__, project='Kombu', version_dev='4.6', version_stable='4.5', canonical_url='https://kombu.readthedocs.io/', webdomain='kombu.readt...
kimegitee/python-koans
refs/heads/master
python2/runner/mountain.py
14
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import sys import path_to_enlightenment from sensei import Sensei from writeln_decorator import WritelnDecorator class Mountain: def __init__(self): self.stream = WritelnDecorator(sys.stdout) self.tests = path_to_enlightenment.koans()...
Yelp/fullerite
refs/heads/master
src/diamond/server.py
6
# coding=utf-8 import logging import logging.config import json import multiprocessing import optparse import os import signal import sys import time sys.path = [os.path.dirname(__file__)] + sys.path try: from setproctitle import getproctitle, setproctitle except ImportError: setproctitle = None # Path Fix ...
SrNetoChan/QGIS
refs/heads/master
tests/src/python/test_qgsnumericformat.py
30
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsNumericFormat .. note:: 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 version. """ _...
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/plugins/lookup/items.py
68
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (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 = """ lookup: items author: Michael...
uclouvain/OSIS-Louvain
refs/heads/master
base/migrations/0166_educationgrouporganization.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-10-13 14:38 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models import base.models.enums.diploma_coorganization class Migration(migrations.Migration): dependencies = [ ('base', '01...
hynekcer/django
refs/heads/master
django/db/backends/mysql/introspection.py
363
from collections import namedtuple from MySQLdb.constants import FIELD_TYPE from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) from django.utils.datastructures import OrderedSet from django.utils.encoding import force_text FieldInfo = namedtuple('FieldInfo', Fi...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/inspections/ArgumentEqualDefault_after.py
83
def foo(a, b = 345, c = 1): pass #PY-3261 foo(1, c=22)
yoer/hue
refs/heads/master
apps/filebrowser/src/filebrowser/settings.py
30
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
libscie/liberator
refs/heads/master
liberator/lib/python3.6/site-packages/django/conf/locale/fy/formats.py
852
# -*- 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 = # TIME_FORMAT = # DATETIME_FORMA...
grassrootza/grassroot-learning
refs/heads/master
core-knowledge/train_online.py
1
import logging from rasa_core import utils from rasa_core.agent import Agent from rasa_core.channels.console import ConsoleInputChannel from rasa_core.interpreter import RasaNLUInterpreter from rasa_core.policies.keras_policy import KerasPolicy from rasa_core.policies.memoization import MemoizationPolicy logger = log...
maartenq/ansible
refs/heads/devel
lib/ansible/module_utils/facts/system/chroot.py
62
# 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 import os from ansible.module_utils.facts.collector import BaseFactCollector def is_chroot(): ...
CyanogenMod/android_external_deqp
refs/heads/staging/cm-12.0-caf
scripts/convert_case_list_to_xml.py
7
import re import sys from xml.dom.minidom import Document class TestCase: def __init__(self, casePath, description, caseType): self.casePath = casePath self.description = description self.caseType = caseType self.children = [] def findAllMatches(haystack, needle): matches = [] ndx = -1 while True: nd...
was4444/chromium.src
refs/heads/nw15
build/android/gyp/create_device_library_links.py
18
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates symlinks to native libraries for an APK. The native libraries should have previously been pushed to the device (in option...
wanderine/nipype
refs/heads/master
doc/sphinxext/ipython_console_highlighting.py
51
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """reST directive for syntax-highlighting ipython interactive sessions. """ #----------------------------------------------------------------------------- # Needed modules # Standard library import re # ...