repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
TheVirtualLtd/bda.plone.payment
src/bda/plone/payment/cash_on_delivery/__init__.py
2
1815
# -*- coding: utf-8 -*- # TODO: fix dependency on bda.plone.orders. # this invalidates the dependency chain. from bda.plone.orders.common import get_order from bda.plone.payment import Payment from bda.plone.payment import Payments from Products.Five import BrowserView from zope.i18nmessageid import MessageFactory from...
bsd-3-clause
jolevq/odoopub
extra-addons/base_report/ir_actions.py
7
8463
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
agpl-3.0
chenzheng128/ns-3-dev-git
src/point-to-point-layout/bindings/callbacks_list.py
240
1159
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...
gpl-2.0
smkr/pyclipse
plugins/org.python.pydev.jython/jysrc/template_helper.py
11
1950
#@PydevCodeAnalysisIgnore from org.python.pydev.editor.templates import PyTemplateVariableResolver #=================================================================================================== # CallableTemplateVariableResolver #===================================================================================...
epl-1.0
slisson/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/jp/jp_prefectures.py
543
2089
from django.utils.translation import ugettext_lazy JP_PREFECTURES = ( ('hokkaido', ugettext_lazy('Hokkaido'),), ('aomori', ugettext_lazy('Aomori'),), ('iwate', ugettext_lazy('Iwate'),), ('miyagi', ugettext_lazy('Miyagi'),), ('akita', ugettext_lazy('Akita'),), ('yamagata', ugettext_lazy('Yamagat...
apache-2.0
MrLoick/python-for-android
python3-alpha/python3-src/Tools/scripts/reindent.py
48
11022
#! /usr/bin/env python3 # Released to the public domain, by Tim Peters, 03 October 2000. """reindent [-d][-r][-v] [ path ... ] -d (--dryrun) Dry run. Analyze, but don't make any changes to, files. -r (--recurse) Recurse. Search for all .py files in subdirectories too. -n (--nobackup) No backup. Does not make ...
apache-2.0
bgris/ODL_bgris
lib/python3.5/site-packages/numpy/lib/tests/test_recfunctions.py
89
30630
from __future__ import division, absolute_import, print_function import numpy as np import numpy.ma as ma from numpy.ma.mrecords import MaskedRecords from numpy.ma.testutils import assert_equal from numpy.testing import TestCase, run_module_suite, assert_ from numpy.lib.recfunctions import ( drop_fields, rename_fi...
gpl-3.0
chand3040/sree_odoo
openerp/addons/l10n_ve/__openerp__.py
260
2960
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved ############################################################################## # Modu...
agpl-3.0
factorlibre/OCB
addons/product_visible_discount/product_visible_discount.py
54
6170
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
Daniel-CA/odoo
addons/account_anglo_saxon/purchase.py
427
2043
# -*- encoding: 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 t...
agpl-3.0
ravello/testmill
lib/testmill/test/test_ssh.py
1
4148
# Copyright 2012-2013 Ravello Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
2013Commons/HUE-SHARK
apps/oozie/src/oozie/migrations/0012_auto__add_subworkflow__chg_field_email_subject__chg_field_email_body.py
39
23391
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SubWorkflow' db.create_table('oozie_subworkflow', ( ('propagate_configuration', self.g...
apache-2.0
OptimusGitEtna/RestSymf
Python-3.4.2/Lib/encodings/iso8859_4.py
272
13376
""" Python Character Mapping Codec iso8859_4 generated from 'MAPPINGS/ISO8859/8859-4.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,input,errors='...
mit
artwr/airflow
tests/contrib/operators/test_sftp_operator.py
6
18782
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
brownhead/mangoengine
mangoengine/tests/test_fields.py
1
7534
# internal from ..errors import ValidationFailure from ..fields import * from .. import models # external import pytest class ExtendedValue: """ Used in the TEST_CASES list below to describe a test case where particular arguments need to be fed into the constructor the Field before validating. :i...
unlicense
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/google/protobuf/internal/packed_field_test_pb2.py
2
20344
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/internal/packed_field_test.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.p...
mit
caidongyun/pylearn2
pylearn2/sandbox/nlp/datasets/penntree.py
44
6947
""" Dataset wrapper for the Penn Treebank dataset See: http://www.cis.upenn.edu/~treebank/ """ __authors__ = "Bart van Merrienboer" __copyright__ = "Copyright 2010-2014, Universite de Montreal" __license__ = "3-clause BSD" from functools import wraps import warnings import numpy as np from numpy.lib.stride_tricks im...
bsd-3-clause
duncanmmacleod/gwsumm
gwsumm/state/registry.py
2
3034
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
gpl-3.0
swjtuacmer/Ranker
Ranker/venv/lib/python2.7/site-packages/pkg_resources/_vendor/appdirs.py
335
22374
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
mit
takeshineshiro/django
tests/gis_tests/distapp/models.py
259
1365
from django.utils.encoding import python_2_unicode_compatible from ..models import models from ..utils import gisfield_may_be_null @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True ...
bsd-3-clause
carlan/dailyprogrammer
easy/2/python/app.py
1
1039
#!/usr/bin/env python # -*- coding: utf-8 -*- """app.py: challenge #2""" __author__ = "Carlan Calazans" __copyright__ = "Copyright 2016, Carlan Calazans" __credits__ = ["Carlan Calazans"] __license__ = "MIT" __version__ = "1.0.0" __maintainer__ = "Carlan Calazans" __email__ = "carlancalazans at gmail dot com" __status...
mit
pombredanne/scrapy
tests/test_spiderstate.py
113
1056
import os from datetime import datetime from twisted.trial import unittest from scrapy.extensions.spiderstate import SpiderState from scrapy.spiders import Spider class SpiderStateTest(unittest.TestCase): def test_store_load(self): jobdir = self.mktemp() os.mkdir(jobdir) spider = Spider(...
bsd-3-clause
pokutnik/skype4py
Skype4Py/lang/nl.py
23
6847
apiAttachAvailable = u'API beschikbaar' apiAttachNotAvailable = u'Niet beschikbaar' apiAttachPendingAuthorization = u'Wacht op autorisatie' apiAttachRefused = u'Geweigerd' apiAttachSuccess = u'Succes' apiAttachUnknown = u'Onbekend' budDeletedFriend = u'Van de vriendenlijst verwijderd' budFriend = u'Vriend' budNeverBeen...
bsd-3-clause
onoga/toolib
toolib/wx/controls/CalendarPanel.py
2
6132
import wx import wx.calendar import datetime import locale from toolib.util import locales BORDER = 5 CALENDAR_DELTA_WIDTH = 4 TODAY_BORDER = wx.calendar.CAL_BORDER_NONE TODAY_BORDER_COLOUR = "blue" TODAY_BG_COLOUR = wx.Colour(0xD0, 0xD0, 0xD0) def iterWeekdays(year, month, weekday = 6): d = datetime.date(year, mon...
gpl-2.0
philipz/PyCV-time
opencv-official-samples/3.0.0/opt_flow.py
8
2410
#!/usr/bin/env python import numpy as np import cv2 import video help_message = ''' USAGE: opt_flow.py [<video_source>] Keys: 1 - toggle HSV flow visualization 2 - toggle glitch ''' def draw_flow(img, flow, step=16): h, w = img.shape[:2] y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1) fx,...
mit
cchurch/ansible
test/units/modules/remote_management/oneview/test_oneview_fcoe_network.py
68
5980
# -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
gpl-3.0
dturner-tw/pants
tests/python/pants_test/backend/jvm/tasks/test_classpath_products.py
6
20530
# 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) import os from pant...
apache-2.0
ahmedaljazzar/edx-platform
common/lib/xmodule/xmodule/tests/test_graders.py
13
16554
""" Grading tests """ import unittest from datetime import datetime, timedelta import ddt from pytz import UTC from lms.djangoapps.grades.scores import compute_percent from six import text_type from xmodule import graders from xmodule.graders import ( AggregatedScore, ProblemScore, ShowCorrectness, aggregate_scor...
agpl-3.0
cloudbase/cinder
cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py
16
1978
# (c) Copyright 2014 Cisco Systems 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 # # Unl...
apache-2.0
kkreis/espressopp
src/integrator/LangevinThermostat.py
7
2954
# Copyright (C) 2012,2013,2014,2015,2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the...
gpl-3.0
yavalvas/yav_com
build/matplotlib/examples/pylab_examples/trigradient_demo.py
7
3075
""" Demonstrates computation of gradient with matplotlib.tri.CubicTriInterpolator. """ from matplotlib.tri import Triangulation, UniformTriRefiner,\ CubicTriInterpolator import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import math #-----------------------------------------------------...
mit
chrisb13/mkmov
commands/_threedsurf.py
6
3107
## Author: Christopher Bull. ## Affiliation: Climate Change Research Centre and ARC Centre of Excellence for Climate System Science. ## Level 4, Mathews Building ## University of New South Wales ## Sydney, NSW, Australia, 2052 ## Contact: z3457920@student.unsw.edu.au ...
gpl-3.0
rmfitzpatrick/ansible
lib/ansible/modules/packaging/os/swupd.py
49
9152
#!/usr/bin/python # (c) 2017, Alberto Murillo <alberto.murillo.silva@intel.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_version': '1.1', ...
gpl-3.0
Tennyson53/magnum
magnum/common/pythonk8sclient/client/models/V1beta3_EndpointAddress.py
15
1585
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
apache-2.0
zorojean/scikit-learn
sklearn/linear_model/tests/test_sparse_coordinate_descent.py
244
9986
import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_true from sklearn.utils.t...
bsd-3-clause
MrTheodor/espressopp
examples/lattice_boltzmann/extForces/gravity_like.py
5
3470
#!/usr/bin/env python2 # Copyright (C) 2016-2017(H) # Max Planck Institute for Polymer Research # # This file is part of ESPResSo++. # # ESPResSo++ 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, eit...
gpl-3.0
iamport/iamport-rest-client-python
tests/test_cancel.py
1
1992
# -*- coding: utf-8 -*- import pytest def test_cancel(iamport): with pytest.raises(TypeError): iamport.cancel(imp_uid='nothing') with pytest.raises(iamport.ResponseError): iamport.cancel('reason', imp_uid='nothing') try: iamport.cancel('reason', imp_uid='nothing') except iampor...
mit
fmalina/python-netsuite
netsuite/test_data.py
1
1266
from netsuite.utils import obj test_data = { 'line_items': [ {'internal_id': 165, 'quantity': 1} ], 'first_name': 'Joe', 'last_name': 'Bloggs', 'phone_number': '777777777', 'email': 'fmalina@gmail.com', 'password': 'ovcaaaa', 'marketing_agreement': True, 'shipping_address': { 'address_line_1': '7...
bsd-3-clause
hubert667/AIR
build/billiard/billiard/__init__.py
2
8441
"""Python multiprocessing fork with improvements and bugfixes""" # # Package analogous to 'threading.py' but using processes # # multiprocessing/__init__.py # # This package is intended to duplicate the functionality (and much of # the API) of threading.py but uses processes instead of threads. A # subpackage 'multipr...
gpl-3.0
adambreznicky/python
Early/countyMilestotal3query2.py
2
2021
# Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 ## Type "copyright", "credits" or "license()" for more information. # **************************************************************** # Personal firewall software may warn about the connection IDLE # makes to its subproce...
mit
imsparsh/python-for-android
python3-alpha/python3-src/Lib/encodings/tis_620.py
272
12300
""" Python Character Mapping Codec tis_620 generated from 'python-mappings/TIS-620.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,input,errors='st...
apache-2.0
wujiku/superstar-kernel-shooter-2.3.4gb
tools/perf/scripts/python/sctop.py
895
1936
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
indro/t2c
libs/external_libs/vobject-0.6.6/vobject/hcalendar.py
32
4205
""" hCalendar: A microformat for serializing iCalendar data (http://microformats.org/wiki/hcalendar) Here is a sample event in an iCalendar: BEGIN:VCALENDAR PRODID:-//XYZproduct//EN VERSION:2.0 BEGIN:VEVENT URL:http://www.web2con.com/ DTSTART:20051005 DTEND:20051008 SUMMARY:Web 2.0 Conference LOCATION:Argen...
mit
carepack/android_kernel_google_msm
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
eayunstack/horizon
openstack_dashboard/api/swift.py
14
12399
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
nicksiyer/nicksiyer.github.io
node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
5099
#!/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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
mit
endlessm/chromium-browser
third_party/angle/scripts/roll_deps.py
1
23160
#!/usr/bin/env python # Copyright 2019 The ANGLE project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contri...
bsd-3-clause
csrocha/OpenUpgrade
addons/purchase_requisition/wizard/__init__.py
376
1112
# -*- 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...
agpl-3.0
ansible/ansible-modules-extras
monitoring/sensu_check.py
23
13780
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann <aim@secoya.dk> # # 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 Licen...
gpl-3.0
dulems/hue
desktop/core/ext-py/python-openid-2.2.5/examples/djopenid/server/views.py
63
9294
""" This module implements an example server for the OpenID library. Some functionality has been omitted intentionally; this code is intended to be instructive on the use of this library. This server does not perform actual user authentication and serves up only one OpenID URL, with the exception of IDP-generated id...
apache-2.0
towerjoo/DjangoNotes
Django-1.5.1/django/contrib/localflavor/au/models.py
197
1303
from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import CharField from django.contrib.localflavor.au.au_states import STATE_CHOICES from django.contrib.localflavor.au import forms class AUStateField(CharField): description = _("Australian State") def __init__(self, *args,...
mit
googleapis/python-talent
google/cloud/talent_v4beta1/types/__init__.py
1
5978
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
takis/odoo
addons/gamification/models/__init__.py
389
1038
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
wilsonkichoi/zipline
zipline/utils/factory.py
3
10385
# # Copyright 2013 Quantopian, 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 wr...
apache-2.0
chrismeyersfsu/ansible
lib/ansible/modules/network/f5/bigip_facts.py
32
61969
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013, Matt Hite <mhite@hotmail.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 Licens...
gpl-3.0
jhg/django
django/contrib/staticfiles/management/commands/runserver.py
248
1361
from django.conf import settings from django.contrib.staticfiles.handlers import StaticFilesHandler from django.core.management.commands.runserver import \ Command as RunserverCommand class Command(RunserverCommand): help = "Starts a lightweight Web server for development and also serves static files." d...
bsd-3-clause
Esser420/EvilTwinFramework
core/SessionManager/sessionmanager.py
1
8535
""" This is a Singleton Class used for managing pentesting sessions. The class holds information about the current session such as: - Command History - Event History - Session Data (info stored in AirScanner and AirInjector classes) The class will also be able to log events that will result in a report file. This is ...
gpl-2.0
Workday/OpenFrame
tools/telemetry/third_party/gsutilz/third_party/boto/boto/fps/__init__.py
429
1101
# Copyright (c) 2008, Chris Moyer http://coredumped.org # # 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, modify, ...
bsd-3-clause
AkademieOlympia/sympy
sympy/matrices/expressions/tests/test_inverse.py
92
1261
from sympy.core import symbols from sympy.matrices.expressions import MatrixSymbol, Inverse from sympy.matrices import eye, Identity, ShapeError from sympy.utilities.pytest import raises from sympy import refine, Q n, m, l = symbols('n m l', integer=True) A = MatrixSymbol('A', n, m) B = MatrixSymbol('B', m, l) C = Mat...
bsd-3-clause
DonaldMcRonald/SketchRecognitionWithTensorFlow
src/main/python/proto_decoder/proto_handler.py
1
2623
from generated_proto import pythonRecognitionService_pb2 as rec_proto import recognition.recognition_manager from generated_proto import sketch_pb2 as Sketch from gui import plotter import os rec = recognition.recognition_manager.Recognition_manager() rec.initialize() def generate_shapes(recognition_template...
mit
realsaiko/odoo
addons/website_gengo/__init__.py
316
1024
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
agpl-3.0
mgadi/naemonbox
sources/psdash/pyzmq-13.1.0/build/lib.linux-x86_64-2.7/zmq/devices/__init__.py
6
1046
"""0MQ Device classes for running in background threads or processes.""" #----------------------------------------------------------------------------- # Copyright (c) 2010-2012 Brian Granger, Min Ragan-Kelley # # This file is part of pyzmq # # Distributed under the terms of the New BSD License. The full license i...
gpl-2.0
michaelkuty/mbot
setup.py
1
1907
#!/usr/bin/env python # -*- coding: utf-8 -*- import ast import re from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'python-slugify', 'parsedateti...
mit
rizumu/django
tests/null_fk_ordering/tests.py
381
2012
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Author, Comment, Forum, Post, SystemInfo class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
bsd-3-clause
nhr/openshift-ansible
roles/lib_openshift/src/class/oc_process.py
5
6666
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCProcess(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' # pylint allows 5. we need 6 # pylint: disable=too-many-arguments def __init__(self, namespace, tname=None...
apache-2.0
DinoCow/airflow
airflow/providers/amazon/aws/transfers/s3_to_sftp.py
7
3122
# # 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...
apache-2.0
biocore/American-Gut
scripts/mod2_pcoa.py
3
13711
#!/usr/bin/env python import os import click from matplotlib import use use('Agg') # noqa import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from skbio import read, DistanceMatrix from skbio.stats import isubsample from skbio.stats.ordination import OrdinationResults from col...
bsd-3-clause
liu602348184/django
django/template/utils.py
308
4736
import os import warnings from collections import Counter, OrderedDict from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache from django.utils._os import upath from django.utils.deprecation import RemovedInDjango110Warni...
bsd-3-clause
listamilton/supermilton.repository
plugin.video.roggerstream/pkcs7.py
111
1943
import binascii import StringIO class PKCS7Encoder(object): ''' RFC 2315: PKCS#7 page 21 Some content-encryption algorithms assume the input length is a multiple of k octets, where k > 1, and let the application define a method for handling inputs whose lengths are not a multiple of k octets. F...
gpl-2.0
labordoc/labordoc-next
modules/websubmit/lib/functions/Is_Referee.py
33
2305
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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...
gpl-2.0
maohongyuan/kbengine
kbe/src/lib/python/Lib/idlelib/rpc.py
71
20933
"""RPC Implemention, originally written for the Python Idle IDE For security reasons, GvR requested that Idle's Python execution server process connect to the Idle process, which listens for the connection. Since Idle has only one client per server, this was not a limitation. +---------------------------------+ +...
lgpl-3.0
foreversand/QSTK
Examples/Basic/tutorial2.py
6
2979
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on January, 24, 2013 @author: Sourabh Bajaj @contact: sourabhbajaj@gatech.edu @summary: Example tutorial code...
bsd-3-clause
Cinntax/home-assistant
homeassistant/components/device_tracker/setup.py
3
6277
"""Device tracker helpers.""" import asyncio from typing import Dict, Any, Callable, Optional from types import ModuleType import attr from homeassistant.core import callback from homeassistant.setup import async_prepare_setup_platform from homeassistant.helpers import config_per_platform from homeassistant.exception...
apache-2.0
CongSmile/tp-qemu
qemu/tests/yonit_bitmap.py
9
3571
import logging import signal from autotest.client.shared import error from virttest import utils_misc from generic.tests import guest_test @error.context_aware def run(test, params, env): """ Run yonit bitmap benchmark in Windows guests, especially win7 32bit, for regression test of BZ #556455. Ru...
gpl-2.0
davidzchen/tensorflow
tensorflow/python/ops/cond_v2.py
2
48340
# Copyright 2018 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...
apache-2.0
yawnosnorous/python-for-android
python3-alpha/python3-src/Lib/unittest/loader.py
46
13782
"""Loading unittests.""" import os import re import sys import traceback import types import functools from fnmatch import fnmatch from . import case, suite, util __unittest = True # what about .pyc or .pyo (etc) # we would need to avoid loading the same tests multiple times # from '.py', '.pyc' *and* '.pyo' VALID...
apache-2.0
mablae/weblate
manage.py
11
1084
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
gpl-3.0
yanheven/nova
nova/tests/unit/compute/test_arch.py
94
2077
# Copyright (C) 2014 Red Hat, 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 ...
apache-2.0
leomorsy/medical7.0
oemedical_emr/models/oemedical_diagnostic_hypothesis.py
3
1659
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free sof...
agpl-3.0
JonathanStein/odoo
addons/hr_payroll/report/report_payslip.py
377
1982
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
xaviercobain88/framework-python
openerp/addons/account_payment/report/payment_order.py
54
2988
# -*- 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...
agpl-3.0
LearningRegistry/LearningRegistry
LR/lr/util/validator.py
2
5077
# Copyright 2011 SRI International # 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...
apache-2.0
d3b-center/pedcbioportal
core/src/main/scripts/migrate_db.py
1
9846
#!/usr/bin/env python3 # imports import os import sys import contextlib import argparse from collections import OrderedDict import MySQLdb # globals ERROR_FILE = sys.stderr OUTPUT_FILE = sys.stdout DATABASE_HOST = 'db.host' DATABASE_NAME = 'db.portal_db_name' DATABASE_USER = 'db.user' DATABASE_PW = 'db.password'...
agpl-3.0
campagnola/acq4
acq4/devices/ThorlabsFilterWheel/FilterWheelTemplate.py
4
5035
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\FilterWheelTemplate.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _...
mit
albsierra/tutores
vendor/sonata-project/admin-bundle/Resources/doc/conf.py
77
7893
# -*- coding: utf-8 -*- # # IoC documentation build configuration file, created by # sphinx-quickstart on Fri Mar 29 01:43:00 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 file. # # All con...
mit
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/audiodev.py
1
7404
"""Classes for manipulating audio devices (currently only for Sun and SGI)""" __all__ = ["error","AudioDev"] class error(Exception): pass class Play_Audio_sgi: # Private instance variables ## if 0: access frameratelist, nchannelslist, sampwidthlist, oldparams, \ ## params, config, inited_...
mit
75651/kbengine_cloud
kbe/src/lib/python/Lib/test/test_io.py
60
128793
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
lgpl-3.0
laonawuli/addrest
web2py/gluon/contrib/login_methods/browserid_account.py
21
4471
#!/usr/bin/env python # -*- coding: utf-8 -*- """ BrowserID Authentication for web2py developed by Madhukar R Pai (Copyright 2012) Email <madspai@gmail.com> License : LGPL thanks and credits to the web2py community This custom authenticator allows web2py to authenticate using browserid (https...
mit
askrht/python-goose
goose/utils/encoding.py
26
4889
# -*- coding: utf-8 -*- import types import datetime from decimal import Decimal class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str__(self): original = UnicodeDecodeError.__str__(self) ...
apache-2.0
graphite-server/graphite-web
webapp/graphite/metrics/views.py
1
9716
"""Copyright 2009 Chris Davis 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 dist...
apache-2.0
wtbarnes/solarnmf
bin/make_composite_plots.py
1
1884
#make_composite_plots.py #Will Barnes #21 April 2015 #Import needed modules import sys import pickle import argparse import numpy as np sys.path.append('../') from solarnmf_plotting import MakeBSSPlots #Parse command line arguments parser = argparse.ArgumentParser(description='Run NMF method for specific channel ov...
mit
thaumos/ansible
lib/ansible/plugins/lookup/indexed_items.py
100
1579
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 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 DOCUMENTATION = """ lookup: indexed_items author:...
gpl-3.0
bubbalinear/smartmeshsdk
cryptopy/crypto/cipher/wep.py
4
2849
""" crypto.cipher.wep The WEP encryption algorithm used in IEEE 802.11 Copyright (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. September 2002 """ from crypto.cipher.arc4 import ARC4 from crypto.errors import IntegrityCheckError, BadKeySizeError from zlib import crc32 from st...
bsd-3-clause
johnmgregoire/JCAPdatavis
echem_plate_test2.py
1
9412
import pickle import time, copy import os, os.path import sys import numpy from PyQt4.QtCore import * from PyQt4.QtGui import * from scipy import optimize from echem_plate_ui import * from echem_plate_math import * #p='C:/Users/Gregoire/Documents/CaltechWork/echemdrop/20120728NiFeCoTiplate1_test21Aug2012' #p='C:/Users...
bsd-3-clause
google/glazier
glazier/lib/actions/splice.py
1
1041
# Lint as: python3 # Copyright 2020 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 a...
apache-2.0
0asa/scikit-learn
sklearn/cluster/__init__.py
12
1331
""" The :mod:`sklearn.cluster` module gathers popular unsupervised clustering algorithms. """ from .spectral import spectral_clustering, SpectralClustering from .mean_shift_ import (mean_shift, MeanShift, estimate_bandwidth, get_bin_seeds) from .affinity_propagation_ import affinity_propagati...
bsd-3-clause
fusionpig/ansible
lib/ansible/cli/__init__.py
8
22436
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
gpl-3.0
google/google-visualization-python
examples/static_example.py
1
2749
#!/usr/bin/python # # Copyright (C) 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 ...
apache-2.0
rnikiforova/GuruTubeProject
GuruTube/libraries/django/db/models/sql/datastructures.py
114
1853
""" Useful auxilliary data structures for query construction. Not useful outside the SQL domain. """ class EmptyResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was attempted (if the caller wants to treat that ...
bsd-3-clause
rationalAgent/edx-platform-custom
lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py
80
7637
# -*- 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 'StudentModuleHistory.version' db.alter_column('courseware_studentmodulehistory', 'version...
agpl-3.0