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
MobSF/Mobile-Security-Framework-MobSF
mobsf/DynamicAnalyzer/views/android/frida_server_download.py
2
2270
# -*- coding: utf_8 -*- """Download Frida Server.""" import logging from pathlib import Path from lzma import LZMAFile from shutil import copyfileobj import requests from django.conf import settings from mobsf.MobSF.utils import ( is_internet_available, upstream_proxy, ) logger = logging.getLogger(__name__...
gpl-3.0
knehez/edx-platform
lms/djangoapps/shoppingcart/tests/test_payment_fake.py
147
4130
""" Tests for the fake payment page used in acceptance tests. """ from django.test import TestCase from shoppingcart.processors.CyberSource2 import sign, verify_signatures from shoppingcart.processors.exceptions import CCProcessorSignatureException from shoppingcart.tests.payment_fake import PaymentFakeView from colle...
agpl-3.0
andreif/django
django/contrib/messages/storage/cookie.py
471
6545
import json from django.conf import settings from django.contrib.messages.storage.base import BaseStorage, Message from django.http import SimpleCookie from django.utils import six from django.utils.crypto import constant_time_compare, salted_hmac from django.utils.safestring import SafeData, mark_safe class Message...
bsd-3-clause
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/lxml/ElementInclude.py
121
7641
# # ElementTree # $Id: ElementInclude.py 1862 2004-06-18 07:31:02Z Fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware...
mit
Habitissimo/vespapp-web
vespapp/settings.py
1
4155
""" Django settings for vespapp project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ from decouple...
gpl-3.0
brandones/shell
docs/conf.py
3
6993
# -*- coding: utf-8 -*- # # shell documentation build configuration file, created by # sphinx-quickstart on Sun Jun 2 12:36:25 2013. # # 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. # # All c...
bsd-3-clause
chongtianfeiyu/kbengine
kbe/src/lib/python/Lib/encodings/cp857.py
272
33908
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.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_map) def decode(self,input,errors='strict'): ...
lgpl-3.0
wemanuel/smry
ee/ee_number.py
9
1597
#!/usr/bin/env python """A wrapper for numbers.""" import numbers import apifunction import computedobject import ee_exception # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name class Number(computedobject.ComputedObject): """An object to represent numbers.""" _ini...
apache-2.0
slohse/ansible
lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py
22
4673
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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...
gpl-3.0
iam-TJ/node-gyp
gyp/test/configurations/invalid/gyptest-configurations.py
57
1029
#!/usr/bin/env python # Copyright (c) 2010 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 build of an executable in three different configurations. """ import TestGyp # Keys that do not belong inside a configuration...
mit
masschallenge/django-accelerator
accelerator/tests/contexts/judge_feedback_context.py
1
13749
from accelerator_abstract.models import ( FORM_ELEM_FEEDBACK_TO_MC, FORM_ELEM_FEEDBACK_TO_STARTUP, FORM_ELEM_OVERALL_RECOMMENDATION, ) from accelerator.models import ( ACTIVE_PROGRAM_STATUS, ASSIGNED_PANEL_ASSIGNMENT_STATUS, COMPLETE_PANEL_ASSIGNMENT_STATUS, FEEDBACK_DISPLAY_DISABLED as DIS...
mit
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.5.0/Lib/test/test_json/test_encode_basestring_ascii.py
19
2266
from collections import OrderedDict from test.test_json import PyTest, CTest from test.support import bigaddrspacetest CASES = [ ('/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',...
mit
jeffrey4l/nova
nova/tests/unit/virt/hyperv/test_vmutilsv2.py
22
11681
# Copyright 2014 Cloudbase Solutions Srl # # 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 ...
apache-2.0
mapennell/ansible
plugins/inventory/windows_azure.py
129
8636
#!/usr/bin/env python ''' Windows Azure external inventory script ======================================= Generates inventory that Ansible can understand by making API request to Windows Azure using the azure python library. NOTE: This script assumes Ansible is being executed where azure is already installed. p...
gpl-3.0
samanehsan/osf.io
tests/webtest_tests.py
5
35201
#!/usr/bin/env python # -*- coding: utf-8 -*- """Functional tests using WebTest.""" import httplib as http import logging import mock import re import unittest import markupsafe from nose.tools import * # flake8: noqa (PEP8 asserts) from framework.mongo.utils import to_mongo_key from framework.auth import exceptions...
apache-2.0
jsteemann/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_strftime.py
56
6967
""" Unittest for time.strftime """ import calendar import sys import os import re from test import test_support import time import unittest # helper functions def fixasctime(s): if s[8] == ' ': s = s[:8] + '0' + s[9:] return s def escapestr(text, ampm): """ Escape text to deal with possible ...
apache-2.0
ingadhoc/odoo-addons
stock_transfer_restrict_lot/__openerp__.py
4
1586
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
doomsterinc/odoo
addons/account/wizard/account_report_general_ledger.py
267
3191
# -*- 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...
agpl-3.0
tomcounsell/Cobra
apps/public/urls.py
2
2201
from django.conf.urls import url from views import home, checkout, product, store, custom_order, cart, manual_checkout urlpatterns = [ #homepage url defined in anou/urls.py url(r'^load_products$', home.loadProducts, name='load products'), url(r'^about$', home.about, name='about'), # PRODUCT PAGE at /product...
gpl-2.0
peterayeni/libforensics
code/lf/win/guid.py
13
1647
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics 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 3 of the License, or # (at your option) any later ver...
lgpl-3.0
superbatlc/dtailweb
phonegroups/migrations/0001_initial.py
1
1870
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('systems', '0001_initial'), ('calls', '0001_initial'), ] operations = [ migrations.CreateModel( name='Pho...
gpl-2.0
hiraditya/fool
tensorflow/scaling-up-ml-using-cmle.py
1
6449
''' In this lab, you will learn how to: Package up TensorFlow model Run training locally Run training on cloud Deploy model to cloud Invoke model to carry out predictions ''' ''' Scaling up ML using Cloud ML Engine In this notebook, we take a previously developed TensorFlow model to predict taxi...
mit
wangyixiaohuihui/spark2-annotation
python/pyspark/mllib/stat/_statistics.py
1
13703
# # 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 n...
apache-2.0
Avinash-Raj/appengine-django-skeleton
lib/django/contrib/gis/db/backends/spatialite/introspection.py
391
3131
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import ( DatabaseIntrospection, FlexibleFieldLookupDict, ) from django.utils import six class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_reverse` ...
bsd-3-clause
xin3liang/platform_external_chromium-trace
trace-viewer/third_party/python_gflags/setup.py
376
1991
#!/usr/bin/env python # Copyright (c) 2007, 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 l...
bsd-3-clause
kost/volatility
volatility/plugins/mac/procdump.py
12
3039
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
e-koch/VLA_Lband
14B-088/Cal_Scripts/EVLA_pipeline1.3.0/EVLA_pipe_testBPdcals.py
2
21896
###################################################################### # # Copyright (C) 2013 # Associated Universities, Inc. Washington DC, USA, # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published by # the Free Software Fo...
mit
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/enums/types/lead_form_desired_intent.py
1
1209
# -*- 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...
apache-2.0
Asana/boto
tests/integration/s3/test_bucket.py
11
12500
# -*- coding: utf-8 -*- # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # 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 # witho...
mit
GioneeDevTeam/android_kernel_gionee_msm8974
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
leilihh/cinder
cinder/api/contrib/hosts.py
11
10321
# Copyright (c) 2011 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 # # Unless ...
apache-2.0
JshWright/home-assistant
tests/util/test_yaml.py
6
15572
"""Test Home Assistant yaml loader.""" import io import os import unittest from unittest.mock import patch from homeassistant.exceptions import HomeAssistantError from homeassistant.util import yaml from homeassistant.config import YAML_CONFIG_FILE, load_yaml_config_file from tests.common import get_test_config_dir, p...
apache-2.0
pblottiere/QGIS
tests/src/python/test_qgspallabeling_placement.py
29
55022
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsPalLabeling: base suite of render check tests Class is meant to be inherited by classes that test different labeling outputs See <qgis-src-dir>/tests/testdata/labeling/README.rst for description. .. note:: This program is free software; you can redistribute it and/or...
gpl-2.0
jabez1314/youtube-dl
youtube_dl/extractor/nrk.py
83
10884
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, parse_duration, unified_strdate, ) class NRKIE(InfoExtractor): _VALID_URL = r'(?:nrk:|https?://(?:www\.)?nrk\.no/video/PS\*)(?P<id>\d+)' ...
unlicense
kevinge314gh/tornado
tornado/test/util.py
61
2881
from __future__ import absolute_import, division, print_function, with_statement import os import platform import socket import sys import textwrap from tornado.testing import bind_unused_port # Encapsulate the choice of unittest or unittest2 here. # To be used as 'from tornado.test.util import unittest'. if sys.ver...
apache-2.0
praekelt/jmbo-twitter
jmbo_twitter/models.py
1
5204
import datetime, twitter from urllib2 import URLError import logging from django.db import models from django.core.cache import cache from django.utils.translation import ugettext_lazy as _ from django.conf import settings from jmbo.models import ModelBase logger = logging.getLogger('django') class Status(ModelBa...
bsd-3-clause
steventimberman/masterDebater
venv/lib/python2.7/site-packages/django/utils/numberformat.py
63
2568
from __future__ import unicode_literals from decimal import Decimal from django.conf import settings from django.utils import six from django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='', force_grouping=False): """ Gets a number (...
mit
floxard/folly
folly/test/gtest/googletest/test/gtest_test_utils.py
344
10823
#!/usr/bin/env python # # Copyright 2006, 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...
apache-2.0
ronas/PythonGNF
Fabulao/PedidosCapa.py
1
3001
# -*- coding: latin -*- import sys #from PyQt5 import QtGui, QtCore, QtWidgets #, QTableWidget, QTableWidgetItem from PyQt5.QtWidgets import QApplication, QWidget, QTableWidget, QTableWidgetItem, QLineEdit, QLabel from PyQt5.QtCore import QSize, Qt import pymysql config = { 'host': 'localhost', 'port': 330...
gpl-3.0
wujuguang/sentry
src/sentry/migrations/0030_auto__add_view__chg_field_event_group.py
36
12673
# encoding: utf-8 import datetime import sentry from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'View' db.create_table('sentry_view', ( ('id', self.gf('sentry.db.models....
bsd-3-clause
mick-d/nipype
nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py
1
1144
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..utils import ExtractMainComponent def test_ExtractMainComponent_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=T...
bsd-3-clause
annarev/tensorflow
tensorflow/python/kernel_tests/random/random_gamma_test.py
23
9049
# 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
LLNL/spack
var/spack/repos/builtin/packages/libdap4/package.py
5
1379
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libdap4(AutotoolsPackage): """ libdap4 is is a c++ library to serve as a client for th...
lgpl-2.1
caronc/newsreap
newsreap/Logging.py
1
6395
# -*- coding: utf-8 -*- # # Common Logging Parameters and Defaults # # Copyright (C) 2015-2017 Chris Caron <lead2gold@gmail.com> # # This program 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 v...
gpl-3.0
benchisell/curate_flask_appengine
lib/wtforms/ext/appengine/fields.py
51
7822
from __future__ import unicode_literals import decimal import operator import warnings from wtforms import fields, widgets from wtforms.compat import text_type, string_types class ReferencePropertyField(fields.SelectFieldBase): """ A field for ``db.ReferenceProperty``. The list items are rendered in a s...
apache-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/load_balancer_load_balancing_rules_operations.py
1
7995
# 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 ...
mit
mou4e/zirconium
third_party/cython/src/Cython/Distutils/build_ext.py
94
12955
"""Cython.Distutils.build_ext Implements a version of the Distutils 'build_ext' command, for building Cython extension modules.""" # This module should be kept compatible with Python 2.3. __revision__ = "$Id:$" import sys import os import re from distutils.core import Command from distutils.errors import DistutilsP...
bsd-3-clause
RedhawkSDR/integration-gnuhawk
components/fll_band_edge_cc_4o/tests/test_fll_band_edge_cc_4o.py
1
4545
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by ...
gpl-3.0
drakuna/odoo
addons/website_sale/models/product.py
3
9392
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import openerp from openerp import tools from openerp.osv import osv, fields class product_style(osv.Model): _name = "product.style" _columns = { 'name' : fields.char('Style Name', required=True), ...
gpl-3.0
uranusjr/django
tests/template_tests/syntax_tests/test_width_ratio.py
56
5956
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class WidthRatioTagTests(SimpleTestCase): libraries = {'custom': 'template_tests.templatetags.custom'} @setup({'widthratio01': '{% widthratio a b 0 %}'}) def test_widthratio01(self): ...
bsd-3-clause
Mirantis/octane
octane/commands/sync_images.py
1
2791
# 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...
apache-2.0
Wolnosciowiec/file-repository
client/bahub/bahubapp/handler/__init__.py
1
4733
from ..entity.definition import BackupDefinition from ..service.client import FileRepositoryClient from ..service.pipefactory import PipeFactory from ..exceptions import ReadWriteException from ..result import CommandExecutionResult from logging import Logger import string import random import subprocess from shutil im...
lgpl-3.0
arafsheikh/coala
coalib/misc/Shell.py
10
4385
from contextlib import contextmanager from subprocess import PIPE, Popen from coalib.parsing.StringProcessing import escape @contextmanager def run_interactive_shell_command(command, **kwargs): """ Runs a command in shell and provides stdout, stderr and stdin streams. This function creates a context man...
agpl-3.0
phaseout/ircbot-collection
botcommon.py
6
1153
"""\ Common bits and pieces used by the various bots. """ import sys import os import time from threading import Thread, Event class OutputManager(Thread): def __init__(self, connection, delay=.5): Thread.__init__(self) self.setDaemon(1) self.connection = connection self.delay = delay self.even...
gpl-2.0
alexm92/sentry
src/sentry/south_migrations/0008_auto__chg_field_message_view__add_field_groupedmessage_data__chg_field.py
36
5375
# 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 'Message.view' db.alter_column('sentry_message', 'view', self.gf('django.db.models.fields.CharFie...
bsd-3-clause
bluedazzle/flask
tests/test_config.py
139
5543
# -*- coding: utf-8 -*- """ tests.test_config ~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Flask Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import pytest import os import flask # config keys used for the TestConfig TEST_KEY = 'foo' SECRET_KEY = 'devkey' ...
bsd-3-clause
Carmezim/tensorflow
tensorflow/contrib/keras/python/keras/preprocessing/image.py
25
39384
# 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
thomas1206/azure-linux-extensions
DSC/azure/__init__.py
46
33598
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apac...
apache-2.0
fpy171/django
tests/extra_regress/tests.py
130
16198
from __future__ import unicode_literals import datetime from collections import OrderedDict from django.contrib.auth.models import User from django.test import TestCase from .models import Order, RevisionableModel, TestObject class ExtraRegressTests(TestCase): def setUp(self): self.u = User.objects.cr...
bsd-3-clause
fishcorn/pylearn2
pylearn2/scripts/tutorials/jobman_demo/utils.py
44
1560
from __future__ import print_function import numpy from jobman import tools from jobman.tools import DD def log_uniform(low, high): """ Generates a number that's uniformly distributed in the log-space between `low` and `high` Parameters ---------- low : float Lower bound of the rando...
bsd-3-clause
meppe/ros-ort
src/frcnn/src/lib/setup.py
11
5665
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os from os.path import join as pjoin from setuptools import setu...
gpl-3.0
etashjian/ECE757-final
src/arch/micro_asm_test.py
86
3195
# Copyright (c) 2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
e2/googlemock
scripts/generator/cpp/keywords.py
1157
2004
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions 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...
bsd-3-clause
benthomasson/ansible
lib/ansible/module_utils/azure_rm_common.py
16
27094
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # 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, eit...
gpl-3.0
scorpionis/docklet
client/venv/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py
436
5992
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
bsd-3-clause
eXistenZNL/SickRage
lib/sqlalchemy/sql/elements.py
75
117708
# sql/elements.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core SQL expression elements, including :class:`.ClauseElement`, :class:`.ColumnEle...
gpl-3.0
tanmaykm/thrift
lib/py/src/TSerialization.py
111
1389
# # 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...
apache-2.0
Saevon/saevon.github.io
plugins/jinja2/__init__.py
1
1409
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import unicode_literals from itertools import chain from plugins.jinja2.debug_dump import dump, dump_all, dump_file, dump_url from plugins.jinja2.category import find_category, category_preview_articles, mark from plugins.jinja2.article import is_untold from ...
mit
roadmapper/ansible
lib/ansible/modules/storage/purestorage/purefa_snap.py
38
6774
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Simon Dodsley (simon@purestorage.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1',...
gpl-3.0
Sodki/ansible
lib/ansible/utils/module_docs_fragments/auth_basic.py
152
1297
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
vmindru/ansible
lib/ansible/modules/cloud/amazon/iam_policy.py
54
13964
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
vmindru/ansible
lib/ansible/modules/network/cnos/cnos_save.py
52
3609
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, Inc. # # 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 Licens...
gpl-3.0
kuiche/chromium
third_party/scons/scons-local/SCons/Tool/msvs.py
3
68498
"""SCons.Tool.msvs Tool-specific initialization for Microsoft Visual Studio project files. 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, 2006, 2007, 2008, 20...
bsd-3-clause
coderbone/SickRage
lib/hachoir_metadata/register.py
67
6975
from hachoir_core.i18n import _ from hachoir_core.tools import ( humanDuration, humanBitRate, humanFrequency, humanBitSize, humanFilesize, humanDatetime) from hachoir_core.language import Language from hachoir_metadata.filter import Filter, NumberFilter, DATETIME_FILTER from datetime import date, datetime, ...
gpl-3.0
aerokappa/SantaClaus
handCodedOptimum_v4.py
1
2216
import numpy as np import pandas as pd from processInput import processInput def handCodedOptimum_v4 ( ): fileName = 'gifts.csv' giftList, giftListSummary = processInput( fileName ) packedBags = [] for i in np.arange(1000): print i currentBag = [] i...
mit
Jbonnett/Mutagen-flo
mutagen/ogg.py
1
17770
# Copyright 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $Id: ogg.py 3975 2007-01-13 21:51:17Z piman $ """Read and write Ogg bitstreams and pages. This mo...
gpl-2.0
albertomurillo/ansible
lib/ansible/modules/cloud/cloudstack/cs_domain.py
30
6616
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported_by': 'com...
gpl-3.0
mSenyor/sl4a
python/src/Demo/threads/squasher.py
48
3038
# Coroutine example: general coroutine transfers # # The program is a variation of a Simula 67 program due to Dahl & Hoare, # (Dahl/Dijkstra/Hoare, Structured Programming; Academic Press, 1972) # who in turn credit the original example to Conway. # # We have a number of input lines, terminated by a 0 byte. The proble...
apache-2.0
Kast0rTr0y/ansible
test/units/plugins/connection/test_netconf.py
60
3533
# # (c) 2016 Red Hat Inc. # # 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 d...
gpl-3.0
krischer/python-future
src/libpasteurize/fixes/fix_metaclass.py
61
3268
u""" Fixer for (metaclass=X) -> __metaclass__ = X Some semantics (see PEP 3115) may be altered in the translation.""" from lib2to3 import fixer_base from lib2to3.fixer_util import Name, syms, Node, Leaf, Newline, find_root from lib2to3.pygram import token from libfuturize.fixer_util import indentation, suitify # from ...
mit
franramirez688/common
edition/parsing/python/python_ast.py
5
1576
import ast import _ast class PythonAst(ast.NodeVisitor): PYTHON_C_MODULE = 'link_clib' def __init__(self): self.objects = [] self.c_includes = [] self.hasmain = False def generic_visit(self, node): ast.NodeVisitor.generic_visit(self, node) def visit_Import(self, no...
mit
kawamon/hue
desktop/core/ext-py/dnspython-1.15.0/tests/test_rdtypeanyeui.py
4
9292
# Copyright (C) 2015 Red Hat, Inc. # Author: Petr Spacek <pspacek@redhat.com> # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # #...
apache-2.0
charbeljc/OCB
addons/account_followup/tests/__init__.py
261
1088
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
dhenrygithub/QGIS
python/plugins/processing/algs/lidar/lastools/lasoverage.py
3
3197
# -*- coding: utf-8 -*- """ *************************************************************************** lasoverage.py --------------------- Date : September 2013 Copyright : (C) 2013 by Martin Isenburg Email : martin near rapidlasso point com **************...
gpl-2.0
mokshaproject/moksha
moksha.common/moksha/common/lib/cache.py
2
1568
# This file is part of Moksha. # Copyright (C) 2008-2010 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 b...
apache-2.0
tjanez/ansible
lib/ansible/modules/network/eos/eos_system.py
8
11370
#!/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...
gpl-3.0
msingh172/youtube-dl
youtube_dl/extractor/aljazeera.py
95
1253
from __future__ import unicode_literals from .common import InfoExtractor class AlJazeeraIE(InfoExtractor): _VALID_URL = r'http://www\.aljazeera\.com/programmes/.*?/(?P<id>[^/]+)\.html' _TEST = { 'url': 'http://www.aljazeera.com/programmes/the-slum/2014/08/deliverance-201482883754237240.html', ...
unlicense
luiseduardohdbackup/odoo
addons/l10n_uy/__init__.py
438
1070
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Openerp.uy <openerp.uy@lists.launchpad.net> # Proyecto de Localización de OperERP para Uruguay # $Id$ # # This program i...
agpl-3.0
pilou-/ansible
lib/ansible/modules/network/ftd/ftd_configuration.py
45
5075
#!/usr/bin/python # Copyright (c) 2018 Cisco and/or its affiliates. # # 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 ...
gpl-3.0
marcli/sos
sos/plugins/radius.py
12
1735
# Copyright (C) 2007 Navid Sheikhol-Eslami <navid@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This p...
gpl-2.0
wwj718/murp-edx
common/djangoapps/django_comment_common/migrations/0001_initial.py
188
6980
# -*- coding: utf-8 -*- from south.v2 import SchemaMigration class Migration(SchemaMigration): # # cdodge: This is basically an empty migration since everything has - up to now - managed in the django_comment_client app # But going forward we should be using this migration # def forwards(self, orm): pass ...
agpl-3.0
j-carpentier/nova
nova/tests/unit/virt/libvirt/test_imagebackend.py
13
65039
# Copyright 2012 Grid Dynamics # 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...
apache-2.0
kervi/kervi
kervi-core/kervi/core/utility/kervi_logging.py
1
2921
#Copyright 2016 Tim Wentlau. #Distributed under the MIT License. See LICENSE in root of project. """ Module that holds log functionality. In general you dont need to include this in your kervi code as the spine class holds a reference to a fully configured log. """ import logging import logging.handlers import os VE...
mit
tquizzle/Sick-Beard
lib/hachoir_parser/archive/tar.py
90
4459
""" Tar archive parser. Author: Victor Stinner """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, Enum, UInt8, SubFile, String, NullBytes) from lib.hachoir_core.tools import humanFilesize, paddingSize, timestampUNIX from lib.hachoir_core.endian import BIG_ENDIAN import re cla...
gpl-3.0
canaltinova/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/optionaltags.py
1727
10500
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
mpl-2.0
j00bar/ansible
lib/ansible/modules/web_infrastructure/jenkins_script.py
15
5365
#!/usr/bin/python # encoding: utf-8 # (c) 2016, James Hogarth <james.hogarth@gmail.com> # # 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 Li...
gpl-3.0
combust-ml/mleap
python/tests/pyspark/feature/math_binary_test.py
2
6892
import math import os import shutil import tempfile import unittest import mleap.pyspark # noqa from mleap.pyspark.spark_support import SimpleSparkSerializer # noqa import pandas as pd from pandas.testing import assert_frame_equal from pyspark.ml import Pipeline from pyspark.sql.types import FloatType from pyspark....
apache-2.0
nvie/python-mode
pymode/libs3/rope/base/oi/runmod.py
28
7804
def __rope_start_everything(): import os import sys import socket import pickle import marshal import inspect import types import threading class _MessageSender(object): def send_data(self, data): pass class _SocketSender(_MessageSender): def __in...
lgpl-3.0
jcpowermac/ansible
lib/ansible/modules/network/avi/avi_sslprofile.py
15
8059
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
jasonabele/gnuradio
gr-trellis/doc/make_numbered_listing.py
32
1196
#!/usr/bin/env python import sys import os, os.path from optparse import OptionParser def quote_line (line): line = line.replace ('&', '&amp;') line = line.replace ('<', '&lt;') line = line.replace ('>', '&gt;') line = line.replace ("'", '&apos;') line = line.replace ('"', '&quot;') return lin...
gpl-3.0