repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
ICTU/quality-time | refs/heads/master | components/collector/tests/source_collectors/generic_json/__init__.py | 12133432 | |
scorphus/django | refs/heads/master | tests/i18n/resolution/__init__.py | 12133432 | |
sourcelyzer/sourcelyzer | refs/heads/master | sourcelyzer/plugins/__init__.py | 12133432 | |
Dingmatt/AMSA | refs/heads/master | Plug-ins/Amsa.bundle/Contents/Libraries/Shared/http_request_randomizer/requests/errors/__init__.py | 12133432 | |
takeflight/wagtail | refs/heads/master | wagtail/embeds/templatetags/__init__.py | 12133432 | |
yrizk/yrizk.github.io | refs/heads/master | myvenv/lib/python3.4/site-packages/setuptools/unicode_utils.py | 463 | import unicodedata
import sys
from setuptools.compat import unicode as decoded_string
# HFS Plus uses decomposed UTF-8
def decompose(path):
if isinstance(path, decoded_string):
return unicodedata.normalize('NFD', path)
try:
path = path.decode('utf-8')
path = unicodedata.normalize('NFD'... |
ofir123/CouchPotatoServer | refs/heads/master | libs/suds/sax/parser.py | 181 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... |
heiher/libreoffice-core | refs/heads/mips64-dev | wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py | 9 | #
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license noti... |
ychen820/microblog | refs/heads/master | y/google-cloud-sdk/platform/google_appengine/lib/django-1.4/django/contrib/gis/geoip/__init__.py | 87 | """
This module houses the GeoIP object, a ctypes wrapper for the MaxMind GeoIP(R)
C API (http://www.maxmind.com/app/c). This is an alternative to the GPL
licensed Python GeoIP interface provided by MaxMind.
GeoIP(R) is a registered trademark of MaxMind, LLC of Boston, Massachusetts.
For IP-based geolocation, t... |
eckucukoglu/arm-linux-gnueabihf | refs/heads/master | arm-linux-gnueabihf/libc/usr/lib/python2.7/encodings/utf_16_be.py | 860 | """ Python 'utf-16-be' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
encode = codecs.utf_16_be_encode
def decode(input, errors='strict'):
return codecs.utf_16_be_decode(input, errors, True)
class IncrementalEncod... |
Mozhuowen/brython | refs/heads/master | www/src/Lib/test/test_importlib/import_/test_path.py | 31 | from importlib import _bootstrap
from importlib import machinery
from importlib import import_module
from .. import util
from . import util as import_util
import os
import sys
from types import ModuleType
import unittest
import warnings
import zipimport
class FinderTests(unittest.TestCase):
"""Tests for PathFind... |
pythononwheels/copow | refs/heads/master | controllers/__init__.py | 12133432 | |
DepthDeluxe/ansible | refs/heads/devel | lib/ansible/module_utils/facts/virtual/__init__.py | 12133432 | |
Adai0808/scikit-learn | refs/heads/master | sklearn/tree/tests/__init__.py | 12133432 | |
guglielmo/mosic2-db-delibere | refs/heads/master | project/delibere/settings/__init__.py | 12133432 | |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/pipeline/utils.py | 5 | from __future__ import unicode_literals
import importlib
import mimetypes
import posixpath
try:
from urllib.parse import quote
except ImportError:
from urllib import quote
from django.utils.encoding import smart_text
from pipeline.conf import settings
def to_class(class_str):
if not class_str:
... |
mozilla/fjord | refs/heads/master | vendor/packages/requests-2.7.0/requests/packages/chardet/utf8prober.py | 6 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
quantumlib/Cirq | refs/heads/master | cirq-core/cirq/contrib/noise_models/noise_models.py | 1 | # Copyright 2019 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
ryfeus/lambda-packs | refs/heads/master | Tensorflow/source/numpy/distutils/compat.py | 264 | """Small modules to cope with python 2 vs 3 incompatibilities inside
numpy.distutils
"""
from __future__ import division, absolute_import, print_function
import sys
def get_exception():
return sys.exc_info()[1]
|
jeanlinux/calibre | refs/heads/master | src/calibre/gui2/tweak_book/editor/insert_resource.py | 1 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
import sys, os
from functools import partial
from PyQt5.Qt import (
QGr... |
dmitriy-serdyuk/picklable-itertools | refs/heads/master | picklable_itertools/filter.py | 3 | from abc import ABCMeta, abstractmethod
import six
from .iter_dispatch import iter_
from .base import BaseItertool
@six.add_metaclass(ABCMeta)
class BaseFilter(BaseItertool):
def __init__(self, pred, seq):
self._predicate = pred
self._iter = iter_(seq)
@abstractmethod
def __next__(self):
... |
jborean93/ansible | refs/heads/devel | test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/module_utils/network/vyos/argspec/static_routes/static_routes.py | 47 | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by ... |
mschurenko/ansible-modules-core | refs/heads/devel | files/find.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Ruggero Marchei <ruggero.marchei@daemonzone.net>
# (c) 2015, Brian Coca <bcoca@ansible.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
#... |
gladk/trunk | refs/heads/master | py/linterpolation.py | 11 | # encoding: utf-8
#
# © 2009 Václav Šmilauer <eudoxos@arcig.cz>
#
"""
Module for rudimentary support of manipulation with piecewise-linear
functions (which are usually interpolations of higher-order functions,
whence the module name). Interpolation is always given as two lists
of the same length, where the x-list must... |
omprakasha/odoo | refs/heads/8.0 | addons/l10n_cn/__init__.py | 339 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2007-2014 Jeff Wang(<http://jeff@osbzr.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
HiroIshikawa/21playground | refs/heads/master | payblog/blog/lib/python3.5/site-packages/setuptools/__init__.py | 136 | """Extensions to the 'distutils' for large or complex distributions"""
import os
import distutils.core
import distutils.filelist
from distutils.core import Command as _Command
from distutils.util import convert_path
from fnmatch import fnmatchcase
import setuptools.version
from setuptools.extension import Extension
f... |
ataylor32/django | refs/heads/master | tests/migrations/test_migrations_custom_user/0001_initial.py | 99 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... |
aiguofer/bokeh | refs/heads/master | examples/models/glyph1.py | 12 | from __future__ import print_function
from numpy import pi, arange, sin
from bokeh.util.browser import view
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.models.glyphs import Circle
from bokeh.models import (
Plot, DataRange1d, LinearAxis, ColumnDataSource, PanTool, WheelZoomToo... |
vlachoudis/sl4a | refs/heads/master | python/src/Lib/encodings/utf_16_le.py | 860 | """ Python 'utf-16-le' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
encode = codecs.utf_16_le_encode
def decode(input, errors='strict'):
return codecs.utf_16_le_decode(input, errors, True)
class IncrementalEncod... |
openstax/openstax-cms | refs/heads/master | oxauth/urls.py | 2 | from django.conf.urls import include, url
from .views import login, logout
urlpatterns = [
url(r'/', include('social_django.urls', namespace='social')),
url(r"^/login/?$", login, name="login"),
url(r"^/logout/?$", logout, name="logout"),
]
|
hkkwok/MachOTool | refs/heads/master | tests/test_mach_header.py | 1 | import unittest
from mach_o.headers.mach_header import MachHeader, CpuType, CpuSubType, MachHeader64
class TestMachHeader(unittest.TestCase):
def setUp(self):
with open('./binaries/executable.i386', 'rb') as f1:
self.executable_i386 = f1.read()
with open('./binaries/object.o.i386', 'rb... |
palisadoes/switchmap-ng | refs/heads/master | switchmap/www/pages/__init__.py | 12133432 | |
varuntiwari27/rally | refs/heads/master | rally-jobs/plugins/__init__.py | 12133432 | |
carljm/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_b/__init__.py | 12133432 | |
lip6-mptcp/ns3mptcp | refs/heads/merge_nat | src/uan/bindings/modulegen__gcc_ILP32.py | 34 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
kurgm/gwv | refs/heads/master | gwv/validators/donotuse.py | 1 | from gwv.dump import Dump
import gwv.filters as filters
from gwv.kagedata import KageData
from gwv.validators import Validator
from gwv.validators import ErrorCodes
error_codes = ErrorCodes(
DO_NOT_USE="0", # do-not-use が引用されている
)
class DonotuseValidator(Validator):
name = "donotuse"
@filters.check_o... |
bpsinc-native/src_tools_gyp | refs/heads/master | test/rename/gyptest-filecase.py | 320 | #!/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 files whose file case changes get rebuilt correctly.
"""
import os
import TestGyp
test = TestGyp.TestGyp()
CHDIR = 'fileca... |
opoplawski/ansible-modules-core | refs/heads/devel | web_infrastructure/htpasswd.py | 99 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Nimbis Services, 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
# (... |
almeidapaulopt/erpnext | refs/heads/develop | erpnext/stock/doctype/serial_no/test_serial_no.py | 107 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# ERPNext - web based ERP (http://erpnext.com)
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, unittest
test_dependencies = ["Item"]
... |
techsd/namebench | refs/heads/master | nb_third_party/simplejson/__init__.py | 230 | r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... |
famorted/scrapy | refs/heads/master | scrapy/extensions/logstats.py | 127 | import logging
from twisted.internet import task
from scrapy.exceptions import NotConfigured
from scrapy import signals
logger = logging.getLogger(__name__)
class LogStats(object):
"""Log basic scraping stats periodically"""
def __init__(self, stats, interval=60.0):
self.stats = stats
self... |
jkadlec/knot-dns-zoneapi | refs/heads/master | tests-extra/tests/chaos/ident/test.py | 1 | #!/usr/bin/env python3
'''Test for server identification over CH/TXT'''
from dnstest.test import Test
t = Test()
name = "Knot DNS server name"
server1 = t.server("knot", ident=name)
server2 = t.server("knot", ident=True)
server3 = t.server("knot", ident=False)
server4 = t.server("knot")
t.start()
# 1a) Custom ide... |
thaumos/ansible | refs/heads/devel | lib/ansible/plugins/lookup/hashi_vault.py | 19 | # (c) 2015, Jonathan Davila <jonathan(at)davila.io>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: hashi_vault
author: Jonath... |
cnbeining/you-get | refs/heads/develop | src/you_get/extractors/cbs.py | 11 | #!/usr/bin/env python
__all__ = ['cbs_download']
from ..common import *
from .theplatform import theplatform_download_by_pid
def cbs_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
"""Downloads CBS videos by URL.
"""
html = get_content(url)
pid = match1(html, r'video\.settings... |
p0cisk/Quantum-GIS | refs/heads/master | python/ext-libs/future/past/translation/__init__.py | 61 | # -*- coding: utf-8 -*-
"""
past.translation
==================
The ``past.translation`` package provides an import hook for Python 3 which
transparently runs ``futurize`` fixers over Python 2 code on import to convert
print statements into functions, etc.
It is intended to assist users in migrating to Python 3.x eve... |
lin-credible/scikit-learn | refs/heads/master | examples/mixture/plot_gmm_pdf.py | 284 | """
=============================================
Density Estimation for a mixture of Gaussians
=============================================
Plot the density estimation of a mixture of two Gaussians. Data is
generated from two Gaussians with different centers and covariance
matrices.
"""
import numpy as np
import ma... |
OpenWinCon/OpenWinNet | refs/heads/master | web-gui/myvenv/lib/python3.4/site-packages/django/core/cache/backends/__init__.py | 12133432 | |
andela-earinde/bellatrix-py | refs/heads/master | app/js/lib/lib/modules/test/test_xml_etree_c.py | 114 | # xml.etree test for cElementTree
from test import test_support
from test.test_support import precisionbigmemtest, _2G
import unittest
cET = test_support.import_module('xml.etree.cElementTree')
# cElementTree specific tests
def sanity():
"""
Import sanity.
>>> from xml.etree import cElementTree
""... |
aeklant/scipy | refs/heads/master | scipy/io/matlab/tests/test_mio_funcs.py | 1 | ''' Jottings to work out format for __function_workspace__ matrix at end
of mat file.
'''
import os.path
import io
from numpy.compat import asstr
from scipy.io.matlab.mio5 import MatFile5Reader
test_data_path = os.path.join(os.path.dirname(__file__), 'data')
def read_minimat_vars(rdr):
rdr.initialize_read()
... |
anthonybishopric/pyboxfs | refs/heads/master | fs/contrib/davfs/util.py | 25 | # Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
"""
fs.contrib.davfs.util: utils for FS WebDAV implementation.
"""
import os
import re
import cookielib
def get_fileno(file):
"""Get the os-level fileno of a file-like object.
This... |
coleifer/peewee | refs/heads/master | tests/pool.py | 1 | import heapq
import os
import threading
import time
from peewee import *
from peewee import _savepoint
from peewee import _transaction
from playhouse.cockroachdb import PooledCockroachDatabase
from playhouse.pool import *
from .base import BACKEND
from .base import BaseTestCase
from .base import IS_CRDB
from .base im... |
zdary/intellij-community | refs/heads/master | python/helpers/pycharm/django_manage_commands_provider/_xml.py | 78 | # coding=utf-8
"""
This module exports information about manage commands and options from django to PyCharm.
Information is provided in XML (to prevent encoding troubles and simplify deserialization on java side).
Right after xml declaration, before root tag it contains following comment:
<!--jb pycharm data start-->
... |
xguse/bokeh | refs/heads/master | bokeh/compat/mplexporter/__init__.py | 64 | from .renderers import Renderer
from .exporter import Exporter
|
Beauhurst/django | refs/heads/master | tests/serializers/test_json.py | 44 | import datetime
import decimal
import json
import re
from django.core import serializers
from django.core.serializers.base import DeserializationError
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.test import SimpleTestCase, TestCase, TransactionTestCase
from djang... |
rjoudrey/volatility | refs/heads/master | volatility/plugins/malware/apihooks.py | 44 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# Authors:
# Michael Hale Ligh <michael.ligh@mnin.org>
#
# This file is part of Volatility.
#
# Volatility 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... |
seanread/completionseminar | refs/heads/master | node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py | 193 | # 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... |
yichen0831/TetrisGame_pyglet | refs/heads/master | TetrisGame.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pyglet
from game.game_window import GameWindow
def main():
game_window = GameWindow(800, 600)
game_window.set_caption('Tetris Game')
pyglet.app.run()
if __name__ == '__main__':
main()
|
kalugny/pypachy | refs/heads/master | tests/test_admin.py | 1 | #!/usr/bin/env python
"""Tests admin-related functionality"""
import pytest
import python_pachyderm
from tests import util
def test_extract_restore():
client = python_pachyderm.Client()
ops = list(client.extract())
client.restore((python_pachyderm.RestoreRequest(op=op) for op in ops))
@util.skip_if_b... |
oouyang/fxos-certsuite | refs/heads/master | mcts/web-platform-tests/tests/tools/pywebsocket/src/test/test_handshake_hybi.py | 13 | #!/usr/bin/env python
#
# Copyright 2011, 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... |
cdecker/bitcoin | refs/heads/master | test/functional/rpc_deprecated.py | 27 | #!/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 deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
class... |
nicolaka/troposphere | refs/heads/master | troposphere/sdb.py | 34 | # Copyright (c) 2012-2013, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject
class Domain(AWSObject):
resource_type = "AWS::SDB::Domain"
props = {}
|
polypmer/elipse | refs/heads/master | annonce/models.py | 1 | from django.db import models
from django.contrib.auth.models import User
#from django.utils import timezone
#Random id generator
def pkgen():
from hashlib import sha1
from random import random
pk = sha1(str(random()).encode('utf-8')).hexdigest().lower()[:6]
return pk
class Donne(models.Model):
id... |
tamsky/ansible-upstream | refs/heads/devel | test/integration/cleanup_azure.py | 386048 | |
ltalirz/bounce | refs/heads/master | examples/ex01/setup.py | 1 | """ Example 01
This example shows how to use the built-in atom viewer
of ASE as well as data visualization with matplotlib.
"""
from ase.lattice.cubic import SimpleCubic
#from ase.md.velocitydistribution import MaxwellBoltzmannDistribution
#import ase.units as units
import ase.io as io
# Set up a cube of 125 Argon at... |
quevedin/Odoo_Samples | refs/heads/master | xpath_expressions/__init__.py | 87 | # -*- coding: utf-8 -*-
import controllers
import models |
stewartsmith/bzr | refs/heads/bzr | bzrlib/plugins/weave_fmt/test_repository.py | 2 | # Copyright (C) 2006-2010 Canonical Ltd
#
# 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 distribute... |
TeXitoi/navitia | refs/heads/dev | source/tyr/migrations/versions/2e0ac7e0a7a7_add_traveler_profile_table.py | 6 | """Add traveler profile table
Revision ID: 2e0ac7e0a7a7
Revises: 1414da92b3ca
Create Date: 2015-08-18 17:44:32.460413
"""
# revision identifiers, used by Alembic.
revision = '2e0ac7e0a7a7'
down_revision = '1414da92b3ca'
from alembic import op, context
import sqlalchemy as sa
from sqlalchemy.dialects import postgres... |
Juniper/contrail-dev-neutron | refs/heads/master | neutron/db/migration/alembic_migrations/versions/81c553f3776c_bsn_consistencyhashes.py | 6 | # Copyright 2014 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mfortner/MyPythonKoans | refs/heads/master | python2/koans/about_generators.py | 5 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Written in place of AboutBlocks in the Ruby Koans
#
# Note: Both blocks and generators use a yield keyword, but they behave
# a lot differently
#
from runner.koan import *
class AboutGenerators(Koan):
def test_generating_values_on_the_fly(self):
... |
jmesteve/medical | refs/heads/master | openerp/addons/stock/wizard/stock_invoice_onshipping.py | 39 | # -*- 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... |
tdtrask/ansible | refs/heads/devel | lib/ansible/modules/network/dellos6/dellos6_facts.py | 12 | #!/usr/bin/python
#
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# Copyright (c) 2016 Dell 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_versio... |
akosyakov/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/hgweb/__init__.py | 97 | # hgweb/__init__.py - web interface to a mercurial repository
#
# Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
# Copyright 2005 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import o... |
fhaoquan/kbengine | refs/heads/master | kbe/src/lib/python/Tools/ccbench/ccbench.py | 49 | # This file should be kept compatible with both Python 2.6 and Python >= 3.0.
from __future__ import division
from __future__ import print_function
"""
ccbench, a Python concurrency benchmark.
"""
import time
import os
import sys
import itertools
import threading
import subprocess
import socket
from optparse import ... |
w-garcia/BugClustering | refs/heads/master | main.py | 1 | from keyword_preprocess import process_system
from stemmer import stem_system
from low_freq_filter import low_freq_filter
from generate_vectors import generate_vectors
from clustering_h_agglomerative import do_h_agglomerative
from config import config as cfg
from jira import JIRA
from classifier import classify
from op... |
MatthewWilkes/django | refs/heads/master | tests/reserved_names/tests.py | 405 | from __future__ import unicode_literals
import datetime
from django.test import TestCase
from .models import Thing
class ReservedNameTests(TestCase):
def generate(self):
day1 = datetime.date(2005, 1, 1)
Thing.objects.create(when='a', join='b', like='c', drop='d',
alter='e', having='... |
inasafe/inasafe | refs/heads/develop | safe/definitions/extra_keywords.py | 6 | # coding=utf-8
"""Definitions relating to extra keywords."""
from datetime import datetime
import pytz
from safe.utilities.i18n import tr
__copyright__ = "Copyright 2017, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.org"
__revision__ = '$Format:%H$'
extra_keyword_analysis_type = {... |
retoo/pystructure | refs/heads/master | tests/python/typeinference/container.py | 1 | class Container(object):
def set(self, element):
self.element = element
def get(self):
return self.element
c1 = Container()
c1.element = 42
c1.element ## type int
c2 = Container()
c2.element = "hi"
c2.element ## type str
c3 = Container()
c3.set(3.14)
c3.get() ## type float
c4 = Containe... |
SvenvDam/programmeerproject | refs/heads/master | Pre-processing/max_speed_id.py | 1 | import json
import time
speeding_year = {}
with open("../old/graph.json") as f:
graphdata = json.load(f)
with open("../old/route_per_ID.json") as f:
routedata = json.load(f)
with open("../old/scatter_data.json", "r") as f:
scatter = json.load(f)
def date2seconds(date):
return time.mktime(
t... |
microcom/odoo | refs/heads/9.0 | addons/product_margin/product_margin.py | 39 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from openerp.osv import fields, osv
class product_product(osv.osv):
_inherit = "product.product"
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=... |
hfeeki/cmdln | refs/heads/master | examples/svn.py | 4 | #!/usr/bin/env python
"""A demonstration for how one would start implementing 'svn' (the
Subversion source code control system command-line client) using
cmdln.py.
"""
import sys
import cmdln
class MySVN(cmdln.Cmdln):
"""Usage:
svn SUBCOMMAND [ARGS...]
svn help SUBCOMMAND
Most subcommands ta... |
DavidResin/aps-aalto | refs/heads/master | stitch/cv/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py | 448 | # 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
import string
import re
from pip._vendor.pyparsing import (
stringSta... |
be-cloud-be/horizon-addons | refs/heads/9.0 | partner-contact/partner_contact_gender/models/res_partner.py | 3 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
gender = fields.Selection([('male', 'Male'),
... |
andras-tim/tiaCloudSync | refs/heads/master | client/TiaCloudStorage.py | 1 | #!/usr/bin/env python3
class TiaCloudStorage(object):
pass
|
SanchayanMaity/gem5 | refs/heads/CS570 | src/mem/slicc/generate/tex.py | 92 | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# 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 co... |
lancezlin/ml_template_py | refs/heads/master | lib/python2.7/site-packages/sklearn/datasets/setup.py | 73 |
import numpy
import os
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('datasets', parent_package, top_path)
config.add_data_dir('data')
config.add_data_dir('descr')
config.add_data_dir('images')
config.add_data_d... |
tboyce1/home-assistant | refs/heads/dev | homeassistant/components/automation/mqtt.py | 21 | """
Offer MQTT listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#mqtt-trigger
"""
import asyncio
import json
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.components.... |
abramhindle/UnnaturalCodeFork | refs/heads/master | python/testdata/launchpad/lib/lp/services/webapp/tests/test_no_anonymous_session_cookies.py | 1 | # Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test harness for running the no-anonymous-session-cookies.txt tests."""
__metaclass__ = type
__all__ = []
import unittest
from lp.testing.browser import (
setUp,
tea... |
odoomrp/server-tools | refs/heads/8.0 | base_concurrency/__init__.py | 32 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Matthieu Dietrich
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# p... |
nicolashery/excesiv | refs/heads/master | excesiv/__init__.py | 1 | """
excesiv
Application component to generate and read Excel files using Apache POI
https://github.com/nicolahery/excesiv
"""
__version__ = '0.1.0dev'
# To add Excesiv to a Flask app
from .blueprint import excesiv_blueprint, xs
# To use just the Excesiv library outside of a Flask app
from .... |
thispc/download-manager | refs/heads/master | module/lib/beaker/crypto/pbkdf2.py | 43 | #!/usr/bin/python
# -*- coding: ascii -*-
###########################################################################
# PBKDF2.py - PKCS#5 v2.0 Password-Based Key Derivation
#
# Copyright (C) 2007 Dwayne C. Litzenberger <dlitz@dlitz.net>
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this s... |
cuboxi/android_external_chromium_org | refs/heads/kitkat | build/android/gyp/apk_install.py | 28 | #!/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.
"""Installs an APK.
"""
import optparse
import os
import re
import subprocess
import sys
from util import build_device
from util i... |
pedro2d10/SickRage-FR | refs/heads/develop | sickbeard/providers/gftracker.py | 1 | # coding=utf-8
# Author: medariox <dariox@gmx.com>
# based on Dustyn Gibson's <miigotu@gmail.com> work
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... |
ekansa/open-context-py | refs/heads/master | opencontext_py/apps/searcher/new_solrsearcher/ranges.py | 1 | import copy
import json
import logging
import re
import time
from datetime import datetime
from django.conf import settings
from mysolr.compat import urljoin, compat_args, parse_response
from opencontext_py.libs.general import LastUpdatedOrderedDict
from opencontext_py.libs.memorycache import MemoryCache
from opencont... |
undoware/neutron-drive | refs/heads/master | google_appengine/lib/django_1_2/tests/regressiontests/initial_sql_regress/__init__.py | 12133432 | |
m-ober/byceps | refs/heads/master | byceps/services/shop/article/models/__init__.py | 12133432 | |
JackNokia/robotframework | refs/heads/master | atest/testdata/keywords/library/with/dots/in/__init__.py | 12133432 | |
zdary/intellij-community | refs/heads/master | python/testData/resolve/multiFile/relativeAndSameDirectoryImports/python2OrdinaryPackageImportPrioritizeSameDirectoryModuleOverSdk/ordinaryPackage/os.py | 12133432 | |
harish0507/GMapsScrapper | refs/heads/master | lib/splinter-0.7.2/splinter/exceptions.py | 18 | # -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
class DriverNotFoundError(Exception):
"""
Exception raised when a driver is not found.
Example:
>>> from splinter... |
hopeall/odoo | refs/heads/8.0 | openerp/addons/test_inherits/models.py | 295 | # -*- coding: utf-8 -*-
from openerp import models, fields, api, osv
# We just create a new model
class Unit(models.Model):
_name = 'test.unit'
_columns = {
'name': osv.fields.char('Name', required=True),
'state': osv.fields.selection([('a', 'A'), ('b', 'B')],
... |
timvideos/flumotion | refs/heads/master | flumotion/worker/worker.py | 3 | # -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*-
# vi:si:et:sw=4:sts=4:ts=4
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L.
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
#
# This file may be distributed and/or modifi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.