repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
SchulzLab/TEPIC | refs/heads/master | Code/filterInvalidRegions.py | 1 | import sys
#argv1 Affinity file
#argv2 Filtered Affinity file
#argv3 pValue Score file
#argv4 Filtered pValue Score file
def isValidAffinity(lineSplit):
for i in range(1,len(lineSplit)):
if (float(lineSplit[i]) != 0):
return True
return False
def isValidpValue(lineSplit):
for i in range(1,len(lineSplit)):
... |
gangadharkadam/shfr | refs/heads/master | frappe/website/utils.py | 11 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, re
def delete_page_cache(path):
if not path:
path = ""
cache = frappe.cache()
cache.delete_value("page:" + path)
cache.delete_value("page_context:" + path... |
ecoal95/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/pytest/testing/logging/test_fixture.py | 30 | # -*- coding: utf-8 -*-
import logging
import pytest
logger = logging.getLogger(__name__)
sublogger = logging.getLogger(__name__ + ".baz")
def test_fixture_help(testdir):
result = testdir.runpytest("--fixtures")
result.stdout.fnmatch_lines(["*caplog*"])
def test_change_level(caplog):
caplog.set_level(... |
tommz9/wrf_runner | refs/heads/master | src/wrf_runner/exceptions.py | 1 | class WrfRunnerException(Exception):
pass
|
cyberden/CouchPotatoServer | refs/heads/develop | libs/gntp/version.py | 123 | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
__version__ = '1.0.2'
|
sibsibsib/pressureNET-server | refs/heads/master | home/views.py | 1 | from django.conf import settings
from django.views.decorators.cache import cache_page
from django.views.generic.base import TemplateView, RedirectView
index = cache_page(TemplateView.as_view(template_name='home/index.html'), settings.CACHE_TIMEOUT)
about = cache_page(TemplateView.as_view(template_name='home/about.htm... |
HiroIshikawa/21playground | refs/heads/master | visualizer/_app_boilerplate/venv/lib/python3.5/site-packages/wheel/__init__.py | 219 | # __variables__ with double-quoted values will be available in setup.py:
__version__ = "0.24.0"
|
RafaelRMachado/qtwebkit | refs/heads/dev | Tools/Scripts/webkitpy/port/driver_unittest.py | 117 | # 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 f... |
mostafamosly/Uraeus | refs/heads/master | Small/procurement/views.py | 1 | from django.views.generic import TemplateView, ListView
from django.shortcuts import *
from django.template import RequestContext
from django.http import HttpResponse
from django.forms import ModelForm
from procurement.models import *
from django.contrib.auth.decorators import login_required
from warehouse.models impor... |
aleximplode/d3scraper | refs/heads/master | src/d3/d3/settings.py | 1 | BOT_NAME = 'd3'
BOT_VERSION = '1.0'
SPIDER_MODULES = ['d3.spiders']
NEWSPIDER_MODULE = 'd3.spiders'
USER_AGENT = '%s/%s' % (BOT_NAME, BOT_VERSION)
CONCURRENT_REQUESTS = 24
CONCURRENT_REQUESTS_PER_DOMAIN = 24
ITEM_PIPELINES = ['d3.pipelines.TypeCleanerPipeline',
'd3.pipelines.ItemCleanerPipeline',
... |
LaynePeng/flocker | refs/heads/master | flocker/common/test/test_ipc.py | 16 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Unit tests for IPC.
"""
from __future__ import absolute_import
from unittest import TestCase as PyTestCase
from zope.interface.verify import verifyObject
from .. import INode, FakeNode
from ...testtools import assertNoFDsLeaked
def make_inode_tests... |
Coderhypo/UIAMS | refs/heads/master | app/decorators.py | 1 | from functools import wraps
from flask import abort
from flask.ext.login import current_user
from models import Permission
def permission_required(permission):
def decorator(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if not current_user.can(permission):
abort... |
MrSenko/Nitrate | refs/heads/develop | tcms/testcases/migrations/0005_allow_null_to_testcaseattachment_case_run.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('testcases', '0004_add_unique_to_testcasebugsystem_name'),
]
operations = [
migrations.AlterField(
model_name='te... |
altsen/diandiyun-platform | refs/heads/master | lms/djangoapps/courseware/migrations/0003_done_grade_cache.py | 194 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# NOTE (vshnayder): This constraint has the wrong field order, so it doesn't actually
# do anything in sqlite. M... |
ondra-novak/chromium.src | refs/heads/nw | tools/perf_expectations/tests/perf_expectations_unittest.py | 178 | #!/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.
"""Verify perf_expectations.json can be loaded using simplejson.
perf_expectations.json is a JSON-formatted file. This script ver... |
Soovox/django-socialregistration | refs/heads/master | docs/conf.py | 10 | # -*- coding: utf-8 -*-
#
# django-socialregistration documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 22 17:25:59 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogener... |
ryuunosukeyoshi/PartnerPoi-Bot | refs/heads/master | lib/youtube_dl/extractor/vessel.py | 40 | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
parse_iso8601,
sanitized_Request,
)
class VesselIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?vessel\.com/(?:videos|embed)/(?P<id>[0-9a-zA-Z-_]... |
JRock007/boxxy | refs/heads/master | dist/Boxxy.app/Contents/Resources/lib/python2.7/pygame/tests/draw_test.py | 5 | #################################### IMPORTS ###################################
if __name__ == '__main__':
import sys
import os
pkg_dir = os.path.split(os.path.abspath(__file__))[0]
parent_dir, pkg_name = os.path.split(pkg_dir)
is_pygame_pkg = (pkg_name == 'tests' and
... |
roberzguerra/scout | refs/heads/master | campotec/migrations/0008_importinscriptions.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('campotec', '0007_auto_20150127_1548'),
]
operations = [
migrations.CreateModel(
name='ImportInscriptions',
... |
landonb/hamster-briefs | refs/heads/release | hamster_briefs/version_hamster.py | 2 | SCRIPT_VERS = '0.10.0'
|
rmvanhees/pys5p | refs/heads/master | src/pys5p/tol_colors.py | 1 | """
This file is part of pyS5p
https://github.com/rmvanhees/pys5p.git
Definition of colour schemes for lines and maps that also work for colour-blind
people. See https://personal.sron.nl/~pault/ for background information and
best usage of the schemes.
Reference
---------
https://personal.sron.nl/~pault/
Copyrig... |
DarthMaulware/EquationGroupLeaks | refs/heads/master | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/ctypes/macholib/__init__.py | 1 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: __init__.py
"""
Enough Mach-O to make your head spin.
See the relevant header files in /usr/include/mach-o
And also Apple's documentation.
"""
__ve... |
sdhash/sdhash | refs/heads/master | sdhash-ui/cherrypy/tutorial/tut10_http_errors.py | 36 | """
Tutorial: HTTP errors
HTTPError is used to return an error response to the client.
CherryPy has lots of options regarding how such errors are
logged, displayed, and formatted.
"""
import os
localDir = os.path.dirname(__file__)
curpath = os.path.normpath(os.path.join(os.getcwd(), localDir))
import cherrypy
cl... |
alazaro/tennis_tournament | refs/heads/master | django/conf/urls/defaults.py | 320 | from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
from django.core.exceptions import ImproperlyConfigured
__all__ = ['handler404', 'handler500', 'include', 'patterns', 'url']
handler404 = 'django.views.defaults.page_not_found'
handler500 = 'django.views.defaults.server_error'
def include(arg, na... |
louietsai/python-for-android | refs/heads/master | python-modules/twisted/twisted/words/im/pbsupport.py | 55 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""L{twisted.words} support for Instance Messenger."""
from __future__ import nested_scopes
from twisted.internet import defer
from twisted.internet import error
from twisted.python import log
from twisted.python.failure import Failur... |
wbyne/QGIS | refs/heads/master | python/plugins/processing/tests/ToolsTest.py | 3 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ToolsTest
---------------------
Date : July 2017
Copyright : (C) 2017 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
*************************... |
anirudhSK/chromium | refs/heads/master | chrome/test/functional/media/audio_latency_perf.py | 70 | #!/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.
"""Audio latency performance test.
Benchmark measuring how fast we can continuously repeat a short sound clip. In
the ideal scena... |
SeaFalcon/Musicool_Pr | refs/heads/master | lib/wtforms/ext/i18n/form.py | 38 | import warnings
from wtforms import form
from wtforms.ext.i18n.utils import get_translations
translations_cache = {}
class Form(form.Form):
"""
Base form for a simple localized WTForms form.
**NOTE** this class is now un-necessary as the i18n features have
been moved into the core of WTForms, and wi... |
danbeam/catapult | refs/heads/master | perf_insights/perf_insights/progress_reporter.py | 2 | # Copyright 2015 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.
# Derived from telemetry ProgressReporter. Should stay close in architecture
# to telemetry ProgressReporter.
class ProgressReporter(object):
def WillRun(s... |
geekboxzone/lollipop_external_chromium_org | refs/heads/geekbox | testing/PRESUBMIT.py | 134 | # 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.
"""Top-level presubmit script for testing.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on the presubmit API ... |
vcc-LG/brachy-dose-reporter | refs/heads/master | doseapp/forms.py | 1 | from django import forms
from .models import Patient, Fraction
class PatientForm(forms.ModelForm):
class Meta:
model = Patient
fields = ('patient_id',
'first_name',
'last_name',)
class FractionForm(forms.ModelForm):
class Meta:
model = Fraction
fields = ('pati... |
SakiFu/personal-website | refs/heads/master | personal/personal/wsgi.py | 1 | """
WSGI config for personal project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... |
hzlf/openbroadcast | refs/heads/master | website/apps/registration/urls.py | 79 | """
Backwards-compatible URLconf for existing django-registration
installs; this allows the standard ``include('registration.urls')`` to
continue working, but that usage is deprecated and will be removed for
django-registration 1.0. For new installs, use
``include('registration.backends.default.urls')``.
"""
import w... |
fitzgen/servo | refs/heads/master | tests/wpt/css-tests/tools/html5lib/html5lib/treeadapters/sax.py | 1835 | from __future__ import absolute_import, division, unicode_literals
from xml.sax.xmlreader import AttributesNSImpl
from ..constants import adjustForeignAttributes, unadjustForeignAttributes
prefix_mapping = {}
for prefix, localName, namespace in adjustForeignAttributes.values():
if prefix is not None:
pre... |
bat-serjo/vivisect | refs/heads/master | vstruct/defs/windows/win_6_1_amd64/win32k.py | 4 | # Version: 6.1
# Architecture: amd64
import vstruct
from vstruct.primitives import *
ETW_THREAD_FLAG = v_enum()
ETW_THREAD_FLAG.ETW_THREAD_FLAG_HAD_INPUT = 0
ETW_THREAD_FLAG.ETW_THREAD_FLAG_HAD_VISIBLE_WINDOWS = 1
ETW_THREAD_FLAG.ETW_THREAD_FLAG_HAS_NEW_INPUT = 2
ETW_THREAD_FLAG.ETW_THREAD_FLAG_MAX = 3
TOUCHSTATE = ... |
FlorianLudwig/odoo | refs/heads/8.0 | addons/website/models/ir_ui_view.py | 161 | # -*- coding: utf-8 -*-
import copy
from lxml import etree, html
from openerp import SUPERUSER_ID, api
from openerp.addons.website.models import website
from openerp.http import request
from openerp.osv import osv, fields
class view(osv.osv):
_inherit = "ir.ui.view"
_columns = {
'page': fields.boolea... |
nyuwireless/ns3-mmwave | refs/heads/master | waf-tools/clang_compilation_database.py | 99 | #!/usr/bin/env python
# encoding: utf-8
# Christoph Koke, 2013
"""
Writes the c and cpp compile commands into build/compile_commands.json
see http://clang.llvm.org/docs/JSONCompilationDatabase.html
Usage:
def configure(conf):
conf.load('compiler_cxx')
...
conf.load('clang_compilation_data... |
jiangzhuo/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py | 1093 | # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/
try:
from thread import get_ident as _get_ide... |
pawelmhm/AutobahnPython | refs/heads/master | examples/twisted/websocket/echo/client_coroutines.py | 18 | ###############################################################################
##
## Copyright (C) 2011-2014 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## h... |
sharma1nitish/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern.py | 134 | # Copyright (C) 2011 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 ... |
yunfeilu/scikit-learn | refs/heads/master | examples/decomposition/plot_pca_vs_lda.py | 68 | """
=======================================================
Comparison of LDA and PCA 2D projection of Iris dataset
=======================================================
The Iris dataset represents 3 kind of Iris flowers (Setosa, Versicolour
and Virginica) with 4 attributes: sepal length, sepal width, petal length
a... |
ekiourk/ansible-modules-core | refs/heads/devel | cloud/rackspace/rax_cbs_attachments.py | 157 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
2014c2g19/2014c2g19 | refs/heads/master | wsgi/programs/c2g5/__init__.py | 2 | import cherrypy
# 這是 C2G1 類別的定義
class C2G5(object):
# 各組利用 index 引導隨後的程式執行
@cherrypy.expose
def index(self, *args, **kwargs):
outstring = '''
這是 2014C2 協同專案下的 c2g5 分組程式開發網頁<br />
<!-- 這裡採用相對連結, 而非網址的絕對連結 (這一段為 html 註解) -->
老師示範<br />
<a href="fillpoly">c2g5 fillpoly 繪圖</a><br />
<a href="drawline">... |
rimbalinux/MSISDNArea | refs/heads/master | django/contrib/gis/gdal/geomtype.py | 12 | from django.contrib.gis.gdal.error import OGRException
#### OGRGeomType ####
class OGRGeomType(object):
"Encapulates OGR Geometry Types."
wkb25bit = -2147483648
# Dictionary of acceptable OGRwkbGeometryType s and their string names.
_types = {0 : 'Unknown',
1 : 'Point',
... |
ArneBab/pypyjs | refs/heads/master | website/demo/home/rfk/repos/pypy/lib-python/2.7/encodings/latin_1.py | 853 | """ Python 'latin-1' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is intended.
... |
sradl1981/LIGGGHTS-PUBLIC-ParScale | refs/heads/master | regress/benchmark.py | 15 | #!/usr/bin/env python
"""
function: numerical comparisions of logs and corresponding benchmarks
usage: benchmark.py <nprocs> <njobs> <dirs>
"""
import sys
import os
import math
import re
from operator import itemgetter
from glob import glob
import time
import multiprocessing as mp
try:
import Queue as queue # 2.... |
r0e/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_hixie75.py | 681 | # Copyright 2011, 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... |
TNT-Samuel/Coding-Projects | refs/heads/master | DNS Server/Source - Copy/Lib/site-packages/dask/dataframe/multi.py | 2 | """
Algorithms that Involve Multiple DataFrames
===========================================
The pandas operations ``concat``, ``join``, and ``merge`` combine multiple
DataFrames. This module contains analogous algorithms in the parallel case.
There are two important cases:
1. We combine along a partitioned index
2... |
billiob/papyon | refs/heads/master | papyon/media/message.py | 7 | # -*- coding: utf-8 -*-
#
# papyon - a python client library for Msn
#
# Copyright (C) 2009 Collabora Ltd.
#
# 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
#... |
dbjohnson/advent-of-code | refs/heads/master | solutions/day21/solution.py | 1 | import itertools
weapons = [{'Name': 'Dagger', 'Cost': 8, 'Damage': 4, 'Armor': 0},
{'Name': 'Shortsword', 'Cost': 10, 'Damage': 5, 'Armor': 0},
{'Name': 'Warhammer', 'Cost': 25, 'Damage': 6, 'Armor': 0},
{'Name': 'Longsword', 'Cost': 40, 'Damage': 7, 'Armor': 0},
{'Name': '... |
rayners/offlineimap | refs/heads/master | offlineimap/folder/Base.py | 2 | # Base folder support
# Copyright (C) 2002-2011 John Goerzen & contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) a... |
pulinagrawal/nupic | refs/heads/master | tests/unit/nupic/frameworks/opf/previous_value_model_test.py | 5 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
StackPointCloud/ansible-modules-extras | refs/heads/devel | system/selinux_permissive.py | 88 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Michael Scherer <misc@zarb.org>
# inspired by code of github.com/dandiker/
#
# 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 Softwar... |
ellio167/lammps | refs/heads/master | examples/ELASTIC/compliance.py | 29 | #!/usr/bin/env python
# This file reads in the file log.lammps generated by the script ELASTIC/in.elastic
# It prints out the 6x6 tensor of elastic constants Cij
# followed by the 6x6 tensor of compliance constants Sij
# It uses the same conventions as described in:
# Sprik, Impey and Klein PRB (1984).
# The units ... |
jehutting/kivy | refs/heads/master | kivy/uix/popup.py | 19 | '''
Popup
=====
.. versionadded:: 1.0.7
.. image:: images/popup.jpg
:align: right
The :class:`Popup` widget is used to create modal popups. By default, the popup
will cover the whole "parent" window. When you are creating a popup, you
must at least set a :attr:`Popup.title` and :attr:`Popup.content`.
Remember t... |
cliffe/SecGen | refs/heads/master | modules/utilities/unix/ctf/metactf/files/repository/src_angr/solutions/13_angr_static_binary/solve13.py | 3 | # This challenge is the exact same as the first challenge, except that it was
# compiled as a static binary. Normally, Angr automatically replaces standard
# library functions with SimProcedures that work much more quickly.
#
# To solve the challenge, manually hook any standard library c functions that
# are used. Then... |
evansd/django | refs/heads/master | tests/proxy_model_inheritance/app1/models.py | 515 | # TODO: why can't I make this ..app2
from app2.models import NiceModel
class ProxyModel(NiceModel):
class Meta:
proxy = True
|
alexlo03/ansible | refs/heads/devel | lib/ansible/parsing/quoting.py | 241 | # (c) 2014 James Cammarata, <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... |
TomBurnett/Blender-Game-Engine-Javabot-AI | refs/heads/master | google/protobuf/internal/containers.py | 3 | # 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... |
cantora/pyc | refs/heads/master | p2tests/grader_tests/fun4.py | 1 |
# L = {y,x,f}
x = 1
y = 2
def f(y): # H = {x,y}, L={z,g}, P={y}, F = {y}
z = x + y
def g(w): # H = {x,y}, L={}, P={}
v = w + y
return v
return g
print (f(3))(4)
|
gsehub/edx-platform | refs/heads/gsehub-release | lms/djangoapps/shoppingcart/processors/__init__.py | 215 | """
Public API for payment processor implementations.
The specific implementation is determined at runtime using Django settings:
CC_PROCESSOR_NAME: The name of the Python module (in `shoppingcart.processors`) to use.
CC_PROCESSOR: Dictionary of configuration options for specific processor implementations,
... |
eranimo/historia | refs/heads/master | historia/pops/__init__.py | 1 | from historia.pops.enums import PopJob, PopClass
from historia.pops.models import Inventory, Pop
from historia.pops.pop_service import *
|
tkettu/rokego | refs/heads/master | distances/views.py | 1 | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect, Http404
from django.urls import reverse
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django_tables2 import RequestConfig
from django.db.models import Sum
from .m... |
ininex/geofire-python | refs/heads/master | resource/lib/python2.7/site-packages/gcloud/bigtable/client.py | 2 | # Copyright 2015 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 a... |
antb/TPT----My-old-mod | refs/heads/master | src/python/stdlib/distutils/command/install_data.py | 4 | """distutils.command.install_data
Implements the Distutils 'install_data' command, for installing
platform-independent data files."""
# contributed by Bastian Kleineidam
__revision__ = "$Id: install_data.py 76849 2009-12-15 06:29:19Z tarek.ziade $"
import os
from distutils.core import Command
from distutils.util im... |
mcauser/micropython | refs/heads/master | tests/basics/int_big_zeroone.py | 113 | # test [0,-0,1,-1] edge cases of bignum
long_zero = (2**64) >> 65
long_neg_zero = -long_zero
long_one = long_zero + 1
long_neg_one = -long_one
cases = [long_zero, long_neg_zero, long_one, long_neg_one]
print(cases)
print([-c for c in cases])
print([~c for c in cases])
print([c >> 1 for c in cases])
print([c << 1 for... |
nwjs/chromium.src | refs/heads/nw45-log | third_party/blink/tools/blinkpy/third_party/wpt/wpt/tools/webdriver/webdriver/error.py | 7 | import collections
import json
from six import itervalues
class WebDriverException(Exception):
http_status = None
status_code = None
def __init__(self, http_status=None, status_code=None, message=None, stacktrace=None):
super(WebDriverException, self)
self.http_status = http_status
... |
dianna-project/dianna | refs/heads/master | scripts/qt/extract_strings_qt.py | 31 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format produced by xgettext.
Return a list o... |
Dino0631/RedRain-Bot | refs/heads/develop | lib/nacl/bindings/sodium_core.py | 17 | # Copyright 2013 Donald Stufft and individual contributors
#
# 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... |
Cinntax/home-assistant | refs/heads/dev | homeassistant/components/xs1/switch.py | 14 | """Support for XS1 switches."""
import logging
from xs1_api_client.api_constants import ActuatorType
from homeassistant.helpers.entity import ToggleEntity
from . import ACTUATORS, DOMAIN as COMPONENT_DOMAIN, XS1DeviceEntity
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, disco... |
fengbaicanhe/intellij-community | refs/heads/master | python/testData/inspections/AddCallSuperKeywordOnlyParamInInit.py | 79 | class A:
def __init__(self, a):
pass
class B(A):
def <warning descr="Call to __init__ of super class is missed">__i<caret>nit__</warning>(self, b, c=1, *args, kw_only):
pass |
dkodnik/Ant | refs/heads/master | openerp/tests/addons/test_translation_import/tests/test_term_count.py | 323 | # -*- coding: utf-8 -*-
import openerp
from openerp.tests import common
class TestTermCount(common.TransactionCase):
def test_count_term(self):
"""
Just make sure we have as many translation entries as we wanted.
"""
openerp.tools.trans_load(self.cr, 'test_translation_import/i18n/... |
TravisCG/SI_scripts | refs/heads/master | getcomm.py | 1 | #!/usr/bin/python
import sys
keep = set()
for i in open(sys.argv[1]):
keep.add(i.rstrip())
for i in open(sys.argv[2]):
fields = i.rstrip().split("\t")
if fields[0] in keep:
print i.rstrip()
|
shakamunyi/solum | refs/heads/master | solum/config.py | 8 | # Copyright 2013 - Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... |
hkawasaki/kawasaki-aio8-1 | refs/heads/gacco2/master | cms/envs/aws.py | 8 | """
This is the default template for our main set of AWS servers.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
import json
from .common import *
from logsettings import get_logger_config
import os
from p... |
datapythonista/pandas | refs/heads/master | pandas/tests/frame/methods/test_describe.py | 2 | import numpy as np
import pytest
import pandas as pd
from pandas import (
Categorical,
DataFrame,
Series,
Timestamp,
date_range,
)
import pandas._testing as tm
class TestDataFrameDescribe:
def test_describe_bool_in_mixed_frame(self):
df = DataFrame(
{
"stri... |
ruslanloman/nova | refs/heads/master | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/001_cell_mapping.py | 48 | # 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... |
vivekn/redis-simple-cache | refs/heads/master | redis_cache/__init__.py | 3 | from rediscache import * |
repotvsupertuga/tvsupertuga.repository | refs/heads/master | plugin.video.loganaddon/resources/lib/libraries/cache.py | 19 | # -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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 l... |
gkoelln/youtube-dl | refs/heads/master | youtube_dl/extractor/everyonesmixtape.py | 88 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
sanitized_Request,
)
class EveryonesMixtapeIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?everyonesmixtape\.com/#/mix/(?P<id>[0-9a-zA-Z]+)(?:/(?P<songnr>[0-9]))?$'
_TESTS ... |
madebydaniz/django1-11 | refs/heads/master | src/muypicky/settings/base.py | 1 | """
Django settings for muypicky project.
Generated by 'django-admin startproject' using Django 1.11.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import o... |
hynnet/hiwifi-openwrt-HC5661-HC5761 | refs/heads/master | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/shelve.py | 225 | """Manage shelves of pickled objects.
A "shelf" is a persistent, dictionary-like object. The difference
with dbm databases is that the values (not the keys!) in a shelf can
be essentially arbitrary Python objects -- anything that the "pickle"
module can handle. This includes most class instances, recursive data
type... |
kingvuplus/italysat-enigma2 | refs/heads/master | lib/python/Components/Converter/EGAnalogic.py | 44 | # shamelessly copied from BP Project
from Components.Converter.Converter import Converter
from Components.Element import cached
from time import localtime, strftime
class EGAnalogic(Converter, object):
def __init__(self, type):
Converter.__init__(self, type)
if type == "Seconds":
self.type = 1
elif type ==... |
matehall/Python-koan | refs/heads/master | python 3/koans/about_inheritance.py | 14 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutInheritance(Koan):
class Dog:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
def bark(self):
return "WOOF"
... |
AlphaX2/FotoShareN9 | refs/heads/master | 1.6.1/fotoshare/opt/FotoShareN9/plugins/sftp/libs/paramiko/agent.py | 16 | # Copyright (C) 2003-2007 John Rochester <john@jrochester.org>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at ... |
madgik/exareme | refs/heads/master | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/pymysql/converters.py | 1 | import datetime
import re
import sys
import time
from charset import charset_by_id
from constants import FIELD_TYPE, FLAG
PYTHON3 = sys.version_info[0] > 2
try:
set
except NameError:
try:
from sets import BaseSet as set
except ImportError:
from sets import Set as set
ESCAPE_REGEX = re.co... |
rsteca/python-social-auth | refs/heads/master | social/backends/stackoverflow.py | 77 | """
Stackoverflow OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/stackoverflow.html
"""
from social.backends.oauth import BaseOAuth2
class StackoverflowOAuth2(BaseOAuth2):
"""Stackoverflow OAuth2 authentication backend"""
name = 'stackoverflow'
ID_KEY = 'user_id'
AUTHORIZATION... |
windyuuy/opera | refs/heads/master | chromium/src/tools/gyp/test/win/gyptest-cl-buffer-security-check.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.
"""
Make sure buffer security check setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = Tes... |
mail-apps/pootle | refs/heads/master | tests/forms/unit.py | 7 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from django.contrib.au... |
gwpy/gwpy.github.io | refs/heads/master | docs/0.9.0/examples/timeseries/statevector-2.py | 11 | bits = [
'Summary state',
'State 1 damped',
'Stage 1 isolated',
'Stage 2 damped',
'Stage 2 isolated',
'Master switch ON',
'Stage 1 WatchDog OK',
'Stage 2 WatchDog OK',
]
data = StateVector.get('L1:ISI-ETMX_ODC_CHANNEL_OUT_DQ', 'May 22 2014 14:00', 'May 22 2014 15:00', bits=bits) |
lalanza808/lalanza808.github.io | refs/heads/master | vendor/bundle/ruby/2.3.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/test_rtf_formatter.py | 34 | # -*- coding: utf-8 -*-
"""
Pygments RTF formatter tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import unittest
from string_asserts import StringTests
from pygments.util import StringIO
from pygment... |
daler/trackhub | refs/heads/master | setup.py | 1 | import os
import sys
from setuptools import setup
version_py = os.path.join(os.path.dirname(__file__), 'trackhub', 'version.py')
version = open(version_py).read().strip().split('=')[-1].replace('"','')
long_description = """
Create and manage UCSC track hubs from Python
"""
setup(
name="trackhub",
version=ve... |
crystalspace/CS | refs/heads/master | scripts/python/frozen/cspace/ivaria.py | 1 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.36
#
# Don't modify this file, modify the SWIG interface instead.
import _ivaria
import new
new_instancemethod = new.instancemethod
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
... |
dimagol/trex-core | refs/heads/master | scripts/automation/trex_control_plane/astf/trex_astf_lib/__init__.py | 2 | import sys
if sys.version_info < (2, 7):
print("\n**** TRex ASTF package requires Python version >= 2.7 ***\n")
exit(-1)
from . import trex_stl_ext
|
Deepakkothandan/ansible | refs/heads/devel | lib/ansible/modules/cloud/docker/docker_volume.py | 26 | #!/usr/bin/python
# coding: utf-8
#
# Copyright 2017 Red Hat | Ansible, Alex Grönholm <alex.gronholm@nextday.fi>
# 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 = {'meta... |
fernandog/Sick-Beard | refs/heads/ThePirateBay | lib/unidecode/x0bd.py | 253 | data = (
'bols', # 0x00
'bolt', # 0x01
'bolp', # 0x02
'bolh', # 0x03
'bom', # 0x04
'bob', # 0x05
'bobs', # 0x06
'bos', # 0x07
'boss', # 0x08
'bong', # 0x09
'boj', # 0x0a
'boc', # 0x0b
'bok', # 0x0c
'bot', # 0x0d
'bop', # 0x0e
'boh', # 0x0f
'bwa', # 0x10
'bwag', # 0x... |
sauloal/cnidaria | refs/heads/master | scripts/venv/lib/python2.7/site-packages/pandas/tseries/converter.py | 13 | from datetime import datetime, timedelta
import datetime as pydt
import numpy as np
from dateutil.relativedelta import relativedelta
import matplotlib.units as units
import matplotlib.dates as dates
from matplotlib.ticker import Formatter, AutoLocator, Locator
from matplotlib.transforms import nonsingular
from pand... |
GladeRom/android_external_chromium_org | refs/heads/gr-3.1 | chrome/common/extensions/docs/server2/api_categorizer_test.py | 87 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from api_categorizer import APICategorizer
from compiled_file_system import CompiledFileSystem
from extensions_paths im... |
rabipanda/tensorflow | refs/heads/master | tensorflow/python/layers/maxout.py | 3 | # 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 applicabl... |
neerajvashistha/pa-dude | refs/heads/master | lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.py | 1710 | from __future__ import absolute_import, division, unicode_literals
try:
chr = unichr # flake8: noqa
except NameError:
pass
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.