repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
orgito/ansible
refs/heads/devel
lib/ansible/modules/network/eos/eos_vlan.py
36
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
dend/yulyeong
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/native.py
364
# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, ...
twidi/satchmo
refs/heads/master
satchmo/apps/payment/modules/giftcertificate/admin.py
13
from payment.modules.giftcertificate.models import GiftCertificate, GiftCertificateUsage, GiftCertificateProduct from django.contrib import admin from django.utils.translation import get_language, ugettext_lazy as _ class GiftCertificateUsage_Inline(admin.StackedInline): model = GiftCertificateUsage extra = 1...
ghchinoy/tensorflow
refs/heads/master
tensorflow/contrib/training/python/training/feeding_queue_runner_test.py
76
# 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...
rlutes/volttron-applications
refs/heads/master
pnnl/MatlabProxy/matlab_proxy/agent.py
5
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright (c) 2015, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistrib...
M1cha/lge-kernel-lproj
refs/heads/android-msm-3.4-kk
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
GunoH/intellij-community
refs/heads/master
python/helpers/pydev/_pydevd_bundle/pydevd_breakpointhook.py
12
# This file shouldn't be added to DONT_TRACE dict import sys import os def breakpointhook(*args, **kwargs): # It's necessary to use inner function to add extra frame def pydevd_breakpointhook(): hookname = os.getenv('PYTHONBREAKPOINT') if hookname is not None and len(hookname) > 0 and hasatt...
franramirez688/common
refs/heads/develop
test/resources/hello/python/hello.py
5
''' Created on 17/07/2013 @author: drodri ''' import sys def hello(): print '%PRINT%',
MichaelKohler/bedrock
refs/heads/master
lib/l10n_utils/tests/test_files/extract_me_with_langfiles.py
47
# coding: utf-8 # 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/. from lib.l10n_utils.dotlang import _ LANG_FILES = [ 'lebowski', 'dude', ] dude_says = _(u"I'...
weolar/miniblink49
refs/heads/master
v8_5_1/tools/testrunner/local/statusfile.py
6
# Copyright 2012 the V8 project authors. 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 conditi...
sujithshankar/anaconda
refs/heads/master
translation-canary/tests/unittests/test_translated.py
11
# Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
ashray/VTK-EVM
refs/heads/yiq
Examples/LIC/Python/CylinderAndPolarAxes.py
15
#!/usr/bin/env python ############################################################ from vtk import * ############################################################ # Create pole for camera aim and polar axes pole pole = [1., 12., 3.] # Create camera camera = vtkCamera() camera.SetClippingRange( 1.0, 100.0 ) camera.SetF...
OpenSlides/OpenSlides
refs/heads/master
server/openslides/motions/migrations/0031_state_css_classes_2.py
7
# Generated by Finn Stutzenstein on 2019-07-17 08:43 from django.db import migrations LABEL_MAPPING = { "default": "grey", "primary": "lightblue", "success": "green", "danger": "red", "warning": "yellow", } def rename_css_classes(apps, schema_editor): State = apps.get_model("motions", "Stat...
masci/oauthlib
refs/heads/master
oauthlib/oauth1/rfc5849/errors.py
17
# coding=utf-8 """ oauthlib.oauth2.rfc6749.errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error used both by OAuth 2 clients and provicers to represent the spec defined error responses for all four core grant types. """ from __future__ import unicode_literals from oauthlib.common import urlencode, add_params_to_uri class O...
Returnbit/Returnbit
refs/heads/master
contrib/seeds/makeseeds.py
29
#!/usr/bin/env python # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 337600 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = set([ "130.211.129.106", "178.63.107.226", "83.81.1...
eleonrk/SickRage
refs/heads/master
lib/stevedore/tests/test_sphinxext.py
65
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
ruschelp/cortex-vfx
refs/heads/master
test/IECoreRI/ParameterisedProcedural.py
5
########################################################################## # # Copyright (c) 2009, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
whowutwut/confluent
refs/heads/master
confluent_server/confluent/plugins/hardwaremanagement/ipmi.py
1
# Copyright 2014 IBM Corporation # Copyright 2015-2018 Lenovo # # 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...
v-iam/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2016_12_01/models/application_gateway_connection_draining.py
6
# 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 ...
mdaniel/intellij-community
refs/heads/master
python/testData/completion/fStringLikeCompletionNotAvailableInByteLiterals.py
10
my_expr = 42 s = b'foo{my_e<caret>'
jamesbeebop/flask-admin
refs/heads/master
flask_admin/model/typefmt.py
16
from jinja2 import Markup from flask_admin._compat import text_type def null_formatter(view, value): """ Return `NULL` as the string for `None` value :param value: Value to check """ return Markup('<i>NULL</i>') def empty_formatter(view, value): """ Return empty ...
commtrack/commtrack-core
refs/heads/master
utilities/deployment/deploy.py
5
#todo #zip up the files (duh) #scp it to the remote machine #ssh to remote machine #blow away old location #unzip and redeploy it over there #drop in the build number and revision number? #get username, password, hostname, location from environmental variables import os import sys import tarfile import gzip import lo...
YzPaul3/h2o-3
refs/heads/master
py2/h2o2.py
21
import sys import h2o_args, h2o_nodes # tests refer to h2o.unit_main from h2o_args import unit_main # start with just the stuff tests use, from here? # so they don't get hardwired to another module that might change? from h2o_test import setup_random_seed, make_syn_dir, verboseprint, check_sandbox_for_errors, dump_js...
paplorinc/intellij-community
refs/heads/master
python/testData/refactoring/introduceConstant/suggestUniqueNamesGlobalScope.py
83
S = True STR = True def foo(): "<caret>"
jfinkels/networkx
refs/heads/master
networkx/testing/utils.py
10
from nose.tools import assert_equal __all__ = ['assert_nodes_equal', 'assert_edges_equal','assert_graphs_equal'] def assert_nodes_equal(nodes1, nodes2): # Assumes iterables of nodes, or (node,datadict) tuples nlist1 = list(nodes1) nlist2 = list(nodes2) try: d1 = dict(nlist1) d2 = dict(n...
tboyce021/home-assistant
refs/heads/dev
tests/components/modbus/test_modbus_binary_sensor.py
7
"""The tests for the Modbus sensor component.""" from datetime import timedelta import pytest from homeassistant.components.binary_sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.components.modbus.const import ( CALL_TYPE_COIL, CALL_TYPE_DISCRETE, CONF_ADDRESS, CONF_INPUT_TYPE, CONF_INPUT...
Giftingnation/GN-Oscar-Custom
refs/heads/master
oscar/views/decorators.py
5
import urlparse from functools import wraps from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render from django.contrib import messages from django.contrib.auth.views import redirect_to_login from django.core.exceptions import ...
Ronak6892/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treebuilders/etree_lxml.py
1724
"""Module for supporting the lxml.etree library. The idea here is to use as much of the native library as possible, without using fragile hacks like custom element names that break between releases. The downside of this is that we cannot represent all possible trees; specifically the following are known to cause proble...
z1gm4/desarrollo_web_udp
refs/heads/dev
env/lib/python2.7/site-packages/wheel/signatures/keys.py
471
"""Store and retrieve wheel signing / verifying keys. Given a scope (a package name, + meaning "all packages", or - meaning "no packages"), return a list of verifying keys that are trusted for that scope. Given a package name, return a list of (scope, key) suggested keys to sign that package (only the verifying key...
marissazhou/django
refs/heads/master
django/contrib/postgres/aggregates/general.py
419
from django.db.models.aggregates import Aggregate __all__ = [ 'ArrayAgg', 'BitAnd', 'BitOr', 'BoolAnd', 'BoolOr', 'StringAgg', ] class ArrayAgg(Aggregate): function = 'ARRAY_AGG' def convert_value(self, value, expression, connection, context): if not value: return [] return v...
longmen21/edx-platform
refs/heads/master
lms/djangoapps/shoppingcart/utils.py
23
""" Utility methods for the Shopping Cart app """ from django.conf import settings from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import PDFPageAggregator from pdfminer.pdfpage import PD...
ycaihua/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_future.py
91
# Test various flavors of legal and illegal future statements import unittest from test import support import re rx = re.compile('\((\S+).py, line (\d+)') def get_error_location(msg): mo = rx.search(str(msg)) return mo.group(1, 2) class FutureTest(unittest.TestCase): def test_future1(self): wit...
salaria/odoo
refs/heads/8.0
addons/purchase_requisition/wizard/__init__.py
376
# -*- 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...
vvovo/vvo
refs/heads/master
model/notification.py
1
#!/usr/bin/env python # coding=utf-8 # # Copyright 2014 vvovo.com # Very way to victory. # Let the dream set sail. import time from lib.query import Query class NotificationModel(Query): def __init__(self, db): self.db = db self.table_name = "notification" super(NotificationModel, self).__...
wrlkyle/cuda-convnet2
refs/heads/master
make-data/make-data.py
179
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
MuffinMedic/CloudBot
refs/heads/TechSupport
plugins/google_cse.py
3
""" google.py Originally for RoboCop 2, a replacement after Google's deprecation of Google Web Search API Module requires a Google Custom Search API key and a Custom Search Engine ID in order to function. Created By: - Foxlet <http://furcode.tk/> License: GNU General Public License (Version 3) """ import re...
RichardWilliamPearse/namebench
refs/heads/master
nb_third_party/simplejson/ordered_dict.py
1039
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
Antiun/odoo
refs/heads/8.0
addons/auth_oauth/auth_oauth.py
321
from openerp.osv import osv, fields class auth_oauth_provider(osv.osv): """Class defining the configuration values of an OAuth2 provider""" _name = 'auth.oauth.provider' _description = 'OAuth2 provider' _order = 'name' _columns = { 'name' : fields.char('Provider name', required=True), ...
powertomato/heuOpt_2017_G1
refs/heads/master
solvers/evolution/Evolution.py
1
from solvers.evolution.Population import Population import random, math class GeneticAlgorithm: def __init__(self, graph, size, replacements, selectionsize, mutationsize, evaluator): self.replacements = replacements self.populationsize = size self.mutationsize = mutationsize self.s...
darthkedrik/praw
refs/heads/master
praw/models/reddit/mixins/inboxable.py
1
"""Provide the InboxableMixin class.""" from ....const import API_PATH class InboxableMixin(object): """Interface for RedditBase classes that originate from the inbox.""" def block(self): """Block the user who sent the item. .. note:: Reddit does not permit blocking users unless you have a ...
ensoft/jamjar
refs/heads/master
jamjar/test/test_database.py
1
#------------------------------------------------------------------------------ # test_database.py - Database modul tests # # November 2015, Phil Connell #------------------------------------------------------------------------------ """Database tests.""" __all__ = () import unittest from .. import database clas...
beiko-lab/gengis
refs/heads/master
bin/Lib/site-packages/wx-2.8-msw-unicode/wx/_windows.py
2
# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. import _windows_ import new new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name ...
alexrao/YouCompleteMe
refs/heads/master
third_party/ycmd/third_party/jedi/test/test_api/test_api.py
13
""" Test all things related to the ``jedi.api`` module. """ from textwrap import dedent from jedi import api from jedi._compatibility import is_py3 from pytest import raises def test_preload_modules(): def check_loaded(*modules): # +1 for None module (currently used) assert len(parser_cache) == ...
prospwro/odoo
refs/heads/8.0
addons/document/report/document_report.py
341
# -*- 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...
ininex/geofire-python
refs/heads/master
resource/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
762
import hashlib import os from pip._vendor.lockfile import LockFile from pip._vendor.lockfile.mkdirlockfile import MkdirLockFile from ..cache import BaseCache from ..controller import CacheController def _secure_open_write(filename, fmode): # We only want to write to this file, so open it in write only mode ...
Joergen/zamboni
refs/heads/uge43
apps/market/utils.py
5
import csv import commonware.log from decimal import Decimal from market.models import Price, PriceCurrency log = commonware.log.getLogger('z.market') def update(tiers): """ Updates the prices and price currency objects based on the tiers. Tiers should be a list containing a dictionary of currency / v...
crakensio/django_training
refs/heads/master
lib/python2.7/site-packages/sphinx/builders/html.py
11
# -*- coding: utf-8 -*- """ sphinx.builders.html ~~~~~~~~~~~~~~~~~~~~ Several HTML builders. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import sys import zlib import codecs import posixpath import cPickle as pickle from o...
GheRivero/ansible
refs/heads/devel
lib/ansible/modules/identity/ipa/ipa_sudocmd.py
60
#!/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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
google/pywebsocket
refs/heads/master
test/set_sys_path.py
496
# Copyright 2009, 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...
TheNaterz/koadic
refs/heads/master
core/loader.py
1
import os import sys import inspect import core.plugin def load_plugins(dir, instantiate = False, shell = None): plugins = {} for root, dirs, files in os.walk(dir): sys.path.append(root) # make forward slashes on windows module_root = root.replace(dir, "").replace("\\", "/") ...
corngood/ycmd
refs/heads/master
cpp/ycm/tests/gmock/gtest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, 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...
esanchezm/confbot-customized
refs/heads/master
tools/pygettext.py
5
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # Originally written by Barry Warsaw <barry@zope.com> # # Minimally patched to make it even more xgettext compatible # by Peter Funk <pf@artcom-gmbh.de> # # 2002-11-22 Jürgen Hermann <jh@web.de> # Added checks that _() only contains string literals, and # com...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py
1
# 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 may ...
enisbt/urlkisalt
refs/heads/master
kisa/models.py
1
from django.db import models from django.core.validators import URLValidator from hitcount.models import HitCountMixin class Link(models.Model, HitCountMixin): domain = models.TextField(validators=[URLValidator()]) pattern = models.CharField(max_length=200) def __str__(self): return self.pattern +...
filodej/django-filer
refs/heads/develop
filer/fields/file.py
10
#-*- coding: utf-8 -*- from django import forms from django.conf import settings as globalsettings from django.contrib.admin.widgets import ForeignKeyRawIdWidget from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.db import models from django.template.loader ...
pluskid/mxnet
refs/heads/master
example/rnn/lstm_bucketing.py
11
import numpy as np import mxnet as mx import argparse parser = argparse.ArgumentParser(description="Train RNN on Penn Tree Bank", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--num-layers', type=int, default=2, help='number of stacked...
grimmjow8/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/apt_rpm.py
25
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Evgenii Terechkov # Written by Evgenii Terechkov <evg@altlinux.org> # Based on urpmi module written by Philippe Makowski <philippem@mageia.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
vvv1559/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/py2TrueInDocTest.py
24
def func(x, y): """ >>> func(True, <warning descr="Unresolved reference 'True2'">True2</warning>) """ return True, <error descr="Unresolved reference 'True2'">True2</error>
firebitsbr/powerline
refs/heads/develop
powerline/lib/humanize_bytes.py
38
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) from math import log unit_list = tuple(zip(['', 'k', 'M', 'G', 'T', 'P'], [0, 0, 1, 2, 2, 2])) def humanize_bytes(num, suffix='B', si_prefix=False): '''Return a human friendly byte representation. ...
legendmohe/LEHome
refs/heads/master
quick_button.py
1
#!/usr/bin/env python # encoding: utf-8 # Copyright 2010 Xinyu, He <legendmohe@foxmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
better-dem/geo_feedback
refs/heads/master
widgets/apps.py
3
from __future__ import unicode_literals from django.apps import AppConfig class WidgetsConfig(AppConfig): name = 'widgets'
jnovinger/django
refs/heads/master
tests/order_with_respect_to/tests.py
70
from __future__ import unicode_literals from operator import attrgetter from django.db import models from django.test import TestCase from .models import Answer, Post, Question class OrderWithRespectToTests(TestCase): @classmethod def setUpTestData(cls): cls.q1 = Question.objects.create(text="Whic...
blazelibs/blazeform
refs/heads/master
blazeform/form.py
1
import formencode import inspect from blazeutils.datastructures import LazyOrderedDict from blazeform.element import form_elements, CancelElement, CheckboxElement, \ MultiSelectElement, LogicalGroupElement from blazeform.exceptions import ElementInvalid, ProgrammingError from blazeform.file_upload_translators impo...
flurischt/jedi
refs/heads/master
jedi/_compatibility.py
32
""" To ensure compatibility from Python ``2.6`` - ``3.3``, a module has been created. Clearly there is huge need to use conforming syntax. """ import sys import imp import os import re try: import importlib except ImportError: pass is_py3 = sys.version_info[0] >= 3 is_py33 = is_py3 and sys.version_info.minor >...
xifle/greensd
refs/heads/master
lib/run.py
1
#!/usr/bin/env python import greensd.controller mycontr = greensd.controller.Controller() mycontr.run()
mattseymour/django
refs/heads/master
django/templatetags/i18n.py
3
from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import translation from django.utils.safestring import SafeData...
azureplus/hue
refs/heads/master
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/create_jobs.py
35
import os import sys from django.core.management.base import AppCommand from django_extensions.management.utils import _make_writeable, signalcommand class Command(AppCommand): help = ("Creates a Django jobs command directory structure for the given app name in the current directory.") args = "[appname]" ...
tbeckham/eutester
refs/heads/master
testcases/cloud_admin/3-3/Euca5430.py
6
''' Created on Jun 14, 2013 @author: mmunn Unit test : EUCA-5430 Bogus Error Message when creating security group that already exists SetUp : Install Credentials, Test : Try and create a security group with the same name twice and check the error TearDown : Removes Credenti...
FroeMic/CDTM-Deep-Learning-Drones
refs/heads/master
src/demo/kokitest.py
1
#!/usr/bin/env python import pykoki import cv, cv2 import sys cap = cv2.VideoCapture(0) koki = pykoki.PyKoki() while cv2.waitKey(1) & 0xFF != ord('q'): img = cv.QueryFrame(cap) cv2.cvtColor(img, img, cv2.COLOR_BGR2GRAY) cv2.imshow('img',img) params = pykoki.CameraParams(Point2Df( img.width/2, img.h...
pjdelport/django
refs/heads/master
django/contrib/localflavor/ar/forms.py
9
# -*- coding: utf-8 -*- """ AR-specific Form helpers. """ from __future__ import absolute_import, unicode_literals from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField...
mjgrav2001/scikit-learn
refs/heads/master
examples/linear_model/plot_robust_fit.py
238
""" Robust linear estimator fitting =============================== Here a sine function is fit with a polynomial of order 3, for values close to zero. Robust fitting is demoed in different situations: - No measurement errors, only modelling errors (fitting a sine with a polynomial) - Measurement errors in X - M...
mdaniel/intellij-community
refs/heads/master
python/testData/refactoring/rename/googleDocStringAttribute.py
53
class C: """ Attributes: foo : ignored """ def __init__(self): self.fo<caret>o = 42
olsonanl/auth
refs/heads/master
python-libs/biokbase/auth.py
7
""" Kbase wrappers around Globus Online Nexus client libraries. We wrap the Nexus libraries to provide a similar API between the Perl Bio::KBase::Auth* libraries and the python version In this module, we follow standard Python idioms of raising exceptions for various failure states ( Perl modules returned error states...
da1z/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/StubsOfNestedClasses/b.py
79
from c import Class1 class Class2(Class1): class SubClass2(Class1.SubClass1): def __init__(self, foo): Class1.SubClass1.__init__(self, foo)
zetaops/pyoko
refs/heads/develop
docs/conf.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Pyoko documentation build configuration file, created by # sphinx-quickstart on Tue Jan 12 14:21:16 2016. # # 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 # auto...
rgeleta/odoo
refs/heads/8.0
addons/web_tests/tests/__init__.py
385
# -*- coding: utf-8 -*- import test_ui
mick-d/nipype
refs/heads/master
nipype/interfaces/fsl/tests/test_auto_DistanceMap.py
1
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..dti import DistanceMap def test_DistanceMap_inputs(): input_map = dict(args=dict(argstr='%s', ), distance_map=dict(argstr='--out=%s', genfile=True, hash_files=False, ), environ=dict(nohash=...
mcleary/pipeline
refs/heads/master
apps/GLUTAnimation/launcher.py
6
import tkinter import subprocess #class QtMinimalXBARLauncher(tkinter.Frame): # def __init__(self, master=None): # Frame._init__(self, master) # self.master.title("QtMinimalXBARLauncher") choices = list() listboxes = dict() choices.append( ("filename", ["c:\\models\\icido\\body.nbf",]) ) c...
drpaneas/linuxed.gr
refs/heads/master
lib/python2.7/site-packages/docutils/transforms/writer_aux.py
116
# $Id: writer_aux.py 7320 2012-01-19 22:33:02Z milde $ # Author: Lea Wiemann <LeWiemann@gmail.com> # Copyright: This module has been placed in the public domain. """ Auxiliary transforms mainly to be used by Writer components. This module is called "writer_aux" because otherwise there would be conflicting imports lik...
AlexisBRENON/deepdive
refs/heads/master
examples/tutorial_example/step2-generic-features/experiment-reports/v00002/code/udf/ext_people.py
161
#! /usr/bin/env python # Sample input data (piped into STDIN): ''' 118238@10 Sen.~^~Barack~^~Obama~^~and~^~his~^~wife~^~,~^~Michelle~^~Obama~^~,~^~have~^~released~^~eight~^~years~^~of~^~joint~^~returns~^~. O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~DURATION~^~DURATION~^~O~^~O~^~O~^~O 118238@12...
invalid-access/django-s3direct
refs/heads/master
example/cat/admin.py
5
from django.contrib import admin from .models import Cat, Kitten class KittenAdminInline(admin.StackedInline): model = Kitten extra = 1 class CatAdmin(admin.ModelAdmin): inlines = [KittenAdminInline, ] admin.site.register(Cat, CatAdmin)
CollabQ/CollabQ
refs/heads/master
vendor/django/contrib/gis/feeds.py
327
from django.contrib.syndication.feeds import Feed as BaseFeed, FeedDoesNotExist from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin(object): """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C Geo elements. """ ...
jacksonllee/lxa5
refs/heads/master
tests/test_signature.py
1
# -*- encoding: utf8 -*- import os import linguistica as lxa from linguistica.datasets import brown as corpus_path data_dir = os.path.join(os.path.dirname(__file__), 'data') def test_stems_to_signatures(): lxa_object = lxa.read_corpus(corpus_path, max_word_tokens=50000) test_object = lxa_object.stems_to_si...
odoousers2014/LibrERP
refs/heads/master
report_aeroo/ctt_languages/tr_TR/currencies/usd.py
10
#!/usr/bin/python # -*- coding: utf8 -*- from report_aeroo.ctt_objects import ctt_currency class usd(ctt_currency): def _init_currency(self): self.language = u'tr_TR' self.code = u'USD' self.fractions = 100 self.cur_singular = u' USD' # default plural form for currency ...
EliotBerriot/mnm
refs/heads/master
mnm/__init__.py
355
# -*- coding: utf-8 -*- __version__ = '0.1.0' __version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
dbrattli/aioreactive
refs/heads/master
aioreactive/__init__.py
1
"""Aioreactive module. Contains the AsyncRx chained obserable that allows method chaining of all operators. Also contains all operators as plain functions. To use this module: Example: >>> import aioreactive as rx >>> xs = rx.from_iterable([1, 2, 3]) >>> ... """ from __future__ import annotations from...
defzzd/UserDataBase-Heroku
refs/heads/master
venv/Lib/site-packages/pip/_vendor/html5lib/trie/_base.py
1735
from __future__ import absolute_import, division, unicode_literals from collections import Mapping class Trie(Mapping): """Abstract base class for tries""" def keys(self, prefix=None): keys = super().keys() if prefix is None: return set(keys) # Python 2.6: no set compre...
w1ll1am23/home-assistant
refs/heads/dev
homeassistant/components/blebox/climate.py
21
"""BleBox climate entity.""" from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, CURRENT_HVAC_OFF, HVAC_MODE_HEAT, HVAC_MODE_OFF, SUPPORT_TARGET_TEMPERATURE, ) from homeassistant.const import ATTR_...
photoninger/ansible
refs/heads/devel
lib/ansible/plugins/lookup/mongodb.py
34
# (c) 2016, Marcos Diez <marcos@unitron.com.br> # https://github.com/marcosdiez/ # # 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...
jhd/spunout
refs/heads/master
flask/lib/python2.7/site-packages/jinja2/environment.py
614
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import BLOCK_S...
ruymanengithub/vison
refs/heads/master
vison/datamodel/inputs.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Inputs Handling Classes and utilities. Created on Thu Jan 11 10:34:43 2018 :author: Ruyman Azzollini """ # IMPORT STUFF from pdb import set_trace as stop from collections import OrderedDict import numpy as np # END IMPORT CommonTaskInputs = OrderedDict(sorted([ ...
Jorge-Rodriguez/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_config_rule.py
39
#!/usr/bin/python # Copyright: (c) 2018, Aaron Smith <ajsmith10381@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
ZENGXH/scikit-learn
refs/heads/master
examples/classification/plot_lda.py
164
""" ==================================================================== Normal and Shrinkage Linear Discriminant Analysis for classification ==================================================================== Shows how shrinkage improves classification. """ from __future__ import division import numpy as np import...
ronas/PythonGNF
refs/heads/master
Bruno/zxt/chamando.py
1
import sys from PyQt4 import QtGui, QtCore class bruno(QtGui.QMainWindow): def __init__(self): super(bruno, self).__init__() self.setGeometry(50, 50, 500, 300) self.setWindowTitle("PyQT tuts!") self.setWindowIcon(QtGui.QIcon('pythonlogo.png')) extractActon = QtGui.QAction...
soderstrom-rikard/adi-linux
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
boneill42/cassandra
refs/heads/trunk
pylib/cqlshlib/test/__init__.py
146
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
golismero/golismero-devel
refs/heads/master
thirdparty_libs/django/test/testcases.py
31
from __future__ import unicode_literals import difflib import json import os import re import sys from copy import copy from functools import wraps try: from urllib.parse import urlsplit, urlunsplit except ImportError: # Python 2 from urlparse import urlsplit, urlunsplit import select import socket import ...
saurabhjn76/sympy
refs/heads/master
sympy/simplify/tests/test_cse.py
47
import itertools from sympy import (Add, Pow, Symbol, exp, sqrt, symbols, sympify, cse, Matrix, S, cos, sin, Eq, Function, Tuple, RootOf, IndexedBase, Idx, Piecewise, O) from sympy.simplify.cse_opts import sub_pre, sub_post from sympy.functions.special.hyper import meijerg from sy...
orgito/ansible
refs/heads/devel
lib/ansible/modules/monitoring/stackdriver.py
102
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
cossacklabs/themis
refs/heads/master
tools/python/keygen.py
2
# # Copyright (c) 2015 Cossack Labs Limited # # 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...