repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
saurabh6790/aimobilize-app-backup
refs/heads/master
accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
6
# 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 webnotes from webnotes.utils import flt def execute(filters=None): if not filters: filters = {} debit_or_credit = webnotes.conn.get_value...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/layout/mapbox/layer/_maxzoom.py
1
import _plotly_utils.basevalidators class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxzoom", parent_name="layout.mapbox.layer", **kwargs ): super(MaxzoomValidator, self).__init__( plotly_name=plotly_name, parent_na...
abadger/ansible
refs/heads/devel
test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/module_utils/compat/ipaddress.py
47
# -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component. # This particular file, and this file only, is based on # Lib/ipaddress.py of cpython # It is licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # # 1. This LICENSE AGREEMENT is between the Python Software Foundation ...
aladdinwang/django-cms
refs/heads/master
cms/plugins/text/models.py
5
from cms.models import CMSPlugin from cms.plugins.text.utils import (plugin_admin_html_to_tags, plugin_tags_to_admin_html, plugin_tags_to_id_list, replace_plugin_tags) from cms.utils.html import clean_html from django.db import models from django.utils.html import strip_tags from django.utils.text import Truncator...
dzan/xenOnArm
refs/heads/master
tools/python/xen/xm/dumppolicy.py
49
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
Koonkie/MetaPathways_Python_Koonkie.3.0
refs/heads/master
libs/python_modules/utils/utils.py
2
#!/usr/bin/env python __author__ = "Kishori M Konwar" __copyright__ = "Copyright 2013, MetaPathways" __credits__ = ["r"] __version__ = "1.0" __maintainer__ = "Kishori M Konwar" __status__ = "Release" """Contains general utility code for the metapaths project""" try: from shutil import rmtree from StringIO i...
xdevelsistemas/taiga-back-community
refs/heads/stable
tests/integration/test_webhooks_wikipages.py
2
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <[email protected]> # Copyright (C) 2014-2016 Jesús Espino <[email protected]> # Copyright (C) 2014-2016 David Barragán <[email protected]> # Copyright (C) 2014-2016 Alejandro Alonso <[email protected]> # Copyright (C) 2014-2016 Anler Hernández ...
porduna/labmanager
refs/heads/master
labmanager/views/embed.py
4
import urlparse import traceback import datetime import certifi import requests from bs4 import BeautifulSoup from flask import Blueprint, render_template, make_response, redirect, url_for, request, session, jsonify, current_app, Response from labmanager.views.authn import requires_golab_login, current_golab_user from...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration.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 ...
arcyfelix/ML-DL-AI
refs/heads/master
Supervised Learning/GANs/dcgan-tensorflayer/tensorlayer/visualize.py
1
#! /usr/bin/python # -*- coding: utf8 -*- import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt # import matplotlib.pyplot as plt import numpy as np import os ## Save images import scipy.misc def save_images(images, size, image_path): """Save mutiple images into one single image. Paramete...
cypreess/django-plans
refs/heads/master
plans/quota.py
1
def get_user_quota(user): """ Tiny helper for getting quota dict for user If user has expired plan, return default plan or None """ from .models import Plan plan = Plan.get_current_plan(user) return plan.get_quota_dict()
sammyshj/gci
refs/heads/master
tests/dbmigration/new_models/db.py
33
if not request.env.web2py_runtime_gae: db = DAL("sqlite://storage.sqlite") else: db = DAL("google:datastore") session.connect(request, response, db=db) # This should detect one table disappeared, one field disappeared and one field added db.define_table("main", Field("remove_name") ...
vsajip/yowsup
refs/heads/master
yowsup/layers/axolotl/protocolentities/test_iq_keys_set.py
68
from yowsup.layers.protocol_iq.protocolentities.test_iq import IqProtocolEntityTest from yowsup.layers.axolotl.protocolentities import SetKeysIqProtocolEntity from yowsup.structs import ProtocolTreeNode class SetKeysIqProtocolEntityTest(IqProtocolEntityTest): def setUp(self): super(SetKeysIqProtocolEntityTe...
yangchandle/FlaskTaskr
refs/heads/master
env/lib/python3.5/site-packages/werkzeug/local.py
148
# -*- coding: utf-8 -*- """ werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from functools import update_wrapper from werkzeug.wsgi import ClosingIt...
devendermishrajio/nova
refs/heads/master
nova/volume/encryptors/nop.py
61
# Copyright (c) 2013 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/...
Microvellum/Fluid-Designer
refs/heads/master
win64-vc/2.78/python/lib/urllib/robotparser.py
9
""" robotparser.py Copyright (C) 2000 Bastian Kleineidam You can choose between two licenses when using this package: 1) GNU GPLv2 2) PSF license for Python 2.2 The robots.txt Exclusion Protocol is implemented as specified in http://www.robotstxt.org/norobots-rfc.txt """ import urllib.parse...
jfhumann/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/doc/en/genapi.py
203
import textwrap import inspect class Writer: def __init__(self, clsname): self.clsname = clsname def __enter__(self): self.file = open("%s.api" % self.clsname, "w") return self def __exit__(self, *args): self.file.close() print "wrote", self.file.name def line...
vitan/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/admin_ordering/tests.py
49
from __future__ import absolute_import, unicode_literals from django.test import TestCase, RequestFactory from django.contrib import admin from django.contrib.admin.options import ModelAdmin from django.contrib.auth.models import User from .models import (Band, Song, SongInlineDefaultOrdering, SongInlineNewOrderi...
gpg/gpgme
refs/heads/master
lang/python/src/constants/event.py
1
# Copyright (C) 2004 Igor Belyi <[email protected]> # Copyright (C) 2002 John Goerzen <[email protected]> # # 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 #...
Reagankm/KnockKnock
refs/heads/master
venv/lib/python3.4/site-packages/numpy/matrixlib/defmatrix.py
38
from __future__ import division, absolute_import, print_function __all__ = ['matrix', 'bmat', 'mat', 'asmatrix'] import sys import numpy.core.numeric as N from numpy.core.numeric import concatenate, isscalar, binary_repr, identity, asanyarray from numpy.core.numerictypes import issubdtype # make translation table _n...
MaxGuevara/quark
refs/heads/master
qa/rpc-tests/forknotify.py
161
#!/usr/bin/env python2 # Copyright (c) 2014 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 -alertnotify # from test_framework import BitcoinTestFramework from bitcoinrpc.authproxy import Aut...
nzurbrugg/ShyreDb
refs/heads/master
pedigree/migrations/0002_auto_20151005_0203.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pedigree', '0001_initial'), ] operations = [ migrations.AlterField( model_name='dog', name='gender',...
gibxxi/nzbToMedia
refs/heads/master
libs/unidecode/x00c.py
252
data = ( '[?]', # 0x00 'N', # 0x01 'N', # 0x02 'H', # 0x03 '[?]', # 0x04 'a', # 0x05 'aa', # 0x06 'i', # 0x07 'ii', # 0x08 'u', # 0x09 'uu', # 0x0a 'R', # 0x0b 'L', # 0x0c '[?]', # 0x0d 'e', # 0x0e 'ee', # 0x0f 'ai', # 0x10 '[?]', # 0x11 'o', # 0x12 'oo', # 0x...
aequitas/home-assistant
refs/heads/dev
homeassistant/components/plex/__init__.py
9
"""The plex component."""
imvu/bluesteel
refs/heads/master
app/logic/benchmark/migrations/0017_benchmarkfluctuationwaiverentry.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-05-05 18:49 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('gitrepo', '0004_auto_20160723_1739'), ('benchmark',...
carlory/kubernetes
refs/heads/master
hack/boilerplate/boilerplate.py
92
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # 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 appli...
twobob/buildroot-kindle
refs/heads/master
output/build/libglib2-2.30.3/gio/gdbus-2.0/codegen/codegen.py
2
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # 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 of the License, or (at ...
helldorado/ansible
refs/heads/devel
lib/ansible/module_utils/gcp.py
77
# 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...
ifduyue/django
refs/heads/master
tests/field_deconstruction/tests.py
11
from django.apps import apps from django.db import models from django.test import SimpleTestCase, override_settings from django.test.utils import isolate_lru_cache class FieldDeconstructionTests(SimpleTestCase): """ Tests the deconstruct() method on all core fields. """ def test_name(self): "...
mancoast/CPythonPyc_test
refs/heads/master
cpython/220_test_coercion.py
8
import copy import sys # Fake a number that implements numeric methods through __coerce__ class CoerceNumber: def __init__(self, arg): self.arg = arg def __repr__(self): return '<CoerceNumber %s>' % repr(self.arg) def __coerce__(self, other): if isinstance(other, CoerceNumber): ...
valkjsaaa/sl4a
refs/heads/master
python/src/Lib/test/test_symtable.py
53
""" Test the API of the symtable module. """ import symtable import unittest import warnings from test import test_support TEST_CODE = """ import sys glob = 42 class Mine: instance_var = 24 def a_method(p1, p2): pass def spam(a, b, *var, **kw): global bar bar = 47 x = 23 glob d...
ojii/sandlib
refs/heads/master
lib/lib-python/2.7/lib2to3/pgen2/driver.py
98
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser driver. This provides a high-level interface to parse a file into a synta...
saullocastro/pyNastran
refs/heads/master
pyNastran/gui/gui_interface/modify_label_properties/interface.py
1
from pyNastran.gui.gui_interface.modify_label_properties.modify_label_properties import ModifyLabelPropertiesMenu def on_set_labelsize_color_menu(self): """ Opens a dialog box to set: +--------+----------+ | Name | String | +--------+----------+ | Min | Float | +--------+--------...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.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 ...
davek44/Kayak
refs/heads/master
tests/test_Identity.py
3
import numpy as np import numpy.random as npr import kayak from . import * def test_identity(): npr.seed(1) np_A = npr.randn(6,7) A = kayak.Parameter(np_A) B = kayak.Identity(A) assert np.all(close_float(B.value, np_A)) assert np.all(close_float(B.grad(A), np.ones((6,7))))
wvengen/ndg_oauth_server
refs/heads/master
ndg/oauth/server/lib/access_token/myproxy_cert_token_generator.py
3
"""OAuth 2.0 WSGI server middleware providing MyProxy certificates as access tokens """ __author__ = "R B Wilkinson" __date__ = "12/12/11" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "[email protected]" __revisi...
szecsi/Gears
refs/heads/master
GearsPy/Project/Components/Figure/Spot.py
1
import Gears as gears from .. import * from .Base import * class Spot(Base) : def applyWithArgs( self, spass, functionName, *, radius : 'Spot radius [um].' = 200, innerRadius : 'Annulus inner radius...
razzius/PyClassLessons
refs/heads/master
instructors/lessons/django-intro/examples/grocery_project/grocery_list/admin.py
3
from grocery_list.models import Post from django.contrib import admin admin.site.register(Post)
bguillot/OpenUpgrade
refs/heads/master
addons/email_template/email_template.py
16
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
rajsadho/django
refs/heads/master
django/db/backends/mysql/compiler.py
691
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def as_subquery_condition(self, alias, columns, compiler): qn = compiler.quote_name_unless_alias qn2 = self.connection.ops.quote_name sql, params = self.as_sql() return '(%s) IN (%s)' % (', '.join('%...
Integral-Technology-Solutions/ConfigNOW-4.3
refs/heads/master
Lib/pawt/swing.py
5
""" A hack to make pawt.swing point to the java swing library. This allows code which imports pawt.swing to work on both JDK1.1 and 1.2 """ swing = None try: import javax.swing.Icon from javax import swing except (ImportError, AttributeError): try: import java.awt.swing.Icon from java.awt import swing except (...
makielab/django-oscar
refs/heads/master
oscar/views/__init__.py
2
from django.shortcuts import render def handler403(request): return render(request, '403.html', status=403) def handler404(request): return render(request, '404.html', status=404) def handler500(request): return render(request, '500.html', status=500)
mikehulluk/morphforge
refs/heads/master
src/morphforge/componentlibraries/morphologylibrary.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
atosatto/ansible
refs/heads/devel
lib/ansible/module_utils/known_hosts.py
46
# 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...
glove747/liberty-neutron
refs/heads/master
neutron/tests/unit/agent/linux/test_ovsdb_monitor.py
18
# Copyright 2013 Red Hat, 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 agre...
Mazecreator/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/neon_depthwise_conv_op_test.py
57
# 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...
wojons/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/flask/module.py
850
# -*- coding: utf-8 -*- """ flask.module ~~~~~~~~~~~~ Implements a class that represents module blueprints. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os from .blueprints import Blueprint def blueprint_is_module(bp): """Used to figure ou...
fvpolpeta/devide
refs/heads/master
modules/vtk_basic/vtkSQLTableReader.py
7
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkSQLTableReader(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk...
ArtemZ/wal-e
refs/heads/master
setup.py
3
#!/usr/bin/env python import os.path import sys # Version file managment scheme and graceful degredation for # setuptools borrowed and adapted from GitPython. try: from setuptools import setup, find_packages # Silence pyflakes assert setup assert find_packages except ImportError: from ez_setup imp...
goksie/newfies-dialer
refs/heads/master
newfies/agent/permission.py
4
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initia...
Nschanche/AstroHackWeek2015
refs/heads/master
day3-machine-learning/solutions/validation_curve.py
7
import matplotlib.pyplot as plt from sklearn.svm import LinearSVC from sklearn.neighbors import KNeighborsClassifier from sklearn.learning_curve import validation_curve cs = [0.00001, 0.0001, 0.001, 0.01, 0.1, 1, 10] training_scores, test_scores = validation_curve(LinearSVC(), X, y, ...
hasadna/django
refs/heads/master
django/utils/timesince.py
79
from __future__ import unicode_literals import datetime from django.utils.timezone import is_aware, utc from django.utils.translation import ungettext, ugettext def timesince(d, now=None, reversed=False): """ Takes two datetime objects and returns the time between d and now as a nicely formatted string, ...
asmodehn/filefinder2
refs/heads/master
filefinder2/machinery.py
1
from __future__ import absolute_import, print_function import sys # Simple module replicating importlib.machinery API of importlib in python3 from ._fileloader2 import ModuleSpec # BuiltinImporter Not Implemented # FrozenImporter Not implemented # WindowsRegistryFinder try: from importlib.machinery import ( ...
maikito26/context.surveillanceroom.togglepreview
refs/heads/master
default.py
1
import xbmc if __name__ == "__main__": # Toggle Preview xbmc.executebuiltin('RunPlugin(plugin://plugin.video.surveillanceroom?action=toggle_preview)')
tmpgit/intellij-community
refs/heads/master
python/testData/refactoring/move/importFirstWithSlash/before/src/tmp.py
166
from file1 import function_1,\ function_2 function_1() function_2()
fredericlepied/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gce_snapshot.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # 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.0', ...
Akasurde/pytest
refs/heads/master
testing/test_helpconfig.py
13
import pytest def test_version(testdir, pytestconfig): result = testdir.runpytest("--version") assert result.ret == 0 #p = py.path.local(py.__file__).dirpath() result.stderr.fnmatch_lines([ '*pytest*%s*imported from*' % (pytest.__version__, ) ]) if pytestconfig.pluginmanager.list_plugin...
axbaretto/beam
refs/heads/master
sdks/python/.tox/lint/lib/python2.7/site-packages/isort/isort.py
7
"""isort.py. Exposes a simple library to sort through imports within Python code usage: SortImports(file_name) or: sorted = SortImports(file_contents=file_contents).output Copyright (C) 2013 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software...
julienmalard/Tikon
refs/heads/master
setup.py
1
from setuptools import setup, find_packages def leer(arch): with open(arch, 'r', encoding='utf-8') as d: return d.read() setup( name='tikon', version=leer('tikon/versión.txt').strip(), packages=find_packages(), url='https://tikon.readthedocs.io', download_url='https://github.com/juli...
jlnaudin/x-drone
refs/heads/master
MissionPlanner-master/packages/IronPython.StdLib.2.7.4/content/Lib/collections.py
76
__all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from _collections import deque, ...
citrix-openstack-build/neutron
refs/heads/master
neutron/db/migration/__init__.py
8
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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/li...
dcifuen/cloudbday
refs/heads/master
src/appengine_config.py
1
# -*- coding: utf-8 -*- """ App Engine specific config """ def namespace_manager_default_namespace_for_request(): """ Handles the namespace resolution based on the environment and the domain from the logged user. This let us test without touching production data while we are in staging :return: No...
ArduPilot/MissionPlanner
refs/heads/master
LogAnalyzer/py2exe/setup.py
20
import os from distutils.core import setup import py2exe Mydata_files = [] for files in os.listdir('./tests/'): f1 = './tests/' + files if os.path.isfile(f1): # skip directories f2 = 'tests', [f1] Mydata_files.append(f2) setup( console=['runner.py'], data_files = Mydata_fi...
liwenlongonly/HelloPython
refs/heads/master
mysite/west/tests.py
24123
from django.test import TestCase # Create your tests here.
saz/django-inplaceedit
refs/heads/master
inplaceeditform/tag_utils.py
21
# Copyright (c) 2010-2013 by Yaco Sistemas <[email protected]> or <[email protected]> # # This program 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)...
lferr/charm
refs/heads/dev
charm/schemes/pkenc/pkenc_paillier99.py
3
''' Pascal Paillier (Public-Key) | From: "Public-Key Cryptosystems Based on Composite Degree Residuosity Classes" | Published in: EUROCRYPT 1999 | Available from: http://link.springer.com/chapter/10.1007%2F3-540-48910-X_16 | Notes: * type public-key encryption (public key) * setting: Integer :Authors: ...
artemsok/sockeye
refs/heads/master
sockeye/config.py
2
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
JRepoInd/PyGithub
refs/heads/master
github/tests/Equality.py
39
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <[email protected]> # # ...
pivotaccess2007/RapidSMS-Rwanda
refs/heads/master
apps/ajax/app.py
5
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import rapidsms import cgi, urlparse, traceback from threading import Thread from SocketServer import ThreadingMixIn from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from django.utils.simplejson import JSONEncoder from django.db.models.query import Quer...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-batch/azure/batch/models/job_schedule_list_options.py
3
# 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 ...
tkaitchuck/nupic
refs/heads/master
external/darwin64/lib/python2.6/site-packages/yaml/dumper.py
543
__all__ = ['BaseDumper', 'SafeDumper', 'Dumper'] from emitter import * from serializer import * from representer import * from resolver import * class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver): def __init__(self, stream, default_style=None, default_flow_style=None, c...
18098924759/Wox
refs/heads/master
PythonHome/Lib/site-packages/_markerlib/__init__.py
1008
try: import ast from _markerlib.markers import default_environment, compile, interpret except ImportError: if 'ast' in globals(): raise def default_environment(): return {} def compile(marker): def marker_fn(environment=None, override=None): # 'empty markers are T...
sbhowmik89/oppia
refs/heads/develop
core/controllers/editor.py
1
# coding: utf-8 # Copyright 2014 The Oppia 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 requir...
gregorynicholas/flask-funktional
refs/heads/develop
setup.py
1
#!/usr/bin/env python """ flask-funktional ~~~~~~~~~~~~~~~~ flask extension which hopes to make functional testing easier. links ````` * `documentation <http://gregorynicholas.github.io/flask-funktional>`_ * `package <http://packages.python.org/flask-funktional>`_ * `source <http://github.com/gregorynicholas/flask-f...
marcospy/TJBot
refs/heads/master
tjbot/commands/auto_question.py
1
# coding: utf-8 from commands.command_handler import CommandHandler class EnableAutoQuestion(CommandHandler): def handle(self): if not self.user.questao_automatica_ativa: self.user.questao_automatica_ativa = True self.user.save() self.reply_text('Questão automática ativada...
osakared/midifile.py
refs/heads/master
midi_file.py
1
import struct class Note(object): """Represents a single midi note""" note_names = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'] def __init__(self, channel, pitch, velocity, start, duration = 0): self.channel = channel self.pitch = pitch self.velocity = velocity self.start = start ...
PulsePod/old-www-do-not-use
refs/heads/master
lib/python2.7/site-packages/pip/vendor/distlib/_backport/sysconfig.py
80
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Access to Python's configuration information.""" import codecs import os import re import sys from os.path import pardir, realpath try: import configparser except ImportError: import Conf...
endolith/scikit-image
refs/heads/master
skimage/transform/tests/__init__.py
672
from ..._shared.testing import setup_test, teardown_test def setup(): setup_test() def teardown(): teardown_test()
platinhom/CADDHom
refs/heads/master
python/bioinformatics/blastp.py
1
""" Taken from ProDy (http://www.csb.pitt.edu/prody/_modules/prody/proteins/blastpdb.html) """ import re import time import urllib2 import xml.etree.cElementTree as etree from urllib import urlencode def blast_pdb(sequence, nhits=250, expect=1e-10, timeout=60, pause=1): query = { 'DATABASE': 'pdb', ...
GeyerA/android_external_chromium_org
refs/heads/master
tools/telemetry/telemetry/core/platform/platform_backend.py
23
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class PlatformBackend(object): def IsRawDisplayFrameRateSupported(self): return False # pylint: disable=W0613 def StartRawDisplayFrameRateMeas...
c0710204/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_mako_module.py
261
""" Test mako_module.py """ from unittest import TestCase from mock import Mock from xmodule.mako_module import MakoModuleDescriptor class MakoModuleTest(TestCase): """ Test MakoModuleDescriptor """ def test_render_template_check(self): mock_system = Mock() mock_system.render_template = Non...
hogarthj/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/validate.py
30
# Copyright (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. # # Ansi...
edlunde-dnastar/StarCluster
refs/heads/vanilla_improvements
starcluster/plugins/pypkginstaller.py
18
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 # later ...
lampwins/netbox
refs/heads/develop
netbox/extras/management/commands/nbshell.py
1
import code import platform import sys from django import get_version from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand APPS = ['circuits', 'dcim', 'extras', 'ipam', 'secrets', 'tenancy', 'users', 'virtualization'] BANNER_TEXT = """### NetBox interactiv...
TheBiggerGuy/pypcappy
refs/heads/master
pypcappy/blocks/__init__.py
1
#!/usr/bin/env python3 from importlib import import_module from .abstract import AbstractBlock """ from .sectionHeaderBlock import SectionHeaderBlock from .customBlock import CustomBlock from .interfaceDescriptionBlock import InterfaceDescriptionBlock from .enhancedPacketBlock import EnhancedPacketBlock BLOCK_TYPES...
ThomasFeher/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/extras/autowaf.py
176
#! /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 glob import os import subprocess import sys from waflib import Configure,Context,Logs,Node,Options,Task,Utils from waflib.TaskGen import feature,before,after global g_i...
baverman/supp
refs/heads/master
tests/test_assistant_location.py
1
import os from supp.assistant import location, _loc from supp.project import Project from .helpers import sp def tlocation(source, pos, project=None, filename=None, debug=False): debug = debug or os.environ.get('DEBUG') return location(project or Project(), source, pos, filename, debug=debug) def test_inst...
tensorflow/graphics
refs/heads/master
tensorflow_graphics/util/__init__.py
1
# Copyright 2020 The TensorFlow Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
Azulinho/ansible
refs/heads/devel
lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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', ...
maljac/odoomrp-wip
refs/heads/8.0
stock_picking_wave_management/__init__.py
240
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import models from . import wizard
icodezjb/bytom
refs/heads/dev
vendor/github.com/tendermint/abci/example/python3/abci/msg.py
8
from .wire import decode_string # map type_byte to message name message_types = { 0x01: "echo", 0x02: "flush", 0x03: "info", 0x04: "set_option", 0x21: "deliver_tx", 0x22: "check_tx", 0x23: "commit", 0x24: "add_listener", 0x25: "rm_listener", } # return the decoded arguments of abci...
karstenw/nodebox-pyobjc
refs/heads/master
examples/New Functions/Example filelist.py
1
print "The Documents folder with paths:" mydocs = filelist( "~/Documents") print u"\n".join(mydocs)
skapfer/rubber
refs/heads/master
src/latex_modules/dvipdfm.py
1
# This file is part of Rubber and thus covered by the GPL import rubber.dvip_tool import rubber.module_interface class Module (rubber.module_interface.Module): def __init__ (self, document, opt): self.dep = rubber.dvip_tool.Dvip_Tool_Dep_Node (document, 'dvipdfm')
SuYiling/chrome_depot_tools
refs/heads/master
third_party/coverage/templite.py
123
"""A simple Python template renderer, for a nano-subset of Django syntax.""" # Coincidentally named the same as http://code.activestate.com/recipes/496702/ import re, sys class Templite(object): """A simple template renderer, for a nano-subset of Django syntax. Supported constructs are extended variable acc...
sanjayankur31/nest-simulator
refs/heads/master
pynest/nest/tests/test_changing_tic_base.py
20
# -*- coding: utf-8 -*- # # test_changing_tic_base.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-62/files/myenv/lib/python2.7/sre_compile.py
4
/usr/lib/python2.7/sre_compile.py
victorzhao/miniblink49
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py
42
# Copyright (C) 2013 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 ...
cgvarela/Impala
refs/heads/cdh5-trunk
shell/ext-py/sqlparse-0.1.14/sqlparse/utils.py
99
''' Created on 17/05/2012 @author: piranna ''' import re try: from collections import OrderedDict except ImportError: OrderedDict = None if OrderedDict: class Cache(OrderedDict): """Cache with LRU algorithm using an OrderedDict as basis """ def __init__(self, maxsize=100): ...
srvg/ansible
refs/heads/devel
test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py
8
#!/usr/bin/env python """Schema validation of ansible-core's ansible_builtin_runtime.yml and collection's meta/runtime.yml""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import datetime import os import re import sys from distutils.version import StrictVersion, LooseVersion ...
albmarvil/The-Eternal-Sorrow
refs/heads/master
dependencies/luabind/boost-build/test/startup_v1.py
4
#!/usr/bin/python # Copyright 2002 Dave Abrahams # Copyright 2003, 2004, 2005 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) from BoostBuild import Tester import os import re def expect_substring(actual,...