repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
n1analytics/python-paillier
refs/heads/master
phe/tests/cli_test.py
2
import json import random import unittest from unittest import TestCase import tempfile import io import sys import click from click.testing import CliRunner import phe.command_line from phe.command_line import cli class TestConsoleBasics(TestCase): def test_cli_includes_help(self): runner = CliRunner...
avain/angr
refs/heads/master
angr/factory.py
7
from simuvex import SimIRSB, SimProcedures, SimState, BP_BEFORE, BP_AFTER from simuvex import s_options as o from .surveyors.caller import Callable import logging l = logging.getLogger('angr.factory') class AngrObjectFactory(object): def __init__(self, project): self._project = project self._lifte...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/cloud/huawei/hwc_vpc_security_group_rule.py
13
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei # 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 #################################################################...
tareqalayan/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_portgroup.py
10
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2017-18, Ansible Project # Copyright: (c) 2017-18, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ im...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/resource.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
dilawar/moose-full
refs/heads/master
moose-examples/paper-2015/Fig3_chemModels/Fig3D.py
4
import numpy import pylab import moose import time ''' This example implements a reaction-diffusion like system which is bistable and propagates losslessly. It is based on the NEURON example rxdrun.py, but incorporates more compartments and runs for a longer time. The system is implemented in a function rather than a...
kalou/gandi.cli
refs/heads/master
gandi/cli/commands/root.py
2
""" Main namespace commands. """ import click from gandi.cli.core.cli import cli from gandi.cli.core.utils import output_generic, output_service from gandi.cli.core.params import pass_gandi @cli.command() @pass_gandi def setup(gandi): """ Initialize Gandi CLI configuration. Create global configuration dire...
Zhongqilong/kbengine
refs/heads/master
kbe/src/lib/python/Lib/xml/sax/handler.py
925
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id$ """ version ...
donkirkby/domiculture
refs/heads/master
test_priority.py
2
import pytest from priority import PriorityQueue def test_add(): queue = PriorityQueue() queue.add('two', 2) queue.add('three', 3) queue.add('one', 1) item = queue.pop() assert item == 'one' def test_add_default_priority(): queue = PriorityQueue() queue.add('one', 1) queue.a...
tigerneil/psutil
refs/heads/master
setup.py
25
#!/usr/bin/env python # Copyright (c) 2009 Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """psutil is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, net...
ronve/VulkanSponza
refs/heads/master
project/vulkan_proj/src/extern/vulkan/spirv.py
10
# Copyright (c) 2014-2016 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...
kmike/django-webtest
refs/heads/master
django_webtest_tests/settings.py
2
import os import sys import django PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) join = lambda p: os.path.abspath(os.path.join(PROJECT_ROOT, p)) # TODO configure pytest testpaths instead of doing this sys.path.insert(0, join('..')) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqli...
MattsFleaMarket/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_numeric_tower.py
55
# test interactions between int, float, Decimal and Fraction import unittest import random import math import sys import operator from test.support import run_unittest from decimal import Decimal as D from fractions import Fraction as F # Constants related to the hash implementation; hash(x) is based # on the reduc...
NeCTAR-RC/nova
refs/heads/nectar/mitaka
nova/tests/unit/api/openstack/compute/test_flavors_extra_specs.py
7
# Copyright 2011 University of Southern California # 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 # # ...
ArduPilot/ardupilot
refs/heads/master
Tools/ardupilotwaf/boards.py
5
#!/usr/bin/env python # encoding: utf-8 from collections import OrderedDict import sys, os import fnmatch import waflib from waflib import Utils from waflib.Configure import conf _board_classes = {} _board = None class BoardMeta(type): def __init__(cls, name, bases, dct): super(BoardMeta, cls).__init__(...
mrworf/multiremote
refs/heads/master
modules/parser.py
1
import re import importlib import logging class SetupParser: def __init__(self): pass def handleOptions(self, config, line, temp): valid = { 'options' : 'options', 'remote pin ([0-9]+)' : 'pin', 'ux server (https?://[a-zA-Z\.:0-9\-/]+)' : 'ux', } result = self.findEntry(line, val...
srinathv/vispy
refs/heads/master
vispy/app/qt.py
21
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # Force the selection of an application backend. If the user has already # imported PyQt or PySide, this should result in selection of the corresponding # backend. from .backe...
smandy/d_c_experiment
refs/heads/master
scons-local-2.3.4/SCons/compat/_scons_subprocess.py
186
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
pranalik/parjanalib
refs/heads/master
core/doctype/__init__.py
2292
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals
hephaestus9/Radio
refs/heads/master
pithos/pithos.py
1
# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2010-2012 Kevin Mehall <km@kevinmehall.net> #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3, as published #by the Free Software Foundation. # #This program is distributed in th...
kyclark/metagenomics-book
refs/heads/master
python/uproc/annotate_uproc.py
2
#!/usr/bin/env python3 """docstring""" import argparse import os import re import sys from collections import defaultdict # -------------------------------------------------- def get_args(): """get args""" parser = argparse.ArgumentParser(description='Annotate UProC') parser.add_argument('-k', '--kegg_out...
shakamunyi/tensorflow
refs/heads/master
tensorflow/tools/test/upload_test_benchmarks.py
51
# 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...
jholloman/node-gyp
refs/heads/master
gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py
350
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verify that a hard_dependency that is not exported is not pulled in as a dependency for a target if the target does not explicitly speci...
Scarygami/ancient-societies
refs/heads/master
lib/oauth2client/keyring_storage.py
274
# Copyright (C) 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
pepeantena4040/MiSitioWeb
refs/heads/master
lib/toaster/orm/migrations/0002_auto__add_field_build_timespent.py
6
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Build.timespent' db.add_column(u'orm_build', 'timespent',...
resmo/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_servicebustopic.py
24
#!/usr/bin/python # # Copyright (c) 2018 Yuwei Zhou, <yuwzho@microsoft.com> # # 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', ...
TRUFIL/erpnext
refs/heads/develop
erpnext/accounts/report/financial_statements.py
11
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import re from frappe import _ from frappe.utils import (flt, getdate, get_first_day, get_last_day, date_diff, add_months, add_days, form...
YangSongzhou/django
refs/heads/master
tests/gis_tests/geoapp/tests.py
10
from __future__ import unicode_literals import re import tempfile from django.contrib.gis import gdal from django.contrib.gis.db.models import Extent, MakeLine, Union from django.contrib.gis.geos import ( GeometryCollection, GEOSGeometry, LinearRing, LineString, Point, Polygon, fromstr, ) from django.core.man...
rockneurotiko/wirecloud
refs/heads/develop
src/wirecloud/fiwarelabtheme/__init__.py
4
# -*- coding: utf-8 -*- # Copyright (c) 2016 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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...
pierrelb/RMG-Py
refs/heads/master
rmgpy/statmech/__init__.py
11
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of cha...
ehashman/oh-mainline
refs/heads/master
vendor/packages/docutils/docutils/writers/html4css1/__init__.py
18
# $Id: __init__.py 7661 2013-05-07 10:52:59Z milde $ # Author: David Goodger # Maintainer: docutils-develop@lists.sourceforge.net # Copyright: This module has been placed in the public domain. """ Simple HyperText Markup Language document tree Writer. The output conforms to the XHTML version 1.0 Transitional DTD (*al...
theprogrammingthinker/Python-practice
refs/heads/master
PythonObjectandDataStructureBasics/files.py
1
import os # print current directory print(os.getcwd()) # changing the directory # os.chdir(os.path.dirname(__file__)) # print(os.getcwd()) # f = open('test.txt') # print(f.read()) # if i print it again it will print nothing. because the cursor is end of the file # print(f.read()) # to set the cursor begening of ...
karllessard/tensorflow
refs/heads/master
tensorflow/python/keras/engine/base_layer_test.py
1
# 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...
chosenone75/Neural-Networks
refs/heads/master
DUCTextSummary/pre-train-word-vector.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Apr 2 15:21:32 2017 @author: chosenone """ from __future__ import print_function import word2vec filePath = "/home/chosenone/download/corpus/ducdata.txt" # train word vector word2vec.word2vec(filePath,'duc_corpus_word_vector.bin',min_count=0...
Microsoft/PTVS
refs/heads/master
Python/Tests/GlassTests/PythonTests/Python/StepPythonToNative_GetSetAttrO/py_mod.py
12
import cpp_mod cpp_obj = cpp_mod.CppObj() x = cpp_obj.property cpp_obj.property = x
nkmk/python-snippets
refs/heads/master
notebook/os_remove.py
1
import os os.makedirs('temp/', exist_ok=True) with open('temp/file.txt', 'w') as f: f.write('') print(os.listdir('temp')) # ['file.txt'] os.remove('temp/file.txt') print(os.listdir('temp')) # [] # os.remove('temp/') # PermissionError: [Errno 1] Operation not permitted: 'temp/'
mzizzi/ansible
refs/heads/devel
lib/ansible/module_utils/facts/system/python.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 ...
nmc-probe/emulab-nome
refs/heads/master
pelab/magent/UDP/UdpServerDir/makeServerPlot.py
1
# # Copyright (c) 2006 University of Utah and the Flux Group. # # {{{EMULAB-LICENSE # # This file is part of the Emulab network testbed software. # # This file 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 Fou...
elelinux/android_kernel_htc_pyramid
refs/heads/cm-10.1
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
lunafeng/django
refs/heads/master
tests/template_tests/syntax_tests/test_verbatim.py
521
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class VerbatimTagTests(SimpleTestCase): @setup({'verbatim-tag01': '{% verbatim %}{{bare }}{% endverbatim %}'}) def test_verbatim_tag01(self): output = self.engine.render_to_string('verb...
watersalesman/aura-botnet
refs/heads/master
aura-server/convey/migrations/0001_initial.py
1
# Generated by Django 2.0 on 2017-12-19 02:56 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Bot', ...
holycrepe/anki
refs/heads/master
oldanki/sync.py
20
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <oldanki@ichi2.net> # License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html """\ Synchronisation ============================== Support for keeping two decks synchronized. Both local syncing and syncing over HTTP are supported. Server implements ...
gaopeiliang/aiodocker
refs/heads/master
tests/test_events.py
3
import asyncio import pytest def test_events_default_task(docker): loop = asyncio.get_event_loop() docker.events.subscribe() assert docker.events.task is not None loop.run_until_complete(docker.close()) assert docker.events.task.done() assert docker.events.json_stream is None def test_event...
ClearcodeHQ/pytest-redis
refs/heads/master
src/pytest_redis/executor.py
1
# Copyright (C) 2017 by Clearcode <http://clearcode.cc> # and associates (see AUTHORS). # This file is part of pytest-redis. # pytest-redis 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 versi...
zhaodelong/django
refs/heads/master
tests/gis_tests/gdal_tests/test_ds.py
273
import os import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from ..test_data import TEST_DATA, TestDS, get_ds_file if HAS_GDAL: from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, GDALException, OGRIndexError, GDAL_VERSION from django.contrib.gis....
leiferikb/bitpop
refs/heads/master
src/third_party/closure_linter/closure_linter/indentation.py
135
#!/usr/bin/env python # # Copyright 2010 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 #...
airbnb/airflow
refs/heads/master
airflow/contrib/sensors/python_sensor.py
7
# # 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...
n00by0815/kernel_sniper-ICS
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# 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...
foobarbazblarg/stayclean
refs/heads/master
stayclean-2018-december/signup.py
46
#!/usr/bin/python # TODO: issues with new oauth2 stuff. Keep using older version of Python for now. # #!/usr/bin/env python import sys from participantCollection import ParticipantCollection names = sys.argv[1::] participants = ParticipantCollection() for name in names: if participants.hasParticipantNamed(name)...
aamod0611/Playground
refs/heads/master
Django/cci(team and teammembers and groups done)/cci/wsgi.py
5
""" WSGI config for cci project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
kaiocesar/Listasexerciciosppz
refs/heads/master
lista_3_desafio/exercicio_1.py
1
#!/usr/bin/env python # -*- encoding: utf-8 -*- import os """ Exercicio 1 - Lista 3 do curso Python para Zumbis Faça um programa que peça uma nota, entre zero e dez. Mostre uma mensagem caso o valor seja inválido e continue pedindo até que o usuário informe um valor válido """ num=-1 while (num < 0 or nu...
ramanajee/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
122
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
neharejanjeva/techstitution
refs/heads/master
app/logs/venv/lib/python2.7/site-packages/jinja2/ext.py
357
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2 import nod...
nebw/keras
refs/heads/master
examples/mnist_irnn.py
9
'''This is a reproduction of the IRNN experiment with pixel-by-pixel sequential MNIST in "A Simple Way to Initialize Recurrent Networks of Rectified Linear Units" by Quoc V. Le, Navdeep Jaitly, Geoffrey E. Hinton arXiv:1504.00941v2 [cs.NE] 7 Apr 2015 http://arxiv.org/pdf/1504.00941v2.pdf Optimizer is replaced with RM...
v-zhongz/azure-linux-extensions
refs/heads/master
OSPatching/handler.py
6
#!/usr/bin/python # # OSPatching extension # # Copyright 2014 Microsoft 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 # # Unle...
benoitsteiner/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/distributions/laplace_test.py
75
# 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...
indictranstech/reciphergroup-erpnext
refs/heads/master
erpnext/tasks.py
56
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.celery_app import celery_task, task_logger @celery_task() def send_newsletter(site, newsletter, event): # hack! pass event="bulk_long" to queue in long...
ptisserand/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/rhn_channel.py
81
#!/usr/bin/python # Copyright: (c) Vincent Van de Kussen # 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', 'status': ['pr...
hoosteeno/mozillians
refs/heads/master
mozillians/groups/tests/test_membership.py
6
from mock import patch from django.core import mail from django.core.urlresolvers import reverse from nose.tools import eq_, ok_ from mozillians.common.tests import TestCase from mozillians.groups.models import GroupMembership from mozillians.groups.tests import GroupFactory from mozillians.users.tests import UserFac...
JeromeRisselin/PRJ-medtec_sigproc
refs/heads/master
echopen-leaderboard/docker/manage.py
24
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bootcamp.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
hawkerpl/k2
refs/heads/master
styles/models.py
2
"Styles models module" from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from k2.styles import settings from k2.styles import fields as style_fields HOUR_CHOICES = [(x,str(x)+':00') for x in range(0, 24)] def get_styles(self): s, cre...
pgdr/ert
refs/heads/master
python/python/ert_gui/simulation/models/iterated_ensemble_smoother.py
2
from res.enkf.enums import EnkfInitModeEnum, HookRuntime from res.enkf import ErtRunContext from ert_gui.ertwidgets.models.ertmodel import getNumberOfIterations from ert_gui.simulation.models import BaseRunModel, ErtRunError class IteratedEnsembleSmoother(BaseRunModel): def __init__(self, queue_config): ...
davesque/django-rest-framework
refs/heads/master
tests/test_views.py
12
from __future__ import unicode_literals import copy import sys from django.test import TestCase from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.settings import APISettings, api_settings from rest_framework.test import A...
ntt-sic/python-novaclient
refs/heads/master
novaclient/v1_1/contrib/baremetal.py
7
# Copyright 2013 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...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-consumption/azure/mgmt/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
grap/OpenUpgrade
refs/heads/8.0
addons/portal_stock/__init__.py
971
# -*- 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...
openstack/cinder
refs/heads/master
cinder/db/sqlalchemy/migrate_repo/versions/142_placeholder.py
6
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
SanchayanMaity/gem5
refs/heads/CS570
src/arch/power/PowerTLB.py
66
# -*- mode:python -*- # Copyright (c) 2009 The University of Edinburgh # 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, t...
deepjets/deepjets
refs/heads/master
deepjets/clustering.py
1
from ._libdeepjets import (cluster_mc, cluster_numpy, cluster_hdf5, cluster_iterable) from ._libdeepjets import MCInput import h5py as h5 import inspect __all__ = [ 'cluster', ] def cluster(inputs, events=-1, skip_failed=True, eta_max=5., ...
synicalsyntax/zulip
refs/heads/master
tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
3
import json import re from typing import Callable, Iterator, List, Optional, Union import scrapy from scrapy.http import Request, Response from scrapy.linkextractors import IGNORED_EXTENSIONS from scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor from scrapy.spidermiddlewares.httperror import HttpError from scra...
gencer/sentry
refs/heads/master
tests/acceptance/test_project_overview.py
1
from __future__ import absolute_import from django.utils import timezone from sentry.testutils import AcceptanceTestCase class ProjectOverviewTest(AcceptanceTestCase): def setUp(self): super(ProjectOverviewTest, self).setUp() self.user = self.create_user('foo@example.com') self.org = sel...
40223222/-2015cd_midterm2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/browser/markdown.py
623
# -*- coding: utf-8 -*- try: import _jsre as re except: import re import random import time letters = 'abcdefghijklmnopqrstuvwxyz' letters += letters.upper()+'0123456789' class URL: def __init__(self,src): elts = src.split(maxsplit=1) self.href = elts[0] self.alt = '' if ...
milad-soufastai/ansible-modules-extras
refs/heads/devel
clustering/kubernetes.py
18
#!/usr/bin/python # Copyright 2015 Google Inc. All Rights Reserved. # # 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 o...
subhrajyotim/camunda-bpm-platform
refs/heads/master
engine/src/test/resources/org/camunda/bpm/application/impl/embedded/hello.py
134
print 'Hello World!'
FHannes/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/utils/cache.py
71
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
calamityman/ansible-modules-extras
refs/heads/devel
notification/jabber.py
44
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@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 Licen...
linwoodc3/gdeltPyR
refs/heads/master
tests/test_headers.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: # Linwood Creekmore # Email: valinvescap@gmail.com ############################## # Standard Library Import ############################## try: from unittest import TestCase, mock except: from unittest import TestCase import mock import os import sys f...
edmundgentle/schoolscript
refs/heads/master
SchoolScript/bin/Debug/pythonlib/Lib/test/test_iter.py
3
# Test iterators. import unittest from test.support import run_unittest, TESTFN, unlink, cpython_only # Test result of triple loop (too big to inline) TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 0, 0)...
hmendozap/auto-sklearn
refs/heads/master
autosklearn/pipeline/components/classification/__init__.py
1
__author__ = 'feurerm' from collections import OrderedDict import copy import os from ..base import AutoSklearnClassificationAlgorithm, find_components, \ ThirdPartyComponents from HPOlibConfigSpace.configuration_space import ConfigurationSpace from HPOlibConfigSpace.hyperparameters import CategoricalHyperparamet...
huiren/ece511
refs/heads/master
src/mem/slicc/ast/VarExprAST.py
31
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # Copyright (c) 2013 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
jeremiahyan/odoo
refs/heads/master
addons/website_mail/controllers/main.py
6
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http from odoo.http import request class WebsiteMail(http.Controller): @http.route(['/website_mail/follow'], type='json', auth="public", website=True) def website_message_subscribe(self, id=0, ...
pradippatil/hackerrank
refs/heads/master
Python/Sets/Check Strict Superset/solution.py
1
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # @Script: solution.py # @Author: Pradip Patil # @Contact: @pradip__patil # @Created: 2018-02-26 23:14:51 # @Last Modified By: Pradip Patil # @Last Modified: 2018-02-26 23:22:44 # @Description: https://www.hackerrank.com/challenges/py-check-strict-superset/problem if __na...
johnkeepmoving/oss-ftp
refs/heads/master
python27/win32/Lib/distutils/tests/test_upload.py
28
# -*- encoding: utf8 -*- """Tests for distutils.command.upload.""" import os import unittest from test.test_support import run_unittest from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution from distutils.errors import DistutilsError fro...
ah-anssi/SecuML
refs/heads/master
SecuML/core/DimensionReduction/Configuration/Projection/RcaConfiguration.py
1
# SecuML # Copyright (C) 2016 ANSSI # # SecuML is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # SecuML is distributed in the hope t...
nareshganatra/apiai
refs/heads/master
lib/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/ ...
grimmjow8/ansible
refs/heads/devel
lib/ansible/plugins/action/ios_config.py
126
# # (c) 2017, 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 # (at your option) any later version. # # Ansible is...
msebire/intellij-community
refs/heads/master
python/testData/completion/epydocTagsMiddle.after.py
83
def foo(bar): """ @param """
SeattleTestbed/repy_v2
refs/heads/master
namespace.py
1
""" <Program> namespace.py <Started> September 2009 <Author> Justin Samuel <Purpose> This is the namespace layer that ensures separation of the namespaces of untrusted code and our code. It provides a single public function to be used to setup the context in which untrusted code is exec'd (that is, the ...
bala4901/odoo
refs/heads/master
addons/stock_invoice_directly/__init__.py
374
# -*- 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...
agry/NGECore2
refs/heads/master
scripts/object/static/space/beacon/hyperspace_generator_01.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/building/poi/naboo_police_large1.py
85615
import sys def setup(core, object): return
andyxhadji/incubator-airflow
refs/heads/master
tests/contrib/operators/test_jira_operator_test.py
15
# -*- coding: utf-8 -*- # # 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 #...
benjaminrigaud/django
refs/heads/master
tests/fixtures_migration/models.py
40
from django.db import models class Book(models.Model): name = models.CharField(max_length=100)
octronic-uk/python-web-apis
refs/heads/master
octronic/webapis/common/test/TestJSONConfig.py
1
# # TestJSONConfig.py # # 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 hope that...
rcurtin/shogun
refs/heads/develop
applications/easysvm/splicesites/utils.py
38
import random import bz2 import numpy from numpy import array, where, concatenate from numpy import kron, ones, sqrt, sum from os.path import exists from esvm.mldata import convert try: import arff have_arff = True except ImportError: have_arff = False def create_dataset(): """Read the file with firs...
40223117cda/cda
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/__init__.py
603
## pygame - Python Game Library ## Copyright (C) 2000-2001 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
tanmaythakur/django
refs/heads/master
tests/template_tests/utils.py
214
# coding: utf-8 from __future__ import unicode_literals import functools import os from django.template.engine import Engine from django.test.utils import override_settings from django.utils._os import upath from django.utils.encoding import python_2_unicode_compatible from django.utils.safestring import mark_safe ...
jclosure/daw
refs/heads/master
DataAnalysisWeb/api/tests.py
14
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ import django from django.test import TestCase # TODO: Configure your database in settings.py and sync before running tests. class Sim...
oliverhr/odoo
refs/heads/8.0-pos-pademobile-payment
addons/report_webkit/__openerp__.py
247
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
SlamJam/asq
refs/heads/master
asq/test/test_where.py
5
import unittest from asq.queryables import Queryable from asq.test.test_queryable import infinite, TracingGenerator __author__ = "Robert Smallshire" class TestWhere(unittest.TestCase): def test_where(self): a = range(0, 100) b = Queryable(a).where(lambda x: x % 3 == 0).to_list() c = list(...