repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
dmitry-sobolev/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/swupd.py
49
#!/usr/bin/python # (c) 2017, Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 ver...
fuzzyray/pynet_test
refs/heads/master
juniper_ex1.py
1
#!/usr/bin/env python # Juniper Ex1 # ------------ # # Connect to Juniper device using PyEZ. Display device facts. from jnpr.junos import Device from getpass import getpass from pprint import pprint as pp juniper_srx = { "host": "184.105.247.76", "user": "pyclass", "password": getpass(), ...
oniwan/GCI
refs/heads/master
pdfminer-20140328/pdfminer/pdfcolor.py
11
#!/usr/bin/env python from psparser import LIT ## PDFColorSpace ## LITERAL_DEVICE_GRAY = LIT('DeviceGray') LITERAL_DEVICE_RGB = LIT('DeviceRGB') LITERAL_DEVICE_CMYK = LIT('DeviceCMYK') class PDFColorSpace(object): def __init__(self, name, ncomponents): self.name = name self.ncomponents = ncomp...
tribeiro/chimera
refs/heads/master
src/chimera/core/classloader.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...
fentas/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/image_diff.py
119
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>, University of Szeged # Copyright (C) 2011, 2012 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the foll...
ycl2045/nova-master
refs/heads/master
nova/api/openstack/compute/contrib/extended_services.py
14
# 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...
amitsela/beam
refs/heads/master
sdks/python/apache_beam/coders/observable.py
9
# # 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 us...
arcivanov/unittest-xml-reporting
refs/heads/master
tests/django_example/app2/admin.py
13848
from django.contrib import admin # Register your models here.
zofuthan/edx-platform
refs/heads/master
common/test/acceptance/tests/video/test_studio_video_module.py
81
# -*- coding: utf-8 -*- """ Acceptance tests for CMS Video Module. """ from nose.plugins.attrib import attr from unittest import skipIf from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.overview import CourseOutlinePage from ...pages.studio.video.video import VideoComponentPage from ...fixtures.c...
dessn/sn-bhm
refs/heads/master
dessn/configurations/old/approximate_snana_ideal.py
1
import os import logging import socket from dessn.framework.fitter import Fitter from dessn.framework.models.approx_model import ApproximateModel from dessn.framework.simulations.snana import SNANASimulationGauss0p3, SNANASimulationLowzGauss0p3, \ SNANASimulationIdeal0p3 if __name__ == "__main__": logging.basi...
sudosurootdev/external_chromium_org
refs/heads/L5
third_party/protobuf/python/google/protobuf/__init__.py
20578
synasius/django
refs/heads/master
django/contrib/auth/tests/custom_user.py
463
from django.contrib.auth.models import ( AbstractBaseUser, AbstractUser, BaseUserManager, Group, Permission, PermissionsMixin, UserManager, ) from django.db import models # The custom User uses email as the unique identifier, and requires # that every user provide a date of birth. This lets us test # changes ...
abaldwin1/tc_aws
refs/heads/master
tc_aws/loaders/presigning_loader.py
1
# coding: utf-8 # Copyright (c) 2015, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. from tornado.concurrent import return_future import thumbor.loaders.http_loader as http_loader from . import * from ..aws.bucket import Bucket @return_future def...
philwo/pysk
refs/heads/master
pysk/manage.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customiz...
jorik041/viper
refs/heads/master
modules/rats/pandora.py
6
# Originally written by Kevin Breen (@KevTheHermit): # https://github.com/kevthehermit/RATDecoders/blob/master/Pandora.py import re import string import pefile def version_21(raw_config): if raw_config != None: conf_dict = {} conf_dict['Version'] = '2.1' conf_dict['Domain'] = raw_config[0]...
xuxiao19910803/edx
refs/heads/master
lms/djangoapps/lti_provider/tests/test_users.py
85
""" Tests for the LTI user management functionality """ import string from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django.test import TestCase from django.test.client import RequestFactory from mock import patch, MagicMock from lti_provider.models import LtiCons...
terradigital/gae-init
refs/heads/master
main/api/v1/__init__.py
14
# coding: utf-8 from .auth import * from .config import * from .user import *
mdeemer/XlsxWriter
refs/heads/master
xlsxwriter/test/comparison/test_escapes07.py
8
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
deepchem/deepchem-gui
refs/heads/master
gui/static/kekulejs/tutorial/source/conf.py
1
# -*- coding: utf-8 -*- # # KekuleTutorial documentation build configuration file, created by # sphinx-quickstart on Sun Apr 24 21:58:31 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
duyetdev/openerp-6.1.1
refs/heads/master
openerp/addons/crm/wizard/crm_merge_opportunities.py
9
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
m-kuhn/QGIS
refs/heads/master
scripts/qgis_fixes/fix_idioms.py
77
from lib2to3.fixes.fix_idioms import FixIdioms
makermade/arm_android-21_arm-linux-androideabi-4.8
refs/heads/master
lib/python2.7/_sysconfigdata.py
3
# system configuration generated and used by the sysconfig module build_time_vars = {'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_GENUINE_CPLUSPLUS': 0, 'AR': 'i686-linux-gnu-ar', 'ARFLAGS': 'rc', 'ASDLGEN': '/s/ndk-toolchain/src/python/Python-2.7.5/Parser/asdl_c.py', 'ASDLGEN_FILES': '/s/ndk-toolchain/src/python/Python-2....
jeasoft/odoo
refs/heads/marcos-8.0
addons/board/__init__.py
439
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/precice/package.py
1
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Precice(CMakePackage): """preCICE (Precise Code Interaction Coupling Environment) is a ...
santisiri/popego
refs/heads/master
popego/popserver/popserver/agents/delicious_agent.py
3
# -*- coding: utf-8 -*- __docformat__='restructuredtext' from BeautifulSoup import BeautifulSoup from urllib import urlopen import urllib2 from itertools import imap, takewhile import re, md5 from popserver.lib.functional import memo from popserver.lib.util import strToDatetime PAGE_SIZE = 100 POPULARITY_RG = re.comp...
kaixinjxq/crosswalk-test-suite
refs/heads/master
webapi/tct-csp-w3c-tests/csp-py/csp_sandbox_allow-same-origin_allow-scripts.py
30
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "sandbox allow-same-or...
gef756/statsmodels
refs/heads/master
statsmodels/datasets/statecrime/__init__.py
829
from .data import *
danlrobertson/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/tests/element_click/bubbling.py
18
from tests.support.asserts import assert_success from tests.support.inline import inline def element_click(session, element): return session.transport.send( "POST", "/session/{session_id}/element/{element_id}/click".format( session_id=session.session_id, element_id=element.id)) d...
4shadoww/hakkuframework
refs/heads/master
core/lib/future/moves/urllib/robotparser.py
83
from __future__ import absolute_import from future.utils import PY3 if PY3: from urllib.robotparser import * else: __future_module__ = True from robotparser import *
wbc2010/django1.2.5
refs/heads/master
django1.2.5/django/contrib/gis/forms/fields.py
405
from django import forms from django.utils.translation import ugettext_lazy as _ # While this couples the geographic forms to the GEOS library, # it decouples from database (by not importing SpatialBackend). from django.contrib.gis.geos import GEOSGeometry class GeometryField(forms.Field): """ This is the bas...
gkonstantyno/construct
refs/heads/master
construct/formats/graphics/gif.py
2
# Contributed by # Dany Zatuchna (danzat at gmail) """ Implementation of the following grammar for the GIF89a file format <GIF Data Stream> ::= Header <Logical Screen> <Data>* Trailer <Logical Screen> ::= Logical Screen Descriptor [Global Color Table] <Data> ::= <Graphic Block> | ...
hejuna/bite-project
refs/heads/master
deps/gdata-python-client/src/gdata/contacts/client.py
50
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
BayanGroup/sentry
refs/heads/master
src/sentry/rules/actions/__init__.py
40
""" sentry.rules.actions ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from .base import * # NOQA
odejesush/tensorflow
refs/heads/master
venv/lib/python2.7/abc.py
4
/usr/lib/python2.7/abc.py
SellWellDesigns/orion
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/tango.py
363
# -*- coding: utf-8 -*- """ pygments.styles.tango ~~~~~~~~~~~~~~~~~~~~~ The Crunchy default Style inspired from the color palette from the Tango Icon Theme Guidelines. http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines Butter: #fce94f #edd400 #c4a000 Orange: #fcaf3e ...
isotoma/buildbot_travis
refs/heads/master
buildbot_travis/tests/test_git.py
2
from __future__ import absolute_import from __future__ import division from __future__ import print_function from twisted.trial import unittest from buildbot_travis.vcs import git class GitUrlParser(unittest.TestCase): def test_simple(self): url = "git://github.com/tardyp/buildbot_travis" parsed...
fabsx00/chucky-old
refs/heads/master
libjoern/pythonast/PythonASTProcessor.py
1
from sourceutils.misc.GzipPickler import GzipPickler from libjoern.pythonast.PythonASTTreeNode import PythonASTTreeNode #@UnusedImport class PythonASTProcessor(): """ Implements depth-first traversal on ASTs. defaultHandler is called before entering children (pre-order). """ def _...
waseem18/oh-mainline
refs/heads/master
vendor/packages/gdata/samples/apps/provisioning_oauth_example/main.py
38
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
levkar/odoo
refs/heads/10.0
addons/account/tests/test_account_customer_invoice.py
15
from odoo.addons.account.tests.account_test_users import AccountTestUsers import datetime class TestAccountCustomerInvoice(AccountTestUsers): def test_customer_invoice(self): # I will create bank detail with using manager access rights # because account manager can only create bank details. ...
abecede753/trax
refs/heads/master
website/vehicles/urls.py
1
from django.conf.urls import url from .views import (VehicleList, VehicleDetail, VehicleCreate, VehicleUpdate) urlpatterns = [ url(r'^$', VehicleList.as_view(), name='vehicle_list'), url(r'^s/(?P<pk>\d+)/$', VehicleDetail.as_view(), name='vehicle_detail'), url(r'^add/$'...
rajashreer7/autotest-client-tests
refs/heads/master
linux-tools/rpm_test/rpmremove.py
4
#!/usr/bin/python # Upgrades packages passed on the command line. # Usage: # python rpmupgrade.py rpm_file1.rpm rpm_file2.rpm ... import rpm, os, sys # Global file descriptor for the callback. rpmtsCallback_fd = None def runCallback(reason, amount, total, key, client_data): global rpmtsCallback_fd if reason == ...
listingmirror/boto
refs/heads/develop
boto/pyami/installers/ubuntu/ebs.py
38
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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 # without limitation the rights to use, copy, modi...
mrry/tensorflow
refs/heads/windows
tensorflow/python/debug/cli/analyzer_cli_test.py
3
# 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...
TheBraveWarrior/pyload
refs/heads/stable
module/plugins/hoster/JunocloudMe.py
8
# -*- coding: utf-8 -*- from ..internal.XFSHoster import XFSHoster class JunocloudMe(XFSHoster): __name__ = "JunocloudMe" __type__ = "hoster" __version__ = "0.11" __status__ = "testing" __pattern__ = r'http://(?:\w+\.)?junocloud\.me/\w{12}' __config__ = [("activated", "bool", "Activated", Tr...
thekage91/web-snp
refs/heads/master
node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
2637
#!/usr/bin/env python # Copyright (c) 2012 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. """Make the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
schriftgestalt/robofab
refs/heads/master
Docs/Examples/objects/RGlyph_03.py
2
# robofab manual # Glyph object # method examples # In FontLab the baseglyph of a component can't be changed easily. # This assumes that there will only be # one component that needs to be remapped. def remapComponent(glyph, oldBaseGlyph, newBaseGlyph): foundComponent = None for component in glyph.components:...
behanceops/moto
refs/heads/master
moto/ec2/responses/elastic_network_interfaces.py
14
from __future__ import unicode_literals from moto.core.responses import BaseResponse from moto.ec2.utils import sequence_from_querystring, filters_from_querystring class ElasticNetworkInterfaces(BaseResponse): def create_network_interface(self): subnet_id = self.querystring.get('SubnetId')[0] priv...
untom/scikit-learn
refs/heads/master
doc/datasets/twenty_newsgroups_fixture.py
284
"""Fixture module to skip the datasets loading when offline Doctests are skipped if the datasets have not already been dowloaded and cached in the past. """ from os.path import exists from os.path import join from nose import SkipTest from sklearn.datasets import get_data_home def setup_module(module): data_home...
pwoodworth/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/he/formats.py
316
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j בF Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j בF Y H:i:s' YEAR_MONTH...
openvapour/ryu
refs/heads/master
ryu/tests/integrated/test_add_flow_v12_matches.py
34
# Copyright (C) 2012 Nippon Telegraph and Telephone 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 # # Unless required by appli...
andresgz/cookiecutter-django
refs/heads/master
hooks/post_gen_project.py
1
""" Does the following: 1. Generates and saves random secret key 2. Removes the taskapp if celery isn't going to be used 3. Removes the .idea directory if PyCharm isn't going to be used 4. Copy files from /docs/ to {{ cookiecutter.project_slug }}/docs/ TODO: this might have to be moved to a pre_gen_hook A portio...
arielzn/lammps
refs/heads/lammps-icms
python/examples/viz_vmd.py
2
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # viz_vmd.py # Purpose: viz running LAMMPS simulation via VMD # Syntax: viz_vmd.py in.lammps Nfreq Nsteps # in.lammps = LAMMPS input script # Nfreq = dump and viz shapshot every this many steps # Nsteps =...
Work4Labs/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/core/signals.py
747
from django.dispatch import Signal request_started = Signal() request_finished = Signal() got_request_exception = Signal(providing_args=["request"])
Akylas/zxing
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/ifort.py
34
"""SCons.Tool.ifort Tool-specific initialization for newer versions of the Intel Fortran Compiler for Linux/Windows (and possibly Mac OS X). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) ...
jesramirez/odoo
refs/heads/8.0
openerp/addons/base/ir/__init__.py
379
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
gautam1858/tensorflow
refs/heads/master
tensorflow/contrib/gan/python/eval/python/eval_utils_test.py
70
# 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...
sparkslabs/kamaelia
refs/heads/master
Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/Intersect.py
15
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
arthurfurlan/logbook
refs/heads/master
doc/examples/scripts/hooks.d-post/git-commit.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2010 Nick Anderson <nick@cmdln.org> # Based on svn-commit Arthur Furlan <afurlan@afurlan.org> # # 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 #...
Alwnikrotikz/cortex-vfx
refs/heads/master
test/IECore/PolygonAlgoTest.py
12
########################################################################## # # Copyright (c) 2008-2009, Image Engine Design 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: # # * Redis...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/r-rrpp/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRrpp(RPackage): """Linear model calculations are made for many random versions of data. ...
lordmuffin/aws-cfn-plex
refs/heads/master
functions/credstash/botocore/vendored/requests/__init__.py
412
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
simpeg/simpeg
refs/heads/em1d
tests/pf/test_mag_inversion_linear_Octree.py
1
from __future__ import print_function import unittest from SimPEG import ( directives, maps, inverse_problem, optimization, data_misfit, inversion, utils, regularization, ) from discretize.utils import meshutils # import SimPEG.PF as PF from SimPEG.potential_fields import magnetics as ...
citrix-openstack-build/python-troveclient
refs/heads/master
setup.py
3
#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
BartoszCichecki/onlinepython
refs/heads/master
onlinepython/pypy-2.4.0-win32/lib-python/2.7/test/sortperf.py
233
"""Sort performance test. See main() for command line syntax. See tabulate() for output format. """ import sys import time import random import marshal import tempfile import os td = tempfile.gettempdir() def randfloats(n): """Return a list of n random floats in [0, 1).""" # Generating floats is expensive,...
swprojects/The-wxPython-Community-Workshop
refs/heads/master
wxsw/listctrl.py
1
""" <PyRoboTool Alarm & Countdown Timer - execute tasks on scheduled time> Copyright (C) 2016, Simon Wu, <swprojects@gmx.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the ...
erochest/threepress-rdfa
refs/heads/master
bookworm/api/models.py
7
import logging import uuid from django.db import models from django.contrib.auth.models import User import django.db.models.signals as signals from django.http import HttpResponse from django.core.urlresolvers import reverse from bookworm.library import models as bookworm_models from bookworm.api import APIException ...
systers/portal
refs/heads/develop
systers_portal/community/tests/selenium/test_user_actions.py
2
from common.tests.selenium.base import SeleniumTestCase from selenium.webdriver.support.ui import Select class TestUserActions(SeleniumTestCase): """ Automated visual tests for logged in user actions on community app. """ def test_can_request_community(self): self.browser.get(self.live_server...
yaybu/hyperkit
refs/heads/master
hyperkit/hypervisor/vmrun.py
1
import os import subprocess from . import command class VMRun(command.Command): command_name = "vmrun" subcommands = { "start": ["start", "{name}", "{type}"], "stop": ["stop", "{name}", "{type}"], "delete": ["deleteVM", "{name}"], "readVariable": ["readVariable", "{name}", "...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/json/tests/test_scanstring.py
46
import sys from json.tests import PyTest, CTest class TestScanstring(object): def test_scanstring(self): scanstring = self.json.decoder.scanstring if sys.maxunicode == 65535: self.assertEqual( scanstring(u'"z\U0001d120x"', 1, None, True), (u'z\U0001d120x...
sandvine/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/instances/forms.py
5
# Copyright 2013 Kylin OS, 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...
tima/ansible
refs/heads/devel
test/units/plugins/inventory/test_inventory.py
18
# Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.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 ...
tundebabzy/frappe
refs/heads/develop
frappe/modules/import_file.py
6
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe, os, json from frappe.modules import get_module_path, scrub_dt_dn from frappe.utils import get_datetime_str def import_files(module, dt=None, dn=No...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/boto/sdb/domain.py
153
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.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 # without limitation the rights to use, copy, modi...
DirtyPiece/dancestudio
refs/heads/master
Build/Tools/Python27/Lib/io.py
53
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
vamsirajendra/nupic
refs/heads/master
tests/unit/nupic/math/cast_mode_test.py
35
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
Luftzig/nimoy
refs/heads/master
specs/nimoy/integration/verbose_diffs_spec.py
1
from nimoy.specification import Specification from nimoy.spec_runner import SpecRunner class VerboseDiffsSpec(Specification): def string_diffs(self): with given: spec_contents = """from nimoy.specification import Specification class JimbobSpec(Specification): def test(self): ...
znerol/spreadflow-core
refs/heads/master
spreadflow_core/subprocess.py
2
# -*- coding: utf-8 -*- """ Components for multiprocessing. """ from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from spreadflow_core.remote import ClientEndpointMixin, MessageHandler, SchedulerClientFactory, SchedulerProtocol, SchedulerServerFactory, Sch...
quinot/ansible
refs/heads/devel
lib/ansible/plugins/callback/actionable.py
34
# (c) 2015, Andrew Gaffney <andrew@agaffney.org> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callba...
komsit37/sublime-q-2
refs/heads/master
qpython/_pandas.py
1
# # Copyright (c) 2011-2014 Exxeleron GmbH # # 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...
jerinisready/Blog
refs/heads/master
user/forms.py
1
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.contrib.auth.models import User class SignUpForm(UserCreationForm): first_name = forms.CharField(max_length=30, required=True, help_text='Required.') last_name = forms.CharField(max_length=30, requi...
CameronLonsdale/sec-tools
refs/heads/master
python2/lib/python2.7/site-packages/pip/commands/help.py
919
from __future__ import absolute_import from pip.basecommand import Command, SUCCESS from pip.exceptions import CommandError class HelpCommand(Command): """Show help for commands""" name = 'help' usage = """ %prog <command>""" summary = 'Show help for commands.' def run(self, options, args)...
tectronics/smap-data
refs/heads/master
python/tx/ipv6/internet/posixbase6.py
6
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. # # Exceedingly minor changes by B. A. Shelton, zancarius@gmail.com # !!! Do not blame Twisted Matrix Laboratories if using this monkey patch breaks # your application. !!! # # This file is based ...
praveen-pal/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/export.py
33
""" Script for exporting courseware from Mongo to a tar.gz file """ import os from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.xml_exporter import export_to_xml from xmodule.modulestore.django import modulestore from xmodule.contentstore.django import contentstore from xmodule...
BrewPi/dygraphs
refs/heads/master
docs/ssi_expander.py
29
#!/usr/bin/python ''' This script copies the files in one directory to another, expanding any SSI <!-- #include --> statements it encounters along the way. Usage: ./ssi_expander.py [source_directory] destination_directory If source_directory is not specified, then the current directory is used. ''' import os impo...
jsirois/commons
refs/heads/master
tests/python/twitter/common/git/test_git.py
13
# ================================================================================================== # Copyright 2013 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
doadin/kernel_gravitysmart
refs/heads/master
arch/ia64/scripts/unwcheck.py
916
#!/usr/bin/env 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 Matthe...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/pyasn1-0.1.8/test/codec/der/__init__.py
3653
# This file is necessary to make this directory a package.
hdinsight/hue
refs/heads/master
desktop/core/ext-py/pyasn1-0.1.8/pyasn1/type/__init__.py
3653
# This file is necessary to make this directory a package.
jacquesd/indico-plugins
refs/heads/master
chat/indico_chat/util.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Daniex/horizon
refs/heads/stable/kilo
openstack_dashboard/dashboards/project/instances/tabs.py
17
# Copyright 2012 Nebula, 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 agree...
Encrylize/flask-blogger
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import coverage from flask_migrate import Migrate, MigrateCommand from flask_script import Manager, Shell from flask_security.utils import encrypt_password from app import create_app, db, user_datastore from app.main.models import Post, Tag from app.admin.models import User, Setting f...
markYoungH/chromium.src
refs/heads/nw12
third_party/pexpect/fdpexpect.py
171
"""This is like pexpect, but will work on any file descriptor that you pass it. You are reponsible for opening and close the file descriptor. PEXPECT LICENSE This license is approved by the OSI and FSF as GPL-compatible. http://opensource.org/licenses/isc-license.txt Copyright (c) 2012, Noah Spurrier...
GunoH/intellij-community
refs/heads/master
python/testData/completion/fStringLikeCompletionOnMultipleCaretsDoesNotDuplicatePrefix.after.py
10
my_expr = 42 s = f'foo{my_expr} bar{my_expr}'
micjerry/groupservice
refs/heads/master
handlers/open_disattachgroup.py
1
import tornado.web import tornado.gen import json import logging from mickey.basehandler import BaseHandler from mickey.groups import GroupMgrMgr import mickey.redis class OpenDisAttachGroupHandler(BaseHandler): @tornado.web.asynchronous @tornado.gen.coroutine def post(self): data = json.loads(se...
nrao/antioch
refs/heads/master
admin/gbtWeather/tests/TestWeather2DBImport.py
1
# Copyright (C) 2009 Associated Universities, Inc. Washington DC, USA. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version....
tensorflow/models
refs/heads/master
research/delf/delf/python/datasets/google_landmarks_dataset/metrics_test.py
1
# Copyright 2019 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 applicab...
sophiavanvalkenburg/coala
refs/heads/master
coalib/bears/GlobalBear.py
30
from coalib.bears.Bear import Bear from coalib.bears.BEAR_KIND import BEAR_KIND class GlobalBear(Bear): """ A GlobalBear is able to analyze semantic facts across several file. The results of a GlobalBear will be presented grouped by the origin Bear. Therefore Results spanning above multiple files are...
artss/geweb
refs/heads/master
geweb/middleware.py
1
from geweb import log _middleware = {} class MiddlewareError(Exception): pass class Middleware(object): def process_request(self, request): pass def process_response(self, response): pass def register_middleware(middleware): try: if _middleware[middleware]: retur...
hakuna-m/wubiuefi
refs/heads/master
src/wubi/frontends/win32/cdboot_page.py
6
# Copyright (c) 2008 Agostino Russo # # Written by Agostino Russo <agostino.russo@gmail.com> # # This file is part of Wubi the Win32 Ubuntu Installer. # # Wubi is free software; you can redistribute it and/or modify # it under 5the terms of the GNU Lesser General Public License as # published by the Free Software Found...
vjmac15/Lyilis
refs/heads/master
lib/aiohttp/protocol (VJ Washington's conflicted copy 2017-08-29).py
20
"""Http related parsers and protocol.""" import collections import functools import http.server import re import string import sys import zlib from abc import ABC, abstractmethod from wsgiref.handlers import format_date_time from multidict import CIMultiDict, istr import aiohttp from . import errors, hdrs from .hel...