repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
simbs/edx-platform
refs/heads/master
lms/djangoapps/courseware/tests/test_video_xml.py
134
# -*- coding: utf-8 -*- # pylint: disable=protected-access """Test for Video Xmodule functional logic. These test data read from xml, not from mongo. We have a ModuleStoreTestCase class defined in common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You can search for usages of this in the cms and lms tests ...
xuerenlv/PaperWork
refs/heads/master
original_version/my_log.py
1
#coding:utf-8 """ Program: Description: Author: cheng chuan - chengc@nlp.nju.edu.cn Date: 2014-04-13 18:44:39 Last modified: 2014-04-14 06:28:29 Python release: 2.7.3 """ ''' Created on 2014��4��5�� @author: cc ''' import traceback try: import logging from storage_manager import SINAWEIBOSEARCH_LOG_TABLE_N...
geminy/aidear
refs/heads/master
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/sfntly/src/cpp/tools/test_data_generator_xml.py
7
# Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
knowmetools/welcome-mailer
refs/heads/master
welcome_mailer/handler.py
1
from __future__ import print_function import logging from logging.config import dictConfig from welcome_mailer import models, settings from welcome_mailer.backends.email import MandrillBackend dictConfig(settings.LOGGING_CONFIG) def lambda_handler(event, context, logger=None): """ Handle main lambda event """...
vstoykov/cmsplugin-newsplus
refs/heads/develop
cmsplugin_newsplus/south_migrations/0001_initial.py
4
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'News' db.create_table(u'cmsplugin_newsplus_news', ( ...
fangxingli/hue
refs/heads/master
desktop/libs/metadata/src/metadata/navigator_tests.py
1
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
wikimedia/integration-jenkins-job-builder
refs/heads/master
jenkins_jobs/modules/triggers.py
2
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # 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...
ncos/lisa
refs/heads/master
src/lisa_drive/scripts/venv/lib/python3.5/site-packages/pip-10.0.1-py3.5.egg/pip/_vendor/distlib/util.py
5
# # Copyright (C) 2012-2017 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 socket try:...
mozilla/make.mozilla.org
refs/heads/master
vendor-local/lib/python/south/introspection_plugins/annoying_autoonetoone.py
154
from django.conf import settings from south.modelsinspector import add_introspection_rules if 'annoying' in settings.INSTALLED_APPS: try: from annoying.fields import AutoOneToOneField except ImportError: pass else: #django-annoying's AutoOneToOneField is essentially a OneToOneField....
lsst-ts/ts_wep
refs/heads/master
tests/task/test_donutStamp.py
1
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
rxcomm/qtile
refs/heads/develop
libqtile/widget/notify.py
5
# -*- coding: utf-8 -*- # Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012 roger # Copyright (c) 2012-2014 Tycho Andersen # Copyright (c) 2012-2013 Craig Barnes # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # # Permission is he...
artificiallight92/foursquared.eclair
refs/heads/master
util/gen_class.py
262
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom HEADER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.types; %(imports)s /** * Auto-generated: %(timestamp)s * * @author Joe LaPenna (joe@joelapenna.com) */ public class %(type...
PyLearner/tp-qemu
refs/heads/master
qemu/tests/migration_multi_host_with_reboot.py
2
import logging import time import random from autotest.client.shared import error from autotest.client.shared import utils from virttest import utils_test from virttest import utils_misc @error.context_aware def run(test, params, env): """ KVM multi-host migration test: Migration execution progress is de...
craigrubino/trading-with-python
refs/heads/master
historicDataDownloader/historicDataDownloader.py
77
''' Created on 4 aug. 2012 Copyright: Jev Kuznetsov License: BSD a module for downloading historic data from IB ''' import ib import pandas from ib.ext.Contract import Contract from ib.opt import ibConnection, message from time import sleep import tradingWithPython.lib.logger as logger from pandas impor...
affo/nova
refs/heads/master
nova/tests/functional/v3/test_flavor_extraspecs.py
10
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
samuelsmiles/samuel
refs/heads/master
django-admin-sortable/sample_project/app/migrations/0001_initial.py
5
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Category' db.create_table(u'app_category', ( (u'id', self.gf('django.db.models.f...
navodissa/python-flask
refs/heads/master
flask/lib/python2.7/site-packages/pbr/tests/test_version.py
41
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # # 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 Licen...
iw3hxn/LibrERP
refs/heads/master
l10n_it_ade/bindings/vat_settlement_v_1_0__1_2_5.py
2
# flake8: noqa # -*- coding: utf-8 -*- # ./vat_settlement_v_1_0.py # PyXB bindings for NM:4f059617657cbf045796906b94fd6da476500108 # Generated 2019-02-18 23:13:40.047102 by PyXB version 1.2.5 using Python 2.7.5.final.0 # by Antonio Maria Vigliotti <antoniomaria.vigliotti@gmail.com> # Namespace urn:www.agenziaentrate.go...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v22/tests/template_tests/filter_tests/test_json_script.py
84
from django.test import SimpleTestCase from ..utils import setup class JsonScriptTests(SimpleTestCase): @setup({'json-tag01': '{{ value|json_script:"test_id" }}'}) def test_basic(self): output = self.engine.render_to_string( 'json-tag01', {'value': {'a': 'testing\r\njson \'st...
dkkline/CanSat14-15
refs/heads/master
excelify_log.py
1
import argparse import os import sys import csv from collections import deque from listener.parse import validate_line, parse_line from listener.exceptions import MalformedPacket, ParseError from listener.calculate import (calculate_temp_NTC, calculate_temp_LM35, calculate_press, calcula...
ChristianKniep/QNIB
refs/heads/master
serverfiles/usr/local/lib/networkx-1.6/build/lib/networkx/readwrite/tests/test_pajek.py
13
#!/usr/bin/env python """ Pajek tests """ from nose.tools import assert_equal from networkx import * import os,tempfile from io import open class TestPajek(object): def setUp(self): self.data="""*network Tralala\n*vertices 4\n 1 "A1" 0.0938 0.0896 ellipse x_fact 1 y_fact 1\n 2 "Bb" 0...
amazinger2013/OpenSesame
refs/heads/master
resources/android/PyQt4/QtCore.py
3
#-*- coding:utf-8 -*- """ This file is part of OpenSesame. OpenSesame 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. OpenSesame is distri...
honnibal/spaCy
refs/heads/master
spacy/lang/pl/punctuation.py
1
# coding: utf8 from __future__ import unicode_literals from ..char_classes import LIST_ELLIPSES, CONCAT_ICONS from ..char_classes import CONCAT_QUOTES, ALPHA, ALPHA_LOWER, ALPHA_UPPER _quotes = CONCAT_QUOTES.replace("'", "") _infixes = ( LIST_ELLIPSES + [CONCAT_ICONS] + [ r"(?<=[{al}])\.(?=[{au}]...
marcelocure/django
refs/heads/master
django/db/backends/mysql/operations.py
208
from __future__ import unicode_literals import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import six, timezone from django.utils.encoding import force_text class DatabaseOperations(BaseDatabaseOperations): compiler_module = "djan...
zhaodelong/django
refs/heads/master
tests/save_delete_hooks/tests.py
453
from __future__ import unicode_literals from django.test import TestCase from django.utils import six from .models import Person class SaveDeleteHookTests(TestCase): def test_basic(self): p = Person(first_name="John", last_name="Smith") self.assertEqual(p.data, []) p.save() self....
auduny/chains
refs/heads/master
lib/chains/services/benq/__init__.py
1
#!/usr/bin/python2 import sys import time from chains.service import Service from chains.common import log import serial from . import benq class BenqService(Service): def onInit(self): log('BenqService init.') self.model = self.config.get('model') or 'W6000' self.ser_dev = self.config....
cchurch/ansible
refs/heads/devel
lib/ansible/modules/system/authorized_key.py
35
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Brad Olson <brado@movedbylight.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versio...
CS-SI/QGIS
refs/heads/master
scripts/mkuidefaults.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** mkuidefaults.py --------------------- Date : June 2013 Copyright : (C) 2013 by Juergen E. Fischer Email : jef at norbit dot de **************************...
rbalda/neural_ocr
refs/heads/master
env/lib/python2.7/site-packages/django/core/cache/__init__.py
230
""" Caching framework. This package defines set of cache backends that all conform to a simple API. In a nutshell, a cache is a set of values -- which can be any object that may be pickled -- identified by string keys. For the complete API, see the abstract BaseCache class in django.core.cache.backends.base. Client ...
lutris/lutris
refs/heads/master
lutris/util/xdgshortcuts.py
1
"""XDG shortcuts handling""" import os import shutil import stat from textwrap import dedent from gi.repository import GLib from lutris.settings import CACHE_DIR from lutris.util import system from lutris.util.log import logger def get_xdg_entry(directory): """Return the path for specific user folders""" sp...
sprin/sphinx-contour-docs
refs/heads/master
contour_docs/contour_docs.py
1
""" Sphinx extension to create links to Contour documents (typically requirements items). :contour:`1412342` links to https://www.contourhosted.com/perspective.req?projectId=2271&docId=1412342 when CONTOUR_PROJECT_ID = 2271 in Sphinx's conf.py. """ import urllib from docutils import nodes, utils ...
mcking49/apache-flask
refs/heads/master
Python/Lib/site-packages/pylint/test/input/func_w0623_py_30.py
7
"""Test for W0623, overwriting names in exception handlers.""" # pylint: disable=broad-except,bare-except,print-statement,no-absolute-import,duplicate-except import exceptions __revision__ = '' class MyError(Exception): """Special exception class.""" pass def some_function(): """A function.""" exc =...
rgayon/plaso
refs/heads/master
plaso/parsers/bencode_parser.py
1
# -*- coding: utf-8 -*- """Parser for bencoded files.""" from __future__ import unicode_literals import re import os import bencode from plaso.lib import errors from plaso.parsers import interface from plaso.parsers import logger from plaso.parsers import manager class BencodeParser(interface.FileObjectParser): ...
SpAiNiOr/mystudy
refs/heads/master
learning/pynetwork/socketclient.py
1
import socket s = socket.socket() host = socket.gethostname() port = 51234 s.connect((host,port)) print s.recv(1024)
9livesdata/whylog
refs/heads/master
whylog/assistant/regex_assistant/regex_match.py
4
import six from whylog.assistant.pattern_match import ParamGroup, PatternMatch from whylog.assistant.regex_assistant.guessing import guess_pattern_match from whylog.assistant.regex_assistant.regex import NotMatchingRegexError, regex_groups, verify_regex from whylog.assistant.validation_problems import NotMatchingPatte...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/wearables/dress/shared_dress_s10.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/dress/shared_dress_s10.iff" result.attribute_template_id ...
skg-net/ansible
refs/heads/devel
test/units/modules/network/netact/test_netact_cm_command.py
12
""" netact_cm_command unit tests """ # -*- coding: utf-8 -*- # (c) 2017, Nokia # 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 ...
MicroPyramid/Django-CRM
refs/heads/master
teams/migrations/0004_teams_company.py
1
# Generated by Django 2.2.10 on 2020-04-24 09:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("common", "0020_auto_20200409_1653"), ("teams", "0003_auto_20190909_1621"), ] operations = [ migrat...
poldrack/openfmri
refs/heads/master
openfmri_paper/5.2.3_make_ICA_acc_figure.py
1
#!/usr/bin/env python """ create classifier accuracy figure for openfmri paper """ import pickle import numpy as N import matplotlib matplotlib.use('pdf') import matplotlib.pyplot as plt from get_randperm_data import * basedir='/corral-repl/utexas/poldracklab/openfmri/analyses/paper_analysis_May2013/classifier' f=o...
40223123/finaltest2
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/configparser.py
692
"""Configuration file parser. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. Intrinsic defaults can be specified by passing them into the ConfigParser constructor as a dictionary. class: ConfigParse...
dymkowsk/mantid
refs/heads/master
Framework/PythonInterface/plugins/algorithms/ResNorm.py
3
#pylint: disable=no-init from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, AlgorithmFactory from mantid.kernel import StringListValidator, StringMandatoryValidator from mantid.simpleapi import * from mantid import config, logger import os class ResNorm(PythonAl...
rishilification/phantomjs
refs/heads/master
src/qt/qtwebkit/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py
1050
#!/usr/bin/env python # # Copyright 2006, 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...
GitHublong/hue
refs/heads/master
apps/hbase/gen-py/hbased/constants.py
263
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import *
jcnils/ProgramacaoBasica-Python
refs/heads/master
codeskulptor/comedor_de_abacates.py
1
import simplegui abacate = 0 # Handler for mouse click def comer_abacate(): global abacate abacate += 1 # Handler to draw on canvas def draw(canvas): global abacate mensagem = 'Comeram {0} abacates'.format(abacate) canvas.draw_text(mensagem, [50,112], 48, "Green") # Create a frame and assign c...
Designist/audacity
refs/heads/master
lib-src/lv2/sord/waflib/Tools/__init__.py
1037
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
gavin-feng/odoo
refs/heads/8.0
openerp/addons/base/res/__init__.py
384
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
SamiHiltunen/invenio-demosite
refs/heads/master
invenio_demosite/base/fixtures/bibexport.py
4
# -*- coding: utf-8 -*- # # This file is part of Invenio Demosite. # Copyright (C) 2013 CERN. # # Invenio Demosite 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...
shsingh/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_ontap_info.py
21
#!/usr/bin/python # (c) 2018 Piotr Olczak <piotr.olczak@redhat.com> # (c) 2018-2019, NetApp, 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': '...
mapio/heroku-log4mongo
refs/heads/master
heroku-log4mongo/__init__.py
1
# Copyright 2011, Massimo Santini <santini@dsi.unimi.it> # # This file is part of "free-logging". # # "No Fuss Bookmarks" 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 (...
uberamd/NGECore2
refs/heads/master
scripts/object/weapon/ranged/droid/droid_rocket_launcher.py
85615
import sys def setup(core, object): return
jabesq/home-assistant
refs/heads/dev
homeassistant/components/workday/__init__.py
36
"""Sensor to indicate whether the current day is a workday."""
zenlambda/pip
refs/heads/develop
pip/_vendor/lockfile/linklockfile.py
466
from __future__ import absolute_import import time import os from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class LinkLockFile(LockBase): """Lock access to a file using atomic property of link(2). >>> lock = LinkLockFile('somefile') >>> lock = LinkL...
trabacus-softapps/openerp-8.0-cc
refs/heads/master
openerp/addons/sale_analytic_plans/__openerp__.py
119
# -*- 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...
kentatogashi/ansible
refs/heads/devel
v1/ansible/inventory/script.py
109
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
holygits/incubator-airflow
refs/heads/master
airflow/task_runner/__init__.py
40
# -*- coding: utf-8 -*- # # 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 ...
lepistone/odoo
refs/heads/master
addons/survey_crm/survey.py
385
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
prculley/gramps
refs/heads/master
gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py
5
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # # 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 you...
vnsofthe/odoo
refs/heads/8.0
addons/delivery/sale.py
51
# -*- 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...
openhab/openhab.android
refs/heads/master
travis/validate-app-strings.py
1
#!/usr/bin/env python3 import glob import re exitCode = 0 def checkStrings(flavor): errorCount = 0 print("Checking " + flavor + " app strings...") appStringsFiles = glob.glob('mobile/src/' + flavor + '/res/values-*/strings.xml') for file in appStringsFiles: lang = file[27:-12] print("...
woshilapin/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/win/gyptest-macros-containing-gyp.py
344
#!/usr/bin/env python # 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. """ Handle VS macro expansion containing gyp variables. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGy...
cpennington/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/helpers.py
4
""" Utility methods for unit tests. """ import filecmp from path import Path as path from xblock.reference.user_service import UserService, XBlockUser def directories_equal(directory1, directory2): """ Returns True if the 2 directories have equal content, else false. """ def compare_dirs(dir1, dir2...
a5kin/hecate
refs/heads/master
xentica/seeds/random.py
1
""" The module for package-wide RNG. The main intention is to keep separate deterministic random streams for every :class:`CellularAutomaton<xentica.core.base.CellularAutomaton>` instance. So, if you've initialized RNG for a particular CA with some seed, you're geting the guarantee that the random sequence will be the...
liqi328/rjrepaircompany
refs/heads/master
django/template/defaulttags.py
151
"""Default tags used by the template system, available to all templates.""" import sys import re from itertools import groupby, cycle as itertools_cycle from django.template.base import Node, NodeList, Template, Context, Variable from django.template.base import TemplateSyntaxError, VariableDoesNotExist, BLOCK_TAG_ST...
Forage/Gramps
refs/heads/trunk
gramps/gen/filters/rules/person/_nodeathdate.py
1
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
lirui-intel/Impala
refs/heads/cdh5-trunk
thirdparty/thrift-0.9.0/lib/py/src/protocol/TBinaryProtocol.py
210
# # 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...
harrisonfeng/gunicorn
refs/heads/master
examples/frameworks/pylonstest/pylonstest/lib/app_globals.py
38
"""The application's Globals object""" class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initialization and is available during requests v...
bschuon/django-oscar
refs/heads/master
src/oscar/apps/shipping/__init__.py
59
default_app_config = 'oscar.apps.shipping.config.ShippingConfig'
wolverineav/horizon
refs/heads/master
openstack_dashboard/test/integration_tests/regions/menus.py
5
# 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 # d...
FNCS/ns-3.22
refs/heads/master
src/tap-bridge/examples/tap-wifi-virtual-machine.py
137
# -*- Mode: Python; -*- # # Copyright 2010 University of Washington # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation; # # This program is distributed in the hope that it will be usefu...
todaychi/hue
refs/heads/master
desktop/core/ext-py/pysqlite/doc/includes/sqlite3/complete_statement.py
49
# A minimal SQLite shell for experiments from pysqlite2 import dbapi2 as sqlite3 con = sqlite3.connect(":memory:") con.isolation_level = None cur = con.cursor() buffer = "" print "Enter your SQL commands to execute in SQLite." print "Enter a blank line to exit." while True: line = raw_input() if line == ""...
raccoongang/edx-platform
refs/heads/ginkgo-rg
lms/djangoapps/grades/tasks.py
1
""" This module contains tasks for asynchronous execution of grade updates. """ from logging import getLogger import six from celery import task from celery_utils.logged_task import LoggedTask from celery_utils.persist_on_failure import PersistOnFailureTask from django.conf import settings from django.contrib.auth.mo...
TheTypoMaster/calligra
refs/heads/master
3rdparty/google-breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py
261
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
pearl-core/pearl
refs/heads/master
tests/test_pearllib/test_package.py
1
from unittest import mock import pytest from pearllib.exceptions import PackageAlreadyInstalledError, \ HookFunctionError, PackageNotInstalledError, PackageRequiredByOtherError from pearllib.package import install_package, remove_package, list_packages, update_package, emerge_package, \ create_package, info_p...
saurabh6790/tru_app_back
refs/heads/master
test/doctype/test_result_details/test_result_details.py
798
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl
pravsripad/mne-python
refs/heads/master_dev
mne/fixes.py
4
"""Compatibility fixes for older versions of libraries If you add content to this file, please give the version of the package at which the fix is no longer needed. # originally copied from scikit-learn """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquau...
romankagan/DDBWorkbench
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/gdal/prototypes/srs.py
321
from ctypes import c_char_p, c_int, c_void_p, POINTER 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 p...
gabrielfalcao/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/db/models/loading.py
308
"Utilities for loading models and the modules that contain them." from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule im...
MinoochX/bproj-mxk
refs/heads/r100
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # 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. from collections import defaultdict def aut...
lunixbochs/vaporbat
refs/heads/master
vaporbat/steam/protobuf/htmlmessages_pb2.py
1
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: htmlmessages.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _...
rickerc/nova_audit
refs/heads/cis-havana-staging
nova/api/openstack/compute/plugins/v3/coverage.py
7
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 # # ...
JGiola/swift
refs/heads/SR-11588
utils/pass-pipeline/scripts/pipelines_build_script.py
33
#!/usr/bin/env python import argparse import os import subprocess import sys import textwrap # Append the src dir sys.path.append(os.path.join(os.path.dirname( os.path.dirname(os.path.abspath(__file__))), 'src')) import passes # noqa (E402 module level import not at top of file) # TODO: This should not be hard...
sxjscience/tvm
refs/heads/master
tests/python/unittest/test_tir_analysis_verify_memory.py
5
# 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...
aLagoG/kygerand
refs/heads/master
ger/TTP/SV3/2105.py
1
def isCoast(i, j): #up if(i >= 0): if picture[i-1][j] == '-': return True #down if(i < n): if picture[i+1][j] == '-': return True #left if(j != 0): if picture[i][j-1] == '-': return True #right if(j < m): if picture[i][j+1] == '-': return True return False n, m = [int(k) for k in raw_input().split()...
diedthreetimes/VCrash
refs/heads/master
src/mesh/bindings/callbacks_list.py
138
callback_classes = [ ['void', 'ns3::Mac48Address', 'ns3::Mac48Address', 'unsigned int', 'bool', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'unsigned int', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::dot11s::PeerLink::PeerState', 'ns3::dot11s::PeerLink::PeerState', 'ns3::...
atumanov/ray
refs/heads/master
python/ray/rllib/agents/ppo/ppo.py
1
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from ray.rllib.agents import with_common_config from ray.rllib.agents.ppo.ppo_policy import PPOTFPolicy from ray.rllib.agents.trainer_template import build_trainer from ray.rllib.optimizers impo...
fossilet/ansible
refs/heads/devel
lib/ansible/plugins/action/debug.py
2
# Copyright 2012, Dag Wieers <dag@wieers.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 versi...
StackStorm/st2
refs/heads/master
st2common/st2common/transport/connection_retry_wrapper.py
3
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
erykoff/longdouble_conv
refs/heads/master
longdouble_conv/longdouble_lib.py
1
""" longdouble_conv Copyright (C) 2013 Eli Rykoff, SLAC. erykoff at gmail dot 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; either version 2 of the License, or (at your optio...
Mazecreator/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/callbacks.py
15
# Copyright 2015 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...
BartVB/ansible-modules-core
refs/heads/devel
utilities/logic/fail.py
198
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 Lice...
gem/geonode
refs/heads/2.6.x
geonode/contrib/metadataxsl/urls.py
29
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
meletakis/collato
refs/heads/master
lib/python2.7/site-packages/django/contrib/gis/shortcuts.py
234
import zipfile from io import BytesIO from django.conf import settings from django.http import HttpResponse from django.template import loader def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = BytesIO() zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED) zf.writestr('do...
jhg/django
refs/heads/master
django/core/context_processors.py
77
import warnings from django.template.context_processors import * # NOQA from django.utils.deprecation import RemovedInDjango20Warning warnings.warn( "django.core.context_processors is deprecated in favor of " "django.template.context_processors.", RemovedInDjango20Warning, stacklevel=2)
sahilTakiar/spark
refs/heads/master
examples/src/main/python/py_container_checks.py
48
# # 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 us...
keen99/SickRage
refs/heads/master
lib/hachoir_core/field/sub_file.py
95
from hachoir_core.field import Bytes from hachoir_core.tools import makePrintable, humanFilesize from hachoir_core.stream import InputIOStream class SubFile(Bytes): """ File stored in another file """ def __init__(self, parent, name, length, description=None, parser=None, filename=None, mime_type=N...
kennethreitz/pipenv
refs/heads/master
pipenv/vendor/jinja2/nodes.py
7
# -*- coding: utf-8 -*- """AST nodes generated by the parser for the compiler. Also provides some node tree helper functions used by the parser and compiler in order to normalize nodes. """ import operator from collections import deque from markupsafe import Markup from ._compat import izip from ._compat import PY2 f...
charlescearl/VirtualMesos
refs/heads/mesos-vm
frameworks/mpi/startmpd.py
4
#!/usr/bin/env python import mesos import mesos_pb2 import sys import time import os import atexit from subprocess import * def cleanup(): try: # TODO(*): This will kill ALL mpds...oops. print "cleanup" os.waitpid(Popen("pkill -f /usr/local/bin/mpd", shell=True).pid, 0) except Exception, e: print ...
ccnmtl/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/queries/models.py
38
""" Various complex queries that have been problematic in the past. """ import threading from django.db import models class DumbCategory(models.Model): pass class NamedCategory(DumbCategory): name = models.CharField(max_length=10) class Tag(models.Model): name = models.CharField(max_length=10) pare...
andfoy/github-webhooks
refs/heads/master
main_webhook.py
1
#!/usr/bin/env python import os import sys import log import base64 import webhook import tornado.web import tornado.ioloop import websocket_handler clr = 'clear' if os.name == 'nt': clr = 'cls' def main(): secret = os.environ.get('WEBHOOK_SECRET') if not secret: print "Webhook secret variable must be d...
lasalesi/erpnext
refs/heads/develop
erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py
73
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils import cint from dateutil.relativedelta import relativedelta class ...