repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
Dingo5733/djangoblog19 | refs/heads/master | src/blog/wsgi.py | 28 | """
WSGI config for blog 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.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS... |
Farkal/kivy | refs/heads/master | examples/guide/firstwidget/1_skeleton.py | 81 | from kivy.app import App
from kivy.uix.widget import Widget
class MyPaintWidget(Widget):
pass
class MyPaintApp(App):
def build(self):
return MyPaintWidget()
if __name__ == '__main__':
MyPaintApp().run()
|
aam-at/tensorflow | refs/heads/master | tensorflow/python/autograph/converters/variables_test.py | 13 | # Copyright 2020 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... |
gangadharkadam/verveerp | refs/heads/v5.0 | erpnext/support/doctype/maintenance_schedule/__init__.py | 37694 | from __future__ import unicode_literals
|
tomkralidis/inasafe | refs/heads/develop | safe_extras/raven/utils/serializer/base.py | 25 | """
raven.utils.serializer.base
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from raven.utils.encoding import to_string, to_unicode
from raven.utils.serializer.manager import register
from types import ClassType, Ty... |
jamielennox/keystonemiddleware-echo | refs/heads/master | keystonemiddleware_echo/app.py | 1 | # 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
# distributed under t... |
praekelt/jmbo-foundry | refs/heads/develop | foundry/mixins.py | 1 | from django.db import models
from django.contrib.sites.models import get_current_site
class CachingMixin(models.Model):
enable_caching = models.BooleanField(default=False, null=False)
cache_type = models.CharField(
max_length=32,
default='all_users',
choices=(
('all_users',... |
kenwang76/readthedocs.org | refs/heads/master | readthedocs/rtd_tests/mocks/mock_api.py | 22 | from contextlib import contextmanager
import json
import mock
# Mock tastypi API.
class ProjectData(object):
def get(self):
return dict()
def mock_version(repo):
class MockVersion(object):
def __init__(self, x=None):
pass
def put(self, x=None):
return x
... |
jangorecki/h2o-3 | refs/heads/master | h2o-py/tests/testdir_javapredict/pyunit_javapredict_GBM_xlarge.py | 8 | from __future__ import print_function
from builtins import zip
from builtins import range
import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
def javapredict_gbm_xlarge():
hdfs_name_node = pyunit_utils.hadoop_namenode()
hdfs_file_name = "/datasets/z_repro.csv"
url = "hdfs:/... |
whiteclover/solo | refs/heads/master | solo/web/app.py | 1 | #!/usr/bin/env python
# Copyright (C) 2015 Thomas Huang
#
# 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 us... |
zzxuanyuan/root-compressor-dummy | refs/heads/compressionbench | tutorials/pyroot/tornado.py | 49 | ## \file
## \ingroup tutorial_pyroot
## Tornado example.
## \notebook
##
## \macro_image
## \macro_code
##
## \author Wim Lavrijsen
from ROOT import TCanvas, TView, TPolyMarker3D, TPaveText
from ROOT import gROOT, gBenchmark
from math import cos, sin, pi
gBenchmark.Start( 'tornado' )
d = 16
numberOfPoints = 200
numb... |
sungkim11/mhargadh | refs/heads/master | django/utils/feedgenerator.py | 151 | """
Syndication feed generation library -- used for generating RSS, etc.
Sample usage:
>>> from django.utils import feedgenerator
>>> feed = feedgenerator.Rss201rev2Feed(
... title=u"Poynter E-Media Tidbits",
... link=u"http://www.poynter.org/column.asp?id=31",
... description=u"A group Weblog by the shar... |
tj93/pymtl | refs/heads/master | pclib/cl/__init__.py | 8 | from queues import (
Queue,
InValRdyQueue,
OutValRdyQueue,
ChildReqRespQueueAdapter,
ParentReqRespQueueAdapter,
)
from pipelines import Pipeline
from adapters import InValRdyQueueAdapter
from adapters import OutValRdyQueueAdapter
from InValRdyRandStallAdapter import InValRdyRandStallA... |
beagles/sosreport-neutron | refs/heads/neutron_break_out | sos/policies/redhat.py | 1 | ## Copyright (C) Steve Conklin <sconklin@redhat.com>
### This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This prog... |
peterbe/whatsdeployed | refs/heads/master | bin/download-latest-release.py | 1 | #!/usr/bin/env python
import os
import subprocess
from urllib.parse import urlparse
import click
import requests
from decouple import config
REPO_URL = config(
"REPO_URL", default="https://api.github.com/repos/peterbe/whatsdeployed"
)
URL = REPO_URL + "/releases"
def _check_output(*args, **kwargs):
return ... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/250_test_codecencodings_kr.py | 19 | #!/usr/bin/env python
#
# test_codecencodings_kr.py
# Codec encoding tests for ROK encodings.
#
from test import test_support
from test import test_multibytecodec_support
import unittest
class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase):
encoding = 'cp949'
tstring = test_multibytecod... |
nriley/NewsBlur | refs/heads/master | vendor/feedvalidator/demo/src/missingWebPages.py | 18 | #!/usr/bin/python
"""
$Id: missingWebPages.py 75 2004-03-28 07:48:21Z josephw $
Show any logging events without explanatory web pages
"""
from sys import path, argv, exit
from os.path import isfile
import inspect
import os.path
curdir = os.path.abspath(os.path.dirname(argv[0]))
BASE = os.path.split(curdir)[0]
path... |
openmicroscopy/openmicroscopy | refs/heads/develop | components/tools/OmeroPy/test/integration/test_tickets1000.py | 3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Integration test for any ticket upto #1000
Copyright 2008-2014 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
from __future__ import print_function
from omero.testlib import ITest
import pytest
import... |
holyangel/M7-GPE_L | refs/heads/SkyDragon | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... |
pombredanne/pyjs | refs/heads/master | pyjs/linker.py | 6 | import os
import sys
import pyjs.util as util
import logging
import pyjs
import subprocess
from pyjs import options
from pyjs import translator
if translator.name == 'proto':
builtin_module = 'pyjslib'
elif translator.name == 'dict':
builtin_module = '__builtin__'
else:
raise ValueError("unknown translator ... |
faassen/graphql-wsgi | refs/heads/master | graphql_wsgi/__init__.py | 3 | from .main import graphql_wsgi, graphql_wsgi_dynamic
|
JDReutt/BayesDB | refs/heads/master | bayesdb/client_remote.py | 2 | #
# Copyright (c) 2010-2014, MIT Probabilistic Computing Project
#
# Lead Developers: Jay Baxter and Dan Lovell
# Authors: Jay Baxter, Dan Lovell, Baxter Eaves, Vikash Mansinghka
# Research Leads: Vikash Mansinghka, Patrick Shafto
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may... |
nibrahim/PlasTeX | refs/heads/master | plasTeX/Base/LaTeX/FontSelection.py | 7 | #!/usr/bin/env python
"""
C.15 Font Selection (p225)
"""
from plasTeX import Command, Environment, sourceArguments
from plasTeX.Logging import getLogger
log = getLogger()
#
# C.15.1 Changing the Type Style
#
class TextDeclaration(Environment):
pass
class mdseries(TextDeclaration): pass
class bfseries(TextDe... |
aeph6Ee0/youtube-dl | refs/heads/master | youtube_dl/extractor/tvc.py | 64 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
clean_html,
int_or_none,
)
class TVCIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)'
_TEST = {
'url': 'http://www.tvc.ru/video/if... |
KillerByte/memorypool | refs/heads/psforkinit | contrib/qt_translations.py | 4110 | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary bitcoin distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.arg... |
richardfergie/googleads-python-lib | refs/heads/master | examples/dfa/v1_20/get_activity_types.py | 4 | #!/usr/bin/python
#
# Copyright 2014 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 b... |
PoornimaNayak/autotest-client-tests | refs/heads/master | linux-tools/librsvg2/librsvg2.py | 4 | #!/bin/python
import os, subprocess
import logging
from autotest.client import test
from autotest.client.shared import error
class librsvg2(test.test):
"""
Autotest module for testing basic functionality
of librsvg2
@author Anitha MallojiRao amalloji@in.ibm.com ##
"""
... |
cristian69/KernotekV3 | refs/heads/master | venv/lib/python2.7/site-packages/pip/util.py | 343 | import sys
import shutil
import os
import stat
import re
import posixpath
import zipfile
import tarfile
import subprocess
import textwrap
from pip.exceptions import InstallationError, BadCommand, PipError
from pip.backwardcompat import(WindowsError, string_types, raw_input,
console_to_s... |
dengchanglu/xysplider | refs/heads/develop | xysplider/spiders/XieChengSplider.py | 1 | from scrapy.contrib.spiders.init import InitSpider
from scrapy.http import Request, FormRequest
from scrapy.http.cookies import CookieJar
import json
from scrapy.contrib.spiders import Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
import random
# from items import temaSpiderItem
class XieChen... |
linuxm0nk3ys/conkyPress | refs/heads/master | py/login.py | 1 | #! /usr/bin/env python2.7
import pycurl
import StringIO
import urllib
from bs4 import BeautifulSoup
def perform(glob):
loginEx = 'false'
adminPageEx = 'false'
pathCookie = glob.path + '../data/cookie'
# TODO this file should be rewritten as a class with functions/defs
#Read the login Information
username = (gl... |
Srisai85/scikit-learn | refs/heads/master | doc/tutorial/text_analytics/solutions/generate_skeletons.py | 433 | """Generate skeletons from the example code"""
import os
exercise_dir = os.path.dirname(__file__)
if exercise_dir == '':
exercise_dir = '.'
skeleton_dir = os.path.abspath(os.path.join(exercise_dir, '..', 'skeletons'))
if not os.path.exists(skeleton_dir):
os.makedirs(skeleton_dir)
solutions = os.listdir(exerc... |
Simran-B/arangodb | refs/heads/docs_3.0 | 3rdParty/V8-4.3.61/third_party/python_26/Lib/encodings/cp424.py | 593 | """ Python Character Mapping Codec cp424 generated from 'MAPPINGS/VENDORS/MISC/CP424.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='... |
glove747/liberty-neutron | refs/heads/master | neutron/tests/unit/test_policy.py | 2 | # Copyright (c) 2012 OpenStack Foundation.
#
# 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... |
aristanetworks/neutron | refs/heads/master | neutron/tests/unit/agent/linux/test_ovsdb_monitor.py | 11 | # 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 agre... |
amaas/stanford-ctc | refs/heads/master | ctc_fast/decoder/decoder_config.py | 2 | import os
from os.path import join as pjoin
EGS_DIR = '/deep/group/speech/zxie/kaldi-stanford/kaldi-trunk/egs'
DATASET = 'swbd'
SCAIL_DATA_DIR = '/deep/u/zxie'
# CTC Parameters
if DATASET == 'wsj':
DATA_SUBSET = 'test_eval92'
DATA_DIR = pjoin(EGS_DIR, 'wsj/s6/exp/%s_ctc/' % DATA_SUBSET)
#DATA_DIR = pjo... |
flavour/rgims_as_diff | refs/heads/master | modules/eden/auth.py | 5 | # -*- coding: utf-8 -*-
""" Sahana Eden Auth Model
@copyright: 2009-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
... |
Sonicbids/django | refs/heads/master | django/utils/html_parser.py | 4 | from django.utils.six.moves import html_parser as _html_parser
import re
import sys
current_version = sys.version_info
use_workaround = current_version < (2, 7, 3)
try:
HTMLParseError = _html_parser.HTMLParseError
except AttributeError:
# create a dummy class for Python 3.5+ where it's been removed
class... |
p0psicles/SickRage | refs/heads/master | lib/sqlalchemy/dialects/mssql/base.py | 78 | # mssql/base.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
"""
.. dialect:: mssql
:name: Microsoft SQL Server
Auto Increment Behavior
-------... |
cimarron-pistoncloud/molecule | refs/heads/master | molecule/command/list.py | 3 | # Copyright (c) 2015-2016 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... |
jazkarta/edx-platform-for-isc | refs/heads/backport-auto-certification | lms/lib/comment_client/comment_client.py | 190 | """Import other classes here so they can be imported from here."""
# pylint: disable=unused-import
from .comment import Comment
from .thread import Thread
from .user import User
from .commentable import Commentable
|
openstack/cloudbase-init | refs/heads/master | cloudbaseinit/tests/utils/windows/test_timezone.py | 11 | # Copyright 2015 Cloudbase Solutions Srl
#
# 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 l... |
cfobel/python___pymunk | refs/heads/master | dump/pyramid_bench.py | 1 | """Basic benchmark of a pyramid of boxes
Results with 10000 iterations (lower is better)
python 2.6: 186.8 sec
pypy-1.9: 428.9 sec
"""
import timeit
import pymunk
from pymunk import Vec2d
class PyramidDemo:
def flipyv(self, v):
return v[0], -v[1]+self.h
def __init__(self):... |
krader1961/python-mode | refs/heads/develop | pymode/libs2/rope/base/pynamesdef.py | 112 | import rope.base.oi.soi
from rope.base import pynames
from rope.base.pynames import *
class AssignedName(pynames.AssignedName):
def __init__(self, lineno=None, module=None, pyobject=None):
self.lineno = lineno
self.module = module
self.assignments = []
self.pyobject = _Inferred(se... |
eyang414/superFriend | refs/heads/master | electronApp/node_modules/generic-pool/fabfile.py | 926 | #
# dependencies:
# fabric (apt-get install fabric)
# node-jslint (http://github.com/reid/node-jslint)
# expresso (or replace with whatever node.js test tool you're using)
#
from fabric.api import local
import os, os.path
def test():
local('expresso -I lib test/*', capture=False)
def jslint():
... |
smarter-travel-media/warthog | refs/heads/master | warthog/__init__.py | 1 | # -*- coding: utf-8 -*-
#
# Warthog - Simple client for A10 load balancers
#
# Copyright 2014-2016 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
warthog
~~~~~~~
Simple client for A10 load balancers.
"""
__version__ = '2.0.1'
|
CodeReclaimers/btce-api | refs/heads/master | samples/show-tickers.py | 2 | #!/usr/bin/env python
import btceapi
attrs = ('high', 'low', 'avg', 'vol', 'vol_cur', 'last',
'buy', 'sell', 'updated')
print("Tickers:")
connection = btceapi.BTCEConnection()
info = btceapi.APIInfo(connection)
for pair in info.pair_names:
ticker = btceapi.getTicker(pair, connection)
print(pair)
... |
tuxfux-hlp-notes/python-batches | refs/heads/master | archieves/batch-57/modules/sheets/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.py | 962 | from textwrap import dedent
try:
from .file_cache import FileCache
except ImportError:
notice = dedent('''
NOTE: In order to use the FileCache you must have
lockfile installed. You can install it via pip:
pip install lockfile
''')
print(notice)
try:
import redis
from .redis_cach... |
rcarmo/rss2imap-gae | refs/heads/master | lib/hy/models/expression.py | 9 | # Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modif... |
mattclark/osf.io | refs/heads/develop | osf/migrations/0031_preprintprovider_share_source.py | 26 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-18 14:33
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('osf', '0030_preprint_provider_institution_permissions'),
]
operations = [
mig... |
faywong/FFPlayer | refs/heads/trunk | project/jni/python/src/Doc/includes/sqlite3/connect_db_1.py | 139 | import sqlite3
con = sqlite3.connect("mydb")
|
joewalnes/idea-community | refs/heads/master | plugins/hg4idea/testData/bin/hgext/convert/cvsps.py | 1 | # Mercurial built-in replacement for cvsps.
#
# Copyright 2008, Frank Kingswood <frank@kingswood-consulting.co.uk>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import os
import re
import cPickle as pickle
from mercurial import ... |
alexphelps/django-drip | refs/heads/master | drip/models.py | 1 | from datetime import datetime, timedelta
import random
from django.db import models
from django.core.exceptions import ValidationError
from django.conf import settings
from django.utils.functional import cached_property
from drip.utils import get_user_model
# just using this to parse, but totally insane package nami... |
crazyyoung01/vv | refs/heads/master | vn.archive/vn.lts_old/pyscript/lts_data_type.py | 167 | # encoding: UTF-8
defineDict = {}
typedefDict = {}
#//////////////////////////////////////////////////////////////////////
#@company shanghai liber information Technology Co.,Ltd
#@file SecurityFtdcUserApiDataType.h
#@brief 定义业务数据类型
#//////////////////////////////////////////////////////////////////////
#/////////... |
korsakov/t-dash | refs/heads/master | dashboards/urls.py | 1 | """defining url patterns for dashboards """
from django.conf.urls import url
from . import views
urlpatterns = [
# home page
url(r'^$', views.index, name='index'),
# topical urls
url(r'^topics/$', views.topics, name='topics'),
# detailed topical urls
url(r'^topics/(?P<topic_id>\d+)/$', views.topic, name='topi... |
FranzSchubert92/cw | refs/heads/master | python/collatz.py | 1 | """
collatz(n) starts a Collatz sequence from n;
doctests
>>> collatz(4)
'4->2->1'
>>> collatz(3)
'3->10->5->16->8->4->2->1'
"""
def collatz(n):
seq = [n]
while seq[-1] > 1:
if seq[-1] % 2 == 0:
seq.append( seq[-1] // 2 )
else:
seq.append( 3 * seq[-1] + 1 )
return ... |
dirn/ansible | refs/heads/devel | lib/ansible/plugins/action/template.py | 3 | # (c) 2015, 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... |
airfrog/okws | refs/heads/master | test/regtest/cases/5.py | 5 | desc = "basic function calls and recursion"
filedata = \
"""
{$
def fact (x) {
if (x <= 0) {
return 1;
}
else {
locals { y }
y = x * fact (x - 1)
return y;
}
}
def fact2 (x) {
if (x <= 0) { return 1; }
locals { y }
... |
sliz1/servo | refs/heads/master | tests/wpt/css-tests/tools/wptserve/tests/functional/test_stash.py | 299 | import os
import unittest
import urllib2
import json
import uuid
import wptserve
from wptserve.router import any_method
from base import TestUsingServer, doc_root
class TestResponseSetCookie(TestUsingServer):
def test_put_take(self):
@wptserve.handlers.handler
def handler(request, response):
... |
simone/web-scuola-janua | refs/heads/master | grafica/migrations/pages_migration/0004_page_subtitle.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('pages', '0003_auto_20150527_1555'),
]
operations = [
migrations.AddField(
model_name='page',
name='s... |
karstenw/nodebox-pyobjc | refs/heads/master | setup_console.py | 1 | # This is a setup file for a command-line version of NodeBox.
# If you want to work on the Mac OS X version, go look in macsetup.py.
# This is your standard setup.py, so to install the package, use:
# python setup.py install
# We require some dependencies:
# - PyObjC
# - py2app
# - cPathMatics (included in the "l... |
veusz/veusz | refs/heads/master | Documents/manual-source/conf.py | 1 | # -*- coding: utf-8 -*-
#
# veusz documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 5 11:07:00 2017.
#
# 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
# autogenerated file.
#
# All... |
sanguinariojoe/FreeCAD | refs/heads/master | src/Mod/Fem/femviewprovider/view_constraint_electrostaticpotential.py | 12 | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
hj91/jaikuengine | refs/heads/master | common/test/sms.py | 34 | # Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
vnsofthe/odoo-dev | refs/heads/master | addons/rhwl_99bill/controllers/__init__.py | 7 | import web |
massimiliano-della-rovere/aiohttp_debugtoolbar | refs/heads/master | aiohttp_debugtoolbar/middlewares.py | 1 | import asyncio
import sys
import aiohttp_jinja2
from aiohttp import web
from .toolbar import DebugToolbar
from .tbtools.tbtools import get_traceback
from .utils import addr_in, REDIRECT_CODES, APP_KEY, TEMPLATE_KEY, hexlify, \
ContextSwitcher
__all__ = ['toolbar_middleware_factory', 'middleware']
HTML_TYPES = ('t... |
tavendo/AutobahnTestSuite | refs/heads/master | autobahntestsuite/autobahntestsuite/case/case9_5_2.py | 2 | ###############################################################################
##
## Copyright (c) Crossbar.io Technologies 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... |
myrjola/neverlate | refs/heads/master | django/calparser/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
huor/incubator-hawq | refs/heads/master | tools/bin/pythonSrc/PSI-0.3b2_gp/tests/mount_test.py | 7 | # The MIT License
#
# Copyright (C) 2009 Erick Tryzelaar
#
# Copyright (C) 2008-2009 Abilisoft Ltd.
#
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including withou... |
quentin-coursodon/PDC02-CNN | refs/heads/master | testDbscan.py | 1 | from sklearn.cluster import DBSCAN
import numpy as np
import matplotlib.colors as colors
import matplotlib.cm as cm
import matplotlib.pyplot as plt
def get_cmap(N):
'''Returns a function that maps each index in 0, 1, ... N-1 to a distinct
RGB color.'''
color_norm = colors.Normalize(vmin=0, vmax=N-1)
... |
diegoguimaraes/django | refs/heads/master | tests/i18n/project_dir/app_no_locale/models.py | 449 | from django.utils.translation import ugettext as _
string = _("This app has no locale directory")
|
youprofit/shogun | refs/heads/develop | examples/undocumented/python_static/kernel_commulongstring.py | 22 | from tools.load import LoadMatrix
from sg import sg
lm=LoadMatrix()
traindna=lm.load_dna('../data/fm_train_dna.dat')
testdna=lm.load_dna('../data/fm_test_dna.dat')
parameter_list=[[traindna,testdna,10,3,0,'n',False,'FULL'],
[traindna,testdna,11,4,0,'n',False,'FULL']]
def kernel_commulongstring (fm_train_dna=traindn... |
Eric89GXL/mne-python | refs/heads/master | mne/preprocessing/artifact_detection.py | 11 | # Authors: Adonay Nunes <adonay.s.nunes@gmail.com>
# Luke Bloy <luke.bloy@gmail.com>
# License: BSD (3-clause)
import numpy as np
from ..annotations import (Annotations, _annotations_starts_stops)
from ..transforms import (quat_to_rot, _average_quats, _angle_between_quats,
apply_tra... |
arrabito/DIRAC | refs/heads/integration | Resources/MessageQueue/test/Test_MQConnectionManager.py | 5 | """Unit tests of MQConnectionManager in the DIRAC.Resources.MessageQueue.MConnectionManager
Also, test of internal functions for mq connection storage.
"""
## ignore use of __functions, _functions
#pylint: disable=no-member, protected-access
import unittest
import mock
from DIRAC import S_OK
from DIRAC.Resources.M... |
jamesliu/mxnet | refs/heads/master | tests/python/unittest/common.py | 3 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
mikkylok/mikky.lu | refs/heads/master | venv/lib/python2.7/site-packages/werkzeug/formparser.py | 86 | # -*- coding: utf-8 -*-
"""
werkzeug.formparser
~~~~~~~~~~~~~~~~~~~
This module implements the form parsing. It supports url-encoded forms
as well as non-nested multipart uploads.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more deta... |
DeltaEpsilon-HackFMI2/FMICalendar-REST | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/localflavor/no/forms.py | 110 | """
Norwegian-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
import datetime
from django.contrib.localflavor.no.no_municipalities import MUNICIPALITY_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields... |
enitihas/SAC-Website | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/request.py | 853 | try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
from .filepost import encode_multipart_formdata
__all__ = ['RequestMethods']
class RequestMethods(object):
"""
Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`~urllib3.... |
tectronics/browserscope | refs/heads/master | third_party/gaebar/views.py | 9 | # This Python file uses the following encoding: utf-8
"""
Gaebar (Google App Engine Backup and Restore) Beta 1
A Naklab™ production sponsored by the <head> web conference - http://headconference.com
Copyright (c) 2009 Aral Balkan. http://aralbalkan.com
Released under the GNU GPL v3 License. See license.txt ... |
Teamxrtc/webrtc-streaming-node | refs/heads/master | third_party/depot_tools/third_party/gsutil/gslib/__init__.py | 51 | # Copyright 2010 Google Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge,... |
kenshay/ImageScript | refs/heads/master | ProgramData/SystemFiles/opencv/sources/modules/java/check-tests.py | 15 | #!/usr/bin/env python
import sys, os, re
classes_ignore_list = (
'OpenCV(Test)?Case',
'OpenCV(Test)?Runner',
'CvException',
)
funcs_ignore_list = (
'\w+--HashCode',
'Mat--MatLong',
'\w+--Equals',
'Core--MinMaxLocResult',
)
class JavaParser:
def __init__(self):
self.clear()
... |
yongshengwang/hue | refs/heads/master | build/env/lib/python2.7/site-packages/tablib-0.10.0-py2.7.egg/tablib/packages/xlwt3/Formatting.py | 46 | #!/usr/bin/env python
'''
The XF record is able to store explicit cell formatting attributes or the
attributes of a cell style. Explicit formatting includes the reference to
a cell style XF record. This allows to extend a defined cell style with
some explicit attributes. The formatting attributes are... |
matanbs/webm.webminspector | refs/heads/master | ebml_header.py | 16 | ##
## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributin... |
djtaylor/lense-common | refs/heads/master | usr/lib/python2.7/dist-packages/lense/common/socket.py | 1 | from lense import set_arg
from socketIO_client import SocketIO
class LenseSocketIO(object):
"""
Class objects for handling SocketIO interactions.
"""
def __init__(self):
self.io = None
self.params = None
# Try to open the connection
try:
if LENSE... |
laperry1/android_external_chromium_org | refs/heads/cm-12.1 | chrome/common/extensions/docs/server2/chained_compiled_file_system_test.py | 98 | #!/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 chained_compiled_file_system import ChainedCompiledFileSystem
from compiled_file_system import CompiledFileSystem... |
WorkHorseIndustries/drf-raw-pagination | refs/heads/master | pagination/pagination.py | 1 | from .paginator import RawablPagNumberPaginator
from .db.models.query import PaginatedRawQuerySet
from django.core.paginator import Paginator as DjangoPaginator
from rest_framework.pagination import PageNumberPagination
class RawablePageNumberPaginator(PageNumberPagination):
def paginate_queryset(self, query... |
rudhir-upretee/Sumo_With_Netsim | refs/heads/master | tools/trip/route2trips.py | 3 | #!/usr/bin/env python
"""
@file route2trips.py
@author Michael Behrisch
@author Daniel Krajzewicz
@date 2008-03-19
@version $Id: route2trips.py 11671 2012-01-07 20:14:30Z behrisch $
This script converts SUMO routes back into SUMO trips which serve
as input to one of the routing applications.
It reads the route... |
google-research/google-research | refs/heads/master | tf3d/utils/angle_utils_test.py | 1 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
makielab/psd-tools | refs/heads/master | src/psd_tools/constants.py | 2 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
class Enum(object):
_attributes_cache = None
_values_dict_cache = None
@classmethod
def _attributes(cls):
if cls._attributes_cache is None:
attrs = [name for name in dir(cls)
if na... |
nicolasderam/ikaaro | refs/heads/master | ikaaro/cc.py | 1 | # -*- coding: UTF-8 -*-
# Copyright (C) 2010 Juan David Ibáñez Palomar <jdavid@itaapy.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... |
zdary/intellij-community | refs/heads/master | python/testData/docstrings/googleMandatoryIndentationInsideSection.py | 48 | def f(x, y):
"""
Args:
x (int): foo
Args:
y (int): bar
Examples:
first line
second line
third line
""" |
mozilla/stoneridge | refs/heads/master | python/src/Lib/plat-os2emx/grp.py | 67 | # this module is an OS/2 oriented replacement for the grp standard
# extension module.
# written by Andrew MacIntyre, April 2001.
# updated July 2003, adding field accessor support
# note that this implementation checks whether ":" or ";" as used as
# the field separator character.
"""Replacement for grp standard ex... |
sajuptpm/manila | refs/heads/master | manila/tests/db/sqlalchemy/test_api.py | 1 | # Copyright 2013 OpenStack Foundation
# Copyright (c) 2014 NetApp, Inc.
# Copyright (c) 2015 Rushil Chugh
# 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
#
# ... |
jmcarp/django | refs/heads/master | django/contrib/gis/admin/options.py | 379 | from django.contrib.admin import ModelAdmin
from django.contrib.gis.admin.widgets import OpenLayersWidget
from django.contrib.gis.db import models
from django.contrib.gis.gdal import HAS_GDAL, OGRGeomType
from django.core.exceptions import ImproperlyConfigured
spherical_mercator_srid = 3857
class GeoModelAdmin(Model... |
hongquan/saleor | refs/heads/master | saleor/__init__.py | 10 | #!/usr/bin/env python
def manage():
import os
import sys
from django.core.management import execute_from_command_line
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")
execute_from_command_line(sys.argv)
|
shepdelacreme/ansible | refs/heads/devel | test/units/parsing/yaml/test_dumper.py | 49 | # coding: utf-8
# 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 i... |
guannaifu/omaha | refs/heads/master | clickonce/add_trusturlparams.py | 66 | #!/usr/bin/python2.4
#
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
hsiaoyi0504/scikit-learn | refs/heads/master | sklearn/ensemble/partial_dependence.py | 251 | """Partial dependence plots for tree ensembles. """
# Authors: Peter Prettenhofer
# License: BSD 3 clause
from itertools import count
import numbers
import numpy as np
from scipy.stats.mstats import mquantiles
from ..utils.extmath import cartesian
from ..externals.joblib import Parallel, delayed
from ..externals im... |
agry/NGECore2 | refs/heads/master | scripts/object/creature/npc/droid/bomarr_monk_spider_droid.py | 85615 | import sys
def setup(core, object):
return |
arborh/tensorflow | refs/heads/master | tensorflow/examples/tutorials/mnist/__init__.py | 211 | # 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... |
poiati/django | refs/heads/master | django/contrib/admin/utils.py | 109 | from __future__ import unicode_literals
import datetime
import decimal
from collections import defaultdict
from django.contrib.auth import get_permission_codename
from django.core.exceptions import FieldDoesNotExist
from django.core.urlresolvers import NoReverseMatch, reverse
from django.db import models
from django.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.