repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Conjuror/fxos-certsuite
refs/heads/master
mcts/web-platform-tests/tests/websockets/handlers/echo-query_wsh.py
266
#!/usr/bin/python from mod_pywebsocket import msgutil, util def web_socket_do_extra_handshake(request): pass # Always accept. def web_socket_transfer_data(request): msgutil.send_message(request, request.unparsed_uri.split('?', 1)[1] or '')
sdague/home-assistant
refs/heads/dev
homeassistant/components/atag/climate.py
16
"""Initialization of ATAG One climate platform.""" from typing import List, Optional from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, HVAC_MODE_AUTO, HVAC_MODE_HEAT, PRESET_AWAY, PRESET_BOOST, ...
mdj2/django
refs/heads/master
django/contrib/contenttypes/models.py
114
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_text, force_text from django.utils.encoding import python_2_unicode_compatible class ContentTypeManager(models.Manager): # Cache to avoid re-looking up ContentType objects all over the plac...
jaloren/robotframework
refs/heads/master
src/robot/output/console/verbose.py
6
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
cytec/SickRage
refs/heads/master
lib/unidecode/x0c8.py
253
data = ( 'jeo', # 0x00 'jeog', # 0x01 'jeogg', # 0x02 'jeogs', # 0x03 'jeon', # 0x04 'jeonj', # 0x05 'jeonh', # 0x06 'jeod', # 0x07 'jeol', # 0x08 'jeolg', # 0x09 'jeolm', # 0x0a 'jeolb', # 0x0b 'jeols', # 0x0c 'jeolt', # 0x0d 'jeolp', # 0x0e 'jeolh', # 0x0f 'jeom', # ...
richard-willowit/odoo
refs/heads/master
addons/l10n_es/__init__.py
2456
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details.
erickt/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/staticfiles/views.py
105
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.six....
louyihua/edx-platform
refs/heads/master
common/djangoapps/util/tests/test_keyword_sub_utils.py
27
""" Tests for keyword_substitution.py """ from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from ddt import ddt, file_data from mock import patch from util.date_utils import get_default_...
JohnnySun/RaspberryPi_Lnux_Kernel_JohnnySun_Multiboot
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
nics21212/android_kernel_samsung_msm8660-common
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
wolfe-pack/moro
refs/heads/master
public/javascripts/brat/server/src/predict.py
2
#!/usr/bin/env python # -*- Mode: Python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*- # vim:set ft=python ts=4 sw=4 sts=4 autoindent: ''' Prediction for annotation types. Author: Pontus Stenetorp <pontus is s u-tokyo ac jp> Author: Sampo Pyysalo <smp is s u-tokyo ac jp> Version: 2011-1...
vipins/ccccms
refs/heads/master
env/Lib/site-packages/django/core/management/validation.py
79
import sys from django.core.management.color import color_style from django.utils.itercompat import is_iterable class ModelErrorCollection: def __init__(self, outfile=sys.stdout): self.errors = [] self.outfile = outfile self.style = color_style() def add(self, context, error): ...
sahildua2305/eden
refs/heads/master
private/templates/EUROSHA/controllers.py
2
# -*- coding: utf-8 -*- from os import path from gluon import * from gluon.storage import Storage from s3 import * # ============================================================================= class index(): """ Custom Home Page """ def __call__(self): request = current.request response =...
digimarc/django
refs/heads/master
tests/admin_docs/views.py
431
from django.contrib.admindocs.middleware import XViewMiddleware from django.http import HttpResponse from django.utils.decorators import decorator_from_middleware from django.views.generic import View xview_dec = decorator_from_middleware(XViewMiddleware) def xview(request): return HttpResponse() class XViewCl...
Batterfii/django
refs/heads/master
tests/introspection/tests.py
108
from __future__ import unicode_literals from unittest import skipUnless from django.db import connection from django.db.utils import DatabaseError from django.test import TransactionTestCase, mock, skipUnlessDBFeature from .models import Article, Reporter class IntrospectionTests(TransactionTestCase): availab...
mganeva/mantid
refs/heads/master
qt/applications/workbench/workbench/app/windowfinder.py
1
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, div...
RyanSchuster/vos64
refs/heads/master
tools/codemap.py
1
#!/usr/bin/env python3 import scanner # ------------------------------------------------------------------------------ # Classes for holding source code entities class Module(object): def __init__(self): self.brief = '' self.detail = '' self.functions = set() self.calls = set() class Function(object): ...
yl565/statsmodels
refs/heads/master
statsmodels/sandbox/tools/tools_pca.py
39
# -*- coding: utf-8 -*- """Principal Component Analysis Created on Tue Sep 29 20:11:23 2009 Author: josef-pktd TODO : add class for better reuse of results """ import numpy as np def pca(data, keepdim=0, normalize=0, demean=True): '''principal components with eigenvector decomposition similar to princomp ...
wtsi-hgi/python-json
refs/heads/master
hgijson/json_converters/models.py
1
from json import JSONDecoder, JSONEncoder from typing import Callable, Any, Dict, Union, Iterable from hgijson.json_converters._converters import json_decoder_to_deserializer, json_encoder_to_serializer from hgijson.serialization import PropertyMapping class JsonPropertyMapping(PropertyMapping): """ Model of...
sanjaymandadi/mozu-python-sdk
refs/heads/master
mozurestsdk/commerce/catalog/admin/product.py
1
""" This code was generated by Codezu. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. """ from mozurestsdk.mozuclient import default as default_client from mozurestsdk.mozuurl import MozuUrl; from mozurestsdk.urllocation import UrlLocation from mozure...
SoftwareMaven/django
refs/heads/master
django/core/files/images.py
429
""" Utility functions for handling images. Requires Pillow as you might imagine. """ import struct import zlib from django.core.files import File class ImageFile(File): """ A mixin for use alongside django.core.files.base.File, which provides additional features for dealing with images. """ def ...
chrismbarnes/ndnSIM
refs/heads/ndnSIM-v1
src/flow-monitor/bindings/callbacks_list.py
772
callback_classes = [ ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/django-1.2/django/bin/profiling/gather_profile_stats.py
330
#!/usr/bin/env python """ gather_profile_stats.py /path/to/dir/of/profiles Note that the aggregated profiles must be read with pstats.Stats, not hotshot.stats (the formats are incompatible) """ from hotshot import stats import pstats import sys, os def gather_stats(p): profiles = {} for f in os.listdir(p): ...
bsipocz/astropy
refs/heads/hacking
astropy/utils/xml/iterparser.py
7
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module includes a fast iterator-based XML parser. """ # STDLIB import contextlib import io import sys # ASTROPY from astropy.utils import data __all__ = ['get_xml_iterator', 'get_xml_encoding', 'xml_readlines'] @contextlib.contextmanager def...
adblockplus/gyp
refs/heads/master
test/mac/gyptest-framework-dirs.py
342
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify that it is possible to build an object that depends on a PrivateFramework. """ import os import sys import TestGyp if sys.platf...
Zanzibar82/pelisalacarta
refs/heads/master
python/main-classic/lib/mechanize/_clientcookie.py
133
"""HTTP cookie handling for web clients. This module originally developed from my port of Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly from Pyt...
chirilo/mozillians
refs/heads/master
vendor-local/lib/python/tablib/packages/openpyxl3/reader/excel.py
47
# file openpyxl/reader/excel.py # Copyright (c) 2010 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, m...
sauloal/cnidaria
refs/heads/master
scripts/venv/lib/python2.7/site-packages/cogent/app/clearcut.py
1
#!/usr/bin/env python """Provides an application controller for the commandline version of: Clearcut v1.0.8 """ from cogent.app.parameters import FlagParameter, ValuedParameter, \ MixedParameter from cogent.app.util import CommandLineApplication, ResultPath, get_tmp_filename from cogent.core.alignment import Sequen...
hyperboria/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/win/gyptest-link-target-machine.py
239
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure TargetMachine setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.Tes...
morreene/tradenews
refs/heads/master
venv/Lib/site-packages/flask_cache/__init__.py
7
# -*- coding: utf-8 -*- """ flask.ext.cache ~~~~~~~~~~~~~~ Adds cache support to your application. :copyright: (c) 2010 by Thadeus Burgess. :license: BSD, see LICENSE for more details """ __version__ = '0.13.1' __versionfull__ = __version__ import base64 import functools import hashlib import in...
yangbh/Hammer
refs/heads/master
plugins/Sensitive_Info/probefile.py
3
#!/usr/bin/python2.7 #coding:utf-8 import os import urllib2 import socket import threading from concurrent import futures import requests from urlparse import urlparse from dummy import * info = { 'NAME':'Probe File Discover', 'AUTHOR':'yangbh', 'TIME':'20140716', 'WEB':'', 'DESCRIPTION':'Tries to find sensitiv...
tchellomello/home-assistant
refs/heads/dev
homeassistant/components/homematic/binary_sensor.py
7
"""Support for HomeMatic binary sensors.""" import logging from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_MOTION, DEVICE_CLASS_OPENING, DEVICE_CLASS_PRESENCE, DEVICE_CLASS_SMOKE, BinarySensorEntity, ) from .const import ATTR_DISCOVER_DEVICES, ATTR_DISCO...
peap/eapconfig
refs/heads/master
scripts/random_words.py
1
#!/usr/bin/env python from random import choice import sys WORDS_FILE = '/usr/share/dict/words' if sys.version_info >= (2, 7): def _get_args(): from argparse import ArgumentParser parser = ArgumentParser(description='Get random words.') parser.add_argument( '-n', d...
xantage/code
refs/heads/master
vilya/views/api/v1/organizations/__init__.py
4
# -*- coding: utf-8 -*- from __future__ import absolute_import from quixote.errors import TraversalError, AccessError from vilya.models.project import Project from vilya.views.api import errors from vilya.views.api.utils import RestAPIUI from vilya.views.api.v1.projects import ProjectUI _q_exports = [] def __call__...
weety/rt-thread
refs/heads/master
tools/vsc.py
13
# # File : vsc.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team # # 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 ...
cchanrhiza/python-pptx
refs/heads/master
tests/oxml/test_ns.py
5
# encoding: utf-8 """ Test suite for pptx.oxml.ns.py module. """ from __future__ import print_function, unicode_literals import pytest from pptx.oxml.ns import NamespacePrefixedTag, namespaces, nsdecls, nsuri, qn class DescribeNamespacePrefixedTag(object): def it_behaves_like_a_string_when_you_want_it_to(sel...
EricssonResearch/scott-eu
refs/heads/master
simulation-ros/src/turtlebot2i/turtlebot2i_msdn/msdn/faster_rcnn/rpn_msr/generate.py
6
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import numpy as np import cv2 import matplotlib.pyplot as plt from ....
micmord/avcpxml2csv
refs/heads/master
avcpxml2csv.py
1
#!/bin/python # avcpxml2csv 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. # # avcpxml2csv is distributed in the hope that it will b...
nfqsolutions/pylm
refs/heads/master
pylm/__init__.py
1
# Pylm, a framework to build components for high performance distributed # applications. Copyright (C) 2016 NFQ Solutions # # This program 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 ...
inteligencia-coletiva-lsd/pybossa
refs/heads/master
test/test_uploader/test_rackspace_uploader.py
4
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2014 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
mixja/eap-sim-lab
refs/heads/master
lib/pyscard-1.6.16/smartcard/wx/SimpleSCardAppEventObserver.py
4
"""Smartcard event observer. __author__ = "gemalto http://www.gemalto.com" Copyright 2001-2012 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public L...
wolfram74/numerical_methods_iserles_notes
refs/heads/master
venv/lib/python2.7/site-packages/pygments/lexers/pawn.py
75
# -*- coding: utf-8 -*- """ pygments.lexers.pawn ~~~~~~~~~~~~~~~~~~~~ Lexers for the Pawn languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer from pygments.token import Text, Comment, Opera...
sodafree/backend
refs/heads/master
build/ipython/IPython/testing/tests/__init__.py
45
# encoding: utf-8 __docformat__ = "restructuredtext en" #------------------------------------------------------------------------------- # Copyright (C) 2005 Fernando Perez <fperez@colorado.edu> # Brian E Granger <ellisonbg@gmail.com> # Benjamin Ragan-Kelley <b...
hyzhak/bot-story
refs/heads/develop
botstory/di/injector_service.py
2
import logging import inspect from . import parser logger = logging.getLogger(__name__) class Scope: def __init__(self, name, parent=None): self.storage = {} # instances that will auto update on each new instance come self.auto_bind_list = [] # description of classes self...
grahamhayes/designate
refs/heads/master
designate/tests/test_api/test_service.py
9
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
Antiun/hr
refs/heads/8.0
hr_expense_account_period/models/hr_expense.py
22
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of hr_expense_account_period, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # hr_expense_account_period is free software: # you can redistribute...
mahak/packstack
refs/heads/master
packstack/plugins/trove_850.py
3
# -*- coding: utf-8 -*- # 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...
k0Bas/python_training
refs/heads/master
test/test_modify_contact.py
1
# -*- coding: utf-8 -*- from model.group_contact import GroupContact def test_modify_first_contact(app): if app.contact.count(app) == 0: app.contact.create(GroupContact(firstname="first", lastname="last")) app.contact.modify_first_contact(GroupContact(firstname="F1", lastname="F2", title="Mrs", email="...
chimkentec/KodiMODo_rep
refs/heads/master
script.module.xbmcup/lib/xbmcup/request/exceptions.py
105
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ class RequestException(RuntimeError): """There was an ambiguous exception that occurred while handling your request.""" class HTTPError(RequestException): """An HTTP error occ...
dongjoon-hyun/tensorflow
refs/heads/master
tensorflow/python/ops/gradient_checker.py
3
# 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...
pelikanchik/edx-platform
refs/heads/master
common/lib/calc/calc/functions.py
279
""" Provide the mathematical functions that numpy doesn't. Specifically, the secant/cosecant/cotangents and their inverses and hyperbolic counterparts """ import numpy # Normal Trig def sec(arg): """ Secant """ return 1 / numpy.cos(arg) def csc(arg): """ Cosecant """ return 1 / nump...
ujenmr/ansible
refs/heads/devel
lib/ansible/modules/monitoring/bigpanda.py
92
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
joone/chromium-crosswalk
refs/heads/2016.04.css-round-display-edtior-draft-1
tools/android/loading/process_request_log.py
10
#! /usr/bin/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. """Creates a Graphviz file visualizing the resource dependencies from a JSON file dumped by log_requests.py. """ import collections impor...
RandyLowery/erpnext
refs/heads/develop
erpnext/hr/doctype/salary_slip/salary_slip.py
1
# 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, erpnext from frappe.utils import add_days, cint, cstr, flt, getdate, rounded, date_diff, money_in_words from frappe.model.naming import ...
yanweifu/thingscoop
refs/heads/master
thingscoop/query.py
7
import re from pypeg2 import * from pattern.en import wordnet from .utils import get_hypernyms class NoSuchLabelError(Exception): pass class Q(object): def evaluate(self, labels): return self.content.evaluate(labels) class Label(object): grammar = attr("name", re.compile(r"[A-z][A-z\- ]+[A-z]"))...
matrixise/odoo
refs/heads/8.0
addons/l10n_bo/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
blaisejarrett/PiIO.SS
refs/heads/master
user_api/urls.py
1
from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^rpis/$', 'user_api.views.rpi_list'), )
alibarkatali/module_web
refs/heads/master
venv/lib/python2.7/site-packages/werkzeug/debug/__init__.py
90
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import re import sys import uuid import json import time import getpass...
lighht/pyonenote-old
refs/heads/master
pyonenote/database/__init__.py
1
__all__ = ['notebook_db', 'section_db', 'notebookList', 'database_manager']
jellysheep/pyload
refs/heads/stable
module/plugins/hoster/NitroflareCom.py
15
# -*- coding: utf-8 -*- import re from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster class NitroflareCom(SimpleHoster): __name__ = "NitroflareCom" __type__ = "hoster" __version__ = "0.15" __status__ = "testing" __pattern__...
boxed/CMi
refs/heads/master
web_frontend/CMi/movies/admin.py
1
from django.contrib import admin from CMi.movies.models import * admin.site.register(Movie)
romankagan/DDBWorkbench
refs/heads/master
python/lib/Lib/site-packages/django/middleware/common.py
86
import re from django.conf import settings from django import http from django.core.mail import mail_managers from django.utils.http import urlquote from django.core import urlresolvers from django.utils.hashcompat import md5_constructor from django.utils.log import getLogger logger = getLogger('django.request') cl...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/tangible/ship/components/shield_generator/shared_shd_sfs_limited_advanced.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 = Tangible() result.template = "object/tangible/ship/components/shield_generator/shared_shd_sfs_limited_advanced.iff...
porcobosso/spark-ec2
refs/heads/master
lib/boto-2.34.0/tests/unit/cloudtrail/test_layer1.py
23
#!/usr/bin/env python import json from boto.cloudtrail.layer1 import CloudTrailConnection from tests.unit import AWSMockServiceTestCase class TestDescribeTrails(AWSMockServiceTestCase): connection_class = CloudTrailConnection def default_body(self): return b''' {"trailList": ...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/static/creature/shared_dathomir_rancor.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 = Static() result.template = "object/static/creature/shared_dathomir_rancor.iff" result.attribute_template_id = -1 ...
sub77/SM-T530_KK_Opensource
refs/heads/master
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
EduPepperPD/pepper2013
refs/heads/master
cms/djangoapps/contentstore/tests/test_i18n.py
9
from unittest import skip from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.test.client import Client from django.test.utils import override_settings from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from contentstore.tests.modulestore_config imp...
CiscoUcs/Ironic-UCS
refs/heads/master
build/lib.linux-x86_64-2.7/ironic/tests/drivers/drac/test_management.py
5
# -*- coding: utf-8 -*- # # Copyright 2014 Red Hat, 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...
hardikk/newfies-dialer
refs/heads/master
newfies/dialer_gateway/models.py
4
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
sometallgit/AutoUploader
refs/heads/master
Python27/Lib/encodings/cp1258.py
593
""" Python Character Mapping Codec cp1258 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
israeleriston/scientific-week
refs/heads/master
backend/venv/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py
32
# sql/visitors.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 """Visitor/traversal interface and library functions. SQLAlchemy schema and express...
wesley1001/formhub
refs/heads/master
odk_logger/admin.py
5
from django.contrib import admin from odk_logger.models import XForm class FormAdmin(admin.ModelAdmin): exclude = ('user',) list_display = ('id_string', 'downloadable', 'shared') # A user should only see forms that belong to him. def queryset(self, request): qs = super(FormAdmin, self).query...
frankvdp/django
refs/heads/master
django/contrib/gis/db/backends/mysql/base.py
135
from django.db.backends.mysql.base import ( DatabaseWrapper as MySQLDatabaseWrapper, ) from .features import DatabaseFeatures from .introspection import MySQLIntrospection from .operations import MySQLOperations from .schema import MySQLGISSchemaEditor class DatabaseWrapper(MySQLDatabaseWrapper): SchemaEdito...
wroersma/volatility
refs/heads/master
volatility/plugins/linux/proc_maps_rb.py
14
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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. You may not use, modify or # distribu...
twoerner/bitbake
refs/heads/master
lib/bb/ui/crumbs/hig/simplesettingsdialog.py
6
# # BitBake Graphical GTK User Interface # # Copyright (C) 2011-2012 Intel Corporation # # Authored by Joshua Lock <josh@linux.intel.com> # Authored by Dongxiao Xu <dongxiao.xu@intel.com> # Authored by Shane Wang <shane.wang@intel.com> # # This program is free software; you can redistribute it and/or modify # it unde...
nitzmahone/ansible
refs/heads/devel
test/runner/lib/cli.py
7
"""Test runner for all Ansible tests.""" from __future__ import absolute_import, print_function import errno import os import resource import sys from lib.util import ( ApplicationError, display, raw_command, get_docker_completion, generate_pip_command, read_lines_without_comments, ) from li...
aldian/tensorflow
refs/heads/master
tensorflow/contrib/keras/api/keras/wrappers/__init__.py
132
# 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...
openstack/ec2-api
refs/heads/master
ec2api/api/faults.py
3
# Copyright 2014 # The Cloudscaling Group, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
sdanzige/cmonkey-python
refs/heads/master
tools/precision_recall.py
2
#!/usr/bin/python import sys import csv import argparse import sqlite3 def read_regulondb(regulondb_filename, tfs, strong_evidence): # TF name, but use common name for regulated gene, because of ratios matrix with open(regulondb_filename) as csvfile: reader = csv.reader(csvfile, delimiter='\t', quotec...
pboettch/linux
refs/heads/master
tools/perf/scripts/python/futex-contention.py
1997
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gdgellatly/OCB1
refs/heads/7.0
addons/account_budget/report/budget_report.py
57
# -*- 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...
itsMagondu/oscar
refs/heads/master
home/models.py
1
from __future__ import unicode_literals from django.db import models from wagtail.wagtailcore.models import Page from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel class HomePage(Page): body = RichTextField(blank=True) content_panels = Page...
cherrygirl/micronaet7
refs/heads/master
aeroo_anybox/report_aeroo_ooo/installer.py
2
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008-2012 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional #...
adam-miller/h3_py
refs/heads/master
h3_py/h3_control.py
1
import h3_py.h3 as h3 import os import sys import argparse import logging import json from lxml import etree as ET logger = logging.getLogger(__name__) def main(): parser = argparse.ArgumentParser(description='Control an instance of Heritrix 3') parser.add_argument('url', help='URL for the crawl job. Ex. https://lo...
briancappello/flask-react-spa
refs/heads/master
backend/security/models/__init__.py
1
from .role import Role from .user import User from .user_role import UserRole
shaunduncan/breezeminder
refs/heads/master
breezeminder/tests/forms/test_validators.py
1
from mock import Mock from unittest2 import TestCase from wtforms import ValidationError from breezeminder.forms.validators import (Numeric, CardNumber, ExactLength, PhoneNumber, ...
mezz64/home-assistant
refs/heads/dev
tests/components/homeassistant/triggers/test_state.py
6
"""The test for state automation.""" from datetime import timedelta import pytest import homeassistant.components.automation as automation from homeassistant.components.homeassistant.triggers import state as state_trigger from homeassistant.const import ATTR_ENTITY_ID, ENTITY_MATCH_ALL, SERVICE_TURN_OFF from homeassi...
davidam/python-examples
refs/heads/master
shell/findDir2Orgmode.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org> # Maintainer: David Arroyo Menéndez <davidam@gnu.org> # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
frankvdp/django
refs/heads/master
tests/nested_foreign_keys/tests.py
71
from django.test import TestCase from .models import ( Event, Movie, Package, PackageNullFK, Person, Screening, ScreeningNullFK, ) # These are tests for #16715. The basic scheme is always the same: 3 models with # 2 relations. The first relation may be null, while the second is non-nullable. # In some cases, Dja...
shuangshuangwang/spark
refs/heads/master
examples/src/main/python/mllib/random_rdd_generation.py
27
# # 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 us...
jnishi/chainer
refs/heads/master
tests/chainer_tests/functions_tests/connection_tests/test_n_step_rnn.py
2
import unittest import numpy import chainer from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition def _split(inputs, pos): return inputs[:pos], inputs[pos:] def _relu...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/lib/PyAMF-0.6.1/pyamf/tests/test_gateway.py
26
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ General gateway tests. @since: 0.1.0 """ import unittest import sys import pyamf from pyamf import remoting from pyamf.remoting import gateway, amf0 class TestService(object): def spam(self): return 'spam' def echo(self, x): ...
ziplokk1/python-amazon-mws
refs/heads/master
docs/source/conf.py
5
# -*- coding: utf-8 -*- # # Python Amazon MWS documentation build configuration file, created by # sphinx-quickstart on Fri Jan 18 02:54:18 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
mindbender-studio/setup
refs/heads/master
bin/windows/python36/Lib/encodings/base64_codec.py
201
"""Python 'base64_codec' Codec - base64 content transfer encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import base64 ### Codec APIs def base64_encode(input, errors='strict'): assert errors == 'strict' return (base64.encodebytes(input...
DukeOfHazard/crits
refs/heads/master
crits/notifications/urls.py
17
from django.conf.urls import patterns urlpatterns = patterns('crits.notifications.views', (r'^poll/$', 'poll'), (r'^ack/$', 'acknowledge'), )
coinkeeper/2015-06-22_18-36_darkcoin
refs/heads/master
contrib/pyminer/pyminer.py
15
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
tropp/acq4
refs/heads/develop
acq4/analysis/modules/Photostim/DBCtrl.py
4
# -*- coding: utf-8 -*- from PyQt4 import QtGui, QtCore from collections import OrderedDict from Map import Map import acq4.util.DatabaseGui as DatabaseGui import MapCtrlTemplate from acq4.Manager import logMsg, logExc import acq4.pyqtgraph as pg import os class DBCtrl(QtGui.QWidget): """GUI for reading and writin...
curiosityio/taiga-docker
refs/heads/master
taiga-back/taiga-back/taiga/base/__init__.py
3
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
killerstorm/ngcccbase
refs/heads/master
ngcccbase/p2ptrade/tests/test_ewctrl.py
4
import unittest from coloredcoinlib import ( ZeroSelectError, SimpleColorValue, UNCOLORED_MARKER, ColorDefinition ) from ngcccbase.pwallet import PersistentWallet from ngcccbase.txcons import InsufficientFundsError, RawTxSpec from ngcccbase.wallet_controller import WalletController from ngcccbase.p2ptrade.ewctrl i...
SUSE/ceph-deploy
refs/heads/master
ceph_deploy/tests/test_keys_equivalent.py
4
from ceph_deploy import gatherkeys from ceph_deploy import new import tempfile import shutil import pytest def write_key_mon_with_caps(path, secret): mon_keyring = '[mon.]\nkey = %s\ncaps mon = allow *\n' % secret with open(path, 'w', 0o600) as f: f.write(mon_keyring) def write_key_mon_with_caps_wit...