repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
rouge8/pip | refs/heads/develop | src/pip/_vendor/chardet/latin1prober.py | 290 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
jjmiranda/edx-platform | refs/heads/master | cms/djangoapps/contentstore/views/tests/test_course_updates.py | 16 | """
unit tests for course_info views and models.
"""
import json
from mock import patch
from django.test.utils import override_settings
from contentstore.models import PushNotificationConfig
from contentstore.tests.test_course_settings import CourseTestCase
from contentstore.utils import reverse_course_url, reverse_us... |
spulec/moto | refs/heads/master | tests/test_swf/utils.py | 1 | import boto
from moto.swf.models import ActivityType, Domain, WorkflowType, WorkflowExecution
# Some useful constants
# Here are some activity timeouts we use in moto/swf tests ; they're extracted
# from semi-real world example, the goal is mostly to have predictable and
# intuitive behaviour in moto/swf own tests..... |
timoschwarzer/blendworks | refs/heads/master | BlendWorks Server/python/Lib/encodings/cp850.py | 272 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP850.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_map)
def decode(self,input,errors='strict'):
... |
goodwinnk/intellij-community | refs/heads/master | python/testData/completion/percentStringWithModifiers.py | 31 | r"%(compl<caret>)s" % dict(completion="smth") |
acuestap/smarttools_test | refs/heads/master | web/admin.py | 1 | from django.contrib import admin
from .models import Competition, Video
@admin.register(Competition)
class CompetitionAdmin(admin.ModelAdmin):
list_display = ('name', 'url', 'image', 'startingDate', 'deadline', 'user', 'active')
@admin.register(Video)
class VideoAdmin(admin.ModelAdmin):
list_display = ('nam... |
fireball-dft/fireball-fireball | refs/heads/master | tests/06.methane/comp.py | 1 | import numpy as np
elements= ['etot.txt', 'uii-uee.txt', 'uxcdcc.txt', 'force1.txt', \
'force2.txt', 'force3.txt', 'forcek.txt', 'forcevna.txt', \
'forcevnl.txt', 'forceusr.txt', 'forcevxc.txt', 'ebs.txt', \
'ke.txt', 'vna.txt', 'vxc.txt', 'vnl.txt']
elemets_ref=['reference/etot_ref.tx... |
joebeard/sploshify | refs/heads/master | sploshify_auto_picker.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging, MySQLdb, time
media_directory = '/home/joeb/pyjuke/media/'
min_playlist_size = 10
mysql_username = 'sploshify'
mysql_password = 'sploshify1'
mysql_host = 'localhost'
mysql_db = 'sploshify'
def main():
mysql_connect_object = MySQLdb.connect(host=mysql_h... |
siosio/intellij-community | refs/heads/master | python/testData/resolve/QuotedTypeReferenceTopLevel.py | 34 | def f() -> 'MyClass':
<ref>
pass
class MyClass:
pass
|
rocknamx8/rocknamx8.github.io | refs/heads/master | node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py | 2618 | #!/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.
"""Pretty-prints the contents of a GYP file."""
import sys
import re
# Regex to remove comments when we're counting braces.
COMMENT_RE = ... |
google-research/google-research | refs/heads/master | stacked_capsule_autoencoders/capsules/data/tfrecords.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... |
gerald-yang/ubuntu-iotivity-demo | refs/heads/master | snappy/grovepi/python-env/local/lib/python2.7/encodings/big5hkscs.py | 816 | #
# big5hkscs.py: Python Unicode Codec for BIG5HKSCS
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_hk, codecs
import _multibytecodec as mbc
codec = _codecs_hk.getcodec('big5hkscs')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.Multib... |
RPI-OPENEDX/edx-platform | refs/heads/RPI-DEV | common/djangoapps/monkey_patch/__init__.py | 49 | """
Monkey-patch the edX platform
Here be dragons (and simians!)
* USE WITH CAUTION *
No, but seriously, you probably never really want to make changes here.
This module contains methods to monkey-patch [0] the edx-platform.
Patches are to be applied as early as possible in the callstack
(currently lms/startup.py and... |
fxmzb123/tank | refs/heads/master | src/system/utils.py | 1 | import uuid
import pygame
from operator import itemgetter
class Utils(object):
@classmethod
def get_uuid(cls):
return uuid.uuid4()
@classmethod
def get_collide_indexes(cls, rect, rects):
''' Return index of a collided rect in a list
'''
collision_rects_... |
PHOTOX/fuase | refs/heads/master | ase/doc/tutorials/manipulating_atoms.py | 8 | # creates: a1.png a2.png a3.png
import numpy as np
from ase import Atom,Atoms
from ase.io import write
atoms = Atoms('Ni4', positions= [(0, 0, 0),
(0.45, 0, 0),
(0, 0.5, 0),
(0.5, 0.5, 0),])
atoms[1].x = 0.5
a = 3.55
c... |
lymar/libqrencode-js | refs/heads/master | make.py | 1 | #!/usr/bin/python
import os
import sys
import subprocess
JS_VER = 5
exec(open(os.path.expanduser('~/.emscripten'), 'r').read())
toolPath = os.path.join(EMSCRIPTEN_ROOT, 'tools')
emmakenPath = os.path.join(toolPath, 'emmaken.py')
emscriptenPath = os.path.join(EMSCRIPTEN_ROOT, 'emscripten.py')
def loadVersion():
... |
mviitanen/marsmod | refs/heads/master | mcp/temp-python/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py | 304 | from base64 import b64encode
from ..packages import six
ACCEPT_ENCODING = 'gzip,deflate'
def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
basic_auth=None, proxy_basic_auth=None):
"""
Shortcuts for generating request headers.
:param keep_alive:
If ``True... |
c4puter/bridge-hdl | refs/heads/master | syn/c4-0_ise/Manifest.py | 1 | target = "xilinx"
action = "synthesis"
syn_device = "xc6slx45"
syn_grade = "-3"
syn_package = "fgg484"
syn_top = "bridge"
syn_project = "bridge.xise"
syn_tool = "ise"
modules = {
"local" : [ "../../top/c4-0" ],
}
|
Southpaw-TACTIC/Team | refs/heads/master | src/python/Lib/site-packages/pythonwin/pywin/idle/__init__.py | 46 | # This file denotes the directory as a Python package. |
asmodehn/flower | refs/heads/master | flower/api/workers.py | 3 | from __future__ import absolute_import
import logging
from tornado import web
from tornado import gen
from .control import ControlHandler
logger = logging.getLogger(__name__)
class ListWorkers(ControlHandler):
@web.authenticated
@gen.coroutine
def get(self):
"""
List workers
**Example reques... |
alvin319/CarnotKE | refs/heads/master | jyhton/lib-python/2.7/test/test_bisect.py | 92 | import sys
import unittest
from test import test_support
from UserList import UserList
# We do a bit of trickery here to be able to test both the C implementation
# and the Python implementation of the module.
# Make it impossible to import the C implementation anymore.
sys.modules['_bisect'] = 0
# We must also handl... |
marrow/script | refs/heads/develop | marrow/script/util.py | 1 | # encoding: utf-8
from __future__ import unicode_literals
import sys
import types
import inspect
from textwrap import wrap as wrap_
__all__ = ['wrap', 'InspectionComplete', 'InspectionFailed', 'getargspec', 'partitionhelp']
# Mac OS X terminal lies, so do others, probably.
# TODO: Needs testing; works on OS X.
e... |
chrsrds/scikit-learn | refs/heads/master | sklearn/preprocessing/tests/test_base.py | 2 | import numpy as np
import pytest
from scipy import sparse
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_raise_message
from sklearn.preprocessing.base import _transform_selected
from sklearn.preprocessing.data import Binarizer
def toarray(a):
if hasattr(a, "toarray"... |
bdh1011/wau | refs/heads/master | venv/lib/python2.7/site-packages/twisted/test/test_tcp.py | 8 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for implementations of L{IReactorTCP}.
"""
from __future__ import division, absolute_import
import socket, random, errno
from functools import wraps
from zope.interface import implementer
from twisted.trial import unittest
from twis... |
taogeT/flask_mega_python3 | refs/heads/master | db_migrate.py | 1 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from migrate.versioning import api
from config import SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO
from app import db
import imp
next_db_version = api.db_version(SQLALCHEMY_DATABASE_URI,
SQLALCHEMY_MIGRATE_REPO) + 1
migration = '{}/ver... |
2ndQuadrant/ansible | refs/heads/master | lib/ansible/modules/network/netscaler/netscaler_cs_policy.py | 124 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Citrix Systems
# 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 = {'metadata_version': '1.1',
... |
darktears/chromium-crosswalk | refs/heads/master | tools/grit/grit/gather/__init__.py | 63 | #!/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.
'''Module grit.gather
'''
pass
|
RealTimeWeb/wikisite | refs/heads/master | MoinMoin/support/pygments/styles/tango.py | 363 | # -*- coding: utf-8 -*-
"""
pygments.styles.tango
~~~~~~~~~~~~~~~~~~~~~
The Crunchy default Style inspired from the color palette from
the Tango Icon Theme Guidelines.
http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
Butter: #fce94f #edd400 #c4a000
Orange: #fcaf3e ... |
sparkslabs/kamaelia | refs/heads/master | Sketches/TG/gui/ExampleShards.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Vers... |
mtnbikenc/ansible-modules-extras | refs/heads/devel | cloud/google/gce_tag.py | 43 | #!/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... |
felipenaselva/felipe.repository | refs/heads/master | script.module.autoupdate/lib/autoupdate/autoupdates.py | 2 | #
# Copyright (C) 2014 Blazetamer
#
#
# 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, or (at your option)
# any later version.
#
# This Program is distributed i... |
sayanchowdhury/fedmsg_meta_fedora_infrastructure | refs/heads/develop | fedmsg_meta_fedora_infrastructure/tests/jenkins.py | 5 | # This file is part of fedmsg.
# Copyright (C) 2014 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... |
RPGOne/Skynet | refs/heads/Miho | imbalanced-learn-master/imblearn/under_sampling/tests/test_nearmiss_1.py | 1 | """Test the module nearmiss."""
from __future__ import print_function
import os
import numpy as np
from numpy.testing import assert_raises
from numpy.testing import assert_equal
from numpy.testing import assert_array_equal
from numpy.testing import assert_warns
from sklearn.datasets import make_classification
from s... |
erwindl0/python-rpc | refs/heads/master | org.eclipse.triquetrum.python.service/scripts/scisoftpy/io.py | 1 | ###
# Copyright 2011 Diamond Light Source Ltd.
#
# 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... |
shuggiefisher/crowdstock | refs/heads/master | django/contrib/localflavor/uk/forms.py | 313 | """
UK-specific Form helpers
"""
import re
from django.forms.fields import CharField, Select
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
class UKPostcodeField(CharField):
"""
A form field that validates its input is a UK postcode.
The regular expressi... |
SteveHNH/ansible | refs/heads/devel | test/runner/lib/git.py | 42 | """Wrapper around git command-line tools."""
from __future__ import absolute_import, print_function
from lib.util import (
CommonConfig,
SubprocessError,
run_command,
)
class Git(object):
"""Wrapper around git command-line tools."""
def __init__(self, args):
"""
:type args: Commo... |
guorendong/iridium-browser-ubuntu | refs/heads/ubuntu/precise | tools/gyp/test/make_global_settings/ld/gyptest-make_global_settings_ld.py | 88 | #!/usr/bin/env python
# Copyright (c) 2014 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.
"""
Verifies 'LD' in make_global_settings.
"""
import os
import sys
import TestGyp
def resolve_path(test, path):
if path is None:
re... |
ivandevp/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/models.py | 510 | """
The GeometryColumns and SpatialRefSys models for the SpatiaLite backend.
"""
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin
from django.contrib.gis.db.backends.spatialite.base import DatabaseWrapper
from django.db import connection, models
from django.db.backends.signals import connectio... |
shinate/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/QueueStatusServer/model/attachment.py | 119 | # Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... |
Medigate/cutiuta-server | refs/heads/master | cutiuta-server/env/lib/python3.4/site-packages/setuptools/__init__.py | 136 | """Extensions to the 'distutils' for large or complex distributions"""
import os
import distutils.core
import distutils.filelist
from distutils.core import Command as _Command
from distutils.util import convert_path
from fnmatch import fnmatchcase
import setuptools.version
from setuptools.extension import Extension
f... |
ging/keystone | refs/heads/master | keystone/common/extension.py | 31 | # Copyright 2013 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 in... |
DroneEmployee/drone-employee-connect | refs/heads/master | serve.py | 1 | from application import *
from resources import *
import os
port = 5000
if 'PORT' in os.environ:
port = int(os.environ['PORT'])
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=port)
|
jrha/aquilon | refs/heads/master | tests/scale/broker.py | 2 | #!/usr/bin/env python2.6
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... |
marmarek/pykickstart | refs/heads/master | tests/baseclass.py | 5 | import os
import sys
import unittest
import shlex
import glob
import warnings
import re
import six
try:
from imputil import imp
except ImportError: # Python 3
import imp
from pykickstart.errors import KickstartParseError
from pykickstart.parser import KickstartParser
from pykickstart.version import DEVEL, mak... |
mapr/sahara | refs/heads/juno-release | sahara/plugins/hdp/saharautils.py | 16 | # Copyright (c) 2013 Hortonworks, 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 ... |
numenta/nupic.cerebro2.server | refs/heads/master | py/cerebro2/__init__.py | 12133432 | |
EduPepperPDTesting/pepper2013-testing | refs/heads/www0 | lms/djangoapps/course_wiki/tests/__init__.py | 12133432 | |
endlessm/chromium-browser | refs/heads/master | third_party/catapult/third_party/gsutil/third_party/oauth2client/samples/django/django_user/polls/__init__.py | 12133432 | |
serglit/python_traning | refs/heads/master | test/test_add_contact.py | 1 | __author__ = 'Sergei'
from model.contact import Contact
def test_contact_new(app):
old_contact = app.contact.get_contact_list()
contacts = Contact(first_n="first", mid_n="middle",last_n="last",nick_n= "kuk",company= "adda",address= "575 oiweojdckjgsd,russia",home_ph= "12134519827",cell_ph= "120092340980",emai... |
CloudServer/nova | refs/heads/master | nova/tests/unit/virt/test_events.py | 113 | # 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 agreed to in writing, softw... |
nacl-webkit/chrome_deps | refs/heads/master | third_party/mesa/MesaLib/src/mapi/glapi/gen/extension_helper.py | 46 | #!/usr/bin/env python
# (C) Copyright IBM Corporation 2005
# 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
# on the... |
mnrozhkov/candybot | refs/heads/master | twitter_stream.py | 1 | #!/usr/bin/python
# Import the necessary package to process data in JSON format
try:
import json
except ImportError:
import simplejson as json
# Import the necessary methods from "twitter" library
from twitter import Twitter, OAuth, TwitterHTTPError, TwitterStream
# from twython import Twython
from secret import ... |
bretth/django-pavlova-project | refs/heads/master | djangoproject/djangoproject/settings/settings.py | 1 | from os.path import join, normpath
from configurations import Settings
from djset import config, secret
from .apps import Apps, AppsDebug
from .filepaths import SITE_ROOT
from .cache import LocalMemCache, DummyCache
from .db import PostgresDB, SqliteDB
from .email import EmailSMTP, EmailConsole, EmailInMemory
from .lo... |
ryanswanstrom/Sense.io-Projects | refs/heads/master | getting-started-with-toyplot-on-sense/toyplot-starter.py | 1 | # Upgrade pip and install toyplot
!pip install --upgrade pip
!pip install toyplot
# Setup
# -----
import sense
import numpy
import toyplot
import toyplot.browser
toyplot.browser.show(canvas)
x = numpy.linspace(0, 10)
y = x ** 2
canvas = toyplot.Canvas(width=300, height=300)
axes = canvas.axes()
mark = axes.plot(x, ... |
linked67/p2pool-lgc | refs/heads/master | nattraverso/portmapper.py | 288 | """
Generic NAT Port mapping interface.
TODO: Example
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
from twisted.internet.base import BasePort
# Public API
def get_port_mapper(proto="TCP"):
... |
mohitsethi/solum | refs/heads/master | solum/config.py | 3 | # 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... |
k-okada/naoqi_bridge | refs/heads/master | naoqi_driver/scripts/test_joint_angles.py | 4 | #!/usr/bin/env python
import roslib
#from rospy.exceptions import ROSException
roslib.load_manifest('nao_driver')
import rospy
from rospy import Duration
import actionlib
from actionlib_msgs.msg import GoalStatus
import nao_msgs.msg
import trajectory_msgs.msg
from trajectory_msgs.msg import JointTrajectoryPoint
impo... |
huchoi/edx-platform | refs/heads/master | common/djangoapps/track/utils.py | 230 | """Utility functions and classes for track backends"""
from datetime import datetime, date
import json
from pytz import UTC
class DateTimeJSONEncoder(json.JSONEncoder):
"""JSON encoder aware of datetime.datetime and datetime.date objects"""
def default(self, obj): # pylint: disable=method-hidden
"... |
MiltosD/CEFELRC | refs/heads/master | lib/python2.7/site-packages/django/core/management/commands/loaddata.py | 250 | import sys
import os
import gzip
import zipfile
from optparse import make_option
from django.conf import settings
from django.core import serializers
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.db import connections, router, transaction, DEFAULT_DB_... |
dcneeme/d4c | refs/heads/devel | monitor/iomain_monitor.py | 1 | APVER='monitor/iomain_monitor 21.10.2015'
''' highest script for an application '''
import os, sys, time, traceback
from droidcontroller.uniscada import * # UDPchannel, TCPchannel
from droidcontroller.controller_app import * # arranges modbus and server comms
#from droidcontroller.statekeeper import * # should you nee... |
rduivenvoorde/QGIS | refs/heads/master | tests/src/python/test_qgslocator.py | 9 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsLocator.
.. note:: 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.
"""
__auth... |
asampat3090/readthedocs.org | refs/heads/master | readthedocs/privacy/loader.py | 7 | from django.utils.module_loading import import_by_path
from django.conf import settings
# Managers
ProjectManager = import_by_path(
getattr(settings, 'PROJECT_MANAGER',
'readthedocs.privacy.backend.ProjectManager'))
VersionManager = import_by_path(
getattr(settings, 'VERSION_MANAGER',
'... |
tafia/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/html5lib/doc/conf.py | 436 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# html5lib documentation build configuration file, created by
# sphinx-quickstart on Wed May 8 00:04:49 2013.
#
# 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
# aut... |
bracket/ratchet | refs/heads/master | ratchet/runner/__init__.py | 1 | '''
Runners are clases which are responsible for consuming sample blocks from
sound generator (see the generator package) and directing them to output
for playback, file writing, etc. See documentation for the runner module
for further explanation.
'''
from .file_writer import FileWriter
from .pyaudio... |
Gussy/bigcouch | refs/heads/master | couchjs/scons/scons-local-2.0.1/SCons/Tool/f77.py | 61 | """engine.SCons.Tool.f77
Tool-specific initialization for the generic Posix f77 Fortran compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2... |
miketamis/CouchPotatoServer | refs/heads/master | libs/suds/bindings/rpc.py | 210 | # 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 ... |
SivilTaram/edx-platform | refs/heads/master | lms/djangoapps/course_structure_api/models.py | 170 | """ This file is intentionally empty. """
|
jjmleiro/hue | refs/heads/master | desktop/core/ext-py/cryptography-1.3.1/src/_cffi_src/commoncrypto/common_hmac.py | 10 | # 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
INCLUDES = """
#include <CommonCrypto/CommonHMAC.h>
"""
TYPES = """
type... |
thiagopnts/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/tests/state/is_element_selected.py | 11 | # META: timeout=long
from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
from tests.support.inline import inline
from tests.support.fixtures import create_dialog
alert_doc = inline("<script>window.alert()</script>")
check_doc = inline("<input id=checked type=checkbox checked/><input... |
aashish24/seaborn | refs/heads/master | seaborn/external/__init__.py | 12133432 | |
vFense/vFenseAgent-nix | refs/heads/development | agent/deps/rpm6-32/Python-2.7.5/lib/python2.7/test/sample_doctest_no_doctests.py | 236 | """This is a sample module used for testing doctest.
This module is for testing how doctest handles a module with docstrings
but no doctest examples.
"""
class Foo(object):
"""A docstring with no doctest examples.
"""
def __init__(self):
pass
|
Datera/cinder | refs/heads/datera_queens_backport | cinder/tests/unit/volume/test_image.py | 1 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... |
anentropic/django-oscar | refs/heads/master | src/oscar/apps/shipping/migrations/__init__.py | 12133432 | |
Voltir/django-guardian | refs/heads/master | example_project/posts/__init__.py | 12133432 | |
ubc/edx-platform | refs/heads/release | common/djangoapps/track/migrations/__init__.py | 12133432 | |
alexschiller/osf.io | refs/heads/develop | website/preprints/__init__.py | 12133432 | |
BMJHayward/django | refs/heads/master | tests/m2m_through_regress/models.py | 273 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
# Forward declared intermediate model
@python_2_unicode_compatible
class Membership(models.Model):
person = models.ForeignKey('Person', mo... |
mail-apps/pootle | refs/heads/master | pootle/apps/pootle_translationproject/models.py | 3 | #!/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.
import logging
import ... |
xificurk/pyggs | refs/heads/master | plugins/gccz.py | 1 | # -*- coding: utf-8 -*-
"""
plugins/gccz.py - This plugin just stores credentials for geocaching.cz.
Copyright (C) 2009 Petr Morávek
This file is part of Pyggs.
Pyggs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
th... |
yfried/ansible | refs/heads/devel | test/units/modules/network/onyx/test_onyx_protocols.py | 38 | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.onyx impor... |
jobscore/sync-engine | refs/heads/master | migrations/versions/097_secrets_endgame.py | 9 | """secrets_endgame
Revision ID: 248ec24a39f
Revises: 38c29430efeb
Create Date: 2014-09-18 03:03:52.580809
"""
# revision identifiers, used by Alembic.
revision = '248ec24a39f'
down_revision = '38c29430efeb'
from alembic import op
def upgrade():
from inbox.ignition import main_engine
engine = main_engine()... |
varunarya10/nova_test_latest | refs/heads/master | nova/virt/vmwareapi/images.py | 9 | # Copyright (c) 2012 VMware, Inc.
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 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://w... |
microcosm-cc/microweb | refs/heads/master | trending/tests.py | 6666 | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... |
pszemus/grpc | refs/heads/master | examples/python/compression/client.py | 3 | # Copyright 2019 the gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
EDUlib/edx-platform | refs/heads/master | common/lib/capa/capa/tests/test_util.py | 5 | # coding=utf-8
"""
Tests capa util
"""
import unittest
import ddt
from lxml import etree
from capa.tests.helpers import test_capa_system
from capa.util import (
compare_with_tolerance,
contextualize_text,
get_inner_html_from_xpath,
remove_markup,
sanitize_html
)
@ddt.ddt
class UtilTest(unittes... |
nagyistoce/netzob | refs/heads/master | src/netzob/Common/MMSTD/Dictionary/DataTypes/AbstractWordType.py | 1 | # -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocol... |
jorgebastida/gordon | refs/heads/master | gordon/contrib/s3/__init__.py | 12133432 | |
sungkim11/mhargadh | refs/heads/master | django/conf/locale/es_AR/__init__.py | 12133432 | |
kleinzh/PythonBlog | refs/heads/master | mysite/blog/__init__.py | 12133432 | |
jauler/VU_MIF_tasks | refs/heads/master | MagistroStudijos/KriptografijosMetodai/elgamaly.py | 1 | #!/usr/bin/python3.5
import fractions
[p, alpha, beta]=[12016012609141909200527091927191118250205120747, 14, 6444521820681528654586098011913973529018647549]
m1 = 14012110090514212714051801
[gama1, delta1] = [6710426405704652695147213140701144673475937627, 4707784649066417310752876690383264903804627484]
print("Is val... |
allotria/intellij-community | refs/heads/master | python/testData/regexp/braceCommaN.py | 83 | import re
re.compile(r'\d{,4}')
|
gurneyalex/odoo | refs/heads/13.0-improve_sale_coupon_perf | addons/base_sparse_field/tests/__init__.py | 45 | # -*- coding: utf-8 -*-
from . import test_sparse_fields
|
bbc/graphite-web | refs/heads/master | contrib/test_aggregator_rules.py | 65 | import sys
from os.path import dirname, join, abspath
# Figure out where we're installed
ROOT_DIR = dirname(dirname(abspath(__file__)))
# Make sure that carbon's 'lib' dir is in the $PYTHONPATH if we're running from source.
LIB_DIR = join(ROOT_DIR, 'graphite', 'lib')
sys.path.insert(0, LIB_DIR)
from carbon.aggregato... |
alrifqi/django | refs/heads/master | django/contrib/sessions/management/__init__.py | 12133432 | |
luxnovalabs/enjigo_door | refs/heads/master | web_interface/djangotoolbox/models.py | 12133432 | |
sorig/shogun | refs/heads/develop | applications/arts/__init__.py | 12133432 | |
waseem18/oh-mainline | refs/heads/master | vendor/packages/Django/django/contrib/markup/models.py | 12133432 | |
jrrembert/django | refs/heads/master | tests/postgres_tests/array_default_migrations/__init__.py | 12133432 | |
overtherain/scriptfile | refs/heads/master | software/googleAppEngine/lib/grizzled/grizzled/test/__init__.py | 12133432 | |
arnaudsj/pybrain | refs/heads/master | pybrain/tools/plotting/colormaps.py | 29 | __author__ = 'Tom Schaul, tom@idsia.ch'
from pylab import figure, savefig, imshow, axes, axis, cm, show
from scipy import array, amin, amax
class ColorMap:
def __init__(self, mat, cmap=None, pixelspervalue=20, minvalue=None, maxvalue=None):
""" Make a colormap image of a matrix
:key mat: the mat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.