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
gurkerl83/millipede-xtreemfs
bin/cpplint.py
7
106624
#!/usr/bin/python # # cpplint.py is Copyright (C) 2009 Google Inc. # # It is free software; you can redistribute it and/or modify it under the # terms of either: # # a) the GNU General Public License as published by the Free Software # Foundation; either version 1, or (at your option) any later version, or # # b) the "...
bsd-3-clause
teodesson/Bookie
bookie/tests/test_auth/test_signup.py
1
6228
"""Test the limited signup process """ import logging from urllib.parse import ( quote, urlencode, ) import transaction from bookie.models import DBSession from bookie.models.auth import Activation from bookie.models.auth import User from bookie.models.auth import UserMgr from bookie.tests import gen_random_...
agpl-3.0
snehasi/servo
tests/wpt/harness/wptrunner/update/metadata.py
118
2732
# 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/. import os from .. import metadata, products from base import Step, StepRunner class GetUpdatePropertyList(Step): ...
mpl-2.0
cstipkovic/spidermonkey-research
js/src/build_OPT.OBJ/_virtualenv/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py
510
1314
# -*- 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...
mpl-2.0
BizzCloud/PosBox
addons/account_check_writing/__openerp__.py
64
1794
# -*- 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
web30s/odoo-9.0c-20160402
hello/templates/openerp/addons/test_impex/models.py
392
5891
# -*- coding: utf-8 -*- from openerp.osv import orm, fields def selection_fn(obj, cr, uid, context=None): return list(enumerate(["Corge", "Grault", "Wheee", "Moog"])) def function_fn(model, cr, uid, ids, field_name, arg, context): return dict((id, 3) for id in ids) def function_fn_write(model, cr, uid, id, f...
gpl-3.0
mycodeday/crm-platform
payment_paypal/controllers/main.py
260
3738
# -*- coding: utf-8 -*- try: import simplejson as json except ImportError: import json import logging import pprint import urllib2 import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class PaypalController(http.Controller): _noti...
gpl-3.0
florian-f/sklearn
sklearn/feature_extraction/tests/test_image.py
6
9620
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal, assert_true from numpy.testing import assert_raises from ..image import i...
bsd-3-clause
Frostman/eho-horizon
openstack_dashboard/dashboards/admin/routers/ports/tabs.py
15
1067
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Nachi Ueno, NTT MCL, 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...
apache-2.0
AfricaChess/lichesshub
grandprix/migrations/0002_auto_20171110_0640.py
1
1439
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-10 06:40 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('grandprix', '0001_initial'), ] operations = [ ...
mit
lostdj/Jaklin-OpenJFX
modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/stack_utils.py
215
2734
# Copyright (C) 2011 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 ...
gpl-2.0
satyrius/cmsplugin-articles
cmsplugin_articles/migrations/0001_initial.py
1
1615
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347'), ] operations = [ migrations.CreateModel( name='ArticlesPlugin', fi...
mit
rubencabrera/odoo
addons/l10n_gr/__init__.py
438
1102
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
joelsmith/openshift-tools
openshift/installer/vendored/openshift-ansible-3.2.24/filter_plugins/oo_zabbix_filters.py
91
5132
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 ''' Custom zabbix filters for use in openshift-ansible ''' import pdb class FilterModule(object): ''' Custom zabbix ansible filters ''' @staticmethod def create_data(data, results, key, new_key): '''Take a dict, fil...
apache-2.0
mrichart/ns-3-dev-git
src/config-store/bindings/modulegen__gcc_ILP32.py
66
76481
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
minlexx/pyevemon
esi_client/models/get_characters_character_id_killmails_recent_200_ok.py
1
4307
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class GetCharactersCharacterIdKillmailsRecent200Ok(object): ...
gpl-3.0
trankmichael/scipy
doc/source/tutorial/stats/plots/kde_plot3.py
132
1229
import numpy as np import matplotlib.pyplot as plt from scipy import stats np.random.seed(12456) x1 = np.random.normal(size=200) # random data, normal distribution xs = np.linspace(x1.min()-1, x1.max()+1, 200) kde1 = stats.gaussian_kde(x1) kde2 = stats.gaussian_kde(x1, bw_method='silverman') fig = plt.figure(figsi...
bsd-3-clause
minhphung171093/OpenERP_V7
openerp/addons/sale_analytic_plans/__init__.py
443
1208
# -*- 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
darkleons/odoo
addons/website_gengo/__openerp__.py
385
1387
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
agpl-3.0
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Dropbox/OAuth/FinalizeOAuth.py
1
5847
# -*- coding: utf-8 -*- ############################################################################### # # FinalizeOAuth # Completes the OAuth process by retrieving a Dropbox access token and access token secret for a user, after they have visited the authorization URL returned by the InitializeOAuth choreo and click...
gpl-2.0
KunYi/Wi-FiTestSuite-UCC
python/wfa_ucc.py
3
9036
################################################################### # # Copyright (c) 2014 Wi-Fi Alliance # # Permission to use, copy, modify, and/or 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 copi...
isc
mika91/xbmc
addons/service.xbmc.versioncheck/lib/common.py
82
6948
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # 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 versio...
gpl-2.0
zubair-arbi/edx-platform
common/test/acceptance/pages/studio/html_component_editor.py
31
2225
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from component_editor import ComponentEditorView class HtmlComponentEditorView(ComponentEditorView): """ Represents the rendered view of an HTML component editor. """ editor_mode_css = '.e...
agpl-3.0
ychaim/explorer
addresses/views.py
1
33766
from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.contrib import messages from django.contrib.auth import login from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext_lazy as _ from django.utils.timezone i...
apache-2.0
zimmerle/gnuradio
gnuradio-core/src/python/gnuradio/gr/qa_message.py
18
4397
#!/usr/bin/env python # # Copyright 2004,2010 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 optio...
gpl-3.0
UOMx/edx-platform
common/test/acceptance/pages/lms/progress.py
182
3827
""" Student progress page """ from .course_page import CoursePage class ProgressPage(CoursePage): """ Student progress page. """ url_path = "progress" def is_browser_on_page(self): is_present = ( self.q(css='div.course-info').present and self.q(css='div#grade-deta...
agpl-3.0
SnappleCap/oh-mainline
vendor/packages/Django/tests/regressiontests/admin_views/admin.py
42
22489
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import tempfile import os from django import forms from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.core.files.storage import FileSystemStorage from django.core.mail import EmailMessage ...
agpl-3.0
CalebBell/ht
ht/conv_free_immersed.py
1
58245
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...
mit
ZhaoCJ/django
django/core/serializers/pyyaml.py
120
2633
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import decimal import yaml import sys from io import StringIO from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSe...
bsd-3-clause
MisterPup/Ceilometer-Juno-Extension
ceilometer/api/app.py
4
5585
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.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/li...
apache-2.0
double12gzh/nova
nova/tests/unit/compute/test_stats.py
60
8687
# Copyright (c) 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.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
thijsmie/imp_flask
imp_flask/extensions.py
1
1038
"""Flask and other extensions instantiated here. To avoid circular imports with views and create_app(), extensions are instantiated here. They will be initialized (calling init_app()) in application.py. """ from logging import getLogger from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy fr...
mit
jparise/pinball
pinball/tools/pinball_util.py
6
10373
# Copyright 2015, Pinterest, 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 writ...
apache-2.0
htzy/bigfour
manage.py
188
3930
#!/usr/bin/env python """ Usage: manage.py {lms|cms} [--settings env] ... Run django management commands. Because edx-platform contains multiple django projects, the first argument specifies which project to run (cms [Studio] or lms [Learning Management System]). By default, those systems run in with a settings file ...
agpl-3.0
jayflo/scikit-learn
sklearn/cluster/tests/test_mean_shift.py
121
3429
""" Testing for mean shift clustering methods """ import numpy as np import warnings from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import asser...
bsd-3-clause
spadae22/odoo
addons/base_iban/__init__.py
447
1073
# -*- 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...
agpl-3.0
pyinvoke/invocations
invocations/autodoc.py
1
3987
""" Sphinx autodoc hooks for documenting Invoke-level objects such as tasks. Unlike most of the rest of Invocations, this module isn't for reuse in the "import and call functions" sense, but instead acts as a Sphinx extension which allows Sphinx's `autodoc`_ functionality to see and document Invoke tasks and similar I...
bsd-2-clause
morenopc/edx-platform
lms/envs/dev.py
9
10806
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
agpl-3.0
NamelessRom/android_kernel_oneplus_msm8994
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
vijaylbais/boto
boto/roboto/awsqueryrequest.py
153
18579
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # withou...
mit
leonid-shevtsov/ClickableUrls_SublimeText
clickable_urls.py
1
5787
import sublime import sublime_plugin import webbrowser import threading class UrlHighlighter(sublime_plugin.EventListener): # Thanks Jeff Atwood http://www.codinghorror.com/blog/2008/10/the-problem-with-urls.html # ^ that up here is a URL that should be matched URL_REGEX = "\\bhttps?://[-A-Za-z0-9+&@#/%?=...
mit
nvoron23/hue
desktop/core/ext-py/tablib-develop/tablib/packages/odf/odfmanifest.py
76
3570
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library 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 2.1 of the ...
apache-2.0
mdworks2016/work_development
Python/20_Third_Certification/venv/lib/python3.7/site-packages/setuptools/py33compat.py
30
1330
import dis import array import collections try: import html except ImportError: html = None from setuptools.extern import six from setuptools.extern.six.moves import html_parser __metaclass__ = type OpArg = collections.namedtuple('OpArg', 'opcode arg') class Bytecode_compat: def __init__(self, code): ...
apache-2.0
lombritz/odoo
addons/sale_mrp/__openerp__.py
52
1952
# -*- 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
marty331/jakesclock
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py
1004
9544
# The default socket timeout, used by httplib to indicate that no timeout was # specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT import time from ..exceptions import TimeoutStateError # A sentinel value to indicate that no timeout was specified by the user in # urllib3 _Default = object() def current...
gpl-2.0
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/click/globals.py
234
1515
from threading import local _local = local() def get_current_context(silent=False): """Returns the current click context. This can be used as a way to access the current context object from anywhere. This is a more implicit alternative to the :func:`pass_context` decorator. This function is prima...
apache-2.0
martzjd/freebefore30
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/text.py
197
68779
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer import Lexer, LexerC...
mit
adityacs/ansible
lib/ansible/inventory/host.py
16
3950
# (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
iniweb/deployCD
app/views.py
1
4840
from flask import render_template, flash, url_for, request, redirect, session from flask_login import login_user, logout_user, current_user, login_required from app import app, db, gitlab, login_manager from forms import ProjectForm from models import User, Project, ROLE_USER, ROLE_ADMIN import copy import ansible.ru...
mit
394954369/horizon
openstack_dashboard/dashboards/project/images/images/forms.py
1
11525
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
sudheesh001/oh-mainline
vendor/packages/gdata/tests/module_test_runner.py
132
2146
#!/usr/bin/python # # Copyright (C) 2006 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 ...
agpl-3.0
alexpeattie/wethepeopletoolkit
wethepeopletoolkit/clusterer.py
1
2828
import pandas import numpy as np import click from bitstring import BitArray from base58 import b58encode_int, b58decode_int class Clusterer: def __init__(self): pass def cluster(self, n, state_processor, pca = False, model_type = 'kmeans', z_score_exclude = 0.0, seed = None, quiet = False): from sklearn....
mit
brummer-simon/RIOT
tests/gnrc_dhcpv6_client_6lbr/tests-as-root/01-run.py
4
6726
#!/usr/bin/env python3 # Copyright (C) 2018 Freie Universität Berlin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import os import pexpect import random import sys import time from scapy.all i...
lgpl-2.1
yanheven/cinder
cinder/test.py
3
12618
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
whn09/tensorflow
tensorflow/contrib/training/python/training/training.py
50
19844
# 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 applicable ...
apache-2.0
Poles/Poles
platforms/linux/JsonCpp/scons-local-2.3.0/SCons/Script/Interactive.py
11
14095
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # 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, incl...
gpl-3.0
mgit-at/ansible
lib/ansible/modules/network/f5/bigip_node.py
8
40098
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2016, F5 Networks Inc. # 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
massagecoin/massagecoin
contrib/bitrpc/bitrpc.py
239
7836
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
mit
graemepatt/BerryCamExpress
node_modules/grunt-npm-install/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
2542
1970
#!/usr/bin/env python # 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. """Unit tests for the common.py file.""" import gyp.common import unittest import sys class TestTopologicallySorted(unittest.TestCase): ...
bsd-3-clause
azilya/Zaliznyak-s-grammatical-dictionary
gdictionary/getfinal.py
2
1310
import csv, os def adding(lemma_noun, file_noun, tags_noun, lemma_verb, file_verb, tags_verb): """ Creates a file with final results: lemmas for unknown words and Zaliznyak's tags for them.""" outfile = open('predicted.csv', 'w', encoding = 'utf-8') writer = csv.writer(outfile, lineterminator='\n...
lgpl-3.0
mozilla/elmo
apps/homepage/management/commands/refresh_feeds.py
2
1049
# 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/. """This managment commands runs all the functions again that pull feeds (parses them and stores its results in a cache). ...
mpl-2.0
cernops/neutron
neutron/tests/unit/test_extension_extraroute.py
6
23451
# Copyright 2013, Nachi Ueno, NTT MCL, 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 # # Unles...
apache-2.0
Honry/bootstrap-demo
inst.wgt.py
15
6828
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
bsd-3-clause
yetsky/extra
packages/my-application/python-all/files/usr/lib/python2.7/gzip.py
57
18694
"""Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed.""" # based on Andrew Kuchling's minigzip.py distributed with the zlib module import struct, sys, time, os import zlib import io import __builtin__ __all__ = ["GzipFile"...
gpl-2.0
ds-hwang/chromium-crosswalk
tools/perf/page_sets/tough_scrolling_while_zoomed_in_cases.py
15
2264
# Copyright 2015 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 page_sets import diagonal_scrolling_supported_shared_state from telemetry.page import page as page_module from telemetry import story class ToughScrol...
bsd-3-clause
pypowervm/pypowervm
pypowervm/tests/test_helpers.py
2
3494
# Copyright 2014, 2016 IBM Corp. # # 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 require...
apache-2.0
quickresolve/accel.ai
flask-aws/lib/python2.7/site-packages/wheel/util.py
345
4890
"""Utility functions.""" import sys import os import base64 import json import hashlib try: from collections import OrderedDict except ImportError: OrderedDict = dict __all__ = ['urlsafe_b64encode', 'urlsafe_b64decode', 'utf8', 'to_json', 'from_json', 'matches_requirement'] def urlsafe_b64encode(d...
mit
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_core/third_party/pyparsing.py
2
97657
# module pyparsing.py # # Copyright (c) 2003,2004,2005 Paul T. McGuire # # 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...
gpl-2.0
IllusionRom-deprecated/android_platform_external_chromium_org
build/android/pylib/utils/emulator.py
26
13724
# 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. """Provides an interface to start and stop Android emulator. Assumes system environment ANDROID_NDK_ROOT has been set. Emulator: The class provides t...
bsd-3-clause
rdeheele/odoo
addons/hr_payroll_account/hr_payroll_account.py
41
10736
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
agpl-3.0
Livit/Livit.Learn.EdX.Wiki
django_notify/decorators.py
7
1503
# -*- coding: utf-8 -*- from django.utils import simplejson as json from django.http import HttpResponse from django.contrib.auth.decorators import login_required import django_notify def disable_notify(func): """Disable notifications. Example: @disable_notify def your_function(): notify("no ...
gpl-3.0
crossbario/autobahn-testsuite
autobahntestsuite/autobahntestsuite/case/case5_15.py
2
1812
############################################################################### ## ## Copyright (c) Crossbar.io Technologies 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...
apache-2.0
nutsboard/linux-am335x
tools/perf/scripts/python/sctop.py
1996
2102
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
ryos36/xen-arm
tools/python/xen/xm/main.py
3
37535
# (C) Copyright IBM Corp. 2005 # Copyright (C) 2004 Mike Wray # Copyright (c) 2005-2006 XenSource Ltd. # # Authors: # Sean Dague <sean at dague dot net> # Mike Wray <mike dot wray at hp dot com> # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the G...
gpl-2.0
petemounce/ansible
contrib/inventory/cobbler.py
47
10624
#!/usr/bin/env python """ Cobbler external inventory script ================================= Ansible has a feature where instead of reading from /etc/ansible/hosts as a text file, it can query external programs to obtain the list of hosts, groups the hosts are in, and even variables to assign to each host. To use t...
gpl-3.0
cschnei3/forseti-security
tests/enforcer/enforcer_test.py
1
4766
#!/usr/bin/env python # Copyright 2017 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 or a...
apache-2.0
bkidwell/wshare
wshare.py
1
4231
# See https://github.com/bkidwell/wshare import argparse import subprocess import re import sys from wshare_config import config def getConnDict(): txt = subprocess.getoutput('net use') if re.search(r'There are no entries in the list\.', txt): return dict() match = re.search(r'--------.*\n([\w\W]*...
mit
uranusjr/mosql
setup.py
2
1363
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import mosql with open('README.rst', 'rb') as f: README = f.read() # We want README to be a str, no matter it is byte or text. 'rb' reads bytes, # so we need extra conversion on Python 3. On Python 2 bytes is synonym to s...
mit
interlegis/rows
tests/tests_operations.py
3
4202
# coding: utf-8 # Copyright 2014-2015 Álvaro Justen <https://github.com/turicas/rows/> # # 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 yo...
gpl-3.0
victor-rene/MicroScada
pageloader.py
2
4416
import os, util import yaml import datamgr from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.uix.floatlayout import FloatLayout from kivy.uix.image import Image from kivy.graphics import Rectangle, Callback, Color from variablelabel import VariableLab...
mit
intlabs/cannyos-backend-dashboard
horizon-master/openstack_dashboard/dashboards/project/volumes/backups/views.py
9
3303
# 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...
mit
knadir/Microblog
app/forms.py
5
1280
from flask.ext.wtf import Form from wtforms import StringField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length from .models import User class LoginForm(Form): openid = StringField('openid', validators=[DataRequired()]) remember_me = BooleanField('remember_me', default=False) ...
bsd-3-clause
wasim21k/pihome
cron/port_scanner.py
1
1392
#!/usr/bin/env python #TheZero #This code is under Public Domain #ref: https://gist.github.com/TheZ3ro/7255052 from threading import Thread import socket import os, re, time, sys, subprocess class bc: HEADER = '\033[0;36;40m' ENDC = '\033[0m' SUB = '\033[3;30;45m' WARN = '\033[0;31;40m' GREEN = '\033[0;32;40m' o...
gpl-3.0
zenodo/invenio
invenio/modules/cloudconnector/utils.py
12
4432
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 option) any...
gpl-2.0
okwow123/djangol2
example/env/lib/python2.7/site-packages/django/core/checks/registry.py
114
3399
# -*- coding: utf-8 -*- from __future__ import unicode_literals from itertools import chain from django.utils.itercompat import is_iterable class Tags(object): """ Built-in tags for internal checks. """ admin = 'admin' caches = 'caches' compatibility = 'compatibility' database = 'databas...
mit
StefanRijnhart/OpenUpgrade
openerp/report/render/rml2txt/__init__.py
381
1351
# -*- 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
nii-cloud/dodai-compute
nova/db/sqlalchemy/migrate_repo/versions/011_live_migration.py
4
2949
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
chenjd/django-avatar
avatar/views.py
31
8413
from django.http import Http404 from django.shortcuts import render, redirect from django.utils import six from django.utils.translation import ugettext as _ from django.contrib import messages from django.contrib.auth.decorators import login_required from avatar.conf import settings from avatar.forms import PrimaryA...
bsd-3-clause
fweik/espresso
testsuite/scripts/tutorials/test_lattice_boltzmann_part4.py
3
1316
# Copyright (C) 2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 versio...
gpl-3.0
farhaadila/django-cms
cms/test_utils/project/fileapp/south_migrations/0001_initial.py
46
1063
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FileModel' db.create_table(u'fileapp_filemodel', ( ...
bsd-3-clause
duyetdev/openerp-6.1.1
openerp/addons/document_ftp/ftpserver/ftpserver.py
9
116090
#!/usr/bin/env python # -*- encoding: utf-8 -*- # ftpserver.py # # pyftpdlib is released under the MIT license, reproduced below: # ====================================================================== # Copyright (C) 2007 Giampaolo Rodola' <g.rodola@gmail.com> # Hacked by Fabien Pinckaers (C) 2008 <fp@tinyerp.com...
agpl-3.0
WatanabeYasumasa/edx-platform
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
27
4710
import copy from xblock.fields import Scope from collections import namedtuple from xblock.exceptions import InvalidScopeError from .definition_lazy_loader import DefinitionLazyLoader from xmodule.modulestore.inheritance import InheritanceKeyValueStore # id is a BlockUsageLocator, def_id is the definition's guid Split...
agpl-3.0
polynomial/dd-agent
modules.py
50
3205
""" Tools for loading Python modules from arbitrary locations. """ # stdlib import imp import os import re import sys # project from util import windows_friendly_colon_split WINDOWS_PATH = re.compile('[A-Z]:.*', re.IGNORECASE) def imp_type_for_filename(filename): """Given the name of a Python module, return a t...
bsd-3-clause
alvarolopez/nova
nova/tests/unit/volume/encryptors/test_cryptsetup.py
38
3321
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
danielharbor/openerp
build/lib/openerp/tools/test_config.py
456
1418
# -*- coding: utf-8 -*- """ Tests for the configuration file/command-line arguments. """ # This test should be run from its directory. # TODO A configmanager object cannot parse multiple times a config file # and/or the command line, preventing to 'reload' a configuration. import os import config config_file_00 =...
agpl-3.0
azavea/ashlar
tests/settings_travis.py
2
2147
""" Django settings for use when testing Ashlar """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os DEVELOP = True PRODUCTION = False BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'testing_travis!' ALLOWED_HOSTS = [] # Application definition...
mit
shreyasva/tensorflow
tensorflow/python/framework/tensor_util.py
4
19923
# 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 a...
apache-2.0
danielvdende/incubator-airflow
tests/dags/test_impersonation.py
15
1466
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
marissazhou/django
tests/admin_views/models.py
110
24223
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import tempfile from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.e...
bsd-3-clause
benvermaercke/pyqtgraph
examples/initExample.py
20
1586
## make this version of pyqtgraph importable before any others ## we do this to make sure that, when running examples, the correct library ## version is imported (if there are multiple versions present). import sys, os if not hasattr(sys, 'frozen'): if __file__ == '<stdin>': path = os.getcwd() else: ...
mit