repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
pakit/pakit_tests
tests/test_pakit_tests.py
3
3612
""" Test pakit_tests """ from __future__ import absolute_import, print_function import os import tempfile import mock import pytest from pakit_tests import ( create_args_parser, extract_repo_names, extract_repo_block, main, scan_recipes, format_lines, write_file, TEMPLATE ) import tests.common as tc def test...
bsd-3-clause
guedou/scapy-codecov
scapy/layers/rtp.py
11
1434
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ RTP (Real-time Transport Protocol). """ from scapy.packet import * from scapy.fields import * _rtp_payload_types = ...
gpl-2.0
pelorusjack/BlockDX
qa/rpc-tests/keypool.py
166
4265
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the wallet keypool, and interaction with wallet encryption/locking # Add python-bitcoinrpc to modu...
mit
Omicia/omicia_api_examples
python/ClinicalReportLaunchers/download_report_variants.py
1
1938
""" Get a clinical report selected variants, this only works for non-panel reports """ import os import requests from requests.auth import HTTPBasicAuth import sys import simplejson as json import argparse # Load environment variables for request authentication parameters if "FABRIC_API_PASSWORD" not in os.environ: ...
mit
matrogers/pylearn2
pylearn2/models/tests/test_dbm.py
44
37752
from __future__ import print_function from pylearn2.models.dbm.dbm import DBM from pylearn2.models.dbm.layer import BinaryVector, BinaryVectorMaxPool, Softmax, GaussianVisLayer __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2012, Universite de Montreal" __credits__ = ["Ian Goodfellow", "Devon Hjelm"] __lic...
bsd-3-clause
tumbl3w33d/ansible
lib/ansible/modules/network/check_point/cp_mgmt_dns_domain_facts.py
20
4158
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage Check Point Firewall (c) 2019 # # 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 o...
gpl-3.0
chyeh727/django
tests/template_tests/syntax_tests/test_with.py
391
2245
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class WithTagTests(SimpleTestCase): @setup({'with01': '{% with key=dict.key %}{{ key }}{% endwith %}'}) def test_with01(self): output = self.engine.render_to_string('with01', {'dict': {'k...
bsd-3-clause
credativUK/OCB
addons/point_of_sale/report/pos_receipt.py
53
3031
# -*- 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
joone/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/common/system/path.py
191
5046
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
wdzhou/mantid
Framework/PythonInterface/plugins/algorithms/StatisticsOfTableWorkspace.py
2
2524
#pylint: disable=no-init from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, AlgorithmFactory, ITableWorkspaceProperty from mantid.kernel import Direction, Stats import mantid.simpleapi as ms from mantid import mtd, logger import numpy as np from six import iterit...
gpl-3.0
poiesisconsulting/openerp-restaurant
project_issue/__init__.py
433
1131
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
kun--hust/libcloud_with_cn
libcloud/utils/publickey.py
55
2437
# 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 use ...
apache-2.0
itai12312/workspaces
hellodjango/venv/lib/python2.7/site-packages/psycopg2/tests/test_psycopg2_dbapi20.py
71
1932
#!/usr/bin/env python # test_psycopg2_dbapi20.py - DB API conformance test for psycopg2 # # Copyright (C) 2006-2011 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Softwa...
gpl-2.0
coxley/ansible
lib/ansible/plugins/lookup/nested.py
58
2155
# (c) 2012, Michael DeHaan <michael.dehaan@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 License, or # (at your option) any lat...
gpl-3.0
OpenOil-UG/aleph
aleph/assets.py
1
2245
import os from flask.ext.assets import Bundle from aleph.core import assets base_assets = Bundle( # include via CDN # 'vendor/jquery/dist/jquery.js', 'vendor/moment/moment.js', 'vendor/pdfjs-dist/build/pdf.js', 'vendor/pdfjs-dist/build/pdf.worker.js', filters='uglifyjs', output='assets/bas...
mit
saurabh6790/test-erp
erpnext/tests/sel_tests.py
81
2550
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt """ Run Selenium Tests Requires a clean install. After reinstalling fresh db, call frappe --execute erpnext.tests.sel_tests.start """ from __future__ import unicode_literals import frappe...
agpl-3.0
bakhtout/odoo-educ
doc/_themes/odoodoc/__init__.py
90
1063
# -*- coding: utf-8 -*- from . import html_domain from . import github # add Odoo style to pygments from . import odoo_pygments from . import sphinx_monkeypatch sphinx_monkeypatch.patch() def setup(app): html_domain.setup(app) github.setup(app) app.add_directive('exercise', Exercise) app.add_node(exe...
agpl-3.0
Moriadry/tensorflow
tensorflow/contrib/kernel_methods/python/losses.py
31
5600
# 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
salfab/CouchPotatoServer
libs/sqlalchemy/ext/hybrid.py
18
27199
# ext/hybrid.py # Copyright (C) 2005-2013 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 """Define attributes on ORM-mapped classes that have "hybrid" behavior. "hybrid" means ...
gpl-3.0
tjwei/jedi
jedi/evaluate/compiled/fake.py
34
4068
""" Loads functions that are mixed in to the standard library. E.g. builtins are written in C (binaries), but my autocompletion only understands Python code. By mixing in Python code, the autocompletion should work much better for builtins. """ import os import inspect from jedi._compatibility import is_py3, builtins...
mit
amenonsen/ansible
lib/ansible/modules/system/runit.py
43
8633
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Brian Coca <bcoca@ansible.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...
gpl-3.0
GetSomeBlocks/ServerStatus
resources/lib/twisted/twisted/test/test_reflector.py
61
12973
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for twisted.enterprise reflectors. """ import random from twisted.internet import reactor, interfaces, defer from twisted.enterprise.row import RowObject from twisted.enterprise.reflector import EQUAL from twisted.enterprise....
mit
EntilZha/qb
guesser/util/gen_util.py
1
1296
from numpy import * def unroll_params(arr, d, len_voc, deep=1): mat_size = d * d ind = 0 params = [] for i in range(0, deep): params.append(arr[ind : ind + mat_size].reshape( (d, d) )) ind += mat_size params.append(arr[ind : ind + d].reshape( (d, 1) )) ind ...
mit
briancoutinho0905/2dsampling
src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py
91
3311
# 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
nesterione/scikit-learn
sklearn/feature_selection/rfe.py
137
17066
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Vincent Michel <vincent.michel@inria.fr> # Gilles Louppe <g.louppe@gmail.com> # # License: BSD 3 clause """Recursive feature elimination for feature ranking""" import warnings import numpy as np from ..utils import check_X_y, safe_sqr fro...
bsd-3-clause
dhoffman34/django
django/templatetags/tz.py
236
5624
from datetime import datetime, tzinfo try: import pytz except ImportError: pytz = None from django.template import Node from django.template import TemplateSyntaxError, Library from django.utils import six from django.utils import timezone register = Library() # HACK: datetime is an old-style class, create...
bsd-3-clause
erjohnso/ansible
lib/ansible/modules/cloud/ovirt/ovirt_auth.py
34
9457
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
zorroblue/scikit-learn
sklearn/linear_model/bayes.py
5
19797
""" Various bayesian regression """ from __future__ import print_function # Authors: V. Michel, F. Pedregosa, A. Gramfort # License: BSD 3 clause from math import log import numpy as np from scipy import linalg from scipy.linalg import pinvh from .base import LinearModel from ..base import RegressorMixin from ..util...
bsd-3-clause
MichaelDoyle/Diamond
setup.py
3
5246
#!/usr/bin/env python # coding=utf-8 import sys import os from glob import glob import platform def running_under_virtualenv(): if hasattr(sys, 'real_prefix'): return True elif sys.prefix != getattr(sys, "base_prefix", sys.prefix): return True if os.getenv('VIRTUAL_ENV', False): r...
mit
google/iree
integrations/tensorflow/e2e/fill_test.py
1
1153
# Copyright 2020 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception from absl import app from iree.tf.support import tf_test_utils import numpy as np import tensorflow.co...
apache-2.0
auferack08/edx-platform
common/djangoapps/embargo/middleware.py
18
4226
"""Middleware for embargoing site and courses. IMPORTANT NOTE: This code WILL NOT WORK if you have a misconfigured proxy server. If you are configuring embargo functionality, or if you are experiencing mysterious problems with embargoing, please check that your reverse proxy is setting any of the well known client IP...
agpl-3.0
BretStateham/connectthedots
Devices/GatewayConnectedDevices/BluetoothUARTExample/SetupSerialBaudRate.py
16
3049
''' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. The MIT License (MIT) 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 limitati...
mit
ccnmtl/diabeaters
media/js/mochikit/scripts/build.py
4
3484
#!/usr/bin/env python execfile('scripts/make_docs.py') execfile('scripts/pack.py') import os import sys import glob import zipfile import re def json_encode(o, indent=0): if isinstance(o, dict): if len(o) == 0: yield '{}' else: yield '{\n' first = True ...
gpl-2.0
googleapis/python-bigtable
google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py
1
18366
# -*- 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
c0710204/mirrorsBistu
pypi/bandersnatch/lib/python2.7/site-packages/setuptools/command/test.py
285
5932
from setuptools import Command from distutils.errors import DistutilsOptionError import sys from pkg_resources import * from pkg_resources import _namespace_packages from unittest import TestLoader, main class ScanningLoader(TestLoader): def loadTestsFromModule(self, module): """Return a suite of all test...
mit
heitorlessa/serverless-encryption-workshop
lab4/compiled_lib/Crypto/Random/Fortuna/FortunaGenerator.py
125
5265
# -*- coding: ascii -*- # # FortunaGenerator.py : Fortuna's internal PRNG # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the publi...
apache-2.0
wikimedia/operations-debs-python-dotted
dotted/collection.py
2
11349
# -*- coding: utf-8 -*- import collections import json import re from abc import ABCMeta, abstractmethod from six import add_metaclass, string_types as basestring, iteritems SPLIT_REGEX = r"(?<!\\)(\.)" def is_dotted_key(key): """Returns True if the key has any not-escaped dot inside""" return len(re.fin...
mit
republic-analytics/luigi
test/execution_summary_test.py
5
38793
# -*- coding: utf-8 -*- # # Copyright 2015-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
Omegaphora/external_chromium_org
tools/telemetry/telemetry/value/list_of_scalar_values_unittest.py
29
5972
# 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 os import unittest from telemetry import value from telemetry.page import page_set from telemetry.value import list_of_scalar_values from telemetry.va...
bsd-3-clause
zetalabs/linux-3.4-clover
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
brentp/combined-pvalues
cpv/qvality.py
1
3222
""" qvality must be on the $PATH. run on a file with pvalues in column 4: $ python qvality.py --column 4 input.bed > output.bed output file will have extra columns for PEP (posterior error prob) and q-value. if input.bed has a header, it is retained. TODO: handle null via --null [column_number] """ from __future...
mit
TomBaxter/osf.io
addons/base/testing/models.py
5
22183
# -*- coding: utf-8 -*- import abc import mock from django.utils import timezone from framework.auth import Auth from framework.exceptions import HTTPError from nose.tools import * # noqa (PEP8 asserts) from osf_tests.factories import ProjectFactory, UserFactory from tests.utils import mock_auth from addons.base impo...
apache-2.0
WoLpH/kombu
examples/simple_eventlet_send.py
2
1217
""" Example that sends a single message and exits using the simple interface. You can use `simple_receive.py` (or `complete_receive.py`) to receive the message sent. """ import eventlet from kombu import BrokerConnection eventlet.monkey_patch() def send_many(n): #: Create connection #: If hostname, user...
bsd-3-clause
philsch/ansible
test/units/modules/network/netscaler/test_netscaler_module_utils.py
55
5719
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
gpl-3.0
fubecka/f5-dashboard
flask/lib/python2.6/site-packages/sqlalchemy/orm/instrumentation.py
21
16787
# orm/instrumentation.py # Copyright (C) 2005-2015 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 """Defines SQLAlchemy's system of class instrumentation. This module is usua...
apache-2.0
petrutlucian94/nova_dev
nova/tests/api/openstack/compute/plugins/v3/test_extended_status.py
16
4602
# Copyright 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 requ...
apache-2.0
15Mpedia/15Mpedia-scripts
fusilados-edad-infobox.py
1
2218
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2018 emijrp <emijrp@gmail.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 3 of the License, or # (at your optio...
gpl-3.0
Unrepentant-Atheist/mame
3rdparty/googletest/googletest/test/gtest_output_test.py
363
12259
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-2.0
caphrim007/ansible
lib/ansible/modules/network/cloudengine/ce_info_center_trap.py
43
25017
#!/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
KAMI911/loec
examples/Sharpen/binaries-windows-python25/GimpPaletteFile.py
3
1453
# # Python Imaging Library # $Id: GimpPaletteFile.py 2134 2004-10-06 08:55:20Z fredrik $ # # stuff to read GIMP palette files # # History: # 1997-08-23 fl Created # 2004-09-07 fl Support GIMP 2.0 palette files. # # Copyright (c) Secret Labs AB 1997-2004. All rights reserved. # Copyright (c) Fredrik ...
gpl-3.0
yyjiang/scikit-learn
sklearn/ensemble/tests/test_voting_classifier.py
40
6991
"""Testing for the boost module (sklearn.ensemble.boost).""" import numpy as np from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.linear_model import LogisticRegression from sklearn.naive_bayes import GaussianNB from sklearn.ensemble import RandomForestCl...
bsd-3-clause
Cocophotos/ycmd
ycmd/server_utils.py
19
1528
#!/usr/bin/env python # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
gpl-3.0
xyproto/turbine
djl/libs/SOAPpy/Errors.py
1
2859
""" ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (Gregory.R.Warnes@Pfizer.com) # Christopher Blunck (blunck@gst.com) # ##########################...
gpl-3.0
worldofseries/wos.repositorio
update/addons_xml_generator.py
133
4259
# * # * Copyright (C) 2012-2013 Garrett Brown # * Copyright (C) 2010 j48antialias # * # * 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, or (at your option) # * a...
gpl-2.0
texcaltech/windmilltownhomes-old
django/contrib/databrowse/plugins/calendars.py
247
4317
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.text import capfirst from django.utils.encoding import force_unicode from dja...
bsd-3-clause
aroth-arsoft/trac-timingandestimation
timingandestimationplugin/api.py
1
11750
import re import dbhelper import time from tande_filters import * from ticket_daemon import * from usermanual import * from trac.ticket import ITicketChangeListener, Ticket from trac.core import * from trac.env import IEnvironmentSetupParticipant from trac.perm import IPermissionRequestor, PermissionSystem from webui i...
mit
jeffdwyatt/taiga-back
taiga/projects/notifications/permissions.py
9
1192
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
ecosoft-odoo/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
384
12340
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
fzheng/codejam
lib/python2.7/site-packages/nbconvert/preprocessors/execute.py
1
8838
"""Module containing a preprocessor that removes the outputs from code cells""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os from textwrap import dedent try: from queue import Empty # Py 3 except ImportError: from Queue import Empty # Py 2 ...
mit
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib2to3/pgen2/conv.py
325
9627
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
gpl-2.0
thaumos/ansible
lib/ansible/modules/cloud/amazon/ec2_group.py
9
50426
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
ardi69/pyload-0.4.10
lib/Python/Lib/Crypto/Hash/HMAC.py
123
7302
# HMAC.py - Implements the HMAC algorithm as described by RFC 2104. # # =================================================================== # Portions Copyright (c) 2001, 2002, 2003 Python Software Foundation; # All Rights Reserved # # This file contains code from the Python 2.2 hmac.py module (the # "Original Code"), ...
gpl-3.0
NeCTAR-RC/nova
nova/tests/unit/api/openstack/compute/test_hypervisor_status.py
32
3825
# Copyright 2014 Intel 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...
apache-2.0
petruc/selenium
py/test/selenium/webdriver/support/event_firing_webdriver_tests.py
65
8213
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
fooying/Mobile-Security-Framework-MobSF
StaticAnalyzer/dvm_permissions.py
41
29574
# Androguard 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 version. # # Androguard is distributed in the hope that it will be useful, ...
gpl-3.0
jasonseminara/OpenSourceFinal
lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py
2919
2652
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
nlandolfi/test-infra-1
gubernator/view_logs.py
12
11302
# Copyright 2016 The Kubernetes Authors. # # 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 ...
apache-2.0
jacknjzhou/neutron
tools/install_venv_common.py
333
5959
# Copyright 2013 OpenStack Foundation # 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 ...
apache-2.0
ivan-fedorov/intellij-community
python/lib/Lib/distutils/command/install_scripts.py
80
2183
"""distutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.""" # contributed by Bastian Kleineidam # This module should be kept compatible with Python 2.1. __revision__ = "$Id: install_scripts.py 37828 2004-11-10 22:23:15Z loewis $" import os from distuti...
apache-2.0
Fokko/incubator-airflow
airflow/contrib/operators/azure_container_instances_operator.py
1
14281
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
Jimdo/ansible-modules-core
cloud/amazon/ec2_lc.py
18
10145
#!/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
yg257/Pangea
lib/boto-2.34.0/tests/unit/s3/test_website.py
114
9219
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
apache-2.0
shreyasvj25/caffe-utils
test_cls.py
1
1794
import numpy as np # Make sure that caffe is on the python path: caffe_root = '../caffe/' # this file is expected to be in {caffe_root}/examples import sys sys.path.insert(0, caffe_root + 'python') import caffe test_listfile = '/scratch/16824/data/testlist_class.txt' result_file = 'cls_results.txt' cmat ...
gpl-3.0
openfun/edx-platform
common/djangoapps/student/management/commands/set_staff.py
182
1442
from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError import re class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--unset', action='store_true', ...
agpl-3.0
adini121/oneanddone
oneanddone/base/helpers.py
3
2662
import datetime import urllib import urlparse from django.contrib.staticfiles.templatetags.staticfiles import static from django.conf import settings from django.template import defaultfilters from django.utils.encoding import smart_str from django.utils.html import strip_tags from jingo import register from jingo_mi...
mpl-2.0
freedesktop-unofficial-mirror/gstreamer-sdk__cerbero
cerbero/build/build.py
2
11331
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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 Foundation; eit...
lgpl-2.1
pearsonlab/nipype
nipype/interfaces/diffusion_toolkit/dti.py
10
9424
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Provides interfaces to various commands provided by diffusion toolkit Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __f...
bsd-3-clause
reverland/scripts
python/yapmg.py
1
8447
#! /bin/env python # -*- coding: utf-8 -*- ''' YAPMG -- Yet Another PhotoMosaic Generator written in Python ''' import Image import ImageOps import os import random import ImageStat import cPickle as p __author__ = "Reverland (lhtlyy@gmail.com)" def add_frame(image): '''Add frame for image.''' im = ImageO...
mit
westernx/vee
vee/pipeline/make.py
1
4276
import os from vee.pipeline.generic import GenericBuilder from vee.cli import style_note from vee.subproc import call from vee.utils import find_in_tree from vee import log class MakeBuilder(GenericBuilder): factory_priority = 1000 @classmethod def factory(cls, step, pkg): if step not ...
bsd-3-clause
sertac/django
tests/gis_tests/geoapp/models.py
47
2324
from django.utils.encoding import python_2_unicode_compatible from ..models import models from ..utils import gisfield_may_be_null @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True ...
bsd-3-clause
leekchan/tornado_test
tornado/http1connection.py
37
29753
#!/usr/bin/env python # # Copyright 2014 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 applicable law or a...
apache-2.0
yujinjcho/movie_recommendations
scrape_rotten/scrape_rotten/luigi_tasks/scrape_movies.py
1
1723
import os, sys sys.path.append(os.path.realpath('scrape_rotten/')) import json from twisted.internet import reactor import scrapy from scrapy.crawler import CrawlerProcess from scrapy.crawler import CrawlerRunner from scrapy.utils.log import configure_logging from scrapy.utils.project import get_project_settings fr...
mit
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons/l10n_vn/__init__.py
425
1067
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module is Copyright (c) 2009-2013 General Solutions (http://gscom.vn) All Rights Reserved. # # This program is free software: you can redistribute it and/or...
agpl-3.0
janverschelde/PHCpack
src/GPU/MGS/Timings/run_mgs_maxdim.py
2
1322
# This scripts runs the modified Gram-Schmidt method # for the largest dimensions: n = 256 for double, # n = 128 for double double, and n = 80 for quad double. from os import system def run_maxdim(): """ Runs the modified Gram-Schmidt method for the largest dimensions with double (256), double double (128),...
gpl-3.0
VeNoMouS/Sick-Beard
lib/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights ...
gpl-3.0
edx/edx-platform
openedx/core/djangoapps/crawlers/models.py
4
2223
""" This module handles the detection of crawlers, so that we can handle them appropriately in other parts of the code. """ from config_models.models import ConfigurationModel from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class CrawlersConfig...
agpl-3.0
vladislav-karamfilov/Python-Playground
SoftUni-Python-Programming-Course/Introduction-to-Python/draw_chessboard.py
1
1572
import turtle from random import randint CHESSBOARD_COLORS = ['black', 'white'] SQUARE_SIDES = 4 SQUARE_SIDE_LENGTH = 15 SQUARE_ANGLE_DEGREE = 90 def draw_chessboard(rows, cols): turtle.speed('fastest') turtle.bgcolor('red') color_index = randint(0, 1) turtle.color(CHESSBOARD_COLORS[color_index]) ...
mit
mitoNGS/MToolBox
MToolBox/bioinf/files/phylip.py
3
2549
# coding=utf8 """ Formato phylip, supportata lettura e scrittura non ci sono controlli e si basa sul formato dato da CLC sequence viewer. i file scritti non presenta nell'header il numero di sequenze contenute nel file, per cui potrebbe presentare problemi nel caricamento in un altro programma """ import os, re FILE_...
gpl-3.0
rob356/SickRage
lib/sqlalchemy/orm/identity.py
78
7021
# orm/identity.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 import weakref from . import attributes from .. import util class IdentityMap(dict): ...
gpl-3.0
tectronics/python-twitter
get_access_token.py
21
3192
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # 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
micropython/micropython
tests/basics/generator_pend_throw.py
16
1822
def gen(): i = 0 while 1: yield i i += 1 g = gen() try: g.pend_throw except AttributeError: print("SKIP") raise SystemExit # Verify that an injected exception will be raised from next(). print(next(g)) print(next(g)) g.pend_throw(ValueError()) v = None try: v = next(g) excep...
mit
aljscott/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/bugzilla/attachment.py
128
4583
# Copyright (c) 2009 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # Copyright (c) 2010 Research In Motion Limited. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are...
bsd-3-clause
betoesquivel/CIE
flask/lib/python2.7/site-packages/werkzeug/debug/console.py
280
5557
# -*- coding: utf-8 -*- """ werkzeug.debug.console ~~~~~~~~~~~~~~~~~~~~~~ Interactive console support. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import sys import code from types import CodeType from werkzeug.utils import escape from werkzeug.loca...
mit
ancafarcas/superdesk-core
superdesk/storage/amazon/amazon_media_storage.py
1
13834
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015, 2016 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license ...
agpl-3.0
crazyAxe/tp-libvirt
libvirt/tests/src/virsh_cmd/domain/virsh_domxml_from_native.py
4
2376
import re import os from autotest.client.shared import error from autotest.client import utils from virttest import virsh from virttest import utils_libvirtd def run(test, params, env): """ Test command: virsh domxml-from-native. Convert native guest configuration format to domain XML format. 1.Pre...
gpl-2.0
vitorio/bite-project
deps/mrtaskman/server/handlers/taskresultfiles.py
16
2001
# 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 th...
apache-2.0
bansallab/roundup
_99.py
1
5987
import csv from urllib.request import Request, urlopen import dateutil.parser import re from sys import argv from bs4 import BeautifulSoup import scrape_util default_sale, base_url, prefix = scrape_util.get_market(argv) report_path = 'market-reports.html' strip_char = ';,. \n\t\xa0' def is_number(string): has_s...
mit
tacaswell/bokeh
examples/plotting/file/hover.py
43
1384
from __future__ import division import itertools import numpy as np from six.moves import zip from collections import OrderedDict from bokeh.plotting import ColumnDataSource, figure, show, output_file from bokeh.models import HoverTool output_file("hover.html") TOOLS="crosshair,pan,wheel_zoom,box_zoom,reset,hover,...
bsd-3-clause
Averroes/raft
core/network/SequenceBuilderNetworkAccessManager.py
11
3715
# # This network manager is isolated for sequence building # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
gpl-3.0
jougs/nest-simulator
pynest/nest/tests/test_recording_backends.py
15
5569
# -*- coding: utf-8 -*- # # test_recording_backends.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
gpl-2.0