repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
piyushroshan/xen-4.3.2 | refs/heads/master | tools/python/xen/util/xsconstants.py | 43 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... |
richpolis/siveinpy | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/langthaimodel.py | 2929 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... |
houssine78/addons | refs/heads/9.0 | website_operational_offices/models/__init__.py | 2 | # -*- coding: utf-8 -*-
from . import res_company
|
dr-strange-strange-love/testselector | refs/heads/master | job_warehouse/vzt-hdd-stress/vzt-hdd-stress-win10x64-el_capitan-plain-splitted-encryption-smp.py | 1 |
class ParamHolder():
def __init__(self):
self.params = {
'build': '3.8.1',
'priority': 'High',
'components': 'QA_auto',
}
def param_complement(self):
# Complement code for self.params
return self.params
|
QuickSander/CouchPotatoServer | refs/heads/master | libs/pyutil/benchutil.py | 92 | # Copyright (c) 2002-2013 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
Benchmark a function for its behavior with respect to N.
How to use this module:
1. Define a function which runs the code that you want to benchmark. The
function takes a single argument which is t... |
knittledan/Location_Search_Prediction | refs/heads/master | thirdParty/amazonproduct/utils.py | 2 | # Copyright (C) 2009-2013 Sebastian Rahlf <basti at redtoad dot de>
#
# This program is release under the BSD License. You can find the full text of
# the license in the LICENSE file.
from ConfigParser import SafeConfigParser
import os
import sys
REQUIRED_KEYS = [
'access_key',
'secret_key',
'... |
Kaezon/allianceauth | refs/heads/master | allianceauth/authentication/management/commands/__init__.py | 12133432 | |
ema/conpaas | refs/heads/master | conpaas-services/src/conpaas/services/htc/manager/__init__.py | 12133432 | |
LohithBlaze/scikit-learn | refs/heads/master | sklearn/linear_model/tests/__init__.py | 12133432 | |
dvliman/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.5/tests/regressiontests/templates/templatetags/custom.py | 51 | import operator
from django import template
from django.template.defaultfilters import stringfilter
from django.template.loader import get_template
from django.utils import six
register = template.Library()
@register.filter
@stringfilter
def trim(value, num):
return value[:num]
@register.simple_tag
def no_param... |
jeyraof/python-social-auth | refs/heads/master | social/tests/backends/test_username.py | 92 | from social.tests.backends.legacy import BaseLegacyTest
class UsernameTest(BaseLegacyTest):
backend_path = 'social.backends.username.UsernameAuth'
expected_username = 'foobar'
response_body = 'username=foobar'
form = """
<form method="post" action="{0}">
<input name="username" type="text">... |
david30907d/feedback_django | refs/heads/master | spirit/core/utils/markdown/renderer.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mistune
from django.conf import settings
from django.utils.html import escape
def sanitize_url(url):
url = escape(url) # & -> & ...
parts = url.split(':', 1)
if len(parts) == 1: # No protocol (relative url)
return url... |
TheArchives/Nexus | refs/heads/master | core/entities/paintballgun.py | 1 | # The Nexus software is licensed under the BSD 2-Clause license.
#
# You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
#
# http://opensource.org/licenses/bsd-license.php
if world.blockstore.raw_blocks[world.blockstore.get_offset(x,y+1,z)] != '... |
lakshayg/tensorflow | refs/heads/master | tensorflow/python/ops/math_grad_test.py | 22 | # Copyright 2016 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... |
nhicher/ansible | refs/heads/devel | test/units/errors/__init__.py | 12133432 | |
ewjoachim/hoarse | refs/heads/master | hoarse/libs/__init__.py | 12133432 | |
Tan0/ironic | refs/heads/master | tools/states_to_dot.py | 3 | #!/usr/bin/env python
# Copyright (C) 2014 Yahoo! 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... |
mancoast/CPythonPyc_test | refs/heads/master | fail/325_test_platform.py | 54 | import sys
import os
import unittest
import platform
import subprocess
from test import support
class PlatformTest(unittest.TestCase):
def test_architecture(self):
res = platform.architecture()
@support.skip_unless_symlink
def test_architecture_via_symlink(self): # issue3762
# On Windows,... |
vitalyisaev2/flatbuffers | refs/heads/master | tests/MyGame/Example/TestSimpleTableWithEnum.py | 22 | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: Example
import flatbuffers
class TestSimpleTableWithEnum(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsTestSimpleTableWithEnum(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf... |
trishnaguha/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_mysqlfirewallrule.py | 25 | #!/usr/bin/python
#
# Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
DiCarloLab-Delft/PycQED_py3 | refs/heads/develop | pycqed/measurement/openql_experiments/multi_qubit_oql.py | 1 | import numpy as np
import openql.openql as ql
import pycqed.measurement.openql_experiments.openql_helpers as oqh
from pycqed.utilities.general import int2base, suppress_stdout
from os.path import join
from pycqed.instrument_drivers.meta_instrument.LutMans.flux_lutman import _def_lm as _def_lm_flux
def single_flux_puls... |
SOM-st/RTruffleSOM | refs/heads/master | src/som/vm/universe.py | 2 | from rpython.rlib.debug import make_sure_not_resized
from rpython.rlib.rbigint import rbigint
from rpython.rlib.rrandom import Random
from rpython.rlib import jit
from som.interp_type import is_ast_interpreter
if is_ast_interpreter():
from som.vmobjects.object_with_layout import ObjectWithLayout as Object
else:
... |
herove/dotfiles | refs/heads/master | sublime/Packages/SublimeLinter/sublimelinter/modules/puppet.py | 5 | import re
from base_linter import BaseLinter, INPUT_METHOD_TEMP_FILE
CONFIG = {
'language': 'Puppet',
'executable': 'puppet',
'lint_args': ['parser', 'validate', '--color=false', '{filename}'],
'test_existence_args': '-V',
'input_method': INPUT_METHOD_TEMP_FILE
}
class Linter(BaseLinter):
de... |
mohittahiliani/adaptive-RED-ns3 | refs/heads/master | waf-tools/relocation.py | 78 | #! /usr/bin/env python
# encoding: utf-8
"""
Waf 1.6
Try to detect if the project directory was relocated, and if it was,
change the node representing the project directory. Just call:
waf configure build
Note that if the project directory name changes, the signatures for the tasks using
files in that directory wi... |
AlanZatarain/pacupdate | refs/heads/master | src/pacupdate/__init__.py | 12133432 | |
HybridF5/jacket | refs/heads/master | jacket/common/compute/__init__.py | 12133432 | |
foolcage/foolcage | refs/heads/master | foolspider/foolspider/cmds/__init__.py | 12133432 | |
sodafree/backend | refs/heads/master | tests/regressiontests/localflavor/co/__init__.py | 12133432 | |
ingokegel/intellij-community | refs/heads/master | python/testData/packaging/PyPackageUtil/AbsentSetupCallUpdating/setup.py | 70 | from distutils.core import setup |
linea-it/qlf | refs/heads/master | backend/framework/qlf/dashboard/migrations/0008_processcomment.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-06-12 20:06
from __future__ import unicode_literals
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swa... |
itandt/unisportr | refs/heads/master | temp/sitemapgenerator/sitemap_gen.py | 9 | #!/usr/bin/env python
#
# Copyright (c) 2004, 2005 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, th... |
hexlism/xx_net | refs/heads/master | python27/1.0/lib/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... |
ar45/django | refs/heads/master | tests/context_processors/views.py | 346 | from django.shortcuts import render
from .models import DebugObject
def request_processor(request):
return render(request, 'context_processors/request_attrs.html')
def debug_processor(request):
context = {'debug_objects': DebugObject.objects}
return render(request, 'context_processors/debug.html', cont... |
dmarteau/QGIS | refs/heads/master | tests/src/python/test_qgsstringstatisticalsummary.py | 30 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsStringStatisticalSummary.
.. note:: 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 ve... |
Imvoo/MiniZinc-server | refs/heads/master | server.py | 1 | #imports
import pymzn
import os
import re
import tempfile
import shutil
import time
from threading import Thread
from eventlet.green import subprocess
from flask import Flask, json, Response, request, render_template
from flask_socketio import SocketIO, emit
import eventlet
eventlet.monkey_patch(all=True)
#setup
app ... |
BorgERP/borg-erp-6of3 | refs/heads/master | addons/hr_contract/hr_contract.py | 9 | # -*- 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... |
jcpowermac/ansible-modules-extras | refs/heads/devel | database/__init__.py | 12133432 | |
digimarc/django | refs/heads/master | tests/migrations/test_migrations_squashed_complex/__init__.py | 12133432 | |
MeGotsThis/BotGotsThis | refs/heads/master | tests/cache/__init__.py | 12133432 | |
iNecas/katello | refs/heads/master | cli/test/katello/tests/utils/__init__.py | 12133432 | |
912/M-new | refs/heads/master | virtualenvironment/experimental/lib/python2.7/site-packages/django/contrib/gis/tests/__init__.py | 12133432 | |
kkreis/espressopp | refs/heads/master | src/interaction/AngularUniqueCosineSquared.py | 5 | # Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... |
nju520/portia | refs/heads/master | slybot/slybot/tests/test_baseurl.py | 24 | """
Tests for apply_annotations
"""
from unittest import TestCase
from slybot.baseurl import insert_base_url, get_base_url
from scrapely.htmlpage import HtmlPage
class TestApplyAnnotations(TestCase):
def test_insert_base_relative(self):
"""Replace relative base href"""
html_in = '<html><head><base... |
Nashenas88/servo | refs/heads/master | tests/wpt/web-platform-tests/websockets/handlers/echo_close_data_wsh.py | 258 | #!/usr/bin/python
from mod_pywebsocket import msgutil
_GOODBYE_MESSAGE = u'Goodbye'
def web_socket_do_extra_handshake(request):
# This example handler accepts any request. See origin_check_wsh.py for how
# to reject access from untrusted scripts based on origin value.
pass # Always accept.
def web_soc... |
rixrix/servo | refs/heads/master | tests/wpt/harness/wptrunner/config.py | 196 | # 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/.
import ConfigParser
import os
import sys
from collections import OrderedDict
here = os.path.split(__file__)[0]
class C... |
Workday/OpenFrame | refs/heads/master | native_client_sdk/src/build_tools/sdk_tools/third_party/__init__.py | 175 | # Copyright (c) 2012 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.
"""Third-party sdk tools packages."""
|
savoirfairelinux/sous-chef | refs/heads/dev | src/note/migrations/0010_auto_20170313_1442.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-13 18:42
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('note', '0009_auto_20170116... |
flisky/django-guardian | refs/heads/devel | guardian/testapp/tests/shortcuts_test.py | 12 | from __future__ import unicode_literals
from django.contrib.auth.models import AnonymousUser
from django.contrib.contenttypes.models import ContentType
from django.db.models.query import QuerySet
from django.test import TestCase
from guardian.shortcuts import get_perms_for_model
from guardian.core import ObjectPermis... |
madscatt/sasmol | refs/heads/master | src/python/test_sasmol/test_sascalc/test_unit_sascalc_Prop_calcrmsd.py | 1 | '''
SASMOL: Copyright (C) 2011 Joseph E. Curtis, Ph.D.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... |
louyihua/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/mongo/__init__.py | 268 | """
Provide names as exported by older mongo.py module
"""
from xmodule.modulestore.mongo.base import MongoModuleStore, MongoKeyValueStore
# Backwards compatibility for prod systems that refererence
# xmodule.modulestore.mongo.DraftMongoModuleStore
from xmodule.modulestore.mongo.draft import DraftModuleStore as Draft... |
msegado/edx-platform | refs/heads/master | common/djangoapps/django_comment_common/signals.py | 101 | # pylint: disable=invalid-name
"""Signals related to the comments service."""
from django.dispatch import Signal
thread_created = Signal(providing_args=['user', 'post'])
thread_edited = Signal(providing_args=['user', 'post'])
thread_voted = Signal(providing_args=['user', 'post'])
thread_deleted = Signal(providing_ar... |
sharifelguindi/qatrackplus | refs/heads/master | qatrack/data_tables/views.py | 1 | import json
import urllib
from django.db.models import Q
from django.http import HttpResponse
from django.views.generic import ListView
#============================================================================
class BaseDataTablesDataSource(ListView):
"""This view serves a page with a pre-rendered data tabl... |
salguarnieri/intellij-community | refs/heads/master | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_methodattrs.py | 326 | """Fix bound method attributes (method.im_? -> method.__?__).
"""
# Author: Christian Heimes
# Local imports
from .. import fixer_base
from ..fixer_util import Name
MAP = {
"im_func" : "__func__",
"im_self" : "__self__",
"im_class" : "__self__.__class__"
}
class FixMethodattrs(fixer_base.BaseFix):
... |
weigj/django-multidb | refs/heads/master | tests/regressiontests/admin_scripts/management/commands/__init__.py | 12133432 | |
jtyr/ansible-modules-extras | refs/heads/devel | storage/__init__.py | 12133432 | |
gannetson/django | refs/heads/master | tests/delete_regress/__init__.py | 12133432 | |
XiaosongWei/crosswalk-test-suite | refs/heads/master | webapi/tct-csp-w3c-tests/csp-py/csp_plugin-types_blocked-manual.py | 30 | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
_CSP = "plugin-types image/jp... |
totallybradical/temp_servo2 | refs/heads/master | tests/wpt/web-platform-tests/tools/py/testing/process/test_cmdexec.py | 163 | import py
from py.process import cmdexec
def exvalue():
return py.std.sys.exc_info()[1]
class Test_exec_cmd:
def test_simple(self):
out = cmdexec('echo hallo')
assert out.strip() == 'hallo'
assert py.builtin._istext(out)
def test_simple_newline(self):
import sys
ou... |
Endika/django | refs/heads/master | django/contrib/sitemaps/apps.py | 590 | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class SiteMapsConfig(AppConfig):
name = 'django.contrib.sitemaps'
verbose_name = _("Site Maps")
|
Osmose/kitsune | refs/heads/master | kitsune/kbadge/badges.py | 22 | from django.conf import settings
from django.dispatch import receiver
from badger.signals import badge_was_awarded
from kitsune.kbadge.tasks import send_award_notification
@receiver(badge_was_awarded)
def notify_award_recipient(sender, award, **kwargs):
"""Notifies award recipient that he/she has an award!"""
... |
mariusbaumann/pyload | refs/heads/stable | module/plugins/hooks/LinkdecrypterCom.py | 1 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.MultiHook import MultiHook
class LinkdecrypterCom(MultiHook):
__name__ = "LinkdecrypterCom"
__type__ = "hook"
__version__ = "1.00"
__config__ = [("mode" , "all;listed;unlisted", "Use for crypters (if supported)" ... |
uni-peter-zheng/tp-libvirt | refs/heads/master | libguestfs/tests/guestfish_augeas.py | 7 | """
This file is used to run autotest cases related to augeas
"""
import re
import logging
from autotest.client.shared import error
from virttest import utils_test
def prepare_image(params):
"""
1) Create a image
2) Create file system on the image
"""
params["image_path"] = utils_test.libguestfs.... |
dspeyer/pithos | refs/heads/master | pithos/plugins/screensaver_pause.py | 5 | # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*-
### BEGIN LICENSE
# Copyright (C) 2010-2012 Kevin Mehall <km@kevinmehall.net>
#This program is free software: you can redistribute it and/or modify it
#under the terms of the GNU General Public License version 3, as published
#by the Free Software Foundation... |
djgagne/scikit-learn | refs/heads/master | examples/linear_model/plot_logistic_l1_l2_sparsity.py | 384 | """
==============================================
L1 Penalty and Sparsity in Logistic Regression
==============================================
Comparison of the sparsity (percentage of zero coefficients) of solutions when
L1 and L2 penalty are used for different values of C. We can see that large
values of C give mo... |
bunnyitvn/webptn | refs/heads/master | django/contrib/webdesign/lorem_ipsum.py | 230 | """
Utility functions for generating "lorem ipsum" Latin text.
"""
from __future__ import unicode_literals
import random
COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco ... |
glencoates/django-tastypie | refs/heads/master | tests/core/tests/utils.py | 18 | from django.http import HttpRequest
from django.test import TestCase
from tastypie.serializers import Serializer
from tastypie.utils.mime import determine_format, build_content_type
class MimeTestCase(TestCase):
def test_build_content_type(self):
self.assertEqual(build_content_type('application/json'), 'a... |
playfulgod/kernel-M865 | refs/heads/master | tools/perf/scripts/python/check-perf-trace.py | 948 | # perf trace event handlers, generated by perf trace -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. Ba... |
fastavro/fastavro | refs/heads/master | fastavro/io/json_encoder.py | 1 | import json
from .parser import Parser
from .symbols import (
Root,
Boolean,
Int,
RecordStart,
RecordEnd,
FieldStart,
FieldEnd,
Null,
String,
Union,
UnionEnd,
Long,
Float,
Double,
Bytes,
MapStart,
MapEnd,
MapKeyMarker,
Enum,
Fixed,
Arr... |
DreamerKing/LightweightHtmlWidgets | refs/heads/master | LightweightHtmlWidgets/bin/Debug/Ipy.Lib/lib2to3/fixes/fix_methodattrs.py | 326 | """Fix bound method attributes (method.im_? -> method.__?__).
"""
# Author: Christian Heimes
# Local imports
from .. import fixer_base
from ..fixer_util import Name
MAP = {
"im_func" : "__func__",
"im_self" : "__self__",
"im_class" : "__self__.__class__"
}
class FixMethodattrs(fixer_base.BaseFix):
... |
memtoko/django | refs/heads/master | tests/m2m_regress/models.py | 63 | from django.contrib.auth import models as auth
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
# No related name is needed here, since symmetrical relations are not
# explicitly reversible.
@python_2_unicode_compatible
class SelfRefer(models.Model):
name = models.CharFie... |
crodrigues96/mtasa-blue | refs/heads/master | vendor/google-breakpad/src/tools/gyp/test/win/gyptest-link-force-symbol-reference.py | 237 | #!/usr/bin/env python
# Copyright (c) 2013 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.
"""
Make sure ForceSymbolReference is translated properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.Tes... |
zdary/intellij-community | refs/heads/master | python/testData/completion/dunderPrepare.after.py | 18 | class A:
@classmethod
def __prepare__(metacls, name, bases):
class B:
@classmethod
def __prepare__(metacls, name, bases):
class C:
@classmethod
@decorator
def __prepare__(metacls, name, bases):
|
reinout/django | refs/heads/master | django/contrib/flatpages/migrations/__init__.py | 12133432 | |
rajendrakrp/GeoMicroFormat | refs/heads/master | django/conf/locale/sr/__init__.py | 12133432 | |
Steffo99/royal-bot | refs/heads/master | bot.py | 1 | # -*- coding: utf-8 -*-
import json
import time
import filemanager
import telegram
import steam
import random
import osu
import lol
import discord
import subprocess
import sm.steammatch as steammatch
import db
import cairosvg
# Elenco di username dei membri della RYG
royalgames = json.loads(filemanager.readfile("db.js... |
eBay/restcommander | refs/heads/master | play-1.2.4/python/Lib/site-packages/Rpyc/Connection.py | 4 | import sys
from Boxing import Box, dump_exception, load_exception
from ModuleNetProxy import RootImporter
from Lib import raise_exception, AttrFrontend
FRAME_REQUEST = 1
FRAME_RESULT = 2
FRAME_EXCEPTION = 3
class Connection(object):
"""
the rpyc connection layer (protocol and APIs). generally speaking, the o... |
EmadMokhtar/Django | refs/heads/master | tests/shortcuts/urls.py | 60 | from django.urls import path
from . import views
urlpatterns = [
path('render/', views.render_view),
path('render/multiple_templates/', views.render_view_with_multiple_templates),
path('render/content_type/', views.render_view_with_content_type),
path('render/status/', views.render_view_with_status),
... |
zangruizhe/YouCompleteMe_install_for_centos_6.6 | refs/heads/master | third_party/pythonfutures/concurrent/futures/process.py | 196 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... |
trnewman/VT-USRP-daughterboard-drivers | refs/heads/master | gr-trellis/src/examples/test_sccc_soft.py | 8 | #!/usr/bin/env python
from gnuradio import gr
from gnuradio import audio
from gnuradio import trellis
from gnuradio import eng_notation
import math
import sys
import random
import fsm_utils
def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
# TX... |
HKuz/Test_Code | refs/heads/master | LinearAlgebra/vectorTest.py | 1 | #!/usr/local/bin/Python3
from vector import Vector
def main():
test_operators = False
test_mag_and_norm = False
test_dot_and_angles = False
test_parallel_orthogonal = False
test_vector_projection = False
test_cross_product = True
test_errors = False # Includes examples to deliberately thr... |
sysbot/CouchPotatoServer | refs/heads/master | libs/enzyme/flv.py | 180 | # -*- coding: utf-8 -*-
# enzyme - Video metadata parser
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
# Copyright 2003-2006 Dirk Meyer <dischi@freevo.org>
#
# This file is part of enzyme.
#
# enzyme is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public Lice... |
dednal/chromium.src | refs/heads/nw12 | chrome/common/extensions/docs/examples/apps/hello-python/httplib2/iri2uri.py | 885 | """
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... |
OstapHEP/ostap | refs/heads/master | ostap/parallel/parallel_project.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file ostap/parallel/parallel_project.py
# Paralllel "project" from loooong chain/trees objects
# @author Vanya BELYAEV Ivan.Belyaev@itep.ru
# @date 2014-09-23
# =====================... |
rwl/muntjac | refs/heads/master | muntjac/test/server/data/util/filter/__init__.py | 12133432 | |
renyi533/tensorflow | refs/heads/master | tensorflow/compiler/xla/python/__init__.py | 12133432 | |
redhat-openstack/horizon | refs/heads/mitaka-patches | openstack_dashboard/contrib/developer/theme_preview/tests.py | 13 | # Copyright 2015 Cisco Systems, 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 o... |
foxbenjaminfox/deckofcards | refs/heads/master | deck/urls.py | 2 | from django.conf.urls import patterns, url
urlpatterns = patterns('',
url(r'^new/$', 'deck.views.new_deck', name='new_deck_d'), #a week in and I am already deprecating things...
url(r'^shuffle/$', 'deck.views.shuffle', name='shuffle_d'), #deprecated - May 18, 2015
url(r'^shuffle/(?P<key>\w+)/$', 'deck.view... |
merlink01/toxxmlrpc | refs/heads/master | toxxmlrpc/tox_xmlrpc_client.py | 1 | import toxclient
import threading
import xmlrpclib
import time
import sys
import logging
logger = logging.getLogger('Toxxmlrpc_Client')
class _Method:
# some magic to bind an XML-RPC method to an RPC server.
# supports "nested" methods (e.g. examples.getStateName)
def __init__(self, send, name):
se... |
rishirajsinghjhelumi/Entity-Mining | refs/heads/master | imdb/parser/sql/alchemyadapter.py | 57 | """
parser.sql.alchemyadapter module (imdb.parser.sql package).
This module adapts the SQLAlchemy ORM to the internal mechanism.
Copyright 2008-2010 Davide Alberani <da@erlug.linux.it>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... |
chrisrossx/DotStar_Emulator | refs/heads/master | DotStar_Emulator/emulator/utils.py | 1 | import os
import math
import pygame
from .vector2 import Vector2
MEDIA_PATH = os.path.join(os.path.dirname(__file__), 'media')
def blend_color(color1, color2, blend_ratio):
"""
Blend two colors together given the blend_ration
:param color1: pygame.Color
:param color2: pygame.Color
:param blend... |
oren88/vasputil | refs/heads/master | vasputil/tests/test_dos.py | 1 | # -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8
# Copyright (c) 2008, 2010 Janne Blomqvist
# This source code file is subject to the terms of the MIT (Expat)
# License. See the file LICENSE for details.
"""This module contains unit tests for the vasputil.dos module."""
import unittest
import vasputil.dos as d... |
KamalAwasthi/FullContact | refs/heads/master | myvenv/lib/python3.4/site-packages/pip/commands/check.py | 336 | import logging
from pip.basecommand import Command
from pip.operations.check import check_requirements
from pip.utils import get_installed_distributions
logger = logging.getLogger(__name__)
class CheckCommand(Command):
"""Verify installed packages have compatible dependencies."""
name = 'check'
usage =... |
kapari/django-oscar | refs/heads/master | src/oscar/apps/dashboard/offers/views.py | 23 | import datetime
import json
from django.views.generic import ListView, FormView, DeleteView
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext_lazy as ... |
leilihh/novaha | refs/heads/kvm_ha_tmp | nova/scheduler/filters/trusted_filter.py | 13 | # Copyright (c) 2012 Intel, Inc.
# Copyright (c) 2011-2012 OpenStack Foundation
# 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.o... |
ESS-LLP/erpnext | refs/heads/develop | erpnext/education/doctype/student_language/__init__.py | 12133432 | |
synergeticsedx/deployment-wipro | refs/heads/oxa/master.fic | lms/djangoapps/certificates/management/__init__.py | 12133432 | |
dogukantufekci/supersalon | refs/heads/master | supersalon/professionals/migrations/__init__.py | 12133432 | |
coffenbacher/neo4django | refs/heads/master | neo4django/admin/templatetags/__init__.py | 12133432 | |
lizadaly/nanogenmo2015 | refs/heads/master | saga3/saga.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import inspect
import logging
import random
log = logging.getLogger()
DEFAULT_SHERIFF_DELAY = 20
DEFAULT_NUM_BULLETS = 5
DEFAULT_HEALTH = 5
MAX_SCENES = 350 # ~150 words per scene
# Initiatives
HIGH_INITIATIVE = 30
MEDIUM_INITIATIVE = 20
DEFAULT_INITIATIVE = 10
GUN_DAMAGE... |
jdahlin/pygobject | refs/heads/master | tests/runtests-windows.py | 6 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import glob
import unittest
os.environ['PYGTK_USE_GIL_STATE_API'] = ''
sys.path.insert(0, os.path.dirname(__file__))
sys.argv.append('--g-fatal-warnings')
from gi.repository import GObject
GObject.threads_init()
SKIP_FILES = ['runtests',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.