repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
TripleDogDare/RadioWCSpy | refs/heads/master | backend/env/lib/python2.7/sre_compile.py | 4 | /usr/lib/python2.7/sre_compile.py |
sclabs/sitestatus-nonrel | refs/heads/master | django/contrib/localflavor/sk/forms.py | 344 | """
Slovak-specific form helpers
"""
from django.forms.fields import Select, RegexField
from django.utils.translation import ugettext_lazy as _
class SKRegionSelect(Select):
"""
A select widget widget with list of Slovak regions as choices.
"""
def __init__(self, attrs=None):
from sk_regions i... |
alephu5/Soundbyte | refs/heads/master | environment/lib/python3.3/site-packages/tornado/simple_httpclient.py | 18 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
from tornado.escape import utf8, _unicode, native_str
from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy
from tornado.httputil import HTTPHeaders
from tornado.iostream import... |
anhstudios/swganh | refs/heads/develop | data/scripts/templates/object/tangible/ship/components/weapon/shared_wpn_koensayr_ion_accelerator_2.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/ship/components/weapon/shared_wpn_koensayr_ion_accelerator_2.iff"
r... |
AkaZuko/gstudio | refs/heads/mongokit | gnowsys-ndf/gnowsys_ndf/ndf/views/feeds.py | 6 | ''' -- Imports from python libraries -- '''
import datetime
import json
import pymongo
import re
''' -- imports from installed packages -- '''
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import render_to_response, redirect, render
from django.template import RequestContex... |
rofehr/enigma2 | refs/heads/wetek | lib/python/Components/Sources/RecordState.py | 30 | from Source import Source
from Components.Element import cached
from enigma import iRecordableService, pNavigation
import Components.RecordingConfig
from Components.config import config
class RecordState(Source):
def __init__(self, session):
Source.__init__(self)
self.records_running = 0
self.session = session
... |
tumbl3w33d/ansible | refs/heads/devel | lib/ansible/modules/cloud/openstack/os_nova_host_aggregate.py | 31 | #!/usr/bin/python
# Copyright 2016 Jakub Jursa <[email protected]>
# 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',
... |
AloneRoad/Inforlearn | refs/heads/1.0-rc3 | django/core/cache/backends/db.py | 17 | "Database cache backend."
from django.core.cache.backends.base import BaseCache
from django.db import connection, transaction, DatabaseError
import base64, time
from datetime import datetime
try:
import cPickle as pickle
except ImportError:
import pickle
class CacheClass(BaseCache):
def __init__(self, tab... |
lunafeng/django | refs/heads/master | django/utils/checksums.py | 310 | """
Common checksum routines.
"""
__all__ = ['luhn']
import warnings
from django.utils import six
from django.utils.deprecation import RemovedInDjango110Warning
warnings.warn(
"django.utils.checksums will be removed in Django 1.10. The "
"luhn() function is now included in django-localflavor 1.1+.",
Rem... |
La0/mozilla-relengapi | refs/heads/master | src/uplift/bot/tests/test_report.py | 2 | # -*- coding: utf-8 -*-
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
import json
import responses
@responses.activate
def test_mail(mock_taskcluster_credentials):
'''
Test uplift merge failures email report
'''
from uplift_bot.report import R... |
le9i0nx/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/_nxos_mtu.py | 12 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
xyuanmu/XX-Net | refs/heads/master | python3.8.2/Lib/email/charset.py | 26 | # Copyright (C) 2001-2007 Python Software Foundation
# Author: Ben Gertzfield, Barry Warsaw
# Contact: [email protected]
__all__ = [
'Charset',
'add_alias',
'add_charset',
'add_codec',
]
from functools import partial
import email.base64mime
import email.quoprimime
from email import errors
fro... |
crosswalk-project/web-testing-service | refs/heads/master | wts/tests/xmlhttprequest/w3c/resources/auth3/corsenabled.py | 367 | import imp
import os
def main(request, response):
response.headers.set('Access-Control-Allow-Origin', request.headers.get("origin"));
response.headers.set('Access-Control-Allow-Credentials', 'true');
response.headers.set('Access-Control-Allow-Methods', 'GET');
response.headers.set('Access-Control-Allow... |
ingtechteam/pyticketswitch | refs/heads/master | setup.py | 1 | from distutils.core import setup
setup(
name='pyticketswitch',
version='1.6.3',
author='Ingresso',
author_email='[email protected]',
packages=[
'pyticketswitch',
'pyticketswitch.test',
'pyticketswitch.interface_objects'
],
license='LICENSE.txt',
description=... |
ruediger/gcc-python-plugin | refs/heads/cpp | tests/cpychecker/refcounts/_PyObject_New/correct/script.py | 623 | # -*- coding: utf-8 -*-
# Copyright 2011 David Malcolm <[email protected]>
# Copyright 2011 Red Hat, Inc.
#
# This 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, o... |
petecummings/django | refs/heads/master | django/templatetags/tz.py | 277 | from datetime import datetime, tzinfo
from django.template import Library, Node, TemplateSyntaxError
from django.utils import six, timezone
try:
import pytz
except ImportError:
pytz = None
register = Library()
# HACK: datetime is an old-style class, create a new-style equivalent
# so we can define additio... |
brakhane/panda3d | refs/heads/master | direct/src/gui/DirectScrollBar.py | 2 | """Undocumented Module"""
__all__ = ['DirectScrollBar']
from panda3d.core import *
from . import DirectGuiGlobals as DGG
from .DirectFrame import *
from .DirectButton import *
"""
import DirectScrollBar
d = DirectScrollBar(borderWidth=(0, 0))
"""
class DirectScrollBar(DirectFrame):
"""
DirectScrollBar -- a... |
hellerve/hawkweed | refs/heads/master | hawkweed/functional/primitives.py | 1 | """A collection of functional primitives"""
from functools import wraps, partial
from functools import reduce as _reduce
from inspect import getargspec
def curry(fun):
"""
A working but dirty version of a currying function/decorator.
"""
def _internal_curry(fun, original=None, given=0):
if ori... |
yuvipanda/deltas | refs/heads/master | deltas/tokenizers/tests/test_text_split.py | 1 | from nose.tools import eq_
from ..text_split import text_split
def test_simple_text_split():
input = "As a sentence, this includes punctuation. \n" + \
"\n" + \
"And then we have another sentence here!"
expected = ['As', ' ', 'a', ' ', 'sentence', ',', ' ', 'this', ' ',... |
grupoprog3/proyecto_final | refs/heads/master | proyecto/flask/Lib/site-packages/sqlalchemy/dialects/oracle/__init__.py | 55 | # oracle/__init__.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from sqlalchemy.dialects.oracle import base, cx_oracle, zxjdbc
base.dialect = cx... |
aslihandincer/ibis | refs/heads/master | ibis/impala/tests/test_pandas_interop.py | 6 | # Copyright 2015 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... |
rokam/plugin.video.netflixbmc | refs/heads/master | resources/lib/pkg_resources/__init__.py | 8 | # This is a stub provided for ndg __init__.py
def declare_namespace(_):
pass
def resource_filename(a, b):
raise NotImplementedError |
jagguli/intellij-community | refs/heads/master | python/helpers/pydev/interpreterInfo.py | 45 | '''
This module was created to get information available in the interpreter, such as libraries,
paths, etc.
what is what:
sys.builtin_module_names: contains the builtin modules embeeded in python (rigth now, we specify all manually).
sys.prefix: A string giving the site-specific directory prefix where the platform ind... |
smcgrath/empathy-smcgrath | refs/heads/master | tools/glib-ginterface-gen.py | 9 | #!/usr/bin/python
# glib-ginterface-gen.py: service-side interface generator
#
# Generate dbus-glib 0.x service GInterfaces from the Telepathy specification.
# The master copy of this program is in the telepathy-glib repository -
# please make any changes there.
#
# Copyright (C) 2006, 2007 Collabora Limited
#
# This ... |
Creworker/FreeCAD | refs/heads/master | src/Mod/Test/InitGui.py | 9 | # Test gui init module
# (c) 2003 Juergen Riegel
#
#***************************************************************************
#* (c) Juergen Riegel ([email protected]) 2002 *
#* *
#* This file is part of th... |
wakatime/sublime-wakatime | refs/heads/master | packages/wakatime/packages/py27/pygments/lexers/int_fiction.py | 4 | # -*- coding: utf-8 -*-
"""
pygments.lexers.int_fiction
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for interactive fiction languages.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, b... |
naototty/pyflag | refs/heads/master | src/pyflag/ScannerUtils.py | 7 | #!/usr/bin/env python
""" Utilities related to scanners """
# Michael Cohen <[email protected]>
# David Collett <[email protected]>
#
# ******************************************************
# Version: FLAG $Version: 0.87-pre1 Date: Thu Jun 12 00:48:38 EST 2008$
# ******************************... |
HiroIshikawa/21playground | refs/heads/master | payblog/blog/lib/python3.5/site-packages/micawber/parsers.py | 1 | import re
from .compat import text_type
try:
import simplejson as json
except ImportError:
import json
try:
from BeautifulSoup import BeautifulSoup
bs_kwargs = {'convertEntities': BeautifulSoup.HTML_ENTITIES}
replace_kwargs = {}
except ImportError:
try:
from bs4 import BeautifulSoup
... |
rigdenlab/ample | refs/heads/master | ample/util/options_processor.py | 1 | """Module coordinating the option checking"""
__author__ = "Jens Thomas, and Felix Simkovic"
__date__ = "01 Nov 2016"
__version__ = "1.0"
import glob
import logging
import os
import shutil
from ample.constants import AMPLE_PKL
from ample.ensembler.constants import (
SUBCLUSTER_RADIUS_THRESHOLDS,
SIDE_CHAIN_T... |
todaychi/hue | refs/heads/master | desktop/core/ext-py/python-ldap-2.3.13/Lib/ldap/schema/subentry.py | 44 | """
ldap.schema.subentry - subschema subentry handling
See http://www.python-ldap.org/ for details.
\$Id: subentry.py,v 1.25 2010/04/30 08:39:38 stroeder Exp $
"""
import ldap.cidict,ldap.schema
from ldap.schema.models import *
from UserDict import UserDict
SCHEMA_CLASS_MAPPING = ldap.cidict.cidict()
SCHEMA_ATTR... |
ahmadshahwan/cohorte-runtime | refs/heads/master | python/cohorte/composer/top/criteria/distance/configuration.py | 2 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Top Composer: Group by configuration
:author: Thomas Calmant
:license: Apache Software License 2.0
:version: 3.0.0
..
This file is part of Cohorte.
Cohorte is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... |
softlayer/softlayer-python | refs/heads/master | SoftLayer/CLI/hardware/power.py | 4 | """Power commands."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import formatting
from SoftLayer.CLI import helpers
@click.command()
@click.argument('identifier')
@environment.pass_env
de... |
web30s/odoo-9.0c-20160402 | refs/heads/master | hello/templates/openerp/addons/board/__init__.py | 47 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import board
import controllers
|
linspector/linspector.multicore | refs/heads/master | linspector/config/layouts.py | 2 | """
Copyright (c) 2011-2013 "Johannes Findeisen and Rafael Timmerberg"
This file is part of Linspector (http://linspector.org).
Linspector 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 ... |
OpenPLi/enigma2 | refs/heads/develop | lib/python/Components/Converter/TemplatedMultiContent.py | 4 | from Components.Converter.StringList import StringList
class TemplatedMultiContent(StringList):
"""Turns a python tuple list into a multi-content list which can be used in a listbox renderer."""
def __init__(self, args):
StringList.__init__(self, args)
from enigma import BT_SCALE, RT_HALIGN_CENTER, RT_HALIGN_L... |
jhogan/coniugare | refs/heads/master | noun.py | 1 | first= 'first'
second='second'
third= 'third'
fourth='fourth'
fifth= 'fifth'
vowels=('a', 'e', 'i', 'o', 'u')
singular = 'singular'
plural = 'plural'
f='female'
m='male'
null=None
true=True
false=False
class noun:
<<<<<<< .mine
def __init__(self, nominative, genitive_singular, gender):
self._nominative... |
RadioFreeAsia/RDacity | refs/heads/master | lib-src/lv2/lilv/waflib/Tools/compiler_c.py | 343 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,sys,imp,types
from waflib.Tools import ccroot
from waflib import Utils,Configure
from waflib.Logs import debug
c_compiler={'win32':['msvc','gcc'],'cygwin':['gcc'],'d... |
DaTrollMon/pyNES | refs/heads/0.1.x | pynes/examples/movingsprite.py | 28 | import pynes
from pynes.bitbag import *
if __name__ == "__main__":
pynes.press_start()
exit()
palette = [ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
0x0F, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63 ]
chr_asset = import_chr('player.chr')
sprite = define_sprite(128, 128, 0, 3)
... |
bally12345/enigma2 | refs/heads/master | lib/python/Screens/NetworkSetup.py | 1 | from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.InputBox import InputBox
from Screens.Standby import *
from Screens.VirtualKeyBoard import VirtualKeyBoard
from Screens.HelpMenu import HelpableScreen
from Components.About import about
from Components.Console import Console
from C... |
snowzjx/ns3-buffer-management | refs/heads/master | src/core/bindings/modulegen__gcc_LP64.py | 35 | 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))
... |
1tylermitchell/healthcheck-py | refs/heads/master | ping.py | 2 | #From https://raw.githubusercontent.com/duanev/ping-python/master/ping.py
#
# Ping - bounce ICMP identify packets off remote hosts
#
# The author of this code (a) does not expect anything from you, and
# (b) is not responsible for any problems you may have using this code.
#
# requires: python2 and root/administ... |
HossainKhademian/YowsUP | refs/heads/master | yowsup/layers/axolotl/protocolentities/test_notification_encrypt.py | 67 | from yowsup.layers.protocol_notifications.protocolentities.test_notification import NotificationProtocolEntityTest
from yowsup.layers.axolotl.protocolentities import EncryptNotification
from yowsup.structs import ProtocolTreeNode
class TestEncryptNotification(NotificationProtocolEntityTest):
def setUp(self):
... |
Eric-Zhong/odoo | refs/heads/8.0 | addons/website_sale/__openerp__.py | 299 | {
'name': 'eCommerce',
'category': 'Website',
'summary': 'Sell Your Products Online',
'website': 'https://www.odoo.com/page/e-commerce',
'version': '1.0',
'description': """
OpenERP E-Commerce
==================
""",
'author': 'OpenERP SA',
'depends': ['website', 'sale', 'paymen... |
mrniranjan/juno | refs/heads/master | PkiLib/pkicommonlib.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*
from lxml import etree
def policy_attributes(Policy_definition, policy_attributes):
for idx,(name,syntax,constraint,description,defaultvalue) in enumerate(policy_attributes):
policy_attribute_name = etree.SubElement(Policy_definition, 'policyAttribute', name=name)
... |
albertrdixon/CouchPotatoServer | refs/heads/master | couchpotato/core/media/_base/searcher/base.py | 86 | from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
log = CPLog(__name__)
class SearcherBase(Plugin):
in_progress = False
def __init__(self):
super(SearcherBase, self).__init__()
addEvent('searche... |
Tatsh/youtube-dl | refs/heads/master | youtube_dl/extractor/cwtv.py | 16 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none,
parse_age_limit,
parse_iso8601,
smuggle_url,
str_or_none,
)
class CWTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?cw(?:tv(?:pr)?|seed)\.com... |
kamcpp/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/spacetodepth_op_test.py | 21 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
TangXT/GreatCatMOOC | refs/heads/master | cms/djangoapps/contentstore/tests/tests.py | 6 | from django.test.utils import override_settings
from django.core.cache import cache
from django.core.urlresolvers import reverse
from contentstore.tests.utils import parse_json, user, registration, AjaxEnabledTestClient
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from contentstore.tests.test... |
Yukarumya/Yukarum-Redfoxes | refs/heads/master | testing/web-platform/tests/tools/pytest/testing/test_nose.py | 173 | import pytest
def setup_module(mod):
mod.nose = pytest.importorskip("nose")
def test_nose_setup(testdir):
p = testdir.makepyfile("""
l = []
from nose.tools import with_setup
@with_setup(lambda: l.append(1), lambda: l.append(2))
def test_hello():
assert l == [1]
... |
moonlighting-apps/x264 | refs/heads/master | tools/digress/scm/dummy.py | 145 | """
Dummy SCM backend for Digress.
"""
from random import random
def checkout(revision):
"""
Checkout a revision.
"""
pass
def current_rev():
"""
Get the current revision
"""
return str(random())
def revisions(rev_a, rev_b):
"""
Get a list of revisions from one to another.
... |
glwu/python-for-android | refs/heads/master | python3-alpha/python3-src/Tools/freeze/checkextensions.py | 100 | # Check for a module in a set of extension directories.
# An extension directory should contain a Setup file
# and one or more .o files or a lib.a file.
import os
import parsesetup
def checkextensions(unknown, extensions):
files = []
modules = []
edict = {}
for e in extensions:
setup = os.path... |
barma1309/Kalista | refs/heads/master | .virtualenvs/Kalista/lib/python3.4/site-packages/django/test/html.py | 220 | """
Comparing two html documents.
"""
from __future__ import unicode_literals
import re
from django.utils import six
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.html_parser import HTMLParseError, HTMLParser
WHITESPACE = re.compile('\s+')
def normalize_whitespace(str... |
try-dash-now/dash-ia | refs/heads/master | tools/build/bdist.win32/winexe/temp/_hashlib.py | 29 |
def __load():
import imp, os, sys
try:
dirname = os.path.dirname(__loader__.archive)
except NameError:
dirname = sys.prefix
path = os.path.join(dirname, '_hashlib.pyd')
#print "py2exe extension module", __name__, "->", path
mod = imp.load_dynamic(__name__, path)
## mod.frozen... |
djc/couchdb-python | refs/heads/master | couchdb/loader.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Load design documents from the filesystem into a dict.
Subset of couchdbkit/couchapp functionality.
Description
-----------
Convert a target directory into an object (dict).
Each filename (without extension) or subdirectory name is a key in this object.
For files, t... |
CUCWD/edx-platform | refs/heads/master | lms/djangoapps/verify_student/models.py | 11 | # -*- coding: utf-8 -*-
"""
Models for Student Identity Verification
This is where we put any models relating to establishing the real-life identity
of a student over a period of time. Right now, the only models are the abstract
`PhotoVerification`, and its one concrete implementation
`SoftwareSecurePhotoVerification`... |
UrsusPilot/mavlink | refs/heads/master | pymavlink/tools/mavlogdump.py | 2 | #!/usr/bin/env python
'''
example program that dumps a Mavlink log file. The log file is
assumed to be in the format that qgroundcontrol uses, which consists
of a series of MAVLink packets, each with a 64 bit timestamp
header. The timestamp is in microseconds since 1970 (unix epoch)
'''
import sys, time, os, struct
... |
rfhk/awo-custom | refs/heads/8.0 | partner_statement_report/__openerp__.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2017-2018 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Partner Statement Report',
'version': '8.0.2.1.0',
'author': 'Quartile Limited',
'website': 'https://www.quartile.co',
'category': 'Report',
'depends': [... |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/celery/app/builtins.py | 5 | # -*- coding: utf-8 -*-
"""
celery.app.builtins
~~~~~~~~~~~~~~~~~~~
Built-in tasks that are always available in all
app instances. E.g. chord, group and xmap.
"""
from __future__ import absolute_import
from collections import deque
from celery._state import get_current_worker_task, connect_on_app_fi... |
mlperf/training_results_v0.7 | refs/heads/master | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/tests/python/unittest/test_lang_verify_compute.py | 2 | # 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... |
goldenbull/grpc | refs/heads/master | src/python/grpcio/grpc_core_dependencies.py | 1 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
marsleezm/riak_pb | refs/heads/develop | version.py | 3 | # This program is placed into the public domain.
"""
Gets the current version number.
If in a git repository, it is the current git tag.
Otherwise it is the one contained in the PKG-INFO file.
To use this script, simply import it in your setup.py file
and use the results of get_version() as your package version:
... |
ioannistsanaktsidis/invenio | refs/heads/prod | modules/bibformat/lib/elements/bfe_record_url.py | 11 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio 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
## Licens... |
carljm/django | refs/heads/master | tests/multiple_database/tests.py | 8 | from __future__ import unicode_literals
import datetime
import pickle
from operator import attrgetter
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.core import management
from django.db import DEFAULT_DB_ALIAS, connections, router, transaction
from ... |
wubr2000/googleads-python-lib | refs/heads/master | examples/dfp/v201411/activity_group_service/get_active_activity_groups.py | 4 | #!/usr/bin/python
#
# Copyright 2014 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... |
bbmt-bbmt/MagretUtilQT | refs/heads/master | logger.py | 1 | # -*- coding: utf-8 -*-
import logging
import logging.handlers
from threading import Thread
from PyQt5 import QtWidgets
from PyQt5.QtCore import *
from UILog import Ui_log_dialog
import re
# classe qui initialise le logger pour le process courant et
# qui lance un thread qui va permettre de logger les autres processus... |
ujdhesa/unisubs | refs/heads/staging | apps/comments/admin.py | 7 | # Amara, universalsubtitles.org
#
# Copyright (C) 2013 Participatory Culture Foundation
#
# 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 of the
# License, or (at your op... |
olgabot/prettyplotlib | refs/heads/master | prettyplotlib/_fill_betweenx.py | 1 | __author__ = 'olga'
from prettyplotlib.utils import remove_chartjunk, maybe_get_ax, maybe_get_linewidth
from prettyplotlib.colors import almost_black, pretty
from itertools import cycle
import matplotlib as mpl
@pretty
def fill_betweenx(*args, **kwargs):
ax, args, kwargs = maybe_get_ax(*args, **kwargs)
lw = ... |
emilio/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_pdb.py | 30 | from __future__ import absolute_import, division, print_function
import sys
import platform
import os
import _pytest._code
from _pytest.debugging import SUPPORTS_BREAKPOINT_BUILTIN
import pytest
_ENVIRON_PYTHONBREAKPOINT = os.environ.get("PYTHONBREAKPOINT", "")
def runpdb_and_get_report(testdir, source):
p = t... |
carlcarl/PyGithub | refs/heads/master | github/tests/IssueEvent.py | 39 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <[email protected]> #
# Copyright 2012 Zearin <[email protected]> ... |
testmana2/test | refs/heads/master | Preferences/ConfigurationPages/ProjectBrowserPage.py | 2 | # -*- coding: utf-8 -*-
# Copyright (c) 2006 - 2015 Detlev Offenbach <[email protected]>
#
"""
Module implementing the Project Browser configuration page.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import pyqtSlot
from E5Gui.E5Application import e5App
from .ConfigurationPageBase import C... |
CS2014/USM | refs/heads/master | usm/accounting/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
jarshwah/django | refs/heads/master | tests/view_tests/generic_urls.py | 28 | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from django.views.generic import RedirectView
from . import views
from .models import Article, DateArticle
date_based_info_dict = {
'queryset': Article.objects.all()... |
swannapa/erpnext | refs/heads/develop | erpnext/healthcare/doctype/lab_test/lab_test.py | 5 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import json
from frappe.utils import getdate
from erpnext.healthcare.doctype.healthcare_settings.healthca... |
rossp/django-helpdesk | refs/heads/master | helpdesk/migrations/0024_time_spent.py | 4 | # Generated by Django 2.0.5 on 2019-02-06 13:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('helpdesk', '0023_add_enable_notifications_on_email_events_to_ticket'),
]
operations = [
migrations.AddField(
model_name='followu... |
JaviMerino/trappy | refs/heads/master | trappy/plotter/EventPlot.py | 1 | # Copyright 2015-2016 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... |
ivandevp/django | refs/heads/master | django/utils/dateformat.py | 365 | """
PHP date() style date formatting
See http://www.php.net/date for format strings
Usage:
>>> import datetime
>>> d = datetime.datetime.now()
>>> df = DateFormat(d)
>>> print(df.format('jS F Y H:i'))
7th October 2003 11:39
>>>
"""
from __future__ import unicode_literals
import calendar
import datetime
import re
impo... |
switowski/PythonPerformancePresentation | refs/heads/gh-pages | test.py | 1 | def test():
"""Stupid test function"""
L = []
for i in range(100):
L.append(i)
def filter_list_slow(arr):
output = []
for element in arr:
if element % 2:
output.append(element)
return output
def filter_list_faster(arr):
return filter(lambda x: x % 2, arr)
de... |
dotamin/migmig | refs/heads/master | migmig/utils.py | 1 | # Python utils for migmig project
import random
def parse_doc_arguments(arguments):
options, args, command = {}, {}, None
for key, value in arguments.items():
if key[0:2] == "--":
options[key[2:]] = value
elif key[0] == "<":
args[key] = value
else:
... |
antoinecarme/pyaf | refs/heads/master | tests/artificial/transf_Logit/trend_Lag1Trend/cycle_12/ar_12/test_artificial_128_Logit_Lag1Trend_12_12_20.py | 1 | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 12, transform = "Logit", sigma = 0.0, exog_count = 20, ar_order = 12); |
jeremiah-c-leary/vhdl-style-guide | refs/heads/master | vsg/tests/port/test_rule_011.py | 1 |
import os
import unittest
from vsg.rules import port
from vsg import vhdlFile
from vsg.tests import utils
sTestDir = os.path.dirname(__file__)
lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_011_test_input.vhd'))
class test_port_rule(unittest.TestCase):
def setUp(self):
self.o... |
halbbob/dff | refs/heads/develop | modules/viewer/hexedit/hexeditor.py | 1 | # DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2011 ArxSys
#
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more information about th... |
litebitcoins/litebitcoin | refs/heads/master | test/functional/test_runner.py | 1 | #!/usr/bin/env python3
# Copyright (c) 2014-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.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... |
waseem18/bedrock | refs/heads/master | vendor-local/src/django-recaptcha/captcha/tests.py | 11 | import unittest
from captcha import fields, forms, models, widgets
class TestCase(unittest.TestCase):
def test_something(self):
raise NotImplementedError('Test not implemented. Bad developer!')
|
DrOctogon/Satchmo | refs/heads/master | satchmo/apps/satchmo_ext/productratings/utils.py | 12 | from django.conf import settings
from django.contrib.comments.models import Comment
from django.contrib.sites.models import Site
from django.db.models import Avg
from django.utils.translation import ugettext_lazy as _
from satchmo_ext.productratings.models import ProductRating
import logging
import operator
log = logg... |
cclib/cclib | refs/heads/master | test/regression.py | 2 | # This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2020, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Public version 2.1 or later.... |
hollerith/schoogle | refs/heads/master | gdata/geo/__init__.py | 249 | # -*-*- encoding: utf-8 -*-*-
#
# This is gdata.photos.geo, implementing geological positioning in gdata structures
#
# $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $
#
# Copyright 2007 Håvard Gulldahl
# Portions copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");... |
pwong-mapr/private-hue | refs/heads/HUE-1096-abe | desktop/core/ext-py/Django-1.4.5/django/contrib/staticfiles/utils.py | 322 | import os
import fnmatch
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def matches_patterns(path, patterns=None):
"""
Return True or False depending on whether the ``path`` should be
ignored (if it matches any pattern in ``ignore_patterns``).
"""
if patter... |
2013Commons/HUE-SHARK | refs/heads/master | desktop/core/ext-py/lxml/src/lxml/html/defs.py | 36 | # FIXME: this should all be confirmed against what a DTD says
# (probably in a test; this may not match the DTD exactly, but we
# should document just how it differs).
# Data taken from http://www.w3.org/TR/html401/index/elements.html
try:
frozenset
except NameError:
from sets import Set as frozenset
empty_... |
MartynShaw/audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg-fifths.lv2/waflib/Tools/lua.py | 318 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib.TaskGen import extension
from waflib import Task,Utils
@extension('.lua')
def add_lua(self,node):
tsk=self.create_task('luac',node,node.change_ext('.luac'))
inst... |
zafar-hussain/or-tools | refs/heads/master | examples/python/nontransitive_dice.py | 32 | # Copyright 2010 Hakan Kjellerstrand [email protected]
#
# 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 ... |
typemytype/Mechanic | refs/heads/master | src/lib/site-packages/requests/packages/urllib3/contrib/pyopenssl.py | 64 | """
SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested w... |
ESSS/err | refs/heads/master | errbot/core_plugins/flows.py | 1 | # -*- coding: utf-8 -*-
import io
import json
from errbot import BotPlugin, botcmd, arg_botcmd
from errbot.flow import FlowNode, FlowRoot, Flow, FLOW_END
class Flows(BotPlugin):
""" Management commands related to flows / conversations.
"""
def recurse_node(self, response: io.StringIO, stack, f: FlowNode... |
ASMlover/study | refs/heads/master | python/imp-lang/imp_parser.py | 1 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2016 ASMlover. 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... |
ingenioustechie/zamboni | refs/heads/master | mkt/lookup/tests/test_serializers.py | 17 | from django.core.urlresolvers import reverse
from nose.tools import eq_
from mkt.lookup.serializers import WebsiteLookupSerializer
from mkt.site.tests import ESTestCase
from mkt.websites.indexers import WebsiteIndexer
from mkt.websites.utils import website_factory
class TestWebsiteLookupSerializer(ESTestCase):
... |
SMTorg/smt | refs/heads/master | smt/utils/checks.py | 3 | """
Author: Dr. John T. Hwang <[email protected]>
This package is distributed under New BSD license.
"""
import numpy as np
def ensure_2d_array(array, name):
if not isinstance(array, np.ndarray):
raise ValueError("{} must be a NumPy array".format(name))
array = np.atleast_2d(array.T).T
... |
sara-02/fabric8-analytics-stack-analysis | refs/heads/master | analytics_platform/kronos/__init__.py | 1 | """Kronos modules."""
|
baylabs/grpc | refs/heads/master | tools/run_tests/run_interop_tests.py | 2 | #!/usr/bin/env python
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... |
jnewland/home-assistant | refs/heads/ci | homeassistant/components/calendar/__init__.py | 5 | """Support for Google Calendar event device sensors."""
import logging
from datetime import timedelta
import re
from aiohttp import web
from homeassistant.components.google import (
CONF_OFFSET, CONF_DEVICE_ID, CONF_NAME)
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.helpers.config_valida... |
iver333/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py | 121 | # Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2012 Intel Corporation. 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 th... |
alexmoratalla/yambo-py | refs/heads/master | yambopy/dbs/rtdb.py | 1 | # Copyright (c) 2016, Henrique Miranda
# All rights reserved.
#
# This file is part of the yambopy project
#
from yambopy import *
from yambopy.plot import *
ha2ev = 27.211396132
class YamboRTDB():
"""
Open the RT databases and store it in a RTDB class
"""
def __init__(self,folder='.',calc='.',save=No... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.