repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
Esmidth/Biligrab
refs/heads/master
biligrablite.py
2
''' Biligrab Lite 0.21 Beining@ACICFG cnbeining[at]gmail.com http://www.cnbeining.com MIT licence ''' import sys import os from StringIO import StringIO import gzip import urllib2 import hashlib from xml.dom.minidom import parseString global vid global cid global partname global title global videourl global part_now...
LiveZenLK/CeygateERP
refs/heads/master
addons/stock_dropshipping/__openerp__.py
27
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Drop Shipping', 'version': '1.0', 'category': 'Warehouse Management', 'summary': 'Drop Shipping', 'description': """ Manage drop shipping orders =========================== This module add...
gwwfps/boxrps
refs/heads/master
jinja2/sandbox.py
284
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
shsingh/ansible
refs/heads/devel
test/units/modules/remote_management/oneview/test_oneview_datacenter_info.py
21
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import pytest from ansible.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule from hpe_test_utils import FactsParamsTest ...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/draft_schematic/structure/shared_generic_house_player_small.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/structure/shared_generic_house_player_small.iff" result.at...
hack4impact/women-veterans-rock
refs/heads/master
app/admin/__init__.py
13
from flask import Blueprint admin = Blueprint('admin', __name__) from . import views # noqa
kelseyoo14/Wander
refs/heads/master
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/contrib/gis/db/backends/oracle/adapter.py
273
from cx_Oracle import CLOB from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.geos import GeometryCollection, Polygon from django.utils.six.moves import range class OracleSpatialAdapter(WKTAdapter): input_size = CLOB def __init__(self, geom): """ Oracl...
couchbase/perfrunner
refs/heads/master
cbagent/collectors/kvstore_stats.py
1
import json from cbagent.collectors.collector import Collector from perfrunner.helpers.local import extract_cb_any, get_cbstats class KVStoreStats(Collector): COLLECTOR = "kvstore_stats" CB_STATS_PORT = 11209 METRICS_ACROSS_SHARDS = ( "BlockCacheQuota", "WriteCacheQuota", "BlockCa...
robovm/robovm-studio
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/tests/__init__.py
229
from django.conf import settings from django.test.simple import build_suite, DjangoTestSuiteRunner from django.utils import unittest def run_tests(*args, **kwargs): from django.test.simple import run_tests as base_run_tests return base_run_tests(*args, **kwargs) def run_gis_tests(test_labels, verbosity=1, in...
rahul-c1/scikit-learn
refs/heads/master
sklearn/metrics/cluster/unsupervised.py
10
""" Unsupervised evaluation metrics. """ # Authors: Robert Layton <robertlayton@gmail.com> # # License: BSD 3 clause import numpy as np from ...utils import check_random_state from ..pairwise import pairwise_distances def silhouette_score(X, labels, metric='euclidean', sample_size=None, random...
Chilledheart/gyp
refs/heads/master
test/ios/gyptest-app-ios.py
39
#!/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. """ Verifies that ios app bundles are built correctly. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGy...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/google/appengine/ext/mapreduce/file_format_root.py
6
#!/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...
JTCunning/sentry
refs/heads/master
src/sentry/migrations/0121_auto__add_unique_grouprulestatus_rule_group.py
36
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'GroupRuleStatus', fields ['rule', 'group'] db.create_unique('sentry_grouprule...
Hakuba/youtube-dl
refs/heads/master
youtube_dl/extractor/myspass.py
105
from __future__ import unicode_literals import os.path from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, ) class MySpassIE(InfoExtractor): _VALID_URL = r'http://www\.myspass\.de/.*' _TEST = { 'url': 'http://www.myspa...
ns950/calibre
refs/heads/master
src/odf/userfield.py
13
#!/usr/bin/python2 # -*- coding: utf-8 -*- # Copyright (C) 2006-2009 Søren Roug, European Environment Agency # # This is free software. You may redistribute it under the terms # of the Apache license and the GNU General Public License Version # 2 or at your option any later version. # # This program is distributed in ...
thnee/ansible
refs/heads/devel
test/units/modules/network/check_point/test_cp_mgmt_time.py
19
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 dist...
RRCKI/pilot
refs/heads/master
saga/utils/test_config.py
10
__author__ = "Andre Merzky, Ole Weidner" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" import copy import radical.utils.testing as rut import radical.utils.logger as rul import saga.exceptions as se import saga # -------------------------------------------------------...
fiuba08/robotframework
refs/heads/master
src/robot/libraries/Easter.py
5
# Copyright 2008-2014 Nokia Solutions and Networks # # 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 l...
popazerty/try
refs/heads/master
lib/python/Plugins/SystemPlugins/HdmiCEC/plugin.py
31
from boxbranding import getMachineBrand, getMachineName from os import path from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, configfile, getConfigListEntry from Components.Sources.StaticText import StaticText if path.exists("/dev/hdmi_cec"): i...
matteoalessiocarrara/lib-figafind
refs/heads/master
src/lib/fbfilter/src/lib/htmlfbapi/src/version.py
5
#!/usr/bin/python2 # -*- coding: utf-8 -*- # # Copyright 2015 - 2016 Matteo Alessio Carrara <sw.matteoac@gmail.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 ...
lpatmo/actionify_the_news
refs/heads/master
open_connect/middleware/accept_terms.py
1
"""Middleware for verifying a user has accepted the ToS and UCoC.""" # pylint: disable=no-self-use import re from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect EXEMPT_URLS = [re.compile(settings.LOGIN_URL.lstrip('/'))] if hasattr(settings, 'LOGIN...
mrpiracyPT/repository.mrpiracy
refs/heads/master
plugin.video.mrpiracy/resources/lib/definicoes.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import os,xbmc,xbmcaddon,xbmcplugin,xbmcgui,xbmcvfs,sys,urllib,urllib2,unicodedata,re,urlparse,json,base64 import threading from datetime import datetime import ast import controlo def getQualidade(): return controlo.addon.getSetting('qualidadeFilmes') def getCookie(): re...
cole945/nds32-gdb
refs/heads/master
gdb/contrib/test_pubnames_and_indexes.py
34
#! /usr/bin/env python # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # This file is part of GDB. # # 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, ...
jaredkoontz/leetcode
refs/heads/master
Python/maximum-subarray.py
3
# Time: O(n) # Space: O(1) # # Find the contiguous subarray within an array (containing at least one number) which has the largest sum. # # For example, given the array [-2,1,-3,4,-1,2,1,-5,4], # the contiguous subarray [4,-1,2,1] has the largest sum = 6. # # click to show more practice. # # More practice: # If you...
charles-dyfis-net/bpython
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup import glob import os import platform import re import sys if platform.system() == 'FreeBSD': man_dir = 'man' else: man_dir = 'share/man' setup( name="bpython", version = "0.7.1", author = "Robert Anthony Farrell", aut...
ndawe/rootpy
refs/heads/master
examples/plotting/plot_hist.py
7
#!/usr/bin/env python """ ============================ Working with ROOT histograms ============================ This example demonstrates how to create and work with ROOT histogram in rootpy. """ print(__doc__) from rootpy.extern.six.moves import range from rootpy.plotting import Hist, Hist2D, Hist3D, HistStack, Lege...
mick-d/nipype
refs/heads/master
nipype/interfaces/tests/test_auto_CommandLine.py
1
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..base import CommandLine def test_CommandLine_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault...
ArthurGarnier/SickRage
refs/heads/master
lib/hachoir_parser/program/nds.py
58
""" Nintendo DS .nds game file parser File format references: - http://www.bottledlight.com/ds/index.php/FileFormats/NDSFormat - http://imrannazar.com/The-Smallest-NDS-File - http://darkfader.net/ds/files/ndstool.cpp - http://crackerscrap.com/docs/dsromstructure.html - http://nocash.emubase.de/gbatek.htm """ from hac...
chouseknecht/ansible
refs/heads/devel
lib/ansible/plugins/inventory/kubevirt.py
37
# Copyright (c) 2018 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 DOCUMENTATION = ''' name: kubevirt plugin_type: inventory author: - KubeVirt Team...
SINGROUP/pycp2k
refs/heads/master
pycp2k/classes/_mo_magnitude2.py
1
from pycp2k.inputsection import InputSection from ._each172 import _each172 class _mo_magnitude2(InputSection): def __init__(self): InputSection.__init__(self) self.Section_parameters = None self.Add_last = None self.Common_iteration_levels = None self.Filename = None ...
perlygatekeeper/glowing-robot
refs/heads/master
Little_Alchemy_2/Scraper_python/env/lib/python3.7/site-packages/pip/_vendor/certifi/__init__.py
13
from .core import where __version__ = "2019.06.16"
rpmcpp/Audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/compiler_fc.py
287
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,imp,types from waflib import Utils,Configure,Options,Logs,Errors from waflib.Tools import fc fc_compiler={'win32':['gfortran','ifort'],'darwin':['gfortran','g95'...
esatterly/splunk-cassandra
refs/heads/master
bin/dbinsert-command.py
1
#!/usr/bin/env python # # Copyright 2011 Splunk, 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 ...
JoeriHermans/Intelligent-Automation-System
refs/heads/master
scripts/python/light.py
1
# # IAS Basic device framework. # # Author: Joeri Hermans # import sys import socket import struct import os # Global members, which are required for the communication # with the remote IAS controller. gDeviceIdentifier = sys.argv[1] gControllerAddress = sys.argv[2] gControllerPort = int(sys.argv[3]) gSocket = socket...
CiscoUcs/Ironic
refs/heads/master
build/lib/ironic/openstack/common/eventlet_backdoor.py
5
# Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # 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 a...
Passtechsoft/TPEAlpGen
refs/heads/master
blender/release/scripts/addons/io_import_gimp_image_to_scene.py
3
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # This program is distrib...
Dziolas/inspire-next
refs/heads/master
inspire/base/recordext/functions/get_files_from_bibdoc.py
1
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 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...
zozo123/buildbot
refs/heads/master
master/buildbot/changes/base.py
1
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
krother/maze_run
refs/heads/master
05_print/draw_maze.py
3
# Code for chapter 05 - Debugging with print from pygame import image, Surface from load_tiles import load_tiles, get_tile_rect, SIZE from generate_maze import create_maze from util import debug_print def parse_grid(data): """Parses the string representation into a nested list""" return [list(row) for row i...
sestrella/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/pkgin.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2013 Shaun Zinck <shaun.zinck at gmail.com> # Copyright (c) 2015 Lawrence Leonard Gilbert <larry@L2G.to> # Copyright (c) 2016 Jasper Lievisse Adriaanse <j at jasper.la> # # Written by Shaun Zinck # Based on pacman module written by Afterburn <http://github.com/...
michaeljohn32/odoomrp-wip
refs/heads/8.0
purchase_packaging_info/__init__.py
379
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import models
jonparrott/google-cloud-python
refs/heads/master
bigtable/google/cloud/bigtable_v2/proto/data_pb2_grpc.py
591
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc
aabbox/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_asyncio/test_tasks.py
60
"""Tests for tasks.py.""" import re import sys import types import unittest import weakref from test import support from test.script_helper import assert_python_ok from unittest import mock import asyncio from asyncio import coroutines from asyncio import test_utils PY34 = (sys.version_info >= (3, 4)) PY35 = (sys.v...
eespaillat/RoommateManagerApp
refs/heads/master
roommatemanager/api/test/api/test_api_accept_decline_invitations.py
1
from django.test import TestCase, RequestFactory from django.core.urlresolvers import reverse from django.contrib.auth.models import User, AnonymousUser from roommatemanager.api.models import Group, GroupProfile from roommatemanager.api import api import json class DemoteAdminTestCase(TestCase): def setUp(self): ...
sombree/android_external_skia
refs/heads/cm-12.1
tools/compare_codereview.py
163
#!/usr/bin/python2 # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Skia's Chromium Codereview Comparison Script. This script takes two Codereview URLs, looks at the trybot results for the two codereviews and compares the results....
syci/website-addons
refs/heads/8.0
website_sale_search_custom/__openerp__.py
3
{ 'name': "Custom website search", 'summary': 'Check WARNING before installing!', 'version': '1.0.0', 'author': 'Ivan Yelizariev', 'category': 'Custom', 'website': 'https://yelizariev.github.io', 'depends': ['website_sale', 'product_tags'], 'data': [ 'views.xml', ], '...
cctaylor/googleads-python-lib
refs/heads/master
examples/adwords/v201506/reporting/download_criteria_report_as_string_with_awql.py
3
#!/usr/bin/python # # Copyright 2015 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 required b...
chrisnorman7/MyGui
refs/heads/master
MyGui/menu.py
1
import wx class Menu(wx.Menu): """Generic menu, makes adding stuff a bit easier.""" def __init__(self, frame, name): """Creates the menu and sets the frame it'll be bound too as well as it's name.""" self.Frame = frame self.Name = name def EasyAppend(self, function, text, help, id = wx.NewId()): self.fram...
damonkohler/sl4a
refs/heads/master
python/src/Demo/scripts/pi.py
32
#! /usr/bin/env python # Print digits of pi forever. # # The algorithm, using Python's 'long' integers ("bignums"), works # with continued fractions, and was conceived by Lambert Meertens. # # See also the ABC Programmer's Handbook, by Geurts, Meertens & Pemberton, # published by Prentice-Hall (UK) Ltd., 1990. import...
hazrpg/calibre
refs/heads/master
src/calibre/ebooks/lit/lzx.py
24
''' LZX compression/decompression wrapper. ''' from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>' from calibre import plugins _lzx, _error = plugins['lzx'] if _lzx is None: raise RuntimeError('Failed to load the lzx plugin: %s' % _err...
aparo/django-nonrel
refs/heads/master
django/core/serializers/__init__.py
36
""" Interfaces for serializing Django objects. Usage:: from django.core import serializers json = serializers.serialize("json", some_query_set) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIALIZATION_MODULES = { ...
drglove/SickRage
refs/heads/master
lib/adba/aniDBmaper.py
70
#!/usr/bin/env python # # This file is part of aDBa. # # aDBa 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. # # aDBa is distributed i...
scality/cinder
refs/heads/master
cinder/tests/unit/test_hitachi_hbsd_snm2_iscsi.py
20
# Copyright (C) 2014, Hitachi, Ltd. # # 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...
rcarrillocruz/ansible
refs/heads/devel
test/units/modules/network/eos/test_eos_user.py
37
# 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 ...
enitihas/SAC-Website
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.py
2942
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
jakeclawson/linux
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
hynekcer/django
refs/heads/master
django/contrib/gis/db/models/fields.py
310
from django.contrib.gis import forms from django.contrib.gis.db.models.lookups import gis_lookups from django.contrib.gis.db.models.proxy import SpatialProxy from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geometry.backend import Geometry, GeometryException from django.core.exceptions import Improp...
zsiciarz/variablestars.net
refs/heads/master
observations/tests/test_views.py
1
from django.contrib import messages from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from djet.assertions import ( InstanceAssertionsMixin, Me...
MiltosD/CEF-ELRC
refs/heads/master
lib/python2.7/site-packages/django_jenkins/tasks/run_pyflakes.py
3
# -*- coding: utf-8 -*- import os import re import sys from pyflakes.scripts import pyflakes from cStringIO import StringIO from django_jenkins.functions import relpath from django_jenkins.tasks import BaseTask, get_apps_locations class Task(BaseTask): def __init__(self, test_labels, options): super(Task,...
xzYue/odoo
refs/heads/8.0
addons/website_mail_group/controllers/main.py
306
# -*- coding: utf-8 -*- import datetime from dateutil import relativedelta from openerp import tools, SUPERUSER_ID from openerp.addons.web import http from openerp.addons.website.models.website import slug from openerp.addons.web.http import request class MailGroup(http.Controller): _thread_per_page = 20 _r...
darashenka/aem-cmd
refs/heads/master
tests/test_deploy.py
1
# coding: utf-8 import tempfile from distutils.version import Version import pkg_resources from mock import patch from nose.tools import eq_, ok_ import acmd from test_utils.compat import StringIO def test_get_current_version(): v = acmd.get_current_version() eq_(True, isinstance(v, Version)) eq_(acmd....
maurofaccenda/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py
57
#!/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 distributed...
sudkannan/xen-hv
refs/heads/master
dist/install/usr/lib64/python2.6/site-packages/xen/remus/util.py
6
# utility functions import fcntl, os, subprocess class PipeException(Exception): def __init__(self, message, errno): self.errno = errno message = '%s: %d, %s' % (message, errno, os.strerror(errno)) Exception.__init__(self, message) class Lock(object): """advisory lock""" def __in...
juanyaw/PTVS
refs/heads/master
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/mbcs.py
103
""" Python 'mbcs' Codec for Windows Cloned by Mark Hammond (mhammond@skippinet.com.au) from ascii.py, which was written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ # Import them explicitly to cause an ImportError # on non-Windows systems from codecs ...
David-R-Walker/newprofiler
refs/heads/master
newprofiler.py
1
# Python Profiler v3 # Copyright (c) 2015-2017 David R Walker # TODO: # [x] Record only functions in StackLines # [ ] Handle per-line hotspots as separate structure (not nested) - ? # [ ] Handle timeline as separate structure # [x] Use unique stack IDs to dedupe stack tuples # [ ] Merge profile data method #...
kvasukib/groupflow_simulator
refs/heads/master
pox/pox/openflow/discovery.py
2
# Copyright 2011-2013 James McCauley # # 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 ...
40123148/w17b
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/this.py
948
s = """Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. Fvzcyr vf orggre guna pbzcyrk. Pbzcyrk vf orggre guna pbzcyvpngrq. Syng vf orggre guna arfgrq. Fcnefr vf orggre guna qrafr. Ernqnovyvgl pbhagf. Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf. Nygubhtu cenpg...
Distrotech/scons
refs/heads/distrotech-scons
src/engine/SCons/Options/EnumOption.py
6
# # __COPYRIGHT__ # # 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, modify, merge, publish, # distribute, sublicen...
fargalaxy1/geonode-wagtail
refs/heads/master
geonode/layers/management/commands/importlayers.py
13
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
wkoathp/glance
refs/heads/master
glance/tests/functional/test_bin_glance_cache_manage.py
5
# Copyright 2011 OpenStack Foundation # 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 requ...
cschenck/blender_sim
refs/heads/master
fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/token.py
743
"""Token constants (from "token.h").""" __all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF'] # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # ./pyth...
joebowen/landing_zone_project
refs/heads/master
simple_plot.py
1
import numpy as np from matplotlib import pyplot as plt import orhelper with orhelper.OpenRocketInstance('/home/jbbowen/Desktop/OpenRocket Stuff/OpenRocket-15.03.jar'): orh = orhelper.Helper() # Load document, run simulation and get data and events doc = orh.load_doc('estes_gnome.ork') sim =...
dvitme/odoo-kinesis-athletics
refs/heads/master
addons/kinesis_athletics_impex_xls/__init__.py
2
# -*- coding: utf-8 -*- import report import wizard import evaluation # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
spark0001/spark2.1.1
refs/heads/master
examples/src/main/python/ml/vector_slicer_example.py
123
# # 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...
heyglen/MockBlackBox
refs/heads/master
test/test_device_protocol.py
2
# -*- coding: utf-8 -*- from mock_terminal import MockTerminal from mockblackbox import DeviceConfiguration, DeviceProtocol from nose.tools import assert_equals, assert_false from examples import sample_configuration class TestDeviceProtocol(object): def setup(self): self.terminal = MockTerminal() ...
aldian/tensorflow
refs/heads/master
tensorflow/python/training/saver_large_partitioned_variable_test.py
141
# 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...
mdaniel/intellij-community
refs/heads/master
python/testData/inspections/PyCompatibilityInspection/unpackingInNonParenthesizedTuplesInReturnAndYield.py
10
def gen(xs): yield 42, <warning descr="Python version 2.7 does not support starred expressions in tuples, lists, and sets"><warning descr="Python versions 3.5, 3.6, 3.7 do not support unpacking without parentheses in yield statements">*xs</warning></warning> <warning descr="Python version 2.7 does not support t...
arghasen/Artificial_Intelligience
refs/heads/master
tutorial/projectParams.py
5
# projectParams.py # ---------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkel...
ixiom/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/loggers/__init__.py
6014
# Required for Python to search this directory for module files
dimagol/trex-core
refs/heads/master
scripts/external_libs/urllib3/urllib3/__init__.py
7
""" urllib3 - Thread-safe connection pooling and re-using. """ from __future__ import absolute_import import warnings from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import encode_multipart_formdata from .poolmanager impo...
ccnmtl/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/get_or_create_regress/tests.py
88
from django.test import TestCase from models import Author, Publisher class GetOrCreateTests(TestCase): def test_related(self): p = Publisher.objects.create(name="Acme Publishing") # Create a book through the publisher. book, created = p.books.get_or_create(name="The Book of Ed & Fred") ...
40223147/finalexam
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/base.py
603
#!/usr/bin/env python ## https://bitbucket.org/pygame/pygame/raw/2383b8ab0e2273bc83c545ab9c18fee1f3459c64/pygame/base.py '''Pygame core routines Contains the core routines that are used by the rest of the pygame modules. Its routines are merged directly into the pygame namespace. This mainly includes the auto-initia...
llhe/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/vector_student_t_test.py
75
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
rossgoodwin/musapaedia
refs/heads/master
musapaedia/muse/lib/python2.7/site-packages/pip/commands/list.py
84
from __future__ import absolute_import import logging import warnings from pip.basecommand import Command from pip.exceptions import DistributionNotFound from pip.index import PackageFinder from pip.req import InstallRequirement from pip.utils import get_installed_distributions, dist_is_editable from pip.utils.deprec...
alianmohammad/pd-gem5
refs/heads/master
src/arch/arm/ArmSystem.py
14
# Copyright (c) 2009, 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the fun...
anchor/ceilometer-publisher-vaultaire
refs/heads/master
ceilometer_publisher_vaultaire/siphash.py
1
r''' <MIT License> Copyright (c) 2013 Marek Majkowski <marek@popcount.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, cop...
mrunge/openstack_horizon
refs/heads/master
openstack_horizon/dashboards/project/data_processing/cluster_templates/forms.py
1
# 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 # distributed under the...
krzysztofwos/BitcoinUnlimited
refs/heads/dev
qa/rpc-tests/test_framework/mininode.py
8
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # mininode.p...
rvanlaar/easy-transifex
refs/heads/master
src/transifex/transifex/addons/autofetch/forms.py
3
from django import forms from autofetch.models import URLInfo class URLInfoForm(forms.ModelForm): class Meta: model = URLInfo fields = ('source_file_url','auto_update', )
janebeckman/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_01.py
7
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
jusdng/odoo
refs/heads/8.0
addons/procurement_jit_stock/__init__.py
242
# -*- 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...
blmorris/micropython
refs/heads/master
tests/basics/try_finally1.py
100
print("noexc-finally") try: print("try") finally: print("finally") print("noexc-finally-finally") try: print("try1") try: print("try2") finally: print("finally2") finally: print("finally1") print() print("noexc-finally-func-finally") def func2(): try: print("try2") ...
laperry1/android_external_chromium_org
refs/heads/cm-12.1
chrome/common/extensions/PRESUBMIT.py
56
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for changes affecting extensions. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about...
cyanna/edx-platform
refs/heads/master
lms/djangoapps/courseware/features/homepage.py
140
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_equals, assert_greater # pylint: disable=no-name-in-module @step(u'I should see the following links and ids') def should_see_a_link_called(step): for link_id_pair in step.hash...
RydrDojo/Ridr_app
refs/heads/master
pylotVenv/lib/python2.7/site-packages/alembic/templates/generic/env.py
76
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
mrquim/mrquimrepo
refs/heads/master
plugin.program.indigo/libs/requests/packages/chardet/compat.py
2942
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
rjeli/scikit-image
refs/heads/master
skimage/_shared/tests/test_utils.py
24
from skimage._shared.utils import copy_func import numpy.testing as npt def test_copyfunc(): def foo(a): return a bar = copy_func(foo, name='bar') other = copy_func(foo) npt.assert_equal(bar.__name__, 'bar') npt.assert_equal(other.__name__, 'foo') other.__name__ = 'other' npt.a...
se4u/pylearn2
refs/heads/master
pylearn2/scripts/plot_monitor.py
37
#!/usr/bin/env python """ usage: plot_monitor.py model_1.pkl model_2.pkl ... model_n.pkl Loads any number of .pkl files produced by train.py. Extracts all of their monitoring channels and prompts the user to select a subset of them to be plotted. """ from __future__ import print_function __authors__ = "Ian Goodfell...
m-housh/phonevalidator
refs/heads/master
phonevalidator/phonevalidator.py
1
# -*- coding: utf-8 -*- from os import environ from phonenumbers import ( format_number, is_valid_number, parse, NumberParseException, PhoneNumberFormat, SUPPORTED_REGIONS, ) from cerberus import Validator as SuperValidator class ValidatorMixin(object): """ A custom cerberus.Validator sub...
joshisa/taiga-back
refs/heads/master
taiga/timeline/permissions.py
20
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...