repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
stevetjoa/musicsearch
refs/heads/master
MD_day_dict.py
1
d = { 'brahms_rhapsody_01.wav': ('Brahms Rhapsody Op.79, No.2', 'J. Brahms','G minor','Piano','Lili Kraus'), 'brahms_rhapsody_02.wav': ('Brahms Rhapsody Op.79, No.2', 'J. Brahms','G minor','Piano','Martha Argerich'), 'debussy_toccata.wav': ('Debussy Toccata from Pour le Piano', 'C. Debussy','N/A','Piano','Boris Feine...
leiferikb/bitpop
refs/heads/master
src/tools/telemetry/telemetry/core/timeline/model.py
3
# Copyright (c) 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. '''A container for timeline-based events and traces and can handle importing raw event data from different sources. This model closely resembles that in t...
valtandor/easybuild-framework
refs/heads/master
easybuild/tools/toolchain/toolchain.py
4
# # # Copyright 2012-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (ht...
minhtuancn/odoo
refs/heads/8.0
addons/hr_payroll/report/report_contribution_register.py
377
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
sergio-incaser/odoo
refs/heads/8.0
addons/payment/tests/__init__.py
459
# -*- coding: utf-8 -*- import common
mewtaylor/django
refs/heads/master
tests/model_options/test_tablespaces.py
337
from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.db import connection from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from .models.tablespaces import ( Article, ArticleRef, Authors, Reviewers, Scientist, ScientistRef, ) def ...
ahsquared/arc
refs/heads/master
arc-assets/themes/ut-thehill/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/msvs_test.py
2687
#!/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. """ Unit tests for the msvs.py file. """ import gyp.generator.msvs as msvs import unittest import StringIO class TestSequenceFunctions(uni...
p0cisk/Quantum-GIS
refs/heads/master
python/ext-libs/future/future/moves/collections.py
72
from __future__ import absolute_import import sys from future.utils import PY2, PY26 __future_module__ = True from collections import * if PY2: from UserDict import UserDict from UserList import UserList from UserString import UserString if PY26: from future.backports.misc import OrderedDict, Counte...
SamYaple/neutron
refs/heads/master
neutron/tests/unit/agent/l2/extensions/test_qos.py
7
# Copyright (c) 2015 Mellanox Technologies, Ltd # 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 # # U...
kidaa30/spacewalk
refs/heads/master
client/debian/packages-already-in-debian/rhnlib/test/__init__.py
30
import unittest import test_server def testSuite(): suite = unittest.TestSuite() loader = unittest.TestLoader() """ def testModule(module): import module suite.addTests(loader.loadTestsFromModule(module)) """ suite.addTest(loader.loadTes...
mayk93/DjangoUdemy
refs/heads/master
djangoudemy/polls/models.py
1
from django.db import models from django.utils import timezone import datetime # Create your models here. class Question(models.Model): questionText = models.CharField(max_length = 100) publishDate = models.DateTimeField('date published') def lastSevenDays(self): return (self.publishDate >= time...
sshnaidm/ru
refs/heads/master
plugin.video.serialu.net/resources/lib/HTMLTreeBuilder.py
12
# # ElementTree # $Id: HTMLTreeBuilder.py 3225 2007-08-27 21:32:08Z fredrik $ # # a simple tree builder, for HTML input # # history: # 2002-04-06 fl created # 2002-04-07 fl ignore IMG and HR end tags # 2002-04-07 fl added support for 1.5.2 and later # 2003-04-13 fl added HTMLTreeBuilder alias # 2004-...
Freso/picard
refs/heads/master
picard/ui/ui_options_cover.py
3
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py build_ui` to update it. from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _trans...
seanwestfall/django
refs/heads/master
django/contrib/humanize/__init__.py
808
default_app_config = 'django.contrib.humanize.apps.HumanizeConfig'
bertucho/epic-movie-quotes-quiz
refs/heads/master
dialogos/build/Twisted/twisted/words/test/test_irc.py
8
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.irc}. """ import errno import operator import time from twisted.trial import unittest from twisted.trial.unittest import TestCase from twisted.words.protocols import irc from twisted.words.protocols.irc im...
glennrub/micropython
refs/heads/master
tests/internal_bench/var-1-constant.py
15
import bench def test(num): i = 0 while i < 20000000: i += 1 bench.run(test)
whereismyjetpack/ansible
refs/heads/devel
lib/ansible/modules/inventory/add_host.py
50
# -*- mode: 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 distr...
matiaslindgren/not-enough-bogo
refs/heads/master
bogo/tests/test_bogo_manager.py
1
import ast import asyncio import unittest import hypothesis import uvloop from . import strategies from bogoapp.bogo import Bogo from bogoapp.bogo_manager import BogoManager, BogoError class TestBogoManager(unittest.TestCase): def setUp(self): self.loop = uvloop.new_event_loop() asyncio.set_ev...
JetBrains/intellij-community
refs/heads/master
python/testData/resolve/multiFile/implicitFromImport/pymongo/__init__.py
83
from pymongo.connection import Connection
usmschuck/canvas
refs/heads/custom
vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.5.2/lib/pygments/mentos.py
34
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, re, os, signal import traceback if 'PYGMENTS_PATH' in os.environ: sys.path.insert(0, os.environ['PYGMENTS_PATH']) dirname = os.path.dirname base_dir = dirname(dirname(dirname(os.path.abspath(__file__)))) sys.path.append(base_dir + "/vendor") sys.path.appe...
kastriothaliti/techstitution
refs/heads/master
venv/lib/python3.5/site-packages/wheel/test/headers.dist/setup.py
565
from setuptools import setup try: unicode def u8(s): return s.decode('unicode-escape').encode('utf-8') except NameError: def u8(s): return s.encode('utf-8') setup(name='headers.dist', version='0.1', description=u8('A distribution with headers'), headers=['header.h'] ...
OmeGak/indico
refs/heads/master
indico/modules/groups/legacy.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from indico.core.auth import multipass from indico.legacy.fossils...
darshanthaker/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/figure.py
69
""" The figure module provides the top-level :class:`~matplotlib.artist.Artist`, the :class:`Figure`, which contains all the plot elements. The following classes are defined :class:`SubplotParams` control the default spacing of the subplots :class:`Figure` top level container for all plot elements """ impo...
haeusser/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/matrix_inverse_op_test.py
46
# 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...
heiher/libreoffice-core
refs/heads/mips64-dev
wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
6
# # This file is part of the LibreOffice project. # # 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/. # # This file incorporates work covered by the following license noti...
jendap/tensorflow
refs/heads/master
tensorflow/compiler/xla/python_api/xla_shape.py
35
# Copyright 2018 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...
GbalsaC/bitnamiP
refs/heads/master
lms/djangoapps/django_comment_client/tests/mock_cs_server/test_mock_cs_server.py
163
import unittest import threading import json import urllib2 from django_comment_client.tests.mock_cs_server.mock_cs_server import MockCommentServiceServer from nose.plugins.skip import SkipTest class MockCommentServiceServerTest(unittest.TestCase): ''' A mock version of the Comment Service server that listens...
BackupGGCode/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/encodings/iso8859_3.py
272
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.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='...
iamGavinZhou/12306_captcha
refs/heads/master
util.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import pandas as pd import scipy.misc as misc def split(): """分割小图""" CPATCHA_DIR = 'data/captcha' SAVE_DIR = 'data/small' images = os.listdir(CPATCHA_DIR) all_images = len(images) for x in range(0, all_images): im_path = os.path.join(CPATCHA_DIR, str(x...
liguangbo/kubernetes
refs/heads/master
cluster/juju/charms/trusty/kubernetes-master/hooks/install.py
98
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
tysonclugg/django
refs/heads/master
django/contrib/auth/__init__.py
18
import inspect import re import warnings from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.middleware.csrf import rotate_token from django.utils.crypto import constant_time_compare from django.utils.depreca...
rmanoni/mi-instrument
refs/heads/master
mi/core/yaml_ordered_dict.py
2
#!/usr/bin/env python """ Force pyyaml to use OrderedDict by default. Recipe found at: http://pyyaml.org/attachment/ticket/161/use_ordered_dict.py """ import yaml import collections def construct_ordered_mapping(self, node, deep=False): if not isinstance(node, yaml.MappingNode): raise ConstructorError(N...
ActiveState/code
refs/heads/master
recipes/Python/66423_LazyDB/recipe-66423.py
1
"""The LazyDB module transparently wraps any DB API compliant interface (DCOracle, odbc, cx_oracle, etc.) and provides: 1. lazy evaluation and caching of database connections 2. one-step query facility with data access by column name Example: import LazyDB, cx_Oracle myDB = LazyDB.Connection(cx_Oracle.connect, 'user/...
rdezavalia/ansible
refs/heads/devel
test/units/plugins/action/test_synchronize.py
19
#!/usr/bin/env python ''' (Epdb) pprint(DeepDiff(self.final_task_vars, out_task_vars), indent=2) { 'dic_item_added': set([u"root['ansible_python_interpreter']"]), 'dic_item_removed': set([ u"root['hostvars']['127.0.0.1']", u"root['hostvars']['::1']", u"root['ho...
jupyter-widgets/ipywidgets
refs/heads/master
ipywidgets/widgets/widget_bool.py
2
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Bool class. Represents a boolean using a widget. """ from .widget_description import DescriptionWidget from .widget_core import CoreWidget from .valuewidget import ValueWidget from .widget import register from tra...
MinFu/youtube-dl
refs/heads/master
youtube_dl/extractor/iconosquare.py
85
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import int_or_none class IconosquareIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?:iconosquare\.com|statigr\.am)/p/(?P<id>[^/]+)' _TEST = { 'url': 'http://statigr.am/p/522207370455279102_24101272', ...
ssh0/growing-string
refs/heads/master
triangular_lattice/diecutting/result_n2.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- # # written by Shotaro Fujimoto # 2016-12-07 import matplotlib.pyplot as plt # from mpl_toolkits.mplot3d.axes3d import Axes3D import matplotlib.cm as cm import numpy as np from scipy.optimize import curve_fit from scipy.stats import gamma import set_data_path def load_dat...
Deepakkothandan/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcpubsub.py
26
#!/usr/bin/python # Copyright 2016 Google Inc. # 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', 'status': ['preview'], ...
crosswalk-project/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
tools/findit/run_all_tests.py
76
#!/usr/bin/env python # Copyright (c) 2014 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 sys import unittest from chromium_deps_unittest import ChromiumDEPSTest from common.http_client_local_unittest import HttpC...
IKholopov/HackUPC2017
refs/heads/master
hackupc/env/lib/python3.5/site-packages/social/backends/trello.py
4
from social_core.backends.trello import TrelloOAuth
Eziohao/DV-router
refs/heads/master
node_modules/bellman-ford/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
170
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
windinthew/audacity
refs/heads/master
lib-src/lv2/sord/waflib/Tools/msvc.py
196
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,re,tempfile from waflib import Utils,Task,Logs,Options,Errors from waflib.Logs import debug,warn from waflib.TaskGen import after_method,feature from waflib.Conf...
GunnerJnr/_CodeInstitute
refs/heads/master
Stream-3/Full-Stack-Development/14.Paypal-Basic-Payments/2.Setting-Up-To-Use-Django-Paypal/we_are_social/accounts/migrations/0002_user_stripe_id.py
12
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-23 10:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AddField( ...
lbc001/zhihu-oauth
refs/heads/master
zhihu_oauth/oauth/before_login_auth.py
2
# coding=utf-8 # from __future__ import unicode_literals from .im_android import ImZhihuAndroidClient __all__ = ['BeforeLoginAuth'] class BeforeLoginAuth(ImZhihuAndroidClient): def __init__(self, client_id, api_version=None, app_version=None, app_build=None, app_za=None, uuid=None, ua=None): ...
ParkJinSang/SIMONFramework
refs/heads/master
src/SIMON_Py/SIMON/agents/SIMONUtilitybaseAgent.py
1
__author__ = 'Park' from SIMON import SIMONFunction from SIMON.utils import SIMONObjectSerializer, SIMONFileStream from collections import OrderedDict class SIMONUtilitybaseAgent: def __init__(self): pass # # make decision by utility base # select the action which is evaluated the b...
JavML/django
refs/heads/master
django/conf/locale/he/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j בF Y' TIME_FORMAT = 'H:i' DATET...
verbalsaintmars/srmparserlite
refs/heads/master
srmparserlite/splConfig/fakeconfig.py
1
__package__ = "srmparserlite.splConfig" Time11 = { "start": "2013-07-23T20:30:09.780+02:00", "end": "2014-07-23T23:26:02.930+02:00", # not included [,) "flag": "milli"} # milli sec min hour day month year Time12 = { "start": "2013-07-23T20:30:09.780+02:00", "end": "2013-07-23T23:26:02.837+02:00", ...
newmediamedicine/indivo_server_1_0
refs/heads/master
indivo/views/reports/immunization.py
1
""" .. module:: views.reports.immunization :synopsis: Indivo view implementations for the immunization report. .. moduleauthor:: Daniel Haas <daniel.haas@post.harvard.edu> .. moduleauthor:: Ben Adida <ben@adida.net> """ from django.http import HttpResponseBadRequest, HttpResponse from indivo.lib.view_decorators i...
invisiblek/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/pydoc_mod.py
103
"""This is a test module for test_pydoc""" __author__ = "Benjamin Peterson" __credits__ = "Nobody" __version__ = "1.2.3.4" __xyz__ = "X, Y and Z" class A: """Hello and goodbye""" def __init__(): """Wow, I have no function!""" pass class B(object): NO_MEANING = "eggs" pass def doc_fun...
pjryan126/solid-start-careers
refs/heads/master
store/api/zillow/venv/lib/python2.7/site-packages/pytz/tzinfo.py
380
'''Base classes and helpers for building zone specific tzinfo classes''' from datetime import datetime, timedelta, tzinfo from bisect import bisect_right try: set except NameError: from sets import Set as set import pytz from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError __all__ = [] _time...
dparaujo/projeto
refs/heads/master
app_administrativo/colaborador/forms.py
1
# -*- coding: utf-8 -*- from django import forms from app_academico.curso.models import * from app_academico.turno.models import TblAcademicoTurno class ColaboradorModelForm(forms.ModelForm): # def __init__(self, *args, **kwargs): # super(CursoModelForm, self).__init__(*args, **kwargs) descricao = forms.CharFie...
tailhook/pyzza
refs/heads/master
backport/fix_joinbytes.py
1
from lib2to3 import fixer_base, pytree, patcomp from lib2to3.pgen2 import token from lib2to3.fixer_util import Call, Name, Comma """ Fixes: b''.join(...) into: b''.join(map(bytes, ...)) """ class FixJoinbytes(fixer_base.BaseFix): PATTERN = """ power< bytes=STRING trailer< '.' 'join' > trailer< '('...
nicko96/Chrome-Infra
refs/heads/master
appengine/chromium_rietveld/settings.py
1
# Copyright 2008 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, ...
espdev/readthedocs.org
refs/heads/master
readthedocs/redirects/utils.py
1
from django.http import HttpResponseRedirect import logging import re from readthedocs.constants import LANGUAGES_REGEX from readthedocs.projects.models import Project log = logging.getLogger(__name__) def project_and_path_from_request(request, path): if hasattr(request, 'slug'): project_slug = request...
vmihailenco/fabdeploy
refs/heads/master
fabdeploy/pip.py
1
from fabric.api import sudo, run from .containers import conf from .task import Task from .utils import home_path, upload_config_template from . import system __all__ = ['install_pip', 'install', 'push_config'] class InstallPip(Task): def do(self): system.package_install.run(packages='python-pip') ...
laysakura/chainer
refs/heads/master
tests/cupy_tests/manipulation_tests/test_rearrange.py
16
import unittest from cupy import testing @testing.gpu class TestRearrange(unittest.TestCase): _multiprocess_can_split_ = True
drpeteb/scipy
refs/heads/master
scipy/weave/examples/swig2_example.py
100
"""Simple example to show how to use weave.inline on SWIG2 wrapped objects. SWIG2 refers to SWIG versions >= 1.3. To run this example you must build the trivial SWIG2 extension called swig2_ext. To do this you need to do something like this:: $ swig -c++ -python -I. -o swig2_ext_wrap.cxx swig2_ext.i $ g++ -Wall ...
p0psicles/SickGear
refs/heads/master
lib/certifi/core.py
139
#!/usr/bin/env python # -*- coding: utf-8 -*- """ certifi.py ~~~~~~~~~~ This module returns the installation location of cacert.pem. """ import os def where(): f = os.path.split(__file__)[0] return os.path.join(f, 'cacert.pem') if __name__ == '__main__': print(where())
ptchankue/youtube-dl
refs/heads/master
youtube_dl/extractor/myspace.py
147
# encoding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_str, ) from ..utils import ExtractorError class MySpaceIE(InfoExtractor): _VALID_URL = r'https?://myspace\.com/([^/]+)/(?P<mediatype>video/[^/]+/|music/song/.*?)(?P...
spektom/incubator-airflow
refs/heads/master
airflow/providers/apache/pig/__init__.py
5130
# # 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...
mahithmukundan/Granted
refs/heads/master
granted/managers/resource_manager.py
1
"""Manager for all resource related operation.""" from granted.models.resource import Resource class ResourceManager(object): """Resource Manager Definition.""" def __init__(self): """Init method.""" super(ResourceManager, self).__init__() def load_chunk(self, offset=0, limit=50): ...
EnviroCentre/jython-upgrade
refs/heads/develop
jython/lib/test/test_dl.py
93
#! /usr/bin/env python """Test dlmodule.c Roger E. Masse revised strategy by Barry Warsaw """ import unittest from test.test_support import verbose, import_module dl = import_module('dl', deprecated=True) sharedlibs = [ ('/usr/lib/libc.so', 'getpid'), ('/lib/libc.so.6', 'getpid'), ('/usr/bin/cygwin1.dl...
andresgz/django
refs/heads/master
tests/gis_tests/gdal_tests/test_ds.py
273
import os import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from ..test_data import TEST_DATA, TestDS, get_ds_file if HAS_GDAL: from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, GDALException, OGRIndexError, GDAL_VERSION from django.contrib.gis....
AkA84/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/social_facebook/groups/models.py
1644
""" A models.py is required to make this an app (until we move to Django 1.7) """
sammerry/ansible
refs/heads/devel
contrib/inventory/ovirt.py
65
#!/usr/bin/env python # Copyright 2015 IIX Inc. # # 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 ver...
tkem/mopidy
refs/heads/develop
tests/core/test_events.py
14
from __future__ import absolute_import, unicode_literals import unittest import mock import pykka from mopidy import core from mopidy.internal import deprecation from mopidy.models import Track from tests import dummy_backend @mock.patch.object(core.CoreListener, 'send') class BackendEventsTest(unittest.TestCase...
p3trus/slave
refs/heads/develop
slave/srs/sr850.py
2
# -*- coding: utf-8 -*- # # Slave, (c) 2012-2014, see AUTHORS. Licensed under the GNU GPL. from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * from slave.driver import Command, Driver, CommandSequence from slave.types import Boole...
Changaco/oh-mainline
refs/heads/master
vendor/packages/ghettoq/ghettoq/__init__.py
17
"""Ghetto Queue using Redis or Django Models.""" VERSION = (0, 4, 5) __version__ = ".".join(map(str, VERSION)) __author__ = "Ask Solem" __contact__ = "askh@opera.com" __homepage__ = "http://github.com/ask/ghettoq/" __docformat__ = "restructuredtext" __license__ = "BSD"
rismalrv/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_import_static.py
208
""" Tests that check that we ignore the appropriate files when importing courses. """ import unittest from mock import Mock from xmodule.modulestore.xml_importer import import_static_content from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.tests import DATA_DIR class IgnoredFilesTestCase(uni...
tdyas/pants
refs/heads/master
src/python/pants/build_graph/import_remote_sources_mixin.py
2
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from abc import ABCMeta, abstractmethod from pants.build_graph.address_lookup_error import AddressLookupError from pants.build_graph.target import Target from pants.util.memo import memoi...
philanthropy-u/edx-platform
refs/heads/master
openedx/core/djangoapps/user_authn/views/tests/test_login.py
1
# coding:utf-8 """ Tests for student activation and login """ import json import unicodedata import unittest import ddt import six from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.cache import cache from django.http import HttpResponse, HttpResp...
whitepyro/debian_server_setup
refs/heads/master
lib/unidecode/x0c4.py
253
data = ( 'sswals', # 0x00 'sswalt', # 0x01 'sswalp', # 0x02 'sswalh', # 0x03 'sswam', # 0x04 'sswab', # 0x05 'sswabs', # 0x06 'sswas', # 0x07 'sswass', # 0x08 'sswang', # 0x09 'sswaj', # 0x0a 'sswac', # 0x0b 'sswak', # 0x0c 'sswat', # 0x0d 'sswap', # 0x0e 'sswah', # 0x0f ...
2ndy/RaspIM
refs/heads/master
usr/lib/python2.6/mimetypes.py
4
"""Guess the MIME type of a file. This module defines two useful functions: guess_type(url, strict=1) -- guess the MIME type and encoding of a URL. guess_extension(type, strict=1) -- guess the extension for a given MIME type. It also contains the following, for tuning the behavior: Data: knownfiles -- list of fil...
auferack08/edx-platform
refs/heads/master
lms/djangoapps/instructor_task/models.py
24
""" WE'RE USING MIGRATIONS! If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py schemamigration instructor_task --auto description_of_your_change 3. Add the migration file cr...
pmacosta/putil
refs/heads/master
docs/support/trace_ex_tree.py
1
# trace_ex_tree.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,W0212 import docs.support.trace_support def trace_module(no_print=True): """ Trace tree module exceptions """ mname = 'tree' fname = 'tree' module_prefix = 'putil.{0}.Tree.'.format(mna...
proyectos-analizo-info/pybossa-analizo-info
refs/heads/master
test/test_uploader/__init__.py
2
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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...
vegetableman/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
118
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
ooici/ooi-extern
refs/heads/master
geonetwork/init_sos_handler.py
1
#!/usr/bin/env python import sos_neptune_handler if __name__ == "__main__": sos_neptune_handler.Handler()
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/Django-1.6.10/tests/template_tests/test_smartif.py
150
from django.template.smartif import IfParser from django.utils import unittest class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many o...
nopjmp/SickRage
refs/heads/master
lib/requests/packages/urllib3/util/timeout.py
292
from __future__ import absolute_import # The default socket timeout, used by httplib to indicate that no timeout was # specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT import time from ..exceptions import TimeoutStateError # A sentinel value to indicate that no timeout was specified by the user in # u...
adebar/PyOE1
refs/heads/master
oe1.py
1
import argparse import datetime import sys import pandas as pd import requests BASE_URL = 'http://oe1.orf.at/programm/konsole/tag/' DEFAULT_COLUMNS = ['time', 'title', 'info'] def get_oe1_program(date='20160423', offline=False): if offline: return _get_oe1_program_offline() try: url = BASE_U...
django-debug-toolbar/django-debug-toolbar
refs/heads/master
tests/panels/test_profiling.py
1
from django.contrib.auth.models import User from django.db import IntegrityError, transaction from django.http import HttpResponse from django.test import TestCase from django.test.utils import override_settings from ..base import BaseTestCase from ..views import listcomp_view, regular_view @override_settings( D...
OSSOS/MOP
refs/heads/master
src/ossos/core/tests/test_ossos/__init__.py
27
__author__ = "David Rusk <drusk@uvic.ca>"
gregerrag/selenium
refs/heads/master
py/selenium/webdriver/support/wait.py
35
# 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...
Adel-Magebinary/odoo
refs/heads/8.0
openerp/osv/query.py
380
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP S.A. http://www.openerp.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
barma1309/Kalista
refs/heads/master
.virtualenvs/Kalista/lib/python3.4/site-packages/django/contrib/flatpages/middleware.py
478
from django.conf import settings from django.contrib.flatpages.views import flatpage from django.http import Http404 class FlatpageFallbackMiddleware(object): def process_response(self, request, response): if response.status_code != 404: return response # No need to check for a flatpage for n...
peiyuwang/pants
refs/heads/master
tests/python/pants_test/backend/jvm/tasks/test_unpack_jars.py
6
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import functools imp...
vadmium/pacman-arch
refs/heads/master
test/pacman/tests/sync041.py
13
self.description = "Install two conflicting targets" sp1 = pmpkg("pkg1") sp1.conflicts = ["pkg2"] sp2 = pmpkg("pkg2") sp2.conflicts = ["pkg1"] for p in sp1, sp2: self.addpkg2db("sync", p); self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) self.addrule("PACMAN_RETCODE=1") self.addrule("!PKG_EXIST=pkg1") s...
glenngillen/dotfiles
refs/heads/master
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/isort/pylama_isort.py
1
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from isort.exceptions import FileSkipped from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys....
sheagcraig/sal
refs/heads/master
inventory/migrations/0009_inventory_inventory_str.py
2
# Generated by Django 1.10 on 2018-09-11 04:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inventory', '0008_auto_20161012_2329'), ] operations = [ migrations.AddField( model_name='inventory', name='inventor...
koobonil/Boss2D
refs/heads/master
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/factorization/python/ops/clustering_ops.py
22
# Copyright 2016 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...
akurtakov/Pydev
refs/heads/master
plugins/org.python.pydev/tests/pysrc/extendable/parameters.py
11
class Param(object): def hasParams(self, aa, bb): #TestStatic has static1 and static2 print aa.static1() print aa.static2()
django-nonrel/django
refs/heads/nonrel-1.6
django/contrib/comments/urls.py
382
from django.conf.urls import patterns, url urlpatterns = patterns('django.contrib.comments.views', url(r'^post/$', 'comments.post_comment', name='comments-post-comment'), url(r'^posted/$', 'comments.comment_done', name='comments-comment-done'), url(r'^flag/(\d+)/$', 'moderati...
AOSP-S4-KK/platform_external_chromium_org
refs/heads/kk-4.4
tools/telemetry/telemetry/core/platform/profiler/tcpdump_profiler.py
23
# 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 os import signal import subprocess import sys import tempfile from telemetry.core.platform import profiler from telemetry.core.platform.profiler impo...
Bashar/django
refs/heads/master
tests/urlpatterns_reverse/extra_urls.py
46
""" Some extra URL patterns that are included at the top level. """ from django.conf.urls import url, include from .views import empty_view urlpatterns = [ url(r'^e-places/([0-9]+)/$', empty_view, name='extra-places'), url(r'^e-people/(?P<name>\w+)/$', empty_view, name="extra-people"), url('', include('...
shiblon/pytour
refs/heads/master
static/js/pypyjs/pypy-nojit.js-0.3.1/lib/modules/distutils/filelist.py
175
"""distutils.filelist Provides the FileList class, used for poking about the filesystem and building lists of files. """ __revision__ = "$Id$" import os, re import fnmatch from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log cl...
olivierdalang/QGIS
refs/heads/master
python/core/additions/qgstaskwrapper.py
57
# -*- coding: utf-8 -*- """ *************************************************************************** qgstaskwrapper.py --------------------- Date : May 2018 Copyright : (C) 2018 by Denis Rouzaud Email : denis@opengis.ch **********************************...
nikhilprathapani/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/unittest/test/test_assertions.py
51
import datetime import warnings import unittest class Test_Assertions(unittest.TestCase): def test_AlmostEqual(self): self.assertAlmostEqual(1.00000001, 1.0) self.assertNotAlmostEqual(1.0000001, 1.0) self.assertRaises(self.failureException, self.assertAlmostEqual,...
rapilabs/django
refs/heads/master
tests/gis_tests/distapp/models.py
259
from django.utils.encoding import python_2_unicode_compatible from ..models import models from ..utils import gisfield_may_be_null @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True ...
eventials/django-haystack
refs/heads/master
haystack/backends/__init__.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy from copy import deepcopy from time import time from django.conf import settings from django.db.models import Q from django.db.models.base import ModelBase from django.utils import six from django.utils import tree from haystack.constants impor...