repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
tachang/django-storages | refs/heads/master | examples/cloudfiles_project/photos/__init__.py | 12133432 | |
yasserglez/tagfs | refs/heads/master | packages/tagfs/contrib/django/utils/version.py | 320 | import django
import os.path
import re
def get_svn_revision(path=None):
"""
Returns the SVN revision in the form SVN-XXXX,
where XXXX is the revision number.
Returns SVN-unknown if anything goes wrong, such as an unexpected
format of internal SVN files.
If path is provided, it should be a dir... |
v-iam/azure-sdk-for-python | refs/heads/master | azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/patch_route_filter.py | 2 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
raychorn/knowu | refs/heads/master | django/djangononrelsample2/django/template/response.py | 221 | from django.http import HttpResponse
from django.template import loader, Context, RequestContext
from django.utils import six
class ContentNotRenderedError(Exception):
pass
class SimpleTemplateResponse(HttpResponse):
rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks']
def __in... |
pfmoore/pip | refs/heads/main | tests/lib/filesystem.py | 4 | """Helpers for filesystem-dependent tests.
"""
import os
import socket
import subprocess
import sys
from functools import partial
from itertools import chain
from .path import Path
def make_socket_file(path):
# Socket paths are limited to 108 characters (sometimes less) so we
# chdir before creating it and u... |
blindroot/django | refs/heads/master | tests/gis_tests/geoadmin/urls.py | 573 | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
|
SnabbCo/neutron | refs/heads/master | neutron/plugins/embrane/plugins/embrane_fake_plugin.py | 18 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Embrane, 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/l... |
was4444/chromium.src | refs/heads/nw15 | third_party/markdown/blockparser.py | 109 | # markdown is released under the BSD license
# Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
# Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
# Copyright 2004 Manfred Stienstra (the original version)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or... |
Lekanich/intellij-community | refs/heads/master | python/testData/editing/misplacedElse.py | 83 | def foo():
pass
else<caret>
|
rhattersley/iris | refs/heads/master | lib/iris/palette.py | 13 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... |
ales-erjavec/scipy | refs/heads/master | scipy/optimize/_linprog.py | 29 | """
A top-level linear programming interface. Currently this interface only
solves linear programming problems via the Simplex Method.
.. versionadded:: 0.15.0
Functions
---------
.. autosummary::
:toctree: generated/
linprog
linprog_verbose_callback
linprog_terse_callback
"""
from __future__ import... |
zingale/pyro2 | refs/heads/master | compressible/problems/advect.py | 2 | from __future__ import print_function
import sys
import mesh.patch as patch
import numpy as np
from util import msg
def init_data(my_data, rp):
""" initialize a smooth advection problem for testing convergence """
msg.bold("initializing the advect problem...")
# make sure that we are passed a valid pat... |
rooshilp/CMPUT410W15-project | refs/heads/master | testenv/lib/python2.7/site-packages/PIL/IcnsImagePlugin.py | 26 | #
# The Python Imaging Library.
# $Id$
#
# Mac OS X icns file decoder, based on icns.py by Bob Ippolito.
#
# history:
# 2004-10-09 fl Turned into a PIL plugin; removed 2.3 dependencies.
#
# Copyright (c) 2004 by Bob Ippolito.
# Copyright (c) 2004 by Secret Labs.
# Copyright (c) 2004 by Fredrik Lundh.
# Copyright (c) ... |
sputnick-dev/weboob | refs/heads/master | modules/btdigg/__init__.py | 7 | from .module import BTDiggModule
__all__ = ['BTDiggModule']
|
40223240/2015cdb_w17_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/test/re_tests.py | 879 | #!/usr/bin/env python3
# -*- mode: python -*-
# Re test suite and benchmark suite v1.5
# The 3 possible outcomes for each pattern
[SUCCEED, FAIL, SYNTAX_ERROR] = range(3)
# Benchmark suite (needs expansion)
#
# The benchmark suite does not test correctness, just speed. The
# first element of each tuple is the regex... |
matsumoto-r/synciga | refs/heads/master | src/third_party/yasm/source/patched-yasm/modules/arch/x86/tests/gen-fma-test.py | 28 | #!/usr/bin/env python
def emit(opcode,suffix,width,order,optype):
d = {}
d['opcode']=opcode
d['suffix']=suffix
d['order']=order
if width == 128:
d['op1']= 'xmm1'
d['op2']= 'xmm2'
d['op3']= 'xmm3'
if optype == 'rrr':
d['op3']= 'xmm3'
elif suffix ==... |
holmes/intellij-community | refs/heads/master | python/testData/mover/simpleBlankLines.py | 83 | if a:
a = 1
b =<caret> 2
c = 3 |
ArcherSys/ArcherSys | refs/heads/master | Lib/test/test_source_encoding.py | 1 | <<<<<<< HEAD
<<<<<<< HEAD
# -*- coding: koi8-r -*-
import unittest
from test.support import TESTFN, unlink, unload, rmtree
import importlib
import os
import sys
import subprocess
class SourceEncodingTest(unittest.TestCase):
def test_pep263(self):
self.assertEqual(
"ðÉÔÏÎ".encode("utf-8"),
... |
tiagofrepereira2012/tensorflow | refs/heads/master | tensorflow/contrib/tensor_forest/client/random_forest.py | 1 | # 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... |
xiandiancloud/edx-platform-Y | refs/heads/master | common/djangoapps/student/management/commands/__init__.py | 12133432 | |
incuna/incuna-test-utils | refs/heads/master | incuna_test_utils/management/__init__.py | 12133432 | |
krummler/zxing-ios | refs/heads/master | cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/mwcc.py | 34 | """SCons.Tool.mwcc
Tool-specific initialization for the Metrowerks CodeWarrior compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,... |
flochaz/horizon | refs/heads/stable/juno | openstack_dashboard/dashboards/vledashboard/dashboard.py | 1 | from django.utils.translation import ugettext_lazy as _
import horizon
import openstack_dashboard.dashboards.vledashboard.stacks
class Vledashboard(horizon.Dashboard):
slug = "vledashboard"
name = _("Vledashboard")
panels = (Stacks) # Add your panels here.
default_panel = 'stacks' # Specify the slug... |
google-code-export/tvstreamrecord | refs/heads/master | cherrypy/lib/auth_basic.py | 88 | # This file is part of CherryPy <http://www.cherrypy.org/>
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:expandtab:fileencoding=utf-8
__doc__ = """This module provides a CherryPy 3.x tool which implements
the server-side of HTTP Basic Access Authentication, as described in :rfc:`2617`.
Example usage, using the built-in che... |
getpelican/pelican-plugins | refs/heads/master | share_post/__init__.py | 8 | from .share_post import * # noqa
|
ayeminoo/futuresonic | refs/heads/master | futuresonic-xbmc/plugin.audio.futuresonic/default.py | 4 | '''
FutureSonic XBMC Plugin
Copyright (C) 2013 t0mm0, Madevil
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 ve... |
HybridF5/nova | refs/heads/master | nova/api/openstack/compute/ips.py | 26 | # Copyright 2011 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.org/licenses/LICENSE-2.0
#
# Unless requ... |
xfournet/intellij-community | refs/heads/master | python/testData/resolve/multiFile/namespacePackageImport/p1/m1.py | 819 | def foo():
pass |
cytoscape-ci/service-sample-python | refs/heads/master | app.py | 1 | from flask import Flask
from flask_restful import Api
from registerer import ServiceRegisterer
from services.service_id_mapper import IdMapperService
from services.service_status import ServiceStatus
PORT_NUMBER = 3333
app = Flask(__name__)
api = Api(app)
# Routing
api.add_resource(ServiceStatus, '/') # Simply retu... |
macioosch/dynamo-hard-spheres-sim | refs/heads/master | create_datafiles.py | 1 | #!/usr/bin/env python2
from numpy import linspace
from os import system
for i in linspace(0.1, 1.4, 27):
system("dynamod -m 0 -C 7 -d {0} --i1 0 -r 1 -o config.start.{0:.5f}.xml".format(i))
|
purism/pdak | refs/heads/master | tests/test_multiprocessing.py | 1 | #!/usr/bin/python
from base_test import DakTestCase
from daklib.dakmultiprocessing import DakProcessPool, \
PROC_STATUS_SUCCESS, PROC_STATUS_MISCFAILURE, \
PROC_STATUS_EXCEPTION, PROC_STATUS_SIGNALRAISED
import signal
def async_function(nu... |
pedrito2/moduleSP | refs/heads/master | avancement_possible.py | 1 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Identifier tous les avancements possibles à une date donnée.
Usage: avancement.py [options] [SOURCE]
Arguments:
SOURCE Fichier .csv à traiter. Si rien n'est fourni, utilise google drive.
Options:
-h, --help Montre cette aide
--cis <cis> N... |
mjtamlyn/django | refs/heads/master | django/contrib/sessions/base_session.py | 130 | """
This module allows importing AbstractBaseSession even
when django.contrib.sessions is not in INSTALLED_APPS.
"""
from django.db import models
from django.utils.translation import gettext_lazy as _
class BaseSessionManager(models.Manager):
def encode(self, session_dict):
"""
Return the given se... |
gangadharkadam/stfrappe | refs/heads/develop | frappe/core/doctype/idle_user/idle_user.py | 4 | from __future__ import unicode_literals
import frappe
def get_columns():
return ["User Name:295", "Last Logged on:Date:230","Site Name:395"]
def execute(filters=None):
columns = get_columns()
data = []
dbname=frappe.db.sql("""select site_name from `tabSubAdmin Info` """,as_dict=1)
lst=[]
qry_srt='select name,las... |
ajohnson23/depot_tools | refs/heads/master | third_party/boto/datapipeline/__init__.py | 12133432 | |
Tejal011089/Medsyn2_app | refs/heads/master | stock/report/item_wise_price_list_rate/__init__.py | 12133432 | |
olemis/sqlalchemy | refs/heads/master | test/orm/test_of_type.py | 25 | from sqlalchemy.orm import Session, aliased, with_polymorphic, \
contains_eager, joinedload, subqueryload, relationship,\
subqueryload_all, joinedload_all
from sqlalchemy import and_
from sqlalchemy import testing, exc as sa_exc
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import assert_raise... |
achang97/YouTunes | refs/heads/master | lib/python2.7/site-packages/s3transfer/exceptions.py | 11 | # Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... |
osvalr/odoo | refs/heads/8.0 | openerp/netsvc.py | 220 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2014 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... |
CenterForTheBuiltEnvironment/mave | refs/heads/master | mave/trainers.py | 1 | import numpy as np
import pdb
import estimators
from scipy.stats import randint as sp_randint
from sklearn import cross_validation, svm, grid_search, \
ensemble, neighbors, dummy
class ModelTrainer(object):
def __init__(self,
search_iterations=20,
n_jobs=-1,
... |
JdeRobot/JdeRobot | refs/heads/master | src/drivers/drone/__init__.py | 5 | from camera import *
from cmdvel import *
from extra import *
from pose3d import *
import time
import math
import rospy
import mavros
import threading
from mavros import setpoint as SP
class Drone(threading.Thread):
def __init__(self, topicArming, topicLand, topicTakeOff,topicSetMode, topicVel, topicPose, topicC... |
tlksio/tlksio | refs/heads/develop | env/lib/python3.4/site-packages/whoosh/util/testing.py | 95 | # Copyright 2007 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the... |
wangjun/pyload | refs/heads/stable | module/plugins/crypter/QuickshareCzFolder.py | 3 | # -*- coding: utf-8 -*-
import re
from module.plugins.Crypter import Crypter
class QuickshareCzFolder(Crypter):
__name__ = "QuickshareCzFolder"
__type__ = "crypter"
__pattern__ = r"http://(www\.)?quickshare.cz/slozka-\d+.*"
__version__ = "0.1"
__description__ = """Quickshare.cz Folder Plugin"""
... |
testvidya11/ejrf | refs/heads/master | questionnaire/forms/answers.py | 1 | from django import forms
from django.forms.util import ErrorDict
from django.forms import ModelForm, ModelChoiceField
from django.utils.html import format_html
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
from questionnaire.models import NumericalAnswer, TextAnswer, DateAn... |
TeamTwisted/external_chromium_org | refs/heads/opti-5.1 | native_client_sdk/src/tools/tests/chrome_mock.py | 107 | #!/usr/bin/env python
# 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.
import optparse
import sys
import time
import urllib2
def PrintAndFlush(s):
print s
sys.stdout.flush()
def main(args):
pars... |
leafclick/intellij-community | refs/heads/master | python/testData/completion/matMul.after.py | 79 | class C:
def __matmul__(self, other):
|
gauravbose/digital-menu | refs/heads/master | digimenu2/django/conf/locale/ko/formats.py | 115 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y년 n월 j일'
TIME_FORMAT = 'A g:i'
D... |
AlexanderFabisch/scikit-learn | refs/heads/master | sklearn/externals/joblib/testing.py | 330 | """
Helper for testing.
"""
import sys
import warnings
import os.path
def warnings_to_stdout():
""" Redirect all warnings to stdout.
"""
showwarning_orig = warnings.showwarning
def showwarning(msg, cat, fname, lno, file=None, line=0):
showwarning_orig(msg, cat, os.path.basename(fname), line,... |
sakset/getyourdata | refs/heads/master | getyourdata/data_request/templatetags/__init__.py | 12133432 | |
evernote/pootle | refs/heads/master | pootle/apps/evernote_auth/migrations/__init__.py | 12133432 | |
jymannob/CouchPotatoServer | refs/heads/develop | libs/rsa/_version200.py | 177 | """RSA module
Module for calculating large primes, and RSA encryption, decryption,
signing and verification. Includes generating public and private keys.
WARNING: this implementation does not use random padding, compression of the
cleartext input to prevent repetitions, or other common security improvements.
Use with... |
mxOBS/deb-pkg_trusty_chromium-browser | refs/heads/master | tools/json_schema_compiler/json_schema.py | 81 | # 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.
import copy
import json_parse
def DeleteNodes(item, delete_key=None, matcher=None):
"""Deletes certain nodes in item, recursively. If |delete_key| i... |
watonyweng/nova | refs/heads/master | nova/tests/unit/objects/test_instance_action.py | 52 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
blueskycoco/sq-linux | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
DTUWindEnergy/Python4WindEnergy | refs/heads/master | lesson 7/UnitTesting/fibmodule.py | 1 | """
Functions to compute Fibonacci sequences
"""
import numpy as np
from numpy.testing import assert_allclose
def fib(N):
"""
Compute the first N Fibonacci numbers
Parameters
----------
N : integer
The number of Fibonacci numbers to compute
Returns
-------
x : np.ndarr... |
mbareta/edx-platform-ft | refs/heads/open-release/eucalyptus.master | lms/djangoapps/commerce/tests/__init__.py | 25 | # -*- coding: utf-8 -*-
""" Commerce app tests package. """
import datetime
import json
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase
from django.test.utils import override_settings
from freezegun import freeze_time
import httpretty
import jwt
import mock... |
RafaelOrtiz/EbookReader | refs/heads/master | epubview/jobs.py | 3 | # Copyright 2009 One Laptop Per Child
# Author: Sayamindu Dasgupta <sayamindu@laptop.org>
#
# 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)... |
jelugbo/ddi | refs/heads/master | lms/djangoapps/courseware/management/commands/tests/__init__.py | 12133432 | |
haoxli/crosswalk-test-suite | refs/heads/master | tools/allpairs-plus/metacomm/combinatorics/__init__.py | 12133432 | |
rd37/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/domains/__init__.py | 12133432 | |
sbktechnology/sap_frappe | refs/heads/master | frappe/integrations/__init__.py | 12133432 | |
alazyer/oscar | refs/heads/master | frobshop/oscar/management/commands/oscar_send_alerts.py | 43 | import logging
from django.utils.translation import ugettext_lazy as _
from django.core.management.base import BaseCommand
from oscar.apps.customer.alerts import utils
logger = logging.getLogger(__name__)
class Command(BaseCommand):
"""
Check stock records of products for availability and send out alerts
... |
vipul-sharma20/oh-mainline | refs/heads/master | mysite/profile/migrations/0015_asheesh_make_project_name_unique.py | 17 | # This file is part of OpenHatch.
# Copyright (C) 2009 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... |
leansoft/edx-platform | refs/heads/master | lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py | 188 | # -*- 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):
# Deleting field 'GeneratedCertificate.enabled'
db.delete_column('certificates_generatedcertificate', 'enabl... |
Tejal011089/huntercamp_erpnext | refs/heads/develop | erpnext/projects/doctype/time_log_batch_detail/time_log_batch_detail.py | 65 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class TimeLogBatchDetail(Document):
pass |
idncom/odoo | refs/heads/8.0 | addons/l10n_no/__init__.py | 693 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... |
netgroup-polito/dpdk | refs/heads/directvm2vm_new | tools/dpdk_nic_bind.py | 9 | #! /usr/bin/python
#
# BSD LICENSE
#
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
# 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 sou... |
ecosoft-odoo/odoo | refs/heads/8.0 | addons/warning/__openerp__.py | 261 | # -*- 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... |
snahelou/awx | refs/heads/devel | awx/lib/isolated_callbacks/minimal.py | 2 | # Copyright (c) 2017 Ansible by Red Hat
#
# This file is part of Ansible Tower, but depends on code imported from 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 Li... |
c0710204/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py | 6 | """
General utilities
"""
from collections import namedtuple
from contracts import contract, check
from opaque_keys.edx.locator import BlockUsageLocator
class BlockKey(namedtuple('BlockKey', 'type id')):
__slots__ = ()
@contract(type="string[>0]")
def __new__(cls, type, id):
return super(BlockKe... |
orangeduck/PyAutoC | refs/heads/master | Python27/Lib/msilib/__init__.py | 43 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2005 Martin v. Löwis
# Licensed to PSF under a Contributor Agreement.
from _msi import *
import os, string, re, sys
AMD64 = "AMD64" in sys.version
Itanium = "Itanium" in sys.version
Win64 = AMD64 or Itanium
# Partially taken from Wine
datasizemask= 0x00ff
type_valid= ... |
laayis/yowsup | refs/heads/master | yowsup/layers/protocol_groups/protocolentities/iq_groups_participants_remove.py | 61 | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .iq_groups_participants import ParticipantsGroupsIqProtocolEntity
class RemoveParticipantsIqProtocolEntity(ParticipantsGroupsIqProtocolEntity):
'''
<iq type="set" id="{{id}}" xmlns="w:g2", to="{{group_jid}}">
<remove>
<partici... |
zhjunlang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_importlib/import_/test___loader__.py | 84 | from importlib import machinery
import sys
import types
import unittest
from .. import util
from . import util as import_util
class SpecLoaderMock:
def find_spec(self, fullname, path=None, target=None):
return machinery.ModuleSpec(fullname, self)
def exec_module(self, module):
pass
class ... |
Work4Labs/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/django/conf/locale/pl/__init__.py | 12133432 | |
olasitarska/django | refs/heads/master | django/contrib/gis/tests/gis_migrations/__init__.py | 12133432 | |
throwable-one/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/modeltests/test_client/__init__.py | 12133432 | |
axsauze/eventsfinder | refs/heads/master | djangoappengine/mapreduce/__init__.py | 12133432 | |
prakritish/ansible | refs/heads/devel | test/integration/targets/module_utils/module_utils/qux2/__init__.py | 12133432 | |
tatouzri/twisted_texas_holdem | refs/heads/master | texas_holdem/message/registerUser.py | 12133432 | |
navodissa/python-flask | refs/heads/master | flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py | 12133432 | |
duhzecca/cinder | refs/heads/master | cinder/api/views/__init__.py | 12133432 | |
ozburo/youtube-dl | refs/heads/master | youtube_dl/extractor/drbonanza.py | 50 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
js_to_json,
parse_duration,
unescapeHTML,
)
class DRBonanzaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?dr\.dk/bonanza/[^/]+/\d+/[^/]+/(?P<id>\d+)/(?P<display_id>[^/?#&]+)'
_TEST = {... |
MartinHjelmare/home-assistant | refs/heads/dev | tests/components/automation/test_event.py | 10 | """The tests for the Event automation."""
import pytest
from homeassistant.core import Context
from homeassistant.setup import async_setup_component
import homeassistant.components.automation as automation
from tests.common import mock_component
from tests.components.automation import common
from tests.common import ... |
argv0/cloudstack | refs/heads/master | tools/marvin/marvin/marvinPlugin.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... |
towerjoo/DjangoNotes | refs/heads/master | Django-1.5.1/django/core/management/sql.py | 104 | from __future__ import unicode_literals
import codecs
import os
import re
from django.conf import settings
from django.core.management.base import CommandError
from django.db import models
from django.db.models import get_models
from django.utils._os import upath
def sql_create(app, style, connection):
"Returns... |
jdar/phantomjs-modified | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py | 139 | # Copyright 2012, 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... |
Microvellum/Fluid-Designer | refs/heads/master | win64-vc/2.78/Python/lib/site-packages/pip/_vendor/pkg_resources/__init__.py | 320 | # coding: utf-8
"""
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path opera... |
fafaman/django | refs/heads/master | tests/serializers/tests.py | 61 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import importlib
import json
import re
import unittest
from datetime import datetime
from xml.dom import minidom
from django.core import management, serializers
from django.core.serializers.base import ProgressBar
from django.db import connection, transa... |
JazzeYoung/VeryDeepAutoEncoder | refs/heads/master | pylearn2/pylearn2/datasets/hdf5_deprecated.py | 30 | """
Objects for datasets serialized in HDF5 format (.h5).
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "3-clause BSD"
try:
import h5py
except ImportError:
h5py = None
import numpy as np
from theano.compat.six.moves import xrange
import warnings
from py... |
nmabhi/Webface | refs/heads/master | tests/openface_demo_tests.py | 5 | # OpenFace demo tests.
#
# Copyright 2015-2016 Carnegie Mellon University
#
# 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 require... |
eRestin/Mezz | refs/heads/master | mezzanine/utils/sites.py | 7 |
import os
import sys
from django.contrib.sites.models import Site
from mezzanine.conf import settings
from mezzanine.core.request import current_request
def current_site_id():
"""
Responsible for determining the current ``Site`` instance to use
when retrieving data for any ``SiteRelated`` models. If a ... |
sleepers-anonymous/zscore | refs/heads/master | sleep/migrations/0007_remove_sleepergroup_defunctmembers.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-08-24 06:53
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('sleep', '0006_remove_sleep_sleepcycles'),
]
operations = [
migrations.RemoveField(
... |
rruebner/odoo | refs/heads/master | addons/hr_timesheet/report/__init__.py | 395 | import hr_timesheet_report
|
youdonghai/intellij-community | refs/heads/master | python/testData/intentions/PyConvertToFStringIntentionTest/formatMethodNestedFields3.py | 31 | '{:.{}}'.format(3.1415926, 3) |
salamer/django | refs/heads/master | django/conf/locale/id/formats.py | 504 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j N Y'
DATETIME_FORMAT = "j N Y, ... |
benbox69/pyload | refs/heads/stable | module/plugins/hoster/OronCom.py | 15 | # -*- coding: utf-8 -*-
from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class OronCom(DeadHoster):
__name__ = "OronCom"
__type__ = "hoster"
__version__ = "0.15"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}'
__config__ = [] #@TO... |
mrogers950/origin | refs/heads/master | vendor/github.com/google/certificate-transparency/python/ct/crypto/verify_rsa.py | 24 | from ct.crypto import error
from ct.crypto import pem
from ct.proto import client_pb2
import Crypto.Hash.SHA256
import Crypto.PublicKey.RSA
import Crypto.Signature.PKCS1_v1_5
class RsaVerifier(object):
"""Verifies RSA signatures."""
# The signature algorithm used for this public key.
SIGNATURE_ALGORITHM ... |
hedaoyuan/Paddle | refs/heads/master | python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py | 13 | from paddle.trainer_config_helpers import *
settings(batch_size=100, learning_rate=1e-5)
data = data_layer(name='data', size=3200, height=20, width=10)
spp = spp_layer(
input=data, pyramid_height=2, num_channels=16, pool_type=MaxPooling())
outputs(spp)
|
atul-bhouraskar/django | refs/heads/master | tests/migrations/migrations_test_apps/migrated_app/models.py | 12133432 | |
sorenk/ansible | refs/heads/devel | lib/ansible/modules/network/illumos/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.