repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
AustinRoy7/Pomodoro-timer | refs/heads/master | venv/Lib/encodings/iso8859_11.py | 272 | """ Python Character Mapping Codec iso8859_11 generated from 'MAPPINGS/ISO8859/8859-11.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... |
RandallDW/Aruba_plugin | refs/heads/Aruba_plugin | plugins/org.python.pydev.refactoring/tests/python/adapter/classdef/testBaseClass.py | 8 | class A:
def __init__(self):
print "A"
class B:
def __init__(self):
print "B"
def simple_meth(self):
print "simple_meth B"
class C(A, B):
def __init__(self):
print "C"
class D(B):
def __init__(self, a):
self.a = 2
print "D"... |
rrrene/django | refs/heads/master | django/core/management/commands/startapp.py | 513 | from importlib import import_module
from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
class Command(TemplateCommand):
help = ("Creates a Django app directory structure for the given app "
"name in the current directory or optionally in t... |
rekbun/browserscope | refs/heads/master | categories/v8/test_set.py | 9 | #!/usr/bin/python2.5
#
# 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 ... |
ivannotes/luigi | refs/heads/master | luigi/mrrunner.py | 6 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 requ... |
wazeerzulfikar/scikit-learn | refs/heads/master | sklearn/svm/tests/test_svm.py | 33 | """
Testing for Support Vector Machine module (sklearn.svm)
TODO: remove hard coded numerical results when possible
"""
import numpy as np
import itertools
from numpy.testing import assert_array_equal, assert_array_almost_equal
from numpy.testing import assert_almost_equal
from numpy.testing import assert_allclose
fro... |
RaviTezu/yowsup | refs/heads/master | yowsup/layers/protocol_acks/protocolentities/__init__.py | 70 | from .ack import AckProtocolEntity
from .ack_incoming import IncomingAckProtocolEntity
from .ack_outgoing import OutgoingAckProtocolEntity |
Grirrane/odoo | refs/heads/master | addons/website_mail/__init__.py | 1577 | # -*- 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 ... |
Affirm/pyrollbar | refs/heads/master | rollbar/test/test_rollbar.py | 1 | import base64
import copy
import json
import mock
import socket
import uuid
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import unittest
import rollbar
from rollbar.lib import python_major_version, string_types
from rollbar.test import BaseTest
try:
eval("""
def... |
EmreAtes/spack | refs/heads/develop | var/spack/repos/builtin/packages/r-stringi/package.py | 5 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
SouWilliams/selenium | refs/heads/master | py/selenium/webdriver/firefox/__init__.py | 2454 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
GuillaumeGomez/servo | refs/heads/master | tests/wpt/css-tests/tools/wptserve/wptserve/request.py | 87 | import base64
import cgi
import Cookie
import StringIO
import tempfile
import urlparse
from . import stash
from .utils import HTTPException
missing = object()
class Server(object):
"""Data about the server environment
.. attribute:: config
Environment configuration information with information about t... |
webpp-studio/codestyle | refs/heads/master | tests/test_settings.py | 1 | """Проверки модуля с настройками."""
from unittest import TestCase
from codestyle.settings import get_logging_config
class Test(TestCase):
"""Проверки функций модуля."""
def test_get_logging_config(self):
"""Проверка get_logging_config."""
mock_line_separator = '\n'
mock_logging_leve... |
pokey/smartAutocomplete | refs/heads/master | pythonServer/server.py | 1 | #!/usr/bin/python
import http, sys, completionLister, Features, SimpleMixer, PerceptronMixer, \
argparse, Logger, Tracker, NaiveBayesMixer
from ContextClassifier import ContextClassifier
from KNClassifier import KNClassifier
from Feature import Feature
parser = argparse.ArgumentParser(description='run autocompl... |
Dunkas12/BeepBoopBot | refs/heads/master | lib/youtube_dl/extractor/streamable.py | 5 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
float_or_none,
int_or_none,
)
class StreamableIE(InfoExtractor):
_VALID_URL = r'https?://streamable\.com/(?:e/)?(?P<id>\w+)'
_TESTS = [
{
... |
dumbbell/virt-manager | refs/heads/freebsd | src/virtManager/error.py | 3 | # Error dialog with extensible "details" button.
#
# Copyright (C) 2007 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any... |
lin-credible/scikit-learn | refs/heads/master | sklearn/utils/graph.py | 289 | """
Graph utilities and algorithms
Graphs are represented with their adjacency matrices, preferably using
sparse matrices.
"""
# Authors: Aric Hagberg <hagberg@lanl.gov>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Jake Vanderplas <vanderplas@astro.washington.edu>
# License: BSD 3 clause
impo... |
mrawls/mesa-tools | refs/heads/master | mesa.py | 1 | ''' MESA output data loading and plotting
v0.2, 15OCT2012: NuGrid collaboration (Sam Jones, Michael Bennett, Daniel Conti,
William Hillary, Falk Herwig, Christian Ritter)
v0.1, 23JUN2010: Falk Herwig
mesa.py provides tools to get MESA stellar evolution data output
into your ... |
martyngigg/pyqt-msvc | refs/heads/master | examples/dialogs/classwizard/classwizard_rc2.py | 5 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: Wed Mar 20 12:30:26 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x06\x53\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x... |
egenerat/gae-django | refs/heads/master | django/db/backends/__init__.py | 10 | import decimal
from threading import local
from django.db import DEFAULT_DB_ALIAS
from django.db.backends import util
from django.utils import datetime_safe
from django.utils.importlib import import_module
class BaseDatabaseWrapper(local):
"""
Represents a database connection.
"""
ops = No... |
untitaker/vdirsyncer | refs/heads/master | vdirsyncer/storage/google.py | 1 | # -*- coding: utf-8 -*-
import json
import logging
import os
import urllib.parse as urlparse
from atomicwrites import atomic_write
import click
from click_threading import get_ui_worker
from . import base, olddav as dav
from .. import exceptions
from ..utils import checkdir, expand_path, open_graphical_browser
lo... |
adrpar/incubator-airflow | refs/heads/master | airflow/example_dags/example_passing_params_via_test_command.py | 44 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... |
jdrudolph/scikit-bio | refs/heads/master | skbio/alignment/tests/__init__.py | 160 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... |
alfredoavanzosc/odoo-addons | refs/heads/8.0 | crm_claim_filter/models/crm_claim.py | 2 | # -*- coding: utf-8 -*-
# (c) 2015 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import fields, models
class CrmClaim(models.Model):
_inherit = 'crm.claim'
vat = fields.Char(string='TIN', related='partner_id.vat', readonly=True,
... |
sriprasanna/django-1.3.1 | refs/heads/master | django/contrib/messages/tests/user_messages.py | 241 | from django import http
from django.contrib.auth.models import User
from django.contrib.messages.storage.user_messages import UserMessagesStorage,\
LegacyFallbackStorage
from django.contrib.messages.tests.base import skipUnlessAuthIsInstalled
from django.contrib.messages.tests.cookie import set_cookie_data
from dja... |
xiaolihope/PerfKitBenchmarker-1.7.0 | refs/heads/master | tests/configs/option_decoders_test.py | 3 | # Copyright 2015 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... |
aut-sepanta/Sepanta3 | refs/heads/master | DCM/joystick_drivers-indigo-devel/ps3joy/scripts/ps3joy.py | 3 | #!/usr/bin/python
#***********************************************************
#* Software License Agreement (BSD License)
#*
#* Copyright (c) 2009, Willow Garage, Inc.
#* All rights reserved.
#*
#* Redistribution and use in source and binary forms, with or without
#* modification, are permitted provided that the f... |
saullocastro/pyNastran | refs/heads/master | pyNastran/converters/nastran/nastran_to_cart3d.py | 1 | from __future__ import print_function
from six import iteritems
from codecs import open as codec_open
from numpy import zeros, ones, arange, array, searchsorted, array_equal
from pyNastran.bdf.bdf import BDF
from pyNastran.converters.cart3d.cart3d import Cart3D
def nastran_to_cart3d(bdf, log=None, debug=False):
... |
openaid-IATI/OIPA | refs/heads/master | OIPA/iati/tests/test_activity_manager.py | 2 | from unittest import skip
from django.test import TestCase
class ActivityManagerTestCase(TestCase):
"""
Unit tests for the iati parser
TO DO; write tests for current defs in activity_manager
Not implemented, old tests removed since they were all invalid
"""
@skip('NotImplemented')
def te... |
dstufft/sqlalchemy | refs/heads/master | test/engine/test_logging.py | 23 | from sqlalchemy.testing import eq_, assert_raises_message
from sqlalchemy import select
import sqlalchemy as tsa
from sqlalchemy.testing import engines
import logging.handlers
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import mock
from sqlalchemy.testing.util import lazy_gc
class LogParamsTest(fi... |
jayceyxc/hue | refs/heads/master | desktop/core/ext-py/guppy-0.1.10/guppy/heapy/Part.py | 37 | #._cv_part guppy.heapy.Part
class Format(object):
__slots__ = 'impl', 'mod'
def __init__(self, impl):
self.impl = impl
self.mod = impl.mod
def get_formatted_row(self, row):
fr = self.get_stat_data(row)
rows = []
rs = row.name.split('\n')
subsequent_indent = len(fr)*' '
rows.extend(self.mod.wrap(
... |
samtayuk/Radical | refs/heads/master | radical/handlers/BoxManagerHandler.py | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# This file is part of LizardPanel
### BEGIN LICENSE
# Copyright (C) 2013 Samuel Taylor <samtaylor.uk@gmail.com>
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License versi... |
danbeam/catapult | refs/heads/master | third_party/beautifulsoup4/bs4/tests/test_lxml.py | 273 | """Tests to ensure that the lxml tree builder generates good trees."""
import re
import warnings
try:
import lxml.etree
LXML_PRESENT = True
LXML_VERSION = lxml.etree.LXML_VERSION
except ImportError, e:
LXML_PRESENT = False
LXML_VERSION = (0,)
if LXML_PRESENT:
from bs4.builder import LXMLTreeB... |
willbittner/grit-i18n | refs/heads/master | grit/tool/toolbar_preprocess.py | 61 | #!/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.
''' Toolbar preprocessing code. Turns all IDS_COMMAND macros in the RC file
into simpler constructs that can be understood by GRIT.... |
wanderine/nipype | refs/heads/master | nipype/interfaces/fsl/tests/test_auto_RobustFOV.py | 8 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.fsl.utils import RobustFOV
def test_RobustFOV_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohash=True... |
kernel-sanders/arsenic-mobile | refs/heads/master | Dependencies/Twisted-13.0.0/doc/core/examples/shaper.py | 26 | # -*- Python -*-
"""Example of rate-limiting your web server.
Caveat emptor: While the transfer rates imposed by this mechanism will
look accurate with wget's rate-meter, don't forget to examine your network
interface's traffic statistics as well. The current implementation tends
to create lots of small packets in s... |
3dfxmadscientist/CBSS | refs/heads/master | openerp/report/render/rml.py | 457 | # -*- 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... |
BT-astauder/odoo | refs/heads/8.0 | addons/purchase_double_validation/__openerp__.py | 260 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
aasoliz/Bitcoin-Statistics | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/progress/counter.py | 510 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS P... |
jni/fullcontext | refs/heads/master | setup.py | 1 | from __future__ import absolute_import
#from distutils.core import setup
from setuptools import setup
descr = """Full Context: a collection of context managers for Python.
"""
DISTNAME = 'fullcontext'
DESCRIPTION = 'A collection of context managers'
LONG_DESCRIPTION = descr
MAINTAINER =... |
max-leuthaeuser/naoservice | refs/heads/master | CodeGeneration/old/NaoCodeGenerator.py | 1 | # -*- coding: utf-8 -*-
"""
NaoCodeGenerator is able to generate sourcecode for any language to run
methods remotely with the Nao webservice (NaoService). All code will be
generated from the Nao SDK/API.
Copyright (c) 2011, Max Leuthaeuser
License: GPL (see LICENSE.txt for details)
"""
__author__ = 'Max Leu... |
ak2703/edx-platform | refs/heads/master | common/djangoapps/enrollment/tests/test_views.py | 5 | """
Tests for user enrollment.
"""
import json
import itertools
import unittest
import datetime
import ddt
from django.core.cache import cache
from mock import patch
from django.test import Client
from django.core.handlers.wsgi import WSGIRequest
from django.core.urlresolvers import reverse
from rest_framework.test im... |
UOMx/edx-platform | refs/heads/master | lms/djangoapps/badges/backends/tests/test_badgr_backend.py | 30 | """
Tests for BadgrBackend
"""
from datetime import datetime
import ddt
from django.db.models.fields.files import ImageFieldFile
from django.test.utils import override_settings
from lazy.lazy import lazy
from mock import patch, Mock, call
from badges.backends.badgr import BadgrBackend
from badges.models import BadgeA... |
kybriainfotech/iSocioCRM | refs/heads/8.0 | addons/website_mail/__init__.py | 1577 | # -*- 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 ... |
ville-k/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/kernel_tests/onehot_categorical_test.py | 89 | # 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... |
hbiyik/tribler | refs/heads/channelsql | src/tribler-gui/tribler_gui/tests/fake_tribler_api/models/torrent.py | 1 | import time
from binascii import unhexlify
from random import choice, randint, uniform
from tribler_core.modules.metadata_store.serialization import REGULAR_TORRENT
from tribler_core.utilities.unicode import hexlify
from tribler_gui.tests.fake_tribler_api.constants import COMMITTED
from tribler_gui.tests.fake_tribler... |
openiitbombayx/edx-platform | refs/heads/master | lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py | 188 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'GeneratedCertificate.graded_download_url'
db.delete_column('certificates_generatedcertific... |
luzpaz/QGIS | refs/heads/master | python/testing/mocked.py | 45 | # -*- coding: utf-8 -*-
"""
***************************************************************************
mocked
---------------------
Date : January 2016
Copyright : (C) 2016 by Matthias Kuhn
Email : matthias@opengis.ch
**************************************... |
samsu/neutron | refs/heads/master | openstack/common/timeutils.py | 118 | # Copyright 2011 OpenStack Foundation.
# 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 req... |
apache/couchdb-mango | refs/heads/master | test/09-text-sort-test.py | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... |
ErelisConsulting/vshape | refs/heads/develop | vshape/__init__.py | 84 | __version__ = "0.0.1"
|
Homeloc/validictory | refs/heads/master | validictory/extended.py | 1 | '''
'''
from datetime import datetime
from validator import SchemaValidator
class ExtendedSchemaValidator(SchemaValidator):
'''
A JSON schema validator, with support for the date type, and a few other
validators either present in the JSON Schema specifications but not in
validictory, or ... |
devopshq/crosspm | refs/heads/master | crosspm/helpers/content.py | 1 | class DependenciesContent(str):
"""
Используется только для определения что мы подали на вход не конкретный путь до файла, а уже готовый контент
"""
pass
|
code-sauce/tensorflow | refs/heads/master | tensorflow/python/ops/batch_norm_benchmark.py | 30 | # 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... |
alobbs/qvm | refs/heads/master | qvm/centos.py | 1 | import os
import re
import ssh
import cmd
import util
USER_DATA = """\
#cloud-config
hostname: %(hostname)s
manage_etc_hosts: true
password: centos
chpasswd: {expire: False}
ssh_pwauth: True
ssh_authorized_keys:
- %(ssh_key)s
runcmd:
- [ yum, -y, remove, cloud-init ]
- [ poweroff ]
"""
META_DATA = """\
instance... |
natanielruiz/android-yolo | refs/heads/master | jni-build/jni/include/tensorflow/contrib/layers/python/layers/initializers_test.py | 4 | # 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... |
jonobacon/ubuntu-accomplishments-viewer | refs/heads/master | accomplishments_viewer_lib/__init__.py | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# Copyright (C) 2012 Jono Bacon <jono@ubuntu.com>
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foun... |
hwu25/AppPkg | refs/heads/trunk | Applications/Python/Python-2.7.2/Lib/encodings/undefined.py | 103 | """ Python 'undefined' Codec
This codec will always raise a ValueError exception when being
used. It is intended for use by the site.py file to switch off
automatic string to Unicode coercion.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
... |
SUNET/python-suds | refs/heads/master | suds/properties.py | 204 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... |
wfn/stem | refs/heads/master | test/integ/response/protocolinfo.py | 4 | """
Integration tests for the stem.response.protocolinfo.ProtocolInfoResponse class
and related functions.
"""
import unittest
import stem.connection
import stem.socket
import stem.util.system
import stem.version
import test.runner
from test import mocking
from test.integ.util.system import filter_system_call
clas... |
ahb0327/intellij-community | refs/heads/master | python/testData/copyPaste/multiLine/IndentMulti41.after.py | 996 | class C:
def foo(self):
x = 1
y = 2
y = 2
|
wileynet/EatDudeWeb | refs/heads/master | EatDudeWeb/app/view/main/user/__init__.py | 1 | from web.template import CompiledTemplate, ForLoop, TemplateResult
# coding: utf-8
def admin (form):
__lineoffset__ = -4
loop = ForLoop()
self = TemplateResult(); extend_ = self.extend
extend_([u'<div id="form1">\n'])
extend_([u'<h3>Active</h3>\n'])
extend_([u'<form name="test" method="POST"> ... |
pkerpedjiev/ernwin | refs/heads/master | fess/motif/annotate.py | 1 | from __future__ import print_function
import os.path as op
import os
import subprocess as sp
import pandas as pa
import warnings
from . import motif_atlas as ma
import collections as clcs
import fess.builder.config as cbc
import forgi.utilities.debug as fud
import forgi.threedee.model.coarse_grain as ftmc
import sys
im... |
A-Kokolis/thesis-ntua | refs/heads/master | x86_first_implementation/monitors.py | 2 | from time import sleep
import os
import abc
import logging
import sys
from random import randrange
from threading import Thread
from subprocess import call, STDOUT
from Queue import Queue
''' Monitor Interface
monitors are meant to be subclassed by platform-specific diagnostics.
They handle thread-... |
MjAbuz/fabric | refs/heads/master | fabric/io.py | 10 | from __future__ import with_statement
import sys
import time
import re
import socket
from select import select
from fabric.state import env, output, win32
from fabric.auth import get_password, set_password
import fabric.network
from fabric.network import ssh, normalize
from fabric.utils import RingBuffer
from fabric.... |
midori1/midorinoblog | refs/heads/master | site-packages/django/contrib/comments/admin.py | 178 | from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.comments.models import Comment
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
from django.contrib.comments import get_model
from django.contrib.comments.v... |
40223136/w17test1 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/rect.py | 603 | #!/usr/bin/env python
'''Pygame object for storing rectangular coordinates.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import copy
#import SDL.video
import SDL
class _RectProxy:
'''Proxy for SDL_Rect that can handle negative size.'''
__slots__ = ['x', 'y', 'w', 'h']
def __init__(self... |
azureplus/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/invalid_models/tests.py | 57 | import copy
import sys
from django.core.management.validation import get_validation_errors
from django.db.models.loading import cache, load_app
from django.test.utils import override_settings
from django.utils import unittest
from django.utils.six import StringIO
class InvalidModelTestCase(unittest.TestCase):
"... |
Pixomondo/rez | refs/heads/master_pxo | docs/conf.py | 10 | # -*- coding: utf-8 -*-
#
# Rez documentation build configuration file, created by
# sphinx-quickstart on Mon Jun 30 11:14:36 2014.
#
# 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 c... |
frankrousseau/weboob | refs/heads/master | modules/freemobile/pages/homepage.py | 3 | # -*- coding: utf-8 -*-
# Copyright(C) 2012-2014 Florent Fourcot
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at y... |
ARM-software/trappy | refs/heads/master | trappy/sched.py | 1 | # Copyright 2015-2017 ARM Limited
#
# 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 w... |
rednaxelafx/apache-spark | refs/heads/master | python/pyspark/resource/profile.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 us... |
apbard/scipy | refs/heads/master | scipy/optimize/_trustregion_exact.py | 11 | """Nearly exact trust-region optimization subproblem."""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.linalg import (norm, get_lapack_funcs, solve_triangular,
cho_solve)
from ._trustregion import (_minimize_trust_region, BaseQuadraticSubproble... |
msmolens/VTK | refs/heads/slicer-v6.3.0-2015-07-21-426987d | Rendering/Volume/Testing/Python/TestFixedPointRayCasterLinearCropped.py | 26 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.... |
ruo91/bazel | refs/heads/master | tools/android/stubify_manifest_test.py | 26 | # 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 ag... |
rethinkdb/rethinkdb | refs/heads/next | test/common/http_support/flask/app.py | 427 | # -*- coding: utf-8 -*-
"""
flask.app
~~~~~~~~~
This module implements the central WSGI application object.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from threading import Lock
from datetime import timedelta
from itertools import... |
MrSurly/micropython-esp32 | refs/heads/esp32 | tests/basics/int_constfolding_intbig.py | 45 | # tests int constant folding in compiler
# negation
print(-0x3fffffff) # 32-bit edge case
print(-0x3fffffffffffffff) # 64-bit edge case
print(-(-0x3fffffff - 1)) # 32-bit edge case
print(-(-0x3fffffffffffffff - 1)) # 64-bit edge case
# 1's complement
print(~0x3fffffff) # 32-bit edge case
print(~0x3fffffffffffffff) # ... |
Drooids/geojsonlint.com | refs/heads/master | geojsonlint/wsgi.py | 2 | """
WSGI config for geojsonlint project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATIO... |
eduNEXT/edx-platform | refs/heads/master | lms/djangoapps/certificates/__init__.py | 12133432 | |
Mj258/weiboapi | refs/heads/master | srapyDemo/envs/Lib/site-packages/cryptography/hazmat/primitives/constant_time.py | 55 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import hmac
from cryptography.hazmat.bindings._constant_time import lib
... |
deniszgonjanin/moviepy | refs/heads/master | moviepy/video/fx/rotate.py | 15 | from moviepy.decorators import apply_to_mask
import numpy as np
try:
from PIL import Image
PIL_FOUND = True
def pil_rotater(pic, angle, resample, expand):
return np.array( Image.fromarray(pic).rotate(angle, expand=expand,
resample=resample))
excep... |
shriker/sublime | refs/heads/master | Packages/pygments/all/pygments/formatters/img.py | 25 | # -*- coding: utf-8 -*-
"""
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
Formatter for Pixmap output.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
from pygments.formatter import Formatter
from pygments.util import ge... |
sudheesh001/oh-mainline | refs/heads/master | vendor/packages/Django/tests/modeltests/fixtures_model_package/models/__init__.py | 115 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Article(models.Model):
headline = models.CharField(max_length=100, default='Default headline')
pub_date = models.DateTimeField()
def __str__(self):
return self.headline
... |
ianblenke/awsebcli | refs/heads/master | ebcli/controllers/local.py | 5 | # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... |
klahnakoski/SpotManager | refs/heads/dev | vendor/jx_elasticsearch/es52/painless/gt_op.py | 4 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http:# mozilla.org/MPL/2.0/.
#
# Contact: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import, divisi... |
Aeronavics/MissionPlanner | refs/heads/mainline | Scripts/example8 - speech.py | 20 | import sys
import math
import clr
import time
clr.AddReference("MissionPlanner")
import MissionPlanner
clr.AddReference("MissionPlanner.Utilities") # includes the Utilities class
print 'Start Script'
MissionPlanner.MainV2.speechEnable = True
while True:
print 'speech ...'
MissionPlanner.MainV2.speec... |
jhpeterson/DXFtoMesh | refs/heads/master | example.py | 1 | #!/usr/bin/env python
'''
Example for the usage of the DXFGeometry object within python
'''
from __future__ import print_function
import numpy as np
import DXFtoSegments
import lineintersect
from matplotlib import pyplot as plt
import time
tests = 4
dxf_objects = []
for i in range(tests):
file_name = './DXFTest... |
semonte/intellij-community | refs/heads/master | python/testData/completion/strFormat.after.py | 40 | '{0}'.format(1).encode()
|
connoryork/blackjack-bot | refs/heads/master | card.py | 1 | """
Project Name: blackjack-bot
File Name: card.py
Author: Connor York (cxy1054@rit.edu)
Updated: 7/20/16
Discord is a voice and chat app for gamers created by Hammer & Chisel, a startup based in Burlingame, CA.
More information on Discord and Hammer & Chisel can be found through the following links:
https://disco... |
IONISx/edx-platform | refs/heads/master | common/djangoapps/third_party_auth/tests/specs/test_google.py | 67 | """Integration tests for Google providers."""
from third_party_auth.tests.specs import base
class GoogleOauth2IntegrationTest(base.Oauth2IntegrationTest):
"""Integration tests for provider.GoogleOauth2."""
def setUp(self):
super(GoogleOauth2IntegrationTest, self).setUp()
self.provider = self... |
arnavd96/Cinemiezer | refs/heads/master | myvenv/lib/python3.4/site-packages/music21/ext/jsonpickle/compat.py | 24 | # -*- coding: utf-8 -*-
import sys
PY_MAJOR = sys.version_info[0]
PY_MINOR = sys.version_info[1]
PY2 = PY_MAJOR == 2
PY3 = PY_MAJOR == 3
PY32 = PY3 and PY_MINOR == 2
try:
bytes = bytes
except NameError:
bytes = str
try:
set = set
except NameError:
from sets import Set as set
set = set
try:
... |
torufuru/OFPatchPanel | refs/heads/hackathon | ryu/contrib/ovs/socket_util.py | 46 | # Copyright (c) 2010, 2012 Nicira, 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 ... |
MiLk/ansible | refs/heads/devel | lib/ansible/module_utils/redhat.py | 26 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
nicodjimenez/caffe | refs/heads/master | python/caffe/__init__.py | 39 | from .pycaffe import Net, SGDSolver
from .classifier import Classifier
from .detector import Detector
import io
|
lehinevych/cfme_tests | refs/heads/master | cfme/infrastructure/provider.py | 2 | """ A model of an Infrastructure Provider in CFME
:var page: A :py:class:`cfme.web_ui.Region` object describing common elements on the
Providers pages.
:var discover_form: A :py:class:`cfme.web_ui.Form` object describing the discover form.
:var properties_form: A :py:class:`cfme.web_ui.Form` object describ... |
PolicyStat/django | refs/heads/master | tests/model_options/test_default_related_name.py | 41 | from django.test import TestCase
from .models.default_related_name import Author, Editor, Book
class DefaultRelatedNameTests(TestCase):
def setUp(self):
self.author = Author.objects.create(first_name="Dave", last_name="Loper")
self.editor = Editor.objects.create(name="Test Editions",
... |
rven/odoo | refs/heads/14.0-fix-partner-merge-mail-activity | addons/mass_mailing_event_track_sms/__manifest__.py | 11 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Track Speakers SMS Marketing',
'category': 'Hidden',
'version': '1.0',
'description':
"""
SMS Marketing on event track speakers
=====================================
Bridge module addi... |
halfak/Python-Yaml-Configuration | refs/heads/master | yamlconf/import_path.py | 2 | import importlib
import sys
def import_path(path):
"""
Imports any valid python module or attribute path as though it were a
module
:Example:
>>> from yamlconf import import_path
>>> from my_package.my_module.my_submodule import attribute
>>> attribute.sub_attribute == \
... |
lenstr/rethinkdb | refs/heads/next | external/v8_3.30.33.16/testing/gmock/scripts/generator/cpp/gmock_class_test.py | 62 | #!/usr/bin/env python
#
# Copyright 2009 Neal Norwitz All Rights Reserved.
# Portions Copyright 2009 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
#
# ... |
dvliman/jaikuengine | refs/heads/master | .google_appengine/lib/django_1_2/tests/regressiontests/backends/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.