repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
2014c2g6/c2g6
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/multiprocessing/dummy/__init__.py
693
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
epam-mooc/edx-platform
refs/heads/master
lms/djangoapps/bulk_email/tests/test_err_handling.py
33
# -*- coding: utf-8 -*- """ Unit tests for handling email sending errors """ import json from itertools import cycle from mock import patch from smtplib import SMTPDataError, SMTPServerDisconnected, SMTPConnectError from celery.states import SUCCESS, RETRY from django.test.utils import override_settings from django....
romank0/kombu
refs/heads/master
kombu/transport/SLMQ.py
2
""" kombu.transport.SLMQ =================== SoftLayer Message Queue transport. """ from __future__ import absolute_import import socket import string from anyjson import loads, dumps import softlayer_messaging import os from kombu.five import Empty, text_t from kombu.utils import cached_property # , uuid from k...
edcast-inc/edx-platform-edcast
refs/heads/master
lms/djangoapps/certificates/tests/test_queue.py
27
# -*- coding: utf-8 -*- """Tests for the XQueue certificates interface. """ from contextlib import contextmanager import json from mock import patch, Mock from nose.plugins.attrib import attr from django.test import TestCase from django.test.utils import override_settings from opaque_keys.edx.locator import CourseLoc...
tchellomello/home-assistant
refs/heads/dev
homeassistant/components/homematicip_cloud/binary_sensor.py
1
"""Support for HomematicIP Cloud binary sensor.""" import logging from typing import Any, Dict from homematicip.aio.device import ( AsyncAccelerationSensor, AsyncContactInterface, AsyncDevice, AsyncFullFlushContactInterface, AsyncMotionDetectorIndoor, AsyncMotionDetectorOutdoor, AsyncMotion...
thnee/ansible
refs/heads/devel
test/units/modules/network/vyos/test_vyos_static_route.py
20
# (c) 2016 Red Hat 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 version. # # Ansible is dis...
shawon922/django-blog
refs/heads/master
posts/tests.py
24123
from django.test import TestCase # Create your tests here.
cycotech/WAR-app
refs/heads/master
env/lib/python3.5/site-packages/django/contrib/admin/views/main.py
49
import sys from collections import OrderedDict from django.contrib.admin import FieldListFilter from django.contrib.admin.exceptions import ( DisallowedModelAdminLookup, DisallowedModelAdminToField, ) from django.contrib.admin.options import ( IS_POPUP_VAR, TO_FIELD_VAR, IncorrectLookupParameters, ) from djang...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/faker/providers/internet/de_DE/__init__.py
18
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as InternetProvider class Provider(InternetProvider): free_email_domains = ( 'aol.de', 'gmail.com', 'gmx.de', 'googlemail.com', 'hotmail.de', 'web.de', 'yahoo.de', ) tlds = ('com', 'com', 'com', 'net', 'org', '...
soldag/home-assistant
refs/heads/dev
homeassistant/components/viaggiatreno/sensor.py
16
"""Support for the Italian train system using ViaggiaTreno API.""" import asyncio import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, HTTP_OK, TIME_MINUTES import homeassistant.helpers...
simonwydooghe/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_webfilter_urlfilter.py
7
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
chromium/chromium
refs/heads/master
components/cronet/android/test/javaperftests/run.py
9
#!/usr/bin/env python # Copyright 2015 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. """This script runs an automated Cronet performance benchmark. This script: 1. Sets up "USB reverse tethering" which allow network tra...
rcbops/python-django-buildpackage
refs/heads/master
django/contrib/gis/db/models/query.py
290
from django.db import connections from django.db.models.query import QuerySet, Q, ValuesQuerySet, ValuesListQuerySet from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import get_srid_info, GeometryField, PointField, LineStringField from django.contrib.gis.db.models.sql import...
pdehaye/theming-edx-platform
refs/heads/master
i18n/execute.py
16
import os, subprocess, logging from config import CONFIGURATION, BASE_DIR LOG = logging.getLogger(__name__) def execute(command, working_directory=BASE_DIR): """ Executes shell command in a given working_directory. Command is a string to pass to the shell. Output is ignored. """ LOG.info(comm...
numenta-ci/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/backends/__init__.py
72
import matplotlib import inspect import warnings # ipython relies on interactive_bk being defined here from matplotlib.rcsetup import interactive_bk __all__ = ['backend','show','draw_if_interactive', 'new_figure_manager', 'backend_version'] backend = matplotlib.get_backend() # validates, to match all_bac...
submergerock/avatar-hadoop
refs/heads/master
build/hadoop-0.20.1-dev/contrib/hod/hodlib/Common/allocationManagerUtil.py
182
#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 thi...
aethaniel/micropython
refs/heads/master
tests/import/pkg/mod.py
120
def foo(): return 42
thshorrock/Ensemble-Learning
refs/heads/master
boost/tools/build/v2/build/alias.py
4
# Copyright 2003, 2004, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Status: ported (danielw) # Base revision: 56043 # This module defines the 'alias' rule and associated class. # # Alias is jus...
shenlong3030/asv-django-guestbook
refs/heads/master
django/contrib/markup/models.py
12133432
kingctan/django-guardian
refs/heads/master
example_project/posts/urls.py
81
from guardian.compat import url, patterns urlpatterns = patterns('posts.views', url(r'^$', view='post_list', name='posts_post_list'), url(r'^(?P<slug>[-\w]+)/$', view='post_detail', name='posts_post_detail'), )
marcosmodesto/django-testapp
refs/heads/master
django/conf/locale/fy_NL/formats.py
1293
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # DATE_FORMAT = # TIME_FORMAT = # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = # MONTH_DA...
hackerbot/DjangoDev
refs/heads/master
tests/gis_tests/gdal_tests/test_driver.py
335
import unittest from django.contrib.gis.gdal import HAS_GDAL if HAS_GDAL: from django.contrib.gis.gdal import Driver, GDALException valid_drivers = ( # vector 'ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN', 'Memory', 'CSV', 'GML', 'KML', # raster 'GTiff', 'JPEG', 'MEM', 'PNG', ) in...
bols-blue/ansible
refs/heads/devel
v1/ansible/runner/action_plugins/group_by.py
134
# Copyright 2012, Jeroen Hoekx <jeroen@hoekx.be> # # 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 ve...
basicthinker/Sexain-MemController
refs/heads/master
gem5-stable/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py
89
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
Fritzip/ReactionNetwork
refs/heads/master
SRC/globals.py
1
#! /usr/bin/python # -*- coding: utf-8 -*- import random import sys import os import argparse import struct from datetime import datetime import numpy as np from scipy.interpolate import interp1d import matplotlib.pyplot as plt #################################################################### # Global function...
exbluesbreaker/csu-code-analysis
refs/heads/master
logilab-astng XML Generator/src/CSUStAn/runners.py
1
''' Created on 08.04.2012 @author: bluesbreaker ''' from logilab.common.configuration import ConfigurationMixIn from pylint.pyreverse.main import OPTIONS from CSUStAn.astng.simple import NamesCheckLinker from CSUStAn.reflexion.rm_tools import ReflexionModelVisitor,HighLevelModelDotGenerator,SourceModelXMLGenerator fr...
tmerrick1/spack
refs/heads/develop
var/spack/repos/builtin/packages/r-gostats/package.py
3
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Zen-CODE/kivy
refs/heads/master
examples/widgets/lang_dynamic_classes.py
57
# Dynamic kv classes from kivy.lang import Builder from kivy.base import runTouchApp root = Builder.load_string(''' <ImageButton@Button>: source: None Image: source: root.source center: root.center ImageButton: source: 'kivy/data/logo/kivy-icon-512.png' ''') runTouchApp(root)
abawchen/leetcode
refs/heads/master
solutions/027_remove_element.py
1
# Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. class Solution: # @param {integer[]} nums # @param {integer} val # @return {integer} def removeElement(se...
irwins/azure-quickstart-templates
refs/heads/master
hortonworks-on-centos/scripts/vm-bootstrap.py
89
# # vm-bootstrap.py # # This script is used to prepare VMs launched via HDP Cluster Install Blade on Azure. # # Parameters passed from the bootstrap script invocation by the controller (shown in the parameter order). # Required parameters: # action: "bootstrap" to set up VM and initiate cluster deployment. "check" f...
diox/olympia
refs/heads/master
src/olympia/constants/__init__.py
12133432
ddiazpinto/django-redsys
refs/heads/master
redsys_gateway/models.py
12133432
Argon-Zhou/django
refs/heads/master
django/db/backends/postgresql_psycopg2/utils.py
682
from django.utils.timezone import utc def utc_tzinfo_factory(offset): if offset != 0: raise AssertionError("database connection isn't set to UTC") return utc
lmazuel/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/debug.py
56
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 Lice...
anortef/calico
refs/heads/master
calico/felix/test/test_devices.py
2
# -*- coding: utf-8 -*- # Copyright 2014, 2015 Metaswitch Networks # # 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 ap...
zedr/django
refs/heads/master
tests/utils_tests/test_module/__init__.py
439
class SiteMock(object): _registry = {} site = SiteMock()
campbe13/openhatch
refs/heads/master
vendor/packages/whoosh/src/whoosh/filedb/gae.py
17
""" This module contains EXPERIMENTAL support for storing a Whoosh index's files in the Google App Engine blobstore. This will use a lot of RAM since all files are loaded into RAM, but it potentially useful as a workaround for the lack of file storage in Google App Engine. Use at your own risk, but please report any p...
agualis/test-django-nonrel
refs/heads/master
django/http/multipartparser.py
87
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ import cgi from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.utils.datastructures import MultiValueDict fro...
andrius-preimantas/odoo
refs/heads/master
addons/subscription/__init__.py
441
# -*- 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...
leovoel/glc.py
refs/heads/master
glc/easing.py
1
""" glc.easing ========== Easing functions. (c) 2016 LeoV https://github.com/leovoel/ """ from math import pi, sin, cos, sqrt # all easing functions here are ease in-out # TODO: more control def linear(t): return t def sine(t): t = t * pi return 0.5 - cos(t) * 0.5 def quadra...
cuboxi/android_external_chromium_org
refs/heads/kitkat
third_party/libxml/src/regressions.py
360
#!/usr/bin/python -u import glob, os, string, sys, thread, time # import difflib import libxml2 ### # # This is a "Work in Progress" attempt at a python script to run the # various regression tests. The rationale for this is that it should be # possible to run this on most major platforms, including those (such as # ...
feigaochn/leetcode
refs/heads/master
p155_min_stack.py
2
#!/bin/env python3 # author: Fei Gao # # Min Stack # # Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. # push(x) -- Push element x onto stack. # pop() -- Removes the element on top of the stack. # top() -- Get the top element. # getMin() -- Retrieve the minimum element...
ozamiatin/glance
refs/heads/master
glance/db/sqlalchemy/migrate_repo/versions/040_add_changes_to_satisfy_metadefs_tags.py
20
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
biddyweb/merchant
refs/heads/master
billing/gateways/eway_gateway/eway_api/tests.py
3
from __future__ import print_function import unittest from datetime import datetime, timedelta from suds import WebFault from client import RebillEwayClient, HOSTED_TEST_URL # uncomment to enable debugging #import logging #logging.basicConfig(level=logging.DEBUG) #logging.getLogger('suds.client').setLevel(logging.DE...
manish/fitnessroom
refs/heads/master
core/tests.py
24123
from django.test import TestCase # Create your tests here.
staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8
refs/heads/master
lib/python2.7/compiler/ast.py
206
"""Python abstract syntax node definitions This file is automatically generated by Tools/compiler/astgen.py """ from compiler.consts import CO_VARARGS, CO_VARKEYWORDS def flatten(seq): l = [] for elt in seq: t = type(elt) if t is tuple or t is list: for elt2 in flatten(elt): ...
mdole/wustl_rts_benchmarks
refs/heads/master
benchmarks/dictionary/deterministicHash-cilkp/runTests.py
98
import subprocess import sys import random import os def onPprocessors(command,p) : if os.environ.has_key("OPENMP"): os.putenv("OMP_NUM_THREADS", "%d" %p) return command elif os.environ.has_key("CILK"): return command + " -cilk_set_worker_count " + `p` elif os.environ.has_key("MKLROOT"): return...
srajag/contrail-controller
refs/heads/master
src/storage/stats-daemon/setup.py
18
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup import setuptools def requirements(filename): with open(filename) as f: lines = f.read().splitlines() return lines setup( name='stats-daemon', version='0.1dev', packages=setuptools.find_pack...
GentlemanBrewing/ADCLibraries-MCP3424
refs/heads/master
DeltaSigmaPi/ABE_helpers.py
7
#!/usr/bin/python3 try: import smbus except ImportError: raise ImportError("python-smbus not found'") import re """ ================================================ ABElectronics Python Helper Functions Version 1.0 Created 29/02/2015 Python 3 only Requires python 3 smbus to be installed. For more information ...
kazitanvirahsan/scrapy
refs/heads/master
scrapy/contrib/downloadermiddleware/cookies.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.downloadermiddleware.cookies` is deprecated, " "use `scrapy.downloadermiddlewares.cookies` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.downloadermiddlewares.cookies...
syphar/django
refs/heads/master
tests/delete_regress/tests.py
173
from __future__ import unicode_literals import datetime from django.db import connection, models, transaction from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ( Award, AwardNote, Book, Child, Eaten, Email, File, Food, FooFile, FooFileProxy, FooImage, FooPhoto, Ho...
thewtex/ITK
refs/heads/master
Utilities/Maintenance/VerifyURLs.py
7
#!/usr/bin/env python from __future__ import print_function import sys import re import httplib import os # compile regular expression to pull out URLs in ITK # The ignored characters an common delineators, and not strick to the standard http_re = re.compile('(http://[^\s<>\{\}\|\]\[\)\("]*)') http_dict = dict() fo...
janebeckman/gpdb
refs/heads/master
src/test/tinc/tinctest/test/test_data_provider.py
12
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
sonnyhu/scikit-learn
refs/heads/master
sklearn/metrics/cluster/bicluster.py
359
from __future__ import division import numpy as np from sklearn.utils.linear_assignment_ import linear_assignment from sklearn.utils.validation import check_consistent_length, check_array __all__ = ["consensus_score"] def _check_rows_and_columns(a, b): """Unpacks the row and column arrays and checks their shap...
xinhunbie/NS3-
refs/heads/master
src/core/test/examples-to-run.py
41
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more i...
GreatFruitOmsk/nativeconfig
refs/heads/master
test/options/test_string_option.py
1
import unittest from nativeconfig import StringOption from test.options import OptionMixin, Option, make_option_type class TestStringOption(unittest.TestCase, OptionMixin): @classmethod def setUpClass(cls): cls.OPTIONS = [ Option( option_type=StringOption, ...
jrialland/python-brain
refs/heads/master
3to2-1.0/lib3to2/tests/test_input.py
1
from test_all_fixers import lib3to2FixerTestCase class Test_input(lib3to2FixerTestCase): fixer = u"input" def test_prefix_preservation(self): b = u"""x = input( )""" a = u"""x = raw_input( )""" self.check(b, a) b = u"""x = input( '' )""" a = u"""x = raw_...
crunchmail/munch-core
refs/heads/master
src/munch/apps/users/admin.py
1
from django.urls import reverse from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.db import transaction from django.utils.translation import ugettext_lazy as _ from munch.apps.domains.admin import SendingDomainInline from .models import MunchUser from .models import Organiza...
TRUFIL/erpnext
refs/heads/develop
erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
34
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate, nowdate from frappe import _ def execute(filters=None): if not filters: filters = {} columns = ...
twidi/django-decorator-include
refs/heads/develop
tests/included.py
2
from django.http import HttpResponse from django.urls import include, path def testify(request): return HttpResponse('testify!') urlpatterns = [ path('included/', include('tests.included2')), path('test/', testify, name='testify'), ]
xianjunzhengbackup/code
refs/heads/master
http/REST/gamesapi/games/apps.py
9
from django.apps import AppConfig class GamesConfig(AppConfig): name = 'games'
saukrIppl/seahub
refs/heads/master
seahub/base/management/__init__.py
12133432
Furzoom/learnpython
refs/heads/master
learnpythonthehardway/ex47/tests/__init__.py
12133432
guiquanz/ssbc
refs/heads/master
web/templatetags/__init__.py
12133432
Katello/katello-cli
refs/heads/master
src/katello/client/api/__init__.py
12133432
geekaia/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/rollback_split_course.py
5
""" Django management command to rollback a migration to split. The way to do this is to delete the course from the split mongo datastore. """ from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore, loc_mapper from xmodule.modulestore.exceptions import ItemN...
AyoubZahid/odoo
refs/heads/9.0
openerp/addons/test_access_rights/__openerp__.py
434
{ 'name': 'test of access rights and rules', 'description': "Testing of access restrictions", 'version': '0.0.1', 'data': ['ir.model.access.csv'], }
yousafsyed/casperjs
refs/heads/master
bin/Lib/test/test_email/test_generator.py
118
import io import textwrap import unittest from email import message_from_string, message_from_bytes from email.generator import Generator, BytesGenerator from email import policy from test.test_email import TestEmailBase, parameterize @parameterize class TestGeneratorBase: policy = policy.default def msgmak...
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/whoosh/qparser/common.py
88
# Copyright 2010 Matt Chaput. 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 conditions and the...
AIML/scikit-learn
refs/heads/master
sklearn/utils/fixes.py
133
"""Compatibility fixes for older version of python, numpy and scipy If you add content to this file, please give the version of the package at which the fixe is no longer needed. """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # ...
Timothee/Passeplat
refs/heads/master
passeplat.py
1
import os from flask import Flask, request, Response import requests from FlaskRequests import RqRequest Flask.request_class = RqRequest app = Flask(__name__) app.config['API_ROOT_URL'] = os.environ.get('API_ROOT_URL') app.config['CORS_DOMAINS'] = os.environ.get('CORS_DOMAINS') app.config['ALLOWED_HTTP_METHODS'] = ['...
jorisvandenbossche/numpy
refs/heads/master
numpy/core/memmap.py
6
from __future__ import division, absolute_import, print_function import numpy as np from .numeric import uint8, ndarray, dtype from numpy.compat import ( long, basestring, os_fspath, contextlib_nullcontext, is_pathlib_path ) from numpy.core.overrides import set_module __all__ = ['memmap'] dtypedescr = dtype vali...
mikesun/xen-cow-checkpointing
refs/heads/master
tools/python/xen/xend/balloon.py
1
#=========================================================================== # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope tha...
jessamynsmith/boards-backend
refs/heads/master
blimp_boards/users/backends.py
2
from django.contrib.auth.backends import ModelBackend from ..utils.validators import is_valid_email from .models import User class EmailBackend(ModelBackend): """ Overwrites the default backend to check for e-mail address """ def authenticate(self, username=None, password=None): """ I...
ClearCorp-dev/odoo-clearcorp
refs/heads/9.0
TODO-8.0/mrp_bom_report/__init__.py
16
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
cleemesser/pyo
refs/heads/master
examples/fft/08_fft_spec.py
12
#! /usr/bin/env python # encoding: utf-8 """ Display the sonogram of a sound using a PyoMatrixObject. A better display can be achieved by using a custom drawing. After the playback ending, call "m.view()" from the interpreter widget of the Server window to show the spectrum. """ from pyo import * s = Server(duplex=...
laperry1/android_external_chromium_org
refs/heads/cm-12.1
tools/deep_memory_profiler/dmprof.py
93
# 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. """The Deep Memory Profiler analyzer script. See http://dev.chromium.org/developers/deep-memory-profiler for details. """ import logging import sys fr...
surajssd/kuma
refs/heads/master
vendor/packages/translate/search/terminology.py
30
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2006-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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; e...
NINAnor/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/ExecuteSQL.py
1
# -*- coding: utf-8 -*- """ *************************************************************************** ExecuteSQL.py -- use virtual layers to execute SQL on any sources --------------------- Date : Jan 2016 Copyright : (C) 2016 by Hugo Mercier Email : hugo...
esatterwhite/django-tastypie
refs/heads/master
tests/core/tests/paginator.py
25
# -*- coding: utf-8 -*- from django.conf import settings from django.test import TestCase from tastypie.exceptions import BadRequest from tastypie.paginator import Paginator from core.models import Note from core.tests.resources import NoteResource from django.db import reset_queries from django.http import QueryDict ...
wemanuel/smry
refs/heads/master
smry/server-auth/ls/google-cloud-sdk/lib/googlecloudapis/bigtableclusteradmin/__init__.py
332
# Copyright 2013 Google Inc. All Rights Reserved. """Package marker file."""
atomia/sample-plugins
refs/heads/master
AutomationServer/Examples/ProvisioningModule/GithubRepo/GitHubRepo/GitHubRepository/dist/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...
thatneat/petl
refs/heads/master
examples/transform/reshape.py
4
from __future__ import absolute_import, print_function, division # melt() ######## import petl as etl table1 = [['id', 'gender', 'age'], [1, 'F', 12], [2, 'M', 17], [3, 'M', 16]] table2 = etl.melt(table1, 'id') table2.lookall() # compound keys are supported table3 = [['id', 'time', 'hei...
BlockchainTechLLC/3dcoin
refs/heads/master
contrib/seeds/makeseeds.py
34
#!/usr/bin/env python # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 400000 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = set([ "130.211.129.106", "178.63.107.226", "83.81.1...
vmware/vapprun
refs/heads/master
setup.py
2
#!/usr/bin/env python from setuptools import setup setup( name="vapprun", version="1.0.2", author="Yann Hodique", author_email="hodiquey@vmware.com", namespace_packages=['vmw'], packages=['vmw', 'vmw.vapprun'], package_data={'vmw.vapprun': ['templates/*']}, scripts=['bin/vapprun'], ...
zasdfgbnm/tensorflow
refs/heads/master
tensorflow/contrib/libsvm/python/kernel_tests/decode_libsvm_op_test.py
27
# Copyright 2017 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...
chromium/chromium
refs/heads/master
tools/perf/benchmarks/press.py
10
# Copyright 2018 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. """Base class for a PressBenchmark. This benchmark manages both PressStory objects that implement javascript based metrics as well as can compute TMBv2 metri...
antont/tundra
refs/heads/tundra2
src/Application/PythonScriptModule/pymodules_old/circuits/web/tools.py
1
# Module: tools # Date: 16th February 2009 # Author: James Mills, prologic at shortcircuit dot net dot au """Tools This module implements tools used throughout circuits.web. These tools can also be used within Controlelrs and request handlers. """ import os import stat import hashlib import mimetypes import ...
Reaktoro/Reaktoro
refs/heads/master
Reaktoro/Equilibrium/EquilibriumProblem-test.py
1
# Reaktoro is a unified framework for modeling chemically reactive systems. # # Copyright (C) 2014-2018 Allan Leal # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 o...
Thoshh/wapad
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/sk/formats.py
504
# -*- 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 = 'G:i' DATET...
pawaranand/phr_frappe
refs/heads/develop
frappe/model/workflow.py
39
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def get_workflow_name(doctype): if getattr(frappe.local, "workflow_names", None) is None: frappe.local.workflow_names = {} if doctype not in frappe.local.wo...
atopuzov/nitro-python
refs/heads/master
nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_filterpolicy_binding.py
3
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
oppo-source/R5-4.4-kernel-source
refs/heads/master
tools/perf/tests/attr.py
3174
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
jfmartinez64/test
refs/heads/master
libs/bs4/__init__.py
417
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
efortuna/AndroidSDKClone
refs/heads/master
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/ctypes/test/test_repr.py
118
from ctypes import * import unittest subclasses = [] for base in [c_byte, c_short, c_int, c_long, c_longlong, c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong, c_float, c_double, c_longdouble, c_bool]: class X(base): pass subclasses.append(X) class X(c_char): pass # This test check...
elvishknight1/Terranova
refs/heads/master
venv/Lib/site-packages/setuptools/tests/test_build_ext.py
151
import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in...
allotria/intellij-community
refs/heads/master
python/testData/refactoring/move/starImportUsage/before/src/a.py
83
from b import * def g(): return f()
ocdocdocd/DupDeleter
refs/heads/master
dhash.py
2
from PIL import Image import logging ####################################################################### # # DHash # # Implements the DHash image comparison algorithm. # # Ryan C Murray # ####################################################################### def loadImg(loc): ''' Loads and returns imag...
dvliman/jaikuengine
refs/heads/master
vendor/gdata/tlslite/Checker.py
359
"""Class for post-handshake certificate checking.""" from utils.cryptomath import hashAndBase64 from X509 import X509 from X509CertChain import X509CertChain from errors import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handshake f...
Jeremy-WEI/python-mode
refs/heads/develop
pymode/libs3/rope/base/default_config.py
48
# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # No...