repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ebressert/ScipyNumpy_book_examples
refs/heads/master
python_examples/numpy_241_ex1.py
2
import numpy as np # Creating an array for demonstration array = np.arange(10) # Calling a function function_mean = np.mean(array) # Calling a method method_mean = array.mean()
s3nk4s/flaskTutorials
refs/heads/master
FlaskApp/FlaskApp/venv/local/lib/python2.7/encodings/iso8859_14.py
593
""" Python Character Mapping Codec iso8859_14 generated from 'MAPPINGS/ISO8859/8859-14.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
ocelot-collab/ocelot
refs/heads/master
ocelot/optics/bragg.py
1
''' crystal optics ''' from ocelot.optics.elements import Crystal from ocelot.optics.wave import * from ocelot.optics.ray import Ray, trace as trace_ray from ocelot.common.ocelog import * import logging _logger = logging.getLogger(__name__) # from ocelot.gui.optics import * import numpy as np # from pylab import * i...
gfyoung/pandas
refs/heads/master
pandas/tests/dtypes/cast/test_downcast.py
2
import decimal import numpy as np import pytest from pandas.core.dtypes.cast import maybe_downcast_to_dtype from pandas import DatetimeIndex, Series, Timestamp import pandas._testing as tm @pytest.mark.parametrize( "arr,dtype,expected", [ ( np.array([8.5, 8.6, 8.7, 8.8, 8.9999999999995]...
davidoren/CuckooSploit
refs/heads/master
modules/machinery/vmware.py
7
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file was originally produced by Mike Tu. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import glob import logging import subprocess import os.path import shutil import time from lib.cuckoo....
ebar0n/django
refs/heads/master
django/core/files/__init__.py
839
from django.core.files.base import File __all__ = ['File']
Hao-Liu/tp-libvirt
refs/heads/master
libvirt/tests/src/virtual_disks/virtual_disks_encryption.py
8
import logging import os from autotest.client.shared import error from virttest.utils_test import libvirt from virttest import aexpect, remote, virt_vm, virsh from virttest.libvirt_xml import vm_xml, vol_xml, pool_xml from virttest.libvirt_xml.devices.disk import Disk def run(test, params, env): """ Test disk...
SRabbelier/Melange
refs/heads/master
thirdparty/google_appengine/lib/django_0_96/django/utils/tzinfo.py
34
"Implementation of tzinfo classes for use with datetime.datetime." import time from datetime import timedelta, tzinfo class FixedOffset(tzinfo): "Fixed offset in minutes east from UTC." def __init__(self, offset): self.__offset = timedelta(minutes=offset) self.__name = "%+03d%02d" % (offset //...
MathieuR/ardupilot
refs/heads/master
mk/PX4/Tools/genmsg/scripts/genmsg_check_deps.py
216
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2014, Open Source Robotics Foundation, 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: # # * Redistribut...
ilexius/odoo
refs/heads/master
addons/payment_paypal/models/paypal.py
18
# -*- coding: utf-'8' "-*-" import base64 import json import logging import urlparse import werkzeug.urls import urllib2 from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_paypal.controllers.main import PaypalController from openerp.osv import osv, fields from opene...
lukeburden/django-allauth
refs/heads/master
allauth/socialaccount/providers/quickbooks/urls.py
5
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from .provider import QuickBooksOAuth2Provider urlpatterns = default_urlpatterns(QuickBooksOAuth2Provider)
joram/sickbeard-orange
refs/heads/ThePirateBay
lib/imdb/parser/http/searchMovieParser.py
52
""" parser.http.searchMovieParser module (imdb package). This module provides the HTMLSearchMovieParser class (and the search_movie_parser instance), used to parse the results of a search for a given title. E.g., for when searching for the title "the passion", the parsed page would be: http://akas.imdb.com/find?q=...
banglakit/corpus-builder
refs/heads/master
corpus_builder/spiders/public_blog/biggan_projukti.py
1
# -*- coding: utf-8 -*- import scrapy from scrapy.linkextractors import LinkExtractor from scrapy.spiders import Rule from corpus_builder.templates.spider import CommonSpider class BigganProjuktiSpider(CommonSpider): name = 'biggan_projukti' allowed_domains = ['www.bigganprojukti.com', 'bigganprojukti.com'] ...
Valchris/tdoa
refs/heads/master
client/libraries/swamp/chat_example/server.py
12
#!/usr/bin/env python import os import sys from swampdragon.swampdragon_server import run_server os.environ.setdefault("DJANGO_SETTINGS_MODULE", "chat_example.settings") host_port = sys.argv[1] if len(sys.argv) > 1 else None run_server(host_port=host_port)
caveman-dick/ansible
refs/heads/devel
lib/ansible/modules/system/locale_gen.py
26
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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': ['preview'], ...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
plugin.video.playlistLoader/resources/lib/chardet/codingstatemachine.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
msarana/selenium_python
refs/heads/master
ENV/Lib/codecs.py
33
""" codecs -- Python Codec Registry, API and helpers. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import __builtin__, sys ### Registry and builtin stateless codec functions try: from _codecs import * except ImportError, why: raise SystemErr...
rgommers/statsmodels
refs/heads/master
statsmodels/datasets/heart/__init__.py
829
from .data import *
rtx3/deyun.io
refs/heads/master
smwds/node/__init__.py
1
from node.api_func import Indb_func from .models import Perf, Perf_Node, Perf_Cpu, Perf_Mem, Perf_TCP, Perf_Disk, Perf_System_Load, Perf_Socket, Perf_Process_Count, Perf_Netif, Perf_Ping, Statistics, Tasks, Task_Result
slightperturbation/Cobalt
refs/heads/master
ext/emsdk_portable/emscripten/tag-1.34.1/third_party/ply/example/calc/calc.py
165
# ----------------------------------------------------------------------------- # calc.py # # A simple calculator with variables. This is from O'Reilly's # "Lex and Yacc", p. 63. # ----------------------------------------------------------------------------- import sys sys.path.insert(0,"../..") if sys.version_info...
google-research/google-research
refs/heads/master
tunas/basic_specs_test.py
1
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
pdellaert/ansible
refs/heads/devel
lib/ansible/modules/cloud/huawei/hwc_network_vpc.py
24
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2018 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 #################################################################...
ChenJunor/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/views/generic/dates.py
90
from __future__ import unicode_literals import datetime from django.conf import settings from django.db import models from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import force_str, force_text from django.utils.functional import cached_property from ...
jeremiedecock/snippets
refs/heads/master
python/tkinter/python2/button2.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
IKholopov/HackUPC2017
refs/heads/master
hackupc/env/lib/python3.5/site-packages/social/tests/actions/test_disconnect.py
58
import requests from httpretty import HTTPretty from social.actions import do_disconnect from social.exceptions import NotAllowedToDisconnect from social.utils import parse_qs from social.tests.models import User, TestUserSocialAuth from social.tests.actions.actions import BaseActionTest class DisconnectActionTest...
schollz/playlistfromsong
refs/heads/master
playlistfromsong/server.py
1
from distutils.spawn import find_executable from os.path import realpath, abspath, join, dirname from subprocess import call import fnmatch from os import chdir, walk, getcwd import re from flask import Flask, jsonify, send_from_directory, render_template, request from waitress import serve app = Flask(__name__) pla...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/static/structure/general/droid_4lom_powerdown.py
85615
import sys def setup(core, object): return
ganescoo/Django-facebook
refs/heads/master
docs/docs_env/Lib/encodings/ascii.py
858
""" Python 'ascii' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. ...
Ramblurr/spot-persist
refs/heads/master
spotpersist/sql.py
1
from sqlalchemy import orm from sqlalchemy import create_engine from . import model debug = False session = None def init_db(db_url): global session # Create an engine and create all the tables we need engine = create_engine(db_url, echo=debug) model.metadata.bind = engine model.metadata.create_a...
Demolisty24/AlexaFood-Backend
refs/heads/master
venv/Lib/site-packages/werkzeug/_internal.py
254
# -*- coding: utf-8 -*- """ werkzeug._internal ~~~~~~~~~~~~~~~~~~ This module provides internally used helpers and constants. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import string import inspect from weakre...
tudorbarascu/QGIS
refs/heads/master
python/plugins/processing/modeler/OpenModelFromFileAction.py
12
# -*- coding: utf-8 -*- """ *************************************************************************** OpenModelFromFileAction.py --------------------- Date : February 2018 Copyright : (C) 2018 by Nyall Dawson Email : nyall dot dawson at gmail dot com ****...
jnewland/home-assistant
refs/heads/ci
homeassistant/components/stream/__init__.py
5
"""Provide functionality to stream video source.""" import logging import threading import voluptuous as vol from homeassistant.auth.util import generate_secret import homeassistant.helpers.config_validation as cv from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_FILENAME from homeassistant.core import c...
K4zuki/tempcommand
refs/heads/master
library/dummyUSB.py
1
#-*- coding: utf-8 -*- #!/usr/bin/env python ## dummy class to replace usbio class class I2C(object): def __init__(self,module,slave): pass def searchI2CDev(self,begin,end): pass def write_register(self, reg, data): pass # def I2C(self,mo...
alon/polinax
refs/heads/master
libs/external_libs/docutils-0.4/docutils/parsers/rst/directives/images.py
6
# Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 4234 $ # Date: $Date: 2005-12-29 02:14:21 +0100 (Thu, 29 Dec 2005) $ # Copyright: This module has been placed in the public domain. """ Directives for figures and simple images. """ __docformat__ = 'reStructuredText' import sys ...
kasioumis/invenio
refs/heads/master
invenio/ext/fs/cloudfs/dropboxfs.py
17
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014 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 option) any...
akurtakov/Pydev
refs/heads/master
plugins/org.python.pydev.jython/Lib/xml/etree/ElementPath.py
273
# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fix...
cortedeltimo/SickRage
refs/heads/master
lib/pgi/codegen/cffi_backend.py
19
# Copyright 2012,2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. import textwrap from ...
mojolab/LivingData
refs/heads/master
lib/livdatgooglelib.py
1
#!/usr/bin/python import pygsheets
mapbased/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py
124
# 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...
papouso/odoo
refs/heads/8.0
addons/l10n_in/__init__.py
702
# -*- 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...
nwiizo/workspace_2017
refs/heads/master
ansible-modules-core/network/nxos/nxos_vtp_version.py
13
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
IronLanguages/ironpython3
refs/heads/master
Src/StdLib/Lib/test/test_contextlib.py
4
"""Unit tests for contextlib.py, and other context managers.""" import io import sys import tempfile import unittest from contextlib import * # Tests __all__ from test import support try: import threading except ImportError: threading = None class ContextManagerTestCase(unittest.TestCase): def test_con...
pratikmallya/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/mutable_list.py
217
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://www.aryehleib.com/MutableLists.html Author: Aryeh Leib Taurog. """ from django.utils.f...
suyashphadtare/sajil-frappe
refs/heads/develop
frappe/patches/v4_1/enable_print_as_pdf.py
35
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("core", "doctype", "print_settings") print_settings = frappe.get_doc("Print Settings") print_settings.print_style = "Modern" ...
LiberatorUSA/GUCEF
refs/heads/master
dependencies/cegui/cegui/src/ScriptModules/Python/bindings/output/CEGUI/named_tuple.py
83
# This file has been generated by Py++. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) class named_tuple(tuple): """Creates tuple, which allows access to stored values b...
HuaweiSwitch/ansible
refs/heads/devel
test/runner/lib/cover.py
26
"""Code coverage utilities.""" from __future__ import absolute_import, print_function import os import re from lib.target import ( walk_module_targets, walk_compile_targets, ) from lib.util import ( display, ApplicationError, EnvironmentConfig, run_command, common_environment, ) from li...
shabda/pychart
refs/heads/master
demos/tickmarks.py
6
# # Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com) # # Pychart 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, or (at your option) any # later version. # # Pychart is dis...
nonnib/eve-metrics
refs/heads/master
web2py/applications/admin/models/0.py
14
EXPIRATION = 60 * 60 # logout after 60 minutes of inactivity CHECK_VERSION = True WEB2PY_URL = 'http://web2py.com' WEB2PY_VERSION_URL = WEB2PY_URL + '/examples/default/version' ########################################################################### # Preferences for EditArea # the user-interface feature that allo...
agry/NGECore2
refs/heads/master
scripts/object/weapon/melee/sword/crafted_saber/sword_lightsaber_one_handed_gcw_s01_gen5.py
85615
import sys def setup(core, object): return
pyrrho314/recipesystem
refs/heads/master
trunk/dontload-astrodata_Gemini/ADCONFIG_Gemini/classifications/status/gemdtype.PROCESSED_BIAS.py
1
class PROCESSED_BIAS(DataClassification): name="PROCESSED_BIAS" usage = 'Applies to all "gbias"ed data.' parent = "UNPREPARED" requirement = OR([PHU( {'{re}.*?GBIAS': ".*?" }), PHU( {'{re}.*?PROCBIAS': ".*?" })]) newtypes.append(PROCESSED_BIAS())
keedio/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/shared/password_hasher.py
118
# file openpyxl/shared/password_hasher.py # Copyright (c) 2010 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
Jumpscale/jumpscale_core8
refs/heads/master
lib/JumpScale/tools/openwrt/dns.py
1
from io import StringIO from base import BaseService class DNSError(Exception): pass class DNS(BaseService): PACKAGE = 'dhcp' HOSTS = '/tmp/hosts/jumpscale' ADD_OP = '+' REM_OP = '-' REMALL_OP = '--' def __init__(self, wrt): super(DNS, self).__init__(wrt) self._transa...
trailbehind/UserVoice-Knowledgebase-to-PDF
refs/heads/master
uservoiceToPDF.py
1
#!/usr/bin/env python """ A script to crawl the Gaia GPS user manual and convert its contents to a PDF document. Created by Anting Shen on 8/19/13. Copyright (c) 2013 TrailBehind, Inc. All rights reserved. """ import HTMLParser import logging import sys import urllib2 import urlparse import re logging.basi...
cesarmarinhorj/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py
124
# Copyright (C) 2010 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 ...
grumpyjames/buck
refs/heads/master
test/com/facebook/buck/jvm/java/testdata/fat_jar/print_lib_path.py
47
import os import sys import json json.dump(dict(os.environ), sys.stdout)
agati/chimera
refs/heads/master
src/chimera/core/tests/test_site.py
5
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
andmos/ansible
refs/heads/devel
lib/ansible/executor/action_write_locks.py
140
# (c) 2016 - Red Hat, Inc. <info@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versi...
petteyg/intellij-community
refs/heads/master
python/testData/copyPaste/LineToEnd.dst.py
83
print 1<caret> print 3
Mirantis/mos-horizon
refs/heads/master
openstack_dashboard/enabled/_9001_developer.py
12
# Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
synlogic/kohaibot-for-discord
refs/heads/dev
commands/stop.py
1
import discord async def run(client, message, object_list=None): # Checks if player is in the object_list, and if it is stops the player then returns # an edited object list with the new player (discord player seems to change objects when stopped or started so this is necessary) index = 0 for i...
ericoporto/Chove-Agora
refs/heads/master
lib/oauthlib/oauth2/rfc6749/endpoints/token.py
71
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. """ from __future__ import absolute_import, unicode_literals import logging from oauthlib.common import Request from .base import BaseEn...
matus-stehlik/glowing-batman
refs/heads/master
problems/admin.py
1
from django.contrib import admin from reversion import VersionAdmin from base.admin import (PrettyFilterMixin, MediaRemovalAdminMixin, DownloadMediaFilesMixin) from base.util import admin_commentable, editonly_fieldsets from .models import (Problem, ProblemSet, ProblemSeverity, ProblemCategory...
EvolutionClip/pyload
refs/heads/stable
module/gui/CNLServer.py
41
# -*- coding: utf-8 -*- """ 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 ...
novapost/django-guardian
refs/heads/master
guardian/managers.py
35
from django.db import models from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from guardian.exceptions import ObjectNotPersisted class UserObjectPermissionManager(models.Manager): def assign(self, perm, user, obj): """ Assigns permission...
FSource/Faeris
refs/heads/master
tool/binpy/libpy/data/FgzPacker.py
1
from FgzWriter import FgzWriter from ..files import Dir class FgzPacker: def __init__(self,working_dir,target_dir): self.m_workingDir=[] for d in working_dir: self.m_workingDir.append(Dir.Dir_toStdName(d)) self.m_targetDir=Dir.Dir_toStdName(target_dir) self.m_packageName="fdata.fgz" self.m_ignoreFileEx...
rahushen/ansible
refs/heads/devel
lib/ansible/module_utils/facts/other/facter.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 ...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v22/tests/postgres_tests/test_json.py
1
import datetime import uuid from decimal import Decimal from django.core import checks, exceptions, serializers from django.core.serializers.json import DjangoJSONEncoder from django.db.models import Q from django.forms import CharField, Form, widgets from django.test.utils import isolate_apps from django.utils.html i...
SamYaple/neutron
refs/heads/master
neutron/tests/unit/api/test_api_common.py
68
# Copyright (c) 2013 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
skoppisetty/hackathon
refs/heads/master
lib/cherrypy/wsgiserver/wsgiserver2.py
95
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('...
wwitzel3/awx
refs/heads/devel
awx/lib/tests/test_display_callback.py
1
# Copyright (c) 2017 Ansible by Red Hat # All Rights Reserved from __future__ import absolute_import from collections import OrderedDict import json import mock import os import shutil import sys import tempfile import pytest # ansible uses `ANSIBLE_CALLBACK_PLUGINS` and `ANSIBLE_STDOUT_CALLBACK` to # discover call...
katrid/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....
rolandmansilla/microblog
refs/heads/master
flask/lib/python2.7/site-packages/wheel/signatures/djbec.py
566
# Ed25519 digital signatures # Based on http://ed25519.cr.yp.to/python/ed25519.py # See also http://ed25519.cr.yp.to/software.html # Adapted by Ron Garret # Sped up considerably using coordinate transforms found on: # http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html # Specifically add-2008-hwcd-4 and d...
cryptobanana/ansible
refs/heads/devel
test/units/modules/network/enos/test_enos_facts.py
57
# (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 # (at your option) any later version. # # Ansible is dis...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7/Lib/test/badsyntax_future3.py
383
"""This is a test""" from __future__ import nested_scopes from __future__ import rested_snopes def f(x): def g(y): return x + y return g result = f(2)(4)
agrc/deq-enviro
refs/heads/utahddw
scripts/download/run_tool.py
1
import arcpy table_id_map = '{"VCP": ["C004"], "BFTARGETED": ["3"], "UICFacility": ["UTU35F04CBB9F3"]}' #: using .py file (only way I could get pdb to work) # import DeqEnviro # tool = DeqEnviro.Tool() # map_param = arcpy.Parameter() # map_param.value = table_id_map # type_param = arcpy.Parameter() # type_param.value...
rcbops/melange-buildpackage
refs/heads/master
melange/tests/factories/models.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
badock/nova
refs/heads/master
nova/tests/volume/encryptors/test_cryptsetup.py
31
# 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/...
hiaselhans/OpenGlider
refs/heads/develop
openglider/airfoil/profile_2d.py
1
#! /usr/bin/python2 # -*- coding: utf-8; -*- # # (c) 2013 booya (http://booya.at) # # This file is part of the OpenGlider project. # # OpenGlider 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 ...
gedare/gem5
refs/heads/master
util/checkpoint-tester.py
10
#! /usr/bin/env python2 # Copyright (c) 2010 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 conditions are # met: redistributions of source code must retain the above copyright # notice...
crdroid-devices/android_kernel_motorola_msm8226
refs/heads/6.0.0
scripts/build-all.py
1474
#! /usr/bin/env python # Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # ...
izgzhen/servo
refs/heads/master
tests/wpt/web-platform-tests/common/form-submission.py
131
def main(request, response): if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded': result = request.body == 'foo=bara' elif request.headers.get('Content-Type') == 'text/plain': result = request.body == 'qux=baz\r\n' else: result = request.POST.first('foo') ==...
Serag8/Bachelor
refs/heads/master
google_appengine/google/appengine/tools/appcfg.py
1
#!/usr/bin/env python # # Copyright 2007 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 o...
tareqalayan/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py
45
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
chop-dbhi/django-support-form
refs/heads/master
supportform/urls.py
1
from django.conf.urls import * from . import views urlpatterns = patterns('', url(r'^$', views.form, name='supportform-form'), url(r'^success/$', views.success, name='supportform-success'), )
thalamus/Flexget
refs/heads/develop
flexget/plugins/modify/torrent.py
13
from __future__ import unicode_literals, division, absolute_import import logging import os from flexget import plugin from flexget.event import event from flexget.utils.bittorrent import Torrent, is_torrent_file log = logging.getLogger('modif_torrent') class TorrentFilename(object): """ Makes sure that...
kaiping/incubator-singa
refs/heads/master
examples/gan/lsgan.py
5
# # 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...
egoitzro/poedit
refs/heads/master
deps/boost/tools/build/test/core_delete_module.py
51
#!/usr/bin/python # Copyright 2003 Dave Abrahams # 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) # This tests the facilities for deleting modules. import BoostBuild t = BoostBuild.Tester(pass_toolset=0) t.write("file.jam...
Distrotech/samba
refs/heads/distrotech-samba
source4/scripting/python/samba/tests/auth.py
20
#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 # # 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 Licens...
Stanford-Online/edx-platform
refs/heads/master
common/djangoapps/status/models.py
1
""" Store status messages in the database. """ from config_models.admin import ConfigurationModelAdmin from config_models.models import ConfigurationModel from django.contrib import admin from django.core.cache import cache from django.db import models from opaque_keys.edx.django.models import CourseKeyField class G...
AnishShah/tensorflow
refs/heads/master
tensorflow/python/estimator/model_fn_test.py
6
# 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...
IMCG/priter
refs/heads/master
src/contrib/thriftfs/scripts/hdfs.py
116
#!/usr/bin/env python """ hdfs.py is a python client for the thrift interface to HDFS. 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 ...
kevinmel2000/brython
refs/heads/master
www/src/Lib/test/unittests/future_test2.py
203
"""This is a test""" from __future__ import nested_scopes; import site def f(x): def g(y): return x + y return g result = f(2)(4)
jhdulaney/dnf
refs/heads/master
tests/test_provides.py
5
# -*- coding: utf-8 -*- # Copyright (C) 2012-2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed ...
lucafavatella/intellij-community
refs/heads/cli-wip
python/testData/refactoring/unwrap/forUnwrap_after.py
102
print 1
rafiqsaleh/VERCE
refs/heads/master
verce-hpc-pe/src/networkx/algorithms/isomorphism/matchhelpers.py
35
"""Functions which help end users define customize node_match and edge_match functions to use during isomorphism checks. """ from itertools import permutations import types import networkx as nx __all__ = ['categorical_node_match', 'categorical_edge_match', 'categorical_multiedge_match', ...
orion1024/Sick-Beard
refs/heads/master
lib/requests/packages/chardet/langgreekmodel.py
235
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
scanno/android_kernel_asus_me301t
refs/heads/android-4.4
tools/perf/python/twatch.py
3213
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
Jorge-Rodriguez/ansible
refs/heads/devel
lib/ansible/modules/network/netvisor/pn_admin_syslog.py
11
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # 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': ['...
chffelix/arvore
refs/heads/master
routes.example.py
22
# -*- coding: utf-8 -*- # This is an app-specific example router # # This simple router is used for setting languages from app/languages directory # as a part of the application path: app/<lang>/controller/function # Language from default.py or 'en' (if the file is not found) is used as # a default_language # # ...
syci/l10n-spain
refs/heads/8.0
l10n_es_vat_book/models/l10n_es_vat_book_rectification_issued_tax_summary.py
5
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2017 Praxya (http://praxya.com/) # Daniel Rodriguez Lijo <drl.9319@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the te...