repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ktan2020/legacy-automation
refs/heads/master
win/Lib/site-packages/SeleniumLibrary/javascript.py
9
# Copyright 2008-2011 Nokia Siemens Networks Oyj # # 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...
hyperized/ansible
refs/heads/devel
lib/ansible/module_utils/network/junos/config/l2_interfaces/l2_interfaces.py
2
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The junos_l2_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessa...
eeshangarg/zulip
refs/heads/master
corporate/tests/test_stripe.py
2
import json import operator import os import re import sys from datetime import datetime, timedelta, timezone from decimal import Decimal from functools import wraps from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, TypeVar, cast from unittest.mock import Mock, patch import orjson import respo...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-3.3.0/Lib/test/test_importlib/import_/test_relative_imports.py
33
"""Test relative imports (PEP 328).""" from .. import util from . import util as import_util import sys import unittest class RelativeImports(unittest.TestCase): """PEP 328 introduced relative imports. This allows for imports to occur from within a package without having to specify the actual package name. ...
lancezlin/ml_template_py
refs/heads/master
lib/python2.7/site-packages/jupyter_console/completer.py
1
# -*- coding: utf-8 -*- """Adapt readline completer interface to make ZMQ request.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. try: from queue import Empty # Py 3 except ImportError: from Queue import Empty # Py 2 from traitlets.config import Conf...
pultitom/study-python
refs/heads/master
basics/interactions.py
1
name = input("What's your name? ") print("Nice to meet you " + name + "!\n") cities_lithuania = input("Largest cities in Lithuania: ") print(cities_lithuania, type(cities_lithuania)) cities_lithuania = eval(input("Largest cities in Lithuania (example: [\"Vilnius\", \"Kaunas\"]): ")) print(cities_lithuania, type(cities...
CUFCTL/DLBD
refs/heads/master
face-detection-code/object_detection/utils/np_box_mask_list.py
5
# 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...
bertyhell/RegexTransformer
refs/heads/master
RegexTransformer/training-set/python.py
7
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import os import socket from datetime import datetime from io import BytesIO from .hooks import dispatch_hook, HOOKS from .structures import CaseInsensitiveDict from .status_codes import cod...
loneknightpy/spark
refs/heads/master
examples/src/main/python/ml/min_hash_lsh_example.py
52
# # 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...
kenshay/ImageScripter
refs/heads/master
ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/internal/image_processing/cv_util_unittest.py
32
# 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 unittest from telemetry.internal.util import external_modules try: np = external_modules.ImportRequiredModule('numpy') except ImportError: pass ...
donckers/ansible
refs/heads/devel
lib/ansible/plugins/connection/docker.py
22
# Based on the chroot connection plugin by Maykel Moya # # Connection plugin for configuring docker containers # (c) 2014, Lorin Hochstein # (c) 2015, Leendert Brouwer # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # Maintainer: Leendert Brouwer (https://github.com/objectified) # # This file is part of Ansible #...
mfraezz/osf.io
refs/heads/develop
osf/migrations/0053_add_quickfiles.py
22
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-06-13 17:35 from __future__ import unicode_literals import logging from django.db import migrations, models from django.core.paginator import Paginator from addons.osfstorage.models import NodeSettings as OSFSNodeSettings, OsfStorageFolder from osf.models im...
aliyun/oss-ftp
refs/heads/master
python27/unix/lib/pyftpdlib/authorizers.py
4
# Copyright (C) 2007-2016 Giampaolo Rodola' <g.rodola@gmail.com>. # Use of this source code is governed by MIT license that can be # found in the LICENSE file. """An "authorizer" is a class handling authentications and permissions of the FTP server. It is used by pyftpdlib.handlers.FTPHandler class for: - verifying u...
FabianHahn/libstore
refs/heads/master
thirdparty/fakeglib/thirdparty/gtest/scripts/fuse_gtest_files.py
2577
#!/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...
pedroig/Parkinsons-Disease-Digital-Biomarker
refs/heads/master
Visualization/testFeature.py
1
import matplotlib.pyplot as plt import numpy as np from datetime import datetime import sys import pywt sys.path.insert(0, '../Features') import features_utils as fu import utils # Level 1 class TestFeature: def __init__(self, data=None): if(data is None): self.data, _ = utils.loadUserInput()...
density215/d215-miniblog
refs/heads/master
unidecode/x05b.py
252
data = ( 'Gui ', # 0x00 'Deng ', # 0x01 'Zhi ', # 0x02 'Xu ', # 0x03 'Yi ', # 0x04 'Hua ', # 0x05 'Xi ', # 0x06 'Hui ', # 0x07 'Rao ', # 0x08 'Xi ', # 0x09 'Yan ', # 0x0a 'Chan ', # 0x0b 'Jiao ', # 0x0c 'Mei ', # 0x0d 'Fan ', # 0x0e 'Fan ', # 0x0f 'Xian ', # 0x10 'Yi '...
Puyb/inscriptions_roller
refs/heads/master
inscriptions/migrations/0029_auto_20171222_0212.py
1
# Generated by Django 2.0 on 2017-12-22 01:12 import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('inscriptions', '0028_au...
lshain-android-source/external-chromium_org
refs/heads/master
third_party/closure_linter/closure_linter/fixjsstyle_test.py
135
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
yawnosnorous/python-for-android
refs/heads/master
python-modules/twisted/twisted/words/protocols/__init__.py
93
"Chat protocols"
lexus42/4022322442test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_runner.py
785
import io import os import sys import pickle import subprocess import unittest from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun class TestCleanUp(unittest.TestCase): def testCleanUp(self): class TestableTest(unittest.TestCase): def testNothing(self): p...
chaosblog/pyload
refs/heads/stable
module/lib/bottle.py
41
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
kinwahlai/phantomjs-ghostdriver
refs/heads/master
src/breakpad/src/tools/gyp/test/hello/gyptest-default.py
150
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simplest-possible build of a "Hello, world!" program using the default build target. """ import TestGyp test = TestGyp.TestGy...
JohnGriffiths/nipype
refs/heads/master
nipype/interfaces/spm/tests/test_auto_CreateWarped.py
12
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.spm.preprocess import CreateWarped def test_CreateWarped_inputs(): input_map = dict(flowfield_files=dict(copyfile=False, field='crt_warped.flowfields', mandatory=True, ), ignore_exce...
mluscon/dnf-plugins-core
refs/heads/master
plugins/download.py
1
# download.py, supplies the 'download' command. # # Copyright (C) 2013-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. # Th...
ssssam/ansible-modules-core
refs/heads/devel
utilities/logic/wait_for.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # # 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 Licens...
geoffkilpin/pombola
refs/heads/master
pombola/kenya/management/commands/kenya_adwords_csv.py
4
import csv import os import sys from optparse import make_option from pombola.core.models import Position from django.core.management.base import NoArgsCommand data_directory = os.path.join(sys.path[0], 'kenya', '2013-election-data') class Command(NoArgsCommand): help = 'Generate a CSV file with all candiates f...
ericholscher/djangoembed
refs/heads/master
oembed/tests/tests/base.py
1
import simplejson from django.conf import settings from django.core.urlresolvers import reverse, NoReverseMatch from django.test import TestCase import oembed from oembed.providers import BaseProvider from oembed.resources import OEmbedResource from oembed.tests.settings import MEDIA_ROOT, MEDIA_URL class BaseOEmbe...
qubick/vlfeat
refs/heads/master
docsrc/webdoc.py
34
#!/usr/bin/python # file: webdoc.py # author: Andrea Vedaldi # description: A website formatter utility # Copyright (C) 2007-13 Andrea Vedaldi and Brian Fulkerson. # All rights reserved. # # This file is part of the VLFeat library and is made available under # the terms of the BSD license (see the COPYING file). impo...
david415/obfsproxy
refs/heads/david-bananaphone
obfsproxy/test/transports/test_bananaphone.py
1
#!/usr/bin/env python import unittest import twisted.trial.unittest from struct import pack from obfsproxy.network.buffer import Buffer from obfsproxy.transports.bananaphone import rh_encoder, rh_decoder class test_Bananaphone(twisted.trial.unittest.TestCase): @classmethod def setUpClass(cls): cls.e...
etos/django
refs/heads/master
django/core/cache/backends/filebased.py
8
"File-based cache backend" import glob import hashlib import os import pickle import random import tempfile import time import zlib from contextlib import suppress from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.core.files.move import file_move_safe from django.utils.encoding import ...
blazewicz/micropython
refs/heads/master
tests/basics/namedtuple1.py
18
try: try: from collections import namedtuple except ImportError: from ucollections import namedtuple except ImportError: print("SKIP") raise SystemExit T = namedtuple("Tup", ["foo", "bar"]) # CPython prints fully qualified name, what we don't bother to do so far #print(T) for t in T(1, ...
anitahitouch/mediadrop
refs/heads/master
mediadrop/controllers/api/media.py
7
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
Simran-B/arangodb
refs/heads/docs_3.0
3rdParty/V8-4.3.61/third_party/python_26/Lib/compiler/pycodegen.py
56
import imp import os import marshal import struct import sys from cStringIO import StringIO from compiler import ast, parse, walk, syntax from compiler import pyassem, misc, future, symbols from compiler.consts import SC_LOCAL, SC_GLOBAL, SC_FREE, SC_CELL from compiler.consts import (CO_VARARGS, CO_VARKEYWORDS, CO_NEW...
elkingtowa/alphacoin
refs/heads/master
Bitcoin/bitcoin-abe-master/Abe/version.py
56
__version__ = '0.8pre'
mortada/scipy
refs/heads/master
scipy/io/harwell_boeing/tests/test_hb.py
126
from __future__ import division, print_function, absolute_import import os import sys if sys.version_info[0] >= 3: from io import StringIO else: from StringIO import StringIO import tempfile import numpy as np from numpy.testing import TestCase, assert_equal, \ assert_array_almost_equal_nulp from scipy....
johanfforsberg/influxdb-python
refs/heads/master
setup.py
10
#!/usr/bin/env python # -*- coding: utf-8 -*- try: import distribute_setup distribute_setup.use_setuptools() except: pass try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup import os import re with open(os.path.join(os.path.dirname(__file__), '...
bettiolo/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py
124
# Copyright (C) 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 of conditions and the ...
zedr/django
refs/heads/master
tests/cache/closeable_cache.py
446
from django.core.cache.backends.locmem import LocMemCache class CloseHookMixin(object): closed = False def close(self, **kwargs): self.closed = True class CacheClass(CloseHookMixin, LocMemCache): pass
toanalien/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/w3c/test_parser.py
135
#!/usr/bin/env python # Copyright (C) 2013 Adobe Systems Incorporated. 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. Redistributions of source code must retain the above # copyright n...
sacharya/nova
refs/heads/master
nova/console/fake.py
25
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 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.a...
koomik/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/sohu.py
19
# encoding: utf-8 import json import re from .common import InfoExtractor from ..utils import ExtractorError class SohuIE(InfoExtractor): _VALID_URL = r'https?://(?P<mytv>my\.)?tv\.sohu\.com/.+?/(?(mytv)|n)(?P<id>\d+)\.shtml.*?' _TEST = { u'url': u'http://tv.sohu.com/20130724/n382479172.shtml#super...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/grizzled/grizzled/exception.py
19
# $Id: 2f91144fd898abfc5994a3a7de580cde341c5c07 $ """ Provides some base exception classes. """ __docformat__ = "restructuredtext en" # --------------------------------------------------------------------------- # Exports # --------------------------------------------------------------------------- __all__ = ['Exce...
AndrewNelis/catlang
refs/heads/master
functions.py
2
import re import sys from types import ( IntType, FloatType, LongType, StringType, TupleType, ListType, FileType, BooleanType, FunctionType) import defs # NOQA from cat.namespace import NameSpace class Functions: """Return a function for a given symbol. Also maintains a list of user defin...
BT-fgarbely/sale-workflow
refs/heads/8.0
sale_order_add_variants/wizard/__init__.py
27
from . import sale_add_variants
kurikaesu/arsenalsuite
refs/heads/master
cpp/lib/PyQt4/examples/designer/plugins/widgets/bubbleswidget.py
20
#!/usr/bin/env python """ bubbleswidget.py A PyQt custom widget example for Qt Designer. Copyright (C) 2006 David Boddie <david@boddie.org.uk> Copyright (C) 2005-2006 Trolltech ASA. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public...
zhuyongyong/crosswalk-test-suite
refs/heads/master
cordova/cordova-sampleapp-android-tests/sampleapp/CIRC_launch.py
18
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
TEAM-Gummy/platform_external_chromium_org
refs/heads/kk4.4
chrome/browser/policy/test/policy_testserver.py
23
# Copyright (c) 2012 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. """A bare-bones test server for testing cloud policy support. This implements a simple cloud policy test server that can be used to test chrome's device...
OmniLayer/omnicore
refs/heads/master
test/util/rpcauth-test.py
71
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test share/rpcauth/rpcauth.py """ import base64 import configparser import hmac import importlib import...
coolbombom/CouchPotato
refs/heads/master
app/lib/provider/yarr/sources/x264.py
8
from app.config.cplog import CPLog from app.lib.provider.yarr.base import torrentBase from imdb.parser.http.bsouplxml._bsoup import SoupStrainer, BeautifulSoup from urllib import quote_plus from urllib2 import URLError import time import urllib import urllib2 log = CPLog(__name__) class x264(torrentBase): """Prov...
lildadou/Flexget
refs/heads/music_snep
flexget/plugins/estimators/est_released_movies.py
13
from __future__ import unicode_literals, division, absolute_import from datetime import datetime import logging from flexget import plugin from flexget.event import event log = logging.getLogger('est_movies') class EstimatesReleasedMovies(object): def estimate(self, entry): if 'tmdb_released' in entry:...
hkchenhongyi/django
refs/heads/master
django/contrib/gis/geos/prototypes/errcheck.py
486
""" Error checking functions for GEOS ctypes prototype functions. """ from ctypes import c_void_p, string_at from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOSFuncFactory # Getting the `free` routine used to free the memory allocated for # string pointers returne...
caotianwei/django
refs/heads/master
tests/ordering/tests.py
301
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import F from django.test import TestCase from .models import Article, Author, Reference class OrderingTests(TestCase): def setUp(self): self.a1 = Article.objects.create( ...
dimroc/tensorflow-mnist-tutorial
refs/heads/master
lib/python3.6/site-packages/tensorflow/python/saved_model/utils.py
65
# 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...
ekesken/istatistikciadamlazim
refs/heads/master
allauth/twitter/migrations/0002_snowflake.py
8
# 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): # Changing field 'TwitterAccount.social_id' db.alter_column('twitter_twitteraccount', 'social_id', self.gf...
davidcusatis/horizon
refs/heads/master
openstack_dashboard/test/test_data/keystone_data.py
8
# 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 # # Unless required by applicable law or agree...
anryko/ansible
refs/heads/devel
lib/ansible/modules/notification/matrix.py
47
#!/usr/bin/python # coding: utf-8 # (c) 2018, Jan Christian Grünhage <jan.christian@gruenhage.xyz> # 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...
JioCloud/oslo.middleware
refs/heads/master
tests/test_sizelimit.py
2
# Copyright (c) 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 License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
ArthurGarnier/SickRage
refs/heads/master
lib/subliminal/cache.py
41
# -*- coding: utf-8 -*- import datetime from dogpile.cache import make_region #: Expiration time for show caching SHOW_EXPIRATION_TIME = datetime.timedelta(weeks=3).total_seconds() #: Expiration time for episode caching EPISODE_EXPIRATION_TIME = datetime.timedelta(days=3).total_seconds() #: Expiration time for scra...
FireballDWF/cloud-custodian
refs/heads/master
tools/c7n_azure/tests/test_actions_autotag-base.py
3
# Copyright 2019 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 # # Unless required by applicable law or agreed to in wri...
ligo-cbc/pycbc
refs/heads/master
pycbc/frame/losc.py
1
# Copyright (C) 2017 Alex Nitz # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the ...
illicitonion/givabit
refs/heads/master
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_3/tests/regressiontests/m2m_regress/tests.py
55
from django.core.exceptions import FieldError from django.test import TestCase from models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild, SelfReferChildSibling, Worksheet) class M2MRegressionTests(TestCase): def test_multiple_m2m(self): # Multiple m2m references to model must be distin...
vikas1885/test1
refs/heads/master
cms/djangoapps/contentstore/features/advanced_settings.py
116
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=no-name-in-module from common import type_in_codemirror, press_the_notification_button, get_codemirror_value KEY_CSS = ...
matthewelse/pyOCD
refs/heads/cortex-a
pyOCD/target/target_MKL46Z256xxx4.py
3
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM 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 ...
sudosurootdev/external_chromium_org
refs/heads/L5
tools/telemetry/telemetry/core/profile_types_unittest.py
63
# 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. import unittest from telemetry.core import profile_types class ProfileTypesTest(unittest.TestCase): def testGetProfileTypes(self): types = profile_ty...
arpith/zulip
refs/heads/master
bots/jabber_mirror_backend.py
4
#!/usr/bin/env python # # Copyright (C) 2013 Permabit, Inc. # Copyright (C) 2013--2014 Zulip, 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 without l...
dingdang2012/tlsprober
refs/heads/master
generate_security_view.py
3
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; -*- # Copyright 2010-2012 Opera Software ASA # # 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/...
BeATz-UnKNoWN/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_imaplib.py
49
from test import support # If we end up with a significant number of tests that don't require # threading, this test module should be split. Right now we skip # them all if we don't have threading. threading = support.import_module('threading') from contextlib import contextmanager import imaplib import os.path impor...
welbornprod/colr
refs/heads/dev
colr/__init__.py
1
""" colr.py A terminal color library for python, inspired by the JS lib "clor". -Christopher Welborn 08-12-2015 The MIT License (MIT) Copyright (c) 2015 Christopher Welborn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentati...
SergiuMir/python-phonenumbers
refs/heads/dev
python/phonenumbers/phonemetadata.py
11
"""PhoneMetadata object definitions""" # Based on original Java code and protocol buffer: # resources/phonemetadata.proto # java/src/com/google/i18n/phonenumbers/Phonemetadata.java # Copyright (C) 2010-2011 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you m...
dneg/cortex
refs/heads/master
python/IECoreMaya/TemporaryAttributeValues.py
12
########################################################################## # # Copyright (c) 2009-2012, 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: # # * Redis...
wenxinguo/xisip
refs/heads/master
tests/pjsua/scripts-pesq/200_codec_g722.py
59
# $Id: 200_codec_g722.py 2063 2008-06-26 18:52:16Z nanang $ # from inc_cfg import * ADD_PARAM = "" if (HAS_SND_DEV == 0): ADD_PARAM += "--null-audio" # Call with G722 codec test_param = TestParam( "PESQ codec G722", [ InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec g722 --clock-rate 16000 --play...
omaciel/robottelo
refs/heads/master
tests/foreman/cli/test_domain.py
1
# -*- encoding: utf-8 -*- """Test class for Domain CLI :Requirement: Domain :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: Hosts :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfactory import gen_string from robottelo.cli.base import CLIReturnCodeError from robottelo.cl...
d120/pyophase
refs/heads/master
clothing/dashboard_widgets.py
1
from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ from dashboard.components import TemplateWidgetComponent from ophasebase.models import Ophase from .models import Order, Person class ClothingOrderWidget(TemplateWidgetComponent): permissions = ['clothing.add_order'] ...
dhruvilpatel/citation
refs/heads/master
citation/bibtex/__init__.py
7
from .common import *
Plain-Andy-legacy/android_external_chromium_org
refs/heads/lp-5.1r1
tools/usb_gadget/default_gadget.py
101
# 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. """Default gadget configuration.""" import gadget import usb_constants import usb_descriptors class DefaultGadget(gadget.Gadget): def __init__(self): ...
eile/ITK
refs/heads/master
Modules/ThirdParty/GDCM/src/gdcm/Wrapping/Csharp/doxy2swig.py
18
#!/usr/bin/env python """Doxygen XML to SWIG docstring converter. Usage: doxy2swig.py [options] input.xml output.i Converts Doxygen generated XML files into a file containing docstrings that can be used by SWIG-1.3.x. Note that you need to get SWIG version > 1.3.23 or use Robin Dunn's docstring patch to be able t...
cyrusmg/python-hessian
refs/heads/master
pyhessian/client.py
1
from six.moves.http_client import HTTPConnection, HTTPSConnection from six.moves.urllib.parse import urlparse from warnings import warn import base64 import sys import six from pyhessian.encoder import encode_object from pyhessian.parser import Parser from pyhessian.protocol import Call, Fault from pyhessian.utils im...
ewandor/home-assistant
refs/heads/dev
homeassistant/components/cover/rpi_gpio.py
7
""" Support for controlling a Raspberry Pi cover. Instructions for building the controller can be found here https://github.com/andrewshilliday/garage-door-controller For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover.rpi_gpio/ """ import logging from...
JamesHyunKim/myhdl
refs/heads/master
hdlmake/fetch/__init__.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2013 CERN # Author: Pawel Szostek (pawel.szostek@cern.ch) # # This file is part of Hdlmake. # # Hdlmake 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 Foundatio...
CumulusNetworks/netshow-cumulus-lib
refs/heads/master
setup.py
1
# pylint: disable=c0111 # if installing this package from git, make sure to include 'gitversion' # in requirements.txt from version import __VERSION__ import os import shutil try: import ez_setup ez_setup.use_setuptools() except ImportError: pass from distutils.command.install_data import install_data from ...
thenin/AssignmentPython
refs/heads/master
anothertest/__init__.py
2
__author__ = 'kguryanov'
HyperBaton/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_firewall_shaper_per_ip_shaper.py
7
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
dockerera/func
refs/heads/master
func/minion/func_arg.py
5
## ## Copyright 2007, Red Hat, Inc ## see AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave...
rascul/botwot
refs/heads/master
plugins/debug.py
4
""" Debug Plugin (botbot plugins.debug) """ # Copyright 2013 Facebook # # 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 app...
njwilson23/rasterio
refs/heads/master
examples/async-rasterio.py
7
"""async-rasterio.py Operate on a raster dataset window-by-window using asyncio's event loop and thread executor. Simulates a CPU-bound thread situation where multiple threads can improve performance. """ import asyncio import time import numpy import rasterio from rasterio._example import compute def main(infile...
ahmed-mahran/hue
refs/heads/master
desktop/core/ext-py/django-auth-ldap-1.2.0/setup.py
36
#!/usr/bin/env python from setuptools import setup setup( name="django-auth-ldap", version="1.2.0", description="Django LDAP authentication backend", long_description=open('README').read(), url="http://bitbucket.org/psagers/django-auth-ldap/", author="Peter Sagerson", author_email="psagers...
ohduran/CrowdFinanceInfographic
refs/heads/master
virtualenv/lib/python3.5/site-packages/pip/download.py
143
from __future__ import absolute_import import cgi import email.utils import getpass import json import logging import mimetypes import os import platform import re import shutil import sys import tempfile try: import ssl # noqa HAS_TLS = True except ImportError: HAS_TLS = False from pip._vendor.six.move...
bcorfman/stage
refs/heads/master
mayavicontroller.py
1
from PyQt4 import QtGui from PyQt4.QtGui import QFileDialog import vtk from mayavi_qt import MayaviQWidget from plot3d import Plotter from access import CellBounds, PointBounds class CustomInteractor(vtk.vtkInteractorStyleTrackballCamera): """ Right-click functionality for PK callouts on the matrix grid. ...
dkubiak789/OpenUpgrade
refs/heads/8.0
openerp/conf/__init__.py
442
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
afaquejam/Linked-List-Problems
refs/heads/master
Others/Insert_Sort.py
1
import sys import random import Linked_List import Sorted_Insert def insert_sort(lst): if lst.head == None or lst.head.next == None: return temp = lst.head sorted_list = Linked_List.LinkedList() while temp != None: Sorted_Insert.sorted_insert(sorted_list, temp.data) temp = temp...
woltage/ansible
refs/heads/devel
lib/ansible/module_utils/urls.py
2
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
klmitch/glance
refs/heads/master
glance/common/wsme_utils.py
5
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 re...
varunnaganathan/django
refs/heads/master
django/contrib/sessions/apps.py
591
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SessionsConfig(AppConfig): name = 'django.contrib.sessions' verbose_name = _("Sessions")
MiniSEC/GRR_clone
refs/heads/master
lib/threadpool_test.py
1
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Tests for the ThreadPool class.""" import threading import mox import logging from grr.lib import flags from grr.lib import stats from grr.lib import test_lib from grr.lib import threadpool class ThreadPoolTest(test_lib.GRRBaseTest): ""...
cmwaura/aura
refs/heads/master
accounts/models.py
792
from __future__ import unicode_literals from django.db import models # Create your models here.
mozilla/django-badger
refs/heads/master
badger/tests/__init__.py
5
import logging from contextlib import contextmanager from django.conf import settings from django.core.management import call_command from django.db.models import loading from django.contrib.auth.models import User from django import test from django.utils.translation import get_language try: from funfactory.url...
mathiasertl/django-xmpp-account
refs/heads/master
core/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='RegistrationU...
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/Django-1.6.10/tests/urlpatterns_reverse/urls_without_full_import.py
150
# A URLs file that doesn't use the default # from django.conf.urls import * # import pattern. from __future__ import absolute_import from django.conf.urls import patterns, url from .views import empty_view, bad_view urlpatterns = patterns('', url(r'^test_view/$', empty_view, name="test_view"), url(r'^bad_vi...
computationalBiology/NPLB
refs/heads/master
NPLB/evaluate.py
1
##################### NPLB ##################### # No Promoter Left Behind (NPLB) is a tool to # find the different promoter architectures within a set of promoter # sequences. More information can be found in the README file. # Copyright (C) 2015 Sneha Mita and Leelavati Narlikar # NPLB is free sof...
m4rx9/mmfinder
refs/heads/master
mmfinder/orm/models.py
1
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # Feel free to rename the models, but don't rename db_table values or field names. # # Also note: You'll have to ...