repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
Sorsly/subtle
google-cloud-sdk/lib/third_party/fancy_urllib/__init__.py
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software # Foundation; All Rights Reserved """A HTTPSConnection/Handler with additional proxy and cert validation features. In particular, monkey patches in Python r74203 to provide support for CONNECT proxies and adds SSL cert validation if the ssl modu...
UpYou/relay
my_gnuradio/gr/qa_argmax.py
#!/usr/bin/env python # # Copyright 2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) ...
fredericmohr/mitro
mitro-mail/build/venv/lib/python2.7/site-packages/sqlalchemy/orm/dynamic.py
# orm/dynamic.py # Copyright (C) 2005-2012 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 """Dynamic collection API. Dynamic collections act like Query() objects for read opera...
fredericmohr/mitro
mitro-mail/build/venv/lib/python2.7/site-packages/sqlalchemy/dialects/drizzle/base.py
# drizzle/base.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2010-2011 Monty Taylor <mordred@inaugust.com> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: drizz...
flodolo/bedrock
bedrock/security/migrations/0006_auto_20200122_0957.py
# 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 https://mozilla.org/MPL/2.0/. # Generated by Django 2.2.8 on 2020-01-22 17:57 from django.db import migrations, models import django_extensions.db....
addition-it-solutions/project-all
addons/point_of_sale/report/pos_lines.py
# -*- 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...
thenor/softwarecontainer
scripts/run-unit-tests.py
#!/usr/bin/env python # Copyright (C) 2016-2017 Pelagicore AB # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the # above copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AN...
Hi-Fi/robotframework-selenium2library
test/unit/keywords/test_browsermanagement.py
import unittest from Selenium2Library.keywords._browsermanagement import _BrowserManagementKeywords from selenium import webdriver class BrowserManagementTests(unittest.TestCase): def test_create_firefox_browser(self): test_browsers = ((webdriver.Firefox, "ff"), (webdriver.Firefox, "firEfOx")) ...
KaranToor/MA450
google-cloud-sdk/lib/googlecloudsdk/core/util/http_proxy_types.py
# Copyright 2016 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 ag...
nkgilley/home-assistant
homeassistant/components/tradfri/config_flow.py
"""Config flow for Tradfri.""" import asyncio from uuid import uuid4 import async_timeout from pytradfri import Gateway, RequestError from pytradfri.api.aiocoap_api import APIFactory import voluptuous as vol from homeassistant import config_entries from .const import ( CONF_GATEWAY_ID, CONF_HOST, CONF_ID...
tensorflow/tensorflow
tensorflow/python/keras/saving/saved_model/load_context.py
# Copyright 2020 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...
jdanbrown/pydatalab
tests/_util/lru_cache_tests.py
# 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 agreed ...
jpkrohling/hawkular-apm
examples/polyglot-zipkin/python-pyramid/zipkin_python/app.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015-2016 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # 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 ...
gdementen/PyTables
tables/path.py
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: January 15, 2007 # Author: Ivan Vilata i Balaguer - ivan at selidor dot net # # $Id$ # ######################################################################## """Functionality related with no...
chromium/chromium
tools/perf/core/results_dashboard.py
#!/usr/bin/env vpython # Copyright (c) 2013 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. """Functions for adding results to perf dashboard.""" # This file was copy-pasted over from: # //build/scripts/slave/results_dash...
cryptoprojects/ultimateonlinecash
test/functional/prioritise_transaction.py
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the prioritisetransaction mining RPC.""" from test_framework.test_framework import BitcoinTestFra...
tsdgeos/snapcraft
snapcraft/integrations/travis.py
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
tonyyarusso/ansible-modules-core
packaging/os/apt.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Flowroute LLC # Written by Matthew Williams <matthew@flowroute.com> # Based on yum module written by Seth Vidal <skvidal at fedoraproject.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
allmende/synnefo
snf-cyclades-app/synnefo/logic/management/commands/backend-remove.py
# Copyright (C) 2010-2014 GRNET S.A. # # 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 option) any later version. # # This program is distributed i...
abstract-open-solutions/hr
__unported__/hr_payroll_extension/__openerp__.py
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, eit...
initOS/server-tools
database_cleanup/tests/test_database_cleanup.py
# -*- coding: utf-8 -*- # © 2016 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from psycopg2 import ProgrammingError from openerp.modules.registry import RegistryManager from openerp.tools import config from openerp.tools.misc import mute_logger from openerp.tests.commo...
jmgc/myhdl-numeric
cosimulation/icarus/test/test_all.py
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl 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 t...
shakamunyi/solum
solum/openstack/common/db/sqlalchemy/migration.py
# coding: utf-8 # # Copyright (c) 2013 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 # # Unle...
MartinHjelmare/home-assistant
homeassistant/components/ubus/device_tracker.py
"""Support for OpenWRT (ubus) routers.""" import json import logging import re import requests import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner) from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME from homeassistant.exception...
Johnetordoff/osf.io
api_tests/providers/registrations/views/test_registration_provider_list.py
import pytest from api.base.settings.defaults import API_BASE from api_tests.providers.mixins import ProviderListViewTestBaseMixin from api.providers.workflows import Workflows from osf_tests.factories import ( RegistrationProviderFactory, ) class TestRegistrationProviderList(ProviderListViewTestBaseMixin): ...
silkyar/570_Big_Little
tests/configs/o3-timing-mp-ruby.py
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/google/cloud/proto/spanner/v1/keys_pb2.py
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/proto/spanner/v1/keys.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.protobuf ...
pombredanne/tahoe-lafs
src/allmydata/immutable/downloader/node.py
import time now = time.time from zope.interface import Interface from twisted.python.failure import Failure from twisted.internet import defer from foolscap.api import eventually from allmydata import uri from allmydata.codec import CRSDecoder from allmydata.util import base32, log, hashutil, mathutil, observer from a...
david-ragazzi/nupic
nupic/encoders/base.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
sephiroth6/nodeshot
nodeshot/community/profiles/models/social_link.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from nodeshot.core.base.models import BaseDate from . import Profile class SocialLink(BaseDate): """ External links like website or social network profiles """ user = models.ForeignKey(Profile, verbose_name=_('user')...
nhicher/ansible
lib/ansible/modules/cloud/cloudstack/cs_account.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
adobe-flash/avmplus
test/util/flashrunner/flashrunner.py
#!/usr/bin/env python # 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/. # import sys, array, re, os, struct, time, signal, platform, subprocess, SocketServer, os.path fro...
maxive/erp
addons/hw_escpos/escpos/escpos.py
# -*- coding: utf-8 -*- from __future__ import print_function import base64 import copy import io import math import re import traceback from hashlib import md5 from PIL import Image from xml.etree import ElementTree as ET from odoo.tools import pycompat try: import jcconv except ImportError: jcconv = None ...
tadgh/ArgoRevisit
third_party/nltk/stem/porter.py
# Copyright (c) 2002 Vivake Gupta (vivakeATomniscia.org). All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any late...
jrogers512/pynet
class6/library/eos_config.py
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, 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, # t...
cmtm/networkx
networkx/algorithms/approximation/kcomponents.py
""" Fast approximation for k-component structure """ # Copyright (C) 2015 by # Jordi Torrents <jtorrents@milnou.net> # All rights reserved. # BSD license. import itertools import collections import networkx as nx from networkx.exception import NetworkXError from networkx.utils import not_implemented_for ...
PythonCharmers/orange3
Orange/classification/setup.py
import os def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration libraries = [] if os.name == 'posix': libraries.append('m') config = Configuration('classification', parent_package, top_path) config.add_extension('_simple_tree', ...
rekbun/browserscope
base/cron.py
#!/usr/bin/python2.5 # # Copyright 2009 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 or...
MungoRae/home-assistant
homeassistant/components/sensor/ring.py
""" This component provides HA sensor support for Ring Door Bell/Chimes. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.ring/ """ from datetime import timedelta import logging import voluptuous as vol import homeassistant.helpers.config_validati...
ntt-sic/neutron
neutron/common/topics.py
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
hayderimran7/tempest
tempest/services/compute/json/server_groups_client.py
# Copyright 2012 OpenStack Foundation # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ht...
pllim/astropy
astropy/io/misc/asdf/tags/coordinates/tests/test_representation.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest asdf = pytest.importorskip('asdf') from numpy.random import random, randint import astropy.units as u from astropy.coordinates import Angle import astropy.coordinates.representation as r from asdf.tests.helpers im...
lyoniionly/django-notifications
notifications/south_migrations/0001_initial.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() class Migration...
beni55/SimpleCV
SimpleCV/tests/test_vimba.py
import numpy as np import cv2 import time from SimpleCV.Camera import VimbaCamera def printPrettyHeader(msg): print "*"*80 + "\n* %s *\n" % msg + "*"*80 def _getProperty(c): printPrettyHeader("Test getProperty") prop = "ExposureMode" print "%s=%s" % (prop, c.getProperty(prop)) def _getAllProperties...
mkhoeini/zerorpc-python
zerorpc/core.py
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
kaplun/Invenio-OpenAIRE
modules/bibharvest/web/admin/oairepositoryadmin.py
## This file is part of Invenio. ## Copyright (C) 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 your option) any later versio...
NeCTAR-RC/swift
swift/proxy/controllers/__init__.py
# 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 the...
nwjs/chromium.src
tools/android/dependency_analysis/diff_graphs.py
#!/usr/bin/env python3 # Copyright 2021 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. """Command-line tool for finding differences in dependency graphs.""" import argparse import itertools from typing import List, Set, ...
thaim/ansible
test/units/executor/test_play_iterator.py
# (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...
helldorado/ansible
lib/ansible/modules/cloud/azure/azure_rm_mariadbconfiguration_facts.py
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # Copyright (c) 2019 Matti Ranta, (@techknowlogick) # # 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_METADAT...
johnsonc/OTM2
opentreemap/treemap/tests/test_units.py
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.test.utils import override_settings from treemap.units import (is_convertible, is_formattable, get_display_value, is_convertible_or_formattable, ...
bdero/edx-platform
lms/djangoapps/notification_prefs/tests.py
import json from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import Http404 from django.test import TestCase from django.test.client import Client, RequestFactory from django.test.utils import override_settings from mock import Mock, patch from ...
josesanch/django-haystack
tests/settings.py
SECRET_KEY = "Please do not spew DeprecationWarnings" # Haystack settings for running tests. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'haystack_tests.db', } } INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
rodrigolucianocosta/ControleEstoque
rOne/Storage101/django-localflavor/django-localflavor-1.3/localflavor/pl/pl_administrativeunits.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals #: Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', 'Wrocław'), ('jeleniagora', 'Jelenia Góra'), ('legnica', 'Legnica'), ('boleslawiecki', 'boles...
ityaptin/ceilometer
ceilometer/tests/unit/compute/virt/vmware/test_vsphere_operations.py
# Copyright (c) 2014 VMware, 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...
ghchinoy/tensorflow
tensorflow/contrib/eager/python/examples/gan/mnist_graph_test.py
# 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...
rudolfovich/.dotfiles
powerline-shell/install.py
#!/usr/bin/env python2 from __future__ import print_function import os import stat try: import config except ImportError: print('Created personal config.py for your customizations') import shutil shutil.copyfile('config.py.dist', 'config.py') import config TEMPLATE_FILE = 'powerline_shell_base.py'...
russellmayhew/satchmo
satchmo/apps/product/views/filters.py
from django import http from django.core.paginator import Paginator, InvalidPage from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from livesettings import config_value from product.models import Product from product.queries import bestsellers import logging ...
stgraber/snapcraft
snapcraft/plugins/nil.py
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
lispc/Paddle
v1_api_demo/model_zoo/embedding/paraconvert.py
#!/bin/env python # 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 ...
mozilla/make.mozilla.org
vendor-local/lib/python/kombu/clocks.py
""" kombu.clocks ============ Logical Clocks and Synchronization. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from __future__ import with_statement from threading import Lock __all__ = ["LamportClock"] class LamportClock(object...
yarneo/mongoengine
tests/document/instance.py
# -*- coding: utf-8 -*- import sys sys.path[0:0] = [""] import bson import os import pickle import unittest import uuid from datetime import datetime from bson import DBRef, ObjectId from tests import fixtures from tests.fixtures import (PickleEmbedded, PickleTest, PickleSignalsTest, Pickl...
zenodo/invenio
invenio/modules/documents/tasks.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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 your option) any later...
OSSystems/glmark2
waflib/Tools/ruby.py
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Task,Options,Utils from waflib.TaskGen import before_method,feature,after_method,Task,extension from waflib.Configure import conf def init_rubyext...
jeremiahyan/odoo
addons/mail/models/ir_model_fields.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class IrModelField(models.Model): _inherit = 'ir.model.fields' tracking = fields.Integer( string="Enable Ordered Tracking", help="If set every modification done ...
Varentsov/servo
tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py
import pytest from ..gitignore import fnmatch_translate, PathFilter match_data = [ ("foo", False, ["a/foo", "foo"]), ("*.a", False, ["foo.a", "a/foo.a", "a/b/foo.a", "a.a/foo.a"]), ("*.py[co]", False, ["a.pyc", "a.pyo", "a/b/c.pyc"]), ("\\#*", False, ["#a", "a/#b"]), ("*#", False, ["a#", "a/b#", "...
catapult-project/catapult
third_party/rsa/rsa/__init__.py
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
hatwar/Das_erpnext
erpnext/setup/doctype/sms_settings/sms_settings.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _, throw, msgprint from frappe.utils import cstr, nowdate from frappe.model.document import Document class SMS...
annegentle/magnum
magnum/common/pythonk8sclient/client/models/V1beta3_PersistentVolumeStatus.py
#!/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...
livni/old-OK
src/knesset/mks/migrations/0002_add_weeklypresence_model.py
# 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 'WeeklyPresence' db.create_table('mks_weeklypresence', ( ('member', self.gf...
vmindru/ansible
lib/ansible/plugins/cliconf/edgeos.py
# Copyright: (c) 2018, 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 = """ --- cliconf: edgeos short_description: Use edgeos cliconf to run command on ...
tchellomello/home-assistant
homeassistant/components/smartthings/switch.py
"""Support for switches through the SmartThings cloud API.""" from typing import Optional, Sequence from pysmartthings import Attribute, Capability from homeassistant.components.switch import SwitchEntity from . import SmartThingsEntity from .const import DATA_BROKERS, DOMAIN async def async_setup_entry(hass, conf...
ovresko/erpnext
erpnext/patches/v8_0/set_sales_invoice_serial_number_from_delivery_note.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.stock.stock_balance import update_bin_qty, get_reserved_qty def execute(): """ Set the Serial Numbers in Sales Invoice I...
HiSPARC/station-software
user/python/Lib/site-packages/requests/__init__.py
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP Library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
bluemini/kuma
vendor/packages/translate/storage/base.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2006-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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; e...
shootstar/novatest
nova/api/openstack/compute/contrib/__init__.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
affordablewindurbines/jarvisproject
pybrain/examples/rl/environments/cartpole/cart_nes.py
from __future__ import print_function #!/usr/bin/env python ######################################################################### # Reinforcement Learning with NES on the CartPoleEnvironment # # Requirements: pylab (for plotting only). If not available, comment the # last 3 lines out #############################...
appcelerator/titanium_mobile_tooling
thirdparty/mako/exceptions.py
# exceptions.py # Copyright (C) 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """exception classes""" import traceback, sys, re from mako import util class MakoException(Exception): ...
hybrid-storage-dev/cinder-fs-111t-hybrid-cherry
scheduler/weights/chance.py
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P. # # 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...
AriZuu/micropython
tests/basics/try_finally_loops.py
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
gptech/ansible
lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
plxaye/chromium
src/native_client_sdk/src/build_tools/easy_template.py
#!/usr/bin/env python # Copyright (c) 2013 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 copy import cStringIO import optparse import os import re import sys STATEMENT_RE = "\[\[(.*?)\]\]" # [[...]] EXPR_RE = "...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_cdot_svm.py
#!/usr/bin/python # (c) 2017, NetApp, Inc # 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', 'status': ['preview'], ...
andreaso/ansible
lib/ansible/parsing/yaml/loader.py
# (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...
BPI-SINOVOIP/BPI-Mainline-kernel
linux-5.4/Documentation/sphinx/kerneldoc.py
# coding=utf-8 # # Copyright © 2016 Intel Corporation # # 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, me...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/rest_framework/viewsets.py
""" ViewSets are essentially just a type of class based view, that doesn't provide any method handlers, such as `get()`, `post()`, etc... but instead has actions, such as `list()`, `retrieve()`, `create()`, etc... Actions are only bound to methods at the point of instantiating the views. user_list = UserViewSet.a...
alxgu/ansible
test/units/parsing/utils/test_jsonify.py
# -*- coding: utf-8 -*- # (c) 2016, James Cammarata <jimi@sngx.net> # # 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 o...
exploreodoo/datStruct
odoo/doc/_extensions/odoo/translator.py
# -*- coding: utf-8 -*- import os.path import posixpath import re import urllib from docutils import nodes from sphinx import addnodes, util from sphinx.locale import admonitionlabels def _parents(node): while node.parent: node = node.parent yield node class BootstrapTranslator(nodes.NodeVisitor...
ninjin/bionlp_st_2011_supporting
tools/extractTIABs.py
#!/usr/bin/env python # Turn PubMed XML into TXT files. # # Revised version of previous script to extract texts from the PubMed baseline # distribution XML files. This is otherwise similar to that used to extract # texts for the BioNLP shared tasks and a number of other similar efforts, but # it now by default separat...
aliclark/irctail
irccolor.py
#!/usr/bin/python # Copyright (c) 2013, Ali Clark <ali@clark.gb.net> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS...
arscariosus/django-mango
mango/mango/urls.py
import os from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'generic.views.home', name='home'), url(r'^admin/', include(admin.site.urls)), url(r'^logout$', 'django.contrib.auth....
fredmorcos/attic
projects/neural_py/datafilter.py
""" Data filter module. """ __docformat__ = "restructuredtext en" ## Copyright (c) 2009 Emmanuel Goossaert ## ## This file is part of npy. ## ## npy is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either v...
carquois/blobon
blobon/books/migrations/0025_auto__add_report.py
# -*- 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): # Adding model 'Report' db.create_table('books_report', ( ('id', self.gf('django.db.models.field...
BrighterCommand/Brightside
examples/partition_testing/sender.py
""" File : sender.py Author : ian Created : 19-04-2018 Last Modified By : ian Last Modified On : 19-04-2018 *********************************************************************** The MIT License (MIT) Copyright © 2018 Ian Cooper <ian_hammond_cooper@yahoo.co.uk> Permission is hereby gra...
csparpa/check
fluentcheck/assertions_is/numbers.py
from fluentcheck.assertions_is.base_is import IsBase class __IsNumbers(IsBase): @property def number(self) -> "Is": self.check.is_number() return self @property def not_number(self) -> "Is": self.check.is_not_number() return self @property def integer(self) ->...
thespacedoctor/tastic
tastic/tests/test_reminders.py
import os import nose import shutil import yaml from tastic import reminders, cl_utils from tastic.utKit import utKit from fundamentals import tools su = tools( arguments={"settingsFile": None}, docString=__doc__, logLevel="DEBUG", options_first=False, projectName="tastic" ) arguments, settings, l...
danicarrion/pyrestcli
tests/restserver/polls/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-30 23:23 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Create...
mkocka/galaxytea
integral/domcek/numerical_integration.py
#!/usr/bin/env python from __future__ import division import matplotlib.pyplot as plt import matplotlib from scipy import constants as const from pylab import * # def planck(T,lambda_i,lambda_f,step=10**(-1)): x ,y = ([] for i in range(2)) for i in arange(lambda_i,lambda_f,step): # i*10**(-9) - correctuin to nm ...
squeaky-pl/japronto
integration_tests/experiments.py
import pytest @pytest.fixture(autouse=True) def my_fix(request): print('auto') pytest.set_trace() @pytest.fixture(params=[1, 2]) def size_k(request): return request.param # @pytest.fixture(autouse=True, scope='module') # def a(): # print('a') # @pytest.fixture(scope='function', params=[1,2]) # de...
ccxt/ccxt
python/ccxt/therock.py
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import ArgumentsReq...