repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
siamalekpour/django-reversion | refs/heads/master | src/reversion/south_migrations/0005_auto__add_field_revision_manager_slug.py | 24 | # encoding: 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 field 'Revision.manager_slug'
db.add_column('reversion_revision', 'manager_slug', self.gf('django... |
scottellis/linux-beagleboard | refs/heads/4.1 | tools/perf/util/setup.py | 766 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... |
kdwink/intellij-community | refs/heads/master | python/testData/mover/multiLineSelection10.py | 80 | if True:
<caret><selection> a = 2
b = 3</selection>
|
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/contrib/gis/gdal/raster/const.py | 99 | """
GDAL - Constant definitions
"""
# See http://www.gdal.org/gdal_8h.html#a22e22ce0a55036a96f652765793fb7a4
GDAL_PIXEL_TYPES = {
0: 'GDT_Unknown', # Unknown or unspecified type
1: 'GDT_Byte', # Eight bit unsigned integer
2: 'GDT_UInt16', # Sixteen bit unsigned integer
3: 'GDT_Int16', # Sixteen bit... |
Passtechsoft/TPEAlpGen | refs/heads/master | blender/release/scripts/addons_contrib/ui_splash_tips/__init__.py | 1 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... |
hackshel/metaCollecter | refs/heads/master | src/meta/modules/mod_freebsd_route.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import subprocess
import pprint
import os
class WorkNotFound( Exception ):
"""
Error of No Work Defines
"""
pass
class State( object ):
def __init__( self ,args=None ):
if not args:
pass #添加默认参数信息
else:
... |
saurabh6790/med_lib_test | refs/heads/master | website/doctype/about_us_settings/templates/__init__.py | 12133432 | |
viniciusgama/blog_gae | refs/heads/master | django/contrib/localflavor/jp/__init__.py | 12133432 | |
biomodels/BIOMD0000000148 | refs/heads/master | BIOMD0000000148/model.py | 1 | import os
path = os.path.dirname(os.path.realpath(__file__))
sbmlFilePath = os.path.join(path, 'BIOMD0000000148.xml')
with open(sbmlFilePath,'r') as f:
sbmlString = f.read()
def module_exists(module_name):
try:
__import__(module_name)
except ImportError:
return False
else:
ret... |
dsiganos/git-repo | refs/heads/master | subcmds/version.py | 90 | #
# Copyright (C) 2009 The Android Open Source Project
#
# 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... |
catzilla4/dolphin | refs/heads/master | docs/DSP/prefix_replace.py | 164 | # this can be used to upgrade disassemblies that aren't too annotated.
# won't do very well on the current zelda disasm.
import os
import sys
def GetPrefixLine(l, a):
for s in a:
if s[0:len(l)] == l:
return s
return ""
def GetComment(l):
comment_start = l.find("//")
if comment_start < 0:
comm... |
akarol/cfme_tests | refs/heads/master | cfme/tests/configure/test_default_views_cloud.py | 2 | # -*- coding: utf-8 -*-
import pytest
from cfme import test_requirements
from cfme.cloud.provider import CloudProvider
from cfme.cloud.availability_zone import AvailabilityZone
from cfme.cloud.flavor import Flavor
from cfme.cloud.instance import Instance
from cfme.cloud.instance.image import Image
from cfme.configure.... |
40323226/26 | refs/heads/master | users/a/g4/ag4_40323138.py | 7 | # 各組分別在各自的 .py 程式中建立應用程式 (第1步/總共3步)
from flask import Blueprint, render_template
# 利用 Blueprint建立 ag1, 並且 url 前綴為 /ag1, 並設定 template 存放目錄
ag4_40323138 = Blueprint('ag4_40323138', __name__, url_prefix='/ag4_40323138', template_folder='templates')
# 展示傳回 Brython 程式
@ag4_40323138.route('/4a')
def task1():
outstring... |
mortada/pelican-plugins | refs/heads/master | better_tables/better_tables.py | 57 | # Copyright (c) 2015 Alex Waite
# 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, modify, merge, publish, distribute... |
JohnGriffiths/nipype | refs/heads/master | nipype/workflows/smri/freesurfer/__init__.py | 18 | from .utils import (create_getmask_flow, create_get_stats_flow, create_tessellation_flow)
from .bem import create_bem_flow
from .recon import create_skullstripped_recon_flow
|
rossant/galry | refs/heads/master | examples/dashed.py | 1 | """Dash line example with binary texture."""
from galry import *
import numpy as np
# sin(x) function
x = np.linspace(-10., 10., 1000)
y = np.sin(x)
# to make dashes, we use a 1D texture with B&W colors...
color = np.array(get_color(['k', 'w']))
# and a lookup colormap index with alternating 0 and 1
index = np.zero... |
a11r/grpc | refs/heads/master | src/python/grpcio_tests/tests/unit/beta/_implementations_test.py | 23 | # Copyright 2016, 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... |
damiencalloway/djtut | refs/heads/master | mysite/env/lib/python2.7/site-packages/django/templatetags/tz.py | 114 | from datetime import datetime, tzinfo
try:
import pytz
except ImportError:
pytz = None
from django.template import Node
from django.template import TemplateSyntaxError, Library
from django.utils import six
from django.utils import timezone
register = Library()
# HACK: datetime is an old-style class, create... |
doadin/samsung-kernel-msm7x30-Doadin | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 886 | # Util.py - Python extension for perf trace, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
NSECS_PER_SEC = 1000000000
de... |
ajdawson/iris | refs/heads/master | lib/iris/fileformats/pp.py | 4 | # (C) British Crown Copyright 2010 - 2016, 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... |
resmo/ansible | refs/heads/devel | test/units/modules/network/netscaler/test_netscaler_server.py | 68 |
# Copyright (c) 2017 Citrix Systems
#
# 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.
#
# ... |
grap/OCB | refs/heads/7.0 | addons/document_ftp/wizard/ftp_browse.py | 55 | # -*- 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... |
prrvchr/GContactOOo | refs/heads/master | CloudContactOOo/OAuth2OOo/python/urllib3/util/ssltransport.py | 15 | import io
import socket
import ssl
from urllib3.exceptions import ProxySchemeUnsupported
from urllib3.packages import six
SSL_BLOCKSIZE = 16384
class SSLTransport:
"""
The SSLTransport wraps an existing socket and establishes an SSL connection.
Contrary to Python's implementation of SSLSocket, it allow... |
stephane-martin/salt-debian-packaging | refs/heads/master | salt-2016.3.2/tests/unit/states/rabbitmq_policy_test.py | 2 | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import skipIf, TestCase
from salttesting.mock import (
NO_MOCK,
NO_MOCK_REASON,
MagicMock,
patch
)
fro... |
manasapte/pants | refs/heads/master | testprojects/src/python/plugins/__init__.py | 12133432 | |
jvkops/django | refs/heads/master | tests/inspectdb/__init__.py | 12133432 | |
hackerbot/DjangoDev | refs/heads/master | tests/reverse_lookup/__init__.py | 12133432 | |
karyon/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/migrations/0002_a2.py | 381 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='A2',
fields=[
... |
mattnenterprise/servo | refs/heads/master | tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-mime-type-worker.py | 71 | def main(request, response):
if 'mime' in request.GET:
return (
[('Content-Type', 'application/javascript')],
"importScripts('./mime-type-worker.py?mime={0}');".format(request.GET['mime'])
)
return (
[('Content-Type', 'application/javascript')],
"importScr... |
aeklant/scipy | refs/heads/master | scipy/io/matlab/tests/test_mio.py | 1 | # -*- coding: latin-1 -*-
''' Nose test generators
Need function load / save / roundtrip tests
'''
import os
from collections import OrderedDict
from os.path import join as pjoin, dirname
from glob import glob
from io import BytesIO
from tempfile import mkdtemp
import warnings
import shutil
import gzip
from numpy.t... |
ttm/gmaneLegacy | refs/heads/master | gmaneLegacy/triplifyList.py | 1 | #import time, os, shutil, datetime, re, random, string
#
#import nltk as k
#import rdflib as r
#
#from urllib.parse import quote
#import percolation as P
import datetime, os, shutil
import percolation as P, gmaneLegacy as G
import html.parser
parser=html.parser.HTMLParser()
U=parser.unescape
c=P.check
def makeRepo(li... |
MIREL-UNC/mirel-scripts | refs/heads/master | preprocess/22_add_high_level_classes.py | 1 | """Add the high level classes (person/organization/etc.) to a label file."""
import argparse
import pickle
from tqdm import tqdm
def read_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('--labels_file',
type=unicode,
help='Pickled file with... |
jmerkow/ITK | refs/heads/master | Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/txt2xml.py | 11 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re,os
"""
GEMS
This parser parse a table formatted like this:
Attribute Name Tag VR VM
"""
class TextParser:
def __init__(self, inputfilename, outputfilename):
self._InputFilename = ''
self._OutputFilename = ''
def Parse(self):
infile = file(inputfi... |
jinankjain/zamboni | refs/heads/master | apps/tags/admin.py | 27 | from django.contrib import admin
from .models import Tag
class TagAdmin(admin.ModelAdmin):
list_display = ('tag_text', 'popularity', 'created', 'blacklisted')
list_editable = ('blacklisted',)
list_filter = ('blacklisted',)
ordering = ('-created',)
search_fields = ('^tag_text',)
admin.site.regis... |
Kagami/kisa | refs/heads/master | lib/twisted/scripts/_twistd_unix.py | 1 | # -*- test-case-name: twisted.test.test_twistd -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import os, errno, sys
from twisted.python import log, syslog, logfile, usage
from twisted.python.util import switchUID, uidFromString, gidFromString
from twisted.application import app, service
f... |
gauravbose/digital-menu | refs/heads/master | digimenu2/django/core/management/commands/startproject.py | 503 | from importlib import import_module
from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
from django.utils.crypto import get_random_string
class Command(TemplateCommand):
help = ("Creates a Django project directory structure for the given "
... |
shwinpiocess/mongo | refs/heads/master | requests/packages/urllib3/fields.py | 200 | from __future__ import absolute_import
import email.utils
import mimetypes
from .packages import six
def guess_content_type(filename, default='application/octet-stream'):
"""
Guess the "Content-Type" of a file.
:param filename:
The filename to guess the "Content-Type" of using :mod:`mimetypes`.
... |
edgarRd/incubator-airflow | refs/heads/master | airflow/example_dags/example_kubernetes_operator.py | 3 | # -*- coding: utf-8 -*-
#
# 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
#... |
zofuthan/edx-platform | refs/heads/master | common/djangoapps/student/forms.py | 46 | """
Utility functions for validating forms
"""
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from django.contrib.auth.forms import PasswordResetForm
from django.contrib.auth.hashers import UNUSABLE_PASSWORD
from django.contrib.auth.tokens import ... |
Jai-Chaudhary/termite-data-server | refs/heads/master | web2py/gluon/contrib/plural_rules/sk.py | 44 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# Plural-Forms for sk (Slovak (Slovakia))
nplurals=3 # Slovak language has 3 forms:
# 1 singular and 2 plurals
# Determine plural_id for number *n* as sequence of positive
# integers: 0,1,...
# NOTE! For singular form ALWAYS return plural_id = 0
get_plural_id = ... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/210_test_longexp.py | 7 | REPS = 65580
l = eval("[" + "2," * REPS + "]")
print len(l)
|
anthrotype/freetype-py | refs/heads/master | examples/sfnt-names.py | 4 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
#
# FreeType high-level python API - Copyright 2011-2015 Nicolas P. Rougier
# Distributed under the terms of the new BSD license.
#
# ----------------------------------------------------------... |
flashbuckets/tera | refs/heads/master | example/docker/hdfs.py | 19 | import time
class Hdfs:
def __init__(self, ip, mode, log_prefix):
self.ip = ip
self.mode = mode
self.path = self.get_log_path(log_prefix)
def get_log_path(self, log_prefix):
path = '{pre}/hdfs/{ip}-{mode}-{time}'.format(pre=log_prefix, ip=self.ip, mode=self.mode, time=time.strftime('%Y%m%d%H%M%S'))
return... |
rizumu/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/migrations/0004_a4.py | 381 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0003_a3'),
]
operations = [
migrations.CreateModel(
name='A4',
fields=[
... |
bridadan/yotta | refs/heads/master | yotta/lib/sourceparse.py | 1 | # Copyright 2014 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# Utilities for parsing version source URLs, and determining how the
# specified version should be fetched.
# standard library modules, , ,
try:
from urlparse import urlsplit
except ImportError:
fro... |
Zanzibar82/script.module.urlresolver | refs/heads/master | lib/urlresolver/plugins/promptfile.py | 1 | '''
urlresolver XBMC Addon
Copyright (C) 2013 Bstrdsmkr
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.
This program is distri... |
hoevenvd/weewx_poller | refs/heads/master | bin/weewx/wxengine.py | 1 | #
# Copyright (c) 2009, 2010, 2012 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
# $Revision: 1172 $
# $Author: tkeffer $
# $Date: 2013-04-15 08:50:25 -0700 (Mon, 15 Apr 2013) $
#
"""Main engine for the weewx weather system."""
# Python imports
import Queue
import ... |
noironetworks/networking-cisco | refs/heads/master | networking_cisco/tests/unit/saf/server/services/firewall/__init__.py | 12133432 | |
GkAntonius/pyatompaw | refs/heads/master | pyatompaw/tests/__init__.py | 12133432 | |
nfcpy/ndeftool | refs/heads/master | src/ndeftool/commands/__init__.py | 12133432 | |
Vizzuality/mapnik-tiles-generator | refs/heads/master | app/polytiles.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# this file is based on generate_tiles_multiprocess.py
# run it without arguments to see options list
import mapnik
import sys, os, getpass, argparse
import multiprocessing
from math import pi,cos,sin,log,exp,atan
from subprocess import call
from shapely.geometry import Polyg... |
abdoosh00/edraak | refs/heads/master | common/djangoapps/monitoring/startup.py | 40 | # Register signal handlers
import signals
import exceptions |
zero-rp/miniblink49 | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py | 50 | # Copyright (c) 2010, 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... |
pyecs/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/__init__.py | 552 | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
enroncoin/EnronCoin | refs/heads/master | contrib/wallettools/walletchangepass.py | 71 | from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:8372")
pwd = raw_input("Enter old wallet passphrase: ")
pwd2 = raw_input("Enter new wallet passphrase: ")
access.walletpassphrasechange(pwd, pwd2) |
chromium/chromium | refs/heads/master | third_party/android_deps/libs/com_google_auto_value_auto_value_annotations/3pp/fetch.py | 6 | #!/usr/bin/env python
# Copyright 2021 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.
# This is generated, do not edit. Update BuildConfigGenerator.groovy and
# 3ppFetch.template instead.
from __future__ import print_fun... |
woggle/mesos-old | refs/heads/trunk | frameworks/hadoop-0.20.2/src/contrib/hod/testing/testRingmasterRPCs.py | 182 | #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 use thi... |
gangadharkadam/smrterp | refs/heads/develop | erpnext/utilities/doctype/rename_tool/__init__.py | 12133432 | |
izonder/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/conf/locale/cy/__init__.py | 12133432 | |
chrissmejia/jsConfirm | refs/heads/master | djangodemo/home/__init__.py | 12133432 | |
dan1/horizon-proto | refs/heads/master | openstack_dashboard/test/integration_tests/pages/project/compute/__init__.py | 12133432 | |
PiDistrict/pikitchen_server | refs/heads/master | pikitchen_server/__init__.py | 12133432 | |
mivanov/localwiki_splash | refs/heads/master | polls/views.py | 1 | from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.template import RequestContext
from polls.models import Choice, Poll, Token, Vote, WriteInChoice
def display_poll(request, poll, token=N... |
iamahuman/angr | refs/heads/master | angr/knowledge_plugins/cfg/indirect_jump.py | 2 |
from ...serializable import Serializable
class IndirectJump(Serializable):
__slots__ = ("addr", "ins_addr", "func_addr", "jumpkind", "stmt_idx", "resolved_targets", "jumptable",
"jumptable_addr", "jumptable_size", "jumptable_entry_size", "jumptable_entries", )
def __init__(self, addr, ins_... |
sqvarfort/Coherent-states-Fisher-information | refs/heads/master | code/RKF45.py | 1 | """
RKF45 HPC version to be run on the Legion cluster
--------------------------------------------------
Changes:
- The state and the Fisher information will be computed at the same time.
"""
from numpy import *
from qutip import *
import matplotlib.pyplot as plt
import time
def RKF45(f, t0, tf, initial_statevec, tol... |
abhishek-ch/hue | refs/heads/master | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/draw.py | 93 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# This library 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 2.1 of the License, or (at you... |
cluckmaster/MissionPlanner | refs/heads/master | Lib/site-packages/scipy/optimize/tests/test_zeros.py | 51 | #!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe"
from math import sqrt
from numpy.testing import TestCase, assert_almost_equal, assert_warns, \
assert_, run_module_suite
from scipy.optimize import zeros as cc
# Import testing parameters... |
rajeevsingh717/ThinkStats2 | refs/heads/master | code/regression.py | 62 | """This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import math
import pandas
import random
import numpy as np
import statsmode... |
ASCrookes/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, ... |
ceph/samba | refs/heads/ceph | buildtools/wafsamba/samba3.py | 8 | # a waf tool to add autoconf-like macros to the configure section
# and for SAMBA_ macros for building libraries, binaries etc
import Options, Build, os
from samba_utils import os_path_relpath, TO_LIST, samba_add_onoff_option
from samba_autoconf import library_flags
Options.Handler.SAMBA3_ADD_OPTION = samba_add_onoff... |
richardcs/ansible | refs/heads/devel | lib/ansible/executor/task_result.py | 40 | # Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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
from ansible import constants as C
from ansible.parsing.dataloader... |
naoa/groonga | refs/heads/master | doc/source/textile.py | 9 | # -*- coding: utf-8 -*-
"""
source.textile
~~~~~~~~~~~~~~
Textile Sphinx builder.
Derived from Sphinx's plain-text sphinx builder.
NOTE: NOT COMPLETED YET.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
Copyright 2011 by Kouhei Sutou.
:license: BSD, see ... |
uqtimes/Cocos2d-x_Study_20140127 | refs/heads/master | Cocos2d-x_3D/cocos2d/plugin/tools/toolsForGame/modifyManifest.py | 263 | import sys, string, os
from xml.etree import ElementTree as ET
manifestFile = sys.argv[1]
pluginStr = sys.argv[2]
pluginsDir = sys.argv[3]
androidNS = 'http://schemas.android.com/apk/res/android'
sourceCfgFile = '/android/ForManifest.xml'
def doModify(sourceFile, root):
bRet = False
sourceTree = ET.parse(sou... |
JohnUrban/fast5tools | refs/heads/master | bin/fast5toModelinfo.py | 1 | #!/usr/bin/env python2.7
import h5py, os, sys
import cStringIO as StringIO
from Bio import SeqIO
from fast5tools.f5class import *
from fast5tools.f5ops import *
import argparse
from glob import glob
#################################################
## Argument Parser
#################################################... |
jbassen/edx-platform | refs/heads/master | lms/djangoapps/course_wiki/plugins/markdownedx/mdx_circuit.py | 158 | #!/usr/bin/env python
'''
Image Circuit Extension for Python-Markdown
======================================
Any single line beginning with circuit-schematic: and followed by data (which should be json data, but this
is not enforced at this level) will be displayed as a circuit schematic. This is simply an input elem... |
archhurd/archweb | refs/heads/master | releng/migrations/__init__.py | 12133432 | |
chand3040/cloud_that | refs/heads/named-release/cypress.rc | lms/djangoapps/django_comment_client/management/__init__.py | 12133432 | |
Bogh/django-oscar | refs/heads/master | tests/unit/offer/__init__.py | 12133432 | |
oberstet/autobahn-python | refs/heads/master | autobahn/wamp/gen/wamp/proto/ChannelBinding.py | 3 | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: proto
class ChannelBinding(object):
NONE = 0
TLS_UNIQUE = 1
|
Ujjwal29/ansible | refs/heads/devel | lib/ansible/utils/listify.py | 42 | # (c) 2014 Michael DeHaan, <michael@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... |
chennan47/osf.io | refs/heads/develop | api/base/settings/local-travis.py | 7 | from .defaults import * # noqa
VARNISH_SERVERS = ['http://127.0.0.1:8080']
ENABLE_VARNISH = True
ENABLE_ESI = False
REST_FRAMEWORK['DEFAULT_THROTTLE_RATES'] = {
'user': '1000000/second',
'non-cookie-auth': '1000000/second',
'add-contributor': '1000000/second',
'create-guid': '1000000/second',
'... |
EricssonResearch/calvin-base | refs/heads/master | calvin/actorstore/systemactors/test/TestProcess.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... |
slisson/intellij-community | refs/heads/master | python/testData/inspections/UnresolvedRefCreateFunction_after.py | 83 | s = 3
def ref(s, t):
pass
ref(s, t=1) |
xNovax/SickRage | refs/heads/master | lib/unidecode/x0a2.py | 253 | data = (
'kax', # 0x00
'ka', # 0x01
'kap', # 0x02
'kuox', # 0x03
'kuo', # 0x04
'kuop', # 0x05
'kot', # 0x06
'kox', # 0x07
'ko', # 0x08
'kop', # 0x09
'ket', # 0x0a
'kex', # 0x0b
'ke', # 0x0c
'kep', # 0x0d
'kut', # 0x0e
'kux', # 0x0f
'ku', # 0x10
'kup', # 0x11
'kurx',... |
shepdelacreme/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_vpc_egress_igw.py | 60 | #!/usr/bin/python
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module... |
khkaminska/djangoproject.com | refs/heads/master | aggregator/urls.py | 10 | from django.conf.urls import url
from . import views
urlpatterns = [
url(
r'^$',
views.index,
name='community-index'
),
url(
r'^mine/$',
views.my_feeds,
name='community-my-feeds'
),
url(
r'^(?P<feed_type_slug>[-\w]+)/$',
views.FeedLis... |
PatrickOReilly/scikit-learn | refs/heads/monotonic-trees | sklearn/utils/tests/test_graph.py | 334 | # Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
import numpy as np
from scipy import sparse
from sklearn.utils.graph import graph_laplacian
def test_graph_laplacian():
for mat in (np.arange(10) * np.arange(10)[:, np.newaxis],
np.ones((7, 7)),
np.e... |
juanyaw/PTVS | refs/heads/master | Python/Tests/TestData/UnregisteredFileExtension/Program.py | 18 | print __file__ + 'abcdef'
|
endlessm/chromium-browser | refs/heads/master | third_party/llvm/lldb/test/API/commands/command/delete/TestCommandDelete.py | 13 | import lldb
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
class DeleteCommandTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test
def test_delete_builtin(self):
self.expect("command delete settings", error=True,
subst... |
TeamTwisted/external_chromium_org | refs/heads/opti-5.1 | tools/site_compare/scrapers/ie/__init__.py | 179 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Selects the appropriate scraper for Internet Explorer."""
def GetScraper(version):
"""Returns the scraper module for the giv... |
QinerTech/QinerApps | refs/heads/master | openerp/addons/hr/res_users.py | 46 | from openerp import api
from openerp.osv import fields, osv
class res_users(osv.Model):
""" Update of res.users class
- add field for the related employee of the user
- if adding groups to an user, check if base.group_user is in it (member of
'Employee'), create an employee form linked to it. ""... |
pplatek/odoo | refs/heads/8.0 | addons/analytic_user_function/analytic_user_function.py | 163 | # -*- 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... |
mail-apps/translate | refs/heads/master | translate/lang/test_zh.py | 33 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from translate.lang import factory
def test_punctranslate():
"""Tests that we can translate punctuation."""
language = factory.getlanguage('zh')
assert language.punctranslate(u"") == u""
assert language.punctranslate(u"abc efg") == u"abc efg"
assert l... |
tmenjo/cinder-2015.1.0 | refs/heads/master | cinder/volume/drivers/ibm/storwize_svc/ssh.py | 4 | # Copyright 2014 IBM Corp.
# 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 app... |
lathen/voreen | refs/heads/master | modules/python/ext/python27/modules/random.py | 35 | """Random variable generators.
integers
--------
uniform within range
sequences
---------
pick random element
pick random sample
generate random permutation
distributions on the real line:
------------------------------
uniform
... |
TOCyna/tabelinha | refs/heads/master | flask/lib/python2.7/site-packages/openid/fetchers.py | 138 | # -*- test-case-name: openid.test.test_fetchers -*-
"""
This module contains the HTTP fetcher interface and several implementations.
"""
__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse',
'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError',
'HTTPError']
import urll... |
mcanthony/OpenShadingLanguage | refs/heads/master | testsuite/message/run.py | 13 | #!/usr/bin/env python
command += testshade ("-layer alayer a --layer blayer b --connect alayer f_out blayer f_in --connect alayer c_out blayer c_in --connect alayer dummy blayer dummy")
|
voliveirajr/Fabric_PyPOA14 | refs/heads/master | Fabric_PyPOA14/urls.py | 1 | from django.conf.urls import patterns, url, include
from rest_framework import routers
from users import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login UR... |
xenserver/xsconsole | refs/heads/master | XSConsoleCurses.py | 3 | # Copyright (c) 2007-2009 Citrix Systems Inc.
#
# 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; version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... |
singlebrook/AWS-ElasticBeanstalk-CLI | refs/heads/master | eb/macosx/python2.7/lib/aws/requests/status_codes.py | 252 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.