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
TangentMicroServices/BuildService
api/views.py
1
2442
from django.contrib.auth.models import User from api.models import Build, Metric, Smell from rest_framework import routers, serializers, viewsets, decorators, response from api.permissions import IsSelfOrSuperUser from api.serializers import BuildSerializer, MetricSerializer, SmellSerializer from rest_framework.permiss...
mit
lilida/teletraan
deploy-agent/tests/unit/deploy/staging/test_helper.py
8
4299
# Copyright 2016 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...
apache-2.0
kernc/scikit-learn
sklearn/feature_selection/tests/test_feature_select.py
43
24671
""" Todo: cross-check the F-value with stats model """ from __future__ import division import itertools import warnings import numpy as np from scipy import stats, sparse from numpy.testing import run_module_suite from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from...
bsd-3-clause
jhseu/tensorflow
tensorflow/lite/python/convert_test.py
1
17122
# 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
hippyvm/hippyvm
hippy/main.py
2
6682
#!/usr/bin/env python """ Hippy VM. Execute by typing hippy [--gcdump dumpfile] [--cgi] [--server port] [--jit jit_param] [<file.php>] [php program options] and enjoy """ import sys import os if __name__ == '__main__': # untranslated sys.path.insert(0, os.path.dirname( os.path.dirname(os.path.abspath(__...
mit
mhvk/astropy
astropy/io/ascii/rst.py
8
1704
# Licensed under a 3-clause BSD style license """ :Author: Simon Gibbons (simongibbons@gmail.com) """ from .core import DefaultSplitter from .fixedwidth import (FixedWidth, FixedWidthData, FixedWidthHeader, FixedWidthTwoLineDataSplitter) cla...
bsd-3-clause
IsCoolEntertainment/debpkg_libcloud
libcloud/compute/drivers/gridspot.py
6
4147
# 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 ...
apache-2.0
rexshihaoren/scikit-learn
examples/model_selection/plot_validation_curve.py
229
1823
""" ========================== Plotting Validation Curves ========================== In this plot you can see the training scores and validation scores of an SVM for different values of the kernel parameter gamma. For very low values of gamma, you can see that both the training score and the validation score are low. ...
bsd-3-clause
iulian787/spack
var/spack/repos/builtin/packages/r-diagrammer/package.py
5
2246
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RDiagrammer(RPackage): """Create graph diagrams and flowcharts using R.""" homepage =...
lgpl-2.1
zhoulingjun/zipline
tests/test_algorithm_gen.py
18
7339
# # Copyright 2014 Quantopian, 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 wr...
apache-2.0
darksylinc/qt-creator
tests/system/suite_qtquick/tst_qtquick_creation4/test.py
3
2314
############################################################################# ## ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this f...
lgpl-2.1
mhils/mitmproxy
mitmproxy/tcp.py
5
1283
import time from typing import List from mitmproxy import flow from mitmproxy.coretypes import serializable class TCPMessage(serializable.Serializable): def __init__(self, from_client, content, timestamp=None): self.from_client = from_client self.content = content self.timestamp = times...
mit
gazpachoking/Flexget
flexget/components/managed_lists/lists/subtitle_list.py
2
14705
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging import os from collections import MutableSet from datetime import datetime, date, time from sqlalchemy import Column, Unicode, Integer, ForeignKey, func, Da...
mit
ftao/vpn-deploy-playbook
roles/radius-admin/templates/local_settings.py
2
1702
DATABASES = { 'default': { {% if djra_db_engine == 'mysql' %} 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '{{ djra_db_name }}', # Or path to database file if using sqlite3. 'USER': '{{ djra_db_...
gpl-3.0
Intel-tensorflow/tensorflow
tensorflow/examples/adding_an_op/zero_out_3_test.py
14
1989
# 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
inconvergent/differential-line
main_line_ani.py
1
2648
#!/usr/bin/python3 # -*- coding: utf-8 -*- from numpy import pi # from numpy import cos # from numpy import sin from numpy.random import random from numpy import zeros # from numpy import linspace from numpy import floor from modules.growth import spawn_curl NMAX = 10**6 SIZE = 512 ONE = 1./SIZE PROCS = 2 INIT_...
mit
Danielhiversen/home-assistant
homeassistant/loader.py
3
8706
""" The methods for loading Home Assistant components. This module has quite some complex parts. I have tried to add as much documentation as possible to keep it understandable. Components can be accessed via hass.components.switch from your code. If you want to retrieve a platform that is part of a component, you sh...
mit
pastgift/seed-website-py
app/index/hooks.py
1
1472
# -*- coding: utf-8 -*- from flask import render_template, request, jsonify, flash, g from flask.ext.login import current_user from . import index_blueprint from .. import db from .. import babel from ..models import User from datetime import datetime @index_blueprint.before_app_request def before_request(): if...
mit
dean0x7d/pybinding
pybinding/support/collections.py
1
3143
import numpy as np from matplotlib.collections import Collection from matplotlib.artist import allow_rasterization # noinspection PyAbstractClass class CircleCollection(Collection): """Custom circle collection The default matplotlib `CircleCollection` creates circles based on their area in screen units. ...
bsd-2-clause
jhona22baz/blog-flask
python2.7/lib/python2.7/site-packages/openid/store/memstore.py
165
3597
"""A simple store using only in-process memory.""" from openid.store import nonce import copy import time class ServerAssocs(object): def __init__(self): self.assocs = {} def set(self, assoc): self.assocs[assoc.handle] = assoc def get(self, handle): return self.assocs.get(handle...
mit
KenleyArai/ComicbookTime
app/models.py
1
4953
from app import db from flask.ext.security import RoleMixin from datetime import datetime # Defining the table for the many-many relationship of User and Comic bought_comics = db.Table('bought', db.Column('user_id', db.Integer, db.ForeignKey('user.id')), db.Column('com...
mit
peterjoel/servo
tests/wpt/web-platform-tests/webdriver/tests/get_timeouts/get.py
42
1278
from tests.support.asserts import assert_success def get_timeouts(session): return session.transport.send( "GET", "session/{session_id}/timeouts".format(**vars(session))) def test_get_timeouts(session): response = get_timeouts(session) assert_success(response) assert "value" in response.bod...
mpl-2.0
Philippe12/external_chromium_org
third_party/protobuf/python/google/protobuf/internal/type_checkers.py
527
12163
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
kaji-project/adagios
adagios/myapp/urls.py
1
1069
# Adagios is a web based Nagios configuration interface # # Copyright (C) 2014, Pall Sigurdsson <palli@opensource.is> # # 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...
agpl-3.0
adityahase/frappe
frappe/core/doctype/file/test_file.py
1
10524
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import base64 import frappe import os import unittest from frappe import _ from frappe.core.doctype.file.file import move_file from frappe.utils import get_files_path #...
mit
HackerDom/qoala
qoala/settings/common.py
1
4599
# -*- coding: utf-8 -*- """ Django settings for qoala project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path....
gpl-3.0
csakoda/RatticWeb
cred/tests/test_attachments.py
7
1406
from django.test import TestCase from django.core.urlresolvers import reverse from django.test.utils import override_settings from cred.models import Cred from ratticweb.tests.helper import TestData class CredAttachmentTest(TestCase): def setUp(self): self.data = TestData() def test_upload_cred(self...
gpl-2.0
etuna-SBF-kog/Stadsparken
env/lib/python2.7/site-packages/pip/vendor/html5lib/treebuilders/_base.py
79
13710
from __future__ import absolute_import, division, unicode_literals from pip.vendor.six import text_type from ..constants import scopingElements, tableInsertModeElements, namespaces # The scope markers are inserted when entering object elements, # marquees, table cells, and table captions, and are used to prevent form...
gpl-3.0
sankhesh/VTK
IO/Exodus/Testing/Python/TestExodusPolyhedra.py
15
1758
#!/usr/bin/env python from vtk import * from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() rdr = vtkExodusIIReader() rdr.SetFileName(str(VTK_DATA_ROOT) + "/Data/dodecahedron.exo") rdr.Update() tfm = vtkTransformFilter() xfm = vtkTransform() xfm.Translate(1.5, 0.5, 0.5) xfm.Scale(0.1, 0.1, 0.1)...
bsd-3-clause
DARKPOP/external_chromium_org
chrome/common/extensions/docs/server2/template_data_source_test.py
81
2399
#!/usr/bin/env python # 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. import json import unittest from extensions_paths import SERVER2 from server_instance import ServerInstance from template_data_sou...
bsd-3-clause
rmsare/sfmtools
sfmtools.py
1
2864
""" Utility functions for PhotoScan processing """ import os, sys import PhotoScan def align_and_clean_photos(chunk): ncameras = len(chunk.cameras) for frame in chunk.frames: frame.matchPhotos() chunk.alignCameras() for camera in chunk.cameras: if camera.transform is None: ...
mit
Just-D/chromium-1
build/download_sdk_extras.py
6
3708
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to download sdk/extras packages on the bots from google storage. The script expects arguments that specify zips file in the ...
bsd-3-clause
mohierf/shinken
test/test_bad_notification_character.py
18
2315
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
agpl-3.0
ivyl/patchwork
patchwork/management/commands/cron.py
3
1341
# Patchwork - automated patch tracking system # Copyright (C) 2015 Jeremy Kerr <jk@ozlabs.org> # # This file is part of the Patchwork package. # # Patchwork 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; eith...
gpl-2.0
YOTOV-LIMITED/kuma
kuma/search/decorators.py
26
1278
import logging from django.db.models.signals import pre_delete from elasticsearch.exceptions import ConnectionError from kuma.wiki.signals import render_done from .signals import render_done_handler, pre_delete_handler log = logging.getLogger('kuma.search.decorators') def requires_good_connection(fun): """D...
mpl-2.0
xiaolonginfo/decode-Django
Django-1.5.1/tests/modeltests/validation/test_unique.py
117
5922
from __future__ import absolute_import, unicode_literals import datetime from django.core.exceptions import ValidationError from django.test import TestCase from django.utils import unittest from .models import (CustomPKModel, UniqueTogetherModel, UniqueFieldsModel, UniqueForDateModel, ModelToValidate, Post, Fle...
gpl-2.0
freddierice/volatility
volatility/plugins/overlays/windows/vista_sp12_x86_syscalls.py
45
39669
# Volatility # Copyright (c) 2008-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 as published by # the Free Software Foundation; either version 2 of the License, or # (at your o...
gpl-2.0
samba-team/samba
third_party/waf/waflib/extras/softlink_libs.py
55
2389
#! /usr/bin/env python # per rosengren 2011 from waflib.TaskGen import feature, after_method from waflib.Task import Task, always_run from os.path import basename, isabs from os import tmpfile, linesep def options(opt): grp = opt.add_option_group('Softlink Libraries Options') grp.add_option('--exclude', default='/u...
gpl-3.0
facebook/watchman
watchman/tests/integration/test_subscribe.py
1
27103
# vim:ts=4:sw=4:et: # Copyright 2015-present Facebook, Inc. # Licensed under the Apache License, Version 2.0 # no unicode literals from __future__ import absolute_import, division, print_function import json import os import os.path import pywatchman import WatchmanTestCase from path_utils import norm_relative_path ...
apache-2.0
sy0302/lammps_qtb
tools/moltemplate/src/oplsaa_moltemplate.py
6
15174
#! /usr/bin/env python # # The purpose of this script is to create a moltemplate lt file for the oplsaa. # forcefield. This will assist researchers in building complex simulations using # this OPLS-UA and the OPLS-AA forcefields. __author__="Jason Lambert" # (some additional corrections by Miguel Gonzalez and Andrew ...
gpl-2.0
MalkIPP/ipp_work
ipp_work/reforms/ir_marg_rate.py
1
2157
# -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute it and/or modify...
agpl-3.0
opnsense/core
src/opnsense/service/configd.py
1
6724
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- """ Copyright (c) 2014-2019 Ad Schellevis <ad@opnsense.org> 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 so...
bsd-2-clause
fitermay/intellij-community
python/helpers/profiler/thriftpy/server.py
26
3041
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import threading from thriftpy.protocol import TBinaryProtocolFactory from thriftpy.transport import ( TBufferedTransportFactory, TTransportException ) logger = logging.getLogger(__name__) class TServer(object): def __init_...
apache-2.0
prakxys/flask
Work/Trivia - Module 5/env/Lib/site-packages/setuptools/svn_utils.py
68
17284
import os import re import sys from distutils import log import xml.dom.pulldom import shlex import locale import codecs import unicodedata import warnings from setuptools.compat import unicode from xml.sax.saxutils import unescape try: import urlparse except ImportError: import urllib.parse as urlparse from ...
apache-2.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/subunit/tests/test_subunit_filter.py
2
14050
# # subunit: extensions to python unittest to get test results from subprocesses. # Copyright (C) 2005 Robert Collins <robertc@robertcollins.net> # # Licensed under either the Apache License, Version 2.0 or the BSD 3-clause # license at the users choice. A copy of both licenses are available in the # project sour...
agpl-3.0
Valloric/ycmd
ycmd/tests/server_utils_test.py
4
2234
# Copyright (C) 2016-2018 ycmd contributors # # This file is part of ycmd. # # ycmd 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
damorim/compilers-cin
2020_3/projeto3/antlr4-python3-runtime-4.7.2/src/antlr4/atn/Transition.py
9
8173
# # Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # # An ATN transition between any two ATN states. Subclasses define # atom, set, epsilon, action, predicate, rule transition...
mit
qvazzler/Flexget
tests/test_utils.py
1
1326
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from datetime import datetime from flexget.utils import json class TestJson(object): def test_json_encode_dt(self): date_str = '2016-03-11T17:12:17Z' dt ...
mit
PeeJay/ArduinoJson
third-party/gtest-1.7.0/test/gtest_output_test.py
1733
12005
#!/usr/bin/env python # # Copyright 2008, 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...
mit
infant-cognition-tampere/drop-eyetribe-plugin
drop_eyetribe/EyetrackerEyeTribe.py
1
20648
"""TheEyeTribe plugin for drop.""" from drop.Sensor import Sensor from threading import Thread from Queue import Queue import socket from select import select import json import nudged import glib import os import re from datetime import datetime import time import csv # Regular expression to match timestamp format ...
mit
MissRoven/python
demo/app/mangeruser.py
1
1063
from . import app import json from flask import request,render_template,redirect,make_response,session @app.route('/upuser') def adduser(): return render_template('up.html',username=session['username']) @app.route('/changeuser',methods=['POST']) def changeuser(): change = request.form.get('change') usern...
gpl-2.0
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.2.5/tests/regressiontests/custom_managers_regress/models.py
93
1056
""" Regression tests for custom manager classes. """ from django.db import models class RestrictedManager(models.Manager): """ A manager that filters out non-public instances. """ def get_query_set(self): return super(RestrictedManager, self).get_query_set().filter(is_public=True) class Relat...
gpl-3.0
westinedu/similarinterest
django/contrib/admin/tests.py
3
4201
from django.test import LiveServerTestCase from django.utils.importlib import import_module from django.utils.unittest import SkipTest from django.utils.translation import ugettext as _ class AdminSeleniumWebDriverTestCase(LiveServerTestCase): webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver' ...
bsd-3-clause
muraliselva10/designate
designate/cmd/agent.py
6
1342
# Copyright 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmons@rackspace.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/LICENSE-2.0 # # Unl...
apache-2.0
yanheven/neutron
neutron/api/extensions.py
3
26154
# Copyright 2011 OpenStack Foundation. # Copyright 2011 Justin Santa Barbara # 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
barnsnake351/neutron
neutron/common/test_lib.py
86
2091
# Copyright (c) 2010 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 r...
apache-2.0
viz-dev/viz
qa/rpc-tests/test_framework/authproxy.py
47
7706
""" Copyright (c) 2011 Jeff Garzik AuthServiceProxy has the following improvements over python-jsonrpc's ServiceProxy class: - HTTP connections persist for the life of the AuthServiceProxy object (if server supports HTTP/1.1) - sends protocol 'version', per JSON-RPC 1.1 - sends proper, incrementing '...
mit
eunchong/build
scripts/slave/apply_svn_patch.py
3
3235
#!/usr/bin/python # Copyright 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. """Apply a Subversion patch to the checkout. This script can optionally pass the patch contents through an external filter script to alter...
bsd-3-clause
crawfordsm/indlulamithi
setup.py
1
3745
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtins else: import __builtin_...
bsd-3-clause
Alex2114/Deb-3df
redeem/gcodes/M561.py
2
1594
""" GCode M561 Example: M561 This cancels any bed-plane fitting as the result of probing (or anything else) and returns the machine to moving in the user's coordinate system. Author: Elias Bakken License: CC BY-SA: http://creativecommons.org/licenses/by-sa/2.0/ """ from GCodeCommand import GCodeCommand import nump...
gpl-3.0
qifeigit/scikit-learn
sklearn/linear_model/tests/test_perceptron.py
378
1815
import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_raises from sklearn.utils import check_random_state from sklearn.datasets import load_iris from sklearn.linear_model import Pe...
bsd-3-clause
nfqsolutions/pylm-registry
pylm/registry/clients/logs.py
1
1616
import json from urllib import parse from tornado.httpclient import HTTPClient class LogClient(object): """ Client to send and retrieve logs """ def __init__(self, uri, cluster): self.uri = uri self.cluster = cluster def send(self, text): """ Send a log line to th...
agpl-3.0
garthomp/ruby_blog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/trac.py
364
1933
# -*- coding: utf-8 -*- """ pygments.styles.trac ~~~~~~~~~~~~~~~~~~~~ Port of the default trac highlighter design. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Na...
mit
BeyondTheClouds/enoslib
enoslib/docker.py
1
5041
"""Manage remote docker containers as first class citizens. A possible workflow would be to start your containers using the method of your choice and build the list of available dockers using the :py:func:`enoslib.docker.get_dockers` function. A ``DockerHost`` is a specialization of a ``Host`` and thus can be fed int...
gpl-3.0
mskrzypkows/servo
components/script/dom/bindings/codegen/parser/tests/test_overload.py
134
2020
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestOverloads { void basic(); void basic(long arg1); boolean abitharder(TestOverloads foo); boolean abitharder(boolean foo); void abitharder(ArrayBuffer? foo); }; """) ...
mpl-2.0
rackerlabs/heat-pyrax
samples/autoscale/delete_webhook.py
13
3216
#!/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
CyberPoint/libpgm
docs/conf.py
4
8104
# -*- coding: utf-8 -*- # # pgmpy documentation build configuration file, created by # sphinx-quickstart on Tue Aug 7 11:49:49 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
bsd-3-clause
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/scripts/scramble/scripts/DRMAA_python-macosx.py
1
1552
import os, sys, shutil if "SGE_ROOT" not in os.environ: print "main(): Please set SGE_ROOT to the path of your SGE installation" print "main(): before scrambling DRMAA_python" sys.exit(1) # change back to the build dir if os.path.dirname( sys.argv[0] ) != "": os.chdir( os.path.dirname( sys.argv[0] ) )...
gpl-3.0
abhidrona/gn-osc-custom
oscar/apps/partner/availability.py
9
4148
from django.utils.translation import ugettext_lazy as _ class Base(object): """ Base availability policy. """ #: Availability code. This is used for HTML classes code = '' #: A description of the availability of a product. This is shown on the #: product detail page. Eg "In stock", "O...
bsd-3-clause
vFense/vFenseAgent-nix
agent/deps/rpm/Python-2.7.5/lib/python2.7/bsddb/test/test_replication.py
68
21539
"""TestCases for distributed transactions. """ import os import time import unittest from test_all import db, test_support, have_threads, verbose, \ get_new_environment_path, get_new_database_path #---------------------------------------------------------------------- class DBReplication(unittest.TestCase)...
lgpl-3.0
html5rocks/updates.html5rocks.com
lib/docutils/statemachine.py
8
55215
# $Id: statemachine.py 5968 2009-06-02 14:44:19Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A finite state machine specialized for regular-expression-based text filters, this module defines the following classes: - `StateMachine`, a state ma...
apache-2.0
demarlik01/szcal
app.py
1
1040
from flask import Flask from flask import request from flask import jsonify from flask import Response from flask_cors import CORS from database import session from models import Address from urllib import parse from utils import replace_if_short_address app = Flask(__name__) CORS(app) @app.route('/cj/secluded_place...
mit
vejmelkam/wrfxpy
tests/l0_retr_test.py
1
1892
# # Dalton Burke # # Test correct functionality of the retrieval of level0 files import os import subprocess import datetime import shutil # Set root directory of wrfxpy as working directory script_path = os.path.realpath(__file__) # + 6 gets us to wrfxpy index = script_path.find('wrfxpy/tests') + 6 os.chdir(scrip...
mit
neumerance/deploy
openstack_dashboard/api/network_base.py
8
6821
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 NEC 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 #...
apache-2.0
project-rig/rig
tests/test_type_casts.py
1
8696
import numpy as np import pytest from rig.type_casts import ( float_to_fix, fix_to_float, float_to_fp, fp_to_float, NumpyFloatToFixConverter, NumpyFixToFloatConverter ) import struct sz = { 8: 'b', 16: 'h', 32: 'i', } SZ = {k: v.upper() for k, v in sz.items()} class TestFloatToFix(object): ...
gpl-2.0
fhe-odoo/odoo
addons/document/report/__init__.py
444
1068
# -*- 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
doerlbh/3DPrint_BigBlue3DPrinter
Marlin/scripts/createSpeedLookupTable.py
333
1382
#!/usr/bin/env python """ Generate the stepper delay lookup table for Marlin firmware. """ import argparse __author__ = "Ben Gamari <bgamari@gmail.com>" __copyright__ = "Copyright 2012, Ben Gamari" __license__ = "GPL" parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('-f', '--cpu-freq', type...
gpl-3.0
nzlosh/st2
st2common/st2common/constants/pack.py
3
2612
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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
ALSchwalm/foresight
foresight/java/next_bits.py
4
1436
""" java.utils.Random utility functions. These methods simulate the Random object 'next' function, and are used to implement the other Random functions (nextInt, nextDouble, etc.) Note that it is an error to pass a value for 'bits' that is larger than 32. """ from foresight import lcg from ctypes import c_uint32 M...
mit
perumaalgoog/grpc
src/python/grpcio_tests/tests/unit/beta/_implementations_test.py
16
2959
# Copyright 2016, 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
jrschumacher/s3cmd
S3/S3Uri.py
9
6711
# -*- coding: utf-8 -*- ## Amazon S3 manager ## Author: Michal Ludvig <michal@logix.cz> ## http://www.logix.cz/michal ## License: GPL Version 2 ## Copyright: TGRMN Software and contributors import os import re import sys from Utils import unicodise, deunicodise, check_bucket_name_dns_support import Config cl...
gpl-2.0
annahs/atmos_research
LEO_2D_histos_from_db.py
1
3992
import sys import os import datetime import pickle import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.colors as colors from pprint import pprint import sqlite3 import calendar from datetime import datetime #id INTEGER PRIMARY KEY AUTOINCREMENT, #sp2b_file TEXT, #file_index...
mit
bert9bert/statsmodels
statsmodels/graphics/tests/test_correlation.py
31
1112
import numpy as np from numpy.testing import dec from statsmodels.graphics.correlation import plot_corr, plot_corr_grid from statsmodels.datasets import randhie try: import matplotlib.pyplot as plt have_matplotlib = True except: have_matplotlib = False @dec.skipif(not have_matplotlib) def test_plot_cor...
bsd-3-clause
ramadhane/odoo
addons/account/account_analytic_line.py
304
7914
# -*- 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
atopuzov/nitro-python
nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnicaconnection.py
3
5746
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
andrewbird/wader
core/oal.py
1
1507
# -*- coding: utf-8 -*- # Copyright (C) 2006-2008 Vodafone España, S.A. # Copyright (C) 2008-2009 Warp Networks, S.L. # Author: Pablo Martí # # 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; e...
gpl-2.0
moble/scri
scri/__init__.py
1
7034
# Copyright (c) 2020, Michael Boyle # See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE> """Module for operating on gravitational waveforms in various forms Classes ------- WaveformBase : Base class This is probably not needed directly; it is just used for inheritance by other object...
mit
d-ai/Sourcepawn
watchdog/observers/inotify.py
3
6934
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 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 # # ...
gpl-3.0
jakevdp/bokeh
bokeh/mplexporter/renderers/base.py
44
14355
import warnings import itertools from contextlib import contextmanager import numpy as np from matplotlib import transforms from .. import utils from .. import _py3k_compat as py3k class Renderer(object): @staticmethod def ax_zoomable(ax): return bool(ax and ax.get_navigate()) @staticmethod ...
bsd-3-clause
ramitalat/odoo
addons/pos_restaurant/__init__.py
332
1074
# -*- 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
bigdatauniversity/edx-platform
common/djangoapps/third_party_auth/tests/specs/test_lti.py
46
7079
""" Integration tests for third_party_auth LTI auth providers """ import unittest from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from oauthlib.oauth1.rfc5849 import Client, SIGNATURE_TYPE_BODY from third_party_auth.tests import testutil FORM_EN...
agpl-3.0
hezuoguang/ZGVL
WLServer/site-packages/django/template/loader.py
117
7545
# Wrapper for loading templates from storage of some sort (e.g. filesystem, database). # # This uses the TEMPLATE_LOADERS setting, which is a list of loaders to use. # Each loader is expected to have this interface: # # callable(name, dirs=[]) # # name is the template name. # dirs is an optional list of directories ...
apache-2.0
googyanas/GoogyMax-G4
scripts/build-all.py
704
14699
#! /usr/bin/env python # Copyright (c) 2009-2014, The Linux Foundation. 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 # ...
gpl-2.0
cloudkick/cast
lib/extern/closure-linter/closure_linter/errors.py
13
3734
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
apache-2.0
daavery/audacity
lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/suncxx.py
196
1487
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Utils from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_sxx(conf): v=conf.env cc=None if v['CXX']:cc=v['CXX']...
gpl-2.0
hustodemon/spacewalk
backend/satellite_tools/disk_dumper/iss_ui.py
2
5528
# # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
krzysztof-magosa/ansible-modules-extras
windows/win_uri.py
11
4353
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Corwin Brown <corwin@corwinbrown.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...
gpl-3.0
acourtney2015/boto
boto/codedeploy/layer1.py
135
40600
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
mit
google/filament
third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py
54
28557
# Copyright (c) 2014-2018 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and/or associated documentation files (the "Materials"), # to deal in the Materials without restriction, including without limitation # the rights to use, copy, modify, m...
apache-2.0
2014cdag4/2014cdag4
wsgi/programs/cdag4/resume5.py
7
21656
import cherrypy # 這是 RESUME5 類別的定義 ''' # 在 application 中導入子模組 import programs.cdag4.resume5 as cdag4_resume5 # 加入 cdag4 模組下的 resume5.py 且以子模組 resume5 對應其 RESUME5() 類別 root.cdag4.resume5 = cdag4_resume5.RESUME5() # 完成設定後, 可以利用 /cdag4/resume5/assembly # 呼叫 resume5.py 中 RESUME5 類別的 assembly 方法 ''' class RESUME5(object)...
gpl-2.0