repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
otlet/JestemGraczem.pl
refs/heads/master
service/admin.py
1
from django.contrib import admin from JestemGraczem.widgets import HtmlEditor from .models import GamesServersList, AppSettings, LinkBlog, RSS @admin.register(GamesServersList) class GameServersListAdmin(admin.ModelAdmin): list_display = ('name', 'official') @admin.register(LinkBlog) class LinkBlog...
GitHublong/hue
refs/heads/master
desktop/core/ext-py/django-auth-ldap-1.2.0/docs/ext/daldocs.py
42
""" Extra stuff for the django-auth-ldap Sphinx docs. """ def setup(app): app.add_crossref_type( directivename="setting", rolename="setting", indextemplate="pair: %s; setting", )
blowmage/gcloud-python
refs/heads/master
gcloud/storage/test_batch.py
2
# Copyright 2014 Google 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 required by applicable law or a...
OneBitSoftware/jwtSample
refs/heads/master
src/Spa/env1/Lib/site-packages/werkzeug/http.py
148
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
stackforge/ospurge
refs/heads/master
ospurge/tests/resources/__init__.py
12133432
tadek-project/tadek-ui
refs/heads/master
src/result/__init__.py
12133432
sassoftware/mint
refs/heads/master
mint_test/resttest/apitest/modeltest/imagestest.py
1
#!/usr/bin/python # # Copyright (c) SAS Institute 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...
MAPC/warren-st-development-database
refs/heads/master
development/migrations/0004_auto__chg_field_project_status.py
2
# -*- 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): # Changing field 'Project.status' db.alter_column('development_project', 'status_id', self.gf('django.db.mo...
tkingless/webtesting
refs/heads/master
venvs/tutorials/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py
353
from __future__ import absolute_import import socket try: from select import poll, POLLIN except ImportError: # `poll` doesn't exist on OSX and other platforms poll = False try: from select import select except ImportError: # `select` doesn't exist on AppEngine. select = False def is...
caesar2164/edx-platform
refs/heads/master
lms/djangoapps/badges/__init__.py
12133432
MattRijk/django-ecomsite
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/et/__init__.py
12133432
broferek/ansible
refs/heads/devel
lib/ansible/modules/messaging/rabbitmq/__init__.py
12133432
acbecker/pyhm
refs/heads/master
pyhm/distributions.py
12133432
zhouyejoe/spark
refs/heads/master
python/pyspark/sql/readwriter.py
5
# # 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...
mhvk/numpy
refs/heads/placeholder
numpy/core/code_generators/generate_numpy_api.py
11
import os import genapi from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi import numpy_api # use annotated api when running under cpychecker h_template = r""" #if defined(_MULTIARRAYMODULE) || defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE) typedef struct { PyObject_H...
Viktor-Evst/luigi
refs/heads/master
test/contrib/hive_test.py
9
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
vikt0rs/six
refs/heads/master
test_six.py
64
import operator import sys import types import unittest import py import six def test_add_doc(): def f(): """Icky doc""" pass six._add_doc(f, """New doc""") assert f.__doc__ == "New doc" def test_import_module(): from logging import handlers m = six._import_module("logging.hand...
nazeehshoura/crawler
refs/heads/master
env/lib/python2.7/site-packages/django/core/handlers/base.py
49
from __future__ import unicode_literals import logging import sys import types from django import http from django.conf import settings from django.core import urlresolvers from django.core import signals from django.core.exceptions import MiddlewareNotUsed, PermissionDenied, SuspiciousOperation from django.db import...
xlhtc007/osqf2015
refs/heads/master
model.py
2
import pandas as pd import numpy as np import datetime import blaze as bz from cytoolz import sliding_window, count from scipy.stats import chi2 import logging from bokeh.models import ColumnDataSource # def quantile(scenarios, level): # return np.percentile(scenarios, 100-level, interpolation='linear') class Va...
benoitsteiner/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/signal/python/kernel_tests/window_ops_test.py
48
# 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...
MaximeGLegault/StrategyIA
refs/heads/dev
RULEngine/Util/kalman_filter/__init__.py
12133432
ramiro/scrapy
refs/heads/master
scrapy/utils/__init__.py
12133432
Smarsh/django
refs/heads/master
tests/modeltests/m2o_recursive/__init__.py
12133432
jgravois/ArcREST
refs/heads/master
src/arcrest/manageorg/_content.py
1
from ..security.security import OAuthSecurityHandler, AGOLTokenSecurityHandler, PortalTokenSecurityHandler from .._abstract.abstract import BaseAGOLClass from parameters import ItemParameter, BaseParameters, AnalyzeParameters, PublishCSVParameters import urllib import urlparse import json import os import mmap import t...
rishita/mxnet
refs/heads/master
example/bi-lstm-sort/rnn_model.py
15
# pylint: disable=C0111,too-many-arguments,too-many-instance-attributes,too-many-locals,redefined-outer-name,fixme # pylint: disable=superfluous-parens, no-member, invalid-name import sys sys.path.insert(0, "../../python") import numpy as np import mxnet as mx from lstm import LSTMState, LSTMParam, lstm, bi_lstm_infer...
acsone/mozaik
refs/heads/8.0
mozaik_membership/wizard/change_main_address.py
1
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of mozaik_membership, an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # mozaik_membership is free software: # you can redistribute it and/or # modif...
derAndreas/pyGtk3Docs
refs/heads/develop
pyGtk3Docs/ast/Function.py
1
from Base import Base class Function(Base): """ Function nodes <function> This class is also the base class for <method>, <virutal-method> and <constructor> nodes, as the have all the same signature """ def parse_node(self): """ Parse the node""" self.parse_attributes_from_map({ ...
charanpald/sppy
refs/heads/master
sppy/linalg/GeneralLinearOperator.py
1
class GeneralLinearOperator(object): """ A more general form of LinearOperator in scipy.linalg. Can be used with many of the scipy functions. The new operation is rmatmat which is X.T V. """ def __init__(self, shape, matvec, rmatvec=None, matmat=None, rmatmat=None, add=None, dtype=N...
LICEF/edx-platform
refs/heads/master
common/lib/capa/capa/safe_exec/lazymod.py
68
"""A module proxy for delayed importing of modules. From http://barnesc.blogspot.com/2006/06/automatic-python-imports-with-autoimp.html, in the public domain. """ import sys class LazyModule(object): """A lazy module proxy.""" def __init__(self, modname): self.__dict__['__name__'] = modname ...
lthurlow/Network-Grapher
refs/heads/master
proj/external/numpy-1.7.0/numpy/core/tests/test_getlimits.py
10
""" Test functions for limits module. """ from numpy.testing import * from numpy.core import finfo, iinfo from numpy import half, single, double, longdouble import numpy as np ################################################## class TestPythonFloat(TestCase): def test_singleton(self): ftype = finfo(floa...
HSAnet/glimpse_client
refs/heads/develop
3rdparty/breakpad/src/third_party/protobuf/protobuf/python/mox.py
603
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
jeremysanders/taskproc
refs/heads/master
taskproc/common.py
1
# Copyright 2016 Jeremy Sanders # # 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 ...
west2554/fofix
refs/heads/master
src/midi/RawInstreamFile.py
7
# -*- coding: ISO-8859-1 -*- # standard library imports from types import StringType from struct import unpack # custom import from DataTypeConverters import readBew, readVar, varLen class RawInstreamFile: """ It parses and reads data from an input file. It takes care of big endianess, and ke...
mindnervestech/mnrp
refs/heads/master
addons/crm/report/__init__.py
313
# -*- 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...
monikagrabowska/osf.io
refs/heads/develop
api/preprints/__init__.py
12133432
saurabh6790/medsyn-app
refs/heads/master
manufacturing/report/production_orders_in_progress/__init__.py
12133432
suyashphadtare/gd-erp
refs/heads/develop
erpnext/accounts/report/payment_period_based_on_invoice_date/__init__.py
12133432
beneckart/future-robotics
refs/heads/master
Marquee/layouts/make_grid.py
1
pitch = 5.0/25.0 rows = 20 cols = 25 xoffset = 2.5 yoffset = 2.5*rows/cols pixels = [] xpos, ypos = 0, 0 for i, r in enumerate(range(rows)): for j, c in enumerate(range(cols)): fwd = i % 2 == 0 if fwd: xpos = c*pitch ypos = r*pitch else: xpos = (cols-c...
RuudBurger/CouchPotatoServer
refs/heads/master
libs/tornado/ioloop.py
65
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
capchu/TextRPGOnline
refs/heads/master
rpgonline/env/lib/python2.7/site-packages/pip/req.py
74
from email.parser import FeedParser import os import imp import pkg_resources import re import sys import shutil import tempfile import textwrap import zipfile from distutils.util import change_root from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME, write...
Hybrid-Cloud/cinder
refs/heads/master
cinder/volume/drivers/falconstor/fss_common.py
1
# Copyright (c) 2016 FalconStor, 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...
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/python2.7/_abcoll.py
218
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. DON'T USE THIS MODULE DIRECTLY! The classes here should be imported via collections; they are defined here only to alleviate certain bootstrappin...
tsingjinyun/experiments
refs/heads/master
word2vec_tw/cut.py
3
import jieba import sys if __name__ == '__main__': jieba.set_dictionary('jieba/extra_dict/dict.txt.big') for l in sys.stdin: words = jieba.cut(l.strip()) sys.stdout.write((u' '.join(words) + u'\n').encode('utf8'))
pplatek/odoo
refs/heads/8.0
addons/account/wizard/account_report_common_account.py
371
# -*- 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...
srm912/servo
refs/heads/master
tests/wpt/web-platform-tests/old-tests/webdriver/runtests.py
212
import unittest from unittest import TestLoader, TextTestRunner, TestSuite if __name__ == "__main__": loader = TestLoader() suite = TestSuite(( loader.discover(".", pattern="*.py") )) runner = TextTestRunner(verbosity=2) runner.run(suite) unittest.main()
kb8u/ZenPacks.Merit.AdvaFSP3000R7
refs/heads/master
ZenPacks/Merit/AdvaFSP3000R7/datasources/__init__.py
504
# __init__.py
roth1002/infer
refs/heads/master
infer/bin/utils.py
2
# # Copyright (c) 2013- Facebook. All rights reserved. # from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import csv import fnmatch import gzip import json import logging import os import re import sub...
Acidburn0zzz/archiso-gui
refs/heads/master
releng/root-image/usr/share/cnchi/src/i18n.py
1
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright (C) 2012 Canonical Ltd. # # 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...
USGSDenverPychron/pychron
refs/heads/develop
pychron/experiment/utilities/identifier.py
1
# =============================================================================== # Copyright 2012 Jake Ross # # 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...
fairbird/OpenPLI-BlackHole
refs/heads/master
lib/python/Screens/Wizard.py
1
from Screen import Screen from Screens.HelpMenu import HelpableScreen from Screens.MessageBox import MessageBox from Components.config import config, ConfigText, ConfigPassword, KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS from Comp...
rohitwaghchaure/alec_frappe5_erpnext
refs/heads/develop
erpnext/stock/doctype/delivery_note/delivery_note.py
2
# 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, cint from frappe import msgprint, _ import frappe.defaults from frappe.model.mapper import get_mapped_doc ...
etherkit/OpenBeacon2
refs/heads/master
client/linux-x86/venv/lib/python3.8/site-packages/serial/tools/list_ports_windows.py
12
#! python # # Enumerate serial ports on Windows including a human readable description # and hardware information. # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C) 2001-2016 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause # pylint: disable=invalid-name,too-few...
prmtl/fuel-web
refs/heads/master
fuel_agent/fuel_agent/tests/test_nailgun.py
2
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Comcast/neutron
refs/heads/master
neutron/tests/__init__.py
80
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
nmalkin/crawl
refs/heads/master
hook.py
1
# This file contains custom hooks for wpull with the following functionality: # - a domain whitelist # - a regex-based URL blacklist # - completion notification import os import re WHITELIST_LOCATION = os.environ.get('WHITELIST', '/data/whitelist.txt') BLACKLIST_LOCATION = os.environ.get('BLACKLIST', '/data/blacklist...
ojengwa/odoo
refs/heads/8.0
addons/document/__openerp__.py
260
# -*- 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...
eliasdesousa/indico
refs/heads/master
indico/modules/events/papers/controllers/display.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
glessard/swift
refs/heads/snapshot
test/SourceKit/Inputs/sourcekitd_path_sanitize.py
20
#!/usr/bin/env python # sourcekitd_path_sanitize.py - Cleans up paths from sourcekitd-test output # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://s...
IV-GII/SocialCookies
refs/heads/master
ENV1/lib/python2.7/site-packages/django/http/utils.py
40
""" 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 ...
sidartaoliveira/ansible
refs/heads/devel
lib/ansible/plugins/action/net_config.py
137
# # Copyright 2015 Peter Sprygada <psprygada@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
branto1/ceph-deploy
refs/heads/master
ceph_deploy/hosts/suse/uninstall.py
12
def uninstall(distro, purge=False): packages = [ 'ceph', 'ceph-common', 'libcephfs1', 'librados2', 'librbd1', 'ceph-radosgw', ] distro.packager.remove(packages)
junix/powerline
refs/heads/develop
tests/setup_statusline_catcher.py
28
# vim:fileencoding=utf-8:noet import json import vim from powerline.lib.unicode import u _powerline_old_render = powerline.render # NOQA def _powerline_test_render_function(*args, **kwargs): ret = _powerline_old_render(*args, **kwargs) vim.eval('add(g:statusline_values, %s)' % json.dumps(u(ret))) return ret ...
mtagle/airflow
refs/heads/master
airflow/operators/hive_to_druid.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...
darron/dd-agent
refs/heads/master
tests/checks/mock/test_cacti.py
27
# stdlib import logging import os import shutil import unittest # project from tests.checks.common import Fixtures, get_check log = logging.getLogger() CONFIG = """ init_config: instances: - mysql_host: localhost mysql_user: root rrd_path: /tmp/cacti_test/rrds rrd_whitelist: %s """ %...
SPKian/Testing
refs/heads/master
erpnext/config/desktop.py
27
from __future__ import unicode_literals from frappe import _ def get_data(): return { "Accounts": { "color": "#3498db", "icon": "octicon octicon-repo", "type": "module" }, "Buying": { "color": "#c0392b", "icon": "icon-shopping-cart", "icon": "octicon octicon-briefcase", "type": "module" }...
iychoi/syndicate-core
refs/heads/master
ms/google/protobuf/json_format.py
3
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
shhui/nova
refs/heads/master
nova/tests/api/openstack/compute/plugins/v3/test_extended_status.py
16
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
jegger/kivy
refs/heads/master
examples/shader/plasma.py
12
''' Plasma Shader ============= This shader example have been taken from http://www.iquilezles.org/apps/shadertoy/ with some adaptation. This might become a Kivy widget when experimentation will be done. ''' from kivy.clock import Clock from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy...
benchisell/photostream-bc
refs/heads/master
flask/lib/python2.7/site-packages/flup/__init__.py
9480
#
archyufa/CloudFerry
refs/heads/master
cloudferrylib/utils/rbd_util.py
3
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
mrh1997/cymu
refs/heads/master
sample/main.py
1
""" This module demonstrates the usage of cymu. """ import os import sys from cymu.compiler import compile_file module1Path = os.path.join(os.path.dirname(sys.argv[0]), 'module1.c') module1_cls = compile_file(module1Path) module1 = module1_cls() module1.demo_func() print "a =",module1.a print "b =",module1.b print ...
allmende/synnefo
refs/heads/develop
snf-astakos-app/astakos/im/migrations/0061_auto__chg_field_astakosuser_uuid.py
10
# -*- 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): # Changing field 'AstakosUser.uuid' db.alter_column('im_astakosuser', 'uuid', self.gf('django.db.models.fie...
centwave/jg82ksgvqkuan
refs/heads/master
django/contrib/gis/tests/geogapp/tests.py
222
""" Tests for geography support in PostGIS 1.5+ """ import os from django.contrib.gis import gdal from django.contrib.gis.measure import D from django.test import TestCase from models import City, County, Zipcode class GeographyTest(TestCase): def test01_fixture_load(self): "Ensure geography features load...
mcldev/DjangoCMS_Charts
refs/heads/master
djangocms_charts/models.py
1
from cms.models import CMSPlugin from .chartjs.models import *
zdary/intellij-community
refs/heads/master
python/testData/completion/notImportedQualifiedName/NoImportForSubpackages/mypackage/__init__.py
12133432
huongttlan/statsmodels
refs/heads/master
statsmodels/duration/tests/__init__.py
12133432
nitzmahone/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Matt Martz <matt@sivel.net> # # 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'...
shanestafford/moose
refs/heads/devel
gui/vtk/MeshRenderWidget.py
34
import os, sys, getopt try: from PyQt4 import QtCore, QtGui QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot except ImportError: try: from PySide import QtCore, QtGui QtCore.QString = str except ImportError: raise ImportError("Cannot load either PyQt or PySide...
LazyCodingCat/gyp
refs/heads/master
pylib/gyp/generator/analyzer.py
88
# Copyright (c) 2014 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. """ This script is intended for use as a GYP_GENERATOR. It takes as input (by way of the generator flag config_path) the path of a json file that dictates the file...
major684/ud858-master
refs/heads/master
Lesson_4/00_Conference_Central/models.py
86
#!/usr/bin/env python """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $ created/forked from conferences.py by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import httplib import endpoints from protor...
devs1991/test_edx_docmode
refs/heads/master
lms/tests.py
72
"""Tests for the lms module itself.""" import mimetypes from mock import patch from django.test import TestCase from django.core.urlresolvers import reverse from edxmako import add_lookup, LOOKUP from lms import startup from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.djan...
ojengwa/odoo
refs/heads/8.0
addons/website_crm_partner_assign/controllers/__init__.py
7372
import main
audaciouscode/Books-Mac-OS-X
refs/heads/master
Versions/Books_3.0b3/Library of Congress.plugin/Contents/Resources/PyZ3950_parsetab.py
30
# PyZ3950_parsetab.py # This file is automatically generated. Do not edit. _lr_method = 'SLR' _lr_signature = '\xfc\xb2\xa8\xb7\xd9\xe7\xad\xba"\xb2Ss\'\xcd\x08\x16' _lr_action_items = {'QUOTEDVALUE':([18,12,14,0,26,],[1,1,1,1,1,]),'LOGOP':([3,5,20,4,6,27,19,24,25,13,22,1,],[-5,-8,-4,-14,14,14,14,-9,-6,-13,-7,-12,]...
dfdx2/django
refs/heads/master
tests/migrations/test_migrations_squashed_ref_squashed/app1/4_auto.py
133
from django.db import migrations class Migration(migrations.Migration): dependencies = [("app1", "2_squashed_3")]
openhatch/oh-mainline
refs/heads/master
vendor/packages/webtest/webtest/debugapp.py
26
import os import six import webob __all__ = ['DebugApp', 'make_debug_app'] class DebugApp(object): """The WSGI application used for testing""" def __init__(self, form=None, show_form=False): if form and os.path.isfile(form): fd = open(form, 'rb') self.form = fd.read() ...
vnsofthe/odoo
refs/heads/8.0
openerp/pooler.py
374
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
SunguckLee/MariaDB-PageCompression
refs/heads/master
storage/tokudb/mysql-test/tokudb/locks-blocking-row-locks-testgen.py
47
# 9/23/2011 Generate blocking row lock tests import datetime # generate sql write queries def mysqlgen_select_for_update(k, kv, c, cv): print "select * from t where %s=%s for update;" % (k, kv) def mysqlgen_select_for_update_range(k, c, where): print "select * from t where %s%s for update;" % (k, where) def my...
virgree/odoo
refs/heads/8.0
openerp/addons/test_convert/tests/test_convert.py
382
import collections import unittest2 from lxml import etree as ET from lxml.builder import E from openerp.tests import common from openerp.tools.convert import _eval_xml Field = E.field Value = E.value class TestEvalXML(common.TransactionCase): def eval_xml(self, node, obj=None, idref=None): return _eval_...
camilonova/sentry
refs/heads/master
tests/sentry/tasks/test_options.py
24
from mock import patch from datetime import timedelta from sentry.models import Option from sentry.options import default_manager from sentry.tasks.options import sync_options from sentry.testutils import TestCase class SyncOptionsTest(TestCase): def test_task_persistent_name(self): assert sync_options....
SteveMcGrath/pySecurityCenter
refs/heads/master
examples/sc4/average_time_to_mitigate/avg_ttm.py
1
import securitycenter HOST = 'HOSTNAME or IP_ADDRESS' USER = 'USERNAME' PASS = 'PASSWORD' ASSET_ID = 81 def get_ttm(**filters): sc = securitycenter.SecurityCenter4(HOST) sc.login(USER, PASS) data = sc.query('vulndetails', source='patched', **filters) agg = 0 for item in data: agg += int(it...
iain-peddie/well-behaved-python
refs/heads/master
tests/WellBehavedPythonTests/Expectations/ContainerExpectationsTests.py
1
#!/usr/bin/env python3 # Copyright 2013 Iain Peddie inr314159@hotmail.com # # This file is part of WellBehavedPython # # WellBehavedPython 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...
Dahlgren/HTPC-Manager
refs/heads/master2
libs/sqlobject/manager/__init__.py
9480
#
nerith/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/trie/__init__.py
1735
from __future__ import absolute_import, division, unicode_literals from .py import Trie as PyTrie Trie = PyTrie try: from .datrie import Trie as DATrie except ImportError: pass else: Trie = DATrie
matthaywardwebdesign/rethinkdb
refs/heads/next
test/rdb_workloads/stress_workloads/x_between.py
50
#!/usr/bin/env python import sys, os, datetime, x_stress_util sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import utils r = utils.import_python_driver() class Workload: def __init__(self, options): self.db = options["db"] self.table = optio...
rodrigob/visiongrader
refs/heads/master
src/measures.py
1
#!/usr/bin/python # Copyright (C) 2011 Pierre Sermanet <pierre.sermanet@gmail.com> # # This file is part of visiongrader. # # visiongrader 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...
Saurabh7/shogun
refs/heads/master
examples/undocumented/python_modular/graphical/svr_sinc.py
16
from pylab import figure,pcolor,scatter,contour,colorbar,show,subplot,plot,legend, connect from modshogun import * from modshogun import * from modshogun import * import util util.set_title('SVR on Sinus') X, Y=util.get_sinedata() C=10 width=0.5 epsilon=0.01 feat = RealFeatures(X) lab = RegressionLabels(Y.flatten())...
vidyacraghav/cplusdratchio
refs/heads/master
deps/boost_1_55_0/tools/build/v2/util/utility.py
49
# (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and # distribute this software is granted provided this copyright notice appears in # all copies. This software is provided "as is" without express or implied # warranty, and with no claim as to its suitability for any purpose. """ Utility ...
slozier/ironpython2
refs/heads/master
Src/StdLib/Lib/test/test_complex.py
4
import unittest from test import test_support from random import random from math import atan2, isnan, copysign INF = float("inf") NAN = float("nan") # These tests ensure that complex math does the right thing # decorator for skipping tests on non-IEEE 754 platforms have_getformat = hasattr(float, "__getformat__") r...
endolith/scipy
refs/heads/master
scipy/interpolate/setup.py
7
import os from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from scipy._build_utils import (get_f2py_int64_options, ilp64_pre_build_hook, uses_blas64) if ...
freerangerouting/frr
refs/heads/master
tests/topotests/ospf-topo1/__init__.py
12133432