repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
cainmatt/django | refs/heads/master | tests/prefetch_related/__init__.py | 12133432 | |
syseleven/pyapi-gitlab | refs/heads/develop | tests/__init__.py | 12133432 | |
JamesMGreene/phantomjs | refs/heads/master | src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/__init__.py | 12133432 | |
knmkr/dbsnp-pg-min | refs/heads/master | script/python/lib/__init__.py | 12133432 | |
echanna/EdxNotAFork | refs/heads/master | lms/djangoapps/courseware/tests/modulestore_config.py | 29 | """
Define test configuration for modulestores.
"""
from xmodule.modulestore.tests.django_utils import xml_store_config, \
mongo_store_config, draft_mongo_store_config,\
mixed_store_config
from django.conf import settings
TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT
TEST_DATA_XML_MODULESTORE = xml_store_co... |
tlksio/tlksio | refs/heads/develop | env/lib/python3.4/site-packages/twitter/__init__.py | 4 | #!/usr/bin/env python
#
# vim: sw=2 ts=2 sts=2
#
# Copyright 2007 The Python-Twitter 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
#
# http://www.apache.org/licenses/LICENSE-... |
tictakk/servo | refs/heads/ticbranch | tests/wpt/web-platform-tests/mixed-content/generic/tools/common_paths.py | 77 | import os, sys, json, re
script_directory = os.path.dirname(os.path.abspath(__file__))
generic_directory = os.path.abspath(os.path.join(script_directory, '..'))
template_directory = os.path.abspath(os.path.join(script_directory,
'..',
... |
Mj258/weiboapi | refs/heads/master | srapyDemo/envs/Lib/encodings/mac_iceland.py | 593 | """ Python Character Mapping Codec mac_iceland generated from 'MAPPINGS/VENDORS/APPLE/ICELAND.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input... |
toshywoshy/ansible | refs/heads/devel | lib/ansible/modules/network/cloudengine/ce_mtu.py | 13 | #!/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... |
inspyration/odoo | refs/heads/master | addons/barcodes/__init__.py | 1 | import barcodes
|
qmarlats/pyquizz | refs/heads/master | env/lib/python3.5/site-packages/wheel/egg2wheel.py | 471 | #!/usr/bin/env python
import os.path
import re
import sys
import tempfile
import zipfile
import wheel.bdist_wheel
import shutil
import distutils.dist
from distutils.archive_util import make_archive
from argparse import ArgumentParser
from glob import iglob
egg_info_re = re.compile(r'''(?P<name>.+?)-(?P<ver>.+?)
(-... |
uriybashkirov/CHALLENGE-ACCEPTED | refs/heads/master | Labor2/Вариант 69.py | 1 | import math
# -*- coding: utf-8 -*-
print ('Введите x = ')
x = int(input())
print ('Введите a = ' )
a = int(input())
print ('Введите: N = 1 для нахождения переменной G. N = 2 для нахождения переменной F. N = 3 для нахождения переменной Y.')
n = int(input())
if n == 1:
Y = ((9 *(7 *a * a + 39 * a * x + 20 * x... |
adlius/osf.io | refs/heads/develop | osf_tests/test_maintenance.py | 25 | import unittest
from datetime import timedelta
import pytest
from django.utils import timezone
from website import maintenance
from osf.models import MaintenanceState
pytestmark = pytest.mark.django_db
class TestMaintenance(unittest.TestCase):
def tearDown(self):
MaintenanceState.objects.all().delete... |
demographics/demographics | refs/heads/master | _/libs/timelinejs/website/app.py | 34 | '''
Main entrypoint file. To run:
$ python serve.py
'''
from flask import Flask
from flask import request
from flask import render_template
from flask import json
from flask import send_from_directory
import importlib
import traceback
import sys
import os
#if __name__ == "__main__":
# Add current directory to sys... |
lingyunyumo/PyLinden | refs/heads/master | pygments/lexers/functional.py | 42 | # -*- coding: utf-8 -*-
"""
pygments.lexers.functional
~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for functional languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, incl... |
eroh92/asset-manager | refs/heads/master | asset_manager/__init__.py | 52 | __version__ = '0.0.1' |
thanatoskira/AndroGuard | refs/heads/master | demos/benchmark.py | 38 | #!/usr/bin/env python
import sys, os
import cProfile
# http://code.activestate.com/recipes/286222-memory-usage/
_proc_status = '/proc/%d/status' % os.getpid()
_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0,
'KB': 1024.0, 'MB': 1024.0*1024.0}
def _VmB(VmKey):
global _proc_status, _scale
# get pseudo ... |
arbrandes/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/tests/xml/__init__.py | 4 | """
Xml parsing tests for XModules
"""
import pprint
from unittest.mock import Mock
from django.test import TestCase
from lxml import etree
from opaque_keys.edx.keys import CourseKey
from xblock.runtime import DictKeyValueStore, KvsFieldData
from xmodule.mako_module import MakoDescriptorSystem
from xmodule.modulest... |
kurokochin/blog-ricky | refs/heads/master | posts/models.py | 3 | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models.signals import pre_save
from django.utils import timezone
from django.utils.safestring impo... |
papouso/odoo | refs/heads/8.0 | openerp/addons/test_limits/__openerp__.py | 435 | # -*- coding: utf-8 -*-
{
'name': 'test-limits',
'version': '0.1',
'category': 'Tests',
'description': """A module with dummy methods.""",
'author': 'OpenERP SA',
'maintainer': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'data': ['ir.model.access.csv'],
... |
jeremiedecock/snippets | refs/heads/master | python/pyqt/pyqt4/layout_grid.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including witho... |
yafp/apparat | refs/heads/master | apparat_launcher/plugin_passwordgen.py | 2 | #!/usr/bin/python
"""plugin: passwordgen (optional)"""
## general
import os
import random
import string
import wx
## apparat
import ini
import tools
# -----------------------------------------------------------------------------------------------
# CONSTANTS
# -----------------------------------------------------... |
tiagormk/gem5-hmp | refs/heads/master | src/mem/slicc/ast/ExprStatementAST.py | 33 | # 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... |
mariosky/evo-drawings | refs/heads/master | venv/lib/python2.7/site-packages/pystache/__init__.py | 38 |
"""
TODO: add a docstring.
"""
# We keep all initialization code in a separate module.
from pystache.init import parse, render, Renderer, TemplateSpec
__all__ = ['parse', 'render', 'Renderer', 'TemplateSpec']
__version__ = '0.5.4' # Also change in setup.py.
|
bealdav/OpenUpgrade | refs/heads/8.0 | addons/crm/wizard/crm_phonecall_to_meeting.py | 381 | # -*- 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... |
hiidef/django-quickbooks | refs/heads/master | quickbooks/templatetags/quickbooks_tags.py | 4 | from django import template
from django.conf import settings
from django.utils.safestring import mark_safe
register = template.Library()
@register.simple_tag
def quickbooks_javascript():
menu_proxy_url = settings.QUICKBOOKS['MENU_URL']
grant_url = settings.QUICKBOOKS['OAUTH_GRANT_URL']
result = """
... |
kleniu/PUBLICPYLIBS | refs/heads/master | LIBS/libsanitize.py | 1 | #!/usr/bin/env python
# coding:utf-8
u"""The first lib."""
def depunctate(text_data):
u"""Function gets rid of punctation chars."""
ufrom_ = u'!"$%(),-/:;<=>?[]^_`{-}~\'\\\n'
uto___ = u' '
translate_map = dict(
zip(map(ord, ufrom_),
... |
bwohlberg/sporco | refs/heads/master | sporco/dictlrn/cbpdndl.py | 1 | # -*- coding: utf-8 -*-
# Copyright (C) 2015-2020 by Brendt Wohlberg <brendt@ieee.org>
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""Dictionary learning based ... |
tximikel/kuma | refs/heads/master | vendor/packages/translate/storage/xml_name.py | 25 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 t... |
s-macke/jor1k-sysroot | refs/heads/master | fs/usr/lib/python2.7/email/mime/message.py | 573 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Class representing message/* MIME documents."""
__all__ = ['MIMEMessage']
from email import message
from email.mime.nonmultipart import MIMENonMultipart
class MIMEMessage(MIMENonMultipart):
"""Class... |
mikeryan/PyBT | refs/heads/master | PyBT/roles.py | 1 | import logging
from stack import BTStack
from att import ATT_Protocol
from gatt import GATT_Server
from sm import SM, SM_Protocol
from select import select
log = logging.getLogger('PyBT.roles')
class LE_Central:
def __init__(self, adapter=0):
self.stack = BTStack(adapter=adapter)
self.att = ATT_... |
Darkmoth/python-django-4 | refs/heads/master | Thing/env/Lib/site-packages/django/template/base.py | 37 | """
This is the Django template system.
How it works:
The Lexer.tokenize() function converts a template string (i.e., a string containing
markup with custom template tags) to tokens, which can be either plain text
(TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK).
The Parser() class takes a list ... |
sharad/calibre | refs/heads/master | src/html5lib/serializer/__init__.py | 1731 | from __future__ import absolute_import, division, unicode_literals
from .. import treewalkers
from .htmlserializer import HTMLSerializer
def serialize(input, tree="etree", format="html", encoding=None,
**serializer_opts):
# XXX: Should we cache this?
walker = treewalkers.getTreeWalker(tree)
... |
rversteegen/commandergenius | refs/heads/sdl_android | project/jni/python/src/Lib/idlelib/keybindingDialog.py | 49 | """
Dialog for building Tkinter accelerator key bindings
"""
from Tkinter import *
import tkMessageBox
import string
class GetKeysDialog(Toplevel):
def __init__(self,parent,title,action,currentKeySequences):
"""
action - string, the name of the virtual event these keys will be
mapp... |
diox/amo-validator | refs/heads/master | validator/testcases/__init__.py | 12133432 | |
thor/django-localflavor | refs/heads/master | localflavor/us/__init__.py | 12133432 | |
jackiekazil/python-oauth2 | refs/heads/master | tests/__init__.py | 12133432 | |
colbyga/pychess | refs/heads/master | lib/pychess/Utils/lutils/LBoard.py | 20 | from __future__ import absolute_import
from pychess.compat import PY3
from pychess.Utils.const import *
from pychess.Utils.repr import reprColor
from .ldata import *
from .attack import isAttacked
from .bitboard import *
from .PolyglotHash import *
#####################################################################... |
priyankadeswal/network-address-translator | refs/heads/master | src/csma/bindings/modulegen__gcc_ILP32.py | 28 | 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))
... |
rversteegen/commandergenius | refs/heads/sdl_android | project/jni/python/src/Lib/plat-sunos5/TYPES.py | 75 | # Generated by h2py from /usr/include/sys/types.h
# Included from sys/isa_defs.h
_CHAR_ALIGNMENT = 1
_SHORT_ALIGNMENT = 2
_INT_ALIGNMENT = 4
_LONG_ALIGNMENT = 8
_LONG_LONG_ALIGNMENT = 8
_DOUBLE_ALIGNMENT = 8
_LONG_DOUBLE_ALIGNMENT = 16
_POINTER_ALIGNMENT = 8
_MAX_ALIGNMENT = 16
_ALIGNMENT_REQUIRED = 1
_CHAR_ALIGNMENT ... |
fxtentacle/phantomjs | refs/heads/master | src/breakpad/src/third_party/protobuf/protobuf/examples/list_people.py | 429 | #! /usr/bin/python
# See README.txt for information and build instructions.
import addressbook_pb2
import sys
# Iterates though all people in the AddressBook and prints info about them.
def ListPeople(address_book):
for person in address_book.person:
print "Person ID:", person.id
print " Name:", person.na... |
saturngod/pyWebTest-gitbook | refs/heads/master | book/js/Lib/unittest/__main__.py | 13 | """Main entry point"""
import sys
if sys.argv[0].endswith("__main__.py"):
import os.path
# We change sys.argv[0] to make help message more useful
# use executable without path, unquoted
# (it's just a hint anyway)
# (if you have spaces in your executable you get what you deserve!)
exec... |
wkschwartz/django | refs/heads/stable/3.2.x | tests/migrations/test_migrations_squashed_complex/2_auto.py | 266 | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("migrations", "1_auto")]
operations = [
migrations.RunPython(migrations.RunPython.noop)
]
|
hwine/build-relengapi | refs/heads/master | relengapi/lib/api.py | 3 | # 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/.
from __future__ import absolute_import
import functools
import sys
import traceback
import werkzeug
import wsme
import... |
rob-smallshire/asq | refs/heads/master | asq/examples/mandelbrot.py | 6 | '''A conversion of Jon Skeet's LINQ Mandelbrot from LINQ to asq.
The original can be found at
http://msmvps.com/blogs/jon_skeet/archive/2008/02/26/visualising-the-mandelbrot-set-with-linq-yet-again.aspx
'''
import colorsys
#import Image
from asq.initiators import integers, query
def generate(start, func):
val... |
ewienik/unte | refs/heads/master | tests/unte-ut-update_file.py | 1 | # UT| python2 {src_file}
from __future__ import print_function
# UT[ ../unte.py * update_file
def update_file(path, tags):
tags_db = dict([
[tag['file'], extract_tags(tag['file'])]
for tag in tags['insert']
])
temp_dst = tempfile.TemporaryFile(mode='w+')
compile_file(temp_dst, path, ... |
marratj/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovirt/ovirt_permissions_facts.py | 59 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (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
#... |
srijanmishra/django-facebook | refs/heads/master | django_facebook/auth.py | 2 | from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.backends import ModelBackend
import facebook
class FacebookBackend(ModelBackend):
""" Authenticate a facebook user. """
def authenticate(self, fb_uid=None, fb_graphtoken=None):
""" If we receive a face... |
IllusionRom-deprecated/android_platform_tools_idea | refs/heads/master | python/testData/refactoring/extractmethod/ClassWithoutInit.before.py | 83 | def foo():
<selection>class C(object):
pass
c = C()</selection>
return c |
surajssd/kuma | refs/heads/master | vendor/packages/translate/convert/tiki2po.py | 25 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 Mozilla Corporation, Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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; ... |
xuxiao19910803/edx | refs/heads/master | lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py | 194 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'OfflineComputedGrade'
db.create_table('courseware_offlinecomputedgrade', (
('id'... |
redhat-openstack/python-openstackclient | refs/heads/master-patches | openstackclient/compute/v2/console.py | 1 | # Copyright 2012-2013 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 la... |
bjorncooley/rainforest_makers | refs/heads/master | spirit/views/topic_notification.py | 2 | #-*- coding: utf-8 -*-
import json
from django.views.generic import DetailView, ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.core.urlresolvers import reverse
from django.shortcuts import render, redirect, get_object_or_404
from dja... |
LoadCode/Gedit-Arduino-Plugin | refs/heads/master | arduinoplugin/SerialMonitorWindow.py | 1 | import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GLib
import serial.tools.list_ports
import xml.etree.ElementTree as ET
from . import CustomErrors
from . import utils
import threading
import time
import errno
# ToDo: ****Bandera para desahabilidad la elección de parámetros cuando están... |
MonoHelixLabs/fridge-rpi | refs/heads/master | fridge-api/Adafruit_IO/errors.py | 2 | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... |
delhivery/django | refs/heads/master | tests/migrations/test_deprecated_fields.py | 504 | from django.core.management import call_command
from django.test import override_settings
from .test_base import MigrationTestBase
class Tests(MigrationTestBase):
"""
Deprecated model fields should still be usable in historic migrations.
"""
@override_settings(MIGRATION_MODULES={"migrations": "migrat... |
adrianborkowski/kurs_django | refs/heads/dev | users/migrations/__init__.py | 12133432 | |
wevote/WebAppPublic | refs/heads/master | follow/migrations/__init__.py | 12133432 | |
SDXorg/ANTLR_collection | refs/heads/master | Compiled/__init__.py | 12133432 | |
faratro/django-oscar | refs/heads/master | tests/functional/dashboard/__init__.py | 12133432 | |
tjsavage/full_nonrel_starter | refs/heads/master | django/contrib/gis/tests/layermap/__init__.py | 12133432 | |
CGenie/sorl-thumbnail | refs/heads/master | sorl/thumbnail/admin/__init__.py | 19 | try:
from django.forms import ClearableFileInput
except ImportError:
from .compat import AdminImageMixin
else:
from .current import AdminImageMixin
AdminInlineImageMixin = AdminImageMixin # backwards compatibility
|
puttarajubr/commcare-hq | refs/heads/master | custom/intrahealth/reports/recap_passage_report.py | 2 | from corehq.apps.reports.standard import MonthYearMixin
from custom.intrahealth.filters import RecapPassageLocationFilter, FRMonthFilter, FRYearFilter
from custom.intrahealth.reports.tableu_de_board_report import MultiReport
from custom.intrahealth.sqldata import RecapPassageData, DateSource
from dimagi.utils.decorator... |
napalm-automation/napalm-yang | refs/heads/develop | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/ipv4_interface_address/state/__init__.py | 1 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... |
jhawkesworth/ansible | refs/heads/devel | test/units/modules/network/nxos/test_nxos_interface_ospf.py | 13 | # (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... |
BrainPad/FindYourCandy | refs/heads/master | webapp/tests/__init__.py | 11 | # Copyright 2017 BrainPad Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
albertomurillo/ansible | refs/heads/devel | lib/ansible/modules/cloud/openstack/__init__.py | 12133432 | |
rebstar6/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/py/py/_code/assertion.py | 218 | import sys
import py
BuiltinAssertionError = py.builtin.builtins.AssertionError
_reprcompare = None # if set, will be called by assert reinterp for comparison ops
def _format_explanation(explanation):
"""This formats an explanation
Normally all embedded newlines are escaped, however there are
three exce... |
hghdo/web4beidanci | refs/heads/master | settings.py | 1 | # Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
tigeral/polygon | refs/heads/master | python/code_troopers/Runner.py | 1 | import sys
from MyStrategy import MyStrategy
from RemoteProcessClient import RemoteProcessClient
from model.Move import Move
from time import sleep
class Runner:
def __init__(self):
sleep(4)
if sys.argv.__len__() == 4:
self.remote_process_client = RemoteProcessClient(sys.argv[1], int(s... |
Hao-Liu/avocado-vt | refs/heads/master | virttest/libvirt_xml/devices/channel.py | 30 | """
Classes to support XML for channel devices
http://libvirt.org/formatdomain.html#elementCharSerial
"""
from virttest.libvirt_xml import base
from virttest.libvirt_xml import accessors
from virttest.libvirt_xml.devices.character import CharacterBase
class Channel(CharacterBase):
__slots__ = ('source', 'targe... |
czpython/django-social-auth | refs/heads/master | social_auth/backends/twitter.py | 8 | """
Twitter OAuth support.
This adds support for Twitter OAuth service. An application must
be registered first on twitter and the settings TWITTER_CONSUMER_KEY
and TWITTER_CONSUMER_SECRET must be defined with the corresponding
values.
User screen name is used to generate username.
By default account id is stored in... |
randynobx/ansible | refs/heads/devel | lib/ansible/plugins/action/patch.py | 18 | # (c) 2015, Brian Coca <briancoca+dev@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... |
cms-externals/pyqt | refs/heads/master | examples/graphicsview/anchorlayout.py | 9 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2010 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... |
hagne/atm-py | refs/heads/master | atmPy/clouds/ceilometry.py | 1 | from atmPy.general import timeseries as _timeseries
import matplotlib.pylab as _plt
from matplotlib.colors import LogNorm as _LogNorm
from copy import deepcopy
class Ceilometer(object):
def __init__(self):
self._backscatter = None
self._cloudbase = None
@property
def cloudbase(self):
... |
cprogrammer1994/ModernGL | refs/heads/master | examples/simple_grid.py | 1 | import numpy as np
from pyrr import Matrix44
import moderngl
from ported._example import Example
def grid(size, steps):
u = np.repeat(np.linspace(-size, size, steps), 2)
v = np.tile([-size, size], steps)
w = np.zeros(steps * 2)
return np.concatenate([np.dstack([u, v, w]), np.dstack([v, u, w])])
cla... |
spulec/uncurl | refs/heads/master | tests/test_bin.py | 1 | from mock import patch
import six
from uncurl.bin import main
print_module = "__builtin__.print" if six.PY2 else "uncurl.bin.print"
@patch("uncurl.bin.sys")
@patch(print_module)
def test_main(printer, fake_sys):
fake_sys.argv = ['uncurl', "curl 'https://pypi.python.org/pypi/uncurl' -H 'Accept-Encoding: gzip,defl... |
tumbl3w33d/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_vpc_subnet_info.py | 13 | #!/usr/bin/python
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
... |
Elico-Corp/odoo_OCB | refs/heads/9.0 | addons/payment_buckaroo/models/buckaroo.py | 12 | # -*- coding: utf-'8' "-*-"
from hashlib import sha1
import logging
import urllib
import urlparse
from openerp.addons.payment.models.payment_acquirer import ValidationError
from openerp.addons.payment_buckaroo.controllers.main import BuckarooController
from openerp.osv import osv, fields
from openerp.tools.float_utils... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/250_test_socketserver.py | 2 | # Test suite for SocketServer.py
from test import test_support
from test.test_support import (verbose, verify, TESTFN, TestSkipped,
reap_children)
test_support.requires('network')
from SocketServer import *
import socket
import errno
import select
import time
import threading
import os
... |
munnerz/CouchPotatoServer | refs/heads/master | couchpotato/core/downloaders/qbittorrent_.py | 13 | from base64 import b16encode, b32decode
from hashlib import sha1
from datetime import timedelta
import os
import re
from bencode import bencode, bdecode
from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList
from couchpotato.core.helpers.encoding import sp
from couchpotato.core.helpers.... |
javiercantero/streamlink | refs/heads/master | src/streamlink/plugins/antenna.py | 2 | import re
import json
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, validate
from streamlink.stream import HDSStream
_url_re = re.compile(r"(http(s)?://(\w+\.)?antenna.gr)/webtv/watch\?cid=.+")
_playlist_re = re.compile(r"playlist:\s*\"(/templates/data/jplayer\?cid=[^\"]+)")
_manifest_r... |
tomduijf/home-assistant | refs/heads/master | homeassistant/components/sensor/transmission.py | 10 | """
homeassistant.components.sensor.transmission
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Monitors Transmission BitTorrent client API.
Configuration:
To use the Transmission sensor you will need to add something like the
following to your configuration.yaml file.
sensor:
platform: transmission
name: Transmis... |
thdtjsdn/geonode | refs/heads/master | geonode/security/urls.py | 31 | from django.conf.urls import patterns, url
urlpatterns = patterns('geonode.security.views',
url(r'^permissions/(?P<resource_id>\d+)$', 'resource_permissions', name='resource_permissions'),
url(r'^bulk-permissions/?$', 'set_bulk_permissions', name='bulk_permissions'),
... |
ol-loginov/intellij-community | refs/heads/master | python/testData/quickFixes/PyRemoveStatementQuickFixTest/variable.py | 80 |
def foo(r):
"""
:param r:
:return:
"""
def a():
pass
x<caret> = 1
x = 2 |
drjova/cds-demosite | refs/heads/cdslabs_qa | cds/version.py | 3 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 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
# License, or (at your option) any... |
sesuncedu/sdhash | refs/heads/master | external/tools/build/v2/test/path_features.py | 20 | #!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003, 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
t = BoostBuild.Tester()
t.write("jamroot.jam", "import gcc ... |
anant-dev/django | refs/heads/master | tests/user_commands/management/commands/transaction.py | 553 | from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Say hello."
args = ''
output_transaction = True
def handle(self, *args, **options):
return 'Hello!'
|
joelddiaz/openshift-tools | refs/heads/prod | openshift/installer/vendored/openshift-ansible-3.5.127/roles/lib_utils/src/class/yedit.py | 14 | # flake8: noqa
# pylint: disable=undefined-variable,missing-docstring
# noqa: E301,E302
class YeditException(Exception):
''' Exception class for Yedit '''
pass
# pylint: disable=too-many-public-methods
class Yedit(object):
''' Class to modify yaml files '''
re_valid_key = r"(((\[-?\d+\])|([0-9a-zA-Z... |
mbauskar/frappe | refs/heads/develop | frappe/email/doctype/email_flag_queue/test_email_flag_queue.py | 20 | # -*- 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('Email Flag Queue')
class TestEmailFlagQueue(unittest.TestCase):
pass
|
dakarsenegal/Plugin.Video.best | refs/heads/master | servers/userporn.py | 33 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para userporn
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import os,re
import base64
from core import scrapertools
... |
cindyyu/kuma | refs/heads/master | kuma/core/tests/__init__.py | 15 | from importlib import import_module
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.messages.storage.fallback import FallbackStorage
from django.core.cache import cache
from django import test
from django.test import TestCase, TransactionTestCase
from django.test.cli... |
GoogleCloudPlatform/training-data-analyst | refs/heads/master | courses/machine_learning/deepdive2/end_to_end_ml/solutions/serving/application/lib/oauth2client/contrib/django_util/storage.py | 59 | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
mfherbst/spack | refs/heads/develop | var/spack/repos/builtin.mock/packages/dependency-install/package.py | 5 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
veger/ansible | refs/heads/devel | lib/ansible/modules/network/netscaler/netscaler_servicegroup.py | 57 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Citrix Systems
# 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',
... |
pudo/aleph | refs/heads/master | aleph/migrate/versions/57e9e4ff269b_init_migrations.py | 5 | """init migrations
Revision ID: 57e9e4ff269b
Revises: None
Create Date: 2016-03-03 10:48:05.689514
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '57e9e4ff269b'
down_revision = None
def upgrade():
op.create_table... |
omerhasan/namebench | refs/heads/master | nb_third_party/jinja2/lexer.py | 211 | # -*- coding: utf-8 -*-
"""
jinja2.lexer
~~~~~~~~~~~~
This module implements a Jinja / Python combination lexer. The
`Lexer` class provided by this module is used to do some preprocessing
for Jinja.
On the one hand it filters out invalid operators like the bitshift
operators we don't allow... |
n4hy/gnuradio | refs/heads/master | gr-qtgui/apps/uhd_display.py | 3 | #!/usr/bin/env python
#
# Copyright 2009,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your opt... |
shaform/scrapy | refs/heads/master | scrapy/contrib/spidermiddleware/__init__.py | 12133432 | |
appliedx/edx-platform | refs/heads/master | common/djangoapps/track/backends/tests/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.