repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
laosiaudi/tensorflow | refs/heads/master | tensorflow/examples/tutorials/monitors/iris_monitors.py | 4 | # 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 appl... |
s390guy/SATK | refs/heads/master | tools/ipl/fbautil.py | 1 | #!/usr/bin/python3
# Copyright (C) 2012, 2013, 2016, 2017 Harold Grovesteen
#
# This file is part of SATK.
#
# SATK 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, ... |
patmcb/odoo | refs/heads/8.0 | addons/product_email_template/models/product.py | 379 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class product_template(osv.Model):
""" Product Template inheritance to add an optional email.template to a
product.template. When validating an invoice, an email will be send to the
customer based on this template. The customer will receive an e... |
thaumos/ansible | refs/heads/devel | lib/ansible/modules/files/archive.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Ben Doherty <bendohmv@gmail.com>
# Sponsored by Oomph, Inc. http://www.oomphinc.com
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_impor... |
jordsti/hacker-jeopardy | refs/heads/master | webservice/funcs/__init__.py | 1 | from add_team import add_team
from ask_question import ask_question
from get_all_categories import get_all_categories
from get_all_teams import get_all_teams
from answer_question import answer_question
from test_key import test_key
from remove_team import remove_team
from get_points_table import get_points_table
from g... |
motion2015/edx-platform | refs/heads/master | common/djangoapps/util/password_policy_validators.py | 113 | # pylint: disable=no-member
"""
This file exposes a number of password complexity validators which can be optionally added to
account creation
This file was inspired by the django-passwords project at https://github.com/dstufft/django-passwords
authored by dstufft (https://github.com/dstufft)
"""
from __future__ impor... |
eHealthAfrica/ureport | refs/heads/develop | ureport/polls/migrations/0010_auto_20140820_1629.py | 3 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0009_auto_20140820_1559'),
]
operations = [
migrations.AlterField(
model_name='poll',
name=... |
hoosteeno/kuma | refs/heads/master | vendor/packages/translate/convert/po2idml.py | 23 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of t... |
Neozaru/depot_tools | refs/heads/master | third_party/logilab/astng/inspector.py | 19 | # This program 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 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be usefu... |
ksambor/pyxos | refs/heads/master | pyxos/tests/test_state_machine.py | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... |
scottferg/web-console | refs/heads/master | django/contrib/gis/tests/geoapp/tests.py | 10 | import re, os, unittest
from django.db import connection
from django.contrib.gis import gdal
from django.contrib.gis.geos import *
from django.contrib.gis.measure import Distance
from django.contrib.gis.tests.utils import \
no_mysql, no_oracle, no_postgis, no_spatialite, \
mysql, oracle, postgis, spatial... |
Addepar/buck | refs/heads/master | python-dsl/buck_parser/deterministic_set.py | 5 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... |
grehx/spark-tk | refs/heads/master | regression-tests/sparktkregtests/testcases/frames/lda_groupby_flow_test.py | 1 | # vim: set encoding=utf-8
# Copyright (c) 2016 Intel Corporation
#
# 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... |
Raynxxx/CUIT-ACM-Website | refs/heads/master | view/__init__.py | 1 | __author__ = 'zhuzhiying'
from flask import blueprints
from flask import Flask, render_template, flash, request, redirect, url_for, abort, send_from_directory
from flask.ext.login import LoginManager, login_user, login_required, logout_user, current_user
from flask.ext.mail import Mail, Message
from flask.ext.excel imp... |
shadowsocks/ChinaDNS | refs/heads/master | tests/test.py | 165 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import signal
import time
import argparse
from subprocess import Popen
parser = argparse.ArgumentParser(description='test ChinaDNS')
parser.add_argument('-a', '--arguments', type=str, default=[])
parser.add_argument('-t', '--test-command', type=str, defau... |
mdaniel/intellij-community | refs/heads/master | python/helpers/py2only/docutils/parsers/rst/languages/gl.py | 130 | # -*- coding: utf-8 -*-
# Author: David Goodger
# Contact: goodger@users.sourceforge.net
# Revision: $Revision: 4229 $
# Date: $Date: 2005-12-23 00:46:16 +0100 (Fri, 23 Dec 2005) $
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, pleas... |
pong3489/TEST_Mission | refs/heads/master | Lib/UserDict.py | 83 | """A more or less complete user-defined wrapper around dictionary objects."""
class UserDict:
def __init__(self, dict=None, **kwargs):
self.data = {}
if dict is not None:
self.update(dict)
if len(kwargs):
self.update(kwargs)
def __repr__(self): return re... |
akatsoulas/mozillians | refs/heads/master | mozillians/users/migrations/0030_auto_20180404_0405.py | 3 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-04-04 11:05
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0029_remove_userprofile_privacy_idp_profile'),
]
operations = [
m... |
abergeron/pylearn2 | refs/heads/master | pylearn2/sandbox/lisa_rl/bandit/gaussian_bandit.py | 49 | __author__ = "Ian Goodfellow"
import numpy as np
from theano import config
from theano import function
from theano import tensor as T
from pylearn2.sandbox.lisa_rl.bandit.environment import Environment
from pylearn2.utils import sharedX
from pylearn2.utils.rng import make_np_rng, make_theano_rng
class GaussianBand... |
mahak/keystone | refs/heads/master | keystone/tests/unit/tests/test_utils.py | 26 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
sergiopasra/numina | refs/heads/master | numina/tests/test_datamodel.py | 3 |
import datetime
import astropy.io.fits as fits
import numpy
import numina.types.qc as qc
from ..datamodel import DataModel
def create_test_data():
return numpy.ones((10,10), dtype='int32')
def create_test_image(hdr=None):
data = create_test_data()
hdu = fits.PrimaryHDU(data)
hdr = {} if hdr is N... |
campbe13/openhatch | refs/heads/master | vendor/packages/twisted/doc/historic/2003/pycon/deferex/deferex-listing1.py | 20 | def prettyRequest(server, requestName):
return server.makeRequest(requestName
).addCallback(
lambda result: ', '.join(result.asList())
).addErrback(
lambda failure: failure.printTraceback())
|
sliz1/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_sanitizer.py | 430 | from __future__ import absolute_import, division, unicode_literals
try:
import json
except ImportError:
import simplejson as json
from html5lib import html5parser, sanitizer, constants, treebuilders
def toxmlFactory():
tree = treebuilders.getTreeBuilder("etree")
def toxml(element):
# encode... |
petabricks/petabricks | refs/heads/master | scripts/learningcompiler.py | 1 | #!/usr/bin/env python
"""This script compiles multiple instances of a program trying out different
heuristics, and storing in the database the best one that is found"""
import sys
import os
import shutil
import sqlite3
import random
import xml.dom.minidom
import re
import pbutil
import tunerwarnings
import maximaparser... |
wontonst/will | refs/heads/master | will/backends/analysis/nothing.py | 5 | import requests
from will import settings
from will.decorators import require_settings
from .base import AnalysisBackend
class NoAnalysis(AnalysisBackend):
def do_analyze(self, message):
return {}
|
tareqalayan/pytest | refs/heads/master | testing/test_pluginmanager.py | 1 | # encoding: UTF-8
from __future__ import absolute_import, division, print_function
import pytest
import os
import re
import sys
import types
from _pytest.config import get_config, PytestPluginManager
from _pytest.main import EXIT_NOTESTSCOLLECTED, Session
@pytest.fixture
def pytestpm():
return PytestPluginManage... |
lariodiniz/OramaBankTest | refs/heads/master | OramaBank/pynetbanking/admin.py | 1 | # coding: utf-8
#--------------//////////----------------------
#Projeto Criado por: Lário Diniz
#Contatos: developer.lario@gmail.com
#data: 30/09/2015
#--------------//////////----------------------
from django.contrib import admin
from django.utils.translation import ugettext as _
from datetime import datetime
fr... |
dynaryu/inasafe | refs/heads/develop | safe/impact_functions/volcanic/volcano_polygon_population/test/__init__.py | 229 | __author__ = 'akbar'
|
mmmavis/lightbeam-bedrock-website | refs/heads/master | bedrock/facebookapps/tests/test_views.py | 7 | # -*- coding: utf-8 -*-
# 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 urllib
from django.conf import settings
from funfactory.urlresolvers import reverse
fr... |
sv-dev1/odoo | refs/heads/8.0 | addons/mass_mailing/wizard/__init__.py | 432 | # -*- coding: utf-8 -*-
import test_mailing
import mail_compose_message
|
bussiere/gitfs | refs/heads/master | gitfs/merges/accept_mine.py | 3 | # Copyright 2014 PressLabs SRL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
igordejanovic/textX | refs/heads/master | tests/functional/regressions/test_issue166.py | 1 | from __future__ import unicode_literals
import textx
def test_issue166_wrong_multiple_rule_reference():
"""
Test wrongly detected referencing of multiple rules from a single abstract
rule alternative.
Reported in issue #166.
"""
grammar = """
DSL:
commands*=BaseCommand;
BaseCom... |
michalliu/OpenWrt-Firefly-Libraries | refs/heads/master | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/test/test_asyncio/test_tasks.py | 10 | """Tests for tasks.py."""
import os
import re
import sys
import types
import unittest
import weakref
from unittest import mock
import asyncio
from asyncio import coroutines
from asyncio import test_utils
try:
from test import support
from test.script_helper import assert_python_ok
except ImportError:
from... |
dablak/boto | refs/heads/develop | tests/unit/glacier/test_writer.py | 18 | # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... |
harshilasu/LinkurApp | refs/heads/master | y/google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/sns/test_sns_sqs_subscription.py | 12 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# 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 res... |
methane/FrameworkBenchmarks | refs/heads/master | frameworks/CSharp/nancy/setup_iis.py | 65 | import subprocess
import sys
import setup_util
import os
def start(args, logfile, errfile):
if os.name != 'nt':
return 1
try:
setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="nancy", stderr=errfi... |
sugarlabs/sugar | refs/heads/master | src/jarabe/controlpanel/cmd.py | 2 | # Copyright (C) 2007, 2008 One Laptop Per Child
#
# 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 di... |
kleientertainment/ds_mod_tools | refs/heads/master | pkg/win32/Python27/Lib/multiprocessing/managers.py | 5 | #
# Module providing the `SyncManager` class for dealing
# with shared objects
#
# multiprocessing/managers.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditio... |
Zlash65/erpnext | refs/heads/develop | erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py | 1 | import frappe
import json
from six import iteritems
def execute():
if "tax_type" not in frappe.db.get_table_columns("Item Tax"):
return
old_item_taxes = {}
item_tax_templates = {}
rename_template_to_untitled = []
for d in frappe.db.sql("""select parent as item_code, tax_type, tax_rate from `tabItem Tax`""", as... |
Tomsod/gemrb | refs/heads/master | gemrb/GUIScripts/iwd2/Spells.py | 1 | # GemRB - Infinity Engine Emulator
# Copyright (C) 2014 The GemRB Project
#
# 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 versi... |
pbirsinger/asp_backup | refs/heads/master | asp/jit/variant_history.py | 5 |
class CodeVariantPerformanceDatabase(object):
def __init__(self):
self.variant_times = {}
# The measured performance data for a particular method
# Dict of dicts, key: input key, value: dict
# Inner dict of times, key: v_id, value: time
# The set of v_ids ... |
kaiyuanl/gem5 | refs/heads/master | src/unittest/stattestmain.py | 76 | def main():
from m5.internal.stattest import stattest_init, stattest_run
import m5.stats
stattest_init()
# Initialize the global statistics
m5.stats.initSimStats()
m5.stats.initText("cout")
# We're done registering statistics. Enable the stats package now.
m5.stats.enable()
# Re... |
linktlh/Toontown-journey | refs/heads/master | otp/chat/TalkMessage.py | 3 | class TalkMessage:
def __init__(self, messageId, timeStamp, body, senderAvatarId, senderAvatarName, senderAccountId, senderAccountName, receiverAvatarId, receiverAvatarName, receiverAccountId, receiverAccountName, talkType, extraInfo = None):
self.timeStamp = timeStamp
self.body = body
self.... |
shanil-puri/mase | refs/heads/master | src/ntilesok.py | 10 | from __future__ import print_function, division
import sys,random
sys.dont_write_bytecode = True
from ok import *
from ntiles import *
"""
# showing off ntiles
"""
r = random.random
rseed = random.seed
@ok
def _ntiles():
r1 = [ r() for _ in xrange(1000)]
r2 = [ x**2 for x in r1]
print("\nlong",ntiles(r1,o... |
HarmonyEnterpriseSolutions/harmony-platform | refs/heads/master | src/gnue/forms/uidrivers/wx26/widgets/url_resource/PDF.py | 1 | import os
from wx.lib.pdfwin import PDFWindow, get_min_adobe_version
from TempFileMixIn import TempFileMixIn
from gnue import paths
from src.gnue.forms.uidrivers.wx26.widgets.url_resource import PdfCheckerMixIn
if get_min_adobe_version() is None:
raise ImportError, 'Adobe Acrobat Reader 5.0, 7.0 or greater is r... |
junhuac/MQUIC | refs/heads/master | src/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py | 63 | #!/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.
# This is used to test the findbugs plugin, it calls
# build/android/pylib/utils/findbugs.py to analyze the classes in
# org.chro... |
abhikumar22/MYBLOG | refs/heads/master | blg/Lib/site-packages/django-1.11.7-py3.6.egg/django/contrib/gis/db/backends/spatialite/operations.py | 28 | """
SQL functions reference lists:
https://web.archive.org/web/20130407175746/https://www.gaia-gis.it/gaia-sins/spatialite-sql-4.0.0.html
https://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html
"""
import re
import sys
from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations,
)
from d... |
BigDataforYou/movie_recommendation_workshop_1 | refs/heads/master | big_data_4_you_demo_1/venv/lib/python2.7/site-packages/setuptools/py26compat.py | 22 | """
Compatibility Support for Python 2.6 and earlier
"""
import sys
try:
from urllib.parse import splittag
except ImportError:
from urllib import splittag
def strip_fragment(url):
"""
In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
later was patched to disregard the fragment... |
ttglennhall/DjangoGirlsTutorial | refs/heads/master | myvenv/lib/python3.4/site-packages/pip/_vendor/distlib/index.py | 185 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import hashlib
import logging
import os
import shutil
import subprocess
import tempfile
try:
from threading import Thread
except ImportErr... |
thomasaarholt/hyperspy | refs/heads/master | hyperspy/datasets/example_signals.py | 11 |
from hyperspy.misc.example_signals_loading import load_1D_EDS_SEM_spectrum as\
EDS_SEM_Spectrum
from hyperspy.misc.example_signals_loading import load_1D_EDS_TEM_spectrum as\
EDS_TEM_Spectrum
from hyperspy.misc.example_signals_loading import load_object_hologram as object_hologram
from hyperspy.misc.example... |
storm-computers/odoo | refs/heads/9.0 | addons/crm/wizard/__init__.py | 41 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import crm_lead_lost
import crm_partner_binding
import crm_lead_to_opportunity
import crm_merge_opportunities
|
Deepakkothandan/ansible | refs/heads/devel | lib/ansible/playbook/role/definition.py | 62 | # (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... |
mcgachey/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/templates.py | 231 | """
This module handles loading xmodule templates
These templates are used by the CMS to provide content that overrides xmodule defaults for
samples.
``Template``s are defined in x_module. They contain 2 attributes:
:metadata: A dictionary with the template metadata
:data: A JSON value that defines the templat... |
misterdanb/micropython | refs/heads/master | tests/pyb/pin.py | 71 | from pyb import Pin
p = Pin('X1', Pin.IN)
print(p)
print(p.name())
print(p.pin())
print(p.port())
p = Pin('X1', Pin.IN, Pin.PULL_UP)
p = Pin('X1', Pin.IN, pull=Pin.PULL_UP)
p = Pin('X1', mode=Pin.IN, pull=Pin.PULL_UP)
print(p)
print(p.value())
p.init(p.IN, p.PULL_DOWN)
p.init(p.IN, pull=p.PULL_DOWN)
p.init(mode=p.IN... |
paolodedios/tensorflow | refs/heads/master | tensorflow/python/keras/layers/local_test.py | 5 | # 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... |
uwdata/termite-data-server | refs/heads/master | web2py/gluon/fileutils.py | 9 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
| This file is part of the web2py Web Framework
| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
File operations
---------------
"""
import storage
import os
import re
import tarfile
import glob
im... |
luzheqi1987/nova-annotation | refs/heads/master | nova/virt/xenapi/client/objects.py | 97 | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
cosmoharrigan/rl-glue-ext | refs/heads/master | projects/codecs/Python/src/tests/test_taskspec.py | 8 | #
# Copyright (C) 2008, Brian Tanner
#
#http://rl-glue-ext.googlecode.com/
#
# 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... |
noslenfa/tdjangorest | refs/heads/master | uw/lib/python2.7/site-packages/paramiko/packet.py | 7 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 (a... |
rsampaio/cobbler | refs/heads/master | cobbler/couch.py | 12 |
import httplib, simplejson # http://cheeseshop.python.org/pypi/simplejson
# Here only used for prettyprinting
def prettyPrint(s):
"""Prettyprints the json response of an HTTPResponse object"""
# HTTPResponse instance -> Python object -> str
print simplejson.dumps(simplejson.l... |
sgiavasis/nipype | refs/heads/master | nipype/workflows/dmri/mrtrix/diffusion.py | 10 | from ....interfaces import utility as util # utility
from ....pipeline import engine as pe # pypeline engine
from ....interfaces import fsl as fsl
from ....interfaces import mrtrix as mrtrix
def create_mrtrix_dti_pipeline(name="dtiproc", tractography_type='probabilistic'):
"""Creates a pipeline that ... |
smart-developerr/my-first-blog | refs/heads/master | blog/admin.py | 36 | from django.contrib import admin
from .models import Post
admin.site.register(Post)
|
nonrational/qt-everywhere-opensource-src-4.8.6 | refs/heads/master | src/3rdparty/webkit/Source/ThirdParty/gyp/PRESUBMIT.py | 12 | # Copyright 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 f... |
sephii/django | refs/heads/master | tests/inspectdb/models.py | 17 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class People(models.Model):
name = models.CharField(max_length=255)
parent = models.ForeignKey('self')
class Message(models.Model):
from_field = models.ForeignKey(People, db_column='from_id')
class PeopleDa... |
sander76/home-assistant | refs/heads/dev | tests/components/mqtt_json/test_device_tracker.py | 8 | """The tests for the JSON MQTT device tracker platform."""
import json
import logging
import os
from unittest.mock import patch
import pytest
from homeassistant.components.device_tracker.legacy import (
DOMAIN as DT_DOMAIN,
YAML_DEVICES,
)
from homeassistant.const import CONF_PLATFORM
from homeassistant.setup... |
RDAP1337/jive-turkey | refs/heads/master | app/models/jobModel.py | 1 | from app import db
class Job(db.Model):
__tablename__ = 'jobs'
id = db.Column(db.Integer, primary_key=True)
job_id = db.Column(db.String(64), unique=True)
job_created = db.Column(db.DateTime)
job_modified = db.Column(db.DateTime)
job_sales_rep_id = db.Column(db.String(64), unique=True)
jo... |
thejens/luigi | refs/heads/master | test/subtask_test.py | 36 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify 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 law... |
EmadMokhtar/Django | refs/heads/master | tests/sites_tests/tests.py | 26 | from django.apps import apps
from django.apps.registry import Apps
from django.conf import settings
from django.contrib.sites import models
from django.contrib.sites.management import create_default_site
from django.contrib.sites.middleware import CurrentSiteMiddleware
from django.contrib.sites.models import Site, clea... |
switchkiller/ProjDjanko | refs/heads/master | lib/python2.7/site-packages/pip/commands/wheel.py | 239 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import os
import warnings
from pip.basecommand import RequirementCommand
from pip.index import PackageFinder
from pip.exceptions import CommandError, PreviousBuildDirError
from pip.req import RequirementSet
from pip.utils import import_or_r... |
cpausmit/Kraken | refs/heads/master | filefi/021/writeCfg.py | 1 | #!/usr/bin/env python
"""
Re-write config file and optionally convert to python
"""
__revision__ = "$Id: writeCfg.py,v 1.2 2011/06/19 01:46:53 paus Exp $"
__version__ = "$Revision: 1.2 $"
import getopt
import imp
import os
import pickle
import sys
import xml.dom.minidom
from random import SystemRandom
from ProdCom... |
maxsocl/django | refs/heads/master | django/db/backends/sqlite3/utils.py | 108 | from django.conf import settings
from django.utils import timezone
from django.utils.dateparse import parse_datetime
def parse_datetime_with_timezone_support(value):
dt = parse_datetime(value)
# Confirm that dt is naive before overwriting its tzinfo.
if dt is not None and settings.USE_TZ and timezone.is_n... |
fluxus-study/kimjmin | refs/heads/master | node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py | 505 | # Copyright (c) 2012 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.
"""Xcode project file generator.
This module is both an Xcode project file generator and a documentation of the
Xcode project file format. Knowledge of the proje... |
dagwieers/ansible | refs/heads/devel | contrib/inventory/linode.py | 15 | #!/usr/bin/env python
'''
Linode external inventory script
=================================
Generates inventory that Ansible can understand by making API request to
Linode using the Chube library.
NOTE: This script assumes Ansible is being executed where Chube is already
installed and has a valid config at ~/.chube... |
m0ose/node-firefly2 | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py | 912 | # Copyright (c) 2011 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.
"""gypd output module
This module produces gyp input as its output. Output files are given the
.gypd extension to avoid overwriting the .gyp files that they are ... |
asmateus/event_manager | refs/heads/master | server/manager/events/views.py | 1 | from django.utils.decorators import method_decorator
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from . import services
def heartbeat(request):
pass
class ServerStatusView(APIView):
"""
Server status, data timestamps, etc.
... |
jonathonwalz/ansible | refs/heads/devel | lib/ansible/plugins/connection/libvirt_lxc.py | 44 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute i... |
HaebinShin/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/coordinated_session.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... |
Pirata-Repository/Pirata | refs/heads/master | plugin.video.1channel/utils.py | 3 | """
1Channel XBMC Addon
Copyright (C) 2014 Bstrdsmkr, tknorris
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 v... |
robovm/robovm-studio | refs/heads/master | python/testData/resolve/DocStringClass.py | 83 | class Foo:
"Docstring of class Foo"
pass
Foo._<ref>_doc__
|
rohitwaghchaure/erpnext-receipher | refs/heads/master | erpnext/patches/v4_2/repost_stock_reconciliation.py | 120 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import json
def execute():
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.d... |
arjan/starpy | refs/heads/master | starpy/utilapplication.py | 1 | """Class providing utility applications with common support code"""
from basicproperty import common, propertied, basic, weak
from ConfigParser import ConfigParser
from starpy import fastagi, manager
from twisted.internet import defer, reactor
import logging,os
log = logging.getLogger( 'app' )
class UtilApplication( ... |
RichardLitt/wyrd-django-dev | refs/heads/master | django/db/models/base.py | 4 | from __future__ import unicode_literals
import copy
import sys
from functools import update_wrapper
from django.utils.six.moves import zip
import django.db.models.manager # Imported to register signal handler.
from django.conf import settings
from django.core.exceptions import (ObjectDoesNotExist,
MultipleObject... |
Atari007/master | refs/heads/master | dep/ACE_wrappers/bin/make_release.py | 94 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# @file make_release.py
# @author William R. Otte <wotte@dre.vanderbilt.edu>
#
# Packaging script for ACE/TAO/CIAO
from __future__ import with_statement
from time import strftime
import pysvn
import re
import tempfile
import shutil
import subprocess
import shlex
############... |
KurtJacobson/hazzy | refs/heads/master | hazzy/utilities/constants.py | 2 | #!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# <kurtcjacobson@gmail.com>
#
# This file is part of Hazzy.
#
# Hazzy 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 o... |
UWPCE-PythonCert/IntroPython2016 | refs/heads/master | students/crobison/session05/exceptions_lab.py | 3 | #!/usr/bin/env python3
# Charles Robison
# 2016.11.08
# Exceptions Lab
def none():
try:
answer = input('Who will be the next President? ')
print('Really? You think ' + answer +"?!")
except (KeyboardInterrupt) as e:
return None
none() |
bala4901/odoo | refs/heads/master | openerp/addons/base/workflow/workflow.py | 33 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
ppmt/Crust | refs/heads/master | flask/lib/python2.7/site-packages/pip/_vendor/distlib/util.py | 203 | #
# Copyright (C) 2012-2014 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import shutil
import socket
import... |
zofuthan/edx-platform | refs/heads/master | lms/djangoapps/mobile_api/social_facebook/courses/serializers.py | 128 | """
Serializer for courses API
"""
from rest_framework import serializers
class CoursesWithFriendsSerializer(serializers.Serializer):
"""
Serializes oauth token for facebook groups request
"""
oauth_token = serializers.CharField(required=True)
|
IMCG/iMapReduce | refs/heads/master | src/examples/python/WordCount.py | 123 | #
# 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... |
bubae/gazeAssistRecognize | refs/heads/master | calibration.py | 1 | import sys
import init_path
import gaze_algorithm as GA
import numpy as np
import cv2, os
import wx
import time
import csv
class CameraObject():
def __init__(self, gazeObject):
self.capScene = cv2.VideoCapture(0)
if not self.capScene.isOpened():
raise NameError("Scene Camera don`t connected")
return
self... |
jcoady9/beets | refs/heads/master | test/test_template.py | 1 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... |
agoose77/hivesystem | refs/heads/master | tutorial/layers/layer5/workers/action3_play_animation.py | 7 | import bee
from bee.segments import *
import libcontext
from libcontext.socketclasses import *
from libcontext.pluginclasses import *
class action3_play_animation(bee.worker):
def set_playfunc(self, playfunc):
self.play = playfunc
@modifier
def do_play(self):
self.play(self.v_inp)
in... |
r-mart/scikit-learn | refs/heads/master | examples/decomposition/plot_faces_decomposition.py | 204 | """
============================
Faces dataset decompositions
============================
This example applies to :ref:`olivetti_faces` different unsupervised
matrix decomposition (dimension reduction) methods from the module
:py:mod:`sklearn.decomposition` (see the documentation chapter
:ref:`decompositions`) .
"""... |
KSanthanam/rethinkdb | refs/heads/next | test/rql_test/connections/http_support/httpbin/helpers.py | 49 | # -*- coding: utf-8 -*-
"""
httpbin.helpers
~~~~~~~~~~~~~~~
This module provides helper functions for httpbin.
"""
import json
import base64
from hashlib import md5
from werkzeug.http import parse_authorization_header
from flask import request, make_response
try:
from urlparse import urlparse, urlunparse
excep... |
utopiaprince/micropython | refs/heads/master | tests/basics/string_format_modulo.py | 47 | print("%%" % ())
print("=%s=" % 1)
print("=%s=%s=" % (1, 2))
print("=%s=" % (1,))
print("=%s=" % [1, 2])
print("=%s=" % "str")
print("=%r=" % "str")
try:
print("=%s=%s=" % 1)
except TypeError:
print("TypeError")
try:
print("=%s=%s=%s=" % (1, 2))
except TypeError:
print("TypeError")
try:
print("=... |
mohamed--abdel-maksoud/chromium.src | refs/heads/nw12 | tools/valgrind/common.py | 184 | # 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 logging
import platform
import os
import signal
import subprocess
import sys
import time
class NotImplementedError(Exception):
pass
class Ti... |
cloudera/hue | refs/heads/master | desktop/core/ext-py/docutils-0.14/docutils/parsers/rst/languages/eo.py | 128 | # $Id: eo.py 7119 2011-09-02 13:00:23Z milde $
# Author: Marcelo Huerta San Martin <richieadler@users.sourceforge.net>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two f... |
jms6520/cf-python | refs/heads/master | vendor/pip-1.3.1/setup.py | 37 | import codecs
import os
import re
import sys
import textwrap
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
# intentionally *not* adding an encoding option to open
# see here: https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
return codecs... |
dudakov/ACE3 | refs/heads/master | docs/tools/combine_events.py | 21 | #!/usr/bin/env python3
# Author: Jonpas, SilentSpike
import os
import sys
import re
######## GLOBALS #########
WIKI_FRAMEWORK = "wiki/framework"
ACE3WEB_WIKI_FRAMEWORK = "http://ace3mod.com/{}".format(WIKI_FRAMEWORK)
EXCLUDE = ["events-framework.md"]
TEMP_LISTENABLE = "temp\\combined_events_listenable.md"
TEMP_CALLA... |
Grirrane/odoo | refs/heads/master | addons/im_livechat/report/__init__.py | 13 | import im_livechat_report |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.