repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
ryfeus/lambda-packs | refs/heads/master | Selenium_PhantomJS/source/pyasn1/__init__.py | 96 | import sys
# http://www.python.org/dev/peps/pep-0396/
__version__ = '0.1.9'
if sys.version_info[:2] < (2, 4):
raise RuntimeError('PyASN1 requires Python 2.4 or later')
|
wang1352083/pythontool | refs/heads/master | python-2.7.12-lib/statvfs.py | 294 | """Constants for interpreting the results of os.statvfs() and os.fstatvfs()."""
from warnings import warnpy3k
warnpy3k("the statvfs module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
# Indices for statvfs struct members in the tuple returned by
# os.statvfs() and os.fstatvfs().
F_BSIZE = 0 ... |
maz-1/android_kernel_sonyz_msm8974 | refs/heads/master | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... |
ychfan/tensorflow | refs/heads/master | tensorflow/contrib/kernel_methods/python/mappers/dense_kernel_mapper.py | 113 | # 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... |
sdague/home-assistant | refs/heads/dev | homeassistant/components/flunearyou/config_flow.py | 7 | """Define a config flow manager for flunearyou."""
from pyflunearyou import Client
from pyflunearyou.errors import FluNearYouError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE
from homeassistant.helpers import aiohttp_client, config_val... |
apporc/nova | refs/heads/master | nova/api/openstack/compute/cloudpipe.py | 10 | # Copyright 2011 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 a... |
GNOME/gedit-latex | refs/heads/gnome-3-20 | latex/bibtex/parser.py | 1 | # -*- coding: utf-8 -*-
# This file is part of the Gedit LaTeX Plugin
#
# Copyright (C) 2010 Michael Zeising
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence, o... |
openhatch/oh-mainline | refs/heads/master | mysite/search/views.py | 14 | # This file is part of OpenHatch.
# Copyright (C) 2010 Parker Phinney
# Copyright (C) 2009, 2010, 2011 OpenHatch, Inc.
#
# 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 Free Software Foundation, either version 3 o... |
abhishekgahlot/scikit-learn | refs/heads/master | sklearn/tests/test_random_projection.py | 19 | from __future__ import division
import numpy as np
import scipy.sparse as sp
from sklearn.metrics import euclidean_distances
from sklearn.random_projection import johnson_lindenstrauss_min_dim
from sklearn.random_projection import gaussian_random_matrix
from sklearn.random_projection import sparse_random_matrix
from... |
ChinaQuants/PTVS | refs/heads/master | Python/Tests/TestData/WFastCgi/DjangoAppUrlRewrite/manage.py | 56 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DjangoApplication.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
aerickson/ansible | refs/heads/devel | lib/ansible/modules/notification/slack.py | 70 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Steve Pletcher <steve@steve-pletcher.com>
# (c) 2016, René Moser <mail@renemoser.net>
# (c) 2015, Stefan Berggren <nsg@nsg.cc>
# (c) 2014, Ramon de la Fuente <ramon@delafuente.nl>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute i... |
ryanahall/django | refs/heads/master | tests/proxy_models/tests.py | 14 | from __future__ import unicode_literals
import datetime
from django.apps import apps
from django.contrib import admin
from django.contrib.auth.models import User as AuthUser
from django.contrib.contenttypes.models import ContentType
from django.core import checks, exceptions, management
from django.core.urlresolvers ... |
homeworkprod/byceps | refs/heads/master | byceps/services/site/models/__init__.py | 12133432 | |
daveoncode/django-easy-currencies | refs/heads/master | django_easy_currencies/templatetags/__init__.py | 12133432 | |
rgayon/l2tdevtools | refs/heads/master | l2tdevtools/build_helpers/source.py | 1 | # -*- coding: utf-8 -*-
"""Helper for building projects from source."""
from __future__ import unicode_literals
import logging
import os
import subprocess
import sys
from l2tdevtools.build_helpers import interface
class SourceBuildHelper(interface.BuildHelper):
"""Helper to build projects from source."""
class... |
supersonicninja/kernel10c | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
veger/ansible | refs/heads/devel | lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate.py | 89 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
#
# 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_vers... |
google/makani | refs/heads/master | third_party_toolchains/gcc_arm_none_eabi/arm-none-eabi/lib/armv7-ar/thumb/libstdc++.a-gdb.py | 1 | # -*- python -*-
# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... |
afloren/nipype | refs/heads/master | nipype/interfaces/semtools/diffusion/tractography/ukftractography.py | 8 | # -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
i... |
deepesch/scikit-learn | refs/heads/master | examples/ensemble/plot_adaboost_multiclass.py | 354 | """
=====================================
Multi-class AdaBoosted Decision Trees
=====================================
This example reproduces Figure 1 of Zhu et al [1] and shows how boosting can
improve prediction accuracy on a multi-class problem. The classification
dataset is constructed by taking a ten-dimensional ... |
TeamOrion-Devices/kernel_htc_msm8974 | refs/heads/lp5.0 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
Rav3nPL/doubloons-08 | refs/heads/master-0.8 | contrib/spendfrom/setup.py | 2104 | from distutils.core import setup
setup(name='btcspendfrom',
version='1.0',
description='Command-line utility for bitcoin "coin control"',
author='Gavin Andresen',
author_email='gavin@bitcoinfoundation.org',
requires=['jsonrpc'],
scripts=['spendfrom.py'],
)
|
bikong2/django | refs/heads/master | tests/wsgi/__init__.py | 12133432 | |
multikatt/CouchPotatoServer | refs/heads/master | couchpotato/core/media/movie/providers/nzb/base.py | 12133432 | |
LEPT-Development/aura_kernel_lge_c50 | refs/heads/master | tools/perf/scripts/python/sched-migration.py | 11215 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... |
gmathers/iii-addons | refs/heads/master | iii-base/__openerp__.py | 1 | # -*- coding: utf-8 -*-
{
'name': "iii-base",
'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or apps.openerp.com""",
'description': """
Long description of module's purpose
""",
'author': "Your Company",
'websi... |
MiltosD/CEF-ELRC | refs/heads/master | lib/python2.7/site-packages/django/contrib/gis/sitemaps/georss.py | 291 | from django.core import urlresolvers
from django.contrib.sitemaps import Sitemap
class GeoRSSSitemap(Sitemap):
"""
A minimal hook to produce sitemaps for GeoRSS feeds.
"""
def __init__(self, feed_dict, slug_dict=None):
"""
This sitemap object initializes on a feed dictionary (as would b... |
jianlirong/incubator-hawq | refs/heads/master | tools/bin/pythonSrc/pexpect-4.2/tests/test_which.py | 8 | # -*- coding: utf-8 -*-
import subprocess
import tempfile
import shutil
import errno
import os
import pexpect
from . import PexpectTestCase
import pytest
class TestCaseWhich(PexpectTestCase.PexpectTestCase):
" Tests for pexpect.which(). "
def test_which_finds_ls(self):
" which() can find ls(1). "
... |
saneyuki/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py | 29 | from tests.support.asserts import assert_error, assert_same_element, assert_success
from tests.support.inline import inline
def execute_script(session, script, args=None):
if args is None:
args = []
body = {"script": script, "args": args}
return session.transport.send(
"POST", "/session/{... |
edisonlz/fruit | refs/heads/master | web_project/base/site-packages/django/db/backends/oracle/__init__.py | 12133432 | |
NullScope/BorderlessStone | refs/heads/master | PyInstaller/hooks/hook-enchant.checker.py | 12133432 | |
fitermay/intellij-community | refs/heads/master | python/testData/resolve/multiFile/moduleInDeeplyNestedNamespacePackage/pkg1/pkg2/m1.py | 12133432 | |
britcey/ansible | refs/heads/devel | lib/ansible/modules/inventory/__init__.py | 12133432 | |
Colorado-Realestate-Data/CO-Database | refs/heads/master | apps/administration/migrations/__init__.py | 12133432 | |
Yong-Lee/decode-Django | refs/heads/master | Django-1.5.1/tests/regressiontests/admin_scripts/simple_app/__init__.py | 12133432 | |
rdo-management/ironic | refs/heads/mgt-master | ironic/db/__init__.py | 12133432 | |
andersonresende/django | refs/heads/master | django/views/generic/list.py | 36 | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.core.exceptions import ImproperlyConfigured
from django.db.models.query import QuerySet
from django.http import Http404
from django.utils import six
from django.utils.translation import ugettext as _
from djang... |
sertac/django | refs/heads/master | django/contrib/admin/templatetags/__init__.py | 12133432 | |
huntxu/python-neutronclient | refs/heads/master | neutronclient/__init__.py | 12133432 | |
ixdy/kubernetes-test-infra | refs/heads/master | gubernator/third_party/__init__.py | 12133432 | |
jarvys/django-1.7-jdb | refs/heads/master | tests/get_earliest_or_latest/__init__.py | 12133432 | |
discoproject/disco | refs/heads/develop | tests/test_init.py | 11 | from disco.test import TestCase, TestJob
class InitJob(TestJob):
params = {'x': 10}
sort = False
@staticmethod
def map_init(iter, params):
next(iter)
params['x'] += 100
@staticmethod
def map(e, params):
yield e, int(e) + params['x']
@staticmethod
def reduce_in... |
robynbergeron/ansible-modules-extras | refs/heads/devel | system/puppet.py | 51 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# This module 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 late... |
tysonholub/twilio-python | refs/heads/master | tests/integration/chat/v1/service/channel/__init__.py | 344 | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
|
openqt/algorithms | refs/heads/master | projecteuler/pe008-largest-product-in-a-series.py | 1 | #!/usr/bin/env python
# coding=utf-8
"""8. Largest product in a series
https://projecteuler.net/problem=8
The four adjacent digits in the 1000-digit number that have the greatest
product are 9 × 9 × 8 × 9 = 5832.
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843 ... |
austinharris/gem5-riscv | refs/heads/master | src/mem/ruby/structures/RubyMemoryControl.py | 32 | # Copyright (c) 2009 Advanced Micro Devices, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditions... |
somemarsupials/bnfparsing | refs/heads/master | bnfparsing/token.py | 1 | # -*- coding: utf-8 -*-
""" Defines a class that represents a token in a syntax tree. Contains
one class, Token. In many ways, tokens behave like strings. However,
tokens contain a number of other methods for inspecting the tokens
beneath them.
"""
from copy import copy
class Token:
def __init__(self, token_typ... |
shams169/pythonProject | refs/heads/master | ContactsDir/env/lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/datrie.py | 1301 | from __future__ import absolute_import, division, unicode_literals
from datrie import Trie as DATrie
from pip._vendor.six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, te... |
mytliulei/DCNRobotInstallPackages | refs/heads/master | windows/win32/paramiko-1.14.0/paramiko/common.py | 8 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (a... |
lociii/googleads-python-lib | refs/heads/master | examples/adspygoogle/dfp/v201306/get_all_creative_templates.py | 3 | #!/usr/bin/python
#
# Copyright 2013 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... |
google/google-ctf | refs/heads/master | third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_sys_exc.py | 61 | """Fixer for sys.exc_{type, value, traceback}
sys.exc_type -> sys.exc_info()[0]
sys.exc_value -> sys.exc_info()[1]
sys.exc_traceback -> sys.exc_info()[2]
"""
# By Jeff Balogh and Benjamin Peterson
# Local imports
from .. import fixer_base
from ..fixer_util import Attr, Call, Name, Number, Subscript, Node,... |
duthils/osmose-frontend | refs/heads/master | tools/query.py | 1 | #! /usr/bin/env python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Etienne Chové <chove@crans.org> 2009 ##
## ... |
Zlash65/erpnext | refs/heads/develop | erpnext/education/doctype/instructor/test_instructor.py | 54 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Instructor')
class TestInstructor(unittest.TestCase):
pass
|
kiwifb/numpy | refs/heads/master | tools/win32build/build-cpucaps.py | 29 | from __future__ import division, print_function
import os
import subprocess
# build cpucaps.dll
# needs to be run in tools/win32build folder under wine
# e.g. wine "C:\Python27\python" build-cpucaps.py
cc = os.environ.get('CC', 'gcc')
fmt = (cc, os.getcwd())
cmd = '"{0}" -o cpucaps_main.o -c -W -Wall "-I{1}/cpuid" "-I... |
ChiChou/shadowsocks | refs/heads/master | shadowsocks/crypto/__init__.py | 1120 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... |
cadencewatches/frappe | refs/heads/master | frappe/templates/website_group/settings.py | 3 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.permissions import get_access, clear_permissions
from frappe.templates.generators.website_group import get_pathname
from frappe.utils.email_li... |
tenforce/docker-py-aiohttp | refs/heads/master | aiodockerpy/utils/json_stream.py | 1 | import json
import json.decoder
from docker.errors import StreamParseError
import six
json_decoder = json.JSONDecoder()
async def stream_as_text(stream):
"""
Given a stream of bytes or text, if any of the items in the stream
are bytes convert them to text.
This function can be removed once we retur... |
jfindlay/pure_pynacl | refs/heads/master | test/__init__.py | 1 | # -*- coding: utf-8 -*-
# import python libs
import os
import sys
import string
import tempfile
from collections import Iterable, Mapping
from random import choice, randint
from ctypes import CDLL, POINTER, sizeof
from subprocess import call
lt_py3 = sys.version_info < (3,)
def mkstemp(*args, **kwargs):
'''
... |
ericdill/databroker | refs/heads/master | databroker/tests/test_handler_registration.py | 1 | from databroker import handler_registration
def test_register_builtin_handlers():
# smoketest!
handler_registration.register_builtin_handlers()
|
schalkneethling/bedrock | refs/heads/master | lib/l10n_utils/tests/test_extract.py | 10 | # taken and modified from tower tests
from cStringIO import StringIO
from babel.messages.catalog import Catalog
from babel.messages.extract import extract
from babel.messages.pofile import write_po
from nose.tools import eq_
from puente.commands import generate_options_map
from puente.settings import get_setting
de... |
ChrisGoedhart/Uforia | refs/heads/master | source/django/contrib/formtools/preview.py | 315 | """
Formtools Preview application.
"""
from django.http import Http404
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.utils.crypto import constant_time_compare
from django.contrib.formtools.utils import form_hmac
AUTO_ID = 'formtools_%s' # Each form here... |
katstalk/android_external_chromium_org | refs/heads/kk44 | chrome/common/extensions/docs/server2/directory_zipper_test.py | 24 | #!/usr/bin/env python
# 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.
import unittest
from cStringIO import StringIO
from zipfile import ZipFile
from compiled_file_system import CompiledFileSystem
from di... |
z1gm4/desarrollo_web_udp | refs/heads/dev | env/lib/python2.7/site-packages/django/db/backends/signals.py | 1430 | from django.dispatch import Signal
connection_created = Signal(providing_args=["connection"])
|
srinathv/vispy | refs/heads/master | vispy/testing/image_tester.py | 12 |
"""
Procedure for unit-testing with images:
1. Run unit tests at least once; this initializes a git clone of
vispy/test-data in config['test_data_path']. This path is
`~/.vispy/test-data` unless the config variable has been modified.
2. Run individual test scripts with the --vispy-audit flag:
$ python... |
zzicewind/nova | refs/heads/master | nova/tests/unit/objects/test_instance_info_cache.py | 40 | # Copyright 2013 IBM Corp.
#
# 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... |
jziub/MRProvenance | refs/heads/master | src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.py | 107 | #
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
from thrift.Thrift import *
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
try:
from thrift.protocol import fastbinary
exce... |
desio05/HyperHeuristicKnapsack | refs/heads/master | knapsack/hyper/multidim/problem.py | 1 | import numpy as np
from numba import jit
@jit
def solve(included, costs, weights, sizes):
costs = np.asarray(costs)
included = np.asarray(included)
if not validate(included, costs, weights, sizes):
return float("-inf")
return np.sum(costs * included)
@jit
def validate(included, costs, weig... |
tadebayo/myedge | refs/heads/master | myvenv/Lib/site-packages/pip/utils/outdated.py | 513 | from __future__ import absolute_import
import datetime
import json
import logging
import os.path
import sys
from pip._vendor import lockfile
from pip._vendor.packaging import version as packaging_version
from pip.compat import total_seconds, WINDOWS
from pip.models import PyPI
from pip.locations import USER_CACHE_DI... |
sloria/webargs | refs/heads/dev | tests/conftest.py | 1 | import pytest
pytest.register_assert_rewrite("webargs.testing")
|
drexly/openhgsenti | refs/heads/master | lib/django/contrib/auth/handlers/__init__.py | 12133432 | |
Emergya/icm-openedx-educamadrid-platform-basic | refs/heads/ci | common/djangoapps/heartbeat/__init__.py | 12133432 | |
b-carter/numpy | refs/heads/master | numpy/testing/nose_tools/__init__.py | 12133432 | |
mtagle/airflow | refs/heads/master | tests/utils/test_timezone.py | 5 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
mineo/pacman | refs/heads/master | test/pacman/tests/upgrade080.py | 28 | self.description = "Install a package (correct architecture)"
p = pmpkg("dummy")
p.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
p.arch = 'testarch'
self.addpkg(p)
self.option["Architecture"] = ['testarch']
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy"... |
smahs/django-redis | refs/heads/master | django_redis/serializers/base.py | 5 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
# Import the fastest implementation of
# pickle package. This should be removed
# when python3 come the unique supported
# python version
try:
import cPickle as pickle
except ImportError:
import pickle
import json
import msgpack... |
aurelijusb/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/build/gyp/test/same-source-file-name/gyptest-pass-executable.py | 271 | #!/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.
"""
Checks that gyp does not fail on executable targets which have several files
with the same basename.
"""
import TestGyp
# While MSVS s... |
pong3489/TEST_Mission | refs/heads/master | Lib/pickle.py | 42 | """Create portable serialized representations of Python objects.
See module cPickle for a (much) faster implementation.
See module copy_reg for a mechanism for registering custom picklers.
See module pickletools source for extensive comments.
Classes:
Pickler
Unpickler
Functions:
dump(obje... |
ktosiek/spacewalk | refs/heads/debian-repos | client/solaris/smartpm/smart/channels/mirrors.py | 8 | #
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Gustavo Niemeyer <niemeyer@conectiva.com>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager 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 Fou... |
spradeepv/dive-into-python | refs/heads/master | hackerrank/domain/algorithms/implementation/sherlock_and_the_beast/__init__.py | 12133432 | |
caphrim007/ansible | refs/heads/devel | lib/ansible/modules/network/iosxr/__init__.py | 12133432 | |
salguarnieri/intellij-community | refs/heads/master | python/testData/pyi/inspections/unresolvedModuleAttributes/m3.py | 12133432 | |
cobalys/django | refs/heads/master | tests/regressiontests/version/models.py | 12133432 | |
marcore/edx-platform | refs/heads/master | openedx/core/djangoapps/user_api/tests/__init__.py | 12133432 | |
yxcoin/yxcoin | refs/heads/master | src/boost_1_55_0/tools/build/v2/util/regex.py | 34 | # (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
import re
d... |
tsdmgz/ansible | refs/heads/devel | test/units/modules/network/nxos/test_nxos_pim_rp_address.py | 57 | # (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... |
trendelkampschroer/msmtools | refs/heads/devel | msmtools/estimation/tests/test_transition_matrix.py | 1 |
# This file is part of MSMTools.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group
#
# MSMTools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (a... |
brianhornsby/script.openvpn | refs/heads/master | resources/lib/kodisettings.py | 2 | #/*
# *
# * OpenVPN for Kodi.
# *
# * Copyright (C) 2015 Brian Hornsby
# *
# * 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 late... |
kkdd/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/pickle2db.py | 101 | #!/usr/bin/env python
"""
Synopsis: %(prog)s [-h|-b|-g|-r|-a|-d] [ picklefile ] dbfile
Read the given picklefile as a series of key/value pairs and write to a new
database. If the database already exists, any contents are deleted. The
optional flags indicate the type of the output database:
-a - open using any... |
NeuralEnsemble/neuroConstruct | refs/heads/master | lib/jython/Lib/encodings/palmos.py | 647 | """ Python Character Mapping Codec for PalmOS 3.5.
Written by Sjoerd Mullender (sjoerd@acm.org); based on iso8859_15.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,inp... |
skg-net/ansible | refs/heads/devel | lib/ansible/modules/network/netvisor/pn_cluster.py | 22 | #!/usr/bin/python
""" PN CLI cluster-create/cluster-delete """
#
# 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 optio... |
avneesh91/django | refs/heads/master | django/db/backends/oracle/operations.py | 14 | import datetime
import re
import uuid
from django.conf import settings
from django.db.backends.base.operations import BaseDatabaseOperations
from django.db.backends.utils import strip_quotes, truncate_name
from django.utils import timezone
from django.utils.encoding import force_bytes, force_text
from .base import Da... |
matthewoliver/swift | refs/heads/master | test/unit/common/middleware/s3api/test_subresource.py | 1 | # Copyright (c) 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 ... |
kennedyshead/home-assistant | refs/heads/dev | tests/components/nam/test_init.py | 2 | """Test init of Nettigo Air Monitor integration."""
from unittest.mock import patch
from nettigo_air_monitor import ApiError
from homeassistant.components.nam.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import STATE_UNAVAILABLE
from tests.common import MockC... |
habib/python_koans | refs/heads/master | python2/koans/another_local_module.py | 119 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Goose(object):
@property
def name(self):
return "Mr Stabby"
class Hamster(object):
@property
def name(self):
return "Phil"
class _SecretSquirrel(object):
@property
def name(self):
return "Mr Anonymous"
|
Yong-Lee/django | refs/heads/master | tests/project_template/urls.py | 467 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^empty/$', views.empty_view),
]
|
MediaKraken/MediaKraken_Deployment | refs/heads/master | source/database/db_base_audit.py | 1 | """
Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful... |
adamfast/faadata | refs/heads/master | faadata/airports/management/__init__.py | 12133432 | |
noroutine/ansible | refs/heads/devel | test/units/plugins/inventory/__init__.py | 12133432 | |
kidaa/eve | refs/heads/develop | eve/tests/renders.py | 8 | # -*- coding: utf-8 -*-
from eve.tests import TestBase
from eve.utils import api_prefix
from eve.tests.test_settings import MONGO_DBNAME
import simplejson as json
class TestRenders(TestBase):
def test_default_render(self):
r = self.test_client.get('/')
self.assertEqual(r.content_type, 'applicati... |
Lemma1/MAC-POSTS | refs/heads/master | doc_builder/sphinx-contrib/argdoc/sphinxcontrib/argdoc/test/__init__.py | 1 | #!/usr/bin/env python
"""Test suites and test data for :data:`sphinxcontrib.argdoc`
:mod:`sphinxcontrib.argdoc.test.test_argdoc`
Tests for the argdoc `Sphinx`_ extension :mod:`sphinxcontrib.argdoc`. All tests are
implemented in here. The module docstring for
:mod:`sphinxcontrib.argdoc.test.test_argdoc` con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.