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
richpolis/siveinpy
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/mbcharsetprober.py
2924
3268
######################## 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...
mit
bestvibes/neo4j-social-network
env/lib/python2.7/encodings/hex_codec.py
528
2309
""" Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs, binascii ### Codec APIs def hex_encode(...
mit
DarkPrince304/MozDef
bot/mozdefbot.py
6
14859
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Jeff Bryner jbryner@mozilla.com """mo...
mpl-2.0
andela-bojengwa/talk
venv/lib/python2.7/site-packages/pip/_vendor/progress/bar.py
404
2707
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
mit
atacai/server-tools
auth_admin_passkey/__openerp__.py
26
1572
# -*- encoding: utf-8 -*- ############################################################################## # # Admin Passkey module for OpenERP # Copyright (C) 2013-2014 GRAP (http://www.grap.coop) # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This program is free software: you can redistrib...
agpl-3.0
rahul67/hue
desktop/core/src/desktop/lib/wsgiserver.py
4
73699
#!/usr/bin/env python # This file stolen and edited from cherrypy, so we should not assign # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # ...
apache-2.0
jonathanwcrane/boto
boto/ec2/networkinterface.py
150
13597
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 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 ...
mit
eviljeff/zamboni
mkt/site/tests/test_helpers.py
2
7354
# -*- coding: utf-8 -*- from django.conf import settings import fudge import mock from datetime import datetime, timedelta from jingo import env from nose.tools import eq_ from urlparse import urljoin import mkt.site.tests from mkt.site.helpers import absolutify, css, js, product_as_dict, timesince from mkt.site.fixt...
bsd-3-clause
manahl/arctic
tests/integration/tickstore/test_ts_read.py
1
30190
# -*- coding: utf-8 -*- from datetime import datetime as dt import numpy as np import pandas as pd import pytest import six from mock import patch, call, Mock from numpy.testing.utils import assert_array_equal from pandas import DatetimeIndex from pandas.util.testing import assert_frame_equal from pymongo import ReadP...
lgpl-2.1
stratosgear/bravado
tests/requests_client/RequestsFutureAdapter/build_timeout_test.py
4
2521
from mock import Mock import pytest from requests.sessions import Session from bravado.requests_client import RequestsFutureAdapter @pytest.fixture def request(): return dict(url='http://foo.com') @pytest.fixture def session(): return Mock(spec=Session) def test_no_timeouts(session, request): misc_op...
bsd-3-clause
rhertzog/django
tests/humanize_tests/tests.py
10
13154
from __future__ import unicode_literals import datetime from decimal import Decimal from unittest import skipIf from django.contrib.humanize.templatetags import humanize from django.template import Context, Template, defaultfilters from django.test import SimpleTestCase, modify_settings, override_settings from django...
bsd-3-clause
melviso/beatle
beatle/model/py/ArgsArgument.py
2
1370
# -*- coding: utf-8 -*- """ Created on Sun Dec 22 22:31:28 2013 @author: mel """ from beatle.tran import TransactionalMethod, TransactionalMoveObject from Argument import Argument class ArgsArgument(Argument): """Implements argument representation""" context_container = True #visual methods @Trans...
gpl-2.0
dkarakats/edx-platform
common/djangoapps/student/migrations/0006_expand_meta_field.py
188
9246
# 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 'UserProfile.meta' db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields....
agpl-3.0
byt3smith/CIRTKit
modules/reversing/viper/peepdf/aespython/cfb_mode.py
42
2268
#!/usr/bin/env python """ CFB Mode of operation Running this file as __main__ will result in a self-test of the algorithm. Algorithm per NIST SP 800-38A http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf Copyright (c) 2010, Adam Newman http://www.caller9.com/ Licensed under the MIT license http://www.o...
mit
xuegang/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/package/gphdfs/__init__.py
21
15985
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
apache-2.0
JesseLivezey/pylearn2
pylearn2/datasets/binarizer.py
45
1455
""" .. todo:: WRITEME """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from pylearn2.datasets.transformer_dataset import TransformerDatas...
bsd-3-clause
WeskerYuan/flydan
sitl.py
1
12399
#! /usr/bin/python """ Software-in-the-loop simulation script for the multi quadcopter flocking control. This is the main script for the multi quadcopter flocking control (SITL). The script runs under the dronekit-sitl environment. A high-level XBee module should be connected for the inter communication between the d...
apache-2.0
Intel-tensorflow/tensorflow
tensorflow/python/kernel_tests/where_op_test.py
9
11173
# 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
q1ang/scikit-learn
sklearn/linear_model/bayes.py
220
15248
""" 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 .base import LinearModel from ..base import RegressorMixin from ..utils.extmath import fast_logdet, p...
bsd-3-clause
makinacorpus/Geotrek
geotrek/maintenance/migrations/0014_auto_20200316_1245.py
2
1996
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2020-03-16 11:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def intervention_sgnage_infrastructure(apps, schema_editor): InterventionModel = apps.get_model('maintenance', 'Intervention'...
bsd-2-clause
riveridea/gnuradio
gr-qtgui/python/qtgui/qa_qtgui.py
54
2790
#!/usr/bin/env python # # Copyright 2011 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
xiaom-GitHub/openthread
tools/harness-automation/cases/router_5_3_3.py
16
1997
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
leiferikb/bitpop
build/scripts/slave/recipe_modules/tryserver/api.py
1
4689
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from slave import recipe_api PATCH_STORAGE_RIETVELD = 'rietveld' PATCH_STORAGE_GIT = 'git' PATCH_STORAGE_SVN = 'svn' class TryserverApi(recipe_api.Recip...
gpl-3.0
NMGRL/pychron
pychron/hardware/kerr/kerr_circularstep_motor.py
2
6247
# ============================================================================== # Copyright 2012 Jake Ross # # 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/license...
apache-2.0
John-Shaw/shadowsocks
tests/test_udp_src.py
1009
2482
#!/usr/bin/python import socket import socks SERVER_IP = '127.0.0.1' SERVER_PORT = 1081 if __name__ == '__main__': # Test 1: same source port IPv4 sock_out = socks.socksocket(socket.AF_INET, socket.SOCK_DGRAM, socket.SOL_UDP) sock_out.set_proxy(socks.SOCKS5, SERVER_IP, S...
apache-2.0
NLnetLabs/unbound
libunbound/python/examples/ns-lookup.py
18
1916
#!/usr/bin/python # vim:fileencoding=utf-8 ''' ns-lookup.py: Example shows how to lookup for NS records Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz) Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz) Copyright (c) 2008. All rights reserved. This software is open source. Redistribution and use in s...
bsd-3-clause
rembo10/headphones
lib/oauth2/__init__.py
26
23443
""" The MIT License Copyright (c) 2007 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 right...
gpl-3.0
cedriclaunay/gaffer
python/GafferScene/AlembicPath.py
1
2881
########################################################################## # # Copyright (c) 2012, John Haddon. 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 so...
bsd-3-clause
PaulGrimal/peach
peach/optm/__init__.py
6
1629
################################################################################ # Peach - Computational Intelligence for Python # Jose Alexandre Nalon # # This file: optm/__init__.py # Makes the optm directory a package and initializes it. ###############################################################################...
lgpl-2.1
sivakuna-aap/superdesk
server/apps/rules/routing_rules.py
2
17866
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 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 import loggi...
agpl-3.0
horance-liu/tensorflow
tensorflow/contrib/nccl/python/ops/nccl_ops.py
23
8121
# 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
xiandiancloud/edxplaltfom-xusong
common/lib/xmodule/xmodule/modulestore/tests/test_xml.py
30
4708
""" Tests around our XML modulestore, including importing well-formed and not-well-formed XML. """ import os.path import unittest from glob import glob from mock import patch from xmodule.modulestore.xml import XMLModuleStore from xmodule.modulestore import ModuleStoreEnum from xmodule.tests import DATA_DIR from opaq...
agpl-3.0
junghans/lammps
tools/moltemplate/examples/coarse_grained/protein_folding_examples/1bead+chaperone/frustrated+minichaperone/moltemplate_files/generate_tables/calc_dihedral_table.py
40
2709
#!/usr/bin/env python # Calculate a table of dihedral angle interactions used in the alpha-helix # and beta-sheet regions of the frustrated protein model described in # provided in figure 8 of the supplemental materials section of: # AI Jewett, A Baumketner and J-E Shea, PNAS, 101 (36), 13192-13197, (2004) # Note tha...
gpl-2.0
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/test/test_descrtut.py
10
12553
# This contains most of the executable examples from Guido's descr # tutorial, once at # # http://www.python.org/2.2/descrintro.html # # A few examples left implicit in the writeup were fleshed out, a few were # skipped due to lack of interest (e.g., faking super() by hand isn't # of much interest anymore), ...
mit
berendkleinhaneveld/VTK
ThirdParty/AutobahnPython/autobahn/wamp/dealer.py
16
13691
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## ## h...
bsd-3-clause
glennlive/gnuradio-wg-grc
gr-filter/examples/fir_filter_ccc.py
47
4019
#!/usr/bin/env python # # Copyright 2013 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
RHInception/re-cfg-seed
test/test_re_cfg_seed.py
1
6904
# Copyright (C) 2014 SEE AUTHORS FILE # # 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 Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distr...
agpl-3.0
dexterx17/nodoSocket
clients/Python-2.7.6/Lib/bsddb/test/test_join.py
111
3168
"""TestCases for using the DB.join and DBCursor.join_item methods. """ import os import unittest from test_all import db, dbshelve, test_support, verbose, \ get_new_environment_path, get_new_database_path #---------------------------------------------------------------------- ProductIndex = [ ('apple',...
mit
ntuecon/server
pyenv/Lib/site-packages/pythonwin/pywin/debugger/__init__.py
4
2833
import sys # Some cruft to deal with the Pythonwin GUI booting up from a non GUI app. def _MakeDebuggerGUI(): app.InitInstance() isInprocApp = -1 def _CheckNeedGUI(): global isInprocApp if isInprocApp==-1: import win32ui isInprocApp = win32ui.GetApp().IsInproc() if isInprocApp: # MAY Need it - ...
bsd-3-clause
40223214/-2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/types.py
756
3167
""" Define names for built-in types that aren't directly accessible as a builtin. """ import sys # Iterators in Python aren't a matter of type but of protocol. A large # and changing number of builtin types implement *some* flavor of # iterator. Don't check the type! Use hasattr to check for both # "__iter__" and "...
agpl-3.0
mjschultz/django-password-policies
setup.py
1
1293
from setuptools import setup, find_packages install_requires=['django>=1.5', 'django-easysettings', 'pytz'] try: import importlib except ImportError: install_requires.append('importlib') setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A D...
bsd-3-clause
strets123/acascraper
setup.py
1
1573
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') requirements = [ # TODO: put package requireme...
bsd-3-clause
PaulWay/insights-core
insights/combiners/journald_conf.py
1
10493
""" Journald configuration ====================== Combiner for parsing of journald configuration. man journald.conf describes where various journald config files can reside and how they take precedence one over another. The combiner implements the logic and provides an interface for querying active settings. The jour...
apache-2.0
akash1808/nova_test_latest
nova/tests/unit/api/openstack/compute/test_plugin_framework.py
46
1306
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
magehost/magento-malware-scanner
tools/convert_yar_to_text.py
3
1286
#!/usr/bin/env python3 import re import time SECTIONS = ('backend', 'frontend') YARA_RULE = '(rule (\S+) \{.+?\n\})' NEEDLE = '\$ = (.+)\n' for section in SECTIONS: print("Parsing {}".format(section)) with open('rules/{}.yar'.format(section)) as fh: content = fh.read() customfh = open('rules/{}-custom.yar'.f...
gpl-3.0
pombredanne/http-repo.gem5.org-gem5-
src/dev/x86/X86IntPin.py
69
2483
# Copyright (c) 2008 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
groutr/numpy
numpy/distutils/fcompiler/pathf95.py
229
1209
from __future__ import division, absolute_import, print_function from numpy.distutils.fcompiler import FCompiler compilers = ['PathScaleFCompiler'] class PathScaleFCompiler(FCompiler): compiler_type = 'pathf95' description = 'PathScale Fortran Compiler' version_pattern = r'PathScale\(TM\) Compiler Suit...
bsd-3-clause
todd-x86/tkplus
exception.py
1
1522
from form import Form from button import Button from label import Label from image import Image from memo import Memo import os import Tkinter as tk import traceback def handle_exception(ex, stacktrace=None): err_icon = os.path.join(os.path.dirname(__file__), 'graphics', 'icon_error.gif') frm = Form(caption='E...
apache-2.0
ml-lab/pylearn2
pylearn2/testing/skip.py
49
1363
""" Helper functions for determining which tests to skip. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from nose.plugins.skip import SkipT...
bsd-3-clause
lingfliu/smart_tuwa
twrt/testbed/massive_scene_test.py
1
3298
import socket import time import sys import random import math import threading msg_header = 'AADD' msg_stamp = '\x00\x00\x00\x00' msg_id_gw = '2016A008' msg_id_dev = '00000000' msg_devtype = '\x01\x00' msg_auth_key = '88888888' msg_auth_datatype = '\x1c\x00' msg_auth = msg_header+msg_stamp+msg_id_gw+msg_id_dev+ms...
apache-2.0
petteyg/intellij-community
python/helpers/pydev/pydevd_attach_to_process/_test_attach_to_process_linux.py
82
2779
''' This module is just for testing concepts. It should be erased later on. Experiments: // gdb -p 4957 // call dlopen("/home/fabioz/Desktop/dev/PyDev.Debugger/pydevd_attach_to_process/linux/attach_linux.so", 2) // call dlsym($1, "hello") // call hello() // call open("/home/fabioz/Desktop/dev/PyDev.Debugger/pydevd_...
apache-2.0
chffelix/arvore
languages/zh-cn.py
142
10465
# coding: utf8 { '!langcode!': 'zh-cn', '!langname!': '中文', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" 应为选择表达式, 格式如 "field1=\'value\'". 但是对 JOIN 的结果不可以使用 update 或者 delete"', '%s %%{row} deleted': '已删除 %s 笔', '%s %%{row} updated': '已更新 %s...
gpl-3.0
sublime-ycmd/sublime-ycmd
tests/lib/subtest.py
1
1883
#!/usr/bin/env python3 ''' tests/lib/subtest.py Utility functions for running sub-tests within a test case. Includes additional logging to add context during sub-test execution. ''' import logging import unittest from tests.lib.decorator import log_function logger = logging.getLogger('sublime-ycmd.' + __name__) de...
mit
saguziel/incubator-airflow
airflow/ti_deps/deps/trigger_rule_dep.py
22
8261
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
ycl2045/nova-master
nova/tests/objects/test_aggregate.py
11
6013
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
kashefy/caffe_sandbox
nideep/iow/to_hdf5.py
3
1574
''' Created on Jan 15, 2016 @author: kashefy ''' import os import numpy as np import h5py from nideep.blobs.mat_utils import expand_dims def arrays_to_h5_fixed(arrs, key, path_dst): ''' save list of arrays (all same size) to hdf5 under a single key ''' with h5py.File(path_dst, 'w') as f: f[key...
bsd-2-clause
alexanderturner/ansible
lib/ansible/modules/storage/netapp/netapp_e_storagepool.py
45
39823
#!/usr/bin/python # (c) 2016, NetApp, 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....
gpl-3.0
oleksa-pavlenko/gae-django-project-template
django/db/models/sql/expressions.py
56
4487
import copy from django.core.exceptions import FieldError from django.db.models.constants import LOOKUP_SEP from django.db.models.fields import FieldDoesNotExist class SQLEvaluator(object): def __init__(self, expression, query, allow_joins=True, reuse=None): self.expression = expression self.opts...
mit
aimas/TuniErp-8.0
addons/account_bank_statement_extensions/__init__.py
442
1153
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
agpl-3.0
birdonwheels5/p2pool-dgbsha
wstools/tests/test_wsdl.py
289
5568
#!/usr/bin/env python ############################################################################ # Joshua R. Boverhof, David W. Robertson, LBNL # See LBNLCopyright for copyright notice! ########################################################################### import sys, unittest import ConfigParser import os fro...
gpl-3.0
ducminhn/three.js
utils/converters/msgpack/msgpack/__init__.py
659
1385
# coding: utf-8 from msgpack._version import version from msgpack.exceptions import * from collections import namedtuple class ExtType(namedtuple('ExtType', 'code data')): """ExtType represents ext type in msgpack.""" def __new__(cls, code, data): if not isinstance(code, int): raise TypeE...
mit
keedio/hue
desktop/core/ext-py/cx_Oracle-5.1.2/setup.py
31
12987
"""Distutils script for cx_Oracle. Windows platforms: python setup.py build --compiler=mingw32 install Unix platforms python setup.py build install """ import distutils.command try: import distutils.command.bdist_msi except ImportError: distutils.command.bdist_msi = None try: import distutils.co...
apache-2.0
EduPepperPDTesting/pepper2013-testing
cms/djangoapps/contentstore/features/course-overview.py
8
4543
# pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step from common import * from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611 from logging import getLogger logger = getLogger(__name__) @step(u'I have a course with no sections$') def have_a_course(step):...
agpl-3.0
charlesll/RamPy
legacy_code/IR_dec_comb.py
1
6585
# -*- coding: utf-8 -*- """ Created on Tue Jul 22 07:54:05 2014 @author: charleslelosq Carnegie Institution for Science """ import sys sys.path.append("/Users/charleslelosq/Documents/RamPy/lib-charles/") import csv import numpy as np import scipy import matplotlib import matplotlib.gridspec as gridspec from pylab ...
gpl-2.0
queria/my-tempest
tempest/api_schema/response/compute/keypairs.py
11
2237
# Copyright 2014 NEC Corporation. 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 ...
apache-2.0
Glasgow2015/team-10
env/lib/python2.7/site-packages/pip/commands/wheel.py
328
7320
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import sys from pip.basecommand import Command from pip.index import PackageFinder from pip.log import logger from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import InstallRequirement, RequirementSet, parse_requirement...
apache-2.0
jspricke/weechat-android
releases/publish_playstore.py
2
2195
#!/usr/bin/env python import httplib2 import os import sys from apiclient.discovery import build from oauth2client import client from oauth2client.service_account import ServiceAccountCredentials #TRACK = 'production' TRACK = 'beta' SERVICE_ACCT_EMAIL = os.environ['GOOGLEPLAY_ACCT_EMAIL'] KEY = 'releases/google-play-...
apache-2.0
subutai/nupic.research
tests/unit/frameworks/tensorflow/k_winner_test.py
3
7243
# Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/or modify # it unde...
agpl-3.0
tarikgwa/nfd
newfies/mod_registration/forms.py
1
1850
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The primar...
mpl-2.0
xcgoner/dist-mxnet
docs/build_version_doc/AddPackageLink.py
6
2930
# 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
benjamindeleener/odoo
addons/base_import/odf_ods_reader.py
69
3584
# Copyright 2011 Marco Conti # 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, s...
gpl-3.0
rmboggs/django
django/contrib/gis/gdal/envelope.py
477
7009
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
bsd-3-clause
toolmacher/micropython
tests/basics/try_finally1.py
100
1110
print("noexc-finally") try: print("try") finally: print("finally") print("noexc-finally-finally") try: print("try1") try: print("try2") finally: print("finally2") finally: print("finally1") print() print("noexc-finally-func-finally") def func2(): try: print("try2") ...
mit
cpollard1001/FreeCAD_sf_master
src/Mod/Ship/Instance.py
17
9052
#*************************************************************************** #* * #* Copyright (c) 2011, 2012 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
lgpl-2.1
armab/st2
st2client/st2client/utils/logging.py
9
2015
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
apache-2.0
dharmabumstead/ansible
lib/ansible/utils/unicode.py
158
1166
# (c) 2012-2014, Toshio Kuratomi <a.badger@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
argonemyth/argonemyth-blog
blog/migrations/0008_auto__add_field_photo_orientation.py
1
8412
# -*- coding: 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): # Adding field 'Photo.orientation' db.add_column(u'blog_photo', 'orientation', self.gf...
gpl-3.0
astroScott/TeachingUtilities
classutils.py
1
5241
import os from configparser import ConfigParser import string from numpy import std, mean def read_config(file = 'configdata.cfg'): """ read the configuration file, by default configdata.cfg. returns a dict containing relevant config info. """ config = ConfigParser() config.read(file) asse...
gpl-2.0
rgerkin/neuroConstruct
lib/jython/Lib/pawt/__init__.py
109
1039
import sys from java import awt def test(panel, size=None, name='AWT Tester'): f = awt.Frame(name, windowClosing=lambda event: sys.exit(0)) if hasattr(panel, 'init'): panel.init() f.add('Center', panel) f.pack() if size is not None: f.setSize(apply(awt.Dimension, size)) f.setVi...
gpl-2.0
cnsuperx/Cocos2d-x-2.2.5
external/emscripten/tests/freetype/src/tools/docmaker/sources.py
367
10766
# Sources (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009 # David Turner <david@freetype.org> # # # this file contains definitions of classes needed to decompose # C sources files into a series of multi-line "blocks". There are # two kinds of blocks: # # - normal blocks, which contain source code or ordinary comment...
mit
mSenyor/sl4a
python/gdata/src/atom/url.py
280
4277
#!/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
niltonlk/nest-simulator
pynest/nest/tests/test_connect_arrays_mpi.py
14
7823
# -*- coding: utf-8 -*- # # test_connect_arrays_mpi.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
2014c2g9/c2g9
exts/w2/static/Brython2.0.0-20140209-164925/Lib/_imp.py
115
2013
"""(Extremely) low-level import machinery bits as used by importlib and imp.""" class __loader__(object):pass def _fix_co_filename(*args,**kw): raise NotImplementedError("%s:not implemented" % ('_imp.py:_fix_co_filename')) def acquire_lock(*args,**kw): """acquire_lock() -> None Acquires the interpreter's...
gpl-2.0
kirca/odoo
addons/account_sequence/account_sequence.py
39
2435
# -*- coding: 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
saydulk/horizon
openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py
63
3022
# 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
charlesccychen/beam
sdks/python/apache_beam/runners/worker/statesampler_test.py
5
4459
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
eeshangarg/oh-mainline
vendor/packages/twisted/twisted/news/nntp.py
18
33334
# -*- test-case-name: twisted.news.test.test_nntp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ NNTP protocol support. Maintainer: Jp Calderone The following protocol commands are currently understood:: LIST LISTGROUP XOVER XHDR POST G...
agpl-3.0
espadrine/opera
chromium/src/third_party/trace-viewer/third_party/pywebsocket/src/mod_pywebsocket/dispatch.py
35
14459
# Copyright 2012, 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...
bsd-3-clause
FRC-Team-3140/north-american-happiness
lib/python2.7/site-packages/pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py
3
3553
#!/usr/bin/env python from . import capabilities try: import unittest2 as unittest except ImportError: import unittest import pymysql from pymysql.tests import base import warnings warnings.filterwarnings('error') class test_MySQLdb(capabilities.DatabaseTest): db_module = pymysql connect_args = () ...
mit
batra-mlp-lab/DIGITS
digits/dataset/tasks/analyze_db.py
1
4644
# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. import sys import os.path import re import digits from digits.utils import subclass, override from digits.task import Task # NOTE: Increment this everytime the pickled object PICKLE_VERSION = 1 @subclass class AnalyzeDbTask(Task): """ Reads inf...
bsd-3-clause
ygenc/onlineLDA
onlineldavb_new/build/scipy/scipy/optimize/minpack.py
2
19848
import warnings import _minpack from numpy import atleast_1d, dot, take, triu, shape, eye, \ transpose, zeros, product, greater, array, \ all, where, isscalar, asarray, inf, abs error = _minpack.error __all__ = ['fsolve', 'leastsq', 'fixed_point', 'curve_fit'] def _check_func(che...
gpl-3.0
jvkops/django
tests/sites_framework/tests.py
108
2923
from django.apps import apps from django.conf import settings from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.core import checks from django.db import models from django.test import TestCase from .models import ( AbstractArticle, CustomArticle, ...
bsd-3-clause
rorasa/KeeTerm
Crypto/Signature/PKCS1_PSS.py
123
12228
# -*- coding: utf-8 -*- # # Signature/PKCS1_PSS.py : PKCS#1 PPS # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, r...
mit
mrquim/repository.mrquim
repo/script.module.exodus/lib/resources/lib/sources/de/horrorkino.py
5
3416
# -*- coding: utf-8 -*- """ Exodus Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This progra...
gpl-2.0
chetan/cherokee
qa/107-Priority1.py
8
1113
from base import * COMMENT = "This is comment inside the CGI" TEXT = "It should be printed by the CGI" CONF = """ vserver!1!rule!1070!match = directory vserver!1!rule!1070!match!directory = /prio1 vserver!1!rule!1070!handler = file vserver!1!rule!1071!match = directory vserver!1!rule!1071!match!directory = /prio1...
gpl-2.0
umitproject/tease-o-matic
django/core/mail/__init__.py
229
5072
""" Tools for sending email. """ from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module # Imported for backwards compatibility, and for the sake # of a cleaner namespace. These symbols used to be in # django/core/mail.py before the int...
bsd-3-clause
JSeam2/IsoGraph
old/gen_iso_graph.py
1
4050
# -*- coding: utf-8 -*- """ Generate adjacency matrices of isomorphic graphs task 1) Check the sizes of isomorphic graphs you want to generate 2) Store them in different numpy files for various graph sizes Build a table for example: ______________________________________ | Graph 1 | Graph 2 | Is Isomorphic? | |-----...
mit
adamfisk/littleshoot-client
server/common/appengine/patch/common/appenginepatch/ragendja/forms.py
1
11392
from copy import deepcopy import re from django.utils.datastructures import SortedDict, MultiValueDict from django.utils.html import conditional_escape from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode from django.utils.safestring import mark_safe from django.forms.widgets import flatatt fr...
gpl-2.0
dario-ramos/assimp_x3d
assimp-3.1.1/test/regression/settings.py
15
5561
#!/usr/bin/env python3 # -*- Coding: UTF-8 -*- # --------------------------------------------------------------------------- # Open Asset Import Library (ASSIMP) # --------------------------------------------------------------------------- # # Copyright (c) 2006-2010, ASSIMP Development Team # # All rights reserved. #...
gpl-2.0
tdtrask/ansible
lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain.py
11
6364
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # 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