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
TheDSCPL/SSRE_2017-2018_group8
Projeto/Python/cryptopy/crypto/cipher/rijndael.py
1
14718
# -*- coding: utf-8 -*- """ crypto.cipher.rijndael Rijndael encryption algorithm This byte oriented implementation is intended to closely match FIPS specification for readability. It is not implemented for performance. Copyright © (c) 2002 by Paul A. Lambert Read LICENSE.txt for license info...
mit
Ninad998/FinalYearProject
deep_stylo/migrations/0001_initial.py
1
1563
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-24 16:30 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depe...
mit
senthil10/genologics
examples/get_projects.py
6
1394
"""Python interface to GenoLogics LIMS via its REST API. Usage example: Get some projects. Per Kraulis, Science for Life Laboratory, Stockholm, Sweden. """ import codecs from genologics.lims import * # Login parameters for connecting to a LIMS instance. from genologics.config import BASEURI, USERNAME, PASSWORD ...
mit
wang1352083/pythontool
python-2.7.12-lib/lib2to3/fixes/fix_itertools_imports.py
325
2094
""" Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) """ # Local imports from lib2to3 import fixer_base from lib2to3.fixer_util import BlankLine, syms, token class FixItertoolsImports(fixer_base.BaseFix): BM_compatible = True PATTERN = """ import_from< 'from' 'itertools' 'import'...
mit
yuezh/azure-linux-extensions
OSPatching/check.py
16
1630
#!/usr/bin/python # # OSPatching extension # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
AutoQuad/mavlink
pymavlink/tools/mavflightmodes.py
45
2736
#!/usr/bin/env python ''' show changes in flight modes ''' import sys, time, datetime, os from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) parser.add_argument("logs", metavar="LOG", nargs="+") args = parser.parse_args() from pymavlink import mavutil def flight_modes(logfile): ...
lgpl-3.0
cmattoon/libforensics
code/lf/apps/msoffice/shared/consts.py
13
4030
# 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...
gpl-3.0
Ayrx/cryptography
src/_cffi_src/openssl/crypto.py
1
3371
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/crypto.h> """ TYPES = """ static const ...
bsd-3-clause
mfsteen/CIQTranslate-Kristian
openpyxl/styles/fills.py
1
5258
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl from openpyxl.descriptors import Float, Set, Alias, NoneSet from openpyxl.descriptors.sequence import ValueSequence from openpyxl.compat import safe_string from .colors import ColorDescriptor, Color from .hashable import HashableObject from op...
gpl-3.0
MaxTyutyunnikov/lino
lino/lino_site.py
1
69806
# -*- coding: UTF-8 -*- ## Copyright 2002-2013 Luc Saffre ## This file is part of the Lino project. ## Lino 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 op...
gpl-3.0
sserrot/champion_relationships
venv/Lib/site-packages/IPython/core/inputsplitter.py
1
28155
"""DEPRECATED: Input handling and transformation machinery. This module was deprecated in IPython 7.0, in favour of inputtransformer2. The first class in this module, :class:`InputSplitter`, is designed to tell when input from a line-oriented frontend is complete and should be executed, and when the user should be pr...
mit
ShaneHarvey/mongo-python-driver
pymongo/driver_info.py
2
1596
# Copyright 2018-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
pataquets/namecoin-core
test/functional/wallet_keypool_topup.py
5
4373
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing transactio...
mit
Equitable/trump
docs/diagrams/tsadisplay/describe.py
2
5741
# -*- coding: utf-8 -*- import uuid import types from sqlalchemy import exc, orm from sqlalchemy.orm import class_mapper from sqlalchemy import Column, Integer, Table from sqlalchemy.orm.properties import ColumnProperty def describe(items, show_methods=True, show_properties=True): """Detecting attributes, inherit...
bsd-3-clause
HackToday/kolla
tests/test_build.py
1
3763
# 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 # d...
apache-2.0
admetricks/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py
126
3584
# 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 th...
bsd-3-clause
mbrubeck/servo
tests/wpt/web-platform-tests/tools/pywebsocket/example/echo_noext_wsh.py
465
2404
# Copyright 2013, 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 f...
mpl-2.0
rjschwei/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/resources/models/debug_setting.py
5
1296
# 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
iruga090/python-social-auth
social/tests/test_utils.py
73
5018
import sys import unittest2 as unittest from mock import Mock from social.utils import sanitize_redirect, user_is_authenticated, \ user_is_active, slugify, build_absolute_uri, \ partial_pipeline_data PY3 = sys.version_info[0] == 3 class SanitizeRedirectTest(unitte...
bsd-3-clause
vamshing/mase
python101/code/Card.py
19
3189
"""This module contains code from Think Python by Allen B. Downey http://thinkpython.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import random class Card(object): """Represents a standard playing card. Attributes: suit: integer 0-3 rank: i...
unlicense
Ajapaik/ajapaik-web
ajapaik/ajapaik_face_recognition/management/commands/run_face_encoding_on_unencoded_rectangles.py
1
1387
import multiprocessing from json import loads, dumps import face_recognition from django.core.management.base import BaseCommand from ajapaik.ajapaik_face_recognition.models import FaceRecognitionRectangle def encode_single_rectangle(rectangle: FaceRecognitionRectangle) -> None: print('Processing rectangle %s' ...
gpl-3.0
servo/servo
tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/text3/support/generate-segment-break-transformation-rules-tests.py
10
4886
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests segment-break-transformation-rules-001 ~ 049 which cover all possible combinations of characters at two sides of segment breaks. More specifically, there are seven types of characters involve in these rules: 1. East Asian Full-width (F)...
mpl-2.0
ctgriffiths/twister
lib/tShark.py
2
6703
import time import datetime import os import sys import json import stat import thread import threading import select try: from scapy.all import * except Exception as e: print 'Install scapy python module {}'.format(e) sys.exit(1) class TSharkHandler(object): def __init__(self, active, interface, r...
apache-2.0
ashwin713/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/sjisprober.py
1182
3734
######################## 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...
lgpl-2.1
bharadwajyarlagadda/bingmaps
tests/test_location_by_address_url_schema.py
1
2911
import pytest from bingmaps.apiservices import LocationByAddress from bingmaps.urls import LocationByAddressSchema from .fixtures import parametrize, BING_MAPS_KEY http_protocol = 'http' https_protocol = 'https' DATA = [{'adminDistrict': 'WA'}, {'key': 'vds'}, {'adminDistrict': 'WA', 'locali...
mit
Tejal011089/trufil-erpnext
erpnext/stock/doctype/item/test_item.py
1
2870
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.test_runner import make_test_records from erpnext.stock.doctype.item.item import WarehouseNotSet, ItemTemplat...
agpl-3.0
kevinmel2000/sl4a
python-build/python-libs/gdata/tests/atom_tests/token_store_test.py
128
2896
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
simongoffin/website_version
addons/sale/sale.py
3
67882
# -*- 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
ganeshnalawade/ansible
lib/ansible/utils/lock.py
31
1390
# Copyright (c) 2020 Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from functools import wraps def lock_decorator(attr='mi...
gpl-3.0
SteveHNH/ansible
lib/ansible/compat/tests/__init__.py
128
1267
# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.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 later...
gpl-3.0
ojengwa/oh-mainline
vendor/packages/python-social-auth/social/tests/actions/test_login.py
79
2639
from social.tests.models import User from social.tests.actions.actions import BaseActionTest class LoginActionTest(BaseActionTest): def test_login(self): self.do_login() def test_login_with_partial_pipeline(self): self.do_login_with_partial_pipeline() def test_fields_stored_in_session(se...
agpl-3.0
samdoran/ansible
lib/ansible/plugins/callback/logentries.py
24
11304
""" (c) 2015, Logentries.com, Jimmy Tang <jimmy.tang@logentries.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 o...
gpl-3.0
daniel-yu-papa/Maggie-OpenMax
external/build/Tools/SCons/gcc-generic.py
2
1528
import os def generate(env, gcc_cross_prefix=None, gcc_strict=False, gcc_stop_on_warning=None, gcc_extra_options=''): if gcc_stop_on_warning == None: gcc_stop_on_warning = env['stop_on_warning'] ### compiler flags if gcc_strict: env['CCFLAGS'] = "" env['CFLAGS'] = "" env.AppendUniq...
lgpl-3.0
eul721/The-Perfect-Pokemon-Team-Balancer
libs/env/Lib/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py
223
25767
# urllib3/connectionpool.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import errno import logging from socket import error as SocketError, timeout as SocketT...
gpl-2.0
hakanb/django-mailer-2
django_mailer/management/commands/send_mail.py
3
2511
from django.core.management.base import NoArgsCommand from django.db import connection from django_mailer import models, settings from django_mailer.engine import send_all from django_mailer.management.commands import create_handler from optparse import make_option import logging import sys try: from django.core.ma...
mit
protatremy/buildbot
worker/buildbot_worker/test/util/misc.py
9
8057
# This file is part of Buildbot. Buildbot 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 eve...
gpl-2.0
EricSekyere/airmozilla
mysql2postgres/py-mysql2pgsql-0.1.5/mysql2pgsql/lib/postgres_writer.py
16
11959
from __future__ import absolute_import import re from cStringIO import StringIO from datetime import datetime, date, timedelta from psycopg2.extensions import QuotedString, Binary, AsIs class PostgresWriter(object): """Base class for :py:class:`mysql2pgsql.lib.postgres_file_writer.PostgresFileWriter` and :p...
bsd-3-clause
skmezanul/seahub
seahub/auth/admin.py
40
6068
from django import template from django.db import transaction from django.conf import settings from django.contrib import admin from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AdminPasswordChangeForm from django.contrib.auth.models import User, Group from django.contrib import messages from djan...
apache-2.0
yousafsyed/casperjs
bin/Lib/encodings/ptcp154.py
219
14015
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
mit
hxddh/shadowsocks
shadowsocks/manager.py
925
9692
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
haripradhan/MissionPlanner
Lib/io.py
53
3722
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams;...
gpl-3.0
VirtusLab/ansible-modules-extras
windows/win_iis_website.py
84
3462
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # # 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 t...
gpl-3.0
c0hen/django-venv
lib/python3.4/site-packages/django/contrib/contenttypes/forms.py
116
3620
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import models from django.forms import ModelForm, modelformset_factory from django.forms.models import BaseModelFormSet class BaseGenericInlineFormSet(BaseModelFormSet): """ A formset for generic...
gpl-3.0
dcrozier/PyTest
IT Management/ssfusd_speaker_finder.py
1
3343
import yaml import os import sys import re import library import csv from collections import defaultdict import netaddr from multiprocessing.pool import ThreadPool print("Post Deployment - South San Francisco") # Checks for site yaml file if not os.path.isfile('yamls\\SSFUSD.yml'): sys.exit('Site not setup, run ...
apache-2.0
petterreinholdtsen/frikanalen
fkbeta/fk/admin.py
1
2538
# Copyright (c) 2012-2013 Benjamin Bruheim <grolgh@gmail.com> # This file is covered by the LGPLv3 or later, read COPYING for details. from django.contrib import admin from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from fk.models import FileFormat from fk.models import Orga...
lgpl-3.0
dimagol/trex-core
scripts/external_libs/urllib3/urllib3/packages/six.py
2715
30098
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
apache-2.0
janusnic/ecommerce
ecommerce/settings/local.py
1
4047
"""Development settings and globals.""" from __future__ import absolute_import import os from os.path import join, normpath from ecommerce.settings.base import * from ecommerce.settings.logger import get_logger_config # DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = Tru...
agpl-3.0
mmasaki/trove
trove/tests/tempest/tests/api/versions/test_versions.py
1
1650
# Copyright 2014 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
felipenaselva/repo.felipe
plugin.video.velocity/scrapers/putlocker_both.py
1
15716
import urllib2,urllib,re,os import random import urlparse import sys import xbmcplugin,xbmcgui,xbmc, xbmcaddon, downloader, extract, time import tools from libs import kodi from tm_libs import dom_parser from libs import log_utils import tools from libs import cloudflare from libs import log_utils from tm_libs import d...
gpl-2.0
melodous/designate
designate/sqlalchemy/models.py
1
1881
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # Author: Patrick Galbraith <patg@hp.com> # # 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/...
apache-2.0
LiaoPan/scikit-learn
sklearn/cluster/tests/test_dbscan.py
114
11393
""" Tests for DBSCAN clustering algorithm """ import pickle import numpy as np from scipy.spatial import distance from scipy import sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing im...
bsd-3-clause
ShassAro/ShassAro
Bl_project/blVirtualEnv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py
744
6831
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-2.0
KaranToor/MA450
google-cloud-sdk/.install/.backup/lib/surface/pubsub/topics/list.py
6
2865
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
tejal29/pants
src/python/pants/backend/core/tasks/listtargets.py
8
3316
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.c...
apache-2.0
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/requests-2.10.0/requests/auth.py
149
8075
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import threading from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import pa...
apache-2.0
chouseknecht/ansible
lib/ansible/modules/cloud/xenserver/xenserver_guest_info.py
10
7682
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs> # 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_versi...
gpl-3.0
biocore/verman
verman/__init__.py
1
9290
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------...
bsd-3-clause
guijomatos/SickRage
lib/github/tests/Github_.py
39
17733
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
pwmarcz/django
tests/model_regress/test_pickle.py
31
2132
import pickle import warnings from django.db import models, DJANGO_VERSION_PICKLE_KEY from django.test import TestCase from django.utils.encoding import force_text from django.utils.version import get_major_version, get_version class ModelPickleTestCase(TestCase): def test_missing_django_version_unpickling(self)...
bsd-3-clause
ybellavance/python-for-android
python3-alpha/python3-src/Lib/test/test_xmlrpc_net.py
49
1962
#!/usr/bin/env python3 import collections import errno import socket import sys import unittest from test import support import xmlrpc.client as xmlrpclib class CurrentTimeTest(unittest.TestCase): def test_current_time(self): # Get the current time from xmlrpc.com. This code exercises # the min...
apache-2.0
marble/Toolchain_RenderDocumentation
12-Get-ready-for-the-project/run_35-Define-general-values.py
1
8699
#!/usr/bin/env python # coding: utf-8 from __future__ import print_function from __future__ import absolute_import import os import sys import tct from tct import deepget ospj = os.path.join params = tct.readjson(sys.argv[1]) facts = tct.readjson(params['factsfile']) milestones = tct.readjson(params['milestonesfil...
mit
jillesme/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/thread/threadedmessagequeue.py
134
2089
# 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
tesidroni/mp
Lib/site-packages/numpy/distutils/command/install.py
95
3008
import sys if 'setuptools' in sys.modules: import setuptools.command.install as old_install_mod have_setuptools = True else: import distutils.command.install as old_install_mod have_setuptools = False old_install = old_install_mod.install from distutils.file_util import write_file class install(old_ins...
gpl-3.0
chenc10/Spark-PAF
ec2/lib/boto-2.34.0/boto/beanstalk/__init__.py
145
1680
# 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
vvv1559/intellij-community
python/helpers/py3only/docutils/parsers/rst/directives/body.py
44
9232
# $Id: body.py 7267 2011-12-20 14:14:21Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for additional body elements. See `docutils.parsers.rst.directives` for API details. """ __docformat__ = 'reStructuredText' from docutils import...
apache-2.0
hasteur/wikipedia_bot_tasks
families/uncyclopedia_family.py
4
76001
# -*- coding: utf-8 -*- import config, family, urllib __version__ = '$Id$' # # The Uncyclomedia family, assorted encyclopedi.as from the Uncyclopedia series. # This file contains a full set of (currently) fifty languages, excluding forks, # redirects and mirrors. # # Note that some of the wikia in this set are known...
gpl-2.0
foss-transportationmodeling/rettina-server
.env/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py
64
30309
__all__ = ['Distribution'] import re from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib from distutils.errors import DistutilsOpt...
apache-2.0
brosner/django-avatar
avatar/views.py
5
7562
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth.decorators import login_required from avatar import AVATAR_MAX_AVATARS_PE...
bsd-3-clause
nikhilprathapani/python-for-android
python-build/python-libs/gdata/tests/gdata_tests/photos/service_test.py
128
2928
#!/usr/bin/python # # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
ephes/scikit-learn
examples/decomposition/plot_faces_decomposition.py
204
4452
""" ============================ Faces dataset decompositions ============================ This example applies to :ref:`olivetti_faces` different unsupervised matrix decomposition (dimension reduction) methods from the module :py:mod:`sklearn.decomposition` (see the documentation chapter :ref:`decompositions`) . """...
bsd-3-clause
trnewman/VT-USRP-daughterboard-drivers_python
gr-usrp/src/qa_usrp.py
1
1235
#!/usr/bin/env python # # Copyright 2005 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) ...
gpl-3.0
alexcrichton/gyp
pylib/gyp/MSVSSettings.py
437
43606
# 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. """Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. The...
bsd-3-clause
cgimenop/Excel2Testlink
ExcelParser/lib/openpyxl/utils/tests/test_indexed_list.py
2
1046
import pytest @pytest.fixture def list(): from ..indexed_list import IndexedList return IndexedList def test_ctor(list): l = list(['b', 'a']) assert l == ['b', 'a'] assert l.clean is False def test_allow_duplicate_ctor(list): l = list(['b', 'a', 'b']) assert l == ['b', 'a', 'b'] l....
mit
nfunato/scrapy
scrapy/commands/startproject.py
26
2611
from __future__ import print_function import re import shutil import string from importlib import import_module from os.path import join, exists, abspath from shutil import copytree, ignore_patterns import scrapy from scrapy.commands import ScrapyCommand from scrapy.utils.template import render_templatefile, string_ca...
bsd-3-clause
VillageAlliance/django-cms
cms/tests/reversion_tests.py
2
6776
# -*- coding: utf-8 -*- from __future__ import with_statement from cms.models import Page from cms.models.pluginmodel import CMSPlugin from cms.plugins.text.models import Text from cms.test_utils.testcases import (CMSTestCase, URL_CMS_PAGE, URL_CMS_PAGE_CHANGE, URL_CMS_PAGE_ADD, URL_CMS_PLUGIN_ADD, URL_CMS_PLUG...
bsd-3-clause
devanshdalal/scikit-learn
examples/ensemble/plot_isolation_forest.py
39
2361
""" ========================================== IsolationForest example ========================================== An example using IsolationForest for anomaly detection. The IsolationForest 'isolates' observations by randomly selecting a feature and then randomly selecting a split value between the maximum and minimu...
bsd-3-clause
loco-odoo/localizacion_co
openerp/report/render/render.py
457
2524
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
CCSS-CZ/layman
server/tests/layedtest.py
1
3969
import os,sys import unittest import ConfigParser TEST_DIR = os.path.dirname(os.path.abspath(__file__)) INSTALL_DIR = os.path.abspath(os.path.join(TEST_DIR,"..")) sys.path.append(os.path.join(INSTALL_DIR)) import json from layman.layed import LayEd from layman.layed import GsRest class LayEdTestCase(unittest.TestCas...
gpl-3.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/test/test_curses.py
44
9518
# # Test script for the curses module # # This script doesn't actually display anything very coherent. but it # does call every method and function. # # Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), # init_color() # Only called, not tested: getmouse(), ungetmouse() # import sys, tempfile, os ...
mit
NuttamonW/Archaeological
ElectricalConductivity/test/test_electrical_conductivity_dialog.py
1
1580
# coding=utf-8 """Dialog test. .. note:: 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. """ __author__ = 'p.p...
gpl-3.0
nthiep/global-ssh-server
lib/python2.7/site-packages/django/contrib/gis/geos/tests/test_mutable_list.py
102
15029
# Copyright (c) 2008-2009 Aryeh Leib Taurog, http://www.aryehleib.com # All rights reserved. # # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. from django.contrib.gis.geos.mutable_list import ListMixin from django.utils import six from django.utils import unit...
agpl-3.0
thjashin/tensorflow
tensorflow/python/ops/image_grad_test.py
83
12139
# 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
lookout/dd-agent
tests/core/test_win32_agent.py
7
2436
# stdlib import time import unittest # 3p from mock import Mock class MockProcess(Mock): """ A mocked process. """ def __init__(self, agentConfig=None, hostname=None, **options): super(MockProcess, self).__init__() self.config = agentConfig self.hostname = hostname sel...
bsd-3-clause
madjam/mxnet
example/ssd/tools/caffe_converter/compare_layers.py
54
14536
# 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
thaumos/ansible
lib/ansible/modules/net_tools/netbox/netbox_site.py
34
9840
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) <mikhail.yohman@gmail.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_MET...
gpl-3.0
sassoftware/rmake3
rmake/plugins/plugin.py
2
3024
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/idlelib/SearchDialogBase.py
55
4385
from tkinter import * class SearchDialogBase: title = "Search Dialog" icon = "Search" needwrapbutton = 1 def __init__(self, root, engine): self.root = root self.engine = engine self.top = None def open(self, text, searchphrase=None): self.text = text if no...
mit
gunchleoc/django
tests/migrations/test_optimizer.py
118
22678
# -*- coding: utf-8 -*- from django.db import migrations, models from django.db.migrations.optimizer import MigrationOptimizer from django.test import SimpleTestCase from .models import CustomModelBase, EmptyManager class OptimizerTests(SimpleTestCase): """ Tests the migration autodetector. """ def...
bsd-3-clause
Tatsh-ansible/ansible
lib/ansible/plugins/terminal/aireos.py
101
1999
# # (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
krafczyk/spack
lib/spack/spack/util/crypto.py
2
6514
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
rvykydal/anaconda
pyanaconda/modules/network/firewall/__init__.py
7
1057
# # Copyright (C) 2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be ...
gpl-2.0
start-jsk/jsk_apc
demos/instance_occlsegm/examples/instance_occlsegm/instance_occlusion_segmentation/demo.py
2
4895
#!/usr/bin/env python from __future__ import print_function import argparse import os.path as osp import pprint import chainer import numpy as np import yaml import chainer_mask_rcnn as cmr import instance_occlsegm_lib from instance_occlsegm_lib.contrib import instance_occlsegm from instance_occlsegm_lib.contrib i...
bsd-3-clause
Novasoft-India/OperERP-AM-Motors
openerp/addons/l10n_lu/wizard/print_vat.py
45
3595
# -*- coding: utf-8 -*- #Copyright (c) Vincent Cardon <vincent.cardon@tranquil-it-systems.fr> # Denis Cardon <denis.cardon@tranquilitsystems.com> and Emmanuel RICHARD. #Ingenieur fondateur #Tranquil IT Systems from __future__ import with_statement from openerp.osv import fields, osv from openerp import pooler from ope...
agpl-3.0
aayush2911/Fibonaccio
web2py/gluon/widget.py
4
46175
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) The widget is called from web2py ---------------------------------- """ import datetime import sys i...
gpl-2.0
alexgulida/cloudapp-mp2
internal_use/CourseraSubmission.py
61
5689
#! /usr/bin/env python -u # coding=utf-8 __author__ = 'Sayed Hadi Hashemi' import json import urllib import urllib2 import hashlib import email import email.message import email.encoders class CourseraSubmission(object): def __init__(self, **kwargs): self.email = "" self.password = "" se...
apache-2.0
StormTrooper/osmc
package/mediacenter-skin-next-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x0bb.py
253
4730
data = ( 'moen', # 0x00 'moenj', # 0x01 'moenh', # 0x02 'moed', # 0x03 'moel', # 0x04 'moelg', # 0x05 'moelm', # 0x06 'moelb', # 0x07 'moels', # 0x08 'moelt', # 0x09 'moelp', # 0x0a 'moelh', # 0x0b 'moem', # 0x0c 'moeb', # 0x0d 'moebs', # 0x0e 'moes', # 0x0f 'moess', #...
gpl-2.0
alexmorozov/django
django/core/management/commands/loaddata.py
13
13333
from __future__ import unicode_literals import glob import gzip import os import warnings import zipfile from itertools import product from django.apps import apps from django.conf import settings from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.management.b...
bsd-3-clause
dosiecki/NewsBlur
vendor/paypal/pro/models.py
18
5131
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from django.db import models from django.utils.http import urlencode from django.forms.models import model_to_dict try: from idmapper.models import SharedMemoryModel as Model except ImportError: Model = models.Model class PayPalNV...
mit
garrettcap/Bulletproof-Backup
wx/tools/Editra/src/ed_msg.py
2
17021
############################################################################### # Name: ed_msg.py # # Purpose: Provide a messaging/notification system for actions performed in # # the editor. # ...
gpl-2.0
hujiajie/pa-chromium
tools/telemetry/telemetry/core/extension_dict.py
35
1135
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.core import extension_to_load class ExtensionDict(object): """Dictionary of ExtensionPage instances, with extension_id as key""" def ...
bsd-3-clause