repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
beacloudgenius/edx-platform
common/lib/xmodule/xmodule/tests/test_editing_module.py
181
2640
""" Tests for editing descriptors""" import unittest import os import logging from mock import Mock from pkg_resources import resource_string from opaque_keys.edx.locations import Location from xmodule.editing_module import TabsEditingDescriptor from xblock.field_data import DictFieldData from xblock.fields import Sco...
agpl-3.0
kmee/PySPED
pysped/nfe/leiaute/consrecinfe_310.py
6
5873
# -*- coding: utf-8 -*- # # PySPED - Python libraries to deal with Brazil's SPED Project # # Copyright (C) 2010-2012 # Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lice...
lgpl-2.1
zenodo/invenio
invenio/modules/messages/views.py
12
10582
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2013, 2014, 2015 CERN. # # Invenio 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...
gpl-2.0
allenp/odoo
addons/delivery/tests/test_delivery_cost.py
44
5192
# -*- coding: utf-8 -*- from openerp.tests import common from openerp.tools import float_compare class TestDeliveryCost(common.TransactionCase): def setUp(self): super(TestDeliveryCost, self).setUp() self.SaleOrder = self.env['sale.order'] self.SaleOrderLine = self.env['sale.order.line']...
gpl-3.0
zachpodbielniak/PodNet
Linux/Python/CCoordinates.py
1
1904
''' ____ _ _ _ _ _ ____ ___ | _ \ ___ __| | \ | | ___| |_ / \ | _ \_ _| | |_) / _ \ / _` | \| |/ _ \ __| / _ \ | |_) | | | __/ (_) | (_| | |\ | __/ |_ / ___ \| __/| | |_| \___/ \__,_|_| \_|\___|\__| /_/ \_\_| |___| File: CCoordinates.py Author: Zach Po...
gpl-3.0
louistin/fullstack
Python/processing_thread/distribute/taskmanager.py
1
1047
#!/usr/bin/python # _*_ coding: utf-8 _*_ import random, time, Queue from multiprocessing.managers import BaseManager # 发送任务队列 task_queue = Queue.Queue() # 接收结果队列 result_queue = Queue.Queue() # 从BaseManager继承的QueueManager class QueueManager(BaseManager): pass # 将两个Queue都注册到网络上, callable参数关联了Queue对象 QueueManager....
mit
40223137/2015cbaa
static/Brython3.1.1-20150328-091302/Lib/unittest/test/_test_warnings.py
858
2304
# helper module for test_runner.Test_TextTestRunner.test_warnings """ This module has a number of tests that raise different kinds of warnings. When the tests are run, the warnings are caught and their messages are printed to stdout. This module also accepts an arg that is then passed to unittest.main to affect the b...
gpl-3.0
silverlogic/itunes-iap
itunesiap/core.py
1
5229
import json import requests import contextlib from six import u from . import exceptions RECEIPT_PRODUCTION_VALIDATION_URL = "https://buy.itunes.apple.com/verifyReceipt" RECEIPT_SANDBOX_VALIDATION_URL = "https://sandbox.itunes.apple.com/verifyReceipt" USE_PRODUCTION = True USE_SANDBOX = False def config_from_mode...
bsd-2-clause
ajfriend/cvxpy
doc/source/conf.py
2
9590
# -*- coding: utf-8 -*- # # CVXPY documentation build configuration file, created by # sphinx-quickstart on Mon Jan 27 20:47:07 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
gpl-3.0
pgleeson/TempRepo3
lib/jython/Lib/distutils/command/bdist_wininst.py
82
13374
"""distutils.command.bdist_wininst Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: bdist_wininst.py 38697 2005-03-23 18:54:36Z loewis $" import sys, os, string from distutils.core import Comman...
gpl-2.0
cirrusone/phantom2
src/qt/qtwebkit/Tools/QueueStatusServer/model/warninglog.py
122
2147
# Copyright (C) 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 ...
bsd-3-clause
wehkamp/ansible
lib/ansible/playbook/__init__.py
62
3162
# (c) 2012-2014, 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) an...
gpl-3.0
pylixm/sae-django-demo
django1.7-sae/site-packages/django/utils/encoding.py
73
8538
from __future__ import unicode_literals import codecs import datetime from decimal import Decimal import locale from django.utils.functional import Promise from django.utils import six from django.utils.six.moves.urllib.parse import quote class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, ob...
apache-2.0
XVicarious/GarGUI
GarGUI.py
1
8318
__module_name__ = "GarGUI" __module_version__ = "1.2.1" __module_description__ = "A GUI Front-End for Gargoyle" version = 121 import wx, xchat, string, os, sys, ConfigParser from urllib2 import urlopen # Fix path to load GUI path = os.path.dirname(os.path.abspath(__file__)) path2 = path path = "".join([path, "/Gar"]...
gpl-3.0
apporc/oslo.messaging
oslo_messaging/tests/rpc/test_client.py
6
18262
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
ciudadanointeligente/deldichoalhecho
ddah_web/static/bootstrap/test-infra/s3_cache.py
1700
3523
#!/usr/bin/env python2.7 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, remove as _delete_file from os.path import isfile, dirname, basename, abspath from hashlib import sha256 from subprocess import check_call as run from boto.s3....
gpl-3.0
trishnaguha/ansible
test/integration/targets/vars_prompt/test-vars_prompt.py
30
3147
#!/usr/bin/env python import os import pexpect import sys from ansible.module_utils.six import PY2 if PY2: log_buffer = sys.stdout else: log_buffer = sys.stdout.buffer env_vars = { 'ANSIBLE_ROLES_PATH': './roles', 'ANSIBLE_NOCOLOR': 'True', 'ANSIBLE_RETRY_FILES_ENABLED': 'False', } def run_tes...
gpl-3.0
zstars/weblabdeusto
server/src/weblab/core/coordinator/scheduler.py
1
7300
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
bsd-2-clause
dimasad/corujas
corujas.py
1
8869
import sys import attrdict import numpy as np import numpy.linalg from scipy import io, interpolate from thesis2 import codegen, kalman, mocos, symstats, vme from thesis2.experiments import base class SymbolicModel(base.SymbolicModel): '''trakSTAR path reconstruction model.''' x = ['x', 'y', 'z', 'q0', '...
mit
albertjan/pypyjs
website/js/pypy.js-0.2.0/lib/modules/test/test_multifile.py
138
1702
from test import test_support mimetools = test_support.import_module('mimetools', deprecated=True) multifile = test_support.import_module('multifile', deprecated=True) import cStringIO msg = """Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_590453667==_" X-OriginalArrivalTime:...
mit
michaelpacer/python-future
src/future/backports/email/_encoded_words.py
82
8443
""" Routines for manipulating RFC2047 encoded words. This is currently a package-private API, but will be considered for promotion to a public API if there is demand. """ from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future.builtins import bytes fr...
mit
vvv1559/intellij-community
plugins/hg4idea/testData/bin/mercurial/hbisect.py
92
9226
# changelog bisection for mercurial # # Copyright 2007 Matt Mackall # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org> # # Inspired by git bisect, extension skeleton taken from mq.py. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 ...
apache-2.0
mmezzavilla/ns3-mmwave
.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py
9
11665
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,shlex,shutil,traceback,errno,sys,stat from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,Errors,Build,Node build_dir_override=None no_climb_commands=['configure'] default_cmd...
gpl-2.0
SaikWolf/gnuradio
gr-digital/python/digital/ofdm_receiver.py
57
7980
#!/usr/bin/env python # # Copyright 2006-2008 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 opt...
gpl-3.0
seanli9jan/tensorflow
tensorflow/contrib/boosted_trees/examples/boston.py
16
6242
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
onlysheep5200/NetnsEx
hostend/main.py
1
1970
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import sys sys.path.append('..') from tornado.web import Application import tornado.ioloop import tornado.options import tornado.httpserver import tornado.autoreload from tornado.options import define, options from hostend.controller...
apache-2.0
marc-sensenich/ansible
lib/ansible/modules/network/fortios/fortios_antivirus_heuristic.py
2
6869
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # 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 Lic...
gpl-3.0
SantosDevelopers/sborganicos
venv/lib/python3.5/site-packages/wheel/archive.py
93
2247
""" Archive tools for wheel. """ import os import time import logging import os.path import zipfile log = logging.getLogger("wheel") def archive_wheelfile(base_name, base_dir): '''Archive all files under `base_dir` in a whl file and name it like `base_name`. ''' olddir = os.path.abspath(os.curdir) ...
mit
oscaro/django
tests/validators/tests.py
1
14960
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime, timedelta import re import types from unittest import TestCase from django.core.exceptions import ValidationError from django.core.validators import ( BaseValidator, EmailValidator, MaxLengthValidator, MaxValueValidator...
bsd-3-clause
ODMM/openflow-dmm
amm/amm.py
1
6619
# Copyright (C) IMDEA Networks Institute and NETCOM research group, Department of # Telematics Engineering, University Carlos III of Madrid. # # 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; ve...
gpl-2.0
fpy171/django
django/templatetags/i18n.py
219
19311
from __future__ import unicode_literals import sys from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import six...
bsd-3-clause
chaupt/google-diff-match-patch
python2/diff_match_patch_test.py
319
41744
#!/usr/bin/python2.4 """Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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://...
apache-2.0
iamang/namebench
nb_third_party/dns/message.py
215
40962
# Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
PythonNut/servo
tests/wpt/web-platform-tests/tools/runner/report.py
278
9660
import argparse import json import sys from cgi import escape from collections import defaultdict import types def html_escape(item, escape_quote=False): if isinstance(item, types.StringTypes): rv = escape(item) if escape_quote: rv = rv.replace('"', "&quot;") return rv els...
mpl-2.0
wunderlins/learning
python/zodb/lib/linux64/ZEO/tests/TestThread.py
2
2249
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-2.0
Tim---/osmo-tetra
src/demod/python/osmosdr-tetra_demod_fft.py
1
8260
#!/usr/bin/env python # Copyright 2012 Dimitri Stolnikov <horiz0n@gmx.net> # Usage: # src$ ./demod/python/osmosdr-tetra_demod_fft.py -o /dev/stdout | ./float_to_bits /dev/stdin /dev/stdout | ./tetra-rx /dev/stdin # # Adjust the center frequency (-f) and gain (-g) according to your needs. # Use left click in Wideband ...
agpl-3.0
meng-sun/hil
haas/dev_support.py
4
1979
# Copyright 2013-2014 Massachusetts Open Cloud Contributors # # 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 applicab...
apache-2.0
liamgh/liamgreenhughes-sl4a-tf101
python/src/Lib/getpass.py
59
5272
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the passw...
apache-2.0
mahendra-r/edx-platform
common/djangoapps/terrain/stubs/video_source.py
181
1368
""" Serve HTML5 video sources for acceptance tests """ from SimpleHTTPServer import SimpleHTTPRequestHandler from .http import StubHttpService from contextlib import contextmanager import os from logging import getLogger LOGGER = getLogger(__name__) class VideoSourceRequestHandler(SimpleHTTPRequestHandler): """ ...
agpl-3.0
abadger/ansible
test/lib/ansible_test/_internal/commands/coverage/report.py
12
4797
"""Generate console code coverage reports.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ...io import ( read_json_file, ) from ...util import ( display, ) from ...data import ( data_context, ) from .combine import ( command_coverage_combin...
gpl-3.0
jrha/aquilon
lib/python2.6/aquilon/worker/commands/reset_advertised_status.py
2
2700
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
apache-2.0
jalexvig/tensorflow
tensorflow/python/ops/matmul_benchmark_test.py
51
6272
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/pygments/lexers/tcl.py
72
5398
# -*- coding: utf-8 -*- """ pygments.lexers.tcl ~~~~~~~~~~~~~~~~~~~ Lexers for Tcl and related languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, words from pygments.token import...
mit
gltn/stdm
stdm/third_party/reportlab/pdfbase/cidfonts.py
2
18838
#Copyright ReportLab Europe Ltd. 2000-2017 #see license.txt for license details #history https://hg.reportlab.com/hg-public/reportlab/log/tip/src/reportlab/pdfbase/cidfonts.py #$Header $ __version__='3.3.0' __doc__="""CID (Asian multi-byte) font support. This defines classes to represent CID fonts. They know how to c...
gpl-2.0
chyeh727/django
django/contrib/gis/geos/prototypes/prepared.py
288
1214
from ctypes import c_char from django.contrib.gis.geos.libgeos import ( GEOM_PTR, PREPGEOM_PTR, GEOSFuncFactory, ) from django.contrib.gis.geos.prototypes.errcheck import check_predicate # Prepared geometry constructor and destructors. geos_prepare = GEOSFuncFactory('GEOSPrepare', argtypes=[GEOM_PTR], restype=PRE...
bsd-3-clause
itskewpie/tempest
tempest/api/identity/admin/test_users.py
1
9827
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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.apach...
apache-2.0
ncliam/serverpos
openerp/addons/auth_openid/controllers/main.py
382
10399
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
jeanmask/opps
opps/articles/migrations/0001_initial.py
5
19640
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class Migration(SchemaMigration): depends_on = ( ("containers", "0001_initial"), ) def forwar...
mit
ptrendx/mxnet
tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py
9
6664
#!/usr/bin/env python # 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 # "L...
apache-2.0
airbnb/superset
superset/migrations/versions/7e3ddad2a00b_results_key_to_query.py
5
1233
# 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
rAntonioh/re2
re2/make_unicode_casefold.py
22
3609
#!/usr/bin/python # coding=utf-8 # # Copyright 2008 The RE2 Authors. All Rights Reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # See unicode_casefold.h for description of case folding tables. """Generate C++ table for Unicode case folding.""" import s...
bsd-3-clause
atris/gpdb
gpMgmt/bin/gppylib/system/configurationImplGpdb.py
20
17852
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2010. All Rights Reserved. # Copyright (c) EMC/Greenplum Inc 2011. All Rights Reserved. # """ This file defines the interface that can be used to fetch and update system configuration information. """ import os, copy from gppylib.gplog import * from gppylib.utils i...
apache-2.0
AsgerPetersen/QGIS
python/plugins/processing/algs/exampleprovider/ExampleAlgorithmProvider.py
20
3721
# -*- coding: utf-8 -*- """ *************************************************************************** __init__.py --------------------- Date : July 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ********************************...
gpl-2.0
Endika/edx-platform
lms/djangoapps/ccx/tests/test_views.py
1
39258
""" test views """ import datetime import json import re import pytz import ddt import urlparse from mock import patch, MagicMock from nose.plugins.attrib import attr from capa.tests.response_xml_factory import StringResponseXMLFactory from courseware.courses import get_course_by_id from courseware.tests.factories imp...
agpl-3.0
brain-tec/sale-workflow
sale_service_project/models/account_invoice.py
9
1085
# -*- coding: utf-8 -*- # © 2015 Sergio Teruel <sergio.teruel@tecnativa.com> # © 2015 Carlos Dauden <carlos.dauden@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import fields, models class AccountInvoice(models.Model): _inherit = 'account.invoice' print_works = ...
agpl-3.0
h3llrais3r/SickRage
tests/notifier_tests.py
11
10390
# coding=UTF-8 # URL: https://github.com/SickRage/SickRage # # This file is part of SickRage. # # SickRage 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)...
gpl-3.0
jaanos/crypto-portal
githook.py
2
1653
# -*- coding: utf-8 -*- from flask import * from auth import gitkey import json import hmac import ast import sys import os from hashlib import sha1 app = Blueprint('githook', __name__) paths = {'refs/heads/master': '/var/crypto-portal/', 'refs/heads/devel': '/var/crypto-devel/'} @app.route("/githook", metho...
mit
zhulin2609/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
122
2840
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
lizardsystem/lizard-registration
lizard_registration/manager_forms.py
1
4046
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt. from django import forms from django.utils import html from lizard_security.models import UserGroup from lizard_registration.models import Organisation from django.contrib.auth.forms import SetPasswordForm from django.contrib.auth.models import User from djang...
gpl-3.0
Lyrositor/moul-scripts
Python/system/genericpath.py
246
3015
""" Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ import os import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile'] # Does a path exist? #...
gpl-3.0
junneyang/taskflow
taskflow/engines/action_engine/executor.py
1
22196
# -*- coding: utf-8 -*- # Copyright (C) 2013 Yahoo! 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...
apache-2.0
Shengliang/mbed
workspace_tools/dev/syms.py
120
2186
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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
ratchet7/ci-slider
cgi-bin/example6.py
2
6542
#!/usr/bin/env python """example""" import os import cgi import PubGlobals import cgitb; #cgitb.enable() import random import MySQLdb PubGlobals.header() print""" <script type="text/javascript"> function alert1(text1, text2) { alert("Ideology: "+text1+ " Uncertainty: "+text2); } </script> </head>...
gpl-3.0
ShyamSS-95/Bolt
example_problems/nonrelativistic_boltzmann/advected_gaussian_pulse_in_p_space/1V/with_only_E1/main.py
3
1524
import arrayfire as af import numpy as np import h5py from bolt.lib.physical_system import physical_system from bolt.lib.nonlinear_solver.nonlinear_solver import nonlinear_solver import domain import boundary_conditions import params import initialize import bolt.src.nonrelativistic_boltzmann.advection_terms as adve...
gpl-3.0
andresailer/DIRAC
Interfaces/scripts/dirac-admin-ban-site.py
4
3043
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-admin-ban-site # Author : Stuart Paterson ######################################################################## """ Remove Site from Active mask for current Setup """ __RCSID__ = "$Id$" fr...
gpl-3.0
florian-dacosta/OpenUpgrade
addons/resource/resource.py
33
42181
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
x303597316/hue
desktop/core/ext-py/python-openid-2.2.5/openid/yadis/services.py
167
1838
# -*- test-case-name: openid.test.test_services -*- from openid.yadis.filters import mkFilter from openid.yadis.discover import discover, DiscoveryFailure from openid.yadis.etxrd import parseXRDS, iterServices, XRDSError def getServiceEndpoints(input_url, flt=None): """Perform the Yadis protocol on the input URL ...
apache-2.0
chiefspace/udemy-rest-api
udemy_rest_api_section6/env/lib/python3.4/site-packages/jwt/compat.py
13
1317
""" The `compat` module provides support for backwards compatibility with older versions of python, and compatibility wrappers around optional packages. """ # flake8: noqa import sys import hmac PY3 = sys.version_info[0] == 3 if PY3: text_type = str binary_type = bytes else: text_type = unicode bina...
gpl-2.0
OmnInfinity/volatility
volatility/plugins/linux/pstree.py
50
1893
# This file is part of Volatility. # Copyright (C) 2007-2013 Volatility Foundation # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any late...
gpl-2.0
Cgruppo/oppia
core/controllers/reader.py
1
15348
# Copyright 2014 The Oppia 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 applicable ...
apache-2.0
relic7/prodimages
python/multiimagemagickthumbs.py
1
2515
timeconvert\ very-very-large.png\ -quality85\ -writempr:mpc:label\ +delete\ mpr:mpc:label-crop'3000x2001+0+491'-resize'170x116!>'-writepic1.png+delete\ mpr:mpc:label-crop'2981x2883+8+0'-resize'75x75!>'-writepic2.png+delete\ mpr:mpc:label-crop'1100x1983+0+0'-resize'160x160!>'-writepic3.png+delete\ mpr:mpc:label-crop'200...
mit
ruud-v-a/rhythmbox
plugins/replaygain/player.py
2
6344
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright (C) 2010 Jonathan Matthew # # 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 ...
gpl-2.0
40223247/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/sprite.py
603
55779
## pygame - Python Game Library ## Copyright (C) 2000-2003, 2007 Pete Shinners ## (C) 2004 Joe Wreschnig ## 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; e...
gpl-3.0
j-carl/ansible
test/integration/targets/connection_delegation/connection_plugins/delegation_connection.py
32
1267
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ author: Ansible Core Team connection: delegation_connection short_description: Test connection for delegated host check description: - Some further description that you don't care about. options: remote_passwo...
gpl-3.0
ChristinaZografou/sympy
sympy/simplify/tests/test_trigsimp.py
22
15557
from sympy import ( symbols, sin, simplify, cos, trigsimp, rad, tan, exptrigsimp,sinh, cosh, diff, cot, Subs, exp, tanh, exp, S, integrate, I,Matrix, Symbol, coth, pi, log, count_ops, sqrt, E, expand, Piecewise) from sympy.utilities.pytest import XFAIL from sympy.abc import x, y, z, t, a, b, c, d, e, f, g...
bsd-3-clause
openstack/cloudbase-init
cloudbaseinit/metadata/services/base.py
2
8089
# Copyright 2012 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
natanovia/zulip
zerver/lib/actions.py
113
124803
from __future__ import absolute_import from django.conf import settings from django.core import validators from django.contrib.sessions.models import Session from zerver.lib.cache import flush_user_profile from zerver.lib.context_managers import lockfile from zerver.models import Realm, RealmEmoji, Stream, UserProfile...
apache-2.0
fhaoquan/kbengine
kbe/src/lib/python/Lib/ctypes/test/test_cfuncs.py
102
7680
# A lot of failures in these tests on Mac OS X. # Byte order related? import unittest from ctypes import * from ctypes.test import need_symbol import _ctypes_test class CFunctions(unittest.TestCase): _dll = CDLL(_ctypes_test.__file__) def S(self): return c_longlong.in_dll(self._dll, "last_tf_arg_s")...
lgpl-3.0
ariegg/webiopi-drivers
chips/sensor/lis3dh/lis3dh.py
1
11552
# Copyright 2017 Andreas Riegg - t-h-i-n-x.net # # 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 ap...
apache-2.0
Encesat/LumexData
LumexData.py
1
17585
#!/usr/bin/python2 #LumexData.py import datetime as dt import numpy as np import scipy.optimize as opt import matplotlib.pyplot as plt omitFlagged = True def storeAsDatetime(date, time): day = int(date.split(".")[0]) month = int(date.split(".")[1]) year = int(date.split(".")[2]) hour = int(time.spli...
mit
mgaitan/django-invitation
invitation/migrations/0001_initial.py
1
2209
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
bsd-3-clause
pmisik/buildbot
master/buildbot/test/unit/test_clients_usersclient.py
6
3409
# 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
samabhi/pstHealth
venv/lib/python2.7/site-packages/django/contrib/gis/gdal/srs.py
366
12043
""" The Spatial Reference class, represents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY...
mit
CMLL/taiga-back
taiga/searches/serializers.py
13
1899
# 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
Sabayon/anaconda
pyanaconda/product.py
6
2324
# # product.py: product identification string # # Copyright (C) 2003 Red Hat, Inc. All rights reserved. # # 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 # ...
gpl-2.0
EricE/evelink
evelink/eve.py
2
16295
from evelink import api class EVE(object): """Wrapper around /eve/ of the EVE API.""" @api.auto_api def __init__(self, api=None): self.api = api def certificate_tree(self): """Returns a list of certificates in eve.""" api_result = self.api.get('eve/CertificateTree') r...
mit
timlinux/QGIS
python/plugins/processing/algs/qgis/KeepNBiggestParts.py
30
4416
# -*- coding: utf-8 -*- """ *************************************************************************** KeepNBiggestParts.py --------------------- Date : July 2014 Copyright : (C) 2014 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
chrsrds/scikit-learn
examples/applications/wikipedia_principal_eigenvector.py
10
7724
""" =============================== Wikipedia principal eigenvector =============================== A classical way to assert the relative importance of vertices in a graph is to compute the principal eigenvector of the adjacency matrix so as to assign to each vertex the values of the components of the first eigenvect...
bsd-3-clause
yugang/crosswalk-test-suite
webapi/tct-sse-w3c-tests/sse-py/support/sse.py
5
1769
# Copyright (c) 2012 Intel Corporation. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this list # of conditions and the following disclaimer....
bsd-3-clause
theanalyst/cinder
cinder/tests/api/v1/test_volumes.py
2
48554
# Copyright 2013 Josh Durgin # 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 a...
apache-2.0
arlolra/stem
test/unit/util/system.py
2
14865
""" Unit tests for the stem.util.system functions. This works by mocking the stem.util.system.call function to selectively exercise other functions. None of these tests actually make system calls, use proc, or otherwise deal with the system running the tests. """ import functools import ntpath import posixpath import ...
lgpl-3.0
rwakulszowa/servo
tests/wpt/web-platform-tests/tools/py/py/_code/source.py
174
14565
from __future__ import generators from bisect import bisect_right import sys import inspect, tokenize import py from types import ModuleType cpy_compile = compile try: import _ast from _ast import PyCF_ONLY_AST as _AST_FLAG except ImportError: _AST_FLAG = 0 _ast = None class Source(object): """ ...
mpl-2.0
willworks/pyspider
pyspider/database/sqlite/projectdb.py
81
1836
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-02-09 12:05:52 import time from .sqlitebase import SQLiteMixin from pyspider.database.base.projectdb import ProjectDB as BaseProjectDB from pyspider....
apache-2.0
MattCCS/PyVault
site-packages/cryptography/hazmat/primitives/ciphers/base.py
34
6169
# 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 import abc import six from cryptography import utils from cryptography....
mit
FRC-Team-3140/north-american-happiness
lib/python2.7/site-packages/jinja2/testsuite/core_tags.py
412
11858
# -*- coding: utf-8 -*- """ jinja2.testsuite.core_tags ~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the core tags like for and if. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment...
mit
achamberland/react-view-cube
node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
1558
4945
# Copyright (c) 2011 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. import re import os def XmlToString(content, encoding='utf-8', pretty=False): """ Writes the XML content to disk, touching the file only if it has changed. ...
mit
ehirt/odoo
addons/account/wizard/account_report_general_ledger.py
36
3176
# -*- 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
40223117cda/w17test
static/Brython3.1.0-20150301-090019/Lib/genericpath.py
727
3093
""" Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ import os import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile'] # Does a path exist? #...
gpl-3.0
BigRoy/lucidity
source/lucidity/vendor/yaml/_cyaml.py
537
3290
__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader', 'CBaseDumper', 'CSafeDumper', 'CDumper'] from _yaml import CParser, CEmitter from constructor import * from serializer import * from representer import * from resolver import * class CBaseLoader(CParser, BaseConstructor, BaseResolver): def __init__(...
apache-2.0
barbarubra/Don-t-know-What-i-m-doing.
python/src/Lib/test/test_nis.py
58
1317
from test import test_support import unittest import nis class NisTests(unittest.TestCase): def test_maps(self): try: maps = nis.maps() except nis.error, msg: # NIS is probably not active, so this test isn't useful if test_support.verbose: print "...
apache-2.0