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
syci/ingadhoc-odoo-addons
product_price_currency/product.py
2
2492
# -*- coding: utf-8 -*- from openerp import fields, models, api import openerp.addons.decimal_precision as dp class product_template(models.Model): _inherit = 'product.template' @api.model def get_currency_id(self): price_type_obj = self.env['product.price.type'] price_type_ids = price_ty...
agpl-3.0
lmprice/ansible
lib/ansible/plugins/lookup/k8s.py
2
11120
# # Copyright 2018 Red Hat | Ansible # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
gpl-3.0
lnliuxing/Impala
shell/ext-py/sasl-0.1.1/sasl/saslwrapper.py
76
4375
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. import _saslwrapper import new new_instancemethod = new.instancemethod try: _swig_property = prop...
apache-2.0
jalilag/apspir
objdictgen/gnosis/xml/pickle/ext/_mutators.py
3
7670
from _mutate import XMLP_Mutator, XMLP_Mutated import _mutate import sys, string from types import * from gnosis.util.introspect import isInstanceLike, attr_update, \ data2attr, attr2data, getCoreData, setCoreData, isinstance_any from gnosis.xml.pickle.util import _klass, _module, obj_from_name from gnosis.util.Xt...
lgpl-2.1
xq262144/hue
desktop/core/ext-py/Django-1.6.10/tests/validators/tests.py
38
9616
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import types from datetime import datetime, timedelta from django.core.exceptions import ValidationError from django.core.validators import * from django.test.utils import str_prefix from django.utils.unittest import TestCase NOW = datetime.n...
apache-2.0
ychen820/microblog
y/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/core/updater/local_state.py
2
26812
# Copyright 2013 Google Inc. All Rights Reserved. """Manages the state of what is installed in the cloud SDK. This tracks the installed modules along with the files they created. It also provides functionality like extracting tar files into the installation and tracking when we check for updates. """ import errno i...
bsd-3-clause
supriyantomaftuh/django
tests/template_tests/filter_tests/test_truncatechars_html.py
390
1229
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import truncatechars_html from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_truncate_zero(self): self.assertEqual(truncatechars_html('<p>one <a href="#">two - three <br>...
bsd-3-clause
psykidellic/appengine-flask-skeleton
lib/pyasn1_modules/rfc2560.py
127
7821
# # OCSP request/response syntax # # Derived from a minimal OCSP library (RFC2560) code written by # Bud P. Bruegger <bud@ancitel.it> # Copyright: Ancitel, S.p.a, Rome, Italy # License: BSD # # # current limitations: # * request and response works only for a single certificate # * only some values are parsed out of t...
apache-2.0
playm2mboy/edx-platform
lms/djangoapps/shoppingcart/migrations/0027_add_invoice_history.py
102
22387
# -*- 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 'InvoiceHistory' db.create_table('shoppingcart_invoicehistory', ( ('id', self.gf(...
agpl-3.0
IronLanguages/ironpython3
Src/StdLib/Lib/csv.py
90
16185
""" csv.py - read/write/investigate CSV files """ import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ ...
apache-2.0
heisewangluo/micropython
tools/make-frozen.py
34
1275
#!/usr/bin/env python # # Create frozen modules structure for MicroPython. # # Usage: # # Have a directory with modules to be frozen (only modules, not packages # supported so far): # # frozen/foo.py # frozen/bar.py # # Run script, passing path to the directory above: # # ./make-frozen.py frozen > frozen.c # # Include ...
mit
harshaneelhg/scikit-learn
sklearn/naive_bayes.py
128
28358
# -*- coding: utf-8 -*- """ The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These are supervised learning methods based on applying Bayes' theorem with strong (naive) feature independence assumptions. """ # Author: Vincent Michel <vincent.michel@inria.fr> # Minor fixes by Fabian Pedre...
bsd-3-clause
3dfxmadscientist/odoo-infrastructure
addons/infrastructure/hostname.py
1
1468
# -*- coding: utf-8 -*- ############################################################################## # # Infrastructure # Copyright (C) 2014 Ingenieria ADHOC # No email # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
agpl-3.0
andresmrm/brython-experiment
static/brython/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...
agpl-3.0
neurotechuoft/MindType
Code/V1/src/deprecated/pyqtgraph/tests/test_srttransform3d.py
51
1339
import pyqtgraph as pg from pyqtgraph.Qt import QtCore, QtGui import numpy as np from numpy.testing import assert_array_almost_equal, assert_almost_equal testPoints = np.array([ [0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1], ...
agpl-3.0
devendermishrajio/nova_test_latest
nova/tests/unit/scheduler/filters/test_json_filters.py
63
11677
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
shashank971/edx-platform
openedx/core/djangoapps/credit/routers.py
138
1338
""" DRF routers. """ from rest_framework import routers class SimpleRouter(routers.SimpleRouter): """ Simple DRF router. """ # Note (CCB): This is a retrofit of a DRF 2.4 feature onto DRF 2.3. This is, sadly, simpler than # updating edx-ora2 to work with DRF 2.4. See https://github.com/tomchristie/djang...
agpl-3.0
bwsblake/lettercounter
django-norel-env/lib/python2.7/site-packages/django/contrib/messages/tests/urls.py
197
1959
from django.conf.urls import patterns from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext, Template from django.template.response import TemplateResponse from django.views.decorators.cache ...
mit
baiyunping333/BurpSuite-Plugins
Sqlmap/thirdparty/chardet/sbcsgroupprober.py
235
3127
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-2.0
alianmohammad/pd-gem5-latest
tests/quick/se/70.tgen/test.py
74
2122
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
brian-l/django-1.4.10
tests/regressiontests/admin_filters/tests.py
6
35308
from __future__ import absolute_import import datetime from django.contrib.admin import (site, ModelAdmin, SimpleListFilter, BooleanFieldListFilter) from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.core.e...
bsd-3-clause
Edu-Glez/Bank_sentiment_analysis
env/lib/python3.6/site-packages/traitlets/tests/_warnings.py
17
4019
# From scikit-image: https://github.com/scikit-image/scikit-image/blob/c2f8c4ab123ebe5f7b827bc495625a32bb225c10/skimage/_shared/_warnings.py # Licensed under modified BSD license __all__ = ['all_warnings', 'expected_warnings'] from contextlib import contextmanager import sys import warnings import inspect import re ...
apache-2.0
locke105/mclib
examples/wsgi.py
1
1781
import cgi import json from wsgiref import simple_server import falcon from mclib import mc_info class MCInfo(object): def on_get(self, req, resp): host = req.get_param('host', required=True) port = req.get_param_as_int('port', min=1024, max=65565) ...
apache-2.0
Meertecha/LearnPythonTheGame
pyGameEngine.py
1
3565
### Imports import pickle, os, platform, random ### Functions def main(): curPlayer = loadPlayer( 'Tory' ) curGame = loadGame( 'Python_Tutorial' ) startGame(curPlayer, curGame) def banner(): ''' if platform.system() == "Windows": clearCmd = "cls" elif platform.system() == "Linux": clearCmd = "clear" ...
mit
openbig/odoo-contract
partner_billing/wizard/sale_make_invoice_advance.py
1
1615
# -*- encoding: utf-8 -*- ############################################################################## # # partner_billing # (C) 2015 Mikołaj Dziurzyński, Grzegorz Grzelak, Thorsten Vocks (big-consulting GmbH) # All Rights reserved # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
ingo-m/pyprf
pyprf/analysis/pyprf_main.py
2
14174
# -*- coding: utf-8 -*- """Find best fitting model time courses for population receptive fields. Use `import pRF_config as cfg` for static pRF analysis. Use `import pRF_config_motion as cfg` for pRF analysis with motion stimuli. """ # Part of py_pRF_mapping library # Copyright (C) 2016 Ingo Marquardt # # This prog...
gpl-3.0
lipixun/pytest
rabbitmq/deadchannel/going2dead.py
1
2112
#!/usr/bin/env python # encoding=utf8 # The dead channel applicationn import sys reload(sys) sys.setdefaultencoding('utf8') from uuid import uuid4 from time import time, sleep from haigha.connections.rabbit_connection import RabbitConnection from haigha.message import Message class Client(object): """The RPC Cl...
gpl-2.0
Gustry/inasafe
safe/gui/tools/multi_buffer_dialog.py
3
11681
# coding=utf-8 """**Multi Buffer Tool Implementation.**""" import logging import os from collections import OrderedDict from operator import itemgetter from qgis.core import QgsMapLayerRegistry from qgis.gui import QgsMapLayerProxyModel from PyQt4 import QtGui from PyQt4.QtCore import pyqtSignature, pyqtSlot from PyQ...
gpl-3.0
gf712/AbPyTools
abpytools/core/fab_collection.py
1
14123
from .chain_collection import ChainCollection import numpy as np import pandas as pd from .chain import calculate_charge from abpytools.utils import DataLoader from operator import itemgetter from .fab import Fab from .helper_functions import germline_identity_pd, to_numbering_table from .base import CollectionBase imp...
mit
tartavull/google-cloud-python
bigtable/tests/unit/test_client.py
2
24528
# Copyright 2015 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 agreed to in writing, ...
apache-2.0
jwill89/clifford-discord-bot
source/retired/main.py
1
31345
import discord from discord.ext import commands import random import MySQLdb # ********************************************** # # DEFINITIONS ********************************** # # ********************************************** # # Bot Description description = '''Official Zealot Gaming Discord bot!''' # Define Bot ...
gpl-3.0
AlbertoPeon/invenio
modules/bibsword/lib/bibsword_client_templates.py
37
41746
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2010, 2011 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 optio...
gpl-2.0
jcai19/smm_gem5
src/dev/x86/I82094AA.py
69
2201
# Copyright (c) 2008 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
bsd-3-clause
MichaelNedzelsky/intellij-community
python/helpers/py3only/docutils/parsers/rst/languages/zh_cn.py
52
3936
# -*- coding: utf-8 -*- # $Id: zh_cn.py 7119 2011-09-02 13:00:23Z milde $ # Author: Panjunyong <panjy@zopechina.com> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two fil...
apache-2.0
nicain/dipde_dev
dipde/interfaces/zmq/__init__.py
1
4371
import time import zmq import threading context = zmq.Context() class PublishCallback(object): def __init__(self, port, topic, message_callback): self.port = port self.topic = topic self.message_callback = message_callback self.socket = context.socket(zmq.PUB)...
gpl-3.0
ZhaoCJ/django
django/db/backends/utils.py
2
5407
from __future__ import unicode_literals import datetime import decimal import hashlib import logging from time import time from django.conf import settings from django.utils.encoding import force_bytes from django.utils.timezone import utc logger = logging.getLogger('django.db.backends') class CursorWrapper(objec...
bsd-3-clause
ReturntoZero/codecombat
scripts/analytics/mixpanelGetEvent.py
97
7517
# Get mixpanel event data via export API # Useful for debugging Mixpanel data weirdness targetLevels = ['dungeons-of-kithgard', 'the-raised-sword', 'endangered-burl'] targetLevels = ['dungeons-of-kithgard'] eventFunnel = ['Started Level', 'Saw Victory'] # eventFunnel = ['Saw Victory'] # eventFunnel = ['Started Level']...
mit
lunafeng/django
django/core/mail/backends/console.py
696
1477
""" Email backend that writes messages to console instead of sending them. """ import sys import threading from django.core.mail.backends.base import BaseEmailBackend from django.utils import six class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): self.stream = kwargs.pop('stream',...
bsd-3-clause
sambyers/o365_fmc
.venv/lib/python3.6/site-packages/requests/packages/__init__.py
838
1384
''' Debian and other distributions "unbundle" requests' vendored dependencies, and rewrite all imports to use the global versions of ``urllib3`` and ``chardet``. The problem with this is that not only requests itself imports those dependencies, but third-party code outside of the distros' control too. In reaction to t...
gpl-3.0
infinitespace/deepdive
ddlib/without_ddlib.py
15
1750
#! /usr/bin/env python # File: udf/ext_has_spouse_features.py import sys, json # For each input tuple # TODO: Sample Data and the input schema. # sample json for row in sys.stdin: obj = json.loads(row) # Library/DSL??? This is a span, it should be an object. p1_start = obj["p1.start_position"] p1_length = o...
apache-2.0
yantrabuddhi/nativeclient
buildbot/buildbot_lib.py
1
21952
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import os.path import shutil import subprocess import stat import sys import time import traceback ARCH_MAP = { ...
bsd-3-clause
willharris/django
django/db/models/options.py
30
35264
from __future__ import unicode_literals import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import AutoFiel...
bsd-3-clause
tjcsl/director
web3/apps/sites/migrations/0001_initial.py
1
1297
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-05 23:20 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('users', '...
mit
scroggo/skia
tools/skp/recreate_skps.py
10
2822
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run the webpages_playback automation script.""" import os import subprocess import sys sys.path.insert(0, os.getcwd()) from...
bsd-3-clause
g-k/servo
tests/wpt/harness/wptrunner/testloader.py
34
22201
import json import os import sys import urlparse from abc import ABCMeta, abstractmethod from Queue import Empty from collections import defaultdict, OrderedDict, deque from multiprocessing import Queue import manifestinclude import manifestexpected import wpttest from mozlog import structured manifest = None manifes...
mpl-2.0
lisa-groundhog/GroundHog
groundhog/layers/ff_layers.py
16
18887
""" Feedforward layers. TODO: write more documentation """ __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "KyungHyun Cho " "Caglar Gulcehre ") __contact__ = "Razvan Pascanu <r.pascanu@gmail>" import numpy import copy import theano import theano.tensor as TT from th...
bsd-3-clause
rabernat/xmitgcm
xmitgcm/_version.py
2
18453
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
mit
aselle/tensorflow
tensorflow/contrib/timeseries/python/timeseries/math_utils.py
14
43089
# 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
TAMU-CPT/galaxy-tools
tools/gff3/gff3_filter.py
1
1553
#!/usr/bin/env python import sys import logging import argparse from cpt_gffParser import gffParse, gffWrite from gff3 import feature_lambda, feature_test_qual_value logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def gff_filter(gff3, id_list=None, id="", attribute_field="ID", subfeatures=T...
gpl-3.0
boyuegame/kbengine
kbe/src/lib/python/Lib/subprocess.py
67
63971
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""subprocess - Subpr...
lgpl-3.0
dekom/threepress-bookworm-read-only
bookworm/gdata/src/gdata/tlslite/__init__.py
409
1129
""" TLS Lite is a free python library that implements SSL v3, TLS v1, and TLS v1.1. TLS Lite supports non-traditional authentication methods such as SRP, shared keys, and cryptoIDs, in addition to X.509 certificates. TLS Lite is pure python, however it can access OpenSSL, cryptlib, pycrypto, and GMPY for faster crypt...
bsd-3-clause
greggian/TapdIn
django/contrib/localflavor/us/models.py
1
1132
from django.conf import settings from django.db.models.fields import Field class USStateField(Field): def get_internal_type(self): return "USStateField" def db_type(self): if settings.DATABASE_ENGINE == 'oracle': return 'CHAR(2)' else: retu...
apache-2.0
seraphlnWu/in_trip
in_trip/scripts/change_data_from_hbase_to_pg.py
1
1620
#coding=utf-8 import time import cPickle from in_trip.store_data.views import pg_db,conn import logging logger = logging.getLogger('parser') def creat_table(): sql_str = ''' create table "tmp_hbase_to_pg"( data text, timestamp float(24) ) ''' pg_db...
mit
QianBIG/odoo
addons/l10n_ro/res_partner.py
309
2255
# -*- encoding: utf-8 -*- ############################################################################## # # @author - Fekete Mihai <feketemihai@gmail.com> # Copyright (C) 2011 TOTAL PC SYSTEMS (http://www.www.erpsystems.ro). # Copyright (C) 2009 (<http://www.filsystem.ro>) # # This program is free softwa...
agpl-3.0
ngpestelos/ansible
test/units/parsing/vault/test_vault_editor.py
142
6762
# (c) 2014, James Tanner <tanner.jc@gmail.com> # (c) 2014, James Cammarata, <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version ...
gpl-3.0
Eksmo/calibre
src/odf/odf2xhtml.py
10
68488
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2006-2010 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 L...
gpl-3.0
fallen/artiq
artiq/frontend/artiq_run.py
1
4103
#!/usr/bin/env python3 # Copyright (C) 2014, 2015 M-Labs Limited # Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com> import argparse import sys import time from operator import itemgetter from itertools import chain import logging import h5py from artiq.language.environment import EnvExperiment from artiq....
gpl-3.0
blueskycoco/rt-thread
bsp/nuvoton/numaker-iot-m487/rtconfig.py
12
3486
import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = r'...
gpl-2.0
cernops/neutron
neutron/db/external_net_db.py
17
6456
# Copyright (c) 2013 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
coryb/aminator
aminator/plugins/finalizer/tagging_s3.py
2
9211
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, 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 ...
apache-2.0
template01/editthispost
node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
1825
17014
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
mit
zederson/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/gb2312prober.py
2994
1681
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
lgpl-2.1
akrzos/cfme_tests
cfme/tests/integration/test_aws_iam_auth_and_roles.py
2
1835
import pytest from cfme.configure.access_control import simple_user from cfme.login import login from cfme.web_ui import menu from utils.conf import credentials from utils.testgen import auth_groups, generate from utils import version from utils.providers import setup_a_provider pytest_generate_tests = generate(auth_...
gpl-2.0
vntarasov/openpilot
selfdrive/debug/get_fingerprint.py
1
1030
#!/usr/bin/env python3 # simple script to get a vehicle fingerprint. # Instructions: # - connect to a Panda # - run selfdrive/boardd/boardd # - launching this script # - turn on the car in STOCK MODE (set giraffe switches properly). # Note: it's very important that the car is in stock mode, in order to collect a co...
mit
rubenacevedo3/cpp-RoboDogVoiceController
vendor/googletest/googletest/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 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...
mit
mcr/ietfdb
django/core/management/base.py
45
16447
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
bsd-3-clause
vcoin-project/v
qa/rpc-tests/test_framework/bignum.py
1
1991
# # # bignum.py # # This file is copied from python-vcoinlib. # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # """Bignum routines""" from __future__ import absolute_import, division, print_function, unicode_literals impor...
mit
CatsAndDogsbvba/odoo
addons/hr_timesheet_invoice/report/__init__.py
433
1136
# -*- 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
xianjunzhengbackup/Cloud-Native-Python
env/lib/python3.5/site-packages/pip/__init__.py
328
11348
#!/usr/bin/env python from __future__ import absolute_import import locale import logging import os import optparse import warnings import sys import re # 2016-06-17 barry@debian.org: urllib3 1.14 added optional support for socks, # but if invoked (i.e. imported), it will issue a warning to stderr if socks # isn't a...
mit
jherico/ctypesgen
ctypesgencore/options.py
13
1164
#!/usr/bin/env python """ All of the components of ctypegencore require an argument called "options". In command-line usage, this would be an optparser.Values object. However, if ctypesgencore is used as a standard Python module, constructing this object would be a pain. So this module exists to provide a "default" op...
bsd-3-clause
translate/pootle
pytest_pootle/env.py
3
23700
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os from datetime import timedelta fr...
gpl-3.0
alexandrul-ci/robotframework
utest/writer/test_rowsplitter.py
7
5821
import unittest from robot.writer.rowsplitter import RowSplitter from robot.utils.asserts import assert_equal class TestRowSplitter(unittest.TestCase): def _test(self, data, expected, cols=3, table_type='settings'): splitter = RowSplitter(cols=cols) actual = list(splitter.split(data, table_type)...
apache-2.0
DSMan195276/protura-binutils
gdb/syscalls/arm-linux.py
46
1759
# Copyright (C) 2013-2015 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. import sys import re import ...
gpl-2.0
kose-y/pylearn2
pylearn2/scripts/papers/dropout/tests/test_dropout.py
46
2057
""" Unit tests for dropout paper """ import os from pylearn2.scripts.tests.yaml_testing import limited_epoch_train from pylearn2.testing.skip import skip_if_no_data from theano import config from theano.compile import get_default_mode yaml_file_path = os.path.abspath(os.path.join(os.path.dirname(__file__), ...
bsd-3-clause
ultimanet/nifty
rg/powerspectrum.py
1
26583
## NIFTY (Numerical Information Field Theory) has been developed at the ## Max-Planck-Institute for Astrophysics. ## ## Copyright (C) 2013 Max-Planck-Society ## ## Author: Marco Selig ## Project homepage: <http://www.mpa-garching.mpg.de/ift/nifty/> ## ## This program is free software: you can redistribute it and/or mod...
gpl-3.0
MackZxh/OCA-Choice
hr/hr_contract_multi_jobs/__openerp__.py
13
1494
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publish...
lgpl-3.0
KublaikhanGeek/scrapy
scrapy/spidermiddlewares/offsite.py
85
2120
""" Offsite Spider Middleware See documentation in docs/topics/spider-middleware.rst """ import re import logging from scrapy import signals from scrapy.http import Request from scrapy.utils.httpobj import urlparse_cached logger = logging.getLogger(__name__) class OffsiteMiddleware(object): def __init__(self...
bsd-3-clause
stackforge/tacker
tacker/tests/unit/conductor/conductorrpc/test_vnf_pkgm_rpc.py
2
4155
# Copyright (C) 2019 NTT DATA # 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 ...
apache-2.0
IllusionRom-deprecated/android_platform_external_chromium_org
tools/idl_parser/idl_parser_test.py
176
3689
#!/usr/bin/env python # Copyright (c) 2013 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. import glob import unittest from idl_lexer import IDLLexer from idl_parser import IDLParser, ParseFile from idl_ppapi_lexer import...
bsd-3-clause
fnordahl/nova
nova/exception.py
1
56858
# 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
dpmatthews/rose
metomi/rose/apps/rose_prune.py
4
11898
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright (C) 2012-2019 British Crown (Met Office) & Contributors. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under th...
gpl-3.0
aapav01/SM-T530_Opensource_Compare
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
followloda/PornGuys
FlaskServer/venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/response.py
360
18615
from __future__ import absolute_import from contextlib import contextmanager import zlib import io from socket import timeout as SocketTimeout from socket import error as SocketError from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ...
gpl-3.0
acabey/acabey.github.io
projects/demos/engineering.purdue.edu/scriptingwithobjects/swocode/chap7/Private.py
1
2342
#!/usr/bin/python # Private.py #------------------------------ class X ------------------------------ class X: #(A) __m = 10 #(B) n = 20 ...
gpl-3.0
alistairlow/tensorflow
tensorflow/python/summary/text_summary.py
19
2872
# 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
radicalbit/ambari
ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/params.py
4
6865
""" 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 use this ...
apache-2.0
google/ion
ion/dev/doxygen_filter.py
1
8299
#!/usr/bin/python # # Copyright 2017 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...
apache-2.0
FlannelFox/FlannelFox
tests/flannelfox/torrenttools/test_torrentQueue.py
1
1999
# -*- coding: utf-8 -*- import unittest from unittest.mock import patch import os from flannelfox.torrenttools.TorrentQueue import Queue from flannelfox.torrenttools import Torrents class TestTorrentQueue(unittest.TestCase): testDatabaseFile = 'ff.db' def removeDatabase(self): try: os.remove(self.testDataba...
mit
makinacorpus/odoo
addons/l10n_ae/__init__.py
669
1059
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>). # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
vhosouza/invesalius3
invesalius/gui/task_exporter.py
1
15556
#-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU ...
gpl-2.0
benjaminrigaud/django
django/core/checks/model_checks.py
525
2390
# -*- coding: utf-8 -*- from __future__ import unicode_literals import inspect import types from django.apps import apps from django.core.checks import Error, Tags, register @register(Tags.models) def check_all_models(app_configs=None, **kwargs): errors = [] for model in apps.get_models(): if app_co...
bsd-3-clause
bmya/tkobr-addons
tko_web_sessions_management/main.py
1
11671
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # ThinkOpen Solutions Brasil # Copyright (C) Thinkopen Solutions <http://www.tkobr.com>. # # This...
agpl-3.0
jlaine/django-coconuts
tests/test_render.py
1
4789
# # django-coconuts # Copyright (c) 2008-2019, Jeremy Lainé # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # ...
bsd-2-clause
ESS-LLP/erpnext-healthcare
erpnext/config/stock.py
5
6499
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Stock Transactions"), "items": [ { "type": "doctype", "name": "Stock Entry", }, { "type": "doctype", "name": "Delivery Note", }, { "type": "doctype", "name": "P...
gpl-3.0
stuntman723/rap-analyzer
rap_analyzer/lib/python2.7/site-packages/django/contrib/gis/forms/widgets.py
422
3659
from __future__ import unicode_literals import logging from django.conf import settings from django.contrib.gis import gdal from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Widget from django.template import loader from django.utils import six, translation logger = log...
mit
neurotechuoft/MindType
Code/V1/src/deprecated/pyqtgraph/flowchart/library/Data.py
35
12746
# -*- coding: utf-8 -*- from ..Node import Node from ...Qt import QtGui, QtCore import numpy as np from .common import * from ...SRTTransform import SRTTransform from ...Point import Point from ...widgets.TreeWidget import TreeWidget from ...graphicsItems.LinearRegionItem import LinearRegionItem from . import function...
agpl-3.0
loveshell/volatility
volatility/plugins/mac/compressed_swap.py
11
11167
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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. You may not use, modify or # distribu...
gpl-2.0
limemadness/selenium_training
test_countries_sort.py
1
2050
import pytest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC @pytest.fixture #def driver(request): # wd = webdriver.Firefox(firefox_binary="c:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe") # print(w...
apache-2.0
hanhlh/hadoop-0.20.2_FatBTree
src/contrib/hod/hodlib/Hod/hadoop.py
167
27677
#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 use thi...
apache-2.0
ashwini0529/Oreo
flask_user/tests/tst_app.py
2
8125
import os import datetime from flask import Flask, render_template_string, request from flask.ext.babel import Babel from flask.ext.mail import Mail from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.user import login_required, SQLAlchemyAdapter, UserManager, UserMixin from flask.ext.user import roles_required,...
bsd-2-clause