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
superclass/superwas
nagios.py
1
12906
#!/usr/bin/python # This file is part of Superwas. # # Superwas 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. # # Superwas is dist...
gpl-2.0
wichert/rest_toolkit
tests/ext/test_colander.py
1
1039
import pytest from pyramid.httpexceptions import HTTPBadRequest from rest_toolkit.abc import EditableResource from rest_toolkit.ext.colander import ColanderSchemaValidationMixin import colander class AccountSchema(colander.Schema): email = colander.SchemaNode(colander.String()) password = colander.SchemaNode(...
bsd-2-clause
jjmiranda/edx-platform
lms/djangoapps/verify_student/admin.py
7
2230
# encoding: utf-8 """ Admin site configurations for verify_student. """ from config_models.admin import ConfigurationModelAdmin from ratelimitbackend import admin from lms.djangoapps.verify_student.models import ( IcrvStatusEmailsConfiguration, SkippedReverification, SoftwareSecurePhotoVerification, Ve...
agpl-3.0
robinbach/adv-loop-perf
04modelPython/Regression.py
1
4435
from sklearn import svm from sklearn import linear_model from sklearn.kernel_ridge import KernelRidge import numpy as np import sys import random import matplotlib.pyplot as plt numTrain = 11 def readFile(fPath): data = np.genfromtxt(fPath, delimiter=',') random.shuffle(data) performance = data.T[-2] distortion ...
mit
tienfuc/iotivity-democlient-snap
extlibs/GrovePi/Software/Python/grove_moisture_sensor.py
7
2296
#!/usr/bin/env python # # GrovePi Example for using the Grove Moisture Sensor (http://www.seeedstudio.com/wiki/Grove_-_Moisture_sensor) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? A...
apache-2.0
signalfx/Diamond
src/diamond/handler/logentries_diamond.py
19
2499
# coding=utf-8 """ [Logentries: Log Management & Analytics Made Easy ](https://logentries.com/). Send Diamond stats to your Logentries Account where you can monitor and alert based on data in real time. #### Dependencies #### Configuration Enable this handler * handers = diamond.handler.logentries.LogentriesDiamo...
mit
archf/ansible
lib/ansible/modules/cloud/cloudstack/cs_securitygroup_rule.py
19
14217
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
tersmitten/ansible
lib/ansible/modules/network/fortimanager/fmgr_secprof_ssl_ssh.py
39
39490
#!/usr/bin/python # # 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. # # Ansible is distribut...
gpl-3.0
rlbabyuk/integration_tests
fixtures/merkyl.py
2
3214
import pytest from urlparse import urlparse from fixtures.artifactor_plugin import fire_art_test_hook from utils.conf import env class MerkylInspector(object): def __init__(self, request): """ A simple adapter to aid in Merkyl Log Inspection during a test. This class is really only useful durin...
gpl-2.0
xq262144/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/cmdline.py
75
13055
# -*- coding: utf-8 -*- """ pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import getopt from textwrap import dedent from pygments import __version__, highlight fro...
apache-2.0
WhireCrow/openwrt-mt7620
staging_dir/host/lib/python2.7/unittest/suite.py
243
9809
"""TestSuite""" import sys from . import case from . import util __unittest = True def _call_if_exists(parent, attr): func = getattr(parent, attr, lambda: None) func() class BaseTestSuite(object): """A simple test suite that doesn't provide class or module shared fixtures. """ def __init__(se...
gpl-2.0
joaovitorsilvestre/MongographQL
tests/operators/test_operators.py
2
2901
import graphene def format_fields(fields): return sorted(['test__' + f for f in fields] + ['test']) def test_add_operators_to_field_respective_fields(): from graphene_mongodb.fields.respective import respective_fields from graphene_mongodb.operators import gen_operators_of_field, string_operators, allow...
mit
bcoca/ansible
test/units/plugins/lookup/test_password.py
46
20778
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@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 3 of the License, or # (a...
gpl-3.0
astronaut1712/taiga-back
taiga/projects/tasks/models.py
14
4574
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
mlperf/inference_results_v0.7
closed/Cisco/code/rnnt/tensorrt/preprocessing/dataset.py
12
11741
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic...
apache-2.0
tiborsimko/invenio-utils
tests/test_utils_url.py
2
19982
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License,...
gpl-2.0
EricCline/CEM_inc
env/lib/python2.7/site-packages/IPython/external/simplegeneric/_simplegeneric.py
17
3113
"""This is version 0.7 of Philip J. Eby's simplegeneric module (http://pypi.python.org/pypi/simplegeneric), patched to work with Python 3, which doesn't support old-style classes. """ #Name: simplegeneric #Version: 0.7 #Summary: Simple generic functions (similar to Python's own len(), pickle.dump(), etc.) #Home-page: ...
mit
Hoekz/hackness-monster
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 ...
mit
yaelelmatad/EtsyApiTest
findSimilarShopsAllShopsByPopularity.py
1
6336
from __future__ import division import json import sys import math import random #hard coded number of similar stores to spit out since HW said 5, could always add to command line nSimilarStores = 5 maxBonus = 0.0005 class vectors: def __init__(self, featureVectorName, multiplier, shopVectors): self.mult...
gpl-3.0
cntnboys/410Lab6
v1/lib/python2.7/site-packages/django/core/servers/basehttp.py
34
6449
""" HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21). Based on wsgiref.simple_server which is part of the standard library since 2.5. This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE! """ from __f...
apache-2.0
2947721120/curly-hockeypuck
examples/python/steel_lns.py
32
8547
# Copyright 2010 Pierre Schaus pschaus@gmail.com, lperron@google.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 # # Unless ...
apache-2.0
Plexxi/st2
st2client/dist_utils.py
57
5120
# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under...
apache-2.0
ProgressivePlanning/mongoengine
tests/queryset/field_list.py
30
15452
import sys sys.path[0:0] = [""] import unittest from mongoengine import * from mongoengine.queryset import QueryFieldList __all__ = ("QueryFieldListTest", "OnlyExcludeAllTest") class QueryFieldListTest(unittest.TestCase): def test_empty(self): q = QueryFieldList() self.assertFalse(q) ...
mit
aeklant/scipy
scipy/stats/tests/test_contingency.py
9
5982
import numpy as np from numpy.testing import (assert_equal, assert_array_equal, assert_array_almost_equal, assert_approx_equal, assert_allclose) from pytest import raises as assert_raises from scipy.special import xlogy from scipy.stats.contingency import margins, expected_freq, chi2_contingency def test_ma...
bsd-3-clause
Dhivyap/ansible
lib/ansible/module_utils/network/nxos/facts/vlans/vlans.py
12
3922
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python """ The nxos vlans fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is populated...
gpl-3.0
Batch21/pywr
docs/source/conf.py
2
9485
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Pywr documentation build configuration file, created by # sphinx-quickstart on Mon Jun 8 20:10:37 2015. # # 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 # autog...
gpl-3.0
Francis-Liu/animated-broccoli
nova/tests/unit/test_flavors.py
39
24595
# Copyright 2011 Ken Pepple # 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...
apache-2.0
N3MIS15/maraschino-webcam
lib/sqlalchemy/event.py
21
11430
# sqlalchemy/event.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Base event API.""" from sqlalchemy import util, exc CANCEL = util.symbol('CAN...
mit
atuljain/odoo
addons/hr_recruitment/report/hr_recruitment_report.py
56
5161
# -*- 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
ZeitOnline/zeit.content.article
src/zeit/content/article/edit/browser/tests/test_rawxml.py
1
1493
import zeit.content.article.edit.browser.testing class Form(zeit.content.article.edit.browser.testing.BrowserTestCase): block_type = 'raw' def test_inline_form_saves_values(self): self.get_article(with_empty_block=True) b = self.browser b.open('editable-body/blockname/@@edit-rawxml?s...
bsd-3-clause
JohnAbel/StochKit
libs/boost_1_53_0/tools/build/v2/tools/pch.py
61
2850
# Status: Being ported by Steven Watanabe # Base revision: 47077 # # Copyright (c) 2005 Reece H. Dunn. # Copyright 2006 Ilya Sokolov # Copyright (c) 2008 Steven Watanabe # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE_1_0.txt or # http://www....
gpl-3.0
amith01994/intellij-community
python/lib/Lib/site-packages/django/contrib/admin/models.py
228
2207
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.contrib.admin.util import quote from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode from django.utils.safestring import mark...
apache-2.0
shrimpboyho/git.js
emscript/python/2.7.5.1_32bit/Tools/Scripts/classfix.py
96
5953
#! /usr/bin/env python # This script is obsolete -- it is kept for historical purposes only. # # Fix Python source files to use the new class definition syntax, i.e., # the syntax used in Python versions before 0.9.8: # class C() = base(), base(), ...: ... # is changed to the current syntax: # class C(base...
gpl-2.0
kostoulhs/android_kernel_samsung_expressltexx
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# 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 system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
TathagataChakraborti/resource-conflicts
PLANROB-2015/seq-sat-lama/py2.5/lib/python2.5/tokenize.py
4
13554
"""Tokenization help for Python programs. generate_tokens(readline) is a generator that breaks a stream of text into Python tokens. It accepts a readline-like method which is called repeatedly to get the next line of input (or "" for EOF). It generates 5-tuples with these members: the token type (see token.py) ...
mit
yeleman/snisi
snisi_maint/management/commands/update-cluster-from-std-csv.py
1
3120
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import logging import os from django.core.management.base import BaseCommand from optparse import make_option from py3compat import...
mit
dronefly/dronefly.github.io
flask/lib/python2.7/site-packages/whoosh/formats.py
74
16710
# Copyright 2009 Matt Chaput. 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, # this list of conditions and the...
apache-2.0
archf/ansible
lib/ansible/modules/system/gluster_volume.py
21
15494
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Taneli Leppä <taneli@crasman.fi> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
Patola/Cura
plugins/PostProcessingPlugin/scripts/BQ_PauseAtHeight.py
5
1805
from ..Script import Script class BQ_PauseAtHeight(Script): def __init__(self): super().__init__() def getSettingDataString(self): return """{ "name":"Pause at height (BQ Printers)", "key": "BQ_PauseAtHeight", "metadata":{}, "version": 2, ...
lgpl-3.0
EliotBerriot/1flow
oneflow/landing/admin.py
2
2668
# -*- coding: utf-8 -*- """ Copyright 2013-2014 Olivier Cortès <oc@1flow.io> This file is part of the 1flow project. 1flow 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 versio...
agpl-3.0
mbartling/TAMU_senior_design
Python/get_xbee_servo.py
1
4195
#! /usr/bin/env python import serial import sys import os import MySQLdb from subprocess import call from datetime import date FORCE_WRITE = 0 HORIZONTAL = 0 VERTICAL = 90 today = date.today() try: address_array = [] # open data base db = MySQLdb.connect(host="localhost", user="", passwd="team05", db="xbee_teensy"...
mit
Syncleus/apex
src/apex/kiss/kiss_serial.py
1
3486
#!/usr/bin/env python # -*- coding: utf-8 -*- """KISS Core Classes.""" # These imports are for python3 compatibility inside python2 from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import serial import six from apex.kiss import constants as...
apache-2.0
khertan/gedit_flake8
gedit_flake8/__init__.py
1
14861
#!/usr/bin/env python # -*- coding: utf-8 -*- """gedit-flake8 : A plugin for gedit to display error and warning from flake8.""" __author__ = "Benoît HERVIER" __copyright__ = "Copyright 2012 " + __author__ __license__ = "GPLv3" __version__ = "0.7.0" __maintainer__ = "Benoît HERVIER" __email__ = "khertan@khertan.net...
gpl-3.0
koobonil/Boss2D
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/python/framework/function.py
14
36606
# 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...
mit
dnlm92/chokoretto
main/lib/unidecode/x05e.py
250
4668
data = ( 'Za ', # 0x00 'Bi ', # 0x01 'Shi ', # 0x02 'Bu ', # 0x03 'Ding ', # 0x04 'Shuai ', # 0x05 'Fan ', # 0x06 'Nie ', # 0x07 'Shi ', # 0x08 'Fen ', # 0x09 'Pa ', # 0x0a 'Zhi ', # 0x0b 'Xi ', # 0x0c 'Hu ', # 0x0d 'Dan ', # 0x0e 'Wei ', # 0x0f 'Zhang ', # 0x10 'Tang ...
mit
iver333/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/outputtee.py
192
3142
# Copyright (c) 2009, Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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 abov...
bsd-3-clause
yahman72/robotframework
src/robot/run.py
4
27219
#!/usr/bin/env python # Copyright 2008-2015 Nokia Solutions and Networks # # 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
gangadhar-kadam/verve-erp
erpnext/controllers/selling_controller.py
3
15620
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, flt, rounded, cstr, comma_or from erpnext.setup.utils import get_company_currency from frappe import _, ...
agpl-3.0
emailweixu/Paddle
demo/model_zoo/embedding/extract_para.py
13
3832
#!/bin/env python # Copyright (c) 2016 PaddlePaddle 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 ...
apache-2.0
gojira/tensorflow
tensorflow/contrib/distributions/python/ops/relaxed_bernoulli.py
35
9112
# 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
noxora/flask-base
flask/lib/python3.4/site-packages/sqlalchemy/ext/horizontal_shard.py
32
4814
# ext/horizontal_shard.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Horizontal sharding support. Defines a rudimental 'horizontal sharding' ...
mit
andim27/magiccamp
build/lib/django/contrib/gis/measure.py
398
12282
# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> # 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-3-clause
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/structured/labs/serving/application/lib/pyasn1_modules/rfc5940.py
13
1613
# # This file is part of pyasn1-modules software. # # Created by Russ Housley with assistance from asn1ate v.0.6.0. # Modified by Russ Housley to add map for use with opentypes. # # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # Additional CMS Revocation Information Choic...
apache-2.0
eestay/edx-platform
lms/djangoapps/student_account/test/test_views.py
7
20001
# -*- coding: utf-8 -*- """ Tests for student account views. """ import re from unittest import skipUnless from urllib import urlencode import json import mock import ddt import markupsafe from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from django.core i...
agpl-3.0
felixfontein/ansible
lib/ansible/plugins/action/package.py
11
4158
# (c) 2015, Ansible Inc, # # 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. # # Ansible is di...
gpl-3.0
schocco/mds-web
mds_website/settings.py
1
8687
# -*- coding: utf-8 -*- # Django settings for mds_website project. import os DEBUG = True TEMPLATE_DEBUG = DEBUG PROJECT_DIR = os.path.dirname(__file__) ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.pos...
mit
moijes12/oh-mainline
vendor/packages/twisted/twisted/internet/_posixserialport.py
18
1823
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Serial Port Protocol """ # system imports import os, errno # dependent on pyserial ( http://pyserial.sf.net/ ) # only tested w/ 1.18 (5 Dec 2002) import serial from serial import PARITY_NONE, PARITY_EVEN, PARITY_ODD from serial import STOPB...
agpl-3.0
Big-B702/python-for-android
python-modules/twisted/twisted/test/test_text.py
49
5450
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.python import text import string from cStringIO import StringIO sampleText = \ """Every attempt to employ mathematical methods in the study of chemical questions must be considered prof...
apache-2.0
HybridF5/tempest_debug
tempest/stress/stressaction.py
6
3298
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 re...
apache-2.0
pquerna/cloud-init-debian-pkg-dead
tests/unittests/test_cs_util.py
7
2050
from mocker import MockerTestCase from cloudinit.cs_utils import Cepko SERVER_CONTEXT = { "cpu": 1000, "cpus_instead_of_cores": False, "global_context": {"some_global_key": "some_global_val"}, "mem": 1073741824, "meta": {"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2E.../hQ5D5 john@doe"}, "name": ...
gpl-3.0
froyobin/horizon
openstack_dashboard/dashboards/project/data_processing/jobs/workflows/launch.py
14
16820
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
ryfeus/lambda-packs
pytorch/source/numpy/polynomial/hermite_e.py
4
58237
""" Objects for dealing with Hermite_e series. This module provides a number of objects (mostly functions) useful for dealing with Hermite_e series, including a `HermiteE` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in ...
mit
micjabbour/AndroidGuard-WebApp
AndroidGuard/models.py
1
3073
from . import db from .config import AppConfig from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from sqlalchemy import desc from itsdangerous import Serializer, BadSignature class Location(db.Model): id = db.Column(db.Integer...
unlicense
peter-jang/ansible
lib/ansible/plugins/action/raw.py
10
1572
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
noironetworks/neutron
neutron/db/rbac_db_mixin.py
1
6467
# Copyright (c) 2015 Mirantis, 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 requir...
apache-2.0
VasuAgrawal/tartanHacks2015
site/flask/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py
33
20036
# ext/declarative/base.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Internal implementation for declarative.""" from ...schema import Table, ...
mit
francbartoli/geonode
geonode/decorators.py
2
11169
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
gpl-3.0
graik/biskit
archive_biskit2/Biskit/deprecated/ChainSeparator.py
1
19962
## numpy-oldnumeric calls replaced by custom script; 09/06/2016 ## Automatically adapted for numpy-oldnumeric Mar 26, 2007 by alter_code1.py ## class ChainSeperator: ## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## This program is...
gpl-3.0
eyurtsev/FlowCytometryTools
FlowCytometryTools/core/docstring.py
1
2522
from __future__ import print_function import string from matplotlib import inspect class FormatDict(dict): """Adapted from http://stackoverflow.com/questions/11283961/partial-string-formatting""" def __missing__(self, key): return "{" + key + "}" class DocReplacer(object): """Decorator object...
mit
alphafoobar/intellij-community
python/lib/Lib/distutils/cmd.py
138
19253
"""distutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id: cmd.py 37828 2004-11-10 22:23:15Z loewis $" import sys, os, string, re from types import * from distutils.errors imp...
apache-2.0
simodalla/django-custom-email-user
setup.py
1
1526
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import custom_email_user try: from setuptools import setup except ImportError: from distutils.core import setup version = custom_email_user.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') print("Y...
bsd-3-clause
greggian/TapdIn
django/contrib/gis/tests/relatedapp/tests.py
1
15132
import os, unittest from django.contrib.gis.geos import * from django.contrib.gis.db.backend import SpatialBackend from django.contrib.gis.db.models import Collect, Count, Extent, F, Union from django.contrib.gis.tests.utils import no_mysql, no_oracle, no_spatialite from django.conf import settings from models im...
apache-2.0
Kitware/libkml
third_party/googletest-r108/test/gtest_uninitialized_test.py
15
3254
#!/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...
bsd-3-clause
Hackplayers/Empire-mod-Hpys-tests
lib/modules/python/collection/linux/sniffer.py
2
11134
class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'PcapSniffer', # list of one or more authors for the module ...
bsd-3-clause
metasmile/awesome-strings
raw/chromium/grit/grit/format/c_format.py
37
2775
#!/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. """Formats as a .C file for compilation. """ import os import re import types from grit import util def _FormatHeader(root, out...
mit
ceph/ceph-deploy
docs/source/conf.py
1
8511
# -*- coding: utf-8 -*- # # ceph-deploy documentation build configuration file, created by # sphinx-quickstart on Mon Oct 21 09:32:42 2013. # # 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. #...
mit
nitzmahone/ansible
test/units/modules/network/f5/test_bigip_profile_tcp.py
21
3343
# -*- 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
danielballan/scikit-xray
skbeam/core/recip.py
3
12753
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # Redistribution and use in ...
bsd-3-clause
PawarPawan/h2o-v3
py2/testdir_single_jvm/test_import2.py
20
5372
import unittest, sys sys.path.extend(['.','..','../..','py']) import string import h2o2 as h2o import h2o_cmd, h2o_import as h2i, h2o_browse as h2b from h2o_test import find_file, dump_json, verboseprint expectedZeros = [0, 4914, 656, 24603, 38665, 124, 13, 5, 1338, 51, 320216, 551128, 327648, 544044, 577981, 573487...
apache-2.0
tarunkapadia93/kernel_msm
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
fbradyirl/home-assistant
homeassistant/components/zha/core/channels/__init__.py
1
12998
""" Channels module for Zigbee Home Automation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zha/ """ import asyncio from concurrent.futures import TimeoutError as Timeout from enum import Enum from functools import wraps import logging from random im...
apache-2.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pyautogui/tweens.py
5
1410
import pytweening # This is just left here for backwards compatibility. I'll be deprecating this in favor of pyautogui.linear, pyautogui.easeInQuad, etc. getPointOnLine = pytweening.getPointOnLine linear = pytweening.linear easeInQuad = pytweening.easeInQuad easeOutQuad = pytweening.easeOutQuad easeInOutQuad = pytwee...
gpl-3.0
hnjamba/onaclone
onadata/libs/data/tests/test_tools.py
5
7229
from datetime import datetime, timedelta from django.utils.timezone import utc import os from mock import patch from onadata.apps.logger.models.instance import Instance from onadata.apps.main.tests.test_base import TestBase from onadata.libs.data.query import get_form_submissions_grouped_by_field,\ get_date_field...
bsd-2-clause
opencobra/cobrapy
src/cobra/test/test_sampling/test_optgp.py
1
1936
"""Test functionalities of OptGPSampler.""" from typing import TYPE_CHECKING import numpy as np import pytest from cobra.sampling import OptGPSampler if TYPE_CHECKING: from cobra import Model from cobra.sampling import ACHRSampler @pytest.fixture(scope="function") def optgp(model: "Model") -> OptGPSample...
gpl-2.0
andmos/ansible
test/units/modules/network/nos/nos_module.py
52
2511
# (c) 2018 Extreme Networks Inc. # # 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. # # Ansib...
gpl-3.0
JustFixNYC/who-owns-what
wow/tests/conftest.py
1
1024
import pytest import psycopg2 import dbtool @pytest.fixture(scope='session') def django_db_setup(django_db_setup, django_db_blocker): from django.conf import settings wow = settings.DATABASES['wow'] with django_db_blocker.unblock(): db = dbtool.DbContext( host=wow['HOST'], ...
gpl-3.0
sgerhart/ansible
lib/ansible/modules/network/nxos/nxos_facts.py
5
32486
#!/usr/bin/python # # 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. # # Ansible is distribut...
mit
ferdianjovan/strands_exploration
exploration_bid_manager/src/exploration_bid_manager/exploration_bidder.py
3
8148
import rospy from datetime import datetime from dateutil.tz import * from std_srvs.srv import Empty from strands_executive_msgs.srv import AddTasks from strands_executive_msgs.msg import TaskEvent from strands_exploration_msgs.msg import ExplorationTaskStatus from mongodb_store.message_store import MessageStoreProxy d...
mit
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pip/_internal/utils/compat.py
7
8015
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import codecs import locale import logging import os import shutil import sys from pip._vendor.six import text_type try: import ipaddress except ImportError: try: from pi...
gpl-3.0
openshift/openshift-tools
openshift/installer/vendored/openshift-ansible-3.10.0-0.29.0/roles/lib_openshift/library/oc_serviceaccount.py
8
61081
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
jhawkesworth/ansible
test/runner/lib/cloud/opennebula.py
14
1771
"""OpenNebula plugin for integration tests.""" from lib.cloud import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) from lib.util import ( display, ConfigParser, ) class OpenNebulaCloudProvider(CloudProvider): """Checks if a configuration file has been passed or fixtures are go...
gpl-3.0
Orav/kbengine
kbe/src/lib/python/Lib/tkinter/dnd.py
5
11809
"""Drag-and-drop support for Tkinter. This is very preliminary. I currently only support dnd *within* one application, between different windows (or within the same window). I an trying to make this as generic as possible -- not dependent on the use of a particular widget or icon type, etc. I also hope that ...
lgpl-3.0
JioEducation/edx-platform
lms/djangoapps/mobile_api/video_outlines/tests.py
13
33725
# -*- coding: utf-8 -*- """ Tests for video outline API """ import itertools from uuid import uuid4 from collections import namedtuple import ddt from nose.plugins.attrib import attr from edxval import api from xmodule.modulestore.tests.factories import ItemFactory from xmodule.video_module import transcripts_utils f...
agpl-3.0
Ingenico-ePayments/connect-sdk-python2
ingenico/connect/sdk/domain/payment/cancel_approval_payment_response.py
2
1362
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.data_object import DataObject from ingenico.connect.sdk.domain.payment.definitions.payment import Payment class CancelApprovalPaymentResponse...
mit
jemdwood/cs234_proj
pretrain-atari.py
1
11760
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: train-atari.py # Original Author (we/jemdwood@gmail.com editted): Yuxin Wu <ppwwyyxxc@gmail.com> import numpy as np import os import sys import time import random import uuid import argparse import multiprocessing import threading import cv2 import tensorflow as t...
mit
sahiljain/catapult
third_party/gsutil/third_party/boto/tests/unit/cloudsearch/test_connection.py
114
8513
#!/usr/bin env python from tests.unit import AWSMockServiceTestCase from boto.cloudsearch.domain import Domain from boto.cloudsearch.layer1 import Layer1 class TestCloudSearchCreateDomain(AWSMockServiceTestCase): connection_class = Layer1 def default_body(self): return b""" <CreateDomainResponse xml...
bsd-3-clause
fanshaohua-fan/flask
scripts/flask-07-upgrade.py
148
10659
#!/usr/bin/env python # -*- coding: utf-8 -*- """ flask-07-upgrade ~~~~~~~~~~~~~~~~ This command line script scans a whole application tree and attempts to output an unified diff with all the changes that are necessary to easily upgrade the application to 0.7 and to not yield deprecation warnings. ...
bsd-3-clause
douglas-larocca/urwid
urwid/text_layout.py
6
17276
#!/usr/bin/python # # Urwid Text Layout classes # Copyright (C) 2004-2011 Ian Ward # # 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 License, o...
lgpl-2.1
jlaura/pysal
pysal/contrib/network/test_kfuncs.py
20
1334
"""network unittest""" import unittest import network as pynet import kfuncs class Kfuncs_Tester(unittest.TestCase): def setUp(self): self.distances = {1:[1,2,3,4],2:[1,1,2,3],3:[2,1,1,2], 4:[3,2,1,1],5:[4,3,2,1]} def test__fxrange(self): values = kfuncs._fxrange(0.0...
bsd-3-clause
imanolarrieta/RL
rlpy/Domains/HelicopterHover.py
4
16981
"""Helicopter hovering task.""" from .Domain import Domain import numpy as np import rlpy.Tools.transformations as trans from rlpy.Tools.GeneralTools import cartesian import matplotlib.pyplot as plt from matplotlib.patches import FancyArrowPatch, Circle, Ellipse from mpl_toolkits.mplot3d import proj3d __copyright__ =...
bsd-3-clause