repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
wulczer/ansible
refs/heads/devel
lib/ansible/inventory/vars_plugins/noop.py
153
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Serge van Ginderachter <serge@vanginderachter.be> # # 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 Foundat...
xfguo/pysnmp
refs/heads/master
pysnmp/smi/mibs/ASN1.py
7
# ASN.1 objects used in SNMP from pyasn1.type import univ from pysnmp.proto import rfc1902 mibBuilder.exportSymbols( 'ASN1', ObjectIdentifier=univ.ObjectIdentifier, # Instead of using base ASN,1 types we use SNMPv2 SMI ones to make # SMI objects type-compatible with SNMP protocol values Integer...
grote/osm2gtfs
refs/heads/master
osm2gtfs/creators/stops_creator.py
4
# coding=utf-8 import logging import transitfeed class StopsCreator(object): def __init__(self, config): self.config = config def __repr__(self): rep = "" if self.config is not None: rep += str(self.config) + " | " return rep def add_stops_to_feed(self, feed...
BitcoinSolution/xenocoin
refs/heads/master
qa/rpc-tests/p2p-acceptblock.py
49
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from...
AnderEnder/ansible-modules-extras
refs/heads/devel
monitoring/statusio_maintenance.py
24
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk> # # 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 v...
peterwittek/picos
refs/heads/master_github
setup.py
2
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='PICOS', version='1.1.3.dev', author='G. Sagnol', author_email='sagnol@zib.de', packages=['picos'], license='LICENSE.txt', description='A Python Interface to Conic Optimization Solvers...
xiaoxiamii/scikit-learn
refs/heads/master
examples/gaussian_process/plot_gp_probabilistic_classification_after_regression.py
252
#!/usr/bin/python # -*- coding: utf-8 -*- """ ============================================================================== Gaussian Processes classification example: exploiting the probabilistic output ============================================================================== A two-dimensional regression exerci...
krunal3103/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/doc/en/example/xfail_demo.py
225
import pytest xfail = pytest.mark.xfail @xfail def test_hello(): assert 0 @xfail(run=False) def test_hello2(): assert 0 @xfail("hasattr(os, 'sep')") def test_hello3(): assert 0 @xfail(reason="bug 110") def test_hello4(): assert 0 @xfail('pytest.__version__[0] != "17"') def test_hello5(): assert...
mcquam/mcquarrie
refs/heads/master
app/exceptions.py
190
class ValidationError(ValueError): pass
firerszd/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_posix.py
60
"Test posix functions" from test import support # Skip these tests if there is no posix module. posix = support.import_module('posix') import errno import sys import time import os import fcntl import platform import pwd import shutil import stat import tempfile import unittest import warnings _DUMMY_SYMLINK = os.p...
lenstr/rethinkdb
refs/heads/next
test/common/line.py
50
# Copyright 2010-2012 RethinkDB, all rights reserved. import re class line(): regex = "" fields = [] # tuples of form name, type def __init__(self, _regex, _fields): self.regex = _regex self.fields = _fields def __repr__(self): return self.regex def parse_line(self, line): ...
ffakhraei/pProj
refs/heads/master
python/codility/ch1/binaryGap.py
1
#!/bin/env/python binRep = bin(N) binRepStr = binRep[2:] tempMax = 0 realMax = 0 for i in xrange(len(binRepStr)-1): if binRepStr[i] == '1': continue if binRepStr[i] == '0': tempMax += 1 if binRepStr[i+1] == '1': if tempMax > realMax: realMax = tempMax ...
nicoddemus/repo-test
refs/heads/master
pytest.py
13
# PYTHON_ARGCOMPLETE_OK """ pytest: unit and functional testing with Python. """ __all__ = ['main'] if __name__ == '__main__': # if run as a script or by 'python -m pytest' # we trigger the below "else" condition by the following import import pytest raise SystemExit(pytest.main()) # else we are imported ...
VioletRed/kodi-urplay
refs/heads/master
resources/lib/FavoritesManager.py
1
import hashlib import json import os import xbmc import xbmcaddon import CommonFunctions as common import helper ADDON_ID = "plugin.video.svtplay" FILE_PATH = xbmc.translatePath("special://profile/addon_data/%s/favorites.json" % ADDON_ID) FAVORITES = {} def add(title, url): global FAVORITES __load_from_disk() ...
darkleons/lama
refs/heads/master
addons/crm/wizard/crm_merge_opportunities.py
333
############################################################################## # # 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 Affero General Public L...
atvcaptain/enigma2
refs/heads/6.5
lib/python/Plugins/Extensions/ProgrammlistenUpdater/settinglist.py
1
from __future__ import print_function from __future__ import absolute_import from enigma import eTimer import re, glob, shutil, os, time, sys from Screens.Screen import Screen from Components.config import ConfigSubsection, ConfigYesNo, ConfigText, config, configfile from Screens.MessageBox import MessageBox from .down...
edouardklein/gitkv
refs/heads/master
gitkv/__init__.py
1
r"""``gitkv`` lets you use a git repo as a key-value store using ``open``-like semantics. >>> import gitkv >>> # ... test setup ... >>> import tempfile >>> tmpdir = tempfile.TemporaryDirectory() >>> # The repo url can be anything that git recognizes >>> # as a git repo >>> repo_url = tmpdir.name # Here it is a local...
zenoss/Community-Zenpacks
refs/heads/master
ZenPacks.AndreaConsadori.Netasq/ZenPacks/AndreaConsadori/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
mndarren/Code-Lib
refs/heads/master
Python_lib/coding_challenge/circles.py
1
from turtle import Turtle t=Turtle() t.screen.bgcolor("black") colors=["red","yellow","purple"] t.screen.tracer(0,0) for x in range(100): t.circle(x) t.color(colors[x%3]) t.left(60) t.screen.exitonclick() t.screen.mainloop()
ashxjain/networkscripts
refs/heads/master
all_v6_ospf.py
2
#python all_v6_ospf.py -s ansible-spine1,ansible-spine2 from __future__ import print_function import subprocess import argparse import time import sys parser = argparse.ArgumentParser(description='VRRP creator') parser.add_argument( '-s', '--switch', help='list of switches separated by comma. Switch1 will beco...
jart/tensorflow
refs/heads/master
tensorflow/tools/dist_test/server/__init__.py
178
# 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...
MiLk/ansible
refs/heads/devel
lib/ansible/modules/monitoring/circonus_annotation.py
77
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014-2015, Epic Games, 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 # ...
elainenaomi/sciwonc-dataflow-examples
refs/heads/master
dissertation2017/Experiment 1A/instances/10_2_workflow_full_10files_secondary_wmj_3sh_3rs_with_annot_with_proj_3s_range/work/ubuntu/pegasus/example_workflow/20161107T143001+0000/ConfigDB_Task_GeneralInfo_4.py
95
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.internal:27017,ip-172-31-29-106.us-west-2.compute.internal:27017,ip-172-31-29...
MariaSolovyeva/inasafe
refs/heads/develop
safe/utilities/test/test_analysis.py
4
# coding=utf-8 """Test for Analysis Class. Contact : ole.moller.nielsen@gmail.com .. note:: 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 y...
awduda/awduda.github.io
refs/heads/master
model.py
1
from flask import Flask from flask_sqlalchemy import SQLAlchemy from sqlalchemy.sql.expression import text from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.dialects.postgresql import JSON import os app = Flask(__name__,static_url_path='/static') # app.config['SQLALCHEMY_DATABASE_URI']= os.environ['DATABASE_...
nttks/edx-platform
refs/heads/gacco/dogwood
common/djangoapps/util/tests/test_file.py
1
# -*- coding: utf-8 -*- """ Tests for file.py """ import ddt from io import StringIO from django.test import TestCase from datetime import datetime from django.utils.timezone import UTC from mock import patch, Mock from django.http import HttpRequest from django.core.files.uploadedfile import SimpleUploadedFile import...
srsman/odoo
refs/heads/8.0
addons/auth_openid/__init__.py
443
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
jinie/sublime-wakatime
refs/heads/master
packages/wakatime/packages/simplejson/__init__.py
42
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
rcatwood/Savu
refs/heads/master
savu/tomo_recon.py
1
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
spaceone/pyjs
refs/heads/master
tests/test030.py
13
class DynaTableWidge: def setStatusText(self, text): self.navbar.status.setText(text)
amiller87/puracore
refs/heads/master
qa/rpc-tests/httpbasics.py
38
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test rpc http basics # from test_framework.test_framework import BitcoinTestFramework from test_fram...
robclark/xbmc
refs/heads/master
tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py
55
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-2010 Team XBMC # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) ...
alexallah/django
refs/heads/master
django/contrib/staticfiles/handlers.py
32
from urllib.parse import urlparse from urllib.request import url2pathname from django.conf import settings from django.contrib.staticfiles import utils from django.contrib.staticfiles.views import serve from django.core.handlers.wsgi import WSGIHandler, get_path_info class StaticFilesHandler(WSGIHandler): """ ...
JesseLivezey/pymc3
refs/heads/master
pymc3/step_methods/nuts.py
9
from .quadpotential import * from .arraystep import * from ..core import * from numpy import exp, log from numpy.random import uniform from .hmc import leapfrog, Hamiltonian, bern, energy from ..tuning import guess_scaling import theano from ..theanof import make_shared_replacements, join_nonshared_inputs, CallableTens...
jbassen/edx-platform
refs/heads/master
common/djangoapps/util/module_utils.py
106
""" Utility library containing operations used/shared by multiple courseware modules """ def yield_dynamic_descriptor_descendants(descriptor, user_id, module_creator): # pylint: disable=invalid-name """ This returns all of the descendants of a descriptor. If the descriptor has dynamic children, the modul...
JCROM-Android/jcrom_external_chromium_org
refs/heads/kitkat
chrome/common/extensions/docs/server2/update_server.py
152
#!/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 getpass import os import subprocess import sys import build_server if __name__ == '__main__': additional_args = [] if ...
crmccreary/openerp_server
refs/heads/master
openerp/addons/l10n_es/__init__.py
100
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2007 ACYSOS S.L. (http://acysos.com) All Rights Reserved. # Pedro Tarrafeta (pedro@acysos.com) # Copyright (c) 2008-2010 Zikz...
mgp/bittorrent-dissected
refs/heads/master
Encrypter.py
1
# Written by Bram Cohen # see LICENSE.txt for license information from cStringIO import StringIO from binascii import b2a_hex from socket import error as socketerror protocol_name = 'BitTorrent protocol' def toint(s): return long(b2a_hex(s), 16) def tobinary(i): return (chr(i >> 24) + chr((i >> 16) & 0xFF) ...
Hellowlol/HTPC-Manager
refs/heads/master2
libs/pyasn1/type/tag.py
162
# ASN.1 types tags from operator import getitem from pyasn1 import error tagClassUniversal = 0x00 tagClassApplication = 0x40 tagClassContext = 0x80 tagClassPrivate = 0xC0 tagFormatSimple = 0x00 tagFormatConstructed = 0x20 tagCategoryImplicit = 0x01 tagCategoryExplicit = 0x02 tagCategoryUntagged = 0x04 class Tag: ...
tpltnt/stupid-login-website
refs/heads/master
stupid-cracker.py
1
#!/usr/bin/env python3 """ Exploit the timing sidechannel in a stupid login website. """ import random import requests import string import sys import time # check time with fudge factor def longerThan(t1, t2, fudge=0.01): """ check time length with a fudge factor """ if abs(t1 - t2) < fudge: ...
syci/OCB
refs/heads/9.0
addons/rating_project_issue/models/project_issue.py
51
# -*- coding: utf-8 -*- from openerp import api, fields, models class ProjectIssue(models.Model): _name = "project.issue" _inherit = ['project.issue', 'rating.mixin'] @api.multi def write(self, values): if 'stage_id' in values and values.get('stage_id'): template = self.env['proj...
keakon/gunicorn
refs/heads/master
tests/test_arbiter.py
15
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import gunicorn.app.base import gunicorn.arbiter class PreloadedAppWithEnvSettings(gunicorn.app.base.BaseApplication): """ Simple application that makes use of the 'preloa...
ByteInternet/python-social-auth
refs/heads/master
examples/flask_example/models/__init__.py
58
from flask_example.models import user from social.apps.flask_app.default import models
GheRivero/ansible
refs/heads/devel
lib/ansible/module_utils/facts/hardware/base.py
172
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
lemaiyan/yowsup
refs/heads/master
yowsup/layers/protocol_acks/protocolentities/test_ack_outgoing.py
65
from yowsup.layers.protocol_acks.protocolentities.ack_outgoing import OutgoingAckProtocolEntity from yowsup.structs.protocolentity import ProtocolEntityTest import unittest entity = OutgoingAckProtocolEntity("12345", "receipt", "delivery", "to_jid") class OutgoingAckProtocolEntityTest(ProtocolEntityTest, unittest.Tes...
Designist/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/Tools/gdc.py
327
#! /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 sys from waflib.Tools import ar,d from waflib.Configure import conf @conf def find_gdc(conf): conf.find_program('gdc',var='D') out=conf.cmd_and_log([conf.env.D,'--ver...
OpenKMIP/PyKMIP
refs/heads/master
kmip/tests/unit/core/attributes/test_digest.py
1
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
ns950/calibre
refs/heads/master
src/calibre/ebooks/docx/theme.py
16
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' class Theme(object): def __init__(self, namespace): self.major...
cisco-openstack/neutron
refs/heads/staging/libertyplus
neutron/tests/api/test_subnetpools_negative.py
14
# Copyright 2015 Hewlett-Packard Development Company, L.P. # 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...
ftomassetti/intellij-community
refs/heads/master
python/helpers/packaging_tool.py
37
import sys import traceback import getopt import os ERROR_WRONG_USAGE = 1 ERROR_NO_PIP = 2 ERROR_NO_SETUPTOOLS = 3 ERROR_EXCEPTION = 4 os.putenv("PIP_REQUIRE_VIRTUALENV", "false") def exit(retcode): major, minor, micro, release, serial = sys.version_info version = major * 10 + minor if version < 25: ...
jimpick/jaikuengine
refs/heads/master
invite/__init__.py
1073
# Copyright 2009 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, ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/ronto_hue.py
85615
import sys def setup(core, object): return
crepererum/invenio
refs/heads/master
invenio/modules/messages/views.py
12
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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, or (at your...
jevonearth/frappe
refs/heads/develop
frappe/patches/v5_0/fix_email_alert.py
61
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doctype("Email Alert") for e in frappe.get_all("Email Alert"): email_alert = frappe.get_doc("Email Alert", e.name) if email_alert.event == "Date Change": if email_alert.days_in_advance < 0: email_alert.event = "Days After"...
madjelan/scikit-learn
refs/heads/master
examples/feature_selection/plot_rfe_digits.py
245
""" ============================= Recursive feature elimination ============================= A recursive feature elimination example showing the relevance of pixels in a digit classification task. .. note:: See also :ref:`example_feature_selection_plot_rfe_with_cross_validation.py` """ print(__doc__) from skl...
jkettleb/iris
refs/heads/placeholder
lib/iris/experimental/concatenate.py
17
# (C) British Crown Copyright 2013 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
ShaolongHu/Nitrate
refs/heads/develop
tcms/integration/messaging/__init__.py
1
# -*- coding: utf-8 -*- from tcms.integration.messaging.base import MessagingProducer
hfp/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/training/python/training/sampling_ops_test.py
25
# 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...
stadelmanma/OpenPNM
refs/heads/master
test/unit/Geometry/models/ThroatSurfaceAreaTest.py
2
import OpenPNM import scipy as sp class ThroatSurfaceAreaTest: def setup_class(self): self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5]) self.geo = OpenPNM.Geometry.GenericGeometry(network=self.net, pores=self.net.Ps, ...
shepdelacreme/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_network_offering.py
38
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017, David Passante (@dpassante) # Copyright (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': [...
yuanagain/seniorthesis
refs/heads/master
venv/lib/python2.7/site-packages/pip/commands/help.py
919
from __future__ import absolute_import from pip.basecommand import Command, SUCCESS from pip.exceptions import CommandError class HelpCommand(Command): """Show help for commands""" name = 'help' usage = """ %prog <command>""" summary = 'Show help for commands.' def run(self, options, args)...
doismellburning/edx-platform
refs/heads/master
lms/djangoapps/shoppingcart/models.py
39
""" Models for the shopping cart and assorted purchase types """ from collections import namedtuple from datetime import datetime from datetime import timedelta from decimal import Decimal import json import analytics from io import BytesIO from django.db.models import Q import pytz import logging import smtplib impor...
mhielscher/simplebot
refs/heads/master
modules/comment.py
1
#!/usr/bin/python import re import sys import random responses = {} def on_pubmsg(c, e): for w in responses: if e.arguments()[0].find(w) != -1: c.privmsg(e.target(), random.choice(responses[w])) def do_addresponse(c, s, t, ch, a): line = ' '.join(a) pl = line.split('"') tl = [] for i in range(0, len(pl), ...
837468220/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/test_stateful.py
61
# Copyright (c) 2001-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.protocols.stateful """ from twisted.test import test_protocols from twisted.protocols.stateful import StatefulProtocol from struct import pack, unpack, calcsize class MyInt32StringReceiver(StatefulProtocol...
kubeflow/kfp-tekton-backend
refs/heads/master
components/kubeflow/katib-launcher/sample2.py
1
import json from kfp import components import kfp.dsl as dsl @dsl.pipeline( name="Launch katib experiment", description="An example to launch katib experiment." ) def mnist_hpo( name="mnist", namespace="kubeflow", goal=0.99, parallelTrialCount=3, maxTrialCount=12, ...
frreiss/tensorflow-fred
refs/heads/master
tensorflow/python/data/benchmarks/batch_benchmark.py
16
# Copyright 2018 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...
simonwydooghe/ansible
refs/heads/devel
test/units/modules/network/fortimanager/test_fmgr_secprof_av.py
38
# Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
SebastianMerz/calalert
refs/heads/master
Server/venv/lib/python2.7/site-packages/werkzeug/contrib/limiter.py
319
# -*- coding: utf-8 -*- """ werkzeug.contrib.limiter ~~~~~~~~~~~~~~~~~~~~~~~~ A middleware that limits incoming data. This works around problems with Trac_ or Django_ because those directly stream into the memory. .. _Trac: http://trac.edgewall.org/ .. _Django: http://www.djangoproject.com/ ...
Lucas-C/pre-commit
refs/heads/master
pre_commit/languages/system.py
1
from __future__ import unicode_literals from pre_commit.languages import helpers from pre_commit.xargs import xargs ENVIRONMENT_DIR = None get_default_version = helpers.basic_get_default_version healthy = helpers.basic_healthy install_environment = helpers.no_install def run_hook(repo_cmd_runner, hook, file_args):...
sogelink/ansible
refs/heads/devel
lib/ansible/module_utils/facts/virtual/dragonfly.py
232
# 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 distributed in the hope that ...
kellpossible/PyAsh
refs/heads/master
tests/test_system.py
1
import unittest import time from pyash.core.engine import Engine from pyash.core.entity import Entity from pyash.core.entitylistener import EntityListener from pyash.signals import Listener from pyash.core.component import Component from pyash.core.componenttype import ComponentType from pyash.core.family impor...
MarilynDafa/Bulllord-Engine
refs/heads/master
code/externals/freetype2/src/tools/docmaker/docmaker.py
13
#!/usr/bin/env python # # docmaker.py # # Convert source code markup to HTML documentation. # # Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing ...
uberamd/NGECore2
refs/heads/master
scripts/object/building/military/outpost_shed_s03.py
85615
import sys def setup(core, object): return
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/jinja2/nodes.py
130
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
MountainWei/nova
refs/heads/master
nova/compute/claims.py
2
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
matips/iosr-2015
refs/heads/master
sahara/tests/unit/plugins/spark/test_config_helper.py
6
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Antiun/hr
refs/heads/8.0
hr_experience/models/__init__.py
16
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
creimers/cmsplugin-filer
refs/heads/develop
cmsplugin_filer_image/migrations/0003_auto__add_thumbnailoption__add_field_filerimage_thumbnail_option.py
38
# encoding: 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 'ThumbnailOption' db.create_table('cmsplugin_filer_image_thumbnailoption', ( ('...
axilleas/ansible
refs/heads/devel
test/units/plugins/strategies/test_strategy_base.py
5
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
omergulen/brainhack17
refs/heads/master
zezar/zezar.py
1
# Solves "donKEY Kong" from the 2017 HSPC at UVa # Solution by Joseph Tobin, 2017 from sys import stdin if __name__ == '__main__': data = stdin.read().splitlines() n = int(data[0]) i = 1 for case in range(n): c_solved = data[i] i = i+1; p_solved = data[i]; i = i + 1 c_unsolved = data[i] ...
nimbis/django-cms
refs/heads/master
cms/test_utils/project/templates/inner_dir/custom_templates_2/__init__.py
116
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ TEMPLATES = { 'right_col_two.html': _('Two columns'), 'right_col_three.html': _('Three columns'), }
haydenth/ish_parser
refs/heads/master
tests/ComponentTest.py
1
import unittest from ish_parser import CloudCoverage, Minutes, Irradiance from ish_parser.Components import * class SkyCoverSummationComponentTest(unittest.TestCase): def test_string(self): simple_string = '4991+0061059' sd = SkyCoverSummationComponent() sd.loads(simple_string) self.assertEqual(sd.s...
bryancall/trafficserver
refs/heads/master
tests/gold_tests/pluginTest/slice/slice_regex.test.py
6
''' ''' # 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");...
manazhao/tf_recsys
refs/heads/r1.0
tensorflow/contrib/learn/python/learn/estimators/stability_test.py
112
# 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...
seecr/meresco-harvester
refs/heads/master
test/filterfieldstest.py
1
## begin license ## # # "Meresco Harvester" consists of two subsystems, namely an OAI-harvester and # a web-control panel. # "Meresco Harvester" is originally called "Sahara" and was developed for # SURFnet by: # Seek You Too B.V. (CQ2) http://www.cq2.nl # # Copyright (C) 2019 Seecr (Seek You Too B.V.) https://seecr.nl...
IndonesiaX/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/social_facebook/preferences/models.py
1644
""" A models.py is required to make this an app (until we move to Django 1.7) """
gustavovaliati/ci724-finalwork-ppginfufpr-2016
refs/heads/master
sklearn/svm_coal_gridsearch_lbp_canny.py
1
#!/usr/bin/python import matplotlib.pyplot as plt import glob, sys, os, json, datetime, argparse, random import numpy as np from sklearn import datasets, svm, metrics from sklearn.externals import joblib from sklearn.grid_search import GridSearchCV from skimage import feature from skimage.filters import threshold_otsu ...
saquiba2/numpy2
refs/heads/master
benchmarks/benchmarks/__init__.py
90
from __future__ import absolute_import, division, print_function from . import common
kennethmorton/dukeEnergyDisaggregation
refs/heads/master
poller/poller_allEgauge_debug.py
1
import urllib2, code import xml.etree.cElementTree as ET import MySQLdb import datetime, threading, time # Reads eGauge XML data from an input URL and outputs pertinent data def readEgauge(uxmlurl,indices,includeTimeStamp): # Open the URL and parse the xml data try: response = urllib2.urlopen(uxmlurl,t...
robertkowalski/node-gyp
refs/heads/master
gyp/pylib/gyp/flock_tool.py
604
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
bgxavier/neutron
refs/heads/master
neutron/db/migration/alembic_migrations/portsec_init_ops.py
61
# Copyright 2014 OpenStack Foundation # # 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 ...
wasade/qiita
refs/heads/master
qiita_db/test/test_util.py
1
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
drufat/sympy
refs/heads/master
sympy/solvers/tests/test_ode.py
8
from __future__ import division from sympy import (acos, acosh, asinh, atan, cos, Derivative, diff, dsolve, Dummy, Eq, erf, erfi, exp, Function, I, Integral, LambertW, log, O, pi, Rational, rootof, S, simplify, sin, sqrt, Symbol, tan, asin, sinh, Piecewise, symbols, Poly) from sympy.solvers.ode import (_u...
wfxiang08/django178
refs/heads/master
django/contrib/admin/models.py
84
from __future__ import unicode_literals from django.db import models from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.admin.utils import quote from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.translation import ugettext, ugett...
sneaker-rohit/PI2-ns-3
refs/heads/master
test.py
23
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # # Copyright (c) 2009 University of Washington # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free ...
okamstudio/godot
refs/heads/master
modules/gdscript/config.py
19
def can_build(env, platform): return True def configure(env): pass def get_doc_classes(): return [ "GDScript", "GDScriptFunctionState", "GDScriptNativeClass", ] def get_doc_path(): return "doc_classes"
cornell-brg/pymtl
refs/heads/master
pymtl/model/Model.py
1
#======================================================================= # Model.py #======================================================================= """Base modeling components for building hardware description models. This module contains a collection of classes that can be used to construct PyMTL (pronounced...
trankmichael/scikit-learn
refs/heads/master
examples/classification/plot_lda.py
164
""" ==================================================================== Normal and Shrinkage Linear Discriminant Analysis for classification ==================================================================== Shows how shrinkage improves classification. """ from __future__ import division import numpy as np import...
BuildingLink/sentry
refs/heads/master
src/sentry/models/groupseen.py
32
""" sentry.models.groupseen ~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.conf import settings from django.db import models from django.utils import timezone from ...
camradal/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_users.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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 #...