repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
piquadrat/django
refs/heads/master
django/contrib/gis/db/backends/postgis/introspection.py
42
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.postgresql.introspection import DatabaseIntrospection class GeoIntrospectionError(Exception): pass class PostGISIntrospection(DatabaseIntrospection): # Reverse dictionary for PostGIS geometry types not populated until # introspectio...
zhangyunfeng/.emacs.d
refs/heads/master
elpa/yasnippet-20170326.1030/snippets/rename_add_contr.py
134
#!/usr/bin/env python import os import re from os.path import join from shutil import move def rename(root, f): if f.endswith('.yasnippet'): base, _ = f.split('.') print("move %s to %s" % (join(root, f), join(root, base))) move(join(root, f), join(root, base)) CONT = "# contributor: Andr...
nfvs/flask-login
refs/heads/master
flask_login/utils.py
2
# -*- coding: utf-8 -*- ''' flask_login.utils ----------------- General utilities. ''' import hmac from hashlib import sha512 from functools import wraps from werkzeug.local import LocalProxy from werkzeug.security import safe_str_cmp from werkzeug.urls import url_decode, url_encode from flask import (_r...
dphang/sage
refs/heads/master
dota/parser/__init__.py
12133432
seem-sky/FrameworkBenchmarks
refs/heads/master
php-fuel/__init__.py
12133432
CodeWingX/yowsup
refs/heads/master
yowsup/layers/protocol_media/protocolentities/test_message_media.py
69
from yowsup.layers.protocol_media.protocolentities.message_media import MediaMessageProtocolEntity from yowsup.layers.protocol_messages.protocolentities.test_message import MessageProtocolEntityTest from yowsup.structs import ProtocolTreeNode class MediaMessageProtocolEntityTest(MessageProtocolEntityTest): def set...
benthomasson/ansible
refs/heads/devel
test/units/modules/network/aruba/aruba_module.py
42
# (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...
wezhang/vim-setup
refs/heads/master
bundle/python-mode/pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/format.py
17
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # # 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 progr...
tiagocoutinho/bliss
refs/heads/master
scripts/TestBench.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. # Distributed under the GNU LGPLv3. See LICENSE.txt for more info. # Simple python script to test bliss and beacon #...
liamgh/liamgreenhughes-sl4a-tf101
refs/heads/master
python/src/Demo/parser/test_parser.py
41
#! /usr/bin/env python # (Force the script to use the latest build.) # # test_parser.py import parser, traceback _numFailed = 0 def testChunk(t, fileName): global _numFailed print '----', fileName, try: ast = parser.suite(t) tup = parser.ast2tuple(ast) # this discards the first ...
XiaosongWei/crosswalk-test-suite
refs/heads/master
misc/sampleapp-android-tests/sampleapp/spacedodgegame_stop.py
3
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
mihaip/readerisdead
refs/heads/master
third_party/web/test.py
118
"""test utilities (part of web.py) """ import unittest import sys, os import web TestCase = unittest.TestCase TestSuite = unittest.TestSuite def load_modules(names): return [__import__(name, None, None, "x") for name in names] def module_suite(module, classnames=None): """Makes a suite from a module.""" ...
kinsamanka/machinekit
refs/heads/master
lib/python/machinekit/launcher.py
10
import os import sys from time import * import subprocess import signal from machinekit import compat _processes = [] _realtimeStarted = False _exiting = False # ends a running Machinekit session def end_session(): stop_processes() if _realtimeStarted: # Stop realtime only when explicitely started s...
victorywang80/Maintenance
refs/heads/master
saltstack/src/salt/modules/ebuild.py
1
# -*- coding: utf-8 -*- ''' Support for Portage :optdepends: - portage Python adapter For now all package names *MUST* include the package category, i.e. ``'vim'`` will not work, ``'app-editors/vim'`` will. ''' # Import python libs import copy import logging import re # Import salt libs import salt.utils # Impo...
vishdha/erpnext
refs/heads/develop
erpnext/support/doctype/warranty_claim/test_warranty_claim.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest test_records = frappe.get_test_records('Warranty Claim') class TestWarrantyClaim(unittest.TestCase): pass
pkimber/old_story
refs/heads/master
story/models.py
1
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models import reversion from base.model_utils import TimeStampedModel from moderate.models import ModerateModel class Area(models.Model): name = models.CharField(max_length=100) slug = models.SlugField(max_le...
HPPTECH/hpp_IOSTressTest
refs/heads/master
Refer/IOST_OLD_SRC/IOST_0.17/Libs/IOST_AboutDialog.py
2
#!/usr/bin/python #====================================================================== # # Project : hpp_IOStressTest # File : IOST_AboutDialog.py # Date : Sep 21, 2016 # Author : HuuHoang Nguyen # Contact : hhnguyen@apm.com # : hoangnh.hpp@gmail.com # License : MIT License # Copyright : 2016 ...
molmod/yaff
refs/heads/master
yaff/pes/test/test_scaling.py
1
# -*- coding: utf-8 -*- # YAFF is yet another force-field code. # Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>, # Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling # (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise # stated. # # This file is pa...
Proggie02/TestRepo
refs/heads/master
django/contrib/sites/models.py
103
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible SITE_CACHE = {} class SiteManager(models.Manager): def get_current(self): """ Returns the current ``Site`` based on the SITE_ID in the proje...
jspargo/AneMo
refs/heads/master
django/lib/python2.7/site-packages/django/contrib/gis/geoip/base.py
68
import os import re from ctypes import c_char_p from django.core.validators import ipv4_re from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIP_open, GeoIP_delete, GeoIP_database_info, GeoIP_lib_version, GeoIP_record_by_addr, GeoIP_record_by_name,...
aaltinisik/OCBAltinkaya
refs/heads/8.0
addons/portal_project_issue/__init__.py
493
# -*- 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...
acsone/multi-company
refs/heads/8.0
product_multi_company/models/__init__.py
2
# -*- coding: utf-8 -*- # (c) 2015 Serv. Tecnol. Avanzados - Pedro M. Baeza # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import product_template
saurabh6790/aimobilize-app-backup
refs/heads/master
stock/report/serial_no_service_contract_expiry/__init__.py
12133432
PopCap/GameIdea
refs/heads/master
Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pythonwin/pywin/mfc/__init__.py
12133432
ydaniv/django-currencies
refs/heads/master
currencies/tests/__init__.py
12133432
drmrd/ansible
refs/heads/devel
lib/ansible/modules/monitoring/logstash_plugin.py
30
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Loic Blot <loic.blot@unix-experience.fr> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1....
neumerance/cloudloon2
refs/heads/master
.venv/lib/python2.7/site-packages/django/contrib/sessions/backends/cached_db.py
102
""" Cached, database-backed sessions. """ from django.contrib.sessions.backends.db import SessionStore as DBStore from django.core.cache import cache from django.core.exceptions import SuspiciousOperation from django.utils import timezone KEY_PREFIX = "django.contrib.sessions.cached_db" class SessionStore(DBStore):...
40223247/2015cd_midterm-master
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/draw.py
603
from javascript import console from browser import timer import math class Queue: def __init__(self): self._list=[] def empty(self): return len(self._list) == 0 def put(self, element): self._list.append(element) def get(self): if len(self._list) == 0: raise BaseError ...
MeteorAdminz/viper
refs/heads/master
viper/modules/rats/smallnet.py
12
# Originally written by Kevin Breen (@KevTheHermit): # https://github.com/kevthehermit/RATDecoders/blob/master/SmallNet.py def ver_52(data): config_dict = {} config_parts = data.split('!!<3SAFIA<3!!') config_dict['Domain'] = config_parts[1] config_dict['Port'] = config_parts[2] config_dict['Disbale...
wangjun/FileBackup
refs/heads/master
config/base.py
2
#coding:UTF-8 """ 基本配置 """ backup_paths=[ {'path':'/home/yubang/tmp/backup123','name':'back1_'} ]
Universal-Model-Converter/UMC3.0a
refs/heads/master
data/Python/x86/Lib/test/test_grp.py
39
"""Test script for the grp module.""" import unittest from test import test_support grp = test_support.import_module('grp') class GroupDatabaseTestCase(unittest.TestCase): def check_value(self, value): # check that a grp tuple has the entries and # attributes promised by the docs self.as...
spool/django-allauth
refs/heads/master
allauth/socialaccount/providers/hubic/views.py
10
import requests from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import HubicProvider class HubicOAuth2Adapter(OAuth2Adapter): provider_id = HubicProvider.id access_token_url = 'https://api.hubic.com/oauth/token' ...
longman694/youtube-dl
refs/heads/mod
youtube_dl/extractor/toutv.py
8
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, js_to_json, urlencode_postdata, extract_attributes, smuggle_url, ) class TouTvIE(InfoExtractor): _NETRC_MACHINE = 'toutv' IE_NAME = 'tou.tv' _VALID_URL = r'http...
googleapis/googleapis-gen
refs/heads/master
google/cloud/recommendationengine/v1beta1/recommendationengine-v1beta1-py/google/cloud/recommendationengine_v1beta1/services/prediction_api_key_registry/pagers.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...
davidyezsetz/kuma
refs/heads/master
vendor/packages/pylint/test/input/func_return_yield_mix.py
6
"""pylint should detect yield and return mix inside genrators""" __revision__ = None def somegen(): """this is a bad generator""" if True: return 1 else: yield 2
MycChiu/tensorflow
refs/heads/master
tensorflow/python/saved_model/loader_impl.py
29
# 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...
sss/calibre-at-bzr
refs/heads/upstream/master
src/calibre/utils/filenames.py
2
''' Make strings safe for use as ASCII filenames, while trying to preserve as much meaning as possible. ''' import os, errno from math import ceil from calibre import sanitize_file_name, isbytestring, force_unicode from calibre.constants import (preferred_encoding, iswindows, filesystem_encoding) from calibre...
abhilashnta/edx-platform
refs/heads/master
cms/djangoapps/contentstore/features/help.py
90
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument from nose.tools import assert_false # pylint: disable=no-name-in-module from lettuce import step, world @step(u'I should see online help for "([^"]*)"$') def see_online_help_for(step, page_name): # make ...
rrrichter/bateuabad
refs/heads/master
bateuabad/settings.py
1
""" Django settings for bateuabad project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
suncycheng/intellij-community
refs/heads/master
python/testData/hierarchy/call/Static/OverriddenMethod/main.py
80
from file_1 import A class B(A): def target_func(self, p): p.another_func() class C(object): def func1(self, a): a.target_func(A()) def func2(self): a = A() b = B() a.target_func(b) def bar1(a): a.target_func(a) def bar2(a, b): atf, btf = a.target_fun...
cberry777/dd-agent
refs/heads/master
checks.d/hdfs_namenode.py
11
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) ''' HDFS NameNode Metrics --------------------- hdfs.namenode.capacity_total Total disk capacity in bytes hdfs.namenode.capacity_used Disk usage in bytes hdfs.namenode.capac...
leaflabs/leafysd
refs/heads/master
test/test_acquire.py
1
"""Tests acquisition: ACQUIRE to disk, sleep, stop, send and check samples.""" from __future__ import print_function import unittest import shutil import sys import tempfile import time import os import test_helpers from daemon_control import * SLEEP_TIME_SEC = 60. * 0.2 class TestAcquire(test_helpers.DaemonTest):...
gerco/duplicati
refs/heads/master
thirdparty/rumps/rumps.py
6
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rumps: Ridiculously Uncomplicated Mac os x Python Statusbar apps. # Copyright: (c) 2015, Jared Suttles. All rights reserved. # License: BSD, see LICENSE for details. # # This file is a join of the rumps.py and utils.py source from: # https://github.com/jaredks/rumps/com...
vsocrates/mhealth-grabapp
refs/heads/master
Lab3/randomizer.py
1
from random import shuffle x = [i for i in range(10928)] shuffle(x) with open("orderpy.random", "w") as f: for num in x: f.write("%d\n" % num)
leighpauls/k2cro4
refs/heads/master
third_party/trace-viewer/third_party/closure_linter/closure_linter/common/tokens_test.py
126
#!/usr/bin/env python # Copyright 2011 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 # #...
ygrass/handsome
refs/heads/master
handsome/clean_media_temp.py
1
# -*- coding: utf-8 -*- # remove all files of an expired modification date = mtime # you could also use creation date (ctime) or last access date (atime) # os.stat(filename) returns (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) import glob import os import time from datetime import datetime, timedelta ...
sainathadapa/i3-project-focus-workflow
refs/heads/master
switch_to_next_project.py
1
# -*- coding: utf-8 -*- import subprocess import json import sys import necessaryFuncs as nf proc_out = subprocess.run(['i3-msg', '-t', 'get_workspaces'], stdout=subprocess.PIPE) wkList = json.loads(proc_out.stdout.decode('utf-8')) focWkName = nf.getFocusedWK(wkList) allProjectNames = nf.getListOfProjects(wkList) if...
bringsvor/account-financial-tools
refs/heads/8.0
account_credit_control/scenarios/features/steps/account_credit_control.py
40
# -*- coding: utf-8 -*- # flake8: noqa import time from behave import given, when from support import model, assert_equal @given(u'I configure the following accounts on the credit control policy with oid: "{policy_oid}"') def impl(ctx, policy_oid): policy = model('credit.control.policy').get(policy_oid) assert...
spektom/incubator-airflow
refs/heads/master
airflow/models/base.py
4
# # 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...
mchaparro/Skeleton-Django1.6-Bootstrap-3.0
refs/heads/master
skeleton/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Usuario' db.create_table(u'skeleton_usuario', ( (u'id', self.gf('django.db.model...
drexly/tonginBlobStore
refs/heads/master
lib/django/views/generic/list.py
471
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.paginator import InvalidPage, Paginator from django.db.models.query import QuerySet from django.http import Http404 from django.utils import six from django.utils.translation import ugettext as _ from djang...
SucharithaPrabhakar/leosatellite
refs/heads/master
examples/tutorial/first.py
102
# /* # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the ...
massot/odoo
refs/heads/8.0
addons/account/wizard/account_reconcile.py
226
# -*- 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...
movermeyer/namebench
refs/heads/master
nb_third_party/dns/name.py
228
# Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 ...
cherryleer/storm
refs/heads/moved-to-apache
storm-core/src/py/storm/DistributedRPC.py
37
# # Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.pro...
colinnewell/odoo
refs/heads/8.0
openerp/addons/base/report/preview_report.py
447
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of...
vanda/DigitalLabels
refs/heads/master
labels/models.py
1
import logging import os import urllib2 import httplib from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.utils import simplejson from django.utils.html import strip_tags from django.utils.safestring import mark_safe from sorl.thumbnail import ImageFie...
wang1986one/SPlayer
refs/heads/master
Thirdparty/jsoncpp/test/generate_expected.py
257
import glob import os.path for path in glob.glob( '*.json' ): text = file(path,'rt').read() target = os.path.splitext(path)[0] + '.expected' if os.path.exists( target ): print 'skipping:', target else: print 'creating:', target file(target,'wt').write(text)
laurent-george/weboob
refs/heads/master
modules/citibank/__init__.py
7
# -*- coding: utf-8 -*- # Copyright(C) 2014 Oleg Plakhotniuk # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at y...
bobcyw/django
refs/heads/master
tests/validation/test_picklable.py
576
import pickle from unittest import TestCase from django.core.exceptions import ValidationError class PickableValidationErrorTestCase(TestCase): def test_validationerror_is_picklable(self): original = ValidationError('a', code='something') unpickled = pickle.loads(pickle.dumps(original)) ...
tareqak/tareq-lisp
refs/heads/master
chapters/.ycm_extra_conf.py
2
# Generated by YCM Generator at 2015-10-30 02:12:26.660952 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publis...
Denisolt/Tensorflow_Chat_Bot
refs/heads/master
local/lib/python2.7/site-packages/scipy/__config__.py
3
# This file is generated by /private/var/folders/gw/_2jq29095y7b__wtby9dg_5h0000gn/T/pip-WgBZjV-build/-c # It contains system_info results at the time of building this package. __all__ = ["get_info","show"] lapack_opt_info={'extra_link_args': ['-Wl,-framework', '-Wl,Accelerate'], 'define_macros': [('NO_ATLAS_INFO', 3)...
ncdesouza/bookworm
refs/heads/master
env/lib/python2.7/site-packages/wtforms/compat.py
96
import sys if sys.version_info[0] >= 3: text_type = str string_types = (str, ) iteritems = lambda o: o.items() itervalues = lambda o: o.values() izip = zip else: text_type = unicode string_types = (basestring, ) iteritems = lambda o: o.iteritems() itervalues = lambda o: o.itervalue...
OpenAcademy-OpenStack/nova-scheduler
refs/heads/master
nova/tests/virt/baremetal/db/base.py
53
# Copyright (c) 2012 NTT DOCOMO, 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.0 # # Unless requ...
iyedb/py3_fn_pipeline
refs/heads/master
pipes3.py
1
from __future__ import print_function class PipelineException(Exception): def __init__(self, stage, e): self.stage = stage self.e = e def __str__(self): return repr('Pipeline failed at stage \'%s\' with exception: %s' % (getattr(self.stage, '__name__'), self.e)) c...
Pakketeretet2/lammps
refs/heads/master
tools/i-pi/ipi/inputs/outputs.py
41
"""Deals with creating the output objects. Copyright (C) 2013, Joshua More and Michele Ceriotti 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) a...
angelapper/edx-platform
refs/heads/master
common/lib/calc/setup.py
19
from setuptools import setup setup( name="calc", version="0.2", packages=["calc"], install_requires=[ "pyparsing==2.0.7", "numpy==1.6.2", "scipy==0.14.0", ], )
fernandoacorreia/DjangoWAWSLogging
refs/heads/master
DjangoWAWSLogging/env/Lib/site-packages/pywin32-218-py2.7-win32.egg/win32comext/axdebug/documents.py
18
""" Management of documents for AXDebugging. """ import axdebug, gateways import pythoncom from util import _wrap, _wrap_remove, RaiseNotImpl, trace from win32com.server.util import unwrap import codecontainer import contexts from win32com.server.exception import Exception import win32api, winerror, os, string, sys #...
ttfseiko/openerp-trunk
refs/heads/master
openerp/addons/website_google_map/__openerp__.py
37
{ 'name': 'Website Google Map', 'category': 'Hidden', 'summary': '', 'version': '1.0', 'description': """ OpenERP Website Google Map ======================== """, 'author': 'OpenERP SA', 'depends': ['base_geolocalize', 'website_partner', 'crm_partner_assign'], 'data': [ ...
FlaPer87/django-nonrel
refs/heads/master
django/http/utils.py
145
""" Functions that modify an HTTP request or response in some way. """ # This group of functions are run as part of the response handling, after # everything else, including all response middleware. Think of them as # "compulsory response middleware". Be careful about what goes here, because # it's a little fiddly to ...
mattesCZ/mtbmap
refs/heads/master
osm_data_processing/relations2lines/lineelement.py
1
# -*- coding: utf-8 -*- from .osmcsymbol import OsmcSymbol # lower index means higher priority: iwn > nwn networkOrder = ['iwn', 'nwn', 'rwn', 'lwn'] class LineElement: def __init__(self, relation): self.osmcSymbol = relation.osmcSymbol self.network = relation.network def __eq__(self, other...
idjaw/netman
refs/heads/master
tests/adapters/compliance_tests/get_interface_test.py
1
# Copyright 2016 Internap. # # 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, so...
yitian134/chromium
refs/heads/master
third_party/tlslite/tlslite/HandshakeSettings.py
359
"""Class for setting handshake parameters.""" from constants import CertificateType from utils import cryptomath from utils import cipherfactory class HandshakeSettings: """This class encapsulates various parameters that can be used with a TLS handshake. @sort: minKeySize, maxKeySize, cipherNames, certifi...
autokey-py3/autokey
refs/heads/master
test/configurationmanagertest.py
53
import unittest import lib.configurationmanager as conf from lib.phrase import * CONFIG_FILE = "../../config/abbr.ini" class LegacyImporterTest(unittest.TestCase): def setUp(self): self.importer = conf.LegacyImporter() self.importer.load_config(CONFIG_FILE) def testGlobalSetting...
afronski/grammar-generator
refs/heads/master
grammar-generator/Environment/__init__.py
12133432
lmorchard/django
refs/heads/master
django/contrib/sitemaps/management/commands/__init__.py
12133432
gengue/django
refs/heads/master
tests/proxy_models/__init__.py
12133432
nburn42/tensorflow
refs/heads/master
tensorflow/python/keras/initializers_test.py
1
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
megaumi/django
refs/heads/master
tests/middleware/cond_get_urls.py
499
from django.conf.urls import url from django.http import HttpResponse urlpatterns = [ url(r'^$', lambda request: HttpResponse('root is here')), ]
r0balo/pelisalacarta
refs/heads/develop
python/main-classic/channels/unsoloclic.py
2
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para unsoloclic # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import urlparse from core import config from core ...
artwr/airflow
refs/heads/master
tests/contrib/operators/test_file_to_gcs.py
6
# -*- coding: utf-8 -*- # # 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 #...
PhilLidar-DAD/geonode
refs/heads/master
announcements/signals.py
10
import django.dispatch announcement_created = django.dispatch.Signal(providing_args=["announcement", "request"]) announcement_updated = django.dispatch.Signal(providing_args=["announcement", "request"]) announcement_deleted = django.dispatch.Signal(providing_args=["announcement", "request"])
huanpc/IoT-1
refs/heads/master
gui/controller/.venv/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/misc.py
1428
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Backports for individual classes and functions.""" import os import sys __all__ = ['cache_from_source', 'callable', 'fsencode'] try: from imp import cache_from_source except ImportError: ...
Dino0631/RedRain-Bot
refs/heads/develop
cogs/lib/aiohttp/client_reqrep.py
17
import asyncio import collections import http.cookies import io import json import mimetypes import os import sys import traceback import urllib.parse import warnings from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy import aiohttp from . import hdrs, helpers, streams from .helpers impor...
gkawamoto/yowsup
refs/heads/master
yowsup/layers/protocol_contacts/protocolentities/test_notification_contact_update.py
68
from yowsup.layers.protocol_contacts.protocolentities import UpdateContactNotificationProtocolEntity from yowsup.structs.protocolentity import ProtocolEntityTest import time import unittest entity = UpdateContactNotificationProtocolEntity("1234", "jid@s.whatsapp.net", i...
edx/lettuce
refs/heads/master
tests/integration/django/celeries/terrain.py
18
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
camilonos77/bootstrap-form-python-generator
refs/heads/master
enviroment/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py
327
# urllib3/_collections.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from collections import Mapping, MutableMapping try: from threading import RLock excep...
eneldoserrata/marcos_openerp
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...
thatchristoph/namebench
refs/heads/master
nb_third_party/dns/rdtypes/keybase.py
248
# Copyright (C) 2004-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 ...
Javex/mixminion
refs/heads/master
lib/mixminion/server/PacketHandler.py
5
# Copyright 2002-2011 Nick Mathewson. See LICENSE for licensing information. """mixminion.server.PacketHandler: Code to process mixminion packets""" import binascii import threading import types from mixminion.Common import encodeBase64, formatBase64, LOG import mixminion.Crypto as Crypto import mixminion.Packet as...
bob-white/UnityIronPythonConsole
refs/heads/master
Assets/IronPythonConsole/Plugins/Lib/smtplib.py
74
#! /usr/bin/env python '''SMTP/ESMTP client class. This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP Authentication) and RFC 2487 (Secure SMTP over TLS). Notes: Please remember, when doing ESMTP, that the names of the SMTP service extensions are NOT the same thing as the option keywords for the RC...
jamespcole/home-assistant
refs/heads/master
tests/components/mqtt/test_vacuum.py
4
"""The tests for the Mqtt vacuum platform.""" import json import pytest from homeassistant.components import mqtt, vacuum from homeassistant.components.mqtt import ( CONF_COMMAND_TOPIC, vacuum as mqttvacuum) from homeassistant.components.mqtt.discovery import async_start from homeassistant.components.vacuum impor...
mricharleon/UnitedSociety
refs/heads/master
apps/society/tests.py
24123
from django.test import TestCase # Create your tests here.
socialsweethearts/django-allauth
refs/heads/master
allauth/socialaccount/providers/hubic/urls.py
69
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from .provider import HubicProvider urlpatterns = default_urlpatterns(HubicProvider)
pmghalvorsen/gramps_branch
refs/heads/master
gramps/gui/filters/sidebar/_mediasidebarfilter.py
1
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2010 Nick Hall # # 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 v...
girving/tensorflow
refs/heads/master
tensorflow/python/debug/cli/curses_widgets.py
156
# 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...
fsherratt/custom_pixhawk
refs/heads/Drag_Hack
Tools/LogAnalyzer/tests/TestThrust.py
261
from LogAnalyzer import Test,TestResult import DataflashLog class TestThrust(Test): '''test for sufficient thrust (copter only for now)''' def __init__(self): Test.__init__(self) self.name = "Thrust" def run(self, logdata, verbose): self.result = TestResult() self...
Gateworks/platform-external-chromium_org
refs/heads/imx_kk4.4.3_2.0.0-beta
tools/telemetry/telemetry/page/page_measurement.py
24
# 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. from telemetry.page import page_test class MeasurementFailure(page_test.Failure): """Exception that can be thrown from MeasurePage to indicate an und...
cl4rke/scikit-learn
refs/heads/master
examples/model_selection/plot_train_error_vs_test_error.py
349
""" ========================= Train error vs Test error ========================= Illustration of how the performance of an estimator on unseen data (test data) is not the same as the performance on training data. As the regularization increases the performance on train decreases while the performance on test is optim...
csherwood-usgs/landlab
refs/heads/master
landlab/grid/tests/test_raster_funcs/test_gradients_across_adjacent_max.py
6
import numpy as np from numpy.testing import assert_array_equal from nose import with_setup try: from nose.tools import assert_is except ImportError: from landlab.testing.tools import assert_is from nose.tools import assert_equal from landlab.grid.raster_steepest_descent import ( _calc_steepest_descent_acr...