repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
partofthething/home-assistant | refs/heads/dev | homeassistant/components/schluter/__init__.py | 21 | """The Schluter DITRA-HEAT integration."""
import logging
from requests import RequestException, Session
from schluter.api import Api
from schluter.authenticator import AuthenticationState, Authenticator
import voluptuous as vol
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers i... |
reage/pp | refs/heads/master | 0005.py | 1 | from PIL import Image
import os, glob
def resizeImgInFolder(folder, maxHeight = 1136 , maxWidth = 640):
try:
for file in glob.glob(folder):
fullPath = os.path.join(folder, file)
if os.path.isfile(fullPath):
im = Image.open(fullPath)
width, height = im... |
CyanogenMod/android_external_chromium_org | refs/heads/cm-12.0 | tools/perf/page_sets/typical_25.py | 8 | # Copyright 2014 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.
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import ... |
zero-rp/miniblink49 | refs/heads/master | v8_7_5/tools/unittests/testdata/results_processor.py | 14 | #!/usr/bin/env python
# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Fake results processor for testing that just sums some things up.
"""
# for py2/py3 compatibility
from __future__ import print_f... |
int19h/PTVS | refs/heads/master | Python/Product/Miniconda/Miniconda3-x64/Lib/tarfile.py | 9 | #!/usr/bin/env python3
#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any pers... |
sgiavasis/nipype | refs/heads/master | nipype/workflows/dmri/fsl/__init__.py | 10 | from __future__ import absolute_import
from .dti import create_bedpostx_pipeline, bedpostx_parallel
from .artifacts import (all_fmb_pipeline, all_peb_pipeline, all_fsl_pipeline,
hmc_pipeline, ecc_pipeline, sdc_fmb, sdc_peb,
remove_bias)
from .epi import (fieldmap_correc... |
miguelsc/voamos | refs/heads/master | voamos/__init__.py | 1 | # -*- coding: utf-8 -*-
import logging
logging.basicConfig()
__author__ = """Miguel Coutada"""
__email__ = 'michaelcoutada@gmail.com'
__version__ = '0.1.0'
|
Ayaz2589/Ayaz2589.github.io | refs/heads/master | node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py | 1789 | # Copyright (c) 2014 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-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project i... |
bluemini/kuma | refs/heads/master | vendor/packages/translate/storage/test_catkeys.py | 26 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from translate.storage import catkeys, test_base
class TestCatkeysUnit(test_base.TestTranslationUnit):
UnitClass = catkeys.CatkeysUnit
def test_difficult_escapes(self):
r"""Wordfast files need to perform magic with escapes.
Wordfast does not ... |
claws/AutobahnPython | refs/heads/master | autobahn/autobahn/websocket/useragent.py | 18 | ###############################################################################
##
## Copyright (C) 2011-2013 Tavendo GmbH
##
## 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
##
## h... |
qsic/qsic3 | refs/heads/master | parsers/improvteams/tests.py | 1 | import logging
import os.path
import sys
import unittest
import urllib
from django.core.files import File
from project_settings.settings.base import PROJECT_ROOT
from parsers.improvteams.parser import BaseItParser
from parsers.improvteams.parser import ItPerformerParser
from parsers.improvteams.parser import ItTeamPa... |
vigsterkr/marathonspawner | refs/heads/master | marathonspawner/__init__.py | 1 | from ._version import __version__
from .marathonspawner import MarathonSpawner
|
tecan/xchat-rt | refs/heads/master | plugins/scripts/Supybot-0.83.4.1-bitcoinotc-bot/plugins/AutoMode/test.py | 21 | ###
# Copyright (c) 2005, Jeremiah Fincher
# 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 conditi... |
masom/Puck | refs/heads/master | server/models/firewalls.py | 1 | '''
Puck: FreeBSD virtualization guest configuration server
Copyright (C) 2012 The Hotel Communication Network inc.
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 3 of the Lic... |
jairtrejo/hyde | refs/heads/master | hydeengine/content_processors.py | 58 | from django.conf import settings
class PassthroughProcessor:
@staticmethod
def process(resource):
resource.prerendered = True
|
juhuntenburg/pipelines | refs/heads/master | src/connexel_experiments/create_all_subjects_matrix.py | 2 | import numpy as np
import nibabel as nb
from scipy import stats
from nipy.modalities.fmri.glm import GeneralLinearModel
beh_data = np.recfromcsv('/home/raid3/gorgolewski/Downloads/DataForChris_10_30_12.csv')
#corr_mmaps = []
#for name in beh_data['sub_id_database_brain']:
# filename = "/scr/adenauer1/workingdir/rs... |
chuan9/chromium-crosswalk | refs/heads/master | tools/cr/cr/commands/shell.py | 103 | # Copyright 2013 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.
"""A module for the shell command."""
import os
import tempfile
import cr
class ShellCommand(cr.Command):
"""The implementation of the shell command.
... |
hjfreyer/marry-fuck-kill | refs/heads/master | backend/mapreduce/lib/pipeline/util.py | 5 | #!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
Alkemic/webpage | refs/heads/master | module/portfolio/__init__.py | 9 | __author__ = 'alkemic'
|
mhnatiuk/phd_sociology_of_religion | refs/heads/master | scrapper/build/pyasn1/test/codec/ber/__init__.py | 3653 | # This file is necessary to make this directory a package.
|
grupozeety/CDerpnext | refs/heads/bk_master | erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py | 121 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class LandedCostTaxesandCharges(Document):
pass |
openshift/openshift-tools | refs/heads/prod | ansible/roles/lib_oa_openshift/src/lib/rolebinding.py | 84 | # pylint: skip-file
# flake8: noqa
# pylint: disable=too-many-instance-attributes
class RoleBindingConfig(object):
''' Handle rolebinding config '''
# pylint: disable=too-many-arguments
def __init__(self,
name,
namespace,
kubeconfig,
group... |
retomerz/intellij-community | refs/heads/master | python/testData/inspections/UnnecessaryBackslashInArguments.py | 73 | def foo(a, b,<warning descr="Unnecessary backslash in expression."><caret>\</warning>
c,<warning descr="Unnecessary backslash in expression.">\</warning>
d):
pass |
mjsevilla/facts-about-sloths | refs/heads/master | functions/node_modules/firebase-admin/node_modules/grpc/third_party/boringssl/third_party/googletest/test/gtest_catch_exceptions_test.py | 2139 | #!/usr/bin/env python
#
# 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 o... |
indx/indx-core | refs/heads/master | lib/indxclient/indxclient.py | 2 | # Copyright (C) 2011-2013 University of Southampton
# Copyright (C) 2011-2013 Daniel Alexander Smith
# Copyright (C) 2011-2013 Max Van Kleek
# Copyright (C) 2011-2013 Nigel R. Shadbolt
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... |
h4ck3rm1k3/pacman | refs/heads/master | test/pacman/tests/database011.py | 28 | # TODO: these are labeled as database packages because they sure seem to me to
# be database-type operations. In their current implementation however they are
# calling -U and -R rather than -D. Obviously the tests will need to be updated
# if this changes.
self.description = "Install a package with --dbonly, no files ... |
pigeonflight/strider-plone | refs/heads/master | docker/appengine/lib/django-1.3/django/contrib/localflavor/uk/uk_regions.py | 347 | """
Sources:
English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls
Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area
Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales
Scottish regions: http://... |
robdennis/sideboard | refs/heads/master | tests/plugins/different_versions/rdflib3_0_0/env/lib/python2.7/site-packages/rdflib/plugins/parsers/rdfa/__init__.py | 3 | """
From a Python file, expecting an RDF/XML pretty printed output::
import rdflib.graph as g
graph = g.Graph()
graph.parse('filename.html', format='rdfa')
print graph.serialize(format='pretty-xml')
For details on RDFa, the reader should consult the `RDFa syntax document
<http://www.w3.org/TR/rdfa-syn... |
kcyu1993/ML_course_kyu | refs/heads/master | labs/ex02/template/helpers.py | 1 | # -*- coding: utf-8 -*-
"""some helper functions."""
import numpy as np
def load_data(sub_sample=True, add_outlier=False):
"""Load data and convert it to the metrics system."""
path_dataset = "height_weight_genders.csv"
data = np.genfromtxt(
path_dataset, delimiter=",", skip_header=1, usecols=[1, ... |
knights-lab/NINJA-SHOGUN | refs/heads/master | shogun/scripts/old/kegg_rarefaction_csv.py | 1 | #!/usr/bin/env python
"""
Copyright 2015-2017 Knights Lab, Regents of the University of Minnesota.
This software is released under the GNU Affero General Public License (AGPL) v3.0 License.
"""
from __future__ import print_function
import argparse
import numpy as np
import csv
from multiprocessing import Pool, cpu_co... |
patcon/open-cabinet | refs/heads/master | venv/lib/python2.7/site-packages/django/db/migrations/executor.py | 103 | from __future__ import unicode_literals
from django.apps.registry import apps as global_apps
from django.db import migrations
from .exceptions import InvalidMigrationPlan
from .loader import MigrationLoader
from .recorder import MigrationRecorder
from .state import ProjectState
class MigrationExecutor(object):
... |
akrylysov/yozuch | refs/heads/master | yozuch/builder.py | 1 | """
Blog builder.
"""
import functools
import os
import sys
import jinja2
from yozuch import logger, validator
from yozuch.context import Context
from yozuch.utils import emptydir, import_module, import_module_member, is_external_url
def build(project_dir, config_overrides=None, validate=False, output_dir=None):
... |
tgrochow/avango | refs/heads/master | attic/avango-menu/python/avango/menu/_RadioButtonGroup.py | 6 | # -*- Mode:Python -*-
##########################################################################
# #
# This file is part of AVANGO. #
# ... |
defionscode/ansible-modules-extras | refs/heads/devel | cloud/misc/proxmox.py | 15 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
jscott413/maidsinharlem | refs/heads/master | flask/lib/python2.7/site-packages/whoosh/filedb/structfile.py | 96 | # Copyright 2009 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... |
turbomanage/training-data-analyst | refs/heads/master | courses/machine_learning/deepdive2/structured/labs/serving/application/lib/pyasn1_modules/__init__.py | 7 | # http://www.python.org/dev/peps/pep-0396/
__version__ = '0.2.7'
|
readevalprint/mezzanine | refs/heads/master | mezzanine/core/management/commands/runserver.py | 6 |
import platform
import sys
import django
from django.conf import settings
from django.contrib.staticfiles.management.commands import runserver
from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.management.color import supports_color
from django.db import connection
from django.http im... |
proxysh/Safejumper-for-Desktop | refs/heads/master | buildmac/Resources/env/lib/python2.7/site-packages/twisted/web/xmlrpc.py | 15 | # -*- test-case-name: twisted.web.test.test_xmlrpc -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A generic resource for publishing objects via XML-RPC.
Maintainer: Itamar Shtull-Trauring
@var Fault: See L{xmlrpclib.Fault}
@type Fault: L{xmlrpclib.Fault}
"""
from __future__ import d... |
anryko/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_firewall_rule.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
IONISx/edx-platform | refs/heads/master | lms/djangoapps/mobile_api/social_facebook/preferences/urls.py | 128 | """
URLs for users sharing preferences
"""
from django.conf.urls import patterns, url
from .views import UserSharing
urlpatterns = patterns(
'mobile_api.social_facebook.preferences.views',
url(
r'^preferences/$',
UserSharing.as_view(),
name='preferences'
),
)
|
adelton/django | refs/heads/master | django/contrib/contenttypes/migrations/0002_remove_content_type_name.py | 582 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def add_legacy_name(apps, schema_editor):
ContentType = apps.get_model('contenttypes', 'ContentType')
for ct in ContentType.objects.all():
try:
ct.name = apps.get_model(ct.app_label, c... |
percy-g2/Novathor_xperia_u8500 | refs/heads/master | 6.1.1.B.0.253/external/webkit/Tools/Scripts/webkitpy/tool/commands/queuestest.py | 15 | # Copyright (C) 2009 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... |
Vvucinic/Wander | refs/heads/master | venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/contrib/admin/templatetags/admin_static.py | 539 | from django.apps import apps
from django.template import Library
register = Library()
_static = None
@register.simple_tag
def static(path):
global _static
if _static is None:
if apps.is_installed('django.contrib.staticfiles'):
from django.contrib.staticfiles.templatetags.staticfiles impo... |
Argon-Zhou/django | refs/heads/master | tests/basic/tests.py | 117 | from __future__ import unicode_literals
import threading
import warnings
from datetime import datetime, timedelta
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.db import DEFAULT_DB_ALIAS, DatabaseError, connections
from django.db.models.fields import Field
from django.db.m... |
leoliujie/odoo | refs/heads/8.0 | addons/web_tests/tests/__init__.py | 385 | # -*- coding: utf-8 -*-
import test_ui
|
OptiPop/external_chromium_org | refs/heads/opti-5.1 | tools/memory_inspector/memory_inspector/frontends/command_line.py | 83 | # Copyright 2014 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.
"""Command line frontend for Memory Inspector"""
import json
import memory_inspector
import optparse
import os
import time
from memory_inspector import con... |
roninkenji/libpebble | refs/heads/master | pebble/VersionGenerated.py | 2 | SDK_VERSION = "2.0-BETA2" |
spallavolu/scikit-learn | refs/heads/master | sklearn/datasets/svmlight_format.py | 79 | """This module implements a loader and dumper for the svmlight format
This format is a text-based format, with one sample per line. It does
not store zero valued features hence is suitable for sparse dataset.
The first element of each line can be used to store a target variable to
predict.
This format is used as the... |
biomodels/BIOMD0000000347 | refs/heads/master | BIOMD0000000347/model.py | 1 | import os
path = os.path.dirname(os.path.realpath(__file__))
sbmlFilePath = os.path.join(path, 'BIOMD0000000347.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... |
ayepezv/GAD_ERP | refs/heads/master | addons/sale_timesheet/models/procurement.py | 1 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class ProcurementOrder(models.Model):
_inherit = 'procurement.order'
task_id = fields.Many2one('project.task', 'Task', copy=False)
def _is_procurement_task(self):
... |
TeamEOS/external_chromium_org | refs/heads/lp5.0 | third_party/bintrees/bintrees/walker.py | 156 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: tree walker
# Created: 07.05.2010
# Copyright (c) 2010-2013 by Manfred Moitzi
# License: MIT License
from operator import attrgetter, lt, gt
class Walker(object):
__slots__ = ['_node', '_stack', '_tree']
def __init__(self, tree):
self.... |
uber/fbthrift | refs/heads/master | thrift/test/py/JSONGenerateTest.py | 14 | #
# 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... |
Predictor2/predictor | refs/heads/master | web/__init__.py | 355 | # -*- coding: utf-8 -*-
__version__ = '0.1.0'
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
|
hcsturix74/django | refs/heads/master | django/contrib/gis/gdal/prototypes/srs.py | 471 | from ctypes import POINTER, c_char_p, c_int, c_void_p
from django.contrib.gis.gdal.libgdal import lgdal, std_call
from django.contrib.gis.gdal.prototypes.generation import (
const_string_output, double_output, int_output, srs_output, string_output,
void_output,
)
# Shortcut generation for routines with known... |
wangjeaf/CSSCheckStyle | refs/heads/master | tests/unit/config/ConfigCommandLine.py | 1 | from helper import *
def doTest():
_default()
def _default():
config = parseCkStyleCmdArgs(realpath('ckstyle.ini'), [], [], True)
equal(config.errorLevel, 0, 'errorLevel is 0')
equal(config.recursive, False, 'recursive is False')
equal(config.printFlag, False, 'print flag is False')
equal(conf... |
zdary/intellij-community | refs/heads/master | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorAddingEscapingToCurlyBraces.py | 11 | '{{{%d}}' % 42 |
shriyanka/daemo-forum | refs/heads/master | spirit/urls.py | 11 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import include, url
import spirit.topic.views
import spirit.admin.urls
import spirit.user.urls
import spirit.search.urls
import spirit.category.urls
import spirit.topic.urls
import spirit.comment.urls
patterns = [
url(r'^$', ... |
mxOBS/deb-pkg_trusty_chromium-browser | refs/heads/master | mojo/public/tools/bindings/pylib/mojom_tests/support/find_files.py | 99 | # Copyright 2014 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 fnmatch
from os import walk
from os.path import join
import sys
def FindFiles(top, pattern, **kwargs):
"""Finds files under |top| matching the glo... |
butterflyology/rr-intro | refs/heads/gh-pages | bin/repo_check.py | 4 | #!/usr/bin/env python
"""
Check repository settings.
"""
from __future__ import print_function
import sys
import os
from subprocess import Popen, PIPE
import re
from optparse import OptionParser
from util import Reporter, load_yaml, require
# Import this way to produce a more useful error message.
try:
import r... |
samuelefiorini/cgm-tools | refs/heads/master | cgmtools/__init__.py | 1 | ######################################################################
# Copyright (C) 2017 Samuele Fiorini, Chiara Martini, Annalisa Barla
#
# GPL-3.0 License
######################################################################
__version__ = "0.0.1a"
|
lucasRogerioOliveira/receitas-direcionadas | refs/heads/master | backend/apps/locale_app/__init__.py | 599 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
|
YGIronMan/python | refs/heads/master | Jimmy66/0006/0006.py | 34 | #!/bin/env python
# -*- coding: utf-8 -*-
import re
#返回英文单词列表
def list1(string):
words = re.findall(r'[a-zA-Z]+\b',string) #修改了正则表达式
return words
#从文件中读取数据
def file_read(filename):
with open(filename,'r') as fp:
article = fp.read()
return article
#计算出出现最多的单词
def most_word_number(word_list):
str_dict = {}... |
rubiojr/surface3-kernel | refs/heads/master | arch/ia64/scripts/unwcheck.py | 13143 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... |
vrieni/orange | refs/heads/master | Orange/orng/orngInteract.py | 6 | #
# Module Orange Interactions
# --------------------------
#
# CVS Status: $Id$
#
# Author: Aleks Jakulin (jakulin@acm.org)
# (Copyright (C)2004 Aleks Jakulin)
#
# Purpose: Analysis of dependencies between attributes given the class.
# 3-WAY INTERACTIONS
#
# Project initiated on 2003/05/08
#
# ChangeLog:
# ... |
lazywei/scikit-learn | refs/heads/master | examples/ensemble/plot_voting_decision_regions.py | 230 | """
==================================================
Plot the decision boundaries of a VotingClassifier
==================================================
Plot the decision boundaries of a `VotingClassifier` for
two features of the Iris dataset.
Plot the class probabilities of the first sample in a toy dataset
pred... |
xen0l/ansible | refs/heads/devel | lib/ansible/plugins/connection/jail.py | 16 | # Based on local.py by Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py by Maykel Moya <mmoya@speedyrails.com>
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>
# Copyright (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYIN... |
isandlaTech/cohorte-devtools | refs/heads/master | qualifier/deploy/cohorte-home/repo/sleekxmpp/plugins/xep_0086/stanza.py | 14 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.stanza import Error
from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin
class LegacyError(... |
zengenti/ansible | refs/heads/devel | lib/ansible/module_utils/_text.py | 62 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
zhukaixy/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/idlelib/idle_test/htest.py | 59 | '''Run human tests of Idle's window, dialog, and popup widgets.
run(*tests)
Run each callable in tests after finding the matching test spec in this file.
If there are none, run an htest for each spec dict in this file after finding
the matching callable in the module named in the spec.
In a tested module, let X be a ... |
vipul-sharma20/oh-mainline | refs/heads/master | mysite/search/migrations/0037_questions_hold_notes_and_details_labels.py | 17 | # This file is part of OpenHatch.
# Copyright (C) 2010 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... |
endlessm/chromium-browser | refs/heads/master | third_party/catapult/third_party/gae_ts_mon/gae_ts_mon/protobuf/google/protobuf/internal/python_message.py | 35 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... |
kallimachos/CodeEval | refs/heads/master | longest_word.py | 1 | import sys
source = open(sys.argv[1], 'r').readlines()
for line in source:
line = line.strip().split()
result = line.pop(0)
for word in line:
if len(word) > len(result):
result = word
print(result)
|
blckshrk/Weboob | refs/heads/master | modules/dailymotion/pages.py | 1 | # -*- coding: utf-8 -*-
# Copyright(C) 2011 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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 opt... |
reneenoble/ckanext-iframeview | refs/heads/master | ckanext/iframeview/tests/test_plugin.py | 1 | """Tests for plugin.py."""
import ckanext.iframeview.plugin as plugin
def test_plugin():
pass |
escapewindow/mozharness | refs/heads/master | configs/builds/releng_sub_linux_configs/32_debug.py | 2 | MOZ_OBJDIR = 'obj-firefox'
config = {
'default_actions': [
'clobber',
'clone-tools',
'setup-mock',
'build',
'generate-build-props',
# 'generate-build-stats', debug skips this action
'symbols',
'packages',
'upload',
'sendchanges',
... |
MingLin-home/Ming_slim | refs/heads/master | nets/resnet_v2.py | 13 | # 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 applicable ... |
peterfpeterson/mantid | refs/heads/master | Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py | 3 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... |
biddisco/VTK | refs/heads/master | ThirdParty/Twisted/twisted/lore/latex.py | 14 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
LaTeX output support for Lore.
"""
from xml.dom import minidom as dom
import os.path, re
from cStringIO import StringIO
import urlparse
from twisted.web import domhelpers
from twisted.python import text, procutils
import tree
escapingRE = ... |
zhuwenping/python-for-android | refs/heads/master | python3-alpha/python3-src/PC/VS8.0/build_ssl.py | 48 | # Script for building the _ssl and _hashlib modules for Windows.
# Uses Perl to setup the OpenSSL environment correctly
# and build OpenSSL, then invokes a simple nmake session
# for the actual _ssl.pyd and _hashlib.pyd DLLs.
# THEORETICALLY, you can:
# * Unpack the latest SSL release one level above your main Python ... |
ismailbaskin/FileUploaderBundle | refs/heads/master | Resources/public/lib/jquery-file-upload/server/gae-python/main.py | 245 | # -*- coding: utf-8 -*-
#
# jQuery File Upload Plugin GAE Python Example 2.2.0
# https://github.com/blueimp/jQuery-File-Upload
#
# Copyright 2011, Sebastian Tschan
# https://blueimp.net
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT
#
from __future__ import with_statement
from google.appe... |
kevchentw/nctu_hackathon | refs/heads/master | backend/web/product.py | 2 | from req import WebRequestHandler
from req import Service
import tornado
class WebProductHandler(WebRequestHandler):
@tornado.gen.coroutine
def get(self, action=None, product_id=None):
print(action)
if action == None:
err, data = yield from Service.Product.get_product({'id': self.id... |
chachan/nodeshot | refs/heads/master | nodeshot/networking/links/exceptions.py | 7 | class LinkException(Exception):
pass
class LinkDataNotFound(LinkException):
"""
Ip addresses or mac addresses not present in the database
"""
pass
class LinkNotFound(LinkException):
"""
Ip addresses or mac addresses are present but Link does not exist
"""
def __init__(self, *args... |
orgito/ansible | refs/heads/devel | lib/ansible/modules/network/routeros/routeros_facts.py | 33 | #!/usr/bin/python
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'support... |
dkarakats/edx-platform | refs/heads/master | lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py | 158 | # -*- coding: utf-8 -*-
from wiki.core.plugins.base import BasePlugin
from wiki.core.plugins import registry as plugin_registry
from course_wiki.plugins.markdownedx import mdx_circuit, mdx_mathjax, mdx_video
class ExtendMarkdownPlugin(BasePlugin):
"""
This plugin simply loads all of the markdown extensions ... |
dawnpower/nova | refs/heads/master | nova/tests/functional/v3/test_floating_ips_bulk.py | 33 | # Copyright 2014 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 agreed... |
hip-odoo/odoo | refs/heads/10.0 | addons/mail/models/mail_mail.py | 9 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import datetime
import logging
import psycopg2
import threading
from email.utils import formataddr
from odoo import _, api, fields, models
from odoo import tools
from odoo.addons.base.ir.ir_mail_server im... |
creyesp/RF_Estimation | refs/heads/master | Clustering/helpers/gap/invocaGap.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# invocaGap.py
#
# Copyright 2015 Carlos "casep" Sepulveda <carlos.sepulveda@gmail.com>
#
# 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;... |
openpgh/askpgh | refs/heads/master | askbot/migrations/0055_auto__chg_field_question_thread.py | 10 | # 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):
# Changing field 'Question.thread'
db.alter_column(u'question', 'thread_id', self.gf('django.db.models.fie... |
olasitarska/django | refs/heads/master | tests/file_uploads/urls.py | 41 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^upload/$', views.file_upload_view),
url(r'^verify/$', views.file_upload_view_verify),
url(r'^unicode_name/$', views.file_upload_unicode_name),
url(r'^echo/$', views.file_upload_echo),
url(r'^echo_content_type_extra/$', vi... |
lishensan/xbmc | refs/heads/master | lib/gtest/scripts/upload_gtest.py | 1963 | #!/usr/bin/env python
#
# Copyright 2009, 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... |
pombredanne/pyjs | refs/heads/master | pyjs/runners/mshtmlevents.py | 6 | import traceback
import sys
import ctypes
import comtypes
from comtypes.hresult import *
import comtypes.automation
import comtypes.typeinfo
import comtypes.connectionpoints
from comtypes.client import wrap
from comtypes.client.dynamic import Dispatch
from comtypes.gen import MSHTML
import logging
logger = logging.getL... |
kcpawan/django | refs/heads/master | django/db/migrations/recorder.py | 478 | from __future__ import unicode_literals
from django.apps.registry import Apps
from django.db import models
from django.db.utils import DatabaseError
from django.utils.encoding import python_2_unicode_compatible
from django.utils.timezone import now
from .exceptions import MigrationSchemaMissing
class MigrationRecor... |
alfredhq/alfred-db | refs/heads/develop | alfred_db/models/fix.py | 1 | from sqlalchemy import Column, Integer, Text, String, ForeignKey
from sqlalchemy.orm import relationship, backref
from .base import Base
class Fix(Base):
id = Column(Integer, primary_key=True)
description = Column(Text, nullable=False)
description_html = Column(Text, nullable=False)
path = Column(St... |
klim-iv/phantomjs-qt5 | refs/heads/qt5 | src/breakpad/src/tools/gyp/test/variables/gyptest-commands-ignore-env.py | 138 | #!/usr/bin/env python
# Copyright (c) 2009 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.
"""
Test that environment variables are ignored when --ignore-environment is
specified.
"""
import os
import TestGyp
os.environ['GYP_DEFI... |
phlax/pootle | refs/heads/master | pootle/__init__.py | 10 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from pootle.core.utils.version import get_ve... |
jasonwee/asus-rt-n14uhp-mrtg | refs/heads/master | src/lesson_data_persistence_and_exchange/sqlite3_row_factory.py | 1 | import sqlite3
db_filename = 'todo.db'
with sqlite3.connect(db_filename) as conn:
# Change the row factory to use Row
conn.row_factory = sqlite3.Row
cursor = conn.cursor()
cursor.execute("""
select name, description, deadline from project
where name = 'pymotw'
""")
name, description,... |
anthonydillon/horizon | refs/heads/master | openstack_dashboard/dashboards/project/images/images/views.py | 13 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... |
apple/swift-lldb | refs/heads/stable | packages/Python/lldbsuite/test/plugins/builder_base.py | 1 | """
If the build* function is passed the compiler argument, for example, 'llvm-gcc',
it is passed as a make variable to the make command. Otherwise, we check the
LLDB_CC environment variable; if it is defined, it is passed as a make variable
to the make command.
If neither the compiler keyword argument nor the LLDB_C... |
rgeleta/odoo | refs/heads/8.0 | addons/sale_service/models/__init__.py | 354 | import sale_service |
nagyistoce/devide | refs/heads/master | modules/vtk_basic/vtkSimpleImageFilterExample.py | 7 | # class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkSimpleImageFilterExample(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.