repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
kivio/PerfKitBenchmarker | refs/heads/master | perfkitbenchmarker/packages/multilib.py | 8 | # Copyright 2014 PerfKitBenchmarker 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 appli... |
was4444/chromium.src | refs/heads/nw15 | third_party/cython/src/Cython/Compiler/ModuleNode.py | 87 | #
# Module parse tree node
#
import cython
cython.declare(Naming=object, Options=object, PyrexTypes=object, TypeSlots=object,
error=object, warning=object, py_object_type=object, UtilityCode=object,
EncodedString=object)
import os
import operator
from PyrexTypes import CPtrType
import ... |
suda/micropython | refs/heads/master | tests/basics/enumerate.py | 54 | print(list(enumerate([])))
print(list(enumerate([1, 2, 3])))
print(list(enumerate([1, 2, 3], 5)))
print(list(enumerate([1, 2, 3], -5)))
print(list(enumerate(range(1000))))
# specifying args with keywords
print(list(enumerate([1, 2, 3], start=1)))
print(list(enumerate(iterable=[1, 2, 3])))
print(list(enumerate(iterable... |
alexryndin/ambari | refs/heads/branch-adh-1.5 | ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KAFKA/package/scripts/status_params.py | 14 | #!/usr/bin/env python
"""
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");... |
haguenau/otp | refs/heads/maint | lib/asn1/test/asn1_SUITE_data/Set.py | 94 | Set DEFINITIONS IMPLICIT TAGS ::=
BEGIN
IMPORTS Seq1 FROM SeqSetLib;
Set ::= SET
{
bool BOOLEAN,
boolCon [20] BOOLEAN,
boolPri [PRIVATE 21] BOOLEAN,
boolApp [APPLICATION 22] BOOLEAN,
boolExpCon [30] EXPLICIT BOOLEAN,
boolExpPri [PRIVATE 31] EXPLICIT BOOLEAN,
boolExpApp [APPLICATION 32] EXPLICIT B... |
initNirvana/Easyphotos | refs/heads/master | env/lib/python3.4/site-packages/PIL/ImagePath.py | 41 | #
# The Python Imaging Library
# $Id$
#
# path interface
#
# History:
# 1996-11-04 fl Created
# 2002-04-14 fl Added documentation stub class
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistribution.
#
from PIL import Image
# th... |
tailorian/Sick-Beard | refs/heads/ThePirateBay | sickbeard/properFinder.py | 5 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... |
beiko-lab/gengis | refs/heads/master | bin/Lib/distutils/command/clean.py | 59 | """distutils.command.clean
Implements the Distutils 'clean' command."""
# contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18
__revision__ = "$Id$"
import os
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils import log
class clean(Comman... |
was4444/chromium.src | refs/heads/nw15 | tools/memory_inspector/memory_inspector/backends/__init__.py | 12133432 | |
vaidap/zulip | refs/heads/master | tools/documentation_crawler/documentation_crawler/__init__.py | 12133432 | |
Tiger66639/ansible-modules-core | refs/heads/devel | database/__init__.py | 12133432 | |
LUKKIEN/wagtailsocialfeed | refs/heads/master | tests/app/models.py | 12133432 | |
kmaglione/olympia | refs/heads/master | apps/addons/management/commands/personas_fix_mojibake.py | 13 | from getpass import getpass
from optparse import make_option
from time import time
from django.core.management.base import BaseCommand
from django.db import connection as django_connection, transaction
import MySQLdb as mysql
def debake(s):
for c in s:
try:
yield c.encode('windows-1252')
... |
perryl/morph | refs/heads/master | morphlib/buildsystem_tests.py | 1 | # Copyright (C) 2012-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but... |
petemounce/ansible | refs/heads/devel | lib/ansible/modules/database/misc/kibana_plugin.py | 49 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Ansible module to manage elasticsearch shield role
# (c) 2016, Thierno IB. BARRY @barryib
# Sponsored by Polyconseil http://polyconseil.fr.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... |
woobe/h2o | refs/heads/master | h2o-perf/bench/py/h2oPerf/Scrape.py | 1 | from Table import *
import json
import os
import re
import subprocess
import time
import MySQLdb
class Scraper:
"""
Objects of this class scrape the R stdouterr for
relevant information that needs to percolate back
to the database.
Because of the different phases (parse, model, predict),
ther... |
ahmed-mahran/hue | refs/heads/master | desktop/core/ext-py/python-daemon/test/scaffold.py | 39 | # -*- coding: utf-8 -*-
# test/scaffold.py
# Part of python-daemon, an implementation of PEP 3143.
#
# Copyright © 2007–2009 Ben Finney <ben+python@benfinney.id.au>
# This is free software; you may copy, modify and/or distribute this work
# under the terms of the GNU General Public License, version 2 or later.
# No wa... |
johnnadratowski/wkhtmltopdf | refs/heads/master | scripts/release.py | 19 | #!/usr/bin/env python
#
# Copyright 2014 wkhtmltopdf authors
#
# This file is part of wkhtmltopdf.
#
# wkhtmltopdf is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... |
dxxb/micropython | refs/heads/upstream-tracking | tests/wipy/time.py | 67 | import time
DAYS_PER_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def is_leap(year):
return (year % 4) == 0
def test():
seconds = 0
wday = 5 # Jan 1, 2000 was a Saturday
for year in range(2000, 2049):
print("Testing %d" % year)
yday = 1
for month in range(1, ... |
craigslist/python-climage | refs/heads/master | setup.py | 1 | #!/usr/bin/python
# Copyright 2013 craigslist
#
# 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... |
kikocorreoso/brython | refs/heads/master | www/src/Lib/unittest/test/support.py | 37 | import unittest
class TestEquality(object):
"""Used as a mixin for TestCase"""
# Check for a valid __eq__ implementation
def test_eq(self):
for obj_1, obj_2 in self.eq_pairs:
self.assertEqual(obj_1, obj_2)
self.assertEqual(obj_2, obj_1)
# Check for a valid __ne__ impl... |
SilverWingedSeraph/sws-dotfiles | refs/heads/master | stow/vim/.vim/bundle/editorconfig-vim/plugin/editorconfig-core-py/main.py | 20 | #!/usr/bin/env python
from editorconfig.main import main
if __name__ == "__main__":
main()
|
peterfpeterson/mantid | refs/heads/master | qt/python/mantidqt/widgets/workspacedisplay/table/table_model.py | 3 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2021 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 +
# T... |
WeichenXu123/spark | refs/heads/master | resource-managers/kubernetes/integration-tests/tests/pyfiles.py | 26 | #
# 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... |
nevil-brownlee/python-libtrace | refs/heads/master | doc/examples/icmp.py | 1 | #!/usr/bin/env python
# Thu, 13 Mar 14 (PDT)
# icmp.py: Demonstrate ICMP (v4) header decodes
# Copyright (C) 2017, Nevil Brownlee, U Auckland | WAND
from plt_testing import *
t = get_example_trace('icmp-sample.pcap')
n = 0; nicmp = 0
offset = 12
for pkt in t:
n += 1
icmp = pkt.icmp
if not icmp:
... |
nemonik/Intellect | refs/heads/master | intellect/examples/testing/ClassA.py | 2 | """
Copyright (c) 2011, The MITRE Corporation.
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... |
issackelly/django-security | refs/heads/master | security/password_expiry.py | 3 | # Copyright (c) 2011, SD Elements. See LICENSE.txt for details.
from .models import PasswordExpiry
from django.conf import settings
def password_is_expired(user):
password_expiry, _ = PasswordExpiry.objects.get_or_create(user=user)
password_settings = getattr(settings, 'MANDATORY_PASSWORD_CHANGE', {})
... |
EricMuller/mywebmarks-backend | refs/heads/master | requirements/twisted/Twisted-17.1.0/src/twisted/cred/error.py | 27 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Cred errors.
"""
from __future__ import division, absolute_import
class Unauthorized(Exception):
"""Standard unauthorized error."""
class LoginFailed(Exception):
"""
The user's request to log in failed for some reason.
""... |
borgcoin/Borgcoin1 | refs/heads/Borgcoin | contrib/bitrpc/bitrpc.py | 13 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:9334")
else:
access = Ser... |
tzulberti/entrenamiento-arqueria | refs/heads/master | alembic/versions/029_tipo_entrenamiento.py | 1 | # -*- coding: utf-8 -*-
"""tipo_entrenamiento
Revision ID: 029
Revises: 028
Create Date: 2014-08-05 22:48:29.805732
"""
# revision identifiers, used by Alembic.
revision = '029'
down_revision = '028'
import inspect
import imp
import os
from alembic import op
def upgrade():
utils_path = os.path.join(os.path.di... |
ltcmelo/qt-creator | refs/heads/master | share/qtcreator/debugger/boosttypes.py | 4 | ############################################################################
#
# Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# ... |
richpolis/siveinpy | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/vi/__init__.py | 12133432 | |
NullSoldier/django | refs/heads/master | tests/m2m_through_regress/__init__.py | 12133432 | |
oshtaier/robottelo | refs/heads/master | tests/robottelo/test_decorators.py | 3 | """Unit tests for :mod:`robottelo.common.decorators`."""
from ddt import DATA_ATTR
from fauxfactory import gen_integer
from robottelo.common import conf, decorators
from unittest import TestCase
# (Too many public methods) pylint: disable=R0904
class DataTestCase(TestCase):
"""Tests for :func:`robottelo.common.de... |
neerajvashistha/pa-dude | refs/heads/master | lib/python2.7/site-packages/django/contrib/flatpages/templatetags/flatpages.py | 472 | from django import template
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.shortcuts import get_current_site
register = template.Library()
class FlatpageNode(template.Node):
def __init__(self, context_name, starts_with=None, user=None):
sel... |
rmelo19/rmelo19-arduino | refs/heads/master | fritzing/fritzing.0.9.2b.64.pc/parts/part-gen-scripts/misc_scripts/listpropnames.py | 4 | # usage:
# listpropnames.py -d <directory>
#
# <directory> is a folder containing .fzp files. In each fzp file in the directory containing a <property> element:
# like <property name="whatever" ...>
# list the name, if it's not already listed
import getopt, sys, os, re
def usage():
print """
u... |
htygithub/bokeh | refs/heads/master | examples/plotting/file/vector.py | 45 | from __future__ import division
import numpy as np
from bokeh.plotting import figure, show, output_file, vplot
def streamlines(x, y, u, v, density=1):
'''Returns streamlines of a vector flow.
* x and y are 1d arrays defining an *evenly spaced* grid.
* u and v are 2d arrays (shape [y,x]) giving velocitie... |
fkorotkov/pants | refs/heads/master | tests/python/pants_test/backend/jvm/tasks/test_consolidate_classpath.py | 6 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from pant... |
SciTools/iris | refs/heads/main | tools/update_lockfiles.py | 2 | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
A command line utility for generating conda-lock files for the environments
that nox uses for testing each different suppor... |
tethysplatform/tethys | refs/heads/master | tethys_portal/middleware.py | 2 | """
********************************************************************************
* Name: middleware.py
* Author: Nathan Swain
* Created On: August 1, 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
"""
from ... |
lyft/incubator-airflow | refs/heads/master | airflow/contrib/operators/bigquery_to_mysql_operator.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... |
bashalex/datapot | refs/heads/master | examples/tink_eval.py | 1 | #!/usr/bin/env python
'''
Tinkoff Boosters contest
Common case of a scoring dataset
5 categorical and 7 numerical variables
Use OneHot-encoding representation for categorical variables
Apply SVD compression for features with number of categories >= 10
datapot.remove_transformer to exclude redundant transformations
'''
... |
mationic/pyload | refs/heads/stable | module/ConfigParser.py | 35 | # -*- coding: utf-8 -*-
from __future__ import with_statement
from time import sleep
from os.path import exists, join
from shutil import copy
from traceback import print_exc
from utils import chmod
# ignore these plugin configs, mainly because plugins were wiped out
IGNORE = (
"FreakshareNet", "SpeedManager", "A... |
s0undt3ch/Deluge | refs/heads/master | deluge/ui/gtkui/queuedtorrents.py | 1 | #
# queuedtorrents.py
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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 late... |
santod/google_kernel_m7_3.4.10-g1a25406 | refs/heads/master | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
shahbazn/neutron | refs/heads/master | neutron/db/quota/__init__.py | 12133432 | |
rpmcpp/Audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/perl.py | 330 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os
from waflib import Task,Options,Utils
from waflib.Configure import conf
from waflib.TaskGen import extension,feature,before_method
@before_method('apply_incpaths','a... |
shaufi/odoo | refs/heads/8.0 | addons/payment_transfer/__openerp__.py | 391 | # -*- coding: utf-8 -*-
{
'name': 'Transfer Payment Acquirer',
'category': 'Hidden',
'summary': 'Payment Acquirer: Transfer Implementation',
'version': '1.0',
'description': """Transfer Payment Acquirer""",
'author': 'OpenERP SA',
'depends': ['payment'],
'data': [
'views/transfe... |
damdam-s/stock-logistics-workflow | refs/heads/8.0 | __unported__/stock_picking_show_returns/__init__.py | 23 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2013 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# $Id$
#
# This program is... |
WillStewart1994/NoSleep | refs/heads/master | requests/packages/chardet/escprober.py | 2935 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
wbc2010/django1.2.5 | refs/heads/master | tests/regressiontests/forms/__init__.py | 12133432 | |
jaesivsm/JARR | refs/heads/master | tests/crawler/__init__.py | 12133432 | |
NCI-Cloud/horizon | refs/heads/nci/kilo | openstack_dashboard/dashboards/project/loadbalancers/__init__.py | 12133432 | |
g82411/s_square | refs/heads/master | s_square/__init__.py | 12133432 | |
anksp21/Community-Zenpacks | refs/heads/master | ZenPacks.community.Gentoo/ZenPacks/community/Gentoo/parsers/__init__.py | 12133432 | |
jasonbot/django | refs/heads/master | tests/admin_scripts/complex_app/management/commands/__init__.py | 12133432 | |
DREAM-ODA-OS/tools | refs/heads/master | imgproc/smooth_mask.py | 1 | #!/usr/bin/env python
#------------------------------------------------------------------------------
#
# This tool tries to smooth mask edges by blurring and thresholding.
# While blur makes the edges smooth the thresholding produces new binary
# mask.
#
# For blurring is made by the (separated) Gaussian convo... |
40323102/2014_cpa_final_project-40323102 | refs/heads/master | helloworld.py | 73 | # coding=utf-8
# 上面的程式內容編碼必須在程式的第一或者第二行才會有作用
################# (1) 模組導入區
# 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝
import cherrypy
# 導入 Python 內建的 os 模組, 因為 os 模組為 Python 內建, 所以無需透過 setup.py 安裝
import os
################# (2) 廣域變數設定區
# 確定程式檔案所在目錄, 在 Windows 下有最後的反斜線
_curdir = os.path.join(os... |
canh/icanfly | refs/heads/master | xplane/parser.py | 1 | from control import state
import struct
DATA_FORMAT = "<I8f"
DATA_HEADER_FORMAT = "<4cB"
DATA_LEN = 36
DATA_OFFSET = 5
XP_LOCATION_INDEX = 20
XP_ATTITUDE_INDEX = 17
XP_CONTROL_INDEX = 11
def parse_state(data):
parsed = parse_raw(data)
return _get_location(parsed), _get_attitude(parsed)
def parse_raw(data)... |
michalliu/OpenWrt-Firefly-Libraries | refs/heads/master | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/idlelib/CodeContext.py | 13 | """CodeContext - Extension to display the block context above the edit window
Once code has scrolled off the top of a window, it can be difficult to
determine which block you are in. This extension implements a pane at the top
of each IDLE edit window which provides block structure hints. These hints are
the lines w... |
RomainBrault/scikit-learn | refs/heads/master | sklearn/semi_supervised/tests/test_label_propagation.py | 44 | """ test the label propagation module """
import numpy as np
from sklearn.utils.testing import assert_equal
from sklearn.semi_supervised import label_propagation
from sklearn.metrics.pairwise import rbf_kernel
from numpy.testing import assert_array_almost_equal
from numpy.testing import assert_array_equal
ESTIMATORS... |
da1z/intellij-community | refs/heads/master | python/helpers/pydev/third_party/wrapped_for_pydev/ctypes/macholib/dylib.py | 320 | """
Generic dylib path manipulation
"""
import re
__all__ = ['dylib_info']
DYLIB_RE = re.compile(r"""(?x)
(?P<location>^.*)(?:^|/)
(?P<name>
(?P<shortname>\w+?)
(?:\.(?P<version>[^._]+))?
(?:_(?P<suffix>[^._]+))?
\.dylib$
)
""")
def dylib_info(filename):
"""
A dylib name can take one of the ... |
spinellic/Mission-Planner | refs/heads/master | Lib/site-packages/scipy/ndimage/filters.py | 55 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# 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 following d... |
jaja14/lab4 | refs/heads/master | lib/flask/globals.py | 783 | # -*- coding: utf-8 -*-
"""
flask.globals
~~~~~~~~~~~~~
Defines all the global objects that are proxies to the current
active context.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from functools import partial
from werkzeug.local import LocalStack, ... |
edx/edx-platform | refs/heads/master | openedx/core/djangoapps/demographics/tests/test_status.py | 3 | """
Test status utilities
"""
from unittest import TestCase
from unittest import mock
from django.conf import settings
from opaque_keys.edx.keys import CourseKey
from pytest import mark
from common.djangoapps.course_modes.models import CourseMode
from common.djangoapps.course_modes.tests.factories import CourseModeFa... |
natcoin/natcoin | refs/heads/master | share/qt/clean_mac_info_plist.py | 1 | #!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Natcoin-Qt.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)
from string import Template
from datetime import date
bitcoinDir = "./";
inF... |
Jackysonglanlan/devops | refs/heads/master | IDEs/sublime/shared-pkgs/Packages/pygments/all/pygments/lexers/parsers.py | 47 | # -*- coding: utf-8 -*-
"""
pygments.lexers.parsers
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for parser generators.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, DelegatingLexer, \
include... |
alrusdi/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/tests/regressiontests/forms/localflavor/ie.py | 89 | from django.contrib.localflavor.ie.forms import IECountySelect
from utils import LocalFlavorTestCase
class IELocalFlavorTests(LocalFlavorTestCase):
def test_IECountySelect(self):
f = IECountySelect()
out = u'''<select name="counties">
<option value="antrim">Antrim</option>
<option value="armagh">... |
cesarmarinhorj/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py | 124 | # 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... |
tjanez/ansible | refs/heads/devel | lib/ansible/plugins/lookup/items.py | 251 | # (c) 2012, 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) any lat... |
jymannob/CouchPotatoServer | refs/heads/develop | libs/requests/packages/charade/langthaimodel.py | 2929 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
pierreg/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/seq2seq_test.py | 12 | # 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... |
antsmc2/mics | refs/heads/master | survey/fixtures/__init__.py | 12133432 | |
redhatrises/freeipa | refs/heads/master | ipapython/__init__.py | 12133432 | |
Slater-Victoroff/scrapy | refs/heads/master | scrapy/command.py | 144 | import warnings
from scrapy.exceptions import ScrapyDeprecationWarning
warnings.warn("Module `scrapy.command` is deprecated, "
"use `scrapy.commands` instead",
ScrapyDeprecationWarning, stacklevel=2)
from scrapy.commands import *
|
nju520/django | refs/heads/master | tests/fixtures_regress/tests.py | 205 | # -*- coding: utf-8 -*-
# Unittests for fixtures.
from __future__ import unicode_literals
import json
import os
import re
import unittest
import warnings
import django
from django.core import management, serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import Comman... |
markrawlingson/SickRage | refs/heads/master | lib/sqlalchemy/sql/operators.py | 78 | # sql/operators.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
# This module is part of SQLAlchemy and is released under
# the MIT License: http://w... |
release-engineering/fedmsg_meta_umb | refs/heads/master | fedmsg_meta_umb/greenwave.py | 1 | # Copyright (C) 2018 Red Hat, Inc.
#
# fedmsg_meta_umb 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.
#
# fedmsg_meta_umb is ... |
sachinkum/Bal-Aveksha | refs/heads/master | WebServer/BalAvekshaEnv/lib/python3.5/site-packages/django/conf/locale/sr/formats.py | 1008 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATE... |
tambetm/neon | refs/heads/master | neon/transforms/xcov.py | 9 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems 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.o... |
candrews/portage | refs/heads/master | pym/portage/tests/resolver/soname/__test__.py | 70 | # Copyright 2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
|
emonty/ansible-modules-core | refs/heads/devel | network/eos/eos_facts.py | 19 | #!/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 distribut... |
ekesken/istatistikciadamlazim | refs/heads/master | openid/test/test_discover.py | 65 | import sys
import unittest
import datadriven
import os.path
from openid import fetchers
from openid.fetchers import HTTPResponse
from openid.yadis.discover import DiscoveryFailure
from openid.consumer import discover
from openid.yadis import xrires
from openid.yadis.xri import XRI
from urlparse import urlsplit
from ope... |
p4datasystems/CarnotKEdist | refs/heads/master | dist/Lib/DocXMLRPCServer.py | 250 | """Self documenting XML-RPC Server.
This module can be used to create XML-RPC servers that
serve pydoc-style documentation in response to HTTP
GET requests. This documentation is dynamically generated
based on the functions and methods registered with the
server.
This module is built upon the pydoc and SimpleXMLRPCSe... |
direvus/ansible | refs/heads/devel | docs/bin/generate_man.py | 23 | #!/usr/bin/env python
import optparse
import os
import sys
from jinja2 import Environment, FileSystemLoader
from ansible.module_utils._text import to_bytes
from ansible.utils._build_helpers import update_file_if_different
def generate_parser():
p = optparse.OptionParser(
version='%prog 1.0',
us... |
DC07/android_kernel_lge_dory | refs/heads/master | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# 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.
#
import os
import sys
import getopt
import sh... |
luceatnobis/youtube-dl | refs/heads/master | youtube_dl/extractor/usatoday.py | 70 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
get_element_by_attribute,
parse_duration,
update_url_query,
ExtractorError,
)
from ..compat import compat_str
class USATodayIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?usatoday... |
browseinfo/odoo_saas3_nicolas | refs/heads/master | openerp/loglevels.py | 380 | # -*- 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... |
galaxyproject/starforge | refs/heads/master | starforge/commands/cmd_sdist.py | 3 | """
"""
from __future__ import absolute_import
import click
from os import getcwd
from ..cli import pass_context
from ..config.wheels import WheelConfigManager
from ..forge.wheels import ForgeWheel
from ..cache import CacheManager
from ..execution.local import LocalExecutionContext
from ..util import xdg_config_file... |
MarkusAmshove/Photobox | refs/heads/master | photobox/__init__.py | 12133432 | |
njncalub/storm | refs/heads/master | stormapp/__init__.py | 12133432 | |
ray-pixar/Anki-Android | refs/heads/develop | tools/manage-crowdin.py | 15 | #!/usr/bin/python
# Copyright (c) 2010 norbert.nagold@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; either version 3 of the License, or (at your option) any later
# version.
#
# T... |
CI-WATER/tethys | refs/heads/master | tests/unit_tests/test_tethys_services/test_models/test_WebProcessingService.py | 2 | from tethys_sdk.testing import TethysTestCase
import tethys_services.models as service_model
from unittest import mock
from tethys_services.models import HTTPError, URLError
class WebProcessingServiceTests(TethysTestCase):
def set_up(self):
pass
def tear_down(self):
pass
def test_unicod... |
les-patissiers-du-web/django-website | refs/heads/master | patissiers/blog/templatetags/custom_filters.py | 1 | from django import template
import markdown
register = template.Library()
@register.filter
def markdown2html(content):
return markdown.markdown(content, extensions=['extra', 'attr_list', 'def_list', 'nl2br', 'toc']) |
DeltaEpsilon-HackFMI2/FMICalendar-REST | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/gis/db/backends/mysql/operations.py | 100 | from django.db.backends.mysql.base import DatabaseOperations
from django.contrib.gis.db.backends.adapter import WKTAdapter
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.utils import six
class MySQLOperations(DatabaseOperations, BaseSpatialOperations):
compiler_module = 'djang... |
kirca/odoo | refs/heads/master | addons/website_payment/__init__.py | 389 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
monash-merc/karaage | refs/heads/master | karaage/plugins/kgusage/conf/__init__.py | 63 | # Copyright 2015 VPAC
#
# This file is part of Karaage.
#
# Karaage 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.
#
# Karaage is dist... |
40223137/150601 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/weakref.py | 769 | """Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
"""
# Naming convention: Variables named "wr" are weak reference objects;
# they are called this instead of "ref" to avoid name collisions with
# the module-global ref() function imported from ... |
dimroc/tensorflow-mnist-tutorial | refs/heads/master | lib/python3.6/site-packages/tensorflow/python/util/all_util.py | 43 | # 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... |
HomeHabbit/dialog-watson-client | refs/heads/master | dialog_watson_client/exceptions/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.