repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
analyseuc3m/ANALYSE-v1
common/djangoapps/course_modes/admin.py
30
9561
""" Django admin page for course modes """ from django.conf import settings from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib import admin from pytz import timezone, UTC from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locations import SlashSeparatedCo...
agpl-3.0
handroissuazo/tensorflow
tensorflow/python/debug/cli/command_parser.py
17
8042
# 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...
apache-2.0
ctuning/ck-env
soft/compiler.llvm.android.ndk/customize.py
1
23467
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # import os ############################################################################## # ...
bsd-3-clause
kblomqvist/yasha
yasha/cmsis.py
1
14079
""" The MIT License (MIT) Copyright (c) 2015-2021 Kim Blomqvist 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 to use, copy, modify, ...
mit
The01000001Team/PythonGroceryList
beautifulsoup4-4.4.1/doc.zh/source/conf.py
65
8200
# -*- coding: utf-8 -*- # # Beautiful Soup documentation build configuration file, created by # sphinx-quickstart on Thu Jan 26 11:22:55 2012. # # 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 # autogenerated file. ...
mit
kernel-hut/android_kernel_asus_Z010D
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
gpl-2.0
WafaaT/spark-tk
python/sparktk/frame/ops/rename_columns.py
14
2293
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
apache-2.0
0dadj1an/mix
mix_backup/workspace/python_bundle_1_2/add_access_rule/addAccessRule.py
1
2674
# # addAccessRule.py # version 1.0 # # # This example demonstrates communication with Check Point Management server using Management API Library in Python. # The demonstrated commands are: # # 1. login # 2. adding an access rule to the top of Network layer # 3. publishing the changes # # Logout command is called ...
apache-2.0
hvanhovell/spark
examples/src/main/python/ml/estimator_transformer_param_example.py
123
3952
# # 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...
apache-2.0
alexschiller/osf.io
osf/management/commands/migratedata.py
2
28919
from __future__ import unicode_literals import gc import importlib import sys import itertools from box import BoxClient from box import BoxClientException from bson import ObjectId from dropbox.client import DropboxClient from dropbox.rest import ErrorResponse from github3 import GitHubError from oauthlib.oauth2 imp...
apache-2.0
2014c2g3/cda0512
static/Brython3.1.1-20150328-091302/Lib/unittest/__init__.py
900
2718
""" Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the tests and reporting the resu...
agpl-3.0
markmc/oslo.messaging
oslo/messaging/notify/_impl_messaging.py
1
2131
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # Copyright 2013 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/licens...
apache-2.0
matmutant/sl4a
python/src/Lib/lib-tk/Tix.py
50
74119
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*- # # $Id: Tix.py 63487 2008-05-20 07:13:37Z georg.brandl $ # # Tix.py -- Tix widget wrappers. # # For Tix, see http://tix.sourceforge.net # # - Sudhir Shenoy (sshenoy@gol.com), Dec. 1995. # based on an idea of Jean-Marc Lu...
apache-2.0
lxsmnv/spark
examples/src/main/python/sql/arrow.py
13
3997
# # 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...
apache-2.0
mitocw/edx-platform
lms/djangoapps/course_api/tests/test_permissions.py
4
1738
""" Test authorization functions """ from django.contrib.auth.models import AnonymousUser from django.test import TestCase from ..permissions import can_view_courses_for_username from .mixins import CourseApiFactoryMixin class ViewCoursesForUsernameTestCase(CourseApiFactoryMixin, TestCase): """ Verify func...
agpl-3.0
agconti/Shopify-Django
venv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/namedwizardtests/forms.py
318
1705
import os import tempfile from django import forms from django.core.files.storage import FileSystemStorage from django.forms.formsets import formset_factory from django.http import HttpResponse from django.template import Template, Context from django.contrib.auth.models import User from django.contrib.formtools.wiz...
mit
Scemoon/lpts
site-packages/pychart/basecanvas.py
11
18866
# # Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com) # # Jockey is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any # later version. # # Jockey is distri...
gpl-2.0
benjaoming/kolibri
kolibri/content/migrations/0009_auto_20180410_1139.py
3
1620
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-04-10 18:39 from __future__ import unicode_literals from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ('content', '0008_contentnode_coach_content'), ] operations = [...
mit
tuxos/tweepy
tests/test_rate_limit.py
47
5416
import unittest import os from tweepy import API, Cursor from tweepy.error import TweepError import six if six.PY3: import unittest else: import unittest2 as unittest from .config import create_auth testratelimit = 'TEST_RATE_LIMIT' in os.environ @unittest.skipIf(not testratelimit, "skipping rate limiting t...
mit
ecino/compassion-modules
mobile_app_connector/models/wordpress_post.py
2
10124
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2019 Compassion CH (http://www.compassion.ch) # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #################################################...
agpl-3.0
CCI-MOC/k2k-proxy
mixmatch/services.py
1
6357
# Copyright 2016 Massachusetts Open Cloud # # 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...
apache-2.0
martinwicke/tensorflow
tensorflow/contrib/session_bundle/gc.py
47
5977
# 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...
apache-2.0
grembo/buildbot
master/buildbot/steps/package/deb/lintian.py
11
3303
# 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of ME...
gpl-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.3.0/Lib/test/test_importlib/extension/test_finder.py
26
1223
from importlib import machinery from .. import abc from . import util import unittest class FinderTests(abc.FinderTests): """Test the finder for extension modules.""" def find_module(self, fullname): importer = machinery.FileFinder(util.PATH, (machinery.Extens...
mit
RCGTDev/votainteligente-portal-electoral
elections/tests/election_tags_based_search_tests.py
4
2452
# coding=utf-8 from elections.tests import VotaInteligenteTestCase as TestCase from django import forms from django.utils.unittest import skip from django.core.urlresolvers import reverse from elections.forms import ElectionSearchByTagsForm from elections.views import ElectionsSearchByTagView from django.views.generic....
gpl-3.0
BL-Labs/sample_generator_datatools
sample_generator/sample_generator/settings.py
1
5561
# Django settings for sample_generator project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', ...
mit
ddico/odoo
addons/website/tests/test_controllers.py
1
1702
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from odoo import tests from odoo.tools import mute_logger @tests.tagged('post_install', '-at_install') class TestControllers(tests.HttpCase): @mute_logger('odoo.addons.http_routing.models.ir_http', 'o...
agpl-3.0
Therp/odoo
addons/hw_escpos/escpos/exceptions.py
170
2884
""" ESC/POS Exceptions classes """ import os class Error(Exception): """ Base class for ESC/POS errors """ def __init__(self, msg, status=None): Exception.__init__(self) self.msg = msg self.resultcode = 1 if status is not None: self.resultcode = status def __st...
agpl-3.0
ftranschel/evoMPS
evoMPS/tdvp_uniform.py
1
54221
# -*- coding: utf-8 -*- """ Created on Thu Oct 13 17:29:27 2011 @author: Ashley Milsted TODO: - Clean up CG code: Create nice interface? - Split out excitations stuff? """ import numpy as np import scipy as sp import scipy.linalg as la import scipy.sparse.linalg as las import scipy.optimize as opti import td...
bsd-3-clause
actmd/Diamond
src/collectors/rabbitmq/test/testrabbitmq.py
10
7825
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from rabbitmq import Rabbi...
mit
kthordarson/youtube-dl-ruv
youtube_dl/extractor/sharesix.py
5
2667
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( compat_urllib_parse, compat_urllib_request, parse_duration, ) class ShareSixIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?sharesix\.com/(?:f/)?(?P<id>[0-9a-zA-Z]+)' _T...
unlicense
alexholehouse/SBMLIntegrator
libsbml-5.0.0/src/bindings/python/test/math/TestReadMathML.py
1
31941
# # @file TestReadMathML.py # @brief Read MathML unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # $Id: TestReadMathML.py 11441 2010-07-09 02:22:23Z mhucka $ # $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/python/test/math/TestReadMathML.py...
gpl-3.0
kdeloach/model-my-watershed
src/mmw/apps/monitoring/views.py
3
1740
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from rest_framework import status from django.http import JsonResponse from django.core.cache import caches from django.db import connections from mmw.middleware import bypass_middlew...
apache-2.0
tarballs-are-good/sympy
sympy/physics/quantum/tests/test_dagger.py
2
1198
from sympy import I, Matrix, symbols, conjugate, Expr, Integer from sympy.physics.quantum.dagger import Dagger def test_scalars(): x = symbols('x',complex=True) assert Dagger(x) == conjugate(x) assert Dagger(I*x) == -I*conjugate(x) i = symbols('i',real=True) assert Dagger(i) == i p = symbol...
bsd-3-clause
natetrue/ReplicatorG
skein_engines/skeinforge-0006/skeinforge_tools/skeinforge_utilities/intercircle.py
2
22704
""" Intercircle is a collection of utilities for intersecting circles, used to get smooth loops around a collection of points and inset & outset loops. """ from __future__ import absolute_import try: import psyco psyco.full() except: pass #Init has to be imported first because it has code to workaround the python ...
gpl-2.0
jason0x43/jc-nest
nest.py
1
11609
#!/usr/bin/env python import json import requests import logging import ssl from datetime import datetime from os.path import exists, expanduser, dirname from os import makedirs, remove from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager LOG = logging.getLogger(__n...
mit
nhejazi/scikit-learn
sklearn/neighbors/setup.py
50
1460
import os def configuration(parent_package='', top_path=None): import numpy from numpy.distutils.misc_util import Configuration config = Configuration('neighbors', parent_package, top_path) libraries = [] if os.name == 'posix': libraries.append('m') config.add_extension('ball_tree', ...
bsd-3-clause
feinheit/feincms-in-a-box
fbox/$PROJECT_NAME/tools/mail.py
2
1606
from __future__ import absolute_import, unicode_literals from django.core.mail import EmailMultiAlternatives from django.template.loader import TemplateDoesNotExist, render_to_string def render_to_mail(template, context, **kwargs): """ Renders a mail and returns the resulting ``EmailMultiAlternatives`` i...
bsd-3-clause
zwernberg/squatbot
config/settings/production.py
1
7518
# -*- coding: utf-8 -*- """ Production Configurations - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis for cache """ from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat from django.utils import six from...
mit
ahu-odoo/odoo
addons/gamification/wizard/update_goal.py
386
1848
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
codingkevin/suds
tests/test_input_parameters.py
1
24975
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify it under # the terms of the (LGPL) GNU Lesser 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 i...
lgpl-3.0
pymedusa/SickRage
medusa/providers/torrent/json/eztv.py
1
4401
# coding=utf-8 """Provider code for EZTV.""" from __future__ import unicode_literals import logging from medusa import tv from medusa.helper.common import convert_size from medusa.indexers.utils import mappings from medusa.logger.adapters.style import BraceAdapter from medusa.providers.torrent.torrent_provider impo...
gpl-3.0
hilts-vaughan/webrtc-components
client/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
542
45270
# Copyright (c) 2012 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
mit
CVML/cvxpy
examples/qcqp.py
12
2247
# for decimal division from __future__ import division import sys import cvxopt import numpy as np from pylab import * import math from cvxpy import * # Taken from CVX website http://cvxr.com/cvx/examples/ # Derived from Example: Finding the fastest mixing Markov chain on a graph # Ported from cvx matlab to cvxpy by...
gpl-3.0
snegovick/dswarm_simulator
localization_2d.py
1
12097
#!/usr/bin/env python import random import math import collision_detection as cd from extra import ceiling_camera, radio import sys write_pngs = False if len(sys.argv)>=2: if sys.argv[1] == "w": write_pngs = True bpp = 4 polygon_width = 1000 polygon_height = 500 pixel_per_mm = 1. obstacle_color = (0,0,0...
gpl-3.0
trdean/grEME
gr-channels/python/channels/phase_bal.py
60
3652
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: IQ Phase Balancer # Author: matt@ettus.com # Generated: Thu Aug 1 11:49:41 2013 ################################################## from gnuradio import blocks from gnuradio import filter from gnuradio import...
gpl-3.0
marathoncoder/scrapy
scrapy_py/settings.py
1
3915
# -*- coding: utf-8 -*- # Scrapy settings for scrapy_py project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/late...
mit
RadonX-ROM/external_skia
bench/bench_util.py
145
13462
''' Created on May 19, 2011 @author: bungeman ''' import os import re import math # bench representation algorithm constant names ALGORITHM_AVERAGE = 'avg' ALGORITHM_MEDIAN = 'med' ALGORITHM_MINIMUM = 'min' ALGORITHM_25TH_PERCENTILE = '25th' # Regular expressions used throughout. PER_SETTING_RE = '([^\s=]+)(?:=(\S+...
bsd-3-clause
npuichigo/ttsflow
third_party/tensorflow/tensorflow/contrib/cudnn_rnn/python/kernel_tests/cudnn_rnn_ops_test.py
8
25732
# 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...
apache-2.0
eepalms/gem5-newcache
src/arch/x86/isa/insts/simd128/integer/logical/exclusive_or.py
91
2667
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
dllsf/odootest
addons/project_issue/res_config.py
441
1492
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
pelikanchik/edx-platform
common/djangoapps/student/tests/test_userstanding.py
18
3972
""" These are tests for disabling and enabling student accounts, and for making sure that students with disabled accounts are unable to access the courseware. """ from student.tests.factories import UserFactory, UserStandingFactory from student.models import UserStanding from django.test import TestCase, Client from dj...
agpl-3.0
takahiro33/proactive
.waf-1.7.9-786a25f4411038005f1f2ec0d121c503/waflib/Tools/compiler_c.py
343
1759
#! /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 os,sys,imp,types from waflib.Tools import ccroot from waflib import Utils,Configure from waflib.Logs import debug c_compiler={'win32':['msvc','gcc'],'cygwin':['gcc'],'d...
agpl-3.0
jolyonb/edx-platform
common/djangoapps/microsite_configuration/tests/backends/test_filebased.py
1
5844
""" Test Microsite filebased backends. """ from __future__ import absolute_import import six import unittest from mock import patch from django.test import TestCase from django.conf import settings from django.urls import reverse from microsite_configuration.backends.base import ( BaseMicrositeBackend, BaseM...
agpl-3.0
barryrobison/arsenalsuite
cpp/lib/PyQt4/examples/widgets/styles.py
20
9203
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
18F/rdbms-subsetter
dialects/postgres.py
1
1790
import re import sqlalchemy as sa from sqlalchemy import cast from sqlalchemy.dialects.postgresql import ARRAY, ENUM def sql_enum_to_list(value): """ Interprets PostgreSQL's array syntax in terms of a list Enums come back from SQL as '{val1,val2,val3}' """ if value is None: return [] ...
cc0-1.0
iver333/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/gc.py
146
2038
# Copyright (C) 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...
bsd-3-clause
wuhengzhi/chromium-crosswalk
tools/perf/measurements/v8_gc_times_unittest.py
14
16133
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import decorators from telemetry.internal.results import page_test_results from telemetry.page import page as page_module from telemetry.testi...
bsd-3-clause
StefanRijnhart/OpenUpgrade
addons/sale/edi/__init__.py
454
1065
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # 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 GN...
agpl-3.0
looker/sentry
src/sentry/south_migrations/0182_auto__add_field_auditlogentry_actor_label__add_field_auditlogentry_act.py
4
56512
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AuditLogEntry.actor_label' db.add_column( 'sen...
bsd-3-clause
jumpstarter-io/keystone
keystone/tests/unit/common/test_notifications.py
2
44394
# Copyright 2013 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 wri...
apache-2.0
beezee/GAE-Django-base-app
django/middleware/cache.py
241
9078
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE_CLASSES = [ 'django.middleware.cache.UpdateCa...
bsd-3-clause
thaim/ansible
test/units/modules/network/ftd/test_ftd_file_upload.py
25
3368
from __future__ import absolute_import import pytest from ansible.module_utils import basic from units.modules.utils import set_module_args, exit_json, fail_json, AnsibleFailJson, AnsibleExitJson from ansible.modules.network.ftd import ftd_file_upload from ansible.module_utils.network.ftd.fdm_swagger_client import Op...
mit
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/keystoneauth1/loading/base.py
3
3953
# 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 # distributed under t...
mit
mcking49/apache-flask
Python/Lib/test/test_doctest.py
12
86542
# -*- coding: utf-8 -*- """ Test script for doctest. """ import sys from test import test_support import doctest # NOTE: There are some additional tests relating to interaction with # zipimport in the test_zipimport_support test module. ###################################################################### ## ...
mit
HiroIshikawa/21playground
microblog/flask/lib/python3.5/site-packages/coverage/backward.py
26
4909
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Add things to old Pythons so I can pretend they are newer.""" # This file does lots of tricky stuff, so disable a bunch of pylint warnings. # pylint: disable=re...
mit
Jollytown/Garuda
server/garuda/lib/python2.7/site-packages/django/utils/dateformat.py
115
10703
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print(df.format('jS F Y H:i')) 7th October 2003 11:39 >>> """ from __future__ import unicode_literals import re import time import calendar import d...
mit
affo/nova
nova/volume/encryptors/base.py
61
1949
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
opendaylight/netvirt
resources/tools/odltools/odltools/mdsal/tests/test_neutron.py
1
1436
# Copyright 2018 Red Hat, Inc. and others. 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 appli...
epl-1.0
TyRoXx/cdm
original_sources/boost_1_59_0/tools/build/test/project_test3.py
44
4117
#!/usr/bin/python # Copyright 2002, 2003 Dave Abrahams # Copyright 2002, 2003, 2004, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild import os t = BoostBuild.Tester(translate_...
mit
veger/ansible
lib/ansible/modules/cloud/amazon/ec2_customer_gateway.py
37
9318
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
matsprea/omim
tools/user_code_coverage.py
53
1598
import os import json import sys if len(sys.argv) < 3: print "USAGE: " + sys.argv[0] + " [username] [htmlfile]" exit() USERNAME = sys.argv[1] HTMLFILE = sys.argv[1] if __name__ == "__main__": os.system('git log --pretty="%H" --author="'+USERNAME+'" | while read commit_hash; do git show --oneline --name-...
apache-2.0
NeuralEnsemble/neuroConstruct
lib/jython/Lib/encodings/cp1254.py
593
13758
""" Python Character Mapping Codec cp1254 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
gpl-2.0
dancingdan/tensorflow
tensorflow/examples/tutorials/input_fn/boston.py
76
2920
# 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 appl...
apache-2.0
tvtsoft/odoo8
addons/hr_holidays/hr_holidays.py
3
36891
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com) import calendar import datetime from datetime import date import logging import math import time from operator import attrgetter from dateutil.relativedel...
agpl-3.0
nikhilraog/boto
tests/integration/sdb/test_connection.py
114
4320
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # 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 res...
mit
NYUCCL/psiTurk
psiturk/experiment.py
1
27033
# -*- coding: utf-8 -*- """ This module provides the backend Flask server used by psiTurk. """ from __future__ import generator_stop import os import sys import datetime import logging from random import choice import user_agents import requests import re import json from jinja2 import TemplateNotFound from collections...
mit
zahari/samba
buildtools/wafadmin/Tools/winres.py
21
1286
#!/usr/bin/env python # encoding: utf-8 # Brant Young, 2007 "This hook is called when the class cpp/cc task generator encounters a '.rc' file: X{.rc -> [.res|.rc.o]}" import os, sys, re import TaskGen, Task from Utils import quote_whitespace from TaskGen import extension EXT_WINRC = ['.rc'] winrc_str = '${WINRC} ${...
gpl-3.0
mitocw/edx-platform
common/djangoapps/edxmako/tests.py
3
8555
import unittest import ddt from django.conf import settings from django.http import HttpResponse from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from django.urls import reverse from edx_django_utils.cache import RequestCache from mock imp...
agpl-3.0
chemelnucfin/tensorflow
tensorflow/python/data/kernel_tests/iterator_test.py
1
35277
# 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...
apache-2.0
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/galaxy/objectstore/__init__.py
2
29544
""" objectstore package, abstraction for storing blobs of data for use in Galaxy, all providers ensure that data can be accessed on the filesystem for running tools """ import os import random import shutil import logging import threading from xml.etree import ElementTree from galaxy.util import umask_fix_perms, forc...
gpl-3.0
studio666/gnuradio
gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py
333
6794
# # Copyright 2010 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 option) # any later version. # #...
gpl-3.0
kursitet/edx-platform
lms/djangoapps/courseware/features/conditional.py
31
4647
# pylint: disable=missing-docstring from lettuce import world, steps from nose.tools import assert_in, assert_true from common import i_am_registered_for_the_course, visit_scenario_item from problems_setup import add_problem_to_course, answer_problem @steps class ConditionalSteps(object): COURSE_NUM = 'test_cou...
agpl-3.0
rahul67/hue
desktop/core/ext-py/PyYAML-3.09/lib/yaml/representer.py
114
17706
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', 'RepresenterError'] from error import * from nodes import * import datetime try: set except NameError: from sets import Set as set import sys, copy_reg, types class RepresenterError(YAMLError): pass class BaseRepresenter(object): ...
apache-2.0
Conflei/ATI
[ATI] Misfenterest/Frontend/venv/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py
678
9406
import logging try: # Python 3 from urllib.parse import urljoin except ImportError: from urlparse import urljoin from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connectionpool import port_by_scheme from .exceptions import LocationValue...
mit
DanteOnline/free-art
venv/lib/python3.4/site-packages/django/core/management/sql.py
399
1890
from __future__ import unicode_literals from django.apps import apps from django.db import models def sql_flush(style, connection, only_django=False, reset_sequences=True, allow_cascade=False): """ Returns a list of the SQL statements used to flush the database. If only_django is True, then only table n...
gpl-3.0
bpsinc-native/src_third_party_scons-2.0.1
engine/SCons/Tool/linkloc.py
61
4006
"""SCons.Tool.linkloc Tool specification for the LinkLoc linker for the Phar Lap ETS embedded operating system. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005,...
mit
hengyicai/OnlineAggregationUCAS
python/pyspark/streaming/util.py
3
4345
# # 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...
apache-2.0
Intel-tensorflow/tensorflow
tensorflow/python/kernel_tests/relu_op_test.py
9
22679
# 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...
apache-2.0
shelbycruver/real-python-test
env/lib/python2.7/site-packages/setuptools/tests/test_svn.py
300
7806
# -*- coding: utf-8 -*- """svn tests""" import io import os import subprocess import sys import unittest from setuptools.tests import environment from setuptools.compat import unicode, unichr from setuptools import svn_utils from setuptools.tests.py26compat import skipIf def _do_svn_check(): try: subpro...
gpl-2.0
bd808/apache-errors
apache-errors.py
1
8784
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013 Bryan Davis and contributors """ Apache error log report generator """ import collections import datetime import hashlib import re import string import textwrap ERROR_FORMAT = ( r'\[(?P<datetime>[^\]]+)\] ' r'\[(?P<level>[^\]]+)\] '...
mit
vadimtk/chrome4sdp
build/android/pylib/local/local_test_server_spawner.py
58
1245
# 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. from pylib import chrome_test_server_spawner from pylib import forwarder from pylib.base import test_server class LocalTestServerSpawner(test_server.TestSe...
bsd-3-clause
gina-alaska/emodis_ndvi_python-docker
emodis_ndvi_python/pycodes/computemetrics_by1yr.py
2
4565
#calcualte the metrics import numpy as np from getforwardma import * from getbackwardma import * from getcrossover_percentage_extremeslope import * from getsos import * from geteos import * from getmaxndvi import * from gettotndvi import * from getndvitodate import * from getrange import * ...
mit
undoware/neutron-drive
google_appengine/google/appengine/_internal/django/template/context.py
23
5431
from google.appengine._internal.django.core.exceptions import ImproperlyConfigured from google.appengine._internal.django.utils.importlib import import_module # Cache of actual callables. _standard_context_processors = None # We need the CSRF processor no matter what the user has in their settings, # because otherwise...
bsd-3-clause
Aimage/shinken
libexec/notify_by_xmpp.py
17
2686
#!/usr/bin/env python # skvidal@fedoraproject.org, modified by David Laval # gplv2+ ## XMPP notification #define command{ # command_name notify-host-by-xmpp # command_line $PLUGINSDIR$/notify_by_xmpp.py -a $PLUGINSDIR$/notify_by_xmpp.ini "Host '$HOSTALIAS$' is $HOSTSTATE$ - Info : $HOSTOUTPUT$" $CONTACTEMA...
agpl-3.0
EDUlib/edx-platform
lms/djangoapps/verify_student/migrations/0006_ssoverification.py
4
2473
# Generated by Django 1.11.12 on 2018-04-11 15:20 import django.db.models.deletion import django.utils.timezone import model_utils.fields from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(set...
agpl-3.0
noahc3/PokemonGoTeamManager
libs/py/pogoapi/POGOProtos/Networking/Requests/Messages/EvolvePokemonMessage_pb2.py
16
2353
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/EvolvePokemonMessage.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _mes...
mit
MoritzS/django
django/contrib/admin/__init__.py
562
1243
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.decorators import register from django.contrib.admin.filters import ( AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter, DateFieldListFilter, Fiel...
bsd-3-clause
samatdav/zulip
tools/lib/test_server.py
3
3335
from __future__ import print_function import os import subprocess import sys import time from contextlib import contextmanager if False: from typing import (Any, Iterator) try: import django import requests except ImportError as e: print("ImportError: {}".format(e)) print("You need to run the Zu...
apache-2.0
BaesFr/Sick-Beard
lib/hachoir_metadata/qt/dialog_ui.py
94
2439
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'hachoir_metadata/qt/dialog.ui' # # Created: Mon Jul 26 03:10:06 2010 # by: PyQt4 UI code generator 4.7.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Form(object): def setupUi(s...
gpl-3.0