repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
L--U--P--U--S/skeleton
refs/heads/cassis
antismash/core.py
1
'''Core antiSMASH functionality''' import logging from antismash.utils.access import ( get_cluster_features, sort_features, ) def run_antismash(seq_records, plugins, options): '''Run the antiSMASH pipeline''' options.record_idx = 1 options.orig_record_idx = 1 options.next_clusternr = 1 #F...
benklaasen/namebench
refs/heads/master
nb_third_party/dns/rdtypes/ANY/RT.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
FrankBian/kuma
refs/heads/master
vendor/lib/python/south/tests/deps_a/migrations/0003_a.py
2088
from south.db import db from django.db import models class Migration: def forwards(self): pass def backwards(self): pass
ryankell05/Gravity
refs/heads/master
lib/flask/testsuite/test_apps/blueprintapp/apps/admin/__init__.py
794
from flask import Blueprint, render_template admin = Blueprint('admin', __name__, url_prefix='/admin', template_folder='templates', static_folder='static') @admin.route('/') def index(): return render_template('admin/index.html') @admin.route('/index2') def index2(): ret...
natano/tiget
refs/heads/master
tiget/importer.py
1
import imp import sys from git_orm.importer import GitImporter, PATH_PREFIX DEFAULT_PATH = '{}/config'.format(PATH_PREFIX) def load(plugin): sys.path_hooks.append(GitImporter) if not DEFAULT_PATH in sys.path: sys.path.append(DEFAULT_PATH) def unload(plugin): if DEFAULT_PATH in sys.path: ...
bancek/egradebook
refs/heads/master
src/lib/django/utils/http.py
53
import calendar import datetime import re import sys import urllib import urlparse from email.Utils import formatdate from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"') MONTHS = 'jan feb mar apr may jun jul au...
frappe/erpnext
refs/heads/develop
erpnext/patches/v13_0/create_uae_pos_invoice_fields.py
1
# Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.regional.united_arab_emirates.setup import make_custom_fields def execute(): company = frappe.get_all('Company', filters = {'country': ['in', ['S...
hogarthj/ansible
refs/heads/devel
test/units/modules/network/nxos/test_nxos_vlan.py
42
# (c) 2016 Red Hat Inc. # # 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 dis...
zwhinmedia/TextRank
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- from distutils.core import setup LONGDOC = """ Please go to https://github.com/zwhinmedia/TextRank for more info. """ setup( name='textrank4zh', version='0.3', description='Extract keywords and abstract Chinese article', long_description=LONGDOC, author='Weihao Zhou', au...
davidzyx/PythonNotes
refs/heads/master
Part I/ch05_practice02.py
1
# List to Dictionary Function for Fantasy Game Inventory def displayInventory(inventory): print('Inventory:') count = 0 for i, j in inventory.items(): print(str(j) + ' ' + i) count += j print('Total number of items: ' + str(count)) def addToInventory(inventory, addedItems): for val...
fmoliveira/dokku
refs/heads/master
tests/apps/multi/app.py
118
import os from flask import Flask, render_template from werkzeug.wsgi import SharedDataMiddleware app = Flask(__name__) @app.route('/') def hello_world(): return render_template('index.html') app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { '/': os.path.join(os.path.dirname(__file__), 'static') }) app.wsgi_ap...
SerpentCS/odoo
refs/heads/8.0
addons/portal/wizard/share_wizard.py
224
# -*- 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 ...
kaixinjxq/crosswalk-test-suite
refs/heads/master
webapi/tct-pagevisibility-w3c-tests/inst.apk.py
1996
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
BorisJeremic/Real-ESSI-Examples
refs/heads/master
valgrind_test/test_cases/8NodeBrick/cantilever_irregular_element/shape3/horizontal_load/extract_numerical_solution.py
441
#!/usr/bin/python import h5py import sys import numpy as np import os import re import random # find the path to my own python function: cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own function for color and comparat...
semonte/intellij-community
refs/heads/master
python/testData/inspections/InconsistentIndentation/test.py
83
def foo(): <warning descr="Inconsistent indentation: mix of tabs and spaces"> </warning>print "foo" def bar(): print "foo" <warning descr="Inconsistent indentation: previous line used tabs, this line uses spaces"> </warning>print "bar" """ foo bar """ print foo( bar, baz )
pjg101/SickRage
refs/heads/master
lib/jsonrpclib/history.py
186
class History(object): """ This holds all the response and request objects for a session. A server using this should call "clear" after each request cycle in order to keep it from clogging memory. """ requests = [] responses = [] _instance = None @classmethod def instan...
agilgur5/LTLMoP
refs/heads/development
src/lib/simulator/ode/ckbot/loadModules.py
8
#!/usr/bin/env python """ This file contains all the functions needed for PyODE to create a configuration of CKBot modules. """ import ode, xode.parser import pygame from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import math, time, copy, sys from matrixFunctions import * def loadModuleOb...
caotianwei/django
refs/heads/master
tests/template_tests/filter_tests/test_join.py
362
from django.template.defaultfilters import join from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class JoinTests(SimpleTestCase): @setup({'join01': '{{ a|join:", " }}'}) def test_join01(self): output = self.engine.render_to_string('join01...
RobinD42/pyside
refs/heads/master
doc/pyhtml2devhelp.py
7
""" This script is based on Python2.6 Ubuntu package script: Copyright (C) 2009 Matthias Klose <doko@debian.org> Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version...
centic9/subversion-ppa
refs/heads/master
subversion/tests/cmdline/svndumpfilter_tests.py
2
#!/usr/bin/env python # # svndumpfilter_tests.py: testing the 'svndumpfilter' tool. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) u...
danilito19/django
refs/heads/master
tests/template_tests/syntax_tests/test_width_ratio.py
342
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from django.utils import six from ..utils import setup class WidthRatioTagTests(SimpleTestCase): libraries = {'custom': 'template_tests.templatetags.custom'} @setup({'widthratio01': '{% widthratio a b 0 %}'}) def test...
jtyr/ansible
refs/heads/devel
test/units/module_utils/basic/test_run_command.py
7
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import errno from itertools import product fr...
nwchandler/ansible
refs/heads/devel
test/units/modules/network/junos/test_junos_facts.py
29
# (c) 2017 Red Hat Inc. # # 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 dis...
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/ship/crafted/booster/heavy_fuel_cell_mk4.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/static/space/debris/tradefed_hulk_debris_s03.py
85615
import sys def setup(core, object): return
Dallinger/Dallinger
refs/heads/master
tests/test_api.py
1
"""Test python experiment API""" import mock import random from uuid import UUID import pytest import dallinger @pytest.fixture def exp(): from dallinger.experiment import Experiment return Experiment() class TestAPI(object): def test_uuid(self): from dallinger.experiment import Experiment ...
ironbox360/django
refs/heads/master
django/core/checks/messages.py
319
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.encoding import force_str, python_2_unicode_compatible # Levels DEBUG = 10 INFO = 20 WARNING = 30 ERROR = 40 CRITICAL = 50 @python_2_unicode_compatible class CheckMessage(object): def __init__(self, level, msg, hint=None, obj=Non...
mozilla-b2g/fxos-certsuite
refs/heads/master
mcts/securitysuite/__init__.py
7
# 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/. # The "securitycli" entry point for setuptools is imported from suite.py from suite import * # Import all available tes...
cosenal/osf.io
refs/heads/develop
framework/addons/utils.py
38
import os from json import load as load_json from mako.lookup import TemplateLookup CLASS_MAP = { 'full': 'success', 'partial': 'warning', 'none': 'danger', } CAPABILITY_SET = [ 'Permissions', 'View / download file versions', 'Add / update files', 'Delete files', 'Logs', 'Forking',...
jshoyer/plantcv
refs/heads/master
plantcv/get_nir.py
2
# Find NIR image import os import re import numpy as np def get_nir(path, filename, device, debug=None): """Find a corresponding NIR image from the same snapshot as the VIS image. Inputs: path = path to vis image filename = vis image file name device = pipeline step counter debug = ...
BrambleLLC/H4H_2014
refs/heads/master
flask_chat/chat.py
1
import re import unicodedata from socketio import socketio_manage from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin from werkzeug.exceptions import NotFound from gevent import monkey from random import randint from flask import Flask, Response, request, render_template...
lgscofield/odoo
refs/heads/8.0
addons/base_setup/__init__.py
439
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
highweb-project/highweb-webcl-html5spec
refs/heads/highweb-20160310
tools/json_schema_compiler/highlighters/hilite_me_highlighter.py
188
# 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 urllib import urllib2 class HiliteMeHighlighter(object): """Highlighter that calls the http://hilite.me API to highlight code. """ def GetC...
rosudrag/Freemium-winner
refs/heads/master
VirtualEnvironment/Lib/site-packages/pip-7.1.0-py3.4.egg/pip/_vendor/colorama/ansi.py
442
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' OSC = '\033]' BEL = '\007' def code_to_chars(code): return CSI + str(code) + 'm' class ...
ISA-tools/bii-webapp
refs/heads/master
bii_webapp/apps/create/parser.py
1
import xmltodict import xml.etree.ElementTree as ElementTree import xmltodict from bii_webapp.settings import common import os import csv configurations = {} def loadConfigurations(): directory = common.SITE_ROOT + '/config/' for root, dirs, files in os.walk(directory): for dir in dirs: ...
Obus/scikit-learn
refs/heads/master
sklearn/manifold/tests/test_spectral_embedding.py
216
from nose.tools import assert_true from nose.tools import assert_equal from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal from nose.tools import assert_raises from nose.plugins.skip import SkipTest from sk...
ArijanaBrlek/superset
refs/heads/master
superset/cli.py
2
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import celery from celery.bin import worker as celery_worker from datetime import datetime from subprocess import Popen from flask_m...
Agontuk/android_kernel_sony_u8500
refs/heads/marshmallow
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
cphelps76/kernel_lge_mako
refs/heads/db42
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
trnewman/VT-USRP-daughterboard-drivers
refs/heads/master
gr-pager/python/__init__.py
12
# # Copyright 2006 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. #...
davidzchen/tensorflow
refs/heads/master
tensorflow/python/keras/utils/conv_utils.py
5
# 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...
google/dopamine
refs/heads/master
dopamine/agents/rainbow/__init__.py
14
# coding=utf-8 # Copyright 2018 The Dopamine Authors. # # 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...
b0ttl3z/SickRage
refs/heads/master
lib/pgi/obj.py
18
# Copyright 2012, 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. import itertools fro...
oscaro/django
refs/heads/oscaro-backports-1.7.10
django/contrib/gis/db/models/query.py
1
from django.db import connections from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet from django.contrib.gis import memoryview from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringField from django.contrib....
gmorph/ardupilot
refs/heads/master
mk/VRBRAIN/Tools/genmsg/src/genmsg/msgs.py
51
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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 ...
cryptovein/p2pool-mintcoin
refs/heads/master
SOAPpy/URLopener.py
294
"""Provide a class for loading data from URL's that handles basic authentication""" ident = '$Id: URLopener.py 541 2004-01-31 04:20:06Z warnes $' from version import __version__ from Config import Config from urllib import FancyURLopener class URLopener(FancyURLopener): username = None passwd = None d...
Titulacion-Sistemas/PythonTitulacion-EV
refs/heads/master
Lib/site-packages/django/core/management/commands/compilemessages.py
98
from __future__ import unicode_literals import codecs import os from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import find_command, popen_wrapper from django.utils._os import npath def has_bom(fn): with open(fn, 'rb') as f: ...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ---------------------------------------------------------------------...
James-Firth/pip
refs/heads/develop
pip/operations/freeze.py
284
from __future__ import absolute_import import logging import re import pip from pip.compat import stdlib_pkgs from pip.req import InstallRequirement from pip.utils import get_installed_distributions from pip._vendor import pkg_resources logger = logging.getLogger(__name__) # packages to exclude from freeze output ...
seize-the-dave/XlsxWriter
refs/heads/master
xlsxwriter/test/comparison/test_chart_name02.py
8
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
klmitch/nova
refs/heads/master
nova/tests/unit/cmd/test_common.py
3
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
Jmainguy/ansible-modules-extras
refs/heads/devel
system/gluster_volume.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Taneli Leppä <taneli@crasman.fi> # # This file is part of Ansible (sort of) # # 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 o...
kawamon/hue
refs/heads/master
desktop/core/ext-py/pytest-django-3.10.0/tests/test_manage_py_scan.py
2
import pytest @pytest.mark.django_project(project_root="django_project_root", create_manage_py=True) def test_django_project_found(django_testdir): # XXX: Important: Do not chdir() to django_project_root since runpytest_subprocess # will call "python /path/to/pytest.py", which will impliclity add cwd to #...
wwj718/django-rest-framework
refs/heads/master
tests/test_decorators.py
82
from __future__ import unicode_literals from django.test import TestCase from rest_framework import status from rest_framework.authentication import BasicAuthentication from rest_framework.decorators import ( api_view, authentication_classes, parser_classes, permission_classes, renderer_classes, throttle_clas...
kartikgupta0909/gaia
refs/heads/master
src/bindings/pygaia/classification/evaluation.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Gaia # # Gaia 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 Fou...
eliz79/is210-week-07-warmup
refs/heads/master
task_04.py
1
#! usr/bin/env python # *-* coding: utf-8 *-* """This is a looping module.""" TOTAL_SUM = ['1', '2', '3'] def process_data(data): """Looping list with for loop. Args: data(list): A list or tuple of numbers. Returns: tuple: A tuple containing the sums of the data and average with...
0x0all/kaggle-galaxies
refs/heads/master
try_convnet_cc_multirotflip_3x69r45_maxout2048_extradense_big256.py
7
import numpy as np # import pandas as pd import theano import theano.tensor as T import layers import cc_layers import custom import load_data import realtime_augmentation as ra import time import csv import os import cPickle as pickle from datetime import datetime, timedelta # import matplotlib.pyplot as plt # plt.i...
rromo12/EECS-337-Recipe-Transformer-Team-9
refs/heads/master
Team9/parser.py
2
from bs4 import BeautifulSoup import requests import nltk import sys import re from fractions import Fraction from collections import Counter from decimal import * # Import units list from units import unitslist, abbreviations, abbrToFull from methods import methodslist, primary_methods from tools import methodToTools...
LeZhang2016/openthread
refs/heads/master
tools/harness-automation/cases/ed_6_5_3.py
6
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # notic...
derekjamescurtis/veritranspay
refs/heads/master
veritranspay/mixins.py
1
from . import validators class ValidatableMixin(object): ''' Provides a mechanism for validating the attributes of an object instance. Expects a dictionary named _validators to be provided with keys that represent the names of attributes to be validated, mapped to an instance of a class in the mod...
lseyesl/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/path.py
191
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
zieckey/sdhash
refs/heads/master
external/tools/build/v2/tools/types/asm.py
34
# Copyright Craig Rodrigues 2005. # Copyright (c) 2008 Steven Watanabe # # Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from b2.build import type def register(): type.register_type('ASM', ['s', 'S', 'asm']) ...
toshywoshy/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_user_device_access_list.py
7
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
nexusriot/cinder
refs/heads/master
cinder/tests/unit/test_volume_glance_metadata.py
9
# Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack Foundation # Copyright 2011 University of Southern California # 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 # ...
conates/credenciales_rpm
refs/heads/master
frontend/views.py
1
# -*- encoding: utf-8 -*- from django.shortcuts import render, redirect from django.template.response import TemplateResponse from django.conf import settings # Create your views here. def home(request): return render(request, 'home.html')
trivoldus28/pulsarch-verilog
refs/heads/master
tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/commands.py
120
"""Execute shell commands via os.popen() and return status, output. Interface summary: import commands outtext = commands.getoutput(cmd) (exitstatus, outtext) = commands.getstatusoutput(cmd) outtext = commands.getstatus(file) # returns output of "ls -ld file" A trailing newline is remov...
EduPepperPDTesting/pepper2013-testing
refs/heads/www0
lms/djangoapps/tnl_integration/migrations/0007_auto__del_field_tnldomains_edagancy_id__add_field_tnldomains_edagency_.py
1
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'TNLDomains.edagancy_id' db.delete_column('tnl_domains', 'edagancy_id') # Adding f...
ingokegel/intellij-community
refs/heads/master
python/testData/formatter/pyramidFromImportFormatting_after.py
30
from module import foo from module import ( foo, bar, ) from module import ( foo, bar, ) from module import ( foo, bar, # comment ) from module import ( foo, bar, )
sgraham/nope
refs/heads/master
tools/json_schema_compiler/idl_schema_test.py
46
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import idl_schema import unittest from json_parse import OrderedDict def getFunction(schema, name): for item in schema['functio...
Droid-Concepts/DC-Elite_kernel_jf
refs/heads/dc43
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...
BehavioralInsightsTeam/edx-platform
refs/heads/release-bit
scripts/xsslint/xsslint/utils.py
15
""" Utility classes/functions for the XSS Linter. """ import re def is_skip_dir(skip_dirs, directory): """ Determines whether a directory should be skipped or linted. Arguments: skip_dirs: The configured directories to be skipped. directory: The current directory to be tested. Return...
apache/incubator-airflow
refs/heads/master
airflow/contrib/hooks/segment_hook.py
7
# # 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...
sushramesh/lwc
refs/heads/master
lib/python2.7/site-packages/pip/commands/search.py
323
from __future__ import absolute_import import logging import sys import textwrap from pip.basecommand import Command, SUCCESS from pip.download import PipXmlrpcTransport from pip.index import PyPI from pip.utils import get_terminal_size from pip.utils.logging import indent_log from pip.exceptions import CommandError ...
gioenn/xSpark
refs/heads/dependabot/maven/fasterxml.jackson.version-2.10.1
examples/src/main/python/sort.py
77
# # 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...
viciantomas/TTSFB
refs/heads/master
lib/sleekxmpp/plugins/xep_0050/__init__.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.plugins.base import register_plugin from sleekxmpp.plugins.xep_0050.stanza import Command from sleekxmpp.plugin...
ecolitan/fatics
refs/heads/master
venv/lib/python2.7/site-packages/pycparser/ply/ctokens.py
363
# ---------------------------------------------------------------------- # ctokens.py # # Token specifications for symbols in ANSI C and C++. This file is # meant to be used as a library in other tokenizers. # ---------------------------------------------------------------------- # Reserved words tokens = [ # Li...
jinutm/silvfinal
refs/heads/master
vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.0/ext/nokogiri/tmp/i686-linux-gnu/ports/libxml2/2.8.0/libxml2-2.8.0/python/tests/reader2.py
87
#!/usr/bin/python -u # # this tests the DTD validation with the XmlTextReader interface # import sys import glob import string import StringIO import libxml2 # Memory debug specific libxml2.debugMemory(1) err="" expect="""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute...
Lujeni/ansible
refs/heads/devel
lib/ansible/plugins/lookup/etcd.py
84
# (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com> # (m) 2016, Mihai Moldovanu <mihaim@tfm.ro> # (m) 2017, Juan Manuel Parrilla <jparrill@redhat.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 #...
ryfeus/lambda-packs
refs/heads/master
Keras_tensorflow/source/tensorflow/contrib/tfprof/python/tools/tfprof/tfprof_logger.py
48
# 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...
sotogarcia/odoo-development
refs/heads/master
_assets_/enterprise_name/module.py
2
# -*- coding: utf-8 -*- from os import path import abc import sys import getopt import xml.etree.ElementTree as ElementTree import re class EventHook(object): # http://www.voidspace.org.uk/python/weblog/arch_d7_2007_02_03.shtml#e616 def __init__(self): self.__handlers = [] def __iadd__(self, ha...
vectorijk/servo
refs/heads/master
tests/wpt/run.py
38
# 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 argparse import multiprocessing import os import sys here = os.path.split(__file__)[0] servo_root = os.path.absp...
2015fallproject/2015fallcase1
refs/heads/master
static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_mimetypes.py
111
import io import locale import mimetypes import sys import unittest from test import support # Tell it we don't know about external files: mimetypes.knownfiles = [] mimetypes.inited = False mimetypes._default_mime_types() class MimeTypesTestCase(unittest.TestCase): def setUp(self): self.db = mimetypes.M...
sogelink/ansible
refs/heads/devel
test/units/modules/network/ovs/test_openvswitch_bridge.py
76
# # (c) 2016 Red Hat Inc. # # 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 d...
deKupini/erp
refs/heads/master
addons/account/account_move_line.py
1
# -*- 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...
bkmeneguello/surveillance
refs/heads/master
surveillance/__main__.py
1
import argparse import atexit import logging import pathlib import yaml def main(): parser = argparse.ArgumentParser(description='Capture and record from various input sources.') parser.add_argument('-c', '--config', default='/etc/surveillance.conf', help='configuration file path') parser.add_argument('-...
stinos/micropython
refs/heads/master
tests/basics/async_await2.py
9
# test await expression try: import usys as sys except ImportError: import sys if sys.implementation.name == 'micropython': # uPy allows normal generators to be awaitables coroutine = lambda f: f else: import types coroutine = types.coroutine @coroutine def wait(value): print('wait value:'...
spodkowinski/bootils
refs/heads/master
src/tests/test_package.py
2
# *- coding: utf-8 -*- # pylint: disable=wildcard-import, missing-docstring, no-self-use, bad-continuation """ Test the package metadata. """ # Copyright © 2015 1&1 Group <btw-users@googlegroups.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wi...
valtech-mooc/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/video_outlines/views.py
16
""" Video Outlines We only provide the listing view for a video outline, and video outlines are only displayed at the course level. This is because it makes it a lot easier to optimize and reason about, and it avoids having to tackle the bigger problem of general XBlock representation in this rather specialized format...
bhansa/fireball
refs/heads/master
pyvenv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
2057
try: # Python 3.2+ from ssl import CertificateError, match_hostname except ImportError: try: # Backport of the function from a pypi module from backports.ssl_match_hostname import CertificateError, match_hostname except ImportError: # Our vendored copy from ._implementati...
diffdibb/diffdibb
refs/heads/master
diffdibb/source/__init__.py
1
# -*- coding: utf-8 -*- # # diffdibb : tools to audit databases. # # Copyright (C) 2015, diffdibb # https://github.com/diffdibb # # 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...
cible/djangotribune
refs/heads/master
djangotribune/clocks.py
3
# -*- coding: utf-8 -*- """ Tools to manipulate clocks """ import datetime, re from djangotribune.parser import POST_CLEANER_CLOCK_RE PARSER_EXCEPTION_TYPERROR_EXPLAIN = "Unvalid clock format, should be 00:00[:00][^1]" class ClockIndice(int): """ ClockIndice accept an integer, his ``__str__`` method return a ...
CyanideL/android_kernel_sony_msm8974
refs/heads/cm-12.1
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
SOM-st/PySOM
refs/heads/master
src/som/vm/universe.py
2
import os import time from rlib import jit from rlib.string_stream import encode_to_bytes from rlib.exit import Exit from rlib.osext import path_split from som.compiler.bc.method_generation_context import create_bootstrap_method from som.interpreter.bc.frame import create_bootstrap_frame from som.interp_type import ...
ds-hwang/chromium-crosswalk
refs/heads/master
third_party/markdown/postprocessors.py
109
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
Programeiros/TycotBot
refs/heads/master
db/inserts.py
2
from .models.base import Base, engine, session from .queries import make_query from .models.group import Group from .models.user import User def commit(): '''Commit the changes to database''' session.commit() def close(): '''Close the session connection with the database''' session.close() def com...
carlocaione/linux-meson
refs/heads/master
scripts/gdb/linux/cpus.py
997
# # gdb helper commands and functions for Linux kernel debugging # # per-cpu tools # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import tasks, utils MAX_CPUS = 4096 def get_cu...
mafiya69/sympy
refs/heads/master
bin/generate_test_list.py
57
""" Execute like this: $ python bin/generate_test_list.py tests = [ 'sympy.concrete.tests', 'sympy.core.tests', 'sympy.functions.combinatorial.tests', 'sympy.functions.elementary.tests', 'sympy.functions.special.tests', 'sympy.geometry.tests', 'sympy.integrals.tests', 'sympy.matrices.te...
Triv90/Nova
refs/heads/openstack-ci/fuel/grizzly
nova/tests/api/openstack/compute/contrib/test_server_password.py
41
# Copyright 2012 Nebula, 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 ...
akirk/youtube-dl
refs/heads/master
youtube_dl/extractor/ustream.py
19
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( ExtractorError, int_or_none, float_or_none, ) class UstreamIE(InfoExtractor): _VALID_URL = r'https?://www\.ustream\.tv/(?P<type>recorded|embed|embed...
jvantuyl/vertebra-py
refs/heads/master
lib/vertebra/conn/xmpp/conn.py
1
""" XMPP Connection for Vertebra ============================ This XMPP connection runs as another thread. In this thread, it will run in a loop, handling XMPP processing. Like all connections, it has to be given a thread-safe "receive" method, which will be called in its thread, and it has a thread-safe "transmit" ...