repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/service_endpoint_properties_format_py3.py
6
# 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 ...
nburn42/tensorflow
refs/heads/master
tensorflow/python/platform/tf_logging.py
17
# Copyright 2015 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...
apark263/tensorflow
refs/heads/master
tensorflow/python/data/benchmarks/map_benchmark.py
2
# 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...
dato-code/SFrame
refs/heads/master
oss_src/unity/python/sframe/data_structures/grouped_sframe.py
5
""" An interface for accessing an SFrame that is grouped by the values it contains in one or more columns. """ ''' Copyright (C) 2016 Turi All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the TURI-PYTHON-LICENSE file for details. ''' class GroupedSFrame(object...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/reportlab/pdfgen/pdfimages.py
31
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfgen/pdfimages.py __version__=''' $Id$ ''' __doc__=""" Image functionality sliced out of canvas.py for generalization """ import os import reportlab...
googleapis/python-websecurityscanner
refs/heads/master
google/cloud/websecurityscanner_v1/types/scan_run.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
pdellaert/ansible
refs/heads/devel
lib/ansible/plugins/action/command.py
117
# Copyright: (c) 2017, 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 from ansible import constants as C from ansible.plugins.action import ActionBase from ansible.util...
nachandr/cfme_tests
refs/heads/master
sprout/appliances/migrations/0051_appliancepool_template_type.py
3
# Generated by Django 1.9.13 on 2018-03-05 16:47 from django.db import migrations, models def add_type_to_appliance_pool(apps, schema_editor): AppliancePool = apps.get_model("appliances", "AppliancePool") # noqa # So, not container, VM as usual AppliancePool.objects.using(schema_editor.connection.alias...
pombreda/mic
refs/heads/master
mic/3rdparty/pykickstart/parser.py
10
# # parser.py: Kickstart file parser. # # Chris Lumens <clumens@redhat.com> # # Copyright 2005, 2006, 2007, 2008, 2011 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. ...
zengxu/pyoptools
refs/heads/master
pyoptools/raytrace/library/library.py
9
import ConfigParser as cp from os import listdir, walk from os.path import join, split, isdir, splitext,basename from numpy import sqrt from pkg_resources import resource_stream, resource_filename, \ resource_string, resource_listdir #import all the predefined components to the library and ...
bjodah/mpmath
refs/heads/master
doc/source/plots/ellipf.py
36
# Elliptic integral F(z,m) for some different m f1 = lambda z: ellipf(z,-1) f2 = lambda z: ellipf(z,-0.5) f3 = lambda z: ellipf(z,0) f4 = lambda z: ellipf(z,0.5) f5 = lambda z: ellipf(z,1) plot([f1,f2,f3,f4,f5], [0,pi], [0,4])
PhonologicalCorpusTools/PolyglotDB
refs/heads/master
examples/sibilant_analysis/raleigh_sibilants_example.py
4
import sys import os # =============== USER CONFIGURATION =============== polyglotdb_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) corpus_name = "small_raleigh" # corpus_name = "VTRSubset" corpus_dir = "/mnt/e/temp/raleigh/smallest_raleigh" textgrid_format = "FAVE" vowel_inventor...
peterSW/MatchViewer
refs/heads/master
src/matchviewcanvas.py
1
# Copyright 2010 Peter Stroia-Williams # # 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 a...
lowitty/server
refs/heads/master
libsDarwin/twisted/words/test/test_jabberxmppstringprep.py
8
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.words.protocols.jabber.xmpp_stringprep import ( nodeprep, resourceprep, nameprep) class DeprecationTests(unittest.TestCase): """ Deprecations in L{twisted.words.protocols.jabber.xmpp_...
stbarnabas/mezzanine
refs/heads/master
mezzanine/generic/views.py
2
from django.contrib.admin.views.decorators import staff_member_required from django.contrib.messages import error from django.core.urlresolvers import reverse from django.db.models import get_model, ObjectDoesNotExist from django.http import HttpResponse from django.shortcuts import redirect from django.utils.translat...
Maccimo/intellij-community
refs/heads/master
python/testData/intentions/PythonDemorganLawIntentionTest/complex_after.py
83
a = True b = False c = True d = False #before intention if not (not (a and b and c) and not d): print "before"
egafford/sahara
refs/heads/master
sahara/db/migration/alembic_migrations/versions/016_is_proxy_gateway.py
13
# Copyright 2014 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
kushalbhola/MyStuff
refs/heads/master
Practice/PythonApplication/env/Lib/site-packages/setuptools/_vendor/pyparsing.py
417
# module pyparsing.py # # Copyright (c) 2003-2016 Paul T. McGuire # # 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, cop...
wilebeast/FireFox-OS
refs/heads/master
B2G/gecko/media/webrtc/trunk/tools/gyp/buildbot/buildbot_run.py
130
#!/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. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys if sys.platform ...
1013553207/django
refs/heads/master
tests/postgres_tests/test_functions.py
351
from datetime import datetime from time import sleep from django.contrib.postgres.functions import TransactionNow from . import PostgreSQLTestCase from .models import NowTestModel class TestTransactionNow(PostgreSQLTestCase): def test_transaction_now(self): """ The test case puts everything und...
jayme-github/CouchPotatoServer
refs/heads/master
libs/requests/packages/chardet/charsetgroupprober.py
217
######################## 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 ...
ludwiktrammer/odoo
refs/heads/9.0
openerp/addons/base/tests/test_ir_attachment.py
433
import hashlib import os import openerp import openerp.tests.common HASH_SPLIT = 2 # FIXME: testing implementations detail is not a good idea class test_ir_attachment(openerp.tests.common.TransactionCase): def setUp(self): super(test_ir_attachment, self).setUp() registry, cr, uid = self.regi...
glennrub/micropython
refs/heads/master
tests/basics/gen_yield_from_throw2.py
18
# outer generator ignores a thrown GeneratorExit (this is allowed) def gen(): try: yield 123 except GeneratorExit: print('GeneratorExit') def gen2(): try: yield from gen() except GeneratorExit: print('GeneratorExit outer') yield 789 # thrown a class g = gen2() prin...
alexus37/AugmentedRealityChess
refs/heads/master
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/sbcharsetprober.py
2926
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
jbedorf/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/partitioned_variables_test.py
22
# Copyright 2015 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...
lucianobapo/phpMyAdmin-4.5.0-beta1-all-languages
refs/heads/master
doc/conf.py
1
# -*- coding: utf-8 -*- # # phpMyAdmin documentation build configuration file, created by # sphinx-quickstart on Wed Sep 26 14:04:48 2012. # # 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. # # ...
greggian/TapdIn
refs/heads/master
django/contrib/comments/managers.py
13
from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.encoding import force_unicode class CommentManager(models.Manager): def in_moderation(self): """ QuerySet for all comments currently in the moderation queue. """ retu...
ycaihua/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/lib2to3/fixes/fix_nonzero.py
164
"""Fixer for __nonzero__ -> __bool__ methods.""" # Author: Collin Winter # Local imports from .. import fixer_base from ..fixer_util import Name, syms class FixNonzero(fixer_base.BaseFix): BM_compatible = True PATTERN = """ classdef< 'class' any+ ':' suite< any* funcdef<...
siosio/intellij-community
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/OverloadsAndImplementationInImportedModule/a.py
29
import b b.foo(None) b.foo(5) b.foo("5") b.foo(A())
atruberg/django-custom
refs/heads/master
django/conf/locale/ml/formats.py
233
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' TIME_FORMAT = 'P' DATETIM...
hosseinmh/jango_learning
refs/heads/master
.venv/lib/python2.7/site-packages/django/core/checks/database.py
218
from django.db import connections from . import Tags, register @register(Tags.database) def check_database_backends(*args, **kwargs): issues = [] for conn in connections.all(): issues.extend(conn.validation.check(**kwargs)) return issues
vnsofthe/odoo-dev
refs/heads/master
addons/only_single_user/res_users.py
1
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
2-B/stickerview
refs/heads/master
api_v1/tests.py
6
# -*- coding: utf-8 -*- from django.test import TestCase
ankit01ojha/coala-bears
refs/heads/master
tests/configfiles/DockerfileLintBearTest.py
21
from bears.configfiles.DockerfileLintBear import DockerfileLintBear from coalib.testing.LocalBearTestHelper import verify_local_bear good_file = """ FROM ubuntu:14.04 MAINTAINER coala LABEL Name coala-docker LABEL Version 0.1 # Install basic tools RUN apt-get -y -qq update RUN apt-get -y -qq upgrade EXPOSE 5432 CMD [...
Atos-FiwareOps/sla-dashboard
refs/heads/master
slaclient/templates/xifi/__init__.py
2
from slaclient.templates.xifi.xifi import TemplateInput from slaclient.templates.xifi.xifi import AgreementInput from slaclient.templates.xifi.xifi import render_slaagreement from slaclient.templates.xifi.xifi import render_slatemplate
ipashchenko/jetsim
refs/heads/master
jetsim/nfields.py
1
class NField(object): """ Basic class that represents particle density in observer rest frame. """ def n(self, x, y, z): raise NotImplementedError def n_vec(self, ps): raise NotImplementedError class BKNField(NField): """ Class that describes Blandford-Konigle particle den...
cloudify-cosmo/cloudify-manager
refs/heads/master
rest-service/manager_rest/test/infrastructure/test_list_search.py
1
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
bcroq/kansha
refs/heads/master
kansha/user/usermanager.py
2
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import random from datetime import datetime, timedelta from nagare.namespac...
renestvs/big_data_social_project
refs/heads/master
captura_armazenamento/twitter_3.py
1
import json import tweepy import time import pymongo client = pymongo.MongoClient("localhost", 27017) db = client.twitter_got class StdOutListener(StreamListener): def on_data(self, data): tweet = json.loads(data) try: db.tweets.update({'id': tweet['id']},tweet, upsert=True) ex...
varunkamra/kuma
refs/heads/master
vendor/packages/logilab/astng/test/data/__init__.py
62
__revision__="$Id: __init__.py,v 1.1 2005-06-13 20:55:20 syt Exp $"
rocky4570/moto
refs/heads/master
tests/test_cloudformation/test_server.py
12
from __future__ import unicode_literals import json from six.moves.urllib.parse import urlencode import re import sure # noqa import moto.server as server ''' Test the different server responses ''' def test_cloudformation_server_get(): backend = server.create_backend_app("cloudformation") stack_name = 't...
repotvsupertuga/repo
refs/heads/master
plugin.video.TVsupertuga/resources/lib/sources/en/sceper.py
8
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 l...
simon-fu/pjproject-adv
refs/heads/master
tests/pjsua/scripts-sendto/123_sdp_with_unknown_static_1.py
59
# $Id: 123_sdp_with_unknown_static_1.py 2081 2008-06-27 21:59:15Z bennylp $ import inc_sip as sip import inc_sdp as sdp # The unknown media uses static payload type sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=- c=IN IP4 127.0.0.1 t=0 0 m=audio 5000 RTP/AVP 0 m=xapplicationx 4000 RTP/AVP 54 """ pjsua_args = "--null-aud...
dhermes/google-cloud-python
refs/heads/master
translate/pylint.config.py
120
# Copyright 2017 Google LLC # # 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, s...
40223139/203739test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/pickle.py
1265
from json import *
Varriount/Colliberation
refs/heads/master
libs/twisted/conch/insults/__init__.py
138
""" Insults: a replacement for Curses/S-Lang. Very basic at the moment.""" from twisted.python import deprecate, versions deprecate.deprecatedModuleAttribute( versions.Version("Twisted", 10, 1, 0), "Please use twisted.conch.insults.helper instead.", __name__, "colors") deprecate.deprecatedModuleAttribut...
interactiveaudiolab/nussl
refs/heads/master
tests/ml/test_filterbank.py
1
from nussl import ml, datasets from nussl.core.constants import ALL_WINDOWS import nussl import pytest import torch import itertools from scipy.signal import check_COLA import numpy as np def test_filter_bank(one_item, monkeypatch): pytest.raises( NotImplementedError, ml.networks.modules.FilterBank, 2048) ...
blazingwolf/fireball-ics-3.0.8-2.17.605.2
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gavinelliott/design-repository
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
1812
# Copyright (c) 2013 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. """Utility functions shared amongst the Windows generators.""" import copy import os # A dictionary mapping supported target types to extensions. TARGET_TYPE_EX...
colonelnugget/pychess
refs/heads/master
lib/pychess/Database/dbwalk.py
21
from pychess.compat import basestring from pychess.Utils.const import * from pychess.Utils.lutils.lmovegen import newMove MAXMOVE = newMove(63, 63, NULL_MOVE) COMMENT, VARI_START, VARI_END, NAG = [MAXMOVE+i+1 for i in range(4)] def walk(node, arr, txt): """Prepares a game data for databse. Recursively walk...
jjmachan/activityPointsApp
refs/heads/master
activitypoints/lib/python3.5/site-packages/django/template/context_processors.py
59
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the 'context_processors' option of the configuration of a DjangoTemplates backend and use...
phlax/pootle
refs/heads/master
pytest_pootle/fixtures/pootle_fs/commands.py
7
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import pytest from django.utils.functional ...
burke-software/BSC-website
refs/heads/master
wiki/core/plugins/base.py
3
from __future__ import unicode_literals from __future__ import absolute_import from django.utils.translation import ugettext as _ """Base classes for different plugin objects. * BasePlugin: Create a wiki_plugin.py with a class that inherits from BasePlugin. * PluginSidebarFormMixin: Mix in this class in the form th...
Kulmerov/Cinnamon
refs/heads/master
tools/check-for-missing.py
21
#!/usr/bin/python2 # # This is a simple script that we use to check for files in git # and not in the distribution. It was previously written in cinnamon # and inlined in the Makefile.am, but 'git ls-files --exclude=<pattern>' # was changed to no longer do anything useful, which made that # too challenging to be worthw...
callowayproject/django-geopoll
refs/heads/master
example/urls.py
2
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^example/', include('example.foo.urls')), # Uncomment the admin/doc line below and ...
PabloCastellano/nodeshot
refs/heads/master
nodeshot/community/participation/urls.py
3
from django.conf.urls import patterns, url urlpatterns = patterns('nodeshot.community.participation.views', # noqa url(r'^layers/(?P<slug>[-\w]+)/comments/$', 'layer_nodes_comments', name='api_layer_nodes_comments'), url(r'^layers/(?P<slug>[-\w]+)/participation/$', 'layer_nodes_participation', name='api_laye...
j-po/django-brambling
refs/heads/master
brambling/migrations/0009_set_stripe_metadata.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import warnings from django.db import models, migrations import stripe def set_stripe_metadata(apps, schema_editor): # Try to set remote metadata for all recorded transactions. # But don't get too upset if it all fails ;) Transaction = apps...
kontais/EFI-MIPS
refs/heads/master
ToolKit/cmds/python/Lib/bsddb/__init__.py
5
#---------------------------------------------------------------------- # Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA # and Andrew Kuchling. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
eadgarchen/tensorflow
refs/heads/master
tensorflow/contrib/slim/python/slim/model_analyzer.py
166
# 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...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/test/test_ftplib.py
17
"""Test script for ftplib module.""" # Modified by Giampaolo Rodola' to test FTP class, IPv6 and TLS # environment import ftplib import asyncore import asynchat import socket import StringIO import errno import os try: import ssl except ImportError: ssl = None from unittest import TestCase from test import t...
smikes/depot_tools
refs/heads/master
third_party/boto/s3/connection.py
51
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation file...
elysium001/zamboni
refs/heads/master
mkt/extensions/migrations/0008_auto_20150918_1103.py
7
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mkt.translations.fields import django.db.models.deletion import mkt.translations.models class Migration(migrations.Migration): dependencies = [ ('extensions', '0007_extensionversion_size'), ...
dimaleks/uDeviceX
refs/heads/master
tests/walls/analytic/taylor_couette.py
1
#!/usr/bin/env python import mirheo as mir dt = 0.001 ranks = (1, 1, 1) domain = (8, 8, 16) force = (1.0, 0, 0) density = 8 rc = 1.0 omega = 0.5 # angular velocity of outer cylinder; inner is fixed tend = 10.1 u = mir.Mirheo(ranks, domain, debug_level=3, log_filename='log', no_splash=True) pv = mir.Par...
KyoheiG3/grpc
refs/heads/master
src/python/src/grpc/framework/alpha/_face_utilities.py
36
# Copyright 2015, 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...
suto/infernal-twin
refs/heads/master
build/pillow/PIL/MspImagePlugin.py
26
# # The Python Imaging Library. # $Id$ # # MSP file handling # # This is the format used by the Paint program in Windows 1 and 2. # # History: # 95-09-05 fl Created # 97-01-03 fl Read/write MSP images # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1995-97. # # See the README fi...
MiLk/youtube-dl
refs/heads/master
youtube_dl/extractor/ivi.py
7
# encoding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( compat_urllib_request, ExtractorError, ) class IviIE(InfoExtractor): IE_DESC = 'ivi.ru' IE_NAME = 'ivi' _VALID_URL = r'https?://(?:www\.)?ivi\.ru/watch(?:/(?P<c...
yegorkowalew/local_kow
refs/heads/master
userprofile/forms.py
1
# -*- coding:utf-8 -*- from django import forms import requests import lxml.html from django.contrib.auth.models import User from userprofile.models import UserProfile from money.models import Post # from django.contrib.auth import authenticate, login class RegisterUserForm(forms.Form): user_login = forms.CharF...
aleida/django
refs/heads/master
django/contrib/formtools/tests/wizard/namedwizardtests/urls.py
320
from django.conf.urls import patterns, url from django.contrib.formtools.tests.wizard.namedwizardtests.forms import ( SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4) def get_named_session_wizard(): return SessionContactWizard.as_view( [('form1', Page1), ('form2', Page2), ('form3'...
vuteam/BlackHole-New
refs/heads/master
lib/python/Components/Task.py
46
# A Job consists of many "Tasks". # A task is the run of an external tool, with proper methods for failure handling from Tools.CList import CList class Job(object): NOT_STARTED, IN_PROGRESS, FINISHED, FAILED = range(4) def __init__(self, name): self.tasks = [ ] self.resident_tasks = [ ] self.workspace = "/tmp...
nvoron23/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_pkgimport.py
80
import os, sys, string, random, tempfile, unittest from test.test_support import run_unittest class TestImport(unittest.TestCase): def __init__(self, *args, **kw): self.package_name = 'PACKAGE_' while sys.modules.has_key(self.package_name): self.package_name += random.choose(string.le...
pekermert/django-socketio
refs/heads/master
django_socketio/views.py
10
from django.http import HttpResponse from django_socketio import events from django_socketio.channels import SocketIOChannelProxy from django_socketio.clients import client_start, client_end from django_socketio.utils import format_log def socketio(request): """ Socket.IO handler - maintains the lifecycle o...
williamluke4/Examenable
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
899
# 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. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
LeGast00n/django-post_office
refs/heads/master
post_office/tests/backends.py
4
from django.conf import settings from django.core.mail import backends, EmailMultiAlternatives, send_mail, EmailMessage from django.test import TestCase from django.test.utils import override_settings from ..models import Email, STATUS, PRIORITY from ..settings import get_email_backend class ErrorRaisingBackend(back...
ragnarula/python-osc
refs/heads/master
examples/simple_server.py
3
import argparse import math from pythonosc import dispatcher from pythonosc import osc_server def print_volume_handler(unused_addr, args, volume): print("[{0}] ~ {1}".format(args[0], volume)) def print_compute_handler(unused_addr, args, volume): try: print("[{0}] ~ {1}".format(args[0], args[1](volume))) ex...
dato-code/numpy
refs/heads/master
tools/swig/test/testFarray.py
118
#! /usr/bin/env python from __future__ import division, absolute_import, print_function # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeE...
lancezlin/ml_template_py
refs/heads/master
lib/python2.7/site-packages/nbconvert/utils/io.py
9
# coding: utf-8 """io-related utilities""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import codecs import sys from ipython_genutils.py3compat import PY3 def unicode_std_stream(stream='stdout'): u"""Get a wrapper to write unicode to stdout/stderr as UTF-...
maxdeliso/elevatorSim
refs/heads/master
Lib/test/test_stat.py
7
import unittest import os import stat from test.support import TESTFN, run_unittest def get_mode(fname=TESTFN): return stat.filemode(os.lstat(fname).st_mode) class TestFilemode(unittest.TestCase): def setUp(self): try: os.remove(TESTFN) except OSError: try: ...
Thoshh/wapad
refs/heads/master
lib/python2.7/site-packages/django/contrib/gis/gdal/raster/band.py
308
from ctypes import byref, c_int from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import raster as capi from django.contrib.gis.shortcuts import numpy from django.utils import six from django.utils.encoding import force_tex...
ZLLab-Mooc/edx-platform
refs/heads/named-release/dogwood.rc
common/djangoapps/status/status.py
86
""" A tiny app that checks for a status message. """ from django.conf import settings import logging from .models import GlobalStatusMessage log = logging.getLogger(__name__) def get_site_status_msg(course_key): """ Pull the status message from the database. Caches the message by course. """ t...
Panos512/inspire-next
refs/heads/master
inspirehep/modules/theme/jinja2filters.py
1
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2015, 2016 CERN. # # INSPIRE 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...
t794104/ansible
refs/heads/devel
lib/ansible/plugins/cliconf/nos.py
31
# # (c) 2018 Extreme Networks 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. # # Ans...
Varriount/Colliberation
refs/heads/master
libs/twisted/names/cache.py
1
# -*- test-case-name: twisted.names.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from zope.interface import implements from twisted.names import dns, common from twisted.python import failure, log from twisted.internet import interfaces, defer class CacheResolver(common.Resolver...
damirda/ansible-modules-core
refs/heads/devel
network/nxos/nxos_gir_profile_management.py
11
#!/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...
lucciano/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Tool/gcc.py
61
"""SCons.Tool.gcc Tool-specific initialization for gcc. 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) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # P...
smithandrobot/smithrobot-website
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup( name = 'smithandrobot', version = '', url = '', license = 'BSD', description = '', author = '', packages = find_packages('src'), package_dir = {'': 'src'}, install_requires = ['setuptools'], )
Orav/kbengine
refs/heads/master
kbe/src/lib/python/Lib/email/headerregistry.py
2
"""Representing and manipulating email headers via custom objects. This module provides an implementation of the HeaderRegistry API. The implementation is designed to flexibly follow RFC5322 rules. Eventually HeaderRegistry will be a public API, but it isn't yet, and will probably change some before that happen...
J861449197/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py
29
""" Performance test for asset metadata in the modulestore. """ from path import Path as path import unittest from tempfile import mkdtemp import itertools from shutil import rmtree from bson.code import Code import datetime import ddt #from nose.plugins.attrib import attr from nose.plugins.skip import SkipTest from x...
psb-seclab/CTFStuff
refs/heads/master
utils/networking/py_server.py
1
import SocketServer from random import randint class MyTCPHandler(SocketServer.BaseRequestHandler): """ The RequestHandler class for our server. It is instantiated once per connection to the server, and must override the handle() method to implement communication to the client. """ def ha...
Spiderlover/Toontown
refs/heads/master
toontown/toon/DistributedSmartNPC.py
3
from pandac.PandaModules import * from DistributedNPCToonBase import * from toontown.chat.ChatGlobals import * from toontown.hood import ZoneUtil from toontown.nametag.NametagGlobals import * from toontown.quest import QuestChoiceGui from toontown.quest import QuestParser from toontown.quest import TrackChoiceGui from...
mrquim/mrquimrepo
refs/heads/master
repo/script.module.youtube.dl/lib/youtube_dl/downloader/rtmp.py
33
from __future__ import unicode_literals import os import re import subprocess import time from .common import FileDownloader from ..compat import compat_str from ..utils import ( check_executable, encodeFilename, encodeArgument, get_exe_version, ) def rtmpdump_version(): return get_exe_version( ...
Sabayon/entropy
refs/heads/master
lib/entropy/core/settings/plugins/skel.py
6
# -*- coding: utf-8 -*- """ @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @license: GPL-2 B{Entropy Framework SystemSettings stub classes module}. SystemSettingsPlugin is the base class for building valid SystemSettings plugin modules...
StackVista/sts-agent-integrations-core
refs/heads/master
ssh_check/check.py
1
# stdlib from collections import namedtuple import time # 3p import paramiko # project from checks import AgentCheck class CheckSSH(AgentCheck): OPTIONS = [ ('host', True, None, str), ('port', False, 22, int), ('username', True, None, str), ('password', False, None, str), ...
xbezdick/tempest
refs/heads/master
tempest/api/telemetry/test_telemetry_alarming_api.py
5
# 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...
Sciprios/SatisfiabilitySimulator
refs/heads/master
PartyProblemSimulator/Solvers/unit_tests/test_flipga.py
2
from unittest.mock import MagicMock, Mock, patch from unittest import TestCase from PartyProblemSimulator.Solvers.FlipGA import FlipGA class TestFlipGA(TestCase): """ Tests the flipga algorithm class. """ @patch('PartyProblemSimulator.Solvers.FlipGA.FlipGA._set_mutation_rate') def test_init(self, mut_mck)...
j0gurt/ggrc-core
refs/heads/develop
src/ggrc_basic_permissions/migrations/versions/20130920154201_5b33357784a_assign_user_role_to_.py
7
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Assign User role to all existing users. Revision ID: 5b33357784a Revises: 1afc3824d35b Create Date: 2013-09-20 15:42:01.558543 """ # revision identifiers, used by Alembic. revision = '5b33357784a' down...
philipwangdk/HPC
refs/heads/master
HPC_bitbucket/uwhpsc/lectures/lecture6/hello.py
2
""" $UWHPSC/lectures/lecture6/hello.py Hello world Python code with main. """ print "Hello World" if __name__=="__main__": print "Hello again"
psi-rking/psi4
refs/heads/master
psi4/driver/p4util/python_helpers.py
4
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
anurag03/integration_tests
refs/heads/master
cfme/provisioning.py
1
# -*- coding: utf-8 -*- from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.log import logger from cfme.utils.wait import wait_for def do_vm_provisioning(appliance, template_name, provider, vm_name, provisioning_data, request, smtp_test, num_sec=1500, wait=True): ...
LIMXTEC/Europecoin-V3
refs/heads/master
qa/rpc-tests/smartfees.py
131
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test fee estimation code # from test_framework.test_framework import BitcoinTestFramework from test_...
Venturi/oldcms
refs/heads/master
env/lib/python2.7/site-packages/filer/test_utils/urls.py
5
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^media/(?P<path>.*)$', 'django.views.static.serve', # NOQA {'document_root': settings.MEDIA_ROOT, 'show_inde...