repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
courtarro/gnuradio
refs/heads/master
gr-digital/examples/narrowband/benchmark_add_channel.py
17
#!/usr/bin/env python # # Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your opt...
googleapis/googleapis-gen
refs/heads/master
google/ads/googleads/v5/googleads-py/google/ads/googleads/v5/resources/types/campaign_asset.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
FuturesFromYesterday/ardupilot
refs/heads/master
Tools/scripts/frame_sizes.py
351
#!/usr/bin/env python import re, sys, operator, os code_line = re.compile("^\s*\d+:/") frame_line = re.compile("^\s*\d+\s+/\* frame size = (\d+) \*/") class frame(object): def __init__(self, code, frame_size): self.code = code self.frame_size = int(frame_size) frames = [] def process_lst(filena...
markslwong/tensorflow
refs/heads/master
tensorflow/contrib/linalg/python/kernel_tests/linear_operator_util_test.py
60
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ABaldwinHunter/django-clone-classic
refs/heads/master
tests/generic_views/test_base.py
7
from __future__ import unicode_literals import time import unittest from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse from django.test import RequestFactory, SimpleTestCase, override_settings from django.test.utils import require_jinja2 from django.urls import resolve from d...
javrasya/luigi
refs/heads/master
luigi/configuration.py
29
# -*- 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...
jessstrap/servotk
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/example/echo_client.py
442
#!/usr/bin/env python # # Copyright 2011, 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...
wwitzel3/awx
refs/heads/devel
awx/main/management/commands/revoke_oauth2_tokens.py
3
# Django from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist # AWX from awx.main.models.oauth import OAuth2AccessToken from oauth2_provider.models import RefreshToken def revoke_tokens(token_list): for...
mohamed-ali/PyTables
refs/heads/develop
tables/tests/test_tablesMD.py
6
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import sys import numpy as np from numpy import rec as records import tables from tables import ( Col, StringCol, IntCol, FloatCol, Int16Col, UInt16Col, Float32Col, ) from tables.tests import common from tables.t...
aonotas/chainer
refs/heads/master
chainer/datasets/dict_dataset.py
14
import six class DictDataset(object): """Dataset of a dictionary of datasets. It combines multiple datasets into one dataset. Each example is represented by a dictionary mapping a key to an example of the corresponding dataset. Args: datasets: Underlying datasets. The keys are used as the k...
naousse/odoo
refs/heads/8.0
addons/website_event/__openerp__.py
308
# -*- coding: utf-8 -*- { 'name': 'Online Events', 'category': 'Website', 'summary': 'Schedule, Promote and Sell Events', 'website': 'https://www.odoo.com/page/website-builder', 'version': '1.0', 'description': """ Online Events """, 'author': 'OpenERP SA', 'depends': ['website'...
sclabs/sitestatus-nonrel
refs/heads/master
django/contrib/messages/storage/base.py
399
from django.conf import settings from django.utils.encoding import force_unicode, StrAndUnicode from django.contrib.messages import constants, utils LEVEL_TAGS = utils.get_level_tags() class Message(StrAndUnicode): """ Represents an actual message that can be stored in any of the supported storage class...
jhawkesworth/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/wait_for_connection.py
45
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.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_ve...
LumPenPacK/NetworkExtractionFromImages
refs/heads/master
osx_build/nefi2_osx_amd64_xcode_2015/site-packages/networkx/linalg/tests/test_modularity.py
46
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestModularity(object): numpy = 1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global numpy global scipy glob...
scottferg/web-console
refs/heads/master
django/contrib/formtools/models.py
13
""" models.py (even empty) currently required by the runtests.py to enable unit tests """
evildmp/django-cms
refs/heads/master
cms/management/__init__.py
14224
# -*- coding: utf-8 -*-
jchevin/MissionPlanner-master
refs/heads/master
packages/IronPython.StdLib.2.7.4/content/Lib/code.py
256
"""Utilities needed to emulate Python's interactive interpreter. """ # Inspired by similar code by Jeff Epler and Fredrik Lundh. import sys import traceback from codeop import CommandCompiler, compile_command __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"] def ...
alibarkatali/module_web
refs/heads/master
venv/lib/python2.7/site-packages/psycopg2/tests/test_notify.py
7
#!/usr/bin/env python # test_notify.py - unit test for async notifications # # Copyright (C) 2010-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Fo...
eroicaleo/LearningPython
refs/heads/master
interview/leet/BIT.py
1
#!/usr/bin/env python3 import itertools class BIT: def __init__(self, f): self.f = f self.c = list(itertools.accumulate(f)) print(self.c) self.MaxIdx = len(self.f)-1 self.tree = [0] for idx in range(1, len(self.f)): r = idx - (idx & -idx) + 1 ...
bwhaley/SoCo
refs/heads/master
unittest/test_integration.py
4
# -*- coding: utf-8 -*- # pylint: disable-msg=too-few-public-methods, redefined-outer-name, no-self-use """ This file contains the classes used to perform integration tests on the methods in the SoCo class. They access a real Sonos system. PLEASE TAKE NOTE: All of these tests are designed to run on a Sonos system wit...
andreimacavei/coala
refs/heads/master
coalib/parsing/__init__.py
66
""" The StringProcessing module contains various functions for extracting information out of strings. Most of them support regexes for advanced pattern matching. """
ya7lelkom/googleads-python-lib
refs/heads/master
examples/dfp/v201411/line_item_creative_association_service/get_all_licas.py
4
#!/usr/bin/python # # 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 b...
dpendl00/headphones
refs/heads/master
lib/requests/packages/urllib3/contrib/ntlmpool.py
1009
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ try: from http.client import HTTPSConnection except ImportError: from httplib import HTTPSConnection from logging import getLogger from ntlm import ntlm from urllib3 import HTT...
eharney/nova
refs/heads/master
nova/scheduler/filters/isolated_hosts_filter.py
13
# Copyright (c) 2011-2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
bioinformed/vgraph
refs/heads/master
vgraph/graph.py
1
# Copyright 2015 Kevin B Jacobs # # 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 wr...
campbe13/openhatch
refs/heads/master
vendor/packages/twisted/twisted/web/test/test_http.py
18
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test HTTP support. """ from urlparse import urlparse, urlunsplit, clear_cache import random, urllib, cgi from twisted.python.compat import set from twisted.python.failure import Failure from twisted.trial import unittest from twisted.trial.u...
binken/robotframework-selenium2library
refs/heads/master
test/unit/locators/test_windowmanager.py
69
import unittest import os from Selenium2Library.locators import WindowManager from mockito import * import uuid from selenium.common.exceptions import NoSuchWindowException class WindowManagerTests(unittest.TestCase): def test_select_with_invalid_prefix(self): manager = WindowManager() browser = m...
EduPepperPD/pepper2013
refs/heads/master
common/lib/xmodule/xmodule/x_module.py
4
import logging import copy import yaml import os from lxml import etree from collections import namedtuple from pkg_resources import resource_listdir, resource_string, resource_isdir from xmodule.modulestore import Location from xmodule.modulestore.exceptions import ItemNotFoundError, InsufficientSpecificationError, ...
jesramirez/odoo
refs/heads/8.0
addons/auth_crypt/__openerp__.py
310
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP S.A. (<http://odoo.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
mnunezdm/cazasteroides
refs/heads/master
karmaserver/data/models/user.py
1
''' module for user class ''' from karmaserver.data.models import db, user_observations class User(db.Model): ''' User class ''' _id = db.Column(db.String(64), primary_key=True) observations = db.relationship('Observation', secondary=user_observations, lazy='joined', bac...
twitchyliquid64/misc-scripts
refs/heads/master
s3tool/boto/cloudsearchdomain/exceptions.py
136
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights t...
onceuponatimeforever/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/conch/test/test_transport.py
17
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for ssh/transport.py and the classes therein. """ try: import pyasn1 except ImportError: pyasn1 = None try: import Crypto.Cipher.DES3 except ImportError: Crypto = None if pyasn1 is not None and Crypto is not None: ...
Kabele/ZCR-Shellcoder
refs/heads/master
lib/generator/solaris_x86/download.py
40
#!/usr/bin/env python ''' ZCR Shellcoder ZeroDay Cyber Research Z3r0D4y.Com Ali Razmjoo ''' def run(url,filename): return 'N'
foodszhang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/setuptools/command/bdist_egg.py
286
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: # Python 2.7 or >=3.2 from sysconfig import get_path, get_python_version def _g...
h2oai/h2o-dev
refs/heads/master
h2o-py/tests/testdir_jira/pyunit_NOPASS_pubdev_1829_gbm_checkpoint.py
6
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def pubdev_1829(): train = h2o.import_file(path=pyunit_utils.locate("smalldata/jira/gbm_checkpoint_train.csv")) valid = h2o.import_file(path=pyunit_utils.locate("smalldata/jira/gbm_checkpoint_valid.csv")) predictors = [...
haocs/autorest
refs/heads/master
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/credentials.py
336
# 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 ...
daenamkim/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_ospf_vrf.py
6
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
svn2github/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg04-sampler.lv2/waflib/Tools/c_preproc.py
85
#! /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 re,string,traceback from waflib import Logs,Utils,Errors from waflib.Logs import debug,error class PreprocError(Errors.WafError): pass POPFILE='-' recursion_limit=150 ...
fhoring/autorest
refs/heads/master
Samples/azure-storage/Azure.Python/storagemanagementclient/models/storage_account_check_name_availability_parameters.py
8
# coding=utf-8 # -------------------------------------------------------------------------- # -------------------------------------------------------------------------- from msrest.serialization import Model class StorageAccountCheckNameAvailabilityParameters(Model): """StorageAccountCheckNameAvailabilityParamet...
samhou1988/python-tutorial
refs/heads/master
for-in.py
1
# for in fav_movies = ["The Holy Grail", "The Life of Brain"] for each_flick in fav_movies: print each_flick
cntnboys/410Lab4
refs/heads/master
env-lab4/lib/python2.7/site-packages/flask/_compat.py
783
# -*- coding: utf-8 -*- """ flask._compat ~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys PY...
mahak/keystone
refs/heads/master
keystone/common/sql/migrate_repo/versions/081_add_endpoint_policy_table.py
5
# Copyright 2014 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 agreed to in writing, s...
sandan/sqlalchemy
refs/heads/master
test/dialect/postgresql/test_reflection.py
2
# coding: utf-8 from sqlalchemy.engine import reflection from sqlalchemy.testing.assertions import eq_, assert_raises, \ AssertsExecutionResults from sqlalchemy.testing import fixtures from sqlalchemy import testing from sqlalchemy import inspect from sqlalchemy import Table, Column, MetaData, Integer, String, \ ...
40223108/-2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/jqueryui/__init__.py
603
"""Wrapper around the jQuery UI library Exposes a single object, jq, to manipulate the widgets designed in the library This object supports : - subscription : js[elt_id] returns an object matching the element with the specified id - a method get(**kw). The only keyword currently supported is "selector". The metho...
AccelAI/accel.ai
refs/heads/master
flask-aws/lib/python2.7/site-packages/boto/ec2/tag.py
181
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # withou...
shashkin/sqlalchemy-migrate
refs/heads/master
migrate/changeset/databases/mysql.py
6
""" MySQL database specific implementations of changeset classes. """ from sqlalchemy.databases import mysql as sa_base from sqlalchemy import types as sqltypes from migrate import exceptions from migrate.changeset import ansisql, SQLA_06 if not SQLA_06: MySQLSchemaGenerator = sa_base.MySQLSchemaGenerator el...
tchernomax/ansible
refs/heads/devel
lib/ansible/modules/messaging/rabbitmq_plugin.py
85
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chatham Financial <oss@chathamfinancial.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'...
robertwb/incubator-beam
refs/heads/master
sdks/python/apache_beam/typehints/opcodes.py
5
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
popazerty/obh-sh4
refs/heads/master
lib/python/Components/ServiceScan.py
15
from enigma import eComponentScan, iDVBFrontend from Components.NimManager import nimmanager as nimmgr from Tools.Transponder import getChannelNumber class ServiceScan: Idle = 1 Running = 2 Done = 3 Error = 4 Errors = { 0: _("error starting scanning"), 1: _("error while scanning"), 2: _("no resource manag...
xhat/micropython
refs/heads/master
tests/wipy/spi.py
69
''' SPI test for the CC3200 based boards. ''' from machine import SPI import os mch = os.uname().machine if 'LaunchPad' in mch: spi_pins = ('GP14', 'GP16', 'GP30') elif 'WiPy' in mch: spi_pins = ('GP14', 'GP16', 'GP30') else: raise Exception('Board not supported!') spi = SPI(0, SPI.MASTER, baudrate=20000...
Pinecast/pinecast
refs/heads/master
assets/migrations/0002_asset_deleted.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-12-02 05:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('assets', '0001_initial'), ] operations = [ migrations.AddField( m...
rkq/cxxexp
refs/heads/master
third-party/src/gtest-1.7.0/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 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 o...
brunojulia/ultracoldUB
refs/heads/master
brightsolitons/gpe_bs_plots.py
1
# coding: utf-8 import matplotlib.pyplot as plt import numpy as np def plot_convergence(x,y,n): f2=plt.figure() plt.title('Convergence',fontsize=15) plt.xlabel('time ($t \, \\omega_{\\xi}$)',fontsize=15) plt.ylabel('Energy per particle ($E/\\hbar \,\\omega_{\\xi}$)',fontsize=15) plt.xticks(np.aran...
mmangura/Base
refs/heads/master
applications/admin/languages/zh-tw.py
17
# -*- coding: utf-8 -*- { '!langcode!': 'zh-tw', '!langname!': '台灣中文', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%...
doumadou/oms
refs/heads/master
deploy/models.py
10644
from django.db import models # Create your models here.
mayankcu/Django-social
refs/heads/master
venv/Lib/site-packages/django/contrib/localflavor/de_CH/formats.py
84
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. F Y H:i:s' YEAR_MONTH...
hpproliant/ironic
refs/heads/master
ironic/common/config.py
17
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
zerobatu/edx-platform
refs/heads/master
lms/djangoapps/ccx/urls.py
80
""" URLs for the CCX Feature. """ from django.conf.urls import patterns, url urlpatterns = patterns( '', url(r'^ccx_coach$', 'ccx.views.dashboard', name='ccx_coach_dashboard'), url(r'^create_ccx$', 'ccx.views.create_ccx', name='create_ccx'), url(r'^save_ccx$', 'ccx.views.save_c...
bmihelac/django-shop
refs/heads/master
shop/__init__.py
2
# -*- coding: utf-8 -*- """ See PEP 386 (http://www.python.org/dev/peps/pep-0386/) Release logic: 1. Remove "dev" from current. 2. git commit 3. git tag <version> 4. push to pypi + push to github 5. bump the version, append '.dev0' 6. git commit 7. push to github (to avoid confusion) """ __version__ = '0.1.2.dev0'
rjeschmi/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/p/parmetis.py
2
## # Copyright 2009-2013 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
rdelval/gorealis
refs/heads/master
vendor/git.apache.org/thrift.git/test/features/local_thrift/__init__.py
43
# # 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...
arocchi/Klampt
refs/heads/master
Python/klampt/src/motionplanning.py
2
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.12 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. """ Python interface to KrisLibrary motion planing routines """ from sys import version_info if version_info >=...
gminds/rapidnewsng
refs/heads/master
django/contrib/localflavor/si/forms.py
101
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
nlu90/heron
refs/heads/master
examples/src/python/pulsar_word_count_streamlet.py
5
#!/usr/bin/env python # -*- encoding: utf-8 -*- # 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...
oceanobservatories/mi-dataset
refs/heads/master
mi/dataset/driver/dosta_abcdjm/sio/test/test_dosta_abcdjm_sio_telemetered_driver.py
2
#!/usr/bin/env python import os import unittest from nose.plugins.attrib import attr from mi.core.log import get_logger from mi.dataset.dataset_driver import ParticleDataHandler from mi.dataset.driver.dosta_abcdjm.sio.dosta_abcdjm_sio_telemetered_driver import parse from mi.dataset.driver.dosta_abcdjm.sio.resource im...
denisff/python-for-android
refs/heads/master
python-modules/twisted/twisted/web/iweb.py
53
# -*- test-case-name: twisted.web.test -*- # Copyright (c) 2008-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Interface definitions for L{twisted.web}. @var UNKNOWN_LENGTH: An opaque object which may be used as the value of L{IBodyProducer.length} to indicate that the length of the entity b...
GenericStudent/home-assistant
refs/heads/dev
homeassistant/components/toon/switch.py
12
"""Support for Toon switches.""" from typing import Any from toonapi import ( ACTIVE_STATE_AWAY, ACTIVE_STATE_HOLIDAY, PROGRAM_STATE_OFF, PROGRAM_STATE_ON, ) from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.typing ...
Johnzero/OE7
refs/heads/master
OE-debug文件/会计科目/l10n_in_hr_payroll/wizard/__init__.py
430
# -*- 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...
C00kiie/Youtube-Mp3-telegram-bot
refs/heads/master
youtube_dl/extractor/sina.py
63
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( HEADRequest, ExtractorError, int_or_none, update_url_query, qualities, get_element_by_attribute, clean_html, ) class SinaIE(InfoExtractor): _VALID_URL = r'''(?x)h...
DanCech/graphite-web
refs/heads/master
webapp/graphite/account/urls.py
7
"""Copyright 2008 Orbitz WorldWide 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...
doctorOb/thoughtsbydrob
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_lassobuiltins.py
293
# -*- coding: utf-8 -*- """ pygments.lexers._lassobuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Built-in Lasso types, traits, methods, and members. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTINS = { 'Types': [ 'null', ...
Rabyss/HideIt
refs/heads/master
hide.py
1
from PIL import Image import numpy as np import sys, os from progress_bar import ProgressBar def set_px(pos, bit, img): # avoids modifying thumbnail size = img.shape[0]*img.shape[1] - 4096 rgb = pos//size if rgb > 2: raise IndexError("Position is too large for image") n_pos = pos % size + 4...
invisiblek/android_kernel_lge_g3
refs/heads/cm-13.0
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...
dfang/odoo
refs/heads/10.0
addons/website_sale_stock/__init__.py
41
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import models
qubole/qds-sdk-py
refs/heads/master
setup.py
1
import os import sys from setuptools import setup INSTALL_REQUIRES = ['requests >=1.0.3', 'boto >=2.45.0', 'six >=1.2.0', 'urllib3 >= 1.0.2'] if sys.version_info < (2, 7, 0): INSTALL_REQUIRES.append('argparse>=1.1') if sys.version_info < (3, 5): INSTALL_REQUIRES.append('inflection==0.3.1') else: INSTALL_R...
kubevirt/client-python
refs/heads/master
test/test_k8s_io_api_core_v1_object_field_selector.py
1
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest i...
mpasternak/michaldtz-fixes-518-522
refs/heads/master
pyglet/resource.py
4
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # 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...
whs/django
refs/heads/master
tests/test_client_regress/context_processors.py
530
def special(request): return {'path': request.special_path}
osmidy/Dischord
refs/heads/master
project/LeapHand.py
1
import sys sys.path.append('..') from common.core import * from common.gfxutil import * from common.audio import * from common.mixer import * from common.note import * from common.wavegen import * from common.wavesrc import * from common.writer import * from Player import * from kivy.core.window import Win...
dimara/synnefo
refs/heads/develop
snf-cyclades-app/synnefo/db/migrations/0001_initial.py
10
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SynnefoUser' db.create_table('db_synnefouser', ( ('id', self.gf('django.db.mod...
release-engineering/koji-containerbuild
refs/heads/master
tests/test_builder_containerbuild.py
1
""" Copyright (C) 2019 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in ...
aparo/django-nonrel
refs/heads/master
tests/regressiontests/syndication/urls.py
99
from django.conf.urls.defaults import * import feeds feed_dict = { 'complex': feeds.DeprecatedComplexFeed, 'rss': feeds.DeprecatedRssFeed, } urlpatterns = patterns('django.contrib.syndication.views', (r'^complex/(?P<foo>.*)/$', feeds.ComplexFeed()), (r'^rss2/$', feeds.TestRss2Feed()), (r'^rss091/...
icedaq/dockerfiles
refs/heads/master
home/files/vim/bundle/deoplete.nvim/rplugin/python3/deoplete/sources/omni.py
1
# ============================================================================ # FILE: omni.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================ import re from .base import Base from deoplete.util import \ g...
alsrgv/tensorflow
refs/heads/master
tensorflow/python/debug/lib/profiling_test.py
123
# 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...
pigeonflight/strider-plone
refs/heads/master
docker/appengine/google/appengine/api/taskqueue/__init__.py
21
#!/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...
garhivelg/case
refs/heads/master
config.py
1
import os from datetime import timedelta # BASE_DIR = os.path.abspath(os.path.dirname(__file__)) BASE_DIR = os.path.abspath(os.getcwd()) class Config(object): DEBUG = False TESTING = False SECRET_KEY = "ThereIsNoSpoon" SQLALCHEMY_DATABASE_URI = 'sqlite:///db/cases.db' # SQLALCHEMY_DATABASE_URI ...
citrix-openstack-build/horizon
refs/heads/master
horizon/test/tests/utils.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
75651/kbengine_cloud
refs/heads/master
kbe/res/scripts/common/Lib/test/test_grammar.py
68
# Python test set -- part 1, grammar. # This just tests whether the parser accepts them all. from test.support import run_unittest, check_syntax_error import unittest import sys # testing import * from sys import * class TokenTests(unittest.TestCase): def test_backslash(self): # Backslash means line con...
SimenB/thefuck
refs/heads/master
tests/rules/test_git_rm_local_modifications.py
4
import pytest from thefuck.rules.git_rm_local_modifications import match, get_new_command from thefuck.types import Command @pytest.fixture def output(target): return ('error: the following file has local modifications:\n {}\n(use ' '--cached to keep the file, or -f to force removal)').format(targe...
jonasfj/dxr
refs/heads/master
tests/test_functions.py
1
"""Tests for searches about functions""" from dxr.testing import SingleFileTestCase, MINIMAL_MAIN class ReferenceTests(SingleFileTestCase): """Tests for finding out where functions are referenced or declared""" source = r""" #include <stdio.h> const char* getHello() { return "He...
andela-ooladayo/django
refs/heads/master
tests/template_tests/filter_tests/test_safe.py
521
from django.test import SimpleTestCase from ..utils import setup class SafeTests(SimpleTestCase): @setup({'safe01': '{{ a }} -- {{ a|safe }}'}) def test_safe01(self): output = self.engine.render_to_string('safe01', {'a': '<b>hello</b>'}) self.assertEqual(output, '&lt;b&gt;hello&lt;/b&gt; -- ...
stdweird/aquilon
refs/heads/master
lib/python2.6/aquilon/worker/templates/resource.py
2
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2011,2012,2013 Contributor # # 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...
3dfxmadscientist/odoo_vi
refs/heads/master
addons/l10n_pa/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
devfort/bugle
refs/heads/master
bugle_project/bugle/management/__init__.py
4
# grr git
Amechi101/concepteur-market-app
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/test_sessionstorage.py
313
from django.test import TestCase from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formtools.tests.wizard.storage import TestStorage from django.contrib.formtools.wizard.storage.session import SessionStorage @skipIfCustomUser class TestSessionStorage(TestStorage, TestCase): def get...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/networkx/algorithms/tests/test_boundary.py
7
# test_boundary.py - unit tests for the boundary module # # Copyright 2015 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for more # information. """Unit tests for the :mod:`networkx.algorithms.boundary` module.""" from __future__ import division...
huanghuiquan/sublime-etpl
refs/heads/master
Lib/_py2/yaml/parser.py
410
# The following YAML grammar is LL(1) and is parsed by a recursive descent # parser. # # stream ::= STREAM-START implicit_document? explicit_document* STREAM-END # implicit_document ::= block_node DOCUMENT-END* # explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* # block_node_or_inden...
sander76/home-assistant
refs/heads/dev
tests/components/local_file/test_camera.py
21
"""The tests for local file camera component.""" from unittest import mock from homeassistant.components.local_file.const import DOMAIN, SERVICE_UPDATE_FILE_PATH from homeassistant.setup import async_setup_component from tests.common import mock_registry async def test_loading_file(hass, hass_client): """Test t...
cnsoft/kbengine-cocos2dx
refs/heads/cocos2dx-cnsoft
kbe/res/scripts/common/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py
357
# This is empty so trying to fetch the fixer class gives an AttributeError
sanjeevtripurari/hue
refs/heads/master
apps/sqoop/src/sqoop/api/pagination.py
36
#!/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...