repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
koyuawsmbrtn/eclock
refs/heads/master
windows/Python27/Lib/site-packages/Cython/Distutils/extension.py
9
"""Pyrex.Distutils.extension Provides a modified Extension class, that understands how to describe Pyrex extension modules in setup scripts.""" __revision__ = "$Id:$" import os import sys from types import * import distutils.extension as _Extension try: import warnings except ImportError: warnings = None c...
AlmostBetterNetwork/podmaster-host
refs/heads/master
accounts/migrations/0002_network_deactivated.py
3
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AddField( model_n...
sigma-random/pwntools-write-ups
refs/heads/master
wargames/overthewire-vortex/level2/win.py
4
#!/usr/bin/env python2 from pwn import * level = 2 host = 'vortex.labs.overthewire.org' user = 'vortex%i' % level chal = 'vortex%i' % level password = args['PASSWORD'] passfile = '/etc/vortex_pass/vortex%i' % (level+1) binary = '/vortex/%s' % chal shell = ssh(host=host, user=user, password=passwo...
GameCTO/googletest
refs/heads/master
test/gtest_color_test.py
3259
#!/usr/bin/env python # # Copyright 2008, 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...
rbgirshick/caffe
refs/heads/master
python/caffe/pycaffe.py
26
""" Wrap the internal caffe C++ module (_caffe.so) with a clean, Pythonic interface. """ from collections import OrderedDict from itertools import izip_longest import numpy as np from ._caffe import Net, SGDSolver import caffe.io # We directly update methods from Net here (rather than using composition or # inherita...
hydrospanner/DForurm
refs/heads/master
DForurm/env/Lib/site-packages/django/template/loaders/base.py
199
import warnings from django.template import Origin, Template, TemplateDoesNotExist from django.utils.deprecation import RemovedInDjango20Warning from django.utils.inspect import func_supports_parameter class Loader(object): def __init__(self, engine): self.engine = engine def __call__(self, templat...
GNOME/pyorbit
refs/heads/master
src/CORBA.py
1
# -*- Mode: Python; py-indent-offset: 4 -*- # pyorbit - a Python language mapping for the ORBit2 CORBA ORB # Copyright (C) 1998-2003 James Henstridge # # CORBA.py: dummy module to make "import CORBA" initialise PyORBit # # This library is free software; you can redistribute it and/or # modify it under the terms of t...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/refactoring/extractsuperclass/simple.before.py
166
class Foo: def bar(self): print "foo" def foo(self): print "bar"
17dakmue/WebSocket-for-Python
refs/heads/master
ws4py/client/threadedclient.py
16
# -*- coding: utf-8 -*- import threading from ws4py.client import WebSocketBaseClient __all__ = ['WebSocketClient'] class WebSocketClient(WebSocketBaseClient): def __init__(self, url, protocols=None, extensions=None, heartbeat_freq=None, ssl_options=None, headers=None): """ .. co...
Ichag/odoo
refs/heads/8.0
addons/report_webkit/report/__init__.py
438
import webkit_report_demo
tod31/pyload
refs/heads/stable
module/network/__init__.py
386048
smellman/sotmjp-website
refs/heads/master
sotmjp/profile/admin.py
2
from django.contrib import admin from .models import Profile admin.site.register( Profile, exclude=['phone'], list_display=[ 'user', 'first_name', 'first_name_ja', 'last_name', 'last_name_ja', ], )
ldong/vim_youcompleteme
refs/heads/master
python/ycm/completers/cs/cs_completer.py
1
#!/usr/bin/env python # # Copyright (C) 2011, 2012 Chiel ten Brinke <ctenbrinke@gmail.com> # Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
ankurankan/pgmpy
refs/heads/dev
pgmpy/tests/test_base/test_UndirectedGraph.py
2
#!/usr/bin/env python3 from pgmpy.base import UndirectedGraph from pgmpy.tests import help_functions as hf import unittest class TestUndirectedGraphCreation(unittest.TestCase): def setUp(self): self.graph = UndirectedGraph() def test_class_init_without_data(self): self.assertIsInstance(self....
philbull/ghost
refs/heads/master
pub_smf_bounds.py
1
#!/usr/bin/python """ Plot mean stellar mass function, with credible intervals. """ import numpy as np import pylab as P import scipy.interpolate import galaxy_model as g import likelihoods as like import time from bestfit import * NUM_SAMPLES = 1000 #2000 COLOUR_SFMS = '#1D76C5' #'#0088FF' COLOUR_PASS = '#E72327' ...
dimagol/trex-core
refs/heads/master
scripts/automation/regression/CPlatform.py
2
#!/router/bin/python from interfaces_e import IFType from platform_cmd_link import * import CustomLogger import misc_methods import re import time import CProgressDisp from CShowParser import CShowParser class CPlatform(object): def __init__(self, silent_mode): self.if_mngr = CIfManager() ...
axltxl/kaoru
refs/heads/develop
kaoru/commands/screenshot.py
1
# -*- coding: utf-8 -*- """ kaoru.commands.screenshot ~~~~~~~~ /screenshot command implementation :copyright: (c) 2015 by Alejandro Ricoveri :license: MIT, see LICENSE for more details. """ import os import uuid import re from telegram import Update, ChatAction from .. import utils from .. import config from .. im...
fitoria/askbot-devel
refs/heads/master
askbot/migrations/0068_transplant_last_activity_fields_1.py
17
# encoding: 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 field 'Thread.last_activity_at' db.add_column('askbot_thread', 'last_activity_at', self.gf('djang...
makinacorpus/odoo
refs/heads/8.0
addons/portal/wizard/portal_wizard.py
26
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
infinigrove/TerminalRoastDB
refs/heads/master
recipe.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # TerminalRoastDB, released under GPLv3 import pymysql class Recipe(object): def __init__(self): #self.currentRecipeStep = 1 self.currentRecipeID = 1 self.target_temp = 200 self.fan_speed = 5 self.time_remaining = 10 # Sto...
sillygod/my-travel-in-learning-python
refs/heads/master
async_io/test.py
1
import time import gevent.monkey import requests from urllib.request import urlopen mtart = time.time() gevent.monkey.patch_all() import asyncio @asyncio.coroutine def hi(): print('HI') urls = [ 'http://www.google.com', 'http://www.yandex.ru', 'http://www.python.org', 'http://www.python.org', 'http://...
ptisserand/ansible
refs/heads/devel
test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py
74
import pytest import unittest from collections import namedtuple from ansible.parsing.dataloader import DataLoader from ansible.vars.manager import VariableManager from ansible.inventory.manager import InventoryManager from ansible.playbook.play import Play from ansible.executor.task_queue_manager import TaskQueueMana...
Taranys/Sick-Beard
refs/heads/development
lib/guessit/transfo/guess_release_group.py
40
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
plowman/python-mcparseface
refs/heads/master
models/inception/inception/slim/slim.py
33
# Copyright 2016 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 by applicable law or agree...
Dishwishy/beets
refs/heads/master
extra/release.py
24
#!/usr/bin/env python3 """A utility script for automating the beets release process. """ import click import os import re import subprocess from contextlib import contextmanager import datetime BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) CHANGELOG = os.path.join(BASE, 'docs', 'changelog.rst') ...
vikingMei/mxnet
refs/heads/master
python/mxnet/module/base_module.py
27
# 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 u...
Bloodyaugust/missilewarcpp
refs/heads/master
lib/boost/tools/build/example/make/foo.py
12
import sys open(sys.argv[2], "w").write(open(sys.argv[1]).read())
D4wN/brickv
refs/heads/master
src/build_data/windows/OpenGL/raw/GLE/__init__.py
4
# -*- coding: iso-8859-1 -*- """Raw (C-style) API for OpenGL.GLE Automatically generated by the generateraw script, do not edit! """ from OpenGL.raw.GLE.constants import * from ctypes import * from OpenGL import platform, arrays from OpenGL.constant import Constant from OpenGL import constants as GLconstants GLvoid =...
adeepkit01/networks
refs/heads/master
build/bindings/python/ns/__init__.py
386048
manipopopo/tensorflow
refs/heads/master
tensorflow/contrib/quantize/python/quantize_test.py
1
# 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...
motobyus/moto
refs/heads/master
module_py/dbConn/dbConn.py
1
# ===================================================================== # write : moto # update : 2016.10.19. # dependency : psycopg2==2.6.1 (https://pypi.python.org/pypi/psycopg2) # ===================================================================== import psycopg2 class T1_DB_Management: conn, cu...
Og192/Python
refs/heads/master
pythonLearning/oo/mutTypePara.py
2
#!/usr/bin/python3 class HauntedBus: """A bus model haunted by ghost passengers""" def __init__(self, passengers=[]): self.passengers = passengers def pick(self, name): self.passengers.append(name) def drop(self, name): self.passengers.remove(name) bus1 = HauntedBus(['Alic...
todaychi/hue
refs/heads/master
desktop/core/ext-py/pytidylib-0.2.1/tidylib/sink.py
50
# Copyright 2009 Jason Stitt # # 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...
edxzw/edx-platform
refs/heads/master
cms/djangoapps/contentstore/tests/test_import_draft_order.py
163
""" Tests Draft import order. """ from xmodule.modulestore.xml_importer import import_course_from_xml from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.django import modulestore from django.conf import settings TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT # This test ...
mpatacchiola/pyERA
refs/heads/master
pyERA/tfsom.py
1
#!/usr/bin/env python #The MIT License (MIT) #Copyright (c) 2018 Massimiliano Patacchiola # #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF #MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ...
sv-dev1/odoo
refs/heads/8.0
addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
337
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
eamuntz/Django-Tut
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/redirects/models.py
223
from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Redirect(models.Model): site = models.ForeignKey(Site) old_path = models.CharField(_...
HeinleinSupport/check_mk
refs/heads/master
python-cryptography/lib/python/cryptography/hazmat/backends/openssl/__init__.py
89
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography.hazmat.backends.openssl.backend import backend __all_...
stewartpark/django
refs/heads/master
django/contrib/admin/helpers.py
3
from __future__ import unicode_literals import json import warnings from django import forms from django.conf import settings from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.utils import ( display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, l...
ionanrozenfeld/networkx
refs/heads/master
networkx/classes/tests/test_timing.py
22
#!/usr/bin/env python from __future__ import print_function from nose.tools import * from collections import OrderedDict import networkx as nx from timeit import Timer # dict pointing to graph type to compare to. graph_type = { (False, False): "TimingGraph", (False, True): "TimingMultiGraph", (...
bbockelm/htcondor
refs/heads/master
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/Languages/da.py
10
apiAttachAvailable = u'API forefindes' apiAttachNotAvailable = u'Optaget' apiAttachPendingAuthorization = u'Afventer godkendelse' apiAttachRefused = u'Afvist' apiAttachSuccess = u'Succes' apiAttachUnknown = u'Ukendt' budDeletedFriend = u'Slettet fra liste over kontaktpersoner' budFriend = u'Ven' budNeverBeenFri...
google/skia-buildbot
refs/heads/main
ct/py/csv_merger.py
1
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Python utility to merge many CSV files into a single file. If there are multiple CSV files with the same TELEMETRY_PAGE_NAME_KE...
mxrrow/zaicoin
refs/heads/master
src/deps/boost/tools/build/v2/test/core_typecheck.py
24
#!/usr/bin/python # Copyright 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # This tests the typechecking facilities. import BoostBuild t = BoostBuild.Tester(pass_toolset=0) t.write("file.jam", ""...
robynbergeron/ansible-modules-extras
refs/heads/devel
windows/win_dotnet_ngen.py
138
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Peter Mounce <public@neverrunwithscissors.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...
dankcoin/dankcoin
refs/heads/master
qa/rpc-tests/p2p-feefilter.py
1
#!/usr/bin/env python3 # Copyright (c) 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. # from test_framework.mininode import * from test_framework.test_framework import DankcoinTestFramework from t...
spadae22/odoo
refs/heads/chris_master_8
openerp/addons/base/ir/osv_memory_autovacuum.py
447
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
Qalthos/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_ontap_net_vlan.py
16
#!/usr/bin/python # (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
jamesob/bitcoin
refs/heads/master
test/functional/feature_settings.py
30
#!/usr/bin/env python3 # Copyright (c) 2017-2020 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 various command line arguments and configuration file parameters.""" import json from pathlib im...
Eric-Zhong/odoo
refs/heads/8.0
addons/stock/tests/test_resupply.py
214
# -*- coding: utf-8 -*- from openerp.addons.stock.tests.common import TestStockCommon from openerp.tools import mute_logger, float_round class TestResupply(TestStockCommon): def setUp(self): super(TestResupply, self).setUp() self.Warehouse = self.env['stock.warehouse'] # create 2 WH, BIG ...
TatumCreative/three.js
refs/heads/master
utils/exporters/blender/2.66/scripts/addons/io_mesh_threejs/export_threejs.py
5
# ##### 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...
mderomph-coolblue/dd-agent
refs/heads/master
tests/checks/integration/test_varnish.py
46
# 3p from nose.plugins.attrib import attr # project from tests.checks.common import AgentCheckTest, Fixtures from utils.shell import which def mocked_varnishstatoutput(cmd): return Fixtures.read_file('dump.xml') COMMON_METRICS = [ 'varnish.SMA.Transient.g_alloc', 'varnish.SMA.Transient.g_bytes', 'v...
campbe13/openhatch
refs/heads/master
vendor/packages/html5lib/html5lib/serializer/__init__.py
127
from html5lib import treewalkers from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer def serialize(input, tree="simpletree", format="html", encoding=None, **serializer_opts): # XXX: Should we cache this? walker = treewalkers.getTreeWalker(tree) if format =...
OpenDA-Association/OpenDA
refs/heads/master
model_example_blackbox/native/python/pollution_model.py
3
#! /usr/bin/python '''A one dimensional pollution model. ''' import sys import math def defaultInput(): input={} # grid input['x']= [0.0, 1.0, 4.0] # stationary flow input['u'] = [1.0, 1.0, 1.0, 1.0, 1.0] # cross sectional area input['a'] = [1.0, 1.0, 1.0, 1.0, 1.0] # initial concen...
sigopt/sigopt-python
refs/heads/master
sigopt/runs/factory.py
1
import contextlib from ..exception import RunException from ..interface import Connection from .context import LiveRunContext, NullRunContext class RunFactory(object): CONFIG_CONTEXT_KEY = 'run_connection' RUN_CONTEXT_KEY = 'run_context' _global_run_context = None _global_connection = None _null_run_conte...
hubert667/AIR
refs/heads/master
build/amqp/docs/conf.py
18
# -*- coding: utf-8 -*- import sys import os this = os.path.dirname(os.path.abspath(__file__)) # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. sys.path.append(os.path.join(os.pardir, "tes...
normanmaurer/autobahntestsuite-maven-plugin
refs/heads/master
src/main/resources/twisted/conch/scripts/cftp.py
19
# -*- test-case-name: twisted.conch.test.test_cftp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the I{cftp} command. """ import os, sys, getpass, struct, tty, fcntl, stat import fnmatch, pwd, glob from twisted.conch.client import connect, default, options ...
ulikoehler/cv_algorithms
refs/heads/master
test/TestThinning.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import io from numpy.testing import assert_approx_equal, assert_allclose, assert_array_equal from nose.tools import assert_equal, assert_true, assert_false, assert_greater, assert_less import cv2 import cv_algorithms import numpy as np class TestThinning(object): def ...
40423219/2017springcd_hw
refs/heads/gh-pages
plugin/summary/summary.py
317
""" Summary ------- This plugin allows easy, variable length summaries directly embedded into the body of your articles. """ from __future__ import unicode_literals from pelican import signals from pelican.generators import ArticlesGenerator, StaticGenerator, PagesGenerator def initialized(pelican): from pelican...
aleida/django
refs/heads/master
django/contrib/gis/tests/geoadmin/urls.py
383
from django.conf.urls import patterns, include from django.contrib import admin urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), )
Edraak/edraak-platform
refs/heads/master
lms/djangoapps/grades/config/tests/test_models.py
13
""" Tests for the models that control the persistent grading feature. """ import itertools import ddt from django.conf import settings from django.test import TestCase from mock import patch from opaque_keys.edx.locator import CourseLocator from lms.djangoapps.grades.config.models import PersistentGradesEnabledFlag f...
ricardobergamo/dataGAL
refs/heads/master
database/queries/datagal.py
1
#!/usr/bin/env python import os import sys import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) appdir = os.path.dirname(parentdir) sys.path.insert(0, appdir) from database.sqconfig import APP_Cursor from database.pgconfig impor...
JConwayAWT/PGSS14CC
refs/heads/master
lib/python/multimetallics/ase/test/fio/__init__.py
12133432
mhue/scikit-learn
refs/heads/master
sklearn/tree/tests/__init__.py
12133432
fnp/wolnelektury
refs/heads/master
src/push/migrations/__init__.py
12133432
lz1988/company-site
refs/heads/master
build/lib/django/conf/app_template/__init__.py
12133432
jaap-karssenberg/zim-desktop-wiki
refs/heads/master
tests/plugins.py
1
# Copyright 2008-2013 Jaap Karssenberg <jaap.karssenberg@gmail.com> import tests import os from zim.plugins import * from zim.fs import File from tests.mainwindow import setUpMainWindow import zim.plugins assert len(zim.plugins.__path__) > 1 # test __path__ magic zim.plugins.__path__ = [os.path.abspath('./zim/plu...
pataquets/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/networktransaction.py
190
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
neillc/zookeepr
refs/heads/master
zkpylons/lib/auth.py
3
# Zookeepr driver for AuthKit # # This module allows us to use the authkit infrastructure but using the # Zookeepr models to do so # * We don't support groups # * We don't support the creation methods as zkpylons does that already # import logging from pylons.templating import render_mako as render from pylons imp...
3dfxmadscientist/CBSS
refs/heads/master
addons/product_manufacturer/__openerp__.py
73
############################################################################## # # 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 Affero General Public L...
mattnenterprise/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/py/py/_code/source.py
60
from __future__ import generators from bisect import bisect_right import sys import inspect, tokenize import py from types import ModuleType cpy_compile = compile try: import _ast from _ast import PyCF_ONLY_AST as _AST_FLAG except ImportError: _AST_FLAG = 0 _ast = None class Source(object): """ ...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/gdata/src/gdata/tlslite/utils/RSAKey.py
105
"""Abstract class for RSA.""" from cryptomath import * class RSAKey: """This is an abstract base class for RSA keys. Particular implementations of RSA keys, such as L{OpenSSL_RSAKey.OpenSSL_RSAKey}, L{Python_RSAKey.Python_RSAKey}, and L{PyCrypto_RSAKey.PyCrypto_RSAKey}, inherit from this. ...
apple/swift-lldb
refs/heads/stable
packages/Python/lldbsuite/test/commands/expression/inline-namespace/TestInlineNamespace.py
5
""" Test that we correctly handle inline namespaces. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestInlineNamespace(TestBase): mydir = TestBase.compute_mydir(__file__) def test(self): self.build() ...
marmyshev/bug_1117098
refs/heads/master
openlp/core/ui/starttimeform.py
1
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
mitsei/dlkit
refs/heads/master
tests/commenting/test_queries.py
1
"""Unit tests of commenting queries.""" import pytest from ..utilities.general import is_never_authz, is_no_authz, uses_cataloging, uses_filesystem_only from dlkit.abstract_osid.osid import errors from dlkit.json_.commenting.queries import BookQuery from dlkit.primordium.id.primitives import Id from dlkit.primordiu...
sanjuro/RCJK
refs/heads/master
vendor/gdata/sites/__init__.py
12133432
jleyva/airnotifier
refs/heads/master
gcm/ccs.py
12133432
trenog/g43exercise
refs/heads/master
g43exercise/templatetags/__init__.py
12133432
hhorak/sti-python
refs/heads/master
3.3/test/app-home-test-app/project/__init__.py
12133432
surligas/cs436-gnuradio
refs/heads/master
gr-filter/python/filter/optfir.py
45
# # Copyright 2004,2005,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later ve...
samanehsan/osf.io
refs/heads/develop
scripts/migrate_guid.py
64
""" Create a GUID for all non-GUID database records. If record already has a GUID, skip; if record has an ID but not a GUID, create a GUID matching the ID. Newly created records will have optimistically generated GUIDs. """ import time import collections from framework.mongo import StoredObject from website import m...
Akagi201/learning-opencv
refs/heads/master
image/read_display.py
1
#!/usr/bin/env python import cv2 img = cv2.imread("akhead.jpg") cv2.namedWindow("akhead") cv2.imshow("akhead", img) cv2.waitKey(0) cv2.destroyAllWindows()
benjaminrigaud/django
refs/heads/master
tests/custom_methods/__init__.py
12133432
maciej-gol/call-tracker
refs/heads/master
src/call_tracker/app/main/__init__.py
12133432
megaserg/pants
refs/heads/master
contrib/node/tests/python/pants_test/contrib/node/tasks/__init__.py
12133432
suyashphadtare/gd-erp
refs/heads/develop
erpnext/buying/doctype/do_material/__init__.py
12133432
DevinZ1993/Pieces-of-Code
refs/heads/master
python/algo/josephus.py
4
#! /usr/bin/env python import random def josephus(N, m): idx = 1 for n in range(1, N): idx = (idx+m-1)%(n+1)+1 return idx def test(N, m): lst = [i for i in range(1, N+1)] pos = 0 while len(lst)>1: pos = (pos+m-1)%len(lst) del lst[pos] return lst[0] == josephus(N, ...
brstrat/djangotoolbox
refs/heads/develop
djangotoolbox/db/creation.py
17
from django.db.backends.creation import BaseDatabaseCreation class NonrelDatabaseCreation(BaseDatabaseCreation): # "Types" used by database conversion methods to decide how to # convert data for or from the database. Type is understood here # a bit differently than in vanilla Django -- it should be read ...
bzbarsky/servo
refs/heads/master
tests/wpt/web-platform-tests/mathml/tools/use-typo-lineheight.py
101
#!/usr/bin/python from __future__ import print_function from utils.misc import MathMLAssociationCopyright import fontforge font = fontforge.font() font.em = 1000 typoLineHeight = 2300 winHeight = 5000 name = "font-lineheight%d-typolineheight%d" % (winHeight, typoLineHeight) font.fontname = name font.familyname = name...
catapult-project/catapult-csm
refs/heads/master
devil/devil/android/device_errors.py
5
# Copyright 2014 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. """ Exception classes raised by AdbWrapper and DeviceUtils. The class hierarchy for device exceptions is: base_error.BaseError +-- CommandFailedEr...
dsajkl/reqiop
refs/heads/master
common/djangoapps/embargo/tests/__init__.py
12133432
CUCWD/edx-platform
refs/heads/master
openedx/core/djangoapps/credentials/settings/__init__.py
12133432
DGA-MI-SSI/YaCo
refs/heads/master
deps/swig-3.0.7/Examples/python/import_packages/from_init2/py2/__init__.py
12133432
zefirka/bobot
refs/heads/master
test/cases/__init__.py
12133432
onitake/ansible
refs/heads/devel
lib/ansible/module_utils/network/ios/__init__.py
12133432
alper/volunteer_planner
refs/heads/develop
api/migrations/__init__.py
12133432
GeyerA/android_external_chromium_org
refs/heads/master
build/android/pylib/monkey/test_options.py
23
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Defines the MonkeyOptions named tuple.""" import collections MonkeyOptions = collections.namedtuple('MonkeyOptions', [ 'build_type', 'verbose_co...
Star2Billing/a2b-satchmo
refs/heads/master
a2b_satchmo/customer/templatetags/customer_extras.py
2
from django import template from django.template.defaultfilters import * from datetime import datetime import operator register = template.Library() @register.filter() def row(value,tags): """ Strips all [X]HTML tags except the space seperated list of tags from the output. Usage: keeptags:"strong em...
gregbuehler/ansible-modules-extras
refs/heads/devel
web_infrastructure/jboss.py
39
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be> # # 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 th...
the-zebulan/CodeWars
refs/heads/master
tests/beta_tests/test_dinner_plans.py
1
import unittest from katas.beta.dinner_plans import common_ground class CommonGroundTestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual(common_ground( 'eat chicken', 'eat chicken and rice' ), 'eat chicken') def test_equal_2(self): self.assertEqual(common...
karinepires/vaultier
refs/heads/master
vaultier/nodes/tests/integration/nodes_api_test.py
3
import pytest from rest_framework.test import APIClient from rest_framework.reverse import reverse from rest_framework import status import os @pytest.mark.django_db class TestNodesApi(object): def test_perm(self): client = APIClient() response = client.get(reverse('node-list')) # user n...