repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
rwaldron/mirovideoconverter3
refs/heads/master
mvc/osx/app_main.py
2
import os import sys from mvc.osx import autoupdate from mvc.widgets import app from mvc.widgets import initialize from mvc.ui.widgets import Application # run the app autoupdate.initialize() app.widgetapp = Application() initialize(app.widgetapp)
bright-sparks/chromium-spacewalk
refs/heads/master
tools/idl_parser/idl_parser_test.py
176
#!/usr/bin/env python # 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. import glob import unittest from idl_lexer import IDLLexer from idl_parser import IDLParser, ParseFile from idl_ppapi_lexer import...
WSDC-NITWarangal/django
refs/heads/master
tests/generic_inline_admin/tests.py
154
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.forms import...
znoland3/zachdemo
refs/heads/master
venvdir/lib/python3.4/site-packages/setuptools/msvc9_support.py
429
try: import distutils.msvc9compiler except ImportError: pass unpatched = dict() def patch_for_specialized_compiler(): """ Patch functions in distutils.msvc9compiler to use the standalone compiler build for Python (Windows only). Fall back to original behavior when the standalone compiler is no...
pansapiens/mytardis
refs/heads/develop
tardis/tardis_portal/tests/test_collectstatic.py
3
import shutil from os import path from tempfile import mkdtemp from django.test import TestCase from django.conf import settings from django.contrib.staticfiles.management.commands import collectstatic class CollectstaticTest(TestCase): def setUp(self): self.STATIC_ROOT = mkdtemp() self.cmd = col...
elainenaomi/sciwonc-dataflow-examples
refs/heads/master
dissertation2017/Experiment 1A/instances/10_2_workflow_full_10files_secondary_wmj_3sh_3rs_with_annot_with_proj_3s_range/work/ubuntu/pegasus/example_workflow/20161109T004859+0000/ConfigDB_Task_StatsCPUMemory_8.py
95
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.internal:27017,ip-172-31-29-106.us-west-2.compute.internal:27017,ip-172-31-29...
sserrot/champion_relationships
refs/heads/master
venv/Lib/site-packages/bleach/_vendor/html5lib/_utils.py
45
from __future__ import absolute_import, division, unicode_literals from types import ModuleType from six import text_type try: import xml.etree.cElementTree as default_etree except ImportError: import xml.etree.ElementTree as default_etree __all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair", ...
eokeeffe/uav_photogrammetry_toolkit
refs/heads/master
haze_detection/haze_detection.py
2
import cv2 import os,sys from multiprocessing.pool import ThreadPool import numpy as np from collections import deque max_value=255 def sinv(x): global max_value return max(x,max_value-x) def semi_inverse_image(image): func = np.vectorize(sinv) image[:,:,0]=func(image[:,:,0]) image[:,:,1]=func(im...
Matt-Deacalion/django
refs/heads/master
tests/utils_tests/test_timezone.py
149
import copy import datetime import pickle import unittest from django.test import override_settings from django.utils import timezone try: import pytz except ImportError: pytz = None requires_pytz = unittest.skipIf(pytz is None, "this test requires pytz") if pytz is not None: CET = pytz.timezone("Europe...
kk9599/django-cms
refs/heads/develop
cms/tests/test_frontend.py
16
# -*- coding: utf-8 -*- import datetime import os import sys import time try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse from django.conf import settings from django.contrib.auth import get_user_model, authenticate, login from django.contrib.auth.models import Permissio...
dymkowsk/mantid
refs/heads/master
Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerDataServiceTest.py
3
from __future__ import (absolute_import, division, print_function) import unittest from mantid.kernel import PropertyManager, PropertyManagerDataService class PropertyManagerDataServiceTest(unittest.TestCase): def test_add_existing_mgr_object(self): name = "PropertyManagerDataServiceTest_test_add_existin...
3quarterstack/simple_blog
refs/heads/master
django/contrib/sitemaps/tests/https.py
219
from __future__ import unicode_literals from datetime import date from django.test.utils import override_settings from .base import SitemapTestsBase class HTTPSSitemapTests(SitemapTestsBase): protocol = 'https' urls = 'django.contrib.sitemaps.tests.urls.https' def test_secure_sitemap_index(self): ...
GunoH/intellij-community
refs/heads/master
python/testData/copyPaste/EmptyFunctionCaretAtBodyIndent.src.py
114
class C: def empty(self): def another(self): <selection> """ line 1 line 2 """ pass </selection>
nschloe/matplotlib2tikz
refs/heads/master
test/test_loglogplot.py
1
# -*- coding: utf-8 -*- # import matplotlib.pyplot as plt import numpy as np from helpers import assert_equality def plot(): fig = plt.figure() x = np.logspace(0, 6, num=5) plt.loglog(x, x ** 2, lw=2.1) return fig def test(): assert_equality(plot, __file__[:-3] + "_reference.tex") return
chrisburr/scikit-learn
refs/heads/master
sklearn/utils/sparsetools/tests/test_traversal.py
315
from __future__ import division, print_function, absolute_import from nose import SkipTest import numpy as np from numpy.testing import assert_array_almost_equal try: from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree,\ csgraph_to_dense, csgraph_from_dense except ImportError: # Oldi...
lguychard/loispy
refs/heads/master
src/loispy/interpreter/builtin.py
1
import operator as op import sys from symbol import Symbol, Sym from utils import to_string from parsing import parse # ------------------------------------------------------ # GLOBAL BUILTIN DICT: BUILT-IN PROCEDURES AND CONSTANTS # ------------------------------------------------------ BUILTIN = { "#t": True, ...
michalliu/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/host/lib/python2.7/profile.py
166
#! /usr/bin/env python # # Class for profiling python code. rev 1.0 6/2/94 # # Written by James Roskind # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum """Class for profiling Python code.""" # Copyright Disney Enterprises, Inc. All Rights Reserved. # License...
zhushun0008/sms-tools
refs/heads/master
lectures/07-Sinusoidal-plus-residual-model/plots-code/stochasticModelAnalSynth.py
19
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, hanning, resample from scipy.fftpack import fft, ifft import time import sys, os sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import utilFunctions as UF import stochasticMode...
pipermerriam/mozy
refs/heads/master
mozy/apps/mosaic/forms.py
1
from django import forms from mozy.apps.mosaic.models import ( SourceImage, ) class SourceImageForm(forms.ModelForm): class Meta: model = SourceImage fields = ( 'original', ) def save(self, *args, **kwargs): instance = super(SourceImageForm, self).save(*args, ...
yize/grunt-tps
refs/heads/master
tasks/lib/python/Lib/python2.7/lib2to3/tests/data/crlf.py
284
print "hi" print "Like bad Windows newlines?"
ManoSeimas/manoseimas.lt
refs/heads/master
manoseimas/scrapy/tests/test_msword.py
1
import unittest from manoseimas.scrapy.tests.utils import fixture from manoseimas.scrapy.helpers.msword import doc2xml class TestWordConversion(unittest.TestCase): def test_doc2xml(self): xml = doc2xml(fixture('lobist_veiklos_atatskaita_2012.doc')) expected = fixture('lobist_veiklos_atatskaita_2...
bancek/egradebook
refs/heads/master
src/lib/south/tests/brokenapp/__init__.py
12133432
alanwj/django-crispy-forms
refs/heads/dev
docs/__init__.py
12133432
saurabh6790/trufil_app
refs/heads/master
buying/report/requested_items_to_be_ordered/__init__.py
12133432
ryfeus/lambda-packs
refs/heads/master
Selenium_PhantomJS/source/botocore/vendored/requests/adapters.py
573
# -*- 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.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response impo...
adedayo/intellij-community
refs/heads/master
python/testData/inspections/ConvertSingleQuotedDocstring_after.py
83
def foo(): """foo first line docstring second line of docstring""" pass
zestyr/lbry
refs/heads/master
lbrynet/core/PeerManager.py
1
from lbrynet.core.Peer import Peer class PeerManager(object): def __init__(self): self.peers = [] def get_peer(self, host, port): for peer in self.peers: if peer.host == host and peer.port == port: return peer peer = Peer(host, port) self.peers.appe...
alphagov/notify-api
refs/heads/master
tests/app/main/views/test_organisation.py
1
from flask import json def test_should_be_able_to_get_organisation_by_id(notify_api, notify_db, notify_db_session): response = notify_api.test_client().get( '/organisation/1234', headers={ 'Authorization': 'Bearer 1234' } ) data = json.loads(response.get_data()) ass...
bitmazk/django-linklist
refs/heads/master
manage.py
2
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault( 'DJANGO_SETTINGS_MODULE', 'linklist.tests.south_settings') from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
technologiescollege/s2a_fr
refs/heads/portable
s2a/Python/Lib/test/test_linecache.py
97
""" Tests for the linecache module """ import linecache import unittest import os.path from test import test_support as support FILENAME = linecache.__file__ INVALID_NAME = '!@$)(!@#_1' EMPTY = '' TESTS = 'inspect_fodder inspect_fodder2 mapping_tests' TESTS = TESTS.split() TEST_PATH = os.path.dirname(support.__file_...
louyihua/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/modulestore/draft_and_published.py
71
""" This module provides an abstraction for Module Stores that support Draft and Published branches. """ import threading from abc import ABCMeta, abstractmethod from contextlib import contextmanager from . import ModuleStoreEnum, BulkOperationsMixin # Things w/ these categories should never be marked as version=DRAF...
ryanmockabee/golfr
refs/heads/master
flask/lib/python3.6/site-packages/sqlalchemy/util/__init__.py
33
# util/__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 .compat import callable, cmp, reduce, \ threading, py3k, py33, py36, py2k...
zhujzhuo/MySQL-5.6
refs/heads/mysql-5.6.11
xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/ib_specialchar_test.py
24
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
angelapper/odoo
refs/heads/9.0
addons/sale_layout/__openerp__.py
26
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Sale Layout', 'version': '1.0', 'sequence': 14, 'summary': 'Sale Layout, page-break, subtotals, separators, report', 'description': """ Manage your sales reports ========================= W...
arbrandes/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/x_module.py
3
# lint-amnesty, pylint: disable=missing-module-docstring import logging import os import sys import time from collections import namedtuple from functools import partial import yaml from django.utils.encoding import python_2_unicode_compatible from lazy import lazy from lxml import etree from opaque_keys.edx.asides i...
matrix-org/synapse
refs/heads/master
synapse/rest/synapse/__init__.py
1
# Copyright 2020 The Matrix.org Foundation C.I.C. # # 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 a...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/mobile/shared_dressed_fed_dub_commander_bith_male_01.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_fed_dub_commander_bith_male_01.iff" result.attribute_t...
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/Django-1.6.10/django/contrib/admin/tests.py
104
import os from django.test import LiveServerTestCase from django.utils.module_loading import import_by_path from django.utils.unittest import SkipTest from django.utils.translation import ugettext as _ class AdminSeleniumWebDriverTestCase(LiveServerTestCase): available_apps = [ 'django.contrib.admin', ...
lukauskas/scipy
refs/heads/master
scipy/weave/examples/wx_speed.py
92
from __future__ import absolute_import, print_function """ Implements a fast replacement for calling DrawLines with an array as an argument. It uses weave, so you'll need that installed. Copyright: Space Telescope Science Institute License: BSD Style Designed by: Enthought, Inc. Author: ...
Bernabozkurt/python_staj
refs/heads/master
tornado_server.py
3
#!/usr/bin/env python import MySQLdb import logging import ConfigParser import sys log = logging.getLogger(__name__) CONFIG_FILE= 'dbconfig.ini' def get_schemas(db): schemas = [] db_query = "show databases" cursor = db.cursor() try: # Execute the SQL command cursor.execute(db_query) ...
rockyzhang/zhangyanhit-python-for-android-mips
refs/heads/master
python3-alpha/python3-src/Tools/unicode/genwincodec.py
99
"""This script generates a Python codec module from a Windows Code Page. It uses the function MultiByteToWideChar to generate a decoding table. """ import ctypes from ctypes import wintypes from gencodec import codegen import unicodedata def genwinmap(codepage): MultiByteToWideChar = ctypes.windll.kernel32.Multi...
t3dev/odoo
refs/heads/master
addons/l10n_gt/__init__.py
66
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2009-2010 Soluciones Tecnologócias Prisma S.A. All Rights Reserved. # José Rodrigo Fernández Menegazzo, Soluciones Tecnologócias Prisma S.A. # (http://www.solucionesprisma.com)
consulo/consulo-mercurial
refs/heads/master
src/test/resources/bin/mercurial/discovery.py
91
# discovery.py - protocol changeset discovery functions # # Copyright 2010 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import nullid, short from i18n import _ import util, setdiscovery,...
AIFDR/inasafe
refs/heads/develop
safe/metadata/encoder.py
6
# coding=utf-8 """Tools for metadata encoding.""" import json from datetime import datetime, date from qgis.PyQt.QtCore import QDate, Qt, QDateTime, QUrl __copyright__ = "Copyright 2016, The InaSAFE Project" __license__ = "GPL version 3" __email__ = "info@inasafe.org" __revision__ = '$Format:%H$' class MetadataEnc...
xingwu1/autorest
refs/heads/master
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/operations/files.py
2
# 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 ...
maurofaccenda/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_image.py
49
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 vers...
ofir123/CouchPotatoServer
refs/heads/master
libs/suds/mx/appender.py
200
# 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 ...
apple/swift-lldb
refs/heads/stable
packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py
5
from __future__ import print_function import unittest2 from lldbsuite.test.decorators import * from lldbsuite.test.concurrent_base import ConcurrentEventsBase from lldbsuite.test.lldbtest import TestBase @skipIfWindows class ConcurrentDelaySignalWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute...
wannier-developers/wannier90
refs/heads/develop
examples/example17/iron_updn-kslice-fermi_lines.py
6
import pylab as pl import numpy as np import matplotlib.mlab as ml from collections import OrderedDict points = np.loadtxt('iron_up-kslice-coord.dat') points_x=points[:,0] points_y=points[:,1] num_pt=len(points) area= 4.792898 x_coord=list(OrderedDict.fromkeys(points_x)) y_coord=list(OrderedDict.fromkeys(point...
beetleman/faker
refs/heads/master
faker/providers/address/en_GB/__init__.py
11
from __future__ import unicode_literals from ..en import Provider as AddressProvider class Provider(AddressProvider): city_prefixes = ('North', 'East', 'West', 'South', 'New', 'Lake', 'Port') city_suffixes = ( 'town', 'ton', 'land', 'ville', 'berg', 'burgh', 'borough', 'bury', 'view', 'port', 'mouth'...
nvoron23/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/mysql/creation.py
613
from django.db.backends.mysql.creation import DatabaseCreation class MySQLCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): from django.contrib.gis.db.models.fields import GeometryField output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) ...
anitzkin/opencog
refs/heads/master
opencog/python/pln_old/examples/tuffy/smokes/smokes_agent.py
23
""" PLN representation of the "smokes" sample from Tuffy Markov Logic Networks More details on this sample are available here: https://github.com/opencog/opencog/tree/master/opencog/python/pln_old/examples/tuffy/smokes https://github.com/cosmoharrigan/tuffy/tree/master/samples/smoke http://hazy.cs.wisc.edu/hazy/tuffy/...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
third_party/skia/platform_tools/android/tradefed/upload_dm_results.py
68
#!/usr/bin/env python # Copyright 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. """Upload DM output PNG files and JSON summary to Google Storage.""" import datetime import os import shutil import sys import tempfi...
syakesaba/webhack
refs/heads/master
sqli/case4.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import webapp2 import sqlite3 import time class Case4(webapp2.RequestHandler): """ ・演算子やUNIONを使用しCGIから情報を得られるかどうか """ ANSWER = "?id=1 or 0 UNION select id,name from Student where id != -89347398" def get(self): memdb = sqlite3.connect(':memory:') ...
qrohlf/cf-client
refs/heads/qrohlf
lib/cfclient/ui/dialogs/cf1config.py
7
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
jetskijoe/headphones
refs/heads/master
lib/bs4/dammit.py
35
# -*- coding: utf-8 -*- """Beautiful Soup bonus library: Unicode, Dammit This library converts a bytestream to Unicode through any means necessary. It is heavily based on code from Mark Pilgrim's Universal Feed Parser. It works best on XML and HTML, but it does not rewrite the XML or HTML to reflect a new encoding; th...
cyx1231st/nova
refs/heads/eventually-consistent-host-state-mitaka
nova/api/openstack/compute/legacy_v2/contrib/hosts.py
6
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
regit/pynetfilter_conntrack
refs/heads/master
pynetfilter_conntrack/__init__.py
2
from pynetfilter_conntrack.version import VERSION as __revision__ from pynetfilter_conntrack.tools import * from pynetfilter_conntrack.constant import * from pynetfilter_conntrack.func import * from pynetfilter_conntrack.func_expect import * from pynetfilter_conntrack.conntrack_entry import * from pynetfilter_conntrack...
jimbobhickville/taskflow
refs/heads/master
taskflow/utils/mixins.py
4
# -*- coding: utf-8 -*- # Copyright (C) 2015 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
Slezhuk/ansible
refs/heads/devel
lib/ansible/module_utils/netcli.py
50
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
huanpc/IoT-1
refs/heads/master
gui/controller/.venv/lib/python3.5/site-packages/django/core/mail/backends/filebased.py
558
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import \ EmailBackend as ConsoleEmailBackend from django.utils import six class EmailBackend(ConsoleEmailB...
torrvision/crayon
refs/heads/master
server/server.py
1
# Flask app server from flask import Flask, request, json app = Flask("crayonserver") # HTTP client to use the tensorboard api import urllib2 # Server version __version__ = "0.5" # Not-supported logging types not_supported_types = [ "audio", "compressedHistograms", "graph", "images", "meta_graph", "run_m...
devlights/try-python
refs/heads/master
trypython/stdlib/itertools_/itertools06.py
1
# coding: utf-8 """ itertools モジュールについてのサンプル 以下の処理についてのサンプルです。 - islice() """ import itertools as it from trypython.common.commoncls import SampleBase from trypython.common.commonfunc import pr, hr class Sample(SampleBase): def exec(self): # ----------------------------------------------- # ite...
aewhatley/scikit-learn
refs/heads/master
doc/tutorial/text_analytics/solutions/generate_skeletons.py
433
"""Generate skeletons from the example code""" import os exercise_dir = os.path.dirname(__file__) if exercise_dir == '': exercise_dir = '.' skeleton_dir = os.path.abspath(os.path.join(exercise_dir, '..', 'skeletons')) if not os.path.exists(skeleton_dir): os.makedirs(skeleton_dir) solutions = os.listdir(exerc...
levkar/odoo
refs/heads/10.0
addons/hr_payroll/wizard/hr_payroll_contribution_register_report.py
24
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from dateutil import relativedelta from odoo import api, fields, models class PayslipLinesContributionRegister(models.TransientModel): _name = 'payslip.lines.contribution.register' ...
skg-net/ansible
refs/heads/devel
lib/ansible/template/template.py
156
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
Bharath-J/Mezzanine
refs/heads/master
mezzanine/project_template/project_name/urls.py
36
from __future__ import unicode_literals from django.conf.urls import patterns, include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin from mezzanine.core.views import direct_to_template from mezzanine.conf import settings admin.autodiscover() # Add the urlpatterns for any cus...
justin-ho/passwd-mng
refs/heads/master
pycrypto-2.6.1/pycrypto-2.6.1/lib/Crypto/Protocol/AllOrNothing.py
125
# # AllOrNothing.py : all-or-nothing package transformations # # Part of the Python Cryptography Toolkit # # Written by Andrew M. Kuchling and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication ...
xwolf12/django
refs/heads/master
tests/gis_tests/geoapp/test_feeds.py
292
from __future__ import unicode_literals from xml.dom import minidom from django.conf import settings from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) from .models import City @modify_settings(INSTALLED_APPS={'append': 'd...
jprine/pelican-plugins
refs/heads/master
better_codeblock_line_numbering/__init__.py
68
from .better_codeblock_line_numbering import *
anirudhSK/chromium
refs/heads/master
tools/metrics/histograms/print_style.py
1
# Copyright 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. """Holds the constants for pretty printing histograms.xml.""" import os import sys # Import the metrics/common module for pretty print xml. sys.path.append...
apocalypsebg/odoo
refs/heads/8.0
addons/stock_landed_costs/stock_landed_costs.py
19
# -*- 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...
medspx/QGIS
refs/heads/master
tests/src/python/test_qgsrasterlayer.py
14
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRasterLayer. .. 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. """ fr...
kingvuplus/ts-gui-3
refs/heads/master
lib/python/Tools/Notifications.py
2
from datetime import datetime from Tools.BoundFunction import boundFunction from Tools.LoadPixmap import LoadPixmap from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN notifications = [] notificationAdded = [] current_notifications = [] class NotificationQueueEntry: def __init__(self, fnc, screen, ...
eufarn7sp/egads
refs/heads/master
egads/thirdparty/__init__.py
2
__author__ = "mfreer" __date__ = "$Date:: 2012-02-07 17:23#$" __revision__ = "$Revision:: 125 $" __version__ = "unknown"
arcward/echokit
refs/heads/master
echokit/request.py
1
"""Deserialization of incoming requests""" class ASKRequest(dict): """Class to deserialize and access data for incoming requests Allows access to request data via dot notation by dynamically assigning attributes. Hopefully allows more graceful handling of requests in the face of possible future reque...
antoinecarme/pyaf
refs/heads/master
tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_0/ar_/test_artificial_32_BoxCox_LinearTrend_0__20.py
1
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 0, transform = "BoxCox", sigma = 0.0, exog_count = 20, ar_order = 0);
ressu/SickGear
refs/heads/master
lib/guessit/transfo/guess_website.py
21
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free...
stonebig/numba
refs/heads/master
numba/tests/test_random.py
4
import collections import functools import math import multiprocessing import os import random import subprocess import sys import threading import itertools import numpy as np import unittest from numba import jit, _helperlib from numba.core import types from numba.core.compiler import compile_isolated from numba.te...
DimensionDataCBUSydney/libcloud
refs/heads/trunk
libcloud/common/gandi.py
22
# 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 use ...
unikmhz/npui
refs/heads/master
netprofile/netprofile/tpl/npdml/pdf.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # NetProfile: NPDML parser - PDF output # Copyright © 2017 Alex Unigovsky # # This file is part of NetProfile. # NetProfile 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 Sof...
jia200x/RIOT
refs/heads/master
tests/thread_exit/tests/01-run.py
32
#!/usr/bin/env python3 import sys from testrunner import run def testfunc(child): child.expect("main: starting") child.expect("main: exiting") child.expect("2nd: starting") child.expect("3rd: starting") child.expect("3rd: exiting") child.expect("2nd: exiting") child.expect("4th: starting"...
gregljohnson/ProjectEuler
refs/heads/master
problem50.py
1
''' Name: Problem 50: Consecutive prime sum (29435) The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred. The longest sum of consecutive primes below one-thousand that adds to a prime, con...
bpgc-cte/python2017
refs/heads/master
Week 7/django/lib/python3.6/site-packages/django/contrib/admindocs/__init__.py
807
default_app_config = 'django.contrib.admindocs.apps.AdminDocsConfig'
naototty/pyflag
refs/heads/master
utilities/mergecap2.py
7
# ****************************************************** # Michael Cohen <scudette@users.sourceforge.net> # # ****************************************************** # Version: FLAG $Version: 0.87-pre1 Date: Thu Jun 12 00:48:38 EST 2008$ # ****************************************************** # # * This program is fre...
NoThrills/a510_kernel
refs/heads/2.6.39
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
cedi4155476/QGIS
refs/heads/master
python/plugins/processing/gui/ProcessingToolbox.py
4
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingToolbox.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
leancloud/knowhow
refs/heads/master
fabfile.py
1
import os from fabric.api import run, sudo, env, cd, local, prefix, put, lcd, settings from fabric.contrib.files import exists, sed from fabric.contrib.project import rsync_project env.use_ssh_config = True user = 'deploy' kb_dir = '/var/www/knowledgebase' project_dir = '.' dist = 'debian' host_count = len(env.hosts...
plxaye/chromium
refs/heads/master
src/build/android/lighttpd_server.py
76
#!/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. """Provides a convenient wrapper for spawning a test lighttpd instance. Usage: lighttpd_server PATH_TO_DOC_ROOT """ import co...
efiring/scipy
refs/heads/master
scipy/interpolate/interpnd_info.py
106
""" Here we perform some symbolic computations required for the N-D interpolation routines in `interpnd.pyx`. """ from __future__ import division, print_function, absolute_import from sympy import * def _estimate_gradients_2d_global(): # # Compute # # f1, f2, df1, df2, x = symbols(['f1', 'f2',...
buntyke/Flask
refs/heads/master
microblog/flask/lib/python2.7/site-packages/wtforms/ext/django/templatetags/wtforms.py
177
""" Template tags for easy WTForms access in Django templates. """ from __future__ import unicode_literals import re from django import template from django.conf import settings from django.template import Variable from ....compat import iteritems register = template.Library() class FormFieldNode(template.Node): ...
hynekcer/django
refs/heads/master
tests/auth_tests/urls.py
189
from django.conf.urls import url from django.contrib import admin from django.contrib.auth import views from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.urls import urlpatterns as auth_urlpatterns from django.contrib.messages.api...
ccomb/OpenUpgrade
refs/heads/master
addons/base_import/controllers.py
347
# -*- coding: utf-8 -*- import simplejson from openerp.http import Controller, route class ImportController(Controller): @route('/base_import/set_file') def set_file(self, req, file, import_id, jsonp='callback'): import_id = int(import_id) written = req.session.model('base_import.import').wri...
CYBAI/servo
refs/heads/master
tests/wpt/web-platform-tests/annotation-protocol/tools/protocol-server.py
5
# protocol-server # # a reference implementation of the Web Annotation Protocol # # Developed by Benjamin Young (@bigbulehat) and Shane McCarron (@halindrome). # Sponsored by Spec-Ops (https://spec-ops.io) # # Copyright (c) 2016 Spec-Ops # # for license information, see http://www.w3.org/Consortium/Legal/2008/04-testsu...
openwrt/linux
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
Rakaim/python-minecraft-employment
refs/heads/master
mcploy/posts/admin.py
13848
from django.contrib import admin # Register your models here.
pyKy/kivy-doc-ja
refs/heads/master
kivy/uix/label.py
14
'''Label ===== .. image:: images/label.png :align: right The :class:`Label` widget is for rendering text. It supports ascii and unicode strings:: # hello world text l = Label(text='Hello world') # unicode text; can only display glyphs that are available in the font l = Label(text=u'Hello world '...
nikkisquared/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py
241
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface SpecialMethodSignatureMismatch1 { getter long long foo(long index); }; """) results = parser.finish() except: threw = True harness.ok(threw, "Should have...
kayone/Wox
refs/heads/master
PythonHome/Lib/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2993
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mitsei/dlkit
refs/heads/master
dlkit/authz_adapter/authentication/sessions.py
1
"""AuthZ Adapter implementations of authentication sessions.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods # Number of methods are defined in specification # pylint: disable=too-many-ancestors # Inheritance defined in specification from ....