repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
omprakasha/odoo
refs/heads/8.0
addons/base_vat/base_vat.py
238
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
kosz85/django
refs/heads/master
django/contrib/sessions/backends/base.py
9
import base64 import logging import string from contextlib import suppress from datetime import datetime, timedelta from django.conf import settings from django.contrib.sessions.exceptions import SuspiciousSession from django.core.exceptions import SuspiciousOperation from django.utils import timezone from django.util...
rosudrag/Freemium-winner
refs/heads/master
VirtualEnvironment/Lib/site-packages/sqlalchemy/dialects/mssql/adodbapi.py
80
# mssql/adodbapi.py # Copyright (C) 2005-2015 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 """ .. dialect:: mssql+adodbapi :name: adodbapi :dbapi: adodbapi :conn...
Nic30/HWToolkit
refs/heads/master
hwt/serializer/vhdl/value.py
1
from hdlConvertorAst.hdlAst import HdlValueId, HdlValueInt, HdlOp,\ HdlOpType from hdlConvertorAst.to.hdlUtils import bit_string from hdlConvertorAst.translate.common.name_scope import LanguageKeyword from hwt.hdl.operator import Operator from hwt.hdl.types.bits import Bits from hwt.hdl.types.bitsVal import BitsVal...
konieboy/Seng_403
refs/heads/master
Gender Computer/reader.py
2
import csv from utf8Recorder import UTF8Recoder class UnicodeReader: """ A CSV reader which will iterate over lines in the CSV file "f", which is encoded in the given encoding. """ def __init__(self, f, dialect=csv.excel, encoding="utf-8", delimiter=';', **kwds): f = UTF8Recoder(f, encodi...
MilletPu/airvis
refs/heads/airvis_multidimensional
src/main/webapp/js/ol3/v3.1.1/closure-library/closure/bin/build/source_test.py
153
#!/usr/bin/env python # # Copyright 2010 The Closure Library 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 ...
kevalds51/sympy
refs/heads/master
sympy/utilities/autowrap.py
37
"""Module for compiling codegen output, and wrap the binary for use in python. .. note:: To use the autowrap module it must first be imported >>> from sympy.utilities.autowrap import autowrap This module provides a common interface for different external backends, such as f2py, fwrap, Cython, SWIG(?) etc. (Curren...
lanyuwen/openthread
refs/heads/master
tools/harness-automation/cases_R140/reed_5_5_5.py
18
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
warped-rudi/linux-sunxi
refs/heads/sunxi-3.4
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
aktech/sympy
refs/heads/master
sympy/geometry/tests/test_plane.py
22
from __future__ import division from sympy import Dummy, S, Symbol, pi, sqrt, asin from sympy.geometry import Line, Point, Ray, Segment, Point3D, Line3D, Ray3D, Segment3D, Plane from sympy.geometry.util import are_coplanar from sympy.utilities.pytest import raises, slow @slow def test_plane(): x = Symbol('x', re...
boxycoin/boxycoin
refs/heads/master
contrib/wallettools/walletunlock.py
2299
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:8332") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
EvanK/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_log_webtrends_setting.py
23
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
cfarquhar/rpc-openstack
refs/heads/master
scripts/alarmparser.py
3
# Rackspace Monitoring as a Service (MaaS) Alarm Languague parser. # Generated by the Waxeye Parser Generator - version 0.8.0 # www.waxeye.org # Generated from the following grammar (retrieved from # https://github.rackspace.com/CloudMonitoring/ele/blob/master/grammar/alarm.waxeye) # AlarmDsl <- Ws *SetStatemen...
Mistobaan/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/gradient_correctness_test.py
118
# 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...
pschmitt/home-assistant
refs/heads/dev
tests/components/group/test_cover.py
5
"""The tests for the group cover platform.""" from datetime import timedelta import pytest from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_CURRENT_TILT_POSITION, ATTR_POSITION, ATTR_TILT_POSITION, DOMAIN, ) from homeassistant.components.group.cover import DEFAULT_NAME from...
flavour/Turkey
refs/heads/master
modules/s3/s3parser.py
16
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ This file parses messages using functions defined in in the template's parser.py @copyright: 2012-15 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of t...
Lorquas/subscription-manager
refs/heads/master
test/gui/test_facts_gui.py
1
from __future__ import print_function, division, absolute_import from test.fixture import SubManFixture from subscription_manager.injection import provide, IDENTITY from test.stubs import StubUEP, StubFacts from subscription_manager.gui import factsgui from mock import NonCallableMock, patch from nose.plugins.attrib ...
dudepare/django
refs/heads/master
django/test/runner.py
89
import collections import ctypes import itertools import logging import multiprocessing import os import pickle import textwrap import unittest from importlib import import_module from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS, connection...
Canpio/Paddle
refs/heads/develop
python/paddle/utils/make_model_diagram.py
9
# Copyright (c) 2016 PaddlePaddle 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 applic...
chouseknecht/ansible
refs/heads/devel
lib/ansible/modules/files/template.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # This is a virtual module that is entirely implemented as an action plugin and runs on the controller from __future__ import absolute_import, ...
westinedu/wrgroups
refs/heads/master
django/core/management/commands/cleanup.py
350
import datetime from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = "Can be run as a cronjob or directly to clean out old data from the database (only expired sessions at the moment)." def handle_noargs(self, **options): from django.db import transaction ...
daniponi/django
refs/heads/master
django/contrib/gis/db/backends/mysql/operations.py
12
from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.db.backends.base.operations import \ BaseSpatialOperations from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.models import aggregates from django.db.backends.mysql.operations import D...
miconof/CouchPotatoServer
refs/heads/master
couchpotato/core/notifications/webhook.py
34
import traceback from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import getIdentifier from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'Webhook' class Webhook(Notification): de...
ojengwa/odoo
refs/heads/8.0
openerp/addons/base/tests/test_osv.py
446
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP S.A. http://www.openerp.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
cblecker/test-infra
refs/heads/master
config/jobs/kubernetes/kops/build_jobs.py
1
# Copyright 2020 The Kubernetes Authors. # # 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 ...
chrisndodge/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/session_kv_store.py
214
""" An :class:`~xblock.runtime.KeyValueStore` that stores data in the django session """ from __future__ import absolute_import from xblock.runtime import KeyValueStore def stringify(key): return repr(tuple(key)) class SessionKeyValueStore(KeyValueStore): def __init__(self, request): self._session ...
pprett/statsmodels
refs/heads/master
statsmodels/examples/ex_shrink_pickle.py
1
# -*- coding: utf-8 -*- """ Created on Fri Mar 09 16:00:27 2012 Author: Josef Perktold """ import numpy as np import statsmodels.api as sm nobs = 10000 np.random.seed(987689) x = np.random.randn(nobs, 3) x = sm.add_constant(x, prepend=True) y = x.sum(1) + np.random.randn(nobs) xf = 0.25 * np.ones((2,4)) model =...
Wengex/PyDirectory
refs/heads/master
pydirectory/directory/objects/types.py
1
import importlib class object(object): _objtype = {} def __init__(self,objects,data,objid=None,readonly=False): if objid == None: self._id = id(self) else: self._id = objid self._is_readonly = readonly self._objects = objects self._exceptions = self._objects._exceptions self._attributes = importlib...
hoehnp/navit_test
refs/heads/master
lib/python2.7/site-packages/py/_code/code.py
4
import py import sys from inspect import CO_VARARGS, CO_VARKEYWORDS builtin_repr = repr reprlib = py.builtin._tryimport('repr', 'reprlib') if sys.version_info[0] >= 3: from traceback import format_exception_only else: from py._code._py2traceback import format_exception_only class Code(object): ...
ky822/scikit-learn
refs/heads/master
examples/svm/plot_weighted_samples.py
188
""" ===================== SVM: Weighted samples ===================== Plot decision function of a weighted dataset, where the size of points is proportional to its weight. The sample weighting rescales the C parameter, which means that the classifier puts more emphasis on getting these points right. The effect might ...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/static/item/shared_item_shisha.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/item/shared_item_shisha.iff" result.attribute_template_id = -1 result....
sparkslabs/kamaelia
refs/heads/master
Sketches/MPS/Examples/Checkers/Checkers.py
9
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
andyzsf/edx
refs/heads/master
lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py
229
""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollment from django_comment_common.models import assign_def...
jayceyxc/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/tests/utils.py
114
from django.conf import settings from django.db import DEFAULT_DB_ALIAS # function that will pass a test. def pass_test(*args): return def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: ...
smalyshev/pywikibot-core
refs/heads/master
pywikibot/userinterfaces/__init__.py
4
# -*- coding: utf-8 -*- """User interfaces.""" # # (C) Pywikibot team, 2007 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$'
CLVsol/clvsol_odoo_addons
refs/heads/12.0
clv_summary/__init__.py
13
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models
hortonworks/hortonworks-sandbox
refs/heads/master
desktop/core/ext-py/Twisted/twisted/test/stdio_test_loseconn.py
2
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_loseConnection -*- # Copyright (c) 2006-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTestCase.test_loseConnection} to test that ITran...
chipx86/reviewboard
refs/heads/master
reviewboard/rb_platform.py
9
"""Global configuration for deployment paths and settings. These values may need to be modified for deployment on different operating system platforms. Packagers should review this file and patch it appropriately for their systems. """ from __future__ import unicode_literals #: Location of the sitelist file. This f...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/lepl/support/_test/timer.py
2
# The contents of this file are subject to the Mozilla Public License # (MPL) Version 1.1 (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.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" # b...
xuxiao19910803/edx-platform
refs/heads/master
lms/djangoapps/instructor/views/coupons.py
103
""" E-commerce Tab Instructor Dashboard Coupons Operations views """ from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.views.decorators.http import require_POST from django.utils.translation import ugettext as _ from util.json_request import Json...
neilhan/tensorflow
refs/heads/master
tensorflow/contrib/lookup/__init__.py
16
# 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...
alu0100207385/dsi_3Django
refs/heads/master
build/lib.linux-i686-2.7/django/db/backends/postgresql_psycopg2/version.py
331
""" Extracts the version of the PostgreSQL server. """ import re # This reg-exp is intentionally fairly flexible here. # Needs to be able to handle stuff like: # PostgreSQL 8.3.6 # EnterpriseDB 8.3 # PostgreSQL 8.3 beta4 # PostgreSQL 8.4beta1 VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?') def _parse_...
hackers-terabit/portage
refs/heads/master
repoman/pym/repoman/qa_data.py
1
# -*- coding:utf-8 -*- import logging from _emerge.Package import Package # import our initialized portage instance from repoman._portage import portage max_desc_len = 80 allowed_filename_chars = "a-zA-Z0-9._-+:" qahelp = { "CVS/Entries.IO_error": ( "Attempting to commit, and an IO error was encountered access ...
pkdevbox/trac
refs/heads/master
trac/versioncontrol/api.py
1
# -*- coding: utf-8 -*- # # Copyright (C)2005-2011 Edgewall Software # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.e...
wnt-zhp/hufce
refs/heads/master
django/conf/locale/nl/formats.py
329
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '20 januari 2009' TIME_FORMAT = 'H:i' ...
suncycheng/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameUpdatesImportReferences/after/bar.py
83
import baz from baz import f
PatrickChrist/scikit-learn
refs/heads/master
doc/sphinxext/numpy_ext/docscrape_sphinx.py
408
import re import inspect import textwrap import pydoc from .docscrape import NumpyDocString from .docscrape import FunctionDoc from .docscrape import ClassDoc class SphinxDocString(NumpyDocString): def __init__(self, docstring, config=None): config = {} if config is None else config self.use_plots...
jffm/pyanalyzer
refs/heads/master
rules/AvoidMultiImport.py
1
# Copyright (c) 2008-2009 Junior (Frederic) FLEURIAL MONFILS # # This file is part of PyAnalyzer. # # PyAnalyzer 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...
pombredanne/pants
refs/heads/master
contrib/go/tests/python/pants_test/contrib/go/targets/test_go_binary.py
25
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants_test.base...
apporc/nova
refs/heads/master
nova/tests/functional/test_servers.py
16
# Copyright 2011 Justin Santa Barbara # 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...
ilo10/scikit-learn
refs/heads/master
sklearn/manifold/isomap.py
229
"""Isomap for manifold learning""" # Author: Jake Vanderplas -- <vanderplas@astro.washington.edu> # License: BSD 3 clause (C) 2011 import numpy as np from ..base import BaseEstimator, TransformerMixin from ..neighbors import NearestNeighbors, kneighbors_graph from ..utils import check_array from ..utils.graph import...
thomastu/pyEIA
refs/heads/master
eia/constants.py
1
from enum import Enum class Category(Enum): root = 371 electricity = 0 seds = 40203 petroleum = 714755 natural_gas = 714804 total_energy = 711224 coal = 717234 steo = 829714 aeo = 964164 crude_oil = 1292190 international_energy = 2134384 usesod = 2123635 ...
shepdelacreme/ansible
refs/heads/devel
lib/ansible/modules/network/aci/aci_interface_policy_ospf.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com> # 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_ver...
dleecefft/pcapstats
refs/heads/master
utils/simpletcphoneypot.py
1
#!/usr/bin/env python # A simple lure that accepts coommand line args for listening port, IP address and log file # This should be completly detectable by a human but an automated probe might waste some time # the log file is to grab logs to assist with profiling. # Create a new log every day, through naming based on d...
MTG/essentia
refs/heads/master
test/src/unittests/standard/test_tensornormalize.py
1
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
benoitsteiner/tensorflow-opencl
refs/heads/master
tensorflow/python/keras/datasets/mnist/__init__.py
73
# 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...
yuanagain/seniorthesis
refs/heads/master
venv/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py
100
from __future__ import division, print_function, absolute_import import os import numpy as np from numpy.testing import (assert_equal, assert_allclose, assert_, TestCase, assert_raises, run_module_suite, assert_almost_equal, assert_raises, assert_array_almost_equal) from numpy import array, asarray, pi, sin, ...
zjx20/googletest
refs/heads/master
scripts/upload_gtest.py
1963
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
ool2016-seclab/quarantineSystem
refs/heads/master
ryu/app/simple_switch_igmp.py
58
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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 appli...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/rope/refactor/functionutils.py
24
import rope.base.exceptions import rope.base.pyobjects from rope.base.builtins import Lambda from rope.base import worder class DefinitionInfo(object): def __init__(self, function_name, is_method, args_with_defaults, args_arg, keywords_arg): self.function_name = function_name sel...
infoxchange/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/db/backends/mysql/creation.py
311
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
yuhangwang/meson
refs/heads/master
test cases/common/64 custom header generator/makeheader.py
9
#!/usr/bin/env python3 # NOTE: this file does not have the executable bit set. This tests that # Meson can automatically parse shebang lines. import sys template = '#define RET_VAL %s\n' output = template % (open(sys.argv[1]).readline().strip()) open(sys.argv[2], 'w').write(output)
tedder/ansible
refs/heads/devel
lib/ansible/modules/crypto/acme/acme_certificate_revoke.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016 Michael Gruener <michael.gruener@chaosmoon.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_versio...
ZHAW-INES/rioxo-uClinux-dist
refs/heads/rtsp
user/python/python-2.4.4/Lib/plat-mac/Carbon/OSAconst.py
81
# Generated from 'OSA.h' def FOUR_CHAR_CODE(x): return x from Carbon.AppleEvents import * kAEUseStandardDispatch = -1 kOSAComponentType = FOUR_CHAR_CODE('osa ') kOSAGenericScriptingComponentSubtype = FOUR_CHAR_CODE('scpt') kOSAFileType = FOUR_CHAR_CODE('osas') kOSASuite = FOUR_CHAR_CODE('ascr') kOSARecordedText = FOUR...
0xffea/keystone
refs/heads/master
setup.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
voidspace/juju
refs/heads/master
scripts/jujuman.py
27
"""Functions for generating the manpage using the juju command.""" import subprocess import textwrap import time class JujuMan(object): def __init__(self): self.version = self._version() def get_filename(self, options): """Provides name of manpage""" return 'juju.1' def run_juj...
shishaochen/TensorFlow-0.8-Win
refs/heads/master
tensorflow/python/kernel_tests/sparse_xent_op_test.py
7
# Copyright 2015 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...
lucasvo/django-oembepdlugin
refs/heads/master
bootstrap.py
21
############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
Code4Maine/volunteer-coordination
refs/heads/master
volunteerhub/urls.py
1
from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', (r'^admin/', include(admin.site.urls)), (r'^accounts/', include('allauth.urls')), (r'^cke...
jgrocha/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/rasterize_over.py
14
# -*- coding: utf-8 -*- """ *************************************************************************** rasterize_over.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com ********...
bhargav2408/python-for-android
refs/heads/master
python3-alpha/python3-src/Tools/unicode/comparecodecs.py
45
#!/usr/bin/env python3 """ Compare the output of two codecs. (c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com). Licensed to PSF under a Contributor Agreement. """ import sys def compare_codecs(encoding1, encoding2): print('Comparing encoding/decoding of %r and %r' % (encoding1, encoding2)) ...
openstack/senlin
refs/heads/master
senlin/objects/requests/webhooks.py
2
# 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 # distributed unde...
luogangyi/Ceilometer-oVirt
refs/heads/stable/juno
build/lib/ceilometer/neutron_client.py
4
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # 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.apach...
CERT-Solucom/certitude
refs/heads/master
components/scanner/flatevaluators/process.py
2
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' CERTitude: the seeker of IOC Copyright (c) 2016 CERT-W Contact: cert@wavestone.com Contributors: @iansus, @nervous, @fschwebel CERTitude is under licence GPL-2.0: This program is free software; you can redistribute it and/or modify ...
cbeck88/fifengine
refs/heads/master
demos/rocket_demo/rocket_demo.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU L...
avadacatavra/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/pluggy/pluggy/__init__.py
41
import inspect import warnings from .callers import _multicall, HookCallError, _Result, _legacymulticall __version__ = '0.5.3.dev' __all__ = ["PluginManager", "PluginValidationError", "HookCallError", "HookspecMarker", "HookimplMarker"] class PluginValidationError(Exception): """ plugin failed valida...
pkuyym/Paddle
refs/heads/develop
python/paddle/trainer_config_helpers/tests/configs/test_fc.py
7
# Copyright (c) 2018 PaddlePaddle 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 app...
TansyArron/pants
refs/heads/master
src/python/pants/util/xml_parser.py
34
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from xml.dom.minidom...
yongtang/tensorflow
refs/heads/master
tensorflow/tools/pip_package/simple_console.py
603
# 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...
quxiaolong1504/django
refs/heads/master
django/contrib/gis/db/models/sql/__init__.py
476
from django.contrib.gis.db.models.sql.conversion import ( AreaField, DistanceField, GeomField, GMLField, ) __all__ = [ 'AreaField', 'DistanceField', 'GeomField', 'GMLField' ]
joebowen/LogMyRocket_API
refs/heads/master
LogMyRocket/libraries/sys_packages/py/py/_code/_assertionold.py
218
import py import sys, inspect from compiler import parse, ast, pycodegen from py._code.assertion import BuiltinAssertionError, _format_explanation passthroughex = py.builtin._sysex class Failure: def __init__(self, node): self.exc, self.value, self.tb = sys.exc_info() self.node = node class View(...
languagelab/Django-Currencies
refs/heads/master
currencies/views.py
1
from django.http import HttpResponseRedirect from currencies.models import Currency def set_currency(request): if request.method == 'POST': currency_code = request.POST.get('currency', None) next = request.POST.get('next', None) else: currency_code = request.GET.get('currency', None) next = request.GET.get(...
zouzhberk/ambaridemo
refs/heads/master
demo-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs.py
1
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
ic-hep/DIRAC
refs/heads/rel-v6r15
ConfigurationSystem/Client/Helpers/__init__.py
19
# $HeadURL$ """ DIRAC.ConfigurationSystem.Client.Helpers package """ __RCSID__ = "$Id$" from DIRAC.ConfigurationSystem.Client.Helpers.Path import * from DIRAC.ConfigurationSystem.Client.Helpers.CSGlobals import getCSExtensions, getInstalledExtensions, getVO
ThiefMaster/indico
refs/heads/master
indico/modules/events/abstracts/__init__.py
3
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import render_template, session from indico.core import signals from indico.core.config import...
JFriel/honours_project
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/command/install_scripts.py
285
from distutils.command.install_scripts import install_scripts \ as _install_scripts from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log class install_scripts(_install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def ini...
bobsilverberg/oneanddone-sugardough
refs/heads/master
oneanddone/tasks/tests/test_views.py
1
# 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/. from django.core.urlresolvers import reverse from mock import Mock, patch from nose.tools import eq_, ok_, assert_dict_c...
felixfontein/ansible
refs/heads/devel
test/support/windows-integration/plugins/modules/win_file.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], ...
yephper/django
refs/heads/master
tests/template_tests/filter_tests/test_center.py
1
from django.template.defaultfilters import center from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class CenterTests(SimpleTestCase): @setup({'center01': '{% autoescape off %}.{{ a|center:"5" }}. .{{ b|center:"5" }}.{% endautoescape...
havard024/prego
refs/heads/master
venv/bin/rst2man.py
1
#!/var/www/django/treeio/venv/bin/python # Author: # Contact: grubert@users.sf.net # Copyright: This module has been placed in the public domain. """ man.py ====== This module provides a simple command line interface that uses the man page writer to output from ReStructuredText source. """ import locale try: l...
PennartLoettring/Poettrix
refs/heads/master
rootfs/usr/lib/python3.4/idlelib/textView.py
12
"""Simple text browser for IDLE """ from tkinter import * import tkinter.messagebox as tkMessageBox class TextViewer(Toplevel): """A simple text viewer dialog for IDLE """ def __init__(self, parent, title, text, modal=True): """Show the given text in a scrollable window with a 'close' button ...
sobercoder/gem5
refs/heads/master
configs/ruby/GPU_VIPER.py
12
# # Copyright (c) 2011-2015 Advanced Micro Devices, Inc. # All rights reserved. # # For use for simulation and test purposes only # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source co...
tboyce021/home-assistant
refs/heads/dev
homeassistant/components/mqtt_json/__init__.py
36
"""The mqtt_json component."""
marcocaccin/scikit-learn
refs/heads/master
examples/feature_selection/feature_selection_pipeline.py
342
""" ================== Pipeline Anova SVM ================== Simple usage of Pipeline that runs successively a univariate feature selection with anova and then a C-SVM of the selected features. """ print(__doc__) from sklearn import svm from sklearn.datasets import samples_generator from sklearn.feature_selection imp...
DestrinStorm/deep-learning
refs/heads/master
transfer-learning/tensorflow_vgg/test_vgg19.py
152
import numpy as np import tensorflow as tf from tensoflow_vgg import vgg19 from tensoflow_vgg import utils img1 = utils.load_image("./test_data/tiger.jpeg") img2 = utils.load_image("./test_data/puzzle.jpeg") batch1 = img1.reshape((1, 224, 224, 3)) batch2 = img2.reshape((1, 224, 224, 3)) batch = np.concatenate((batc...
DGrady/pandas
refs/heads/master
pandas/tests/series/test_analytics.py
2
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from itertools import product from distutils.version import LooseVersion import pytest from numpy import nan import numpy as np import pandas as pd from pandas import (Series, Categorical, DataFrame, isna, notna, bdate_range, date_range, _np_versi...
mderanty/Projet_Insset
refs/heads/master
vendor/doctrine/orm/docs/en/conf.py
2448
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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 file. ...
jfdsmit/django-blog-zinnia
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- # # django-blog-zinnia documentation build configuration file, created by # sphinx-quickstart on Thu Oct 21 17:44:20 2010. # # 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 fi...
GeoMop/GeoMop
refs/heads/master
testing/LayerEditor/test_layer_editor.py
1
import LayerEditor.layer_editor as layer_editor from PyQt5.QtTest import QTest from PyQt5.QtCore import QTimer, Qt import testing.LayerEditor.mock.mock_config as mockcfg import pytest import pytestqt import sys @pytest.mark.qt def test_err_dialog(): global dialog_result, editor dialog_result = {} mockcfg...
MrReN/django-oscar
refs/heads/master
sites/demo/settings.py
1
""" Settings for Oscar's demo site. Notes: * The demo site uses the stores extension which requires a spatial database. Only the postgis and spatialite backends are tested, but all backends supported by GeoDjango should work. """ import os # Django settings for oscar project. PROJECT_DIR = os.path.dirname(__fi...