repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
jmcarbo/openerp7
openerp/addons/purchase_requisition/__init__.py
63
1087
############################################################################## # # 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 Affero General Publ...
agpl-3.0
sudheesh001/oh-mainline
vendor/packages/oauthlib/tests/oauth2/rfc6749/grant_types/test_implicit.py
26
1646
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from ....unittest import TestCase import mock from oauthlib import common from oauthlib.common import Request from oauthlib.oauth2.rfc6749.grant_types import ImplicitGrant from oauthlib.oauth2.rfc6749.tokens import BearerToken class Imp...
agpl-3.0
mohamed--abdel-maksoud/chromium.src
build/android/adb_install_apk.py
53
3322
#!/usr/bin/env python # # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility script to install APKs from the command line quickly.""" import optparse import os import sys from pylib import andr...
bsd-3-clause
ScreamingUdder/mantid
scripts/test/VesuvioProfileTest.py
3
12091
import unittest from mantid.simpleapi import * from vesuvio.profiles import (create_from_str, GaussianMassProfile, MultivariateGaussianMassProfile, GramCharlierMassProfile) # -------------------------------------------------------------------------------- # ...
gpl-3.0
mrven/origin_align_addon
OriginAlign.py
1
5309
#02.05.2015 #Ivan "mrven" Vostrikov bl_info = { "name": "Origin Align", 'author': 'Ivan Vostrikov', 'version': (1, 0, 1), 'blender': (2, 7, 4), 'location': '3d view > Object > Origin Align X/Y/Z', 'description': 'In object mode, sets object origin to selected axis of 3D Cursor', 'wiki_url'...
gpl-2.0
GoogleCloudPlatform/python-docs-samples
storage/s3-sdk/noxfile_config.py
1
2085
# Copyright 2021 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 agreed to in writing, ...
apache-2.0
aquavitae/rst2pdf
rst2pdf/findfonts.py
2
13423
#!/usr/bin/env python # -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms """ Scan a list of folders and find all .afm files, then create rst2pdf-ready font-aliases. """ import os import sys from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import ( TTFont, TTFontFile, TTF...
mit
googleads/google-ads-python
google/ads/googleads/v6/services/services/google_ads_field_service/client.py
1
21308
# -*- 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 o...
apache-2.0
broesamle/servo
tests/wpt/web-platform-tests/tools/pytest/doc/en/conf.py
190
10171
# -*- coding: utf-8 -*- # # pytest documentation build configuration file, created by # sphinx-quickstart on Fri Oct 8 17:54:28 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. # # All ...
mpl-2.0
bohdan-shramko/learning-python
source/sublime-packages/Packages/pygments/all/pygments/lexers/_mql_builtins.py
48
24736
# -*- coding: utf-8 -*- """ pygments.lexers._mql_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Builtins for the MqlLexer. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ types = ( 'AccountBalance', 'AccountCompany', 'AccountCredit...
mit
bealdav/OCB
addons/edi/__openerp__.py
312
1911
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
tuxfux-hlp-notes/python-batches
batch-67/19-files/myenv/lib/python2.7/site-packages/setuptools/command/upload_docs.py
173
7311
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import ...
gpl-3.0
jumpojoy/neutron
neutron/openstack/common/_i18n.py
48
1728
# 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 # d...
apache-2.0
doucol/mysite
mysite/settings.py
1
2120
""" Django settings for mysite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
mit
c-o-m-m-a-n-d-e-r/CouchPotatoServer
libs/xmpp/simplexml.py
198
22791
## simplexml.py based on Mattew Allum's xmlstream.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## 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, or (...
gpl-3.0
labase/brython_crafty
src/crafty/graphics.py
1
7243
#! /usr/bin/env python # -*- coding: UTF8 -*- """ ############################################################ Graphic handling classes ############################################################ :Author: *Carlo E. T. Oliveira* :Contact: carlo@nce.ufrj.br :Date: 2014/09/17 :Status: This is a "work in progress" :Revis...
gpl-2.0
aflaxman/scikit-learn
sklearn/__check_build/__init__.py
13
1679
""" Module to give helpful messages to the user that did not compile the scikit properly. """ import os INPLACE_MSG = """ It appears that you are importing a local scikit-learn source tree. For this, you need to have an inplace install. Maybe you are in the source directory and you need to try from another location.""...
bsd-3-clause
Innovahn/odoo.old
addons/l10n_fr/report/compute_resultant_report.py
374
4004
# -*- coding: utf-8 -*- # # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users w...
agpl-3.0
joa/haxe-sublime2-bundle
features/haxe_create_type.py
1
3178
import sublime_plugin import sublime import os try: # Python 3 from ..HaxeHelper import HaxeComplete_inst, isType except (ValueError): # Python 2 from HaxeHelper import HaxeComplete_inst, isType class HaxeCreateType( sublime_plugin.WindowCommand ): classpath = None currentFile = None currentSrc ...
apache-2.0
meredith-digops/ansible
test/sanity/validate-modules/test_validate_modules_regex.py
162
2807
#!/usr/bin/env python # This is a standalone test for the regex inside validate-modules # It is not suitable to add to the make tests target because the # file under test is outside the test's sys.path AND has a hyphen # in the name making it unimportable. # # To execute this by hand: # 1) cd <checkoutdir> # 2) so...
gpl-3.0
Lucifer-Kim/scrapy
tests/test_utils_log.py
140
3417
# -*- coding: utf-8 -*- from __future__ import print_function import sys import logging import unittest from testfixtures import LogCapture from twisted.python.failure import Failure from scrapy.utils.log import (failure_to_exc_info, TopLevelFormatter, LogCounterHandler, StreamLogger) fr...
bsd-3-clause
zasdfgbnm/tensorflow
tensorflow/contrib/quantize/python/graph_matcher.py
5
7970
# 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...
apache-2.0
gameduell/duell
bin/win/python2.7.9/Lib/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py
2927
4793
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
bsd-2-clause
raulshepherd/ardupilot-solo
Tools/LogAnalyzer/tests/TestGPSGlitch.py
273
2325
from LogAnalyzer import Test,TestResult import DataflashLog class TestGPSGlitch(Test): '''test for GPS glitch reporting or bad GPS data (satellite count, hdop)''' def __init__(self): Test.__init__(self) self.name = "GPS" def run(self, logdata, verbose): self.result = TestResult() self.result.status = Tes...
gpl-3.0
bq/bitbloq-offline
app/res/web2board/darwin/Web2Board.app/Contents/Resources/res/Scons/sconsFiles/SCons/Variables/__init__.py
6
11072
"""engine.SCons.Variables This file defines the Variables class that is used to add user-friendly customizable variables to an SCons build. """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated document...
gpl-3.0
Daniel-CA/odoomrp-wip-public
sale_order_allowed_product/models/sale_order.py
10
3467
# -*- coding: utf-8 -*- # © 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # © 2015 AvanzOsc (http://www.avanzosc.es) # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 from openerp import api, fields, models from openerp.tools import ustr class SaleOrder(models.Model): _inherit = "sale.order" only_...
agpl-3.0
meisterkleister/bench
bench/production_setup.py
10
2739
from .utils import get_program, exec_cmd, get_cmd_output, fix_prod_setup_perms, get_config from .config import generate_nginx_config, generate_supervisor_config from jinja2 import Environment, PackageLoader import os import shutil def restart_service(service): if os.path.basename(get_program(['systemctl']) or '') == ...
gpl-3.0
hawkinchina/facebook-
infer/lib/capture/mvn.py
2
1800
# # Copyright (c) 2013- Facebook. All rights reserved. # import os import re import util MODULE_NAME = __name__ MODULE_DESCRIPTION = '''Run analysis of code built with a command like: mvn [options] [task] Analysis examples: infer -- mvn build''' def gen_instance(*args): return MavenCapture(*args) # This creat...
bsd-3-clause
georgemarshall/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Script/Interactive.py
61
14083
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
apache-2.0
uclouvain/osis
base/tests/ddd/test_business_validator.py
1
7504
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
abhikeshav/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ipv4_acl_cfg.py
1
80123
""" Cisco_IOS_XR_ipv4_acl_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR ipv4\-acl package configuration. This module contains definitions for the following management objects\: ipv4\-acl\-and\-prefix\-list\: IPv4 ACL configuration data Copyright (c) 2013\-2015 by Cisco Systems, Inc. ...
apache-2.0
procrastinatio/mapproxy
mapproxy/test/system/test_combined_sources.py
5
13027
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
apache-2.0
MichalKononenko/rmc
shared/tasks.py
8
1315
import celery import logging import os import subprocess import rmc.shared.constants as c app = celery.Celery('tasks', broker='redis://%(hostname)s:%(port)d/%(db)d' % { 'hostname': c.REDIS_HOST, 'port': c.REDIS_PORT, 'db': c.REDIS_DB }) app.conf.update( CELERY_TASK_SERIALIZER='json', CELERY_ACCEP...
mit
hasgeek/funnel
funnel/models/reorder_mixin.py
1
5123
from __future__ import annotations from typing import TypeVar, Union from uuid import UUID from coaster.sqlalchemy import Query from . import db __all__ = ['ReorderMixin'] # Use of TypeVar for subclasses of ReorderMixin as defined in this mypy ticket: # https://github.com/python/mypy/issues/1212 Reorderable = Typ...
agpl-3.0
rajalokan/keystone
keystone/tests/unit/policy/test_backends.py
6
3055
# 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 under t...
apache-2.0
djbaldey/django
tests/sites_framework/tests.py
99
2907
from django.apps import apps from django.conf import settings from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.core import checks from django.db import models from django.test import TestCase from .models import ( AbstractArticle, CustomArticle, ...
bsd-3-clause
csparkresearch/ExpEYES17-Qt
SPARK17/textManual/MarkdownPP/Processor.py
1
2387
# Copyright 2015 John Reese # Licensed under the MIT license from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys if sys.version_info[0] != 2: basestring = str class Processor: """ Framework for allowing modules to modify the in...
mit
randynobx/ansible
lib/ansible/modules/network/nxos/nxos_igmp_snooping.py
55
10620
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
Bysmyyr/chromium-crosswalk
chrome/common/extensions/docs/server2/blob_reference_store.py
146
1119
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from appengine_wrappers import db from appengine_wrappers import BlobReferenceProperty BLOB_REFERENCE_BLOBSTORE = 'BlobReferenceBlobstore' class _Model...
bsd-3-clause
mohamed--abdel-maksoud/chromium.src
tools/telemetry/telemetry/timeline/trace_event_importer.py
9
14854
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' TraceEventImporter imports TraceEvent-formatted data into the provided model. This is a port of the trace event importer from https://code.google.com/p/tr...
bsd-3-clause
airelil/pywinauto-64
sandbox/_find_control_distance.py
3
3108
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at your opti...
lgpl-2.1
ryanralph/DIY-Piper
bitcoin/hash.py
6
1917
# # hash.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import absolute_import, division, print_function, unicode_literals import struct from bitcoin.serialize import * from bitcoin.coredefs import * ...
mit
2ndQuadrant/ansible
lib/ansible/plugins/callback/aws_resource_actions.py
38
2863
# (C) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callback: aws_resource_actions type: aggregate ...
gpl-3.0
arnedesmedt/dotfiles
.config/sublime-text-3/Packages.symlinkfollow/python-markdown/st3/markdown/odict.py
132
6044
from __future__ import unicode_literals from __future__ import absolute_import from . import util from copy import deepcopy class OrderedDict(dict): """ A dictionary that keeps its keys in the order in which they're inserted. Copied from Django's SortedDict with some modifications. """ def __new...
mit
thonkify/thonkify
src/lib/google/protobuf/service.py
243
9144
# 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...
mit
emoreno619/word_cloud
doc/conf.py
17
9715
# -*- coding: utf-8 -*- # # wordcloud documentation build configuration file, created by # sphinx-quickstart on Fri May 3 17:14:50 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. # #...
mit
hpcuantwerpen/easybuild-framework
easybuild/tools/containers/base.py
2
5675
# # # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
gpl-2.0
zmughal/pygments-mirror
pygments/sphinxext.py
23
4533
# -*- coding: utf-8 -*- """ pygments.sphinxext ~~~~~~~~~~~~~~~~~~ Sphinx extension to generate automatic documentation of lexers, formatters and filters. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print...
bsd-2-clause
Adel-Magebinary/odoo
addons/account/report/account_partner_ledger.py
236
13439
# -*- 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
sh95119/godot
tools/bmfhdr/makehdr.py
50
1298
import sys if (len(sys.argv)!=2): print("Pass me a .fnt argument!") f = open(sys.argv[1],"rb") name = sys.argv[1].lower().replace(".fnt","") l = f.readline() font_height=0 font_ascent=0 font_charcount=0 font_chars=[] font_cc=0 while(l!=""): fs = l.strip().find(" ") if (fs==-1): l=f.readline() c...
mit
mixxorz/wagtail
wagtail/core/tests/test_sites.py
8
6017
from django.core.exceptions import ValidationError from django.http.request import HttpRequest from django.test import TestCase, override_settings from wagtail.core.models import Page, Site class TestSiteNaturalKey(TestCase): def test_natural_key(self): site = Site(hostname='example.com', port=8080) ...
bsd-3-clause
HEG-Arc/Appagoo
appagoo/allauth/account/forms.py
2
18617
from __future__ import absolute_import import warnings from django import forms from django.core.urlresolvers import reverse from django.core import exceptions from django.db.models import Q from django.utils.translation import pgettext, ugettext_lazy as _, ugettext from django.utils.importlib import import_module f...
bsd-3-clause
ykaneko/quantum
quantum/db/quota_db.py
2
6979
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apac...
apache-2.0
catapult-project/catapult
tracing/tracing/value/histogram_set.py
4
6725
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections from tracing.proto import histogram_proto from tracing.value import histogram as histogram from tracing.value import histogram_deserializ...
bsd-3-clause
arcolife/op-con
dump/src_old/libs/tweepy/streaming.py
2
7730
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. import httplib from socket import timeout from threading import Thread from time import sleep import urllib from libs.tweepy.models import Status from libs.tweepy.api import API from libs.tweepy.error import TweepError from libs.tweepy.utils ...
gpl-2.0
rocky/python3-trepan
trepan/processor/command/ipython.py
1
6554
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, 2013, 2015, 2017, 2020 Rocky Bernstein # # 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 op...
gpl-3.0
thedrow/django
django/template/__init__.py
198
2022
""" Django's support for templates. The django.template namespace contains two independent subsystems: 1. Multiple Template Engines: support for pluggable template backends, built-in backends and backend-independent APIs 2. Django Template Language: Django's own template engine, including its built-in loaders, ...
bsd-3-clause
Microvellum/Fluid-Designer
win64-vc/2.78/Python/lib/site-packages/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: # ...
gpl-3.0
partofthething/home-assistant
tests/components/flo/test_device.py
10
2344
"""Define tests for device-related endpoints.""" from datetime import timedelta from homeassistant.components.flo.const import DOMAIN as FLO_DOMAIN from homeassistant.components.flo.device import FloDeviceDataUpdateCoordinator from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.setup import...
mit
afaheem88/tempest
tempest/api/compute/admin/test_flavors.py
8
13323
# Copyright 2012 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...
apache-2.0
veprbl/root
tutorials/pyroot/zdemo.py
6
8396
## \file ## \ingroup tutorial_pyroot ## \notebook ## This macro is an example of graphs in log scales with annotations. ## ## The presented results ## are predictions of invariant cross-section of Direct Photons produced ## at RHIC energies, based on the universality of scaling function H(z). ## ## ## These Figures ...
lgpl-2.1
PongPi/isl-odoo
addons/account_voucher/report/__init__.py
378
1083
# -*- 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
alcides/rdflib
rdflib/syntax/parsers/rdfa/state.py
1
20868
# -*- coding: utf-8 -*- """ Parser's execution context (a.k.a. state) object and handling. The state includes: - dictionary for namespaces. Keys are the namespace prefixes, values are RDFLib Namespace instances - language, retrieved from C{@xml:lang} - URI base, determined by <base> (or set explicitly). This is ...
bsd-3-clause
Connexions/openstax-cms
openstax/settings/base.py
1
11195
# Django settings for openstax project. import os import sys import raven import logging.config from django.utils.log import DEFAULT_LOGGING PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..') BASE_DIR = PROJECT_ROOT # check if running local dev server - else default to DEBUG=False if len(sys.argv) > ...
agpl-3.0
bksim/chinese-translation
nltk/chat/iesha.py
5
3840
# Natural Language Toolkit: Teen Chatbot # # Copyright (C) 2001-2012 NLTK Project # Author: Selina Dennis <sjmd@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ This chatbot is a tongue-in-cheek take on the average teen anime junky that frequents YahooMessenger or MSNM....
apache-2.0
erizhang/shadowsocks
shadowsocks/crypto/openssl.py
1038
5414
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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
atsaki/libcloud
libcloud/test/compute/test_ikoula.py
64
1139
# 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 ...
apache-2.0
LTD-Beget/sprutio-rpc
lib/FileManager/workers/local/moveToWebDav.py
1
5842
import os import shutil import threading import time import traceback from lib.FileManager.FM import REQUEST_DELAY from lib.FileManager.WebDavConnection import WebDavConnection from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer class MoveToWebDav(BaseWorkerCustomer): def __init__(self, sou...
gpl-3.0
dhylands/upy-examples
rotary.py
1
2290
import pyb class rotary(): def __init__(self,Apin='X21',Bpin='X22'): self.B = pyb.Pin(Bpin) self.A = pyb.Pin(Apin) self.prevA = self.A.value() self.prevB = self.B.value() self.CWcount = 0 self.CCWcount = 0 self.position = 0 self.Bint = pyb.ExtInt(...
mit
Insoleet/aiohttp
tests/autobahn/client.py
21
1349
#!/usr/bin/env python3 import asyncio import aiohttp def client(loop, url, name): ws = yield from aiohttp.ws_connect(url + '/getCaseCount') num_tests = int((yield from ws.receive()).data) print('running %d cases' % num_tests) yield from ws.close() for i in range(1, num_tests + 1): print(...
apache-2.0
MKV21/glimpse_client
3rdparty/breakpad/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 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 of...
bsd-3-clause
appneta/boto
tests/integration/ec2/elb/__init__.py
454
1103
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.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, modi...
mit
foss-transportationmodeling/rettina-server
flask/lib/python2.7/site-packages/flask_wtf/i18n.py
117
1720
# coding: utf-8 """ flask_wtf.i18n ~~~~~~~~~~~~~~ Internationalization support for Flask WTF. :copyright: (c) 2013 by Hsiaoming Yang. """ from flask import _request_ctx_stack from flask_babel import get_locale from babel import support try: from wtforms.i18n import messages_path except ImportErro...
apache-2.0
magvugr/AT
EntVirtual/lib/python2.7/site-packages/django/template/backends/jinja2.py
63
3372
# Since this package contains a "django" module, this is required on Python 2. from __future__ import absolute_import import sys import jinja2 from django.conf import settings from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.utils import six from django.utils.module_loading import im...
gpl-3.0
wangyang59/tf_models
resnet/cifar_input.py
11
4463
# 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...
apache-2.0
saurabh6790/omn-app
accounts/doctype/accounts_settings/accounts_settings.py
12
1166
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from webnotes import _ from webnotes.utils import cint class DocType: def __init...
agpl-3.0
p2pjack/AK-eva333
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
DanielFloripa/GreenHop
Xbee/bibliotecas/pyserial-2.7/build/lib/serial/tools/list_ports_posix.py
6
3265
#!/usr/bin/env python # portable serial port access with python # This is a module that gathers a list of serial ports on POSIXy systems. # For some specific implementations, see also list_ports_linux, list_ports_osx # # this is a wrapper module for different platform implementations of the # port enumeration feature...
gpl-2.0
jstoxrocky/statsmodels
statsmodels/graphics/functional.py
31
14477
"""Module for functional boxplots.""" from statsmodels.compat.python import combinations, range import numpy as np from scipy import stats from scipy.misc import factorial from . import utils __all__ = ['fboxplot', 'rainbowplot', 'banddepth'] def fboxplot(data, xdata=None, labels=None, depth=None, method='MBD', ...
bsd-3-clause
alon/polinax
libs/external_libs/Pygments-0.11.1/pygments/formatter.py
27
2607
# -*- coding: utf-8 -*- """ pygments.formatter ~~~~~~~~~~~~~~~~~~ Base formatter class. :copyright: 2006-2007 by Georg Brandl, Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.util import get_bool_opt from pygments.styles import get_style_by_name __all__ = ['Formatt...
gpl-2.0
mozvip/Sick-Beard
sickbeard/versionChecker.py
1
18840
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0
asm0dey/Flexget
tests/test_misc.py
6
7989
from __future__ import unicode_literals, division, absolute_import import os import stat from tests import FlexGetBase from nose.plugins.attrib import attr from nose.tools import raises from flexget.entry import EntryUnicodeError, Entry class TestDisableBuiltins(FlexGetBase): """ Quick a hack, test disabl...
mit
strongh/GPy
GPy/kern/_src/todo/poly.py
19
5779
# Copyright (c) 2013, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from kernpart import Kernpart import numpy as np four_over_tau = 2./np.pi class POLY(Kernpart): """ Polynomial kernel parameter initialisation. Included for completeness, but generally not recomm...
bsd-3-clause
Transkribus/TranskribusDU
TranskribusDU/gcn/avg_checkpoints.py
1
4652
# Taken from https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/avg_checkpoints.py # coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
bsd-3-clause
KyoungRan/Django_React_ex
Django_React_Workshop-mbrochh/django/myvenv/lib/python3.4/site-packages/django/utils/dateformat.py
57
11885
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print(df.format('jS F Y H:i')) 7th October 2003 11:39 >>> """ from __future__ import unicode_literals import calendar import datetime import re impo...
mit
eino-makitalo/odoo
addons/hw_posbox_upgrade/controllers/main.py
95
3464
# -*- coding: utf-8 -*- import logging import os import time import openerp import openerp.addons.hw_proxy.controllers.main as hw_proxy import threading import subprocess from openerp import http from openerp.http import request from openerp.tools.translate import _ _logger = logging.getLogger(__name__) upgrade_temp...
agpl-3.0
vinay87/flyer
.buildozer/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py
2965
12784
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-2.0
MR64/android_kernel_htc_flounder
tools/perf/tests/attr.py
3174
9441
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
gpl-2.0
poiesisconsulting/openerp-restaurant
gamification/wizard/grant_badge.py
102
2281
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
Lh4cKg/sl4a
python/src/Lib/test/test_poplib.py
58
1866
import socket import threading import poplib import time from unittest import TestCase from test import test_support HOST = test_support.HOST def server(evt, serv): serv.listen(5) try: conn, addr = serv.accept() except socket.timeout: pass else: conn.send("+ Hola mundo\n") ...
apache-2.0
necozay/tulip-control
tulip/transys/export/graph2dot.py
1
17106
# Copyright (c) 2013-2014 by California Institute of Technology # 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 # notice,...
bsd-3-clause
frewsxcv/servo
tests/wpt/web-platform-tests/tools/pytest/_pytest/recwarn.py
178
7203
""" recording warnings during test function execution. """ import inspect import _pytest._code import py import sys import warnings import pytest @pytest.yield_fixture def recwarn(request): """Return a WarningsRecorder instance that provides these methods: * ``pop(category=None)``: return last warning matc...
mpl-2.0
moto-timo/robotframework
src/robot/utils/robotpath.py
1
5342
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
apache-2.0
venusdharan/ArduinoJson
third-party/gtest-1.7.0/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 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 of...
mit
kapdop/android_kernel_oneplus_msm8974
Documentation/target/tcm_mod_builder.py
4981
41422
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
liorvh/raspberry_pwn
src/pentest/metagoofil/hachoir_parser/archive/bzip2_parser.py
21
2880
""" BZIP2 archive file Author: Victor Stinner """ from hachoir_parser import Parser from hachoir_core.field import (ParserError, String, Bytes, Character, UInt8, UInt32, CompressedField) from hachoir_core.endian import LITTLE_ENDIAN from hachoir_core.text_handler import textHandler, hexadecimal try: from bz2...
gpl-3.0
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Tool/sunlink.py
4
2383
"""SCons.Tool.sunlink Tool-specific initialization for the Sun Solaris (Forte) linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is here...
lgpl-2.1
airbnb/airflow
airflow/utils/sqlalchemy.py
6
9358
# # 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
abdoosh00/edx-platform
lms/djangoapps/instructor/tests/test_tools.py
12
11487
""" Tests for views/tools.py. """ import datetime import functools import mock import json import unittest from django.test.utils import override_settings from django.utils.timezone import utc from courseware.models import StudentModule from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from...
agpl-3.0
aeklant/scipy
scipy/special/utils/makenpz.py
9
1822
""" python makenpz.py DIRECTORY Build a npz containing all data files in the directory. """ import os import numpy as np import argparse from distutils.util import newer def main(): p = argparse.ArgumentParser(usage=(__doc__ or '').strip()) p.add_argument('--use-timestamp', action='store_true', default=Fa...
bsd-3-clause