repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
cristianquaglio/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 #...
apache-2.0
rasikapohankar/zeroclickinfo-fathead
lib/fathead/scala/parse.py
5
2033
from bs4 import BeautifulSoup import os BASE_DIRECTORY = "./download/api/scala" BASE_URL = "https://www.scala-lang.org/api/current/" def get_all_files(): doc_files = [] for (path, dirs, files) in os.walk(BASE_DIRECTORY): for f in files: doc_files.append( "%s/%s" % (path, f)) return doc_files def extract_ar...
apache-2.0
jeffery9/mixprint_addons
ineco_base_module/__openerp__.py
1
1474
# -*- 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
pgroudas/pants
tests/python/pants_test/targets/test_python_binary.py
2
3223
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import pytest from ...
apache-2.0
moijes12/oh-mainline
mysite/missions/migrations/0006_add_diffpatch_patchrecursive.py
119
10487
# This file is part of OpenHatch. # Copyright (C) 2010 John Stumpo # # 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 versi...
agpl-3.0
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/flask/logging.py
194
2683
# -*- coding: utf-8 -*- """ flask.logging ~~~~~~~~~~~~~ Implements the logging support for Flask. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sys from werkzeug.local import LocalProxy from logging import ...
mit
s-m-e/pycrosscall
src/zugbruecke/core/data/mem_definition.py
2
2892
# -*- coding: utf-8 -*- """ ZUGBRUECKE Calling routines in Windows DLLs from Python scripts running on unixlike systems https://github.com/pleiszenburg/zugbruecke src/zugbruecke/core/data/mem_definition.py: (Un-) packing of memory definitions Required to run on platform / side: [UNIX, WINE] Copyright (C) 2017-2...
lgpl-2.1
pyghassen/django-userena
demo/demo/settings.py
15
4235
# Django settings for Userena demo project. DEBUG = True TEMPLATE_DEBUG = DEBUG import os settings_dir = os.path.dirname(__file__) PROJECT_ROOT = os.path.abspath(os.path.dirname(settings_dir)) ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGIN...
bsd-3-clause
yinghuochong/CocosBuilder
CocosBuilder/libs/cocos2d-iphone/tools/compatibility_with_0_8/generate_compat_file.py
49
3489
import sys import os copyright = """ /* * cocos2d for iPhone: http://www.cocos2d-iphone.org * * Copyright (c) 2008-2010 Ricardo Quesada * * 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 Soft...
mit
GaussDing/django
tests/aggregation_regress/tests.py
7
52472
from __future__ import unicode_literals import datetime import pickle from decimal import Decimal from operator import attrgetter from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.db.models import ( F, Q, Avg, Count, Max, StdDev, Sum, Value, Varia...
bsd-3-clause
sachinpro/sachinpro.github.io
tensorflow/python/kernel_tests/parsing_ops_test.py
9
29936
# 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
scztt/sc-debug
Psycollider/PySCLang/setup.py
2
6295
# setup.py for use with py2exe to create the python module PySCLang # Created in March 2008 for SC 3.2 by John Glover (glover.john@gmail.com) # Usage: edit lines 13 and 16 below if necessary then run: # # python setup.py build # python setup.py install from distutils.core import setup, Extension import ...
gpl-2.0
shubhdev/edx-platform
lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py
114
13726
# -*- 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 model 'XModuleStudentInfoField' db.create_table('courseware_xmodulestudentinfofield', ( ...
agpl-3.0
tedi3231/openerp
build/lib/openerp/addons/lunch/wizard/__init__.py
440
1053
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
ashutoshvt/psi4
psi4/driver/procrouting/dft/libxc_functionals.py
5
12836
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
lgpl-3.0
imk1/IMKTFBindingCode
makeRunLiftoverScript.py
1
2528
import sys import argparse def parseArgument(): # Parse the input parser = argparse.ArgumentParser(description="Make a script that will run liftOver on a list of file names") parser.add_argument("--fileListFileName", required=True, help="List of peak files") parser.add_argument("--scriptFileName", required=True, h...
mit
sestrella/ansible
test/units/modules/network/f5/test_bigip_configsync_action.py
38
4079
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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 import os import json import pytest import sys if sys.version_info < (2, ...
gpl-3.0
ivoreis/stuff
app/assets/blueimp-jQuery-File-Upload-d73d7f4/server/gae-python/main.py
11
5125
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 1.1.4 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
mit
drxaero/calibre
src/calibre/gui2/preferences/metadata_sources.py
10
12918
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from operator...
gpl-3.0
followthesheep/galpy
galpy/potential_src/linearPotential.py
1
5617
from __future__ import division, print_function import os, os.path import pickle import numpy as nu import galpy.util.bovy_plot as plot from galpy.potential_src.Potential import PotentialError class linearPotential(object): """Class representing 1D potentials""" def __init__(self,amp=1.): self._amp= am...
bsd-3-clause
thelonecabbage/django-superbulk
django_superbulk.py
1
3867
from __future__ import absolute_import from copy import copy import json from urlparse import urlparse from django.core.urlresolvers import resolve from django.db import transaction from django.http import HttpResponse, QueryDict from django.views.decorators.http import require_http_methods class MultipleHTTPError(Ex...
gpl-2.0
muraliselva10/designate
designate/backend/impl_powerdns/migrate_repo/versions/014_placeholder.py
140
1035
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@hp.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
apache-2.0
xaviercobain88/framework-python
build/lib.linux-i686-2.7/openerp/addons/plugin/__init__.py
101
1069
# -*- 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
cihangir/koding
go/src/vendor/github.com/hashicorp/terraform/vendor/github.com/ugorji/go/codec/test.py
1516
4019
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). # Ensure msgpack-python and cbor are installed first, using: # sudo apt-get install python-dev # sudo apt-g...
agpl-3.0
mhnatiuk/phd_sociology_of_religion
scrapper/build/scrapy/build/lib.linux-x86_64-2.7/scrapy/contrib/spiders/sitemap.py
30
2670
import re from scrapy.spider import Spider from scrapy.http import Request, XmlResponse from scrapy.utils.sitemap import Sitemap, sitemap_urls_from_robots from scrapy.utils.gz import gunzip, is_gzipped from scrapy import log class SitemapSpider(Spider): sitemap_urls = () sitemap_rules = [('', 'parse')] s...
gpl-2.0
lbryio/lbryum-server
lbryumserver/claims_storage.py
1
19397
""" this file contains ClaimsStorage class which contains functions to manipulate the claim information """ import msgpack from lbryschema.decode import smart_decode from lbryschema.error import DecodeError, URIParseError from lbryschema.uri import parse_lbry_uri from lbryumserver import deserialize from lbryumserve...
agpl-3.0
ByteInternet/linux-3.2.23-grsec
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
matthewelse/micropython
tests/wipy/uart_irq.py
69
3523
''' UART IRQ test for the CC3200 based boards. ''' from machine import UART import os import time mch = os.uname().machine if 'LaunchPad' in mch: uart_pins = [[('GP12', 'GP13'), ('GP12', 'GP13', 'GP7', 'GP6')], [('GP16', 'GP17'), ('GP16', 'GP17', 'GP7', 'GP6')]] elif 'WiPy' in mch: uart_pins = [[('GP12', 'GP1...
mit
Tydus/deluge
deluge/ui/console/commands/quit.py
8
1947
# # quit.py # # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Coptright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either ve...
gpl-3.0
valkjsaaa/sl4a
python/src/Lib/distutils/extension.py
138
10325
"""distutils.extension Provides the Extension class, used to describe C/C++ extension modules in setup scripts.""" __revision__ = "$Id: extension.py 37623 2004-10-14 10:02:08Z anthonybaxter $" import os, string, sys from types import * try: import warnings except ImportError: warnings = None # This class i...
apache-2.0
patrickwind/My_Blog
venv/lib/python2.7/site-packages/flask/testing.py
150
5081
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from contextlib import contextmana...
gpl-2.0
opticron/asterisk-testsuite-temporary
tests/cdr/cdr_bridge_multi/cdr_bridge_multi.py
5
7579
""" Test CDRs in a multi-party bridge Copyright (C) 2014, Digium, Inc. Matt Jordan <mjordan@digium.com> This program is free software, distributed under the terms of the GNU General Public License Version 2. """ import logging import re LOGGER = logging.getLogger(__name__) TEST_STATE = None # Yay for human sortin...
gpl-2.0
elastacloud/libcloud
contrib/generate_provider_logos_collage_image.py
57
4221
#!/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 (th...
apache-2.0
twiest/openshift-tools
openshift/installer/vendored/openshift-ansible-3.7.42-1/roles/openshift_health_checker/test/elasticsearch_test.py
49
6248
import pytest import json from openshift_checks.logging.elasticsearch import Elasticsearch, OpenShiftCheckExceptionList task_vars_config_base = dict(openshift=dict(common=dict(config_base='/etc/origin'))) def canned_elasticsearch(task_vars=None, exec_oc=None): """Create an Elasticsearch check object with stubb...
apache-2.0
toanalien/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py
658
4406
# Copyright 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 f...
bsd-3-clause
yashaswi-reddy/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier/instance.py
9
5651
# Natural Language Toolkit - Instance # Understands the various operations that can be preformed on an instance # Each Instance inheriting from the main Instance is capable of operations # it can logically perform on that instance value eg: Test instance can # set the Class where as the Training instance ...
gpl-3.0
arifsetiawan/edx-platform
common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py
115
12476
""" Tests the logic of problems with a delay between attempt submissions. Note that this test file is based off of test_capa_module.py and as such, uses the same CapaFactory problem setup to test the functionality of the check_problem method of a capa module when the "delay between quiz submissions" setting is set to ...
agpl-3.0
x86Labs/wal-e
tests/blackbox.py
5
6326
import os import pytest import s3_integration_help import sys from wal_e import cmd _PREFIX_VARS = ['WALE_S3_PREFIX', 'WALE_WABS_PREFIX', 'WALE_SWIFT_PREFIX'] _AWS_CRED_ENV_VARS = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'AWS_SECURITY_TOKEN'] class AwsTestConfig(object): name = 'aws...
bsd-3-clause
JVillella/tensorflow
tensorflow/contrib/learn/python/learn/graph_actions_test.py
98
26415
# 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
zserg/elodie
elodie/media/photo.py
1
6426
""" The photo module contains the :class:`Photo` class, which is used to track image objects (JPG, DNG, etc.). .. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com> """ import imghdr import os import pyexiv2 import re import subprocess import time from elodie import constants from media import Media from elodie impor...
apache-2.0
ruleh/bigfatwifi
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
kirotawa/vimpastebin
plugin/vpaste/vpaste.py
1
1512
import vim import json from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError data = { 'paste_data': '', 'paste_lang': '', 'api_submit': 'true', 'mode': 'json', ...
mit
EmuxEvans/lwip_contrib
apps/simple_discovery/simple_discovery.py
2
3030
#!/usr/bin/env python #***************************************************************//** # # @file simple_discovery.py # # @author Logan Gunthorpe <logang@deltatee.com> # # @brief simple device discovery # # Copyright (c) Deltatee Enterprises Ltd. 2013 # All rights reserved. # #**********************************...
bsd-3-clause
WafaaT/spark-tk
python/sparktk/tests/test_arguments.py
11
13932
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
quimaguirre/diana
diana/classes/goatools/test_data/gjoneska_2015_ensmusg2symbol.py
3
510371
"""13,836 Gjoneska mouse gene Ensembl IDs and gene Symbols. 2015 Gjoneska paper: Conserved epigenomic signals in mice and humans reveal immune basis of Alzheimer's disease. """ ensmusg2symbol = { 'ENSMUSG00000002012' : 'Pnck', 'ENSMUSG00000031592' : 'Pcm1', 'ENSMUSG00000002010' : 'Idh...
mit
vegetableman/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/newstringio_unittest.py
124
1811
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
frreiss/tensorflow-fred
tensorflow/python/util/module_wrapper_test.py
5
5710
# Copyright 2019 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
akosyakov/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/gdal/srs.py
291
11717
""" The Spatial Reference class, represensents 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, AUTHORI...
apache-2.0
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/pandas/sparse/tests/test_arithmetics.py
7
19543
import numpy as np import pandas as pd import pandas.util.testing as tm class TestSparseArrayArithmetics(tm.TestCase): _multiprocess_can_split_ = True _base = np.array _klass = pd.SparseArray def _assert(self, a, b): tm.assert_numpy_array_equal(a, b) def _check_numeric_ops(self, a, b, ...
mit
MostafaGazar/tensorflow
tensorflow/python/framework/versions_test.py
15
1912
# 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
arthurdejong/python-stdnum
stdnum/cz/dic.py
1
3472
# dic.py - functions for handling Czech VAT numbers # coding: utf-8 # # Copyright (C) 2012-2017 Arthur de Jong # # 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 th...
lgpl-2.1
mdauphin/pyads
pyads/gui.py
1
4540
#-*-coding: utf-8-*- """ pyads.gui ~~~~~~~~~ Mapper class for binding GUI objects to the ADS API. :copyright: © 2013 by Stefan Lehmann :license: MIT, see LICENSE for details """ from constants import INDEXGROUP_MEMORYBIT, PLCTYPE_BOOL, INDEXGROUP_MEMORYBYTE from pyads import adsSyncWriteReq, adsS...
mit
HackLinux/pyes
pyes/query.py
2
65220
# -*- coding: utf-8 -*- import six from .exceptions import InvalidQuery, InvalidParameterQuery, QueryError, \ ScriptFieldsError from .sort import SortFactory from .facets import FacetFactory from .aggs import AggFactory from .filters import ANDFilter, Filter from .highlight import HighLighter from .scriptfields im...
bsd-3-clause
kevin-coder/tensorflow-fork
tensorflow/compiler/tests/self_adjoint_eig_op_test.py
5
2200
# Copyright 2019 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
onetinyr/flask
flask/testing.py
150
5081
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from contextlib import contextmana...
bsd-3-clause
maohongyuan/kbengine
kbe/res/scripts/common/Lib/distutils/command/check.py
78
5484
"""distutils.command.check Implements the Distutils 'check' command. """ from distutils.core import Command from distutils.errors import DistutilsSetupError try: # docutils is installed from docutils.utils import Reporter from docutils.parsers.rst import Parser from docutils import frontend from d...
lgpl-3.0
Achint08/open-event-orga-server
app/helpers/flask_ext/jinja/variables.py
7
1135
from datetime import datetime from flask import request from app.helpers.babel import babel from app.helpers.data_getter import DataGetter from app.settings import get_settings from config import LANGUAGES @babel.localeselector def get_locale(): try: return request.cookies["selected_lang"] except: ...
gpl-3.0
gamahead/nupic
examples/opf/clients/hotgym/prediction/one_gym/cleanup.py
17
2052
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
gpl-3.0
BinPy/BinPy
BinPy/tests/series_4000_tests.py
4
19259
from BinPy import * from nose.tools import with_setup, nottest ################################# # IC's with 14 pins ################################# def test_IC_4000(): test_IC = IC_4000() p = {3: 1, 4: 1, 5: 1, 7: 0, 8: 1, 11: 0, 12: 0, 13: 0, 14: 1} test_IC.set_IC(p) q = {6: 0, 9: 0, 10: 1} i...
bsd-3-clause
drasmuss/numpy
numpy/f2py/tests/test_return_complex.py
145
4777
from __future__ import division, absolute_import, print_function from numpy import array from numpy.compat import long from numpy.testing import run_module_suite, assert_, assert_raises, dec import util class TestReturnComplex(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] ...
bsd-3-clause
apiad/sublime-browser-integration
selenium/webdriver/remote/webdriver.py
9
26522
# Copyright 2008-2013 Software freedom conservancy # # 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 ...
mit
SUSE/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/cluster_upgrade_health_policy_object.py
2
2627
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
sejust/pykit
logcollector/scanner.py
2
3851
import logging import os import time from pykit import fsutil logger = logging.getLogger(__name__) class ParseLogError(Exception): pass def build_entry(context, log_name, file_name, log_str, log_conf): log_entry = { 'log_name': log_name, 'log_file': file_name, 'content': log_str, ...
mit
VOLTTRON/volttron-applications
pnnl/deprecated/AFDDAgent/afdd/afdd.py
5
50740
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2015, Battelle Memorial Institute # 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. Redistri...
bsd-3-clause
dennisfrancis/PacketManipulator
umit/pm/gui/widgets/pygtkhexview.py
2
6711
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Adriano Monteiro Marques # # Author: Francesco Piccinno <stack.box@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation;...
gpl-2.0
SickGear/SickGear
lib/hachoir_py2/parser/misc/chm.py
2
14636
""" InfoTech Storage Format (ITSF) parser, used by Microsoft's HTML Help (.chm) Document: - Microsoft's HTML Help (.chm) format http://www.wotsit.org (search "chm") - chmlib library http://www.jedrea.com/chmlib/ - Unofficial CHM Spec http://savannah.nongnu.org/projects/chmspec - Microsoft's HTML Help (.chm) form...
gpl-3.0
ChanduERP/odoo
addons/crm_helpdesk/__openerp__.py
260
1956
# -*- 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
ric2b/Vivaldi-browser
chromium/third_party/blink/web_tests/external/wpt/tools/wpt/install.py
6
3350
import argparse import browser import sys latest_channels = { 'firefox': 'nightly', 'chrome': 'dev', 'chrome_android': 'dev', 'edgechromium': 'dev', 'safari': 'preview', 'servo': 'nightly' } channel_by_name = { 'stable': 'stable', 'release': 'stable', 'beta': 'beta', 'nightly'...
bsd-3-clause
julian-seward1/servo
tests/wpt/web-platform-tests/css/tools/html2xhtml.py
46
2059
#!/usr/bin/python # This file is licensed under CC Zero import sys import html5lib import re if len(sys.argv) != 3: print """! html2xhtml requires two arguments: the filename to read, and the filename to write""" exit() ####################################################################### # Parse HTML and out...
mpl-2.0
amarack/python-rl
pyrl/environments/pomdp.py
2
5309
# # Copyright (C) 2013, Will Dabney # # 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 ...
gpl-3.0
escapewindow/mozharness
configs/builds/releng_sub_linux_configs/64_asan_and_debug.py
2
2263
MOZ_OBJDIR = 'obj-firefox' config = { 'default_actions': [ 'clobber', 'clone-tools', 'setup-mock', 'build', 'generate-build-props', # 'generate-build-stats', asan_and_debug skips this action 'symbols', 'packages', 'upload', 'sendchange...
mpl-2.0
zzcclp/spark
python/pyspark/resource/__init__.py
28
1317
# # 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
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/grpc/src/python/grpcio/grpc/framework/interfaces/base/utilities.py
34
3133
# Copyright 2015, 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...
gpl-3.0
ros-infrastructure/ros_buildfarm
ros_buildfarm/config/__init__.py
1
3869
# Copyright 2013-2016 Open Source Robotics Foundation, 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 applicabl...
apache-2.0
hawkeyexp/plugin.video.netflix
resources/lib/navigation/directory_search.py
1
11295
# -*- coding: utf-8 -*- """ Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix) Copyright (C) 2020 Stefano Gottardo (original implementation module) Navigation for search menu SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. """ from __future__ import absolute_import, ...
mit
waynesun09/tp-libvirt
libvirt/tests/src/virsh_cmd/snapshot/virsh_snapshot_edit.py
4
8688
import re import time import logging import aexpect from autotest.client.shared import error from virttest import virsh from virttest import utils_test from virttest import remote from virttest.libvirt_xml import vm_xml def run(test, params, env): """ Test command: snapshot-edit Test options: --current...
gpl-2.0
craftytrickster/servo
tests/wpt/web-platform-tests/tools/py/py/_error.py
186
2818
""" create errno-specific classes for IO or os calls. """ import sys, os, errno class Error(EnvironmentError): def __repr__(self): return "%s.%s %r: %s " %(self.__class__.__module__, self.__class__.__name__, self.__class__.__doc__, ...
mpl-2.0
coldmind/django
django/contrib/sites/management.py
467
1564
""" Creates the default Site object. """ from django.apps import apps from django.conf import settings from django.core.management.color import no_style from django.db import DEFAULT_DB_ALIAS, connections, router def create_default_site(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs): ...
bsd-3-clause
Yukinoshita47/Yuki-Chan-The-Auto-Pentest
Module/dirsearch/lib/core/Scanner.py
1
3996
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the ho...
mit
cr/fxos-certsuite
webapi_tests/fm_radio/fm_radio_test.py
4
5024
# 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 time from marionette.wait import Wait class FMRadioTestCommon(object): def __init__(self): # ensur...
mpl-2.0
badri/django-profile
userprofile/urls/es.py
11
4116
from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template from userprofile.views import * from django.conf import settings urlpatterns = patterns('', # Private profile url(r'^perfil/$', overview, name='profile_overview'), url(r'^perfil/editar/ubicacion/$', location...
bsd-2-clause
sodexis/odoo
addons/pos_discount/__init__.py
315
1072
# -*- 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
jgeskens/django
django/contrib/auth/management/__init__.py
5
6631
""" Creates permissions for all installed apps that need permissions. """ from __future__ import unicode_literals import getpass import locale import unicodedata from django.contrib.auth import models as auth_app, get_user_model from django.core import exceptions from django.core.management.base import CommandError f...
bsd-3-clause
JohnGriffiths/nipype
nipype/interfaces/fsl/tests/test_auto_ApplyMask.py
9
1359
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.fsl.maths import ApplyMask def test_ApplyMask_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True...
bsd-3-clause
libornovax/master_thesis_code
scripts/data/shared/geometry.py
1
3932
""" Geometric transformation functions and matrices. Contains functions for creating translation and rotation matrices and others. """ __date__ = '03/15/2016' __author__ = 'Libor Novak' __email__ = 'novakli2@fel.cvut.cz' import numpy as np ########################################################################...
mit
proxysh/Safejumper-for-Mac
buildmac/Resources/env/lib/python2.7/site-packages/twisted/test/test_text.py
13
6456
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.text}. """ from twisted.python.compat import NativeStringIO as StringIO from twisted.trial import unittest from twisted.python import text sampleText = \ """Every attempt to employ mathematical methods in the stu...
gpl-2.0
jacobian-archive/django-buildmaster
djangobotcfg/slaves.py
2
6797
""" Defines slaves and their capabilities. Some of the ideas here come from Buildbot's buildbot: http://github.com/buildbot/metabbotcfg/blob/master/slaves.py. """ from buildbot.buildslave import BuildSlave from unipath import FSPath as Path from .utils import parse_version_spec from .rsc_slave import CloudserversLate...
bsd-3-clause
rajanandakumar/DIRAC
WorkloadManagementSystem/DB/PilotAgentsDB.py
4
44671
""" PilotAgentsDB class is a front-end to the Pilot Agent Database. This database keeps track of all the submitted grid pilot jobs. It also registers the mapping of the DIRAC jobs to the pilot agents. Available methods are: addPilotTQReference() setPilotStatus() deletePilot() clearPilo...
gpl-3.0
illfelder/compute-image-packages
packages/python-google-compute-engine/google_compute_engine/clock_skew/tests/clock_skew_daemon_test.py
6
3966
#!/usr/bin/python # Copyright 2016 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 appli...
apache-2.0
nimengyu2/ti-a8-linux-04.06.00.03
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
mars-knowsnothing/amos-bot
src/Lib/site-packages/pip/utils/glibc.py
350
2939
from __future__ import absolute_import import re import ctypes import platform import warnings def glibc_version_string(): "Returns glibc version string, or None if not using glibc." # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the retur...
gpl-3.0
smlng/RIOT
dist/tools/mkconstfs/mkconstfs2.py
33
4886
#!/usr/bin/env python3 import os import sys import argparse import pathlib import posixpath import io import itertools import mmap import shutil from binascii import hexlify C_HEADER = """/* This file was automatically generated by mkconstfs2. * !!!! DO NOT EDIT !!!!! */ #include <stdint.h> #include "fs/constfs.h"...
lgpl-2.1
pam-bot/SMSQuery
lib/werkzeug/utils.py
145
22826
# -*- coding: utf-8 -*- """ werkzeug.utils ~~~~~~~~~~~~~~ This module implements various utilities for WSGI applications. Most of them are used by the request and response wrappers but especially for middleware development it makes sense to use them without the wrappers. :copyright: (c) 2014 ...
gpl-2.0
mozilla/app-validator
tests/test_submain.py
5
5088
import time from mock import patch from nose.tools import eq_ import appvalidator.submain as submain from appvalidator.errorbundle import ErrorBundle from appvalidator.constants import * from helper import MockXPI @patch("appvalidator.submain.test_package", lambda w, x, y: True) def test_prepare_package(): ...
bsd-3-clause
Edraak/edraak-platform
common/test/acceptance/pages/studio/pagination.py
165
2099
""" Mixin to include for Paginated container pages """ from selenium.webdriver.common.keys import Keys class PaginatedMixin(object): """ Mixin class used for paginated page tests. """ def nav_disabled(self, position, arrows=('next', 'previous')): """ Verifies that pagination nav is dis...
agpl-3.0
naemono/pyrax
samples/autoscale/delete_policy.py
13
2639
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, 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.ap...
apache-2.0
keans/dstools
dstools/osutils.py
1
7697
import os import sys import gzip import io import glob import codecs import collections import bz2 import shutil # ----------- path ---------- def get_path_or_create(path): """ returns the path and the flag, if it has been just created """ path = os.path.abspath(os.path.expanduser(path)) if not os...
mit
craynot/django
django/conf/locale/ml/formats.py
1007
1815
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' TIME_FORMAT = 'P' DATETIM...
bsd-3-clause
sahiljain/catapult
third_party/Paste/paste/auth/grantip.py
50
4021
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Grant roles and logins based on IP address. """ import six from paste.util import ip4 class GrantIPMiddleware(object): """ On each reques...
bsd-3-clause
authbox-lib/slidingd
scripts/kafka-dump-reader.py
1
1490
import json import sys import io import time sys.path.append('../gen-py') from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from slidinghyper import SlidingHyperService host, port = 'localhost', 9007 transport = TSocke...
bsd-3-clause