repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
jstacoder/Flask-Velox
refs/heads/master
flask_velox/mixins/sqla/__init__.py
12133432
sarvex/django
refs/heads/master
django/db/backends/postgresql_psycopg2/__init__.py
12133432
edilio/citiesprj
refs/heads/master
citiesprj/apps/cities/migrations/__init__.py
12133432
sublime1809/django
refs/heads/master
tests/null_fk/__init__.py
12133432
DONIKAN/django
refs/heads/master
tests/introspection/__init__.py
12133432
tejesh95/Zubio.in
refs/heads/master
zubio/allauth/socialaccount/providers/windowslive/provider.py
10
from __future__ import unicode_literals from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class WindowsLiveAccount(ProviderAccount): # def get_avatar_url(self): # return sel...
rebost/django
refs/heads/master
tests/regressiontests/backends/tests.py
4
# -*- coding: utf-8 -*- # Unit and doctests for specific database backends. from __future__ import absolute_import, unicode_literals import datetime import threading from django.conf import settings from django.core.management.color import no_style from django.core.exceptions import ImproperlyConfigured from django.d...
jeffrey4l/nova
refs/heads/master
nova/tests/functional/v3/test_server_metadata.py
27
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
jkshaver/virtualenv-1.8.2
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/localflavor/it/it_province.py
406
# -*- coding: utf-8 -* PROVINCE_CHOICES = ( ('AG', 'Agrigento'), ('AL', 'Alessandria'), ('AN', 'Ancona'), ('AO', 'Aosta'), ('AR', 'Arezzo'), ('AP', 'Ascoli Piceno'), ('AT', 'Asti'), ('AV', 'Avellino'), ('BA', 'Bari'), ('BT', 'Barletta-Andria-Trani'), # active starting from 2009 ...
Thraxis/pymedusa
refs/heads/master
lib/feedparser/urls.py
43
from __future__ import absolute_import, unicode_literals import re try: import urllib.parse as urlparse except ImportError: import urlparse as urlparse from .html import _BaseHTMLProcessor # If you want feedparser to allow all URL schemes, set this to () # List culled from Python's urlparse documentation at...
MotherNature/IndeedScraper
refs/heads/master
indeed/settings.py
2
# Scrapy settings for indeed project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/topics/settings.html # from numpy.random import randint BOT_NAME = 'indeed' #BOT_VERSION = '1.0' SPIDER_MODULES = ['inde...
nurmd2/nurmd
refs/heads/master
addons/website_slides/models/__init__.py
77
# -*- coding: utf-8 -*- import res_config import slides
SerCeMan/intellij-community
refs/heads/master
python/testData/joinLines/StatementColon.py
87
if True: return "No special handling"
octopus-platform/joern
refs/heads/dev
projects/octopus/python/octopus-mlutils/tests/orientdb_server_command.py
5
import unittest from octopus.server.server_command import ServerCommand class TestServerCommand(unittest.TestCase): def testUnreachableServer(self): self.hostname = 'localhost' self.port = '1337' cmd = ServerCommand(self.hostname, self.port) self.assertRaises(ConnectionRefusedEr...
qedi-r/home-assistant
refs/heads/dev
homeassistant/components/crimereports/__init__.py
29
"""The crimereports component."""
siosio/intellij-community
refs/heads/master
python/testData/inspections/PyUnboundLocalVariableInspection/UnboundUnreachable.py
83
def test1(c, xs): if c: y = 1 print(<warning descr="Local variable 'y' might be referenced before assignment">y</warning>) for x in xs: continue z = 1
m8ttyB/oneanddone
refs/heads/master
oneanddone/users/forms.py
4
# 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/. from django import forms from django.utils.translation import ugettext as _ from oneanddone.base.widgets import MyURLFi...
omazapa/root-old
refs/heads/master
interpreter/llvm/src/tools/clang/utils/analyzer/SATestAdd.py
48
#!/usr/bin/env python """ Static Analyzer qualification infrastructure: adding a new project to the Repository Directory. Add a new project for testing: build it and add to the Project Map file. Assumes it's being run from the Repository Directory. The project directory should be added inside the Repository D...
appliedx/edx-platform
refs/heads/master
common/test/acceptance/tests/studio/test_studio_outline.py
45
""" Acceptance tests for studio related to the outline page. """ import json from datetime import datetime, timedelta import itertools from pytz import UTC from bok_choy.promise import EmptyPromise from nose.plugins.attrib import attr from ...pages.studio.settings_advanced import AdvancedSettingsPage from ...pages.stu...
ajbrock/Neural-Photo-Editor
refs/heads/master
NPE.py
1
### Neural Photo Editor # A Brock, 2016 ### Imports from Tkinter import * # Note that I dislike the * on the Tkinter import, but all the tutorials seem to do that so I stuck with it. from tkColorChooser import askcolor # This produces an OS-dependent color selector. I like the windows one best, and can't stand the li...
Sphere2013/GlobeCrypto
refs/heads/master
contrib/pyminer/pyminer.py
8
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
kawasaki2013/getting-started-python
refs/heads/master
optional-container-engine/bookshelf/__init__.py
2
# Copyright 2015 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, ...
Pirata-Repository/Pirata
refs/heads/master
plugin.video.1channel/default.py
1
""" 1Channel XBMC Addon Copyright (C) 2012 Bstrdsmkr This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
smalls257/VRvisu
refs/heads/master
Library/External.LCA_RESTRICTED/Languages/CPython/27/Lib/test/test_types.py
113
# Python test set -- part 6, built-in types from test.test_support import run_unittest, have_unicode, run_with_locale, \ check_py3k_warnings import unittest import sys import locale class TypesTests(unittest.TestCase): def test_truth_values(self): if None: self.fail('None is...
marctc/django
refs/heads/master
django/views/decorators/gzip.py
720
from django.middleware.gzip import GZipMiddleware from django.utils.decorators import decorator_from_middleware gzip_page = decorator_from_middleware(GZipMiddleware) gzip_page.__doc__ = "Decorator for views that gzips pages if the client supports it."
jtsymon/livestreamer
refs/heads/develop
src/livestreamer/plugins/stream.py
37
from livestreamer.compat import urlparse from livestreamer.exceptions import PluginError from livestreamer.plugin import Plugin from livestreamer.stream import (AkamaiHDStream, HDSStream, HLSStream, HTTPStream, RTMPStream) import ast import re PROTOCOL_MAP = { "akamaihd": AkamaiHD...
agusc/scrapy
refs/heads/master
scrapy/commands/__init__.py
129
""" Base class for Scrapy commands """ import os from optparse import OptionGroup from twisted.python import failure from scrapy.utils.conf import arglist_to_dict from scrapy.exceptions import UsageError class ScrapyCommand(object): requires_project = False crawler_process = None # default settings to ...
xyzz/vcmi-build
refs/heads/master
project/jni/python/src/Lib/plat-mac/Carbon/Scrap.py
82
from _Scrap import *
bsipocz/scikit-image
refs/heads/master
skimage/_shared/_tempfile.py
41
from tempfile import NamedTemporaryFile from contextlib import contextmanager import os @contextmanager def temporary_file(suffix=''): """Yield a writeable temporary filename that is deleted on context exit. Parameters ---------- suffix : string, optional The suffix for the file. Examples...
veridiam/Madcow-Waaltz
refs/heads/master
madcow/include/twisted/_version.py
10
# This is an auto-generated file. Do not edit it. from twisted.python import versions version = versions.Version('twisted', 8, 2, 0)
fretsonfire/fof-python
refs/heads/master
src/TestAll.py
1
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # ##################################################################### # # # Frets on Fire # # Copyright (C) 2006 S...
eliasdorneles/scrapy
refs/heads/master
scrapy/spiders/__init__.py
134
""" Base class for Scrapy spiders See documentation in docs/topics/spiders.rst """ import logging import warnings from scrapy import signals from scrapy.http import Request from scrapy.utils.trackref import object_ref from scrapy.utils.url import url_is_from_spider from scrapy.utils.deprecate import create_deprecated...
carlomt/dicom_tools
refs/heads/master
dicom_tools/pyqtgraph/graphicsItems/ErrorBarItem.py
45
from ..Qt import QtGui, QtCore from .GraphicsObject import GraphicsObject from .. import getConfigOption from .. import functions as fn __all__ = ['ErrorBarItem'] class ErrorBarItem(GraphicsObject): def __init__(self, **opts): """ All keyword arguments are passed to setData(). """ ...
iamkingmaker/zipline
refs/heads/master
tests/test_algorithm_gen.py
18
# # Copyright 2014 Quantopian, 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 wr...
luzhijun/Optimization
refs/heads/gh-pages
cma-es/test_ud/worker_package/config.py
2
# Your access_id and secret_key pair ID = 'P4c9wtscfsH4rxeT' KEY = 'i1D0CKk4kVXS0xI1YfN2fJzFVHdW8Y' assert ID and KEY, 'You must supply your accsess_id and secret key.' REGION = 'batchcompute.cn-shenzhen.aliyuncs.com' OSS_HOST = 'oss-cn-shenzhen.aliyuncs.com' #OSS_HOST='oss-cn-shenzhen-internal.aliyuncs.com' OSS_BUC...
Cuuuurzel/KiPyCalc
refs/heads/master
sympy/functions/special/tests/test_bsplines.py
27
from sympy.functions import bspline_basis, bspline_basis_set from sympy import Piecewise, Interval from sympy import symbols, Rational x, y = symbols('x,y') def test_basic_degree_0(): d = 0 knots = range(5) splines = bspline_basis_set(d, knots, x) for i in range(len(splines)): assert splines[...
brchiu/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/in_topk_op_test.py
13
# 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...
langpavel/skolajs.cz
refs/heads/master
tools/closure_linter/closure_linter/tokenutil.py
13
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
UCRoboticsLab/BaxterTictactoe
refs/heads/master
src/baxter_interface/src/baxter_interface/digital_io.py
3
# Copyright (c) 2013-2015, Rethink Robotics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditio...
florentx/OpenUpgrade
refs/heads/8.0
addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
381
# -*- 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...
darkfeline/sphinxcontrib-napoleon
refs/heads/master
build/lib/sphinxcontrib/napoleon/pavertasks.py
2
# -*- coding: utf-8 -*- # Copyright 2013 Rob Ruana # Licensed under the BSD License, see LICENSE file for details. """Sphinx related paver tasks. Methods ------- apidoc Derive reStructuredText API doc files from python source code. This task is essentially a wrapper around the `sphinx-apidoc`_ script. Th...
googleapis/googleapis-gen
refs/heads/master
google/ads/googleads/v8/googleads-py/tests/unit/gapic/googleads.v8/services/test_campaign_service.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
zeekay/decorum
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python packaging.""" import os import sys from setuptools import setup #: Absolute path to directory containing setup.py file. here = os.path.abspath(os.path.dirname(__file__)) #: Boolean, ``True`` if environment is running Python version 2. IS_PYTHON2 = sys.version_i...
casacore/python-casacore
refs/heads/master
casacore/images/__init__.py
1
# __init__.py: Python image functions # Copyright (C) 2008 # Associated Universities, Inc. Washington DC, USA. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the L...
KAMI911/loec
refs/heads/master
examples/Sharpen/binaries-windows-python26/ArgImagePlugin.py
3
# # THIS IS WORK IN PROGRESS # # The Python Imaging Library. # $Id: ArgImagePlugin.py 2309 2005-03-02 15:06:34Z fredrik $ # # ARG animation support code # # history: # 1996-12-30 fl Created # 1996-01-06 fl Added safe scripting environment # 1996-01-10 fl Added JHDR, UHDR and sYNC support # 2005-03-02 ...
MOA-2011/enigma2
refs/heads/master
lib/python/Tools/FuzzyDate.py
17
from time import localtime, time def FuzzyTime(t, inPast = False): d = localtime(t) nt = time() n = localtime() dayOfWeek = (_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun")) if d[:3] == n[:3]: # same day date = _("Today") elif d[0] == n[0] and d[7] == n[7] - 1 and inPast: # w...
unseenlaser/python-for-android
refs/heads/master
python-modules/twisted/twisted/internet/test/inlinecb_tests.py
59
# -*- test-case-name: twisted.internet.test.test_inlinecb -*- # Copyright (c) 2009-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.defer.inlineCallbacks}. These tests are defined in a non-C{test_*} module because they are syntactically invalid on python < 2.5. test_inlin...
miipl-naveen/optibizz
refs/heads/master
addons/hr_contract/__init__.py
381
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com) # # This program is free software: you can redistribute it and/or modify # it under the term...
deadRaccoons/MameAirlines
refs/heads/master
tabo/cherrypy/cherrypy/process/win32.py
68
"""Windows service. Requires pywin32.""" import os import win32api import win32con import win32event import win32service import win32serviceutil from cherrypy.process import wspbus, plugins class ConsoleCtrlHandler(plugins.SimplePlugin): """A WSPBus plugin for handling Win32 console events (like Ctrl-C).""" ...
CloudServer/cinder
refs/heads/master
cinder/volume/drivers/hitachi/hbsd_iscsi.py
16
# Copyright (C) 2014, Hitachi, 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...
emanuelcovaci/TLT
refs/heads/master
blog/utility/tests.py
24123
from django.test import TestCase # Create your tests here.
ofir123/CouchPotatoServer
refs/heads/master
libs/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 ...
henryiii/rootpy
refs/heads/master
rootpy/root2hdf5.py
1
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License """ This module handles conversion of ROOT's TFile and contained TTrees into HDF5 format with PyTables """ from __future__ import absolute_import import os import sys import warnings from pkg_resources import parse_v...
MarcosCommunity/odoo
refs/heads/marcos-8.0
addons/product/pricelist.py
18
# -*- 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...
anryko/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
13
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
BobBowles/django-diary
refs/heads/master
manage.py
198
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
tboyce021/home-assistant
refs/heads/dev
tests/components/apple_tv/__init__.py
9
"""Tests for Apple TV.""" import pytest # Make asserts in the common module display differences pytest.register_assert_rewrite("tests.components.apple_tv.common")
resmo/ansible
refs/heads/devel
lib/ansible/modules/windows/win_eventlog_entry.py
38
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'suppo...
samuell/luigi
refs/heads/master
luigi/target.py
11
# -*- 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 required by applicable law...
AkademieOlympia/sympy
refs/heads/master
sympy/tensor/indexed.py
29
"""Module that defines indexed objects The classes IndexedBase, Indexed and Idx would represent a matrix element M[i, j] as in the following graph:: 1) The Indexed class represents the entire indexed object. | ___|___ ' ' M[i, j] ...
rgommers/pywt
refs/heads/master
pywt/tests/test_deprecations.py
3
import warnings import numpy as np from numpy.testing import assert_warns, assert_array_equal import pywt def test_intwave_deprecation(): wavelet = pywt.Wavelet('db3') assert_warns(DeprecationWarning, pywt.intwave, wavelet) def test_centrfrq_deprecation(): wavelet = pywt.Wavelet('db3') assert_warn...
surligas/gnuradio
refs/heads/master
gr-qtgui/examples/pyqt_freq_c.py
38
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
bbozhev/flask-test
refs/heads/master
flask/lib/python2.7/site-packages/decorator.py
112
########################## LICENCE ############################### # Copyright (c) 2005-2012, Michele Simionato # 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 so...
mtorromeo/mattersend
refs/heads/master
mattersend.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- import sys import os import argparse import json import csv import mimetypes from io import StringIO try: import configparser except ImportError: import ConfigParser as configparser name = 'mattersend' version = '2.0' url = 'https://github.com/mtorromeo/mattersen...
Yarrick13/hwasp
refs/heads/master
tests/asp/weakConstraints/valves.1.gringo.test.py
4
input = """ 1 1 1 1 63 1 1 1 1 64 1 1 2 0 65 66 1 1 2 0 67 68 1 1 2 0 69 70 1 1 2 0 71 72 1 1 2 0 66 65 1 1 2 0 68 67 1 1 2 0 70 69 1 1 2 0 72 71 1 81 1 1 66 1 82 1 1 65 1 83 1 1 68 1 84 1 1 67 1 85 1 1 70 1 86 1 1 69 1 87 1 1 72 1 88 1 1 71 1 89 1 1 66 1 90 1 1 68 1 91 1 1 67 1 92 1 1 69 1 93 2 1 68 81 1 94 1 0 81 1 9...
Opentrons/labware
refs/heads/master
api/tests/opentrons/config/test_reset.py
2
from collections import namedtuple from unittest.mock import patch, MagicMock import pytest from opentrons.config import reset @pytest.fixture def mock_reset_boot_scripts(): with patch("opentrons.config.reset.reset_boot_scripts") as m: yield m @pytest.fixture def mock_reset_labware_calibration(): wi...
v-iam/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/network_interface_dns_settings.py
9
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
harlequin/sickbeard
refs/heads/master
lib/dateutil/zoneinfo/__init__.py
265
""" Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ from dateutil.tz import tzfile from tarfile import TarFile import os __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" __all__ = ["setca...
n0trax/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_zone.py
49
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # 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 Lice...
Permutatrix/servo
refs/heads/master
etc/servo_gdb.py
233
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
xplv/qtile
refs/heads/develop
libqtile/xcursors.py
6
from logging import getLogger # PyPy < 2.6 compaitibility try: from ._ffi_xcursors import ffi except ImportError: from .ffi_build import xcursors_ffi as ffi # Stolen from samurai-x # (Don't know where to put it, so I'll put it here) # XCB cursors doesn't want to be themed, libxcursor # would be better choice...
yuanagain/seniorthesis
refs/heads/master
venv/lib/python2.7/site-packages/numpy/core/tests/test_defchararray.py
67
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.core.multiarray import _vec_string from numpy.compat import asbytes, asbytes_nested, sixu from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_array_equal ) kw_unicode_true =...
rrrene/django
refs/heads/master
django/contrib/gis/db/backends/postgis/features.py
345
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.postgresql.features import \ DatabaseFeatures as Psycopg2DatabaseFeatures class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures): supports_3d_storage = True supports_3d_functions = True ...
rnikiforova/GuruTubeProject
refs/heads/master
GuruTube/libraries/django/contrib/gis/db/backends/mysql/base.py
317
from django.db.backends.mysql.base import * from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper from django.contrib.gis.db.backends.mysql.creation import MySQLCreation from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection from django.contrib.gis.db.backends.mysq...
JonasThomas/free-cad
refs/heads/master
src/3rdParty/Pivy-0.5/__init__.py
21
### # Copyright (c) 2002-2008 Kongsberg SIM # # 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 PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
felixfontein/ansible
refs/heads/devel
lib/ansible/release.py
15
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
jbzdak/edx-platform
refs/heads/master
cms/djangoapps/course_creators/migrations/0001_initial.py
62
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
foursquare/commons-old
refs/heads/master
src/python/twitter/pants/ant/lib.py
1
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
jimmysong/bitcoin
refs/heads/master
test/util/bitcoin-util-test.py
11
#!/usr/bin/env python # Copyright 2014 BitPay Inc. # Copyright 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import os import sys im...
exercism/python
refs/heads/main
exercises/practice/spiral-matrix/spiral_matrix.py
4
def spiral_matrix(size): pass
renegelinas/mi-instrument
refs/heads/master
mi/dataset/driver/suna/resource/__init__.py
10
import os RESOURCE_PATH = os.path.dirname(__file__)
inares/edx-platform
refs/heads/inares_sass
common/djangoapps/external_auth/djangostore.py
224
"""A openid store using django cache""" from openid.store.interface import OpenIDStore from openid.store import nonce from django.core.cache import cache import logging import time DEFAULT_ASSOCIATIONS_TIMEOUT = 60 DEFAULT_NONCE_TIMEOUT = 600 ASSOCIATIONS_KEY_PREFIX = 'openid.provider.associations.' NONCE_KEY_PREF...
wrxtasy/xbmc
refs/heads/master
lib/libUPnP/Platinum/Build/Tools/Scripts/GenSvnVersionHeader.py
263
#! /usr/bin/python ############################################################# # This tool is used to generate the version info file # ############################################################# import sys import os # ensure that PLATINUM_HOME has been set and exists if not os.environ.has_key('PLATINUM_KIT_...
wdaher/zulip
refs/heads/master
zerver/migrations/0004_userprofile_left_side_userlist.py
167
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0003_custom_indexes'), ] operations = [ migrations.AddField( model_name='userprofile', nam...
rajanandakumar/DIRAC
refs/heads/integration
Core/Utilities/Time.py
7
# $HeadURL$ """ DIRAC Times module Support for basic Date and Time operations based on system datetime module. It provides common interface to UTC timestamps, converter to string types and back. The following datetime classes are used in the returned objects: - dateTime = datetime.datetime - date = datetim...
UWPCE-PythonCert/IntroPython2016
refs/heads/master
students/ninadn/class8/circle.py
2
#Test for circle class class Circle: def __init__(self, radius): self.radius = radius self.diameter = radius * 2
b0ri5/nishe-googlecode
refs/heads/master
scons/scons-local-1.3.0/SCons/Scanner/Prog.py
5
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
tectronics/pyodbc
refs/heads/master
tests3/exceltests.py
44
#!/usr/bin/python # Tests for reading from Excel files. # # I have not been able to successfully create or modify Excel files. import sys, os, re import unittest from os.path import abspath from testutils import * CNXNSTRING = None class ExcelTestCase(unittest.TestCase): def __init__(self, method_name): ...
ashemah/bh_architek
refs/heads/master
server/core/migrations/__init__.py
12133432
leorochael/odoo
refs/heads/8.0
addons/payment_buckaroo/__openerp__.py
374
# -*- coding: utf-8 -*- { 'name': 'Buckaroo Payment Acquirer', 'category': 'Hidden', 'summary': 'Payment Acquirer: Buckaroo Implementation', 'version': '1.0', 'description': """Buckaroo Payment Acquirer""", 'author': 'OpenERP SA', 'depends': ['payment'], 'data': [ 'views/buckaro...
superchilli/webapp
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/ext/declarative/__init__.py
33
# ext/declarative/__init__.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .api import declarative_base, synonym_for, comparable_using, \ ...
cfossace/test
refs/heads/master
malstor/malstor_lib/malstorconfig.py
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # This file is in the public domain ### END LICENSE ### DO NOT EDIT THIS FILE ### __all__ = [ 'project_path_not_found', 'get_data_file', 'get_data_path', ] # Where your project will look for your data (for in...
joshka/SoundCloud2.Bundle
refs/heads/master
Contents/Libraries/Shared/requests/adapters.py
23
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3 import Retry from .packages.urllib3.poolmanager import PoolManager, proxy_from_url ...
SamuelMarks/fabric
refs/heads/master
tests/test_parallel.py
36
from __future__ import with_statement from fabric.api import run, parallel, env, hide, execute, settings from utils import FabricTest, eq_, aborts, mock_streams from server import server, RESPONSES, USER, HOST, PORT # TODO: move this into test_tasks? meh. class OhNoesException(Exception): pass class TestParallel(...
diagramsoftware/odoo
refs/heads/8.0
addons/website_sale_delivery/controllers/__init__.py
7372
import main
dsullivan7/scikit-learn
refs/heads/master
examples/cluster/plot_lena_ward_segmentation.py
271
""" =============================================================== A demo of structured Ward hierarchical clustering on Lena image =============================================================== Compute the segmentation of a 2D image with Ward hierarchical clustering. The clustering is spatially constrained in order ...
joachimmetz/plaso
refs/heads/main
plaso/cli/image_export_tool.py
2
# -*- coding: utf-8 -*- """The image export CLI tool.""" import argparse import codecs import collections import io import json import os import textwrap from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.lib import errors as dfvfs_errors from dfvfs.resolver import context from dfvfs.resolver import re...
cgar/servo
refs/heads/master
tests/wpt/css-tests/tools/pytest/doc/en/example/assertion/failure_demo.py
179
from pytest import raises import _pytest._code import py def otherfunc(a,b): assert a==b def somefunc(x,y): otherfunc(x,y) def otherfunc_multi(a,b): assert (a == b) def test_generative(param1, param2): assert param1 * 2 < param2 def pytest_generate_tests(metafunc): if 'param1' in me...
Yelp/yelp_bytes
refs/heads/master
tests/yelp_bytes_test.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from yelp_bytes import to_bytes, to_utf8, to_native, from_bytes, from_utf8, unicode, PY2 # Define some interesting unicode inputs class UNICODE: ascii = 'A' # The most basic of unicode. latin1 = ascii + 'ü' # U-umlaut. This is d...
bdh1011/wau
refs/heads/master
venv/lib/python2.7/site-packages/twisted/internet/test/process_connectionlost.py
20
import os, sys while 1: line = sys.stdin.readline().strip() if not line: break os.close(int(line))