code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
stackforge/watcher
watcher/common/config.py
Python
apache-2.0
1,465
''' Imports the hooks dynamically while keeping the package API clean, abstracting the underlying modules ''' from airflow.utils import import_module_attrs as _import_module_attrs _hooks = { 'ftp_hook': ['FTPHook'], } _import_module_attrs(globals(), _hooks)
cswaroop/airflow
airflow/contrib/hooks/__init__.py
Python
apache-2.0
264
import pifacecad from time import sleep class Screen(): """ A driver for PiFace Control and Display Raspberry Pi shields. It has a simple 16x2 LCD on it, controlled by a MCP23S17 over SPI. Doesn't yet conform to HD44780 library specs, many functions are not transferred from the ``pifacecad`` library. TOD...
CRImier/pyLCI
output/drivers/pfcad.py
Python
apache-2.0
2,181
"""Switch fulltext_record_properties to innodb Revision ID: 53bb0f4f6ec8 Revises: 63fc392c91a Create Date: 2014-09-30 09:20:05.884100 """ # revision identifiers, used by Alembic. revision = '53bb0f4f6ec8' down_revision = '63fc392c91a' from alembic import op def upgrade(): op.drop_index('fulltext_record_propert...
uskudnik/ggrc-core
src/ggrc/migrations/versions/20140930092005_53bb0f4f6ec8_switch_fulltext_record_properties.py
Python
apache-2.0
645
# Copyright 2012-2013 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 la...
anythingrandom/eclcli
eclcli/common/limits.py
Python
apache-2.0
3,896
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
rednaxelafx/apache-spark
python/pyspark/storagelevel.py
Python
apache-2.0
2,710
class ICalException(Exception): pass
ReanGD/py-calendar
ical/exception.py
Python
apache-2.0
41
"""The tests for the MQTT lock platform.""" import json from unittest.mock import ANY from homeassistant.components import lock, mqtt from homeassistant.components.mqtt.discovery import async_start from homeassistant.const import ( ATTR_ASSUMED_STATE, STATE_LOCKED, STATE_UNAVAILABLE, STATE_UNLOCKED, ) ...
Teagan42/home-assistant
tests/components/mqtt/test_lock.py
Python
apache-2.0
20,567
# Copyright (c) 2013, 2014, 2015, 2016 Philip Hane # 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, # this li...
VillanCh/g3ar
g3ar/utils/ipwhois/rdap.py
Python
bsd-2-clause
22,912
from __future__ import absolute_import, division, print_function from contextlib import contextmanager import numpy as np from matplotlib.colors import ColorConverter from ..extern.vispy import scene from glue.external import six class MultiColorScatter(scene.visuals.Markers): """ This is a helper class ...
astrofrog/glue-vispy-viewers
glue_vispy_viewers/scatter/multi_scatter.py
Python
bsd-2-clause
5,723
"""autogenerated by genpy from foo_msgs/Landmark.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class Landmark(genpy.Message): _md5sum = "2edff07075d48378c13052415416989c" _type = "foo_msgs/Landmark" _has_header = False #flag to mark the prese...
riscmaster/risc_maap
risc_msgs/src/foo_msgs/msg/_Landmark.py
Python
bsd-2-clause
4,376
""" ******************************************************************************** * Name: base.py * Author: nswain * Created On: July 23, 2018 * Copyright: (c) Aquaveo 2018 ******************************************************************************** """ import unittest import tethys_gizmos.gizmo_options.base as ...
tethysplatform/tethys
tests/unit_tests/test_tethys_gizmos/test_gizmo_options/test_base.py
Python
bsd-2-clause
1,994
from .. import TestCase # NOTE: this test is not run by the tester because the name of this file # does not match the testpattern regex in TestLoader.discover class TestBar(TestCase): def test_print(self): self.assertTrue(3+4 > 2)
thisch/python-falafel
examples/project2/mypackage/modb/bar.py
Python
bsd-2-clause
246
from sqlalchemy import * from migrate import * meta = MetaData() user_tbl = Table('user', meta) status_col = Column('email_status', String, default='not_verified') activation_code_col = Column('email_activation_code', String, nullable=True) notify_new_meetup = Column('email_notify_new_meetup', Boolean, default=False...
pygraz/old-flask-website
migrations/versions/002_notificationflags.py
Python
bsd-3-clause
896
#!/usr/bin/env python3 """ # USAGE # make_generated_output.py <path to config file for gradeable> <assignment> <semester> <course> """ import argparse import json import os from submitty_utils import dateutils import sys SUBMITTY_DATA_DIR = "/var/local/submitty" def parse_args(): parser = argparse.Argume...
RCOS-Grading-Server/HWserver
bin/make_generated_output.py
Python
bsd-3-clause
2,717
import sys import traceback from io import BytesIO from unittest import TestCase from wsgiref import simple_server # If data is too large, socket will choke, so write chunks no larger than 32MB # at a time. The rationale behind the 32MB can be found in #5596#comment:4. MAX_SOCKET_CHUNK_SIZE = 32 * 1024 * 1024 # 32 MB...
twz915/django
tests/builtin_server/tests.py
Python
bsd-3-clause
4,631
__author__ = 'frank' from Certificate import Certificate from Domain import Domain from Partner import Partner from Requestor import process_request from WalletName import WalletName class Netki: """ General methods for interacting with Netki's Partner API. :param partner_id: Your Partner ID available i...
netkicorp/python-partner-api-client
netki/NetkiClient.py
Python
bsd-3-clause
10,490
from __future__ import absolute_import, print_function from django.db import models from django.utils import timezone from sentry.db.models import ( BoundedPositiveIntegerField, FlexibleForeignKey, Model, sane_repr ) from sentry.utils.cache import memoize class Commit(Model): __core__ = False organizat...
alexm92/sentry
src/sentry/models/commit.py
Python
bsd-3-clause
1,338
# -*- coding: utf-8 -*- from distutils.version import LooseVersion import cms from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): if LooseVersion(cms.__ver...
nephila/djangocms_twitter
djangocms_twitter/south_migrations/0004_rename_tables.py
Python
bsd-3-clause
4,301
from corehq.apps.sms.api import send_sms_to_verified_number from corehq.util.translation import localize from django.utils.translation import ugettext as _ class KeywordHandler(object): def __init__(self, user, domain, args, verified_contact, msg): self.user = user self.domain = domain se...
puttarajubr/commcare-hq
custom/ilsgateway/tanzania/handlers/keyword.py
Python
bsd-3-clause
786
# Author: Wei Xue <xuewei4d@gmail.com> # Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clause import re import sys import copy import warnings import pytest import numpy as np from scipy import stats, linalg from sklearn.covariance import EmpiricalCovariance from sklearn.datasets impo...
glemaitre/scikit-learn
sklearn/mixture/tests/test_gaussian_mixture.py
Python
bsd-3-clause
40,311
""" UnshadowParameters prevents the shadow parameter phenomenon """ from pythran.analyses import Identifiers from pythran.passmanager import Transformation import ast class UnshadowParameters(Transformation): ''' Prevents parameter shadowing by creating new variable. >>> import ast >>> from pythran...
hainm/pythran
pythran/transformations/unshadow_parameters.py
Python
bsd-3-clause
2,033
#!/usr/bin/env python # Copyright (c) Sunlight Labs, 2012 under the terms and conditions # of the LICENSE file. from sunlight import __appname__, __version__ from setuptools import setup long_description = open('README.rst').read() setup( name = __appname__, version = __version__, packages = [...
sunlightlabs/python-sunlight
setup.py
Python
bsd-3-clause
1,178
# # This file is part of GreatFET # from .. import errors from ..sensor import GreatFETSensor from ..interfaces.i2c_device import I2CDevice class TSL256X(I2CDevice, GreatFETSensor): """ Represents a TSL256X Ambient Light Sensor. """ SHORTHAND = "tsl256x" # Default I2C address. DEFAULT_AD...
dominicgs/GreatFET-experimental
host/greatfet/sensors/tsl2561.py
Python
bsd-3-clause
4,679
# 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. """Run specific test on specific environment.""" import logging import os import tempfile from pylib import constants from pylib.base import base_test_resu...
vadimtk/chrome4sdp
build/android/pylib/remote/device/remote_device_gtest_run.py
Python
bsd-3-clause
2,746
from django.core.urlresolvers import NoReverseMatch, reverse from satchmo.configuration import config_value import logging import re log = logging.getLogger('recentlist.middleware') try: producturl = reverse('satchmo_product', kwargs={'product_slug': 'FAKE'}) producturl = "^" + producturl.replace("FAK...
roadhead/satchmo
satchmo/recentlist/middleware.py
Python
bsd-3-clause
1,327
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Used to access the cr50 console and handle RMA Open """Open cr50 using RMA authentication. Run RMA Open ...
coreboot/chrome-ec
extra/cr50_rma_open/cr50_rma_open.py
Python
bsd-3-clause
26,490
""" kombu.common ============ Common Utilities. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from __future__ import with_statement import socket import sys from collections import defaultdict, deque from functools import partial f...
kumar303/rockit
vendor-local/kombu/common.py
Python
bsd-3-clause
8,390
from django.conf import settings from elasticsearch import TransportError from elasticsearch.exceptions import NotFoundError from elasticutils.contrib.django import Indexable, MappingType, S, get_es from mozillians.phonebook.helpers import langcode_to_name from mozillians.users.managers import MOZILLIANS, PUBLIC ES_...
justinpotts/mozillians
mozillians/users/es.py
Python
bsd-3-clause
7,571
"""Client (Connection).""" from __future__ import absolute_import, unicode_literals import os import socket import sys from collections import OrderedDict from contextlib import contextmanager from itertools import count, cycle from operator import itemgetter try: from ssl import CERT_NONE ssl_available = T...
urbn/kombu
kombu/connection.py
Python
bsd-3-clause
38,239
"""Defines chart-wide shared test fixtures.""" import numpy as np import pandas as pd import pytest from bokeh.sampledata.autompg import autompg class TestData(object): """Contains properties with easy access to data used across tests.""" def __init__(self): self.cat_list = ['a', 'c', 'a', 'b'] ...
htygithub/bokeh
bokeh/charts/conftest.py
Python
bsd-3-clause
1,071
# 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. """Extended WebDriver interface that uses helper extension. This file is makeshift and should eventually be switched over to using the new ChromeDriver ...
leiferikb/bitpop-private
chrome/test/install_test/chrome.py
Python
bsd-3-clause
3,017
__author__ = 'robswift' import sys from collections import defaultdict from filtering_sets import do_not_call from BlastNFilter.Blast.Target import Target def add_ligands(non_polymer): """ Remove undesirable residues from the non_polymer_file, and return a list of target objects. :param non_polymer: absol...
rvswift/BlastNFilter
build/lib/BlastNFilter/PreRelease/ParsePreRelease.py
Python
bsd-3-clause
2,942
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import re import time import math import subprocess import numpy as np from google.protobuf import text_format import caffe try: import caffe_pb2 except ImportError: # See issue #32 from caffe.proto import caffe_pb2 from train...
asifmadnan/DIGITS
digits/model/tasks/caffe_train.py
Python
bsd-3-clause
54,494
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals )
sociateru/django-iprestrict
iprestrict/migrations/__init__.py
Python
bsd-3-clause
117
from django.test import TestCase from corehq.apps.accounting import generator class BaseAccountingTest(TestCase): def setUp(self): generator.instantiate_accounting_for_tests()
SEL-Columbia/commcare-hq
corehq/apps/accounting/tests/base_tests.py
Python
bsd-3-clause
191
#!/usr/bin/python # -*- coding: utf-8 -*- from django import template from tardis.tardis_portal.models import Dataset_File from django.db.models import Sum register = template.Library() @register.filter def experiment_file_count(value): return Dataset_File.objects.filter(dataset__experiments__pk=value).count() ...
steveandroulakis/mytardis
tardis/tardis_portal/templatetags/experimentstats.py
Python
bsd-3-clause
497
################################################################### # # Copyright (c) 2014 Wi-Fi Alliance # # 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 copi...
claudelee/Wi-FiTestSuite-UCC
python/myutils.py
Python
isc
97,701
import collections import six # See http://python3porting.com/differences.html#buffer if six.PY3: buffer_ = memoryview else: buffer_ = buffer # noqa def lazy_property_factory(lazy_property): """Create properties that perform lazy loading of attributes.""" def lazy_property_getter(self): if...
lamblin/fuel
fuel/utils.py
Python
mit
3,208
"""Avaya Virtual Services Platform Support.""" from __future__ import print_function from __future__ import unicode_literals from netmiko.cisco_base_connection import CiscoSSHConnection class AvayaVspSSH(CiscoSSHConnection): """Avaya Virtual Services Platform Support.""" def session_preparation(self): ...
shsingh/netmiko
netmiko/avaya/avaya_vsp_ssh.py
Python
mit
484
"""Restful api for the packaginator, based on ``django-tastypie`` (`docs <http://django-tastypie.readthedocs.org/>`_ | `pypi <http://pypi.python.org/pypi/django-tastypie/>`_ | `repo <https://github.com/toastdriven/django-tastypie/>`_). This module consists of two components - module :mod:`~apps.apiv1.api` and the reso...
cartwheelweb/packaginator
apps/apiv1/__init__.py
Python
mit
448
from comunicacion.foros.models import Imagen def globales(request): imagenes_global = Imagen.objects.all()[:9] return {'imagenes_global':imagenes_global}
shiminasai/ciat_plataforma
ciat_plataforma/context.py
Python
mit
165
from ..tokenizer_exceptions import BASE_EXCEPTIONS from ...symbols import ORTH, NORM from ...util import update_exc # TODO # treat other apostrophes within words as part of the word: [op d'mannst], [fir d'éischt] (= exceptions) _exc = {} # translate / delete what is not necessary for exc_data in [ {ORTH: "’t", ...
spacy-io/spaCy
spacy/lang/lb/tokenizer_exceptions.py
Python
mit
1,168
"""AsciiTable is the main table class. To be inherited by other tables. Define convenience methods here.""" from terminaltables.base_table import BaseTable from terminaltables.terminal_io import terminal_size from terminaltables.width_and_alignment import column_max_width, max_dimensions, table_width class AsciiTabl...
Robpol86/terminaltables
terminaltables/ascii_table.py
Python
mit
2,734
from flask import Blueprint admin = Blueprint("admin", __name__) from . import views
zengxs667/tiblog
asterisk/admin/__init__.py
Python
mit
87
from typing import Any, Callable, Dict, List from openslides.utils.cache_providers import Cachable, MemoryCacheProvider def restrict_elements(elements: List[Dict[str, Any]]) -> List[Dict[str, Any]]: """ Adds the prefix 'restricted_' to all values except id. """ out = [] for element in elements: ...
FinnStutzenstein/OpenSlides
server/tests/unit/utils/cache_provider.py
Python
mit
2,823
from setuptools import setup with open('README.rst') as f: long_description = f.read() setup( name = "fukei", version = "0.1", license = 'MIT', description = "A Python Tornado port of shadowsocks and socks proxy", author = 'Thomas Huang', url = 'https://github.com/thomashuang/Fukei', ...
thomashuang/Fukei
setup.py
Python
mit
865
import re import urlparse __all__ = ['Links'] class Links (object): """ Utility class for URL creation. """ scheme = 'http' netloc = 'boards.4chan.org' apiloc = 'a.4cdn.org' imgloc = 'i.4cdn.org' board_pattern = re.compile(r'/(\w+)$') page_pattern = re.compile(r'/(\w+)/(\d+)$')...
crypt3lx2k/Imageboard-Web-Interface
iwi/web/Links.py
Python
mit
1,469
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") sys.path.append(os.path.dirname(os.path.dirname(__file__))) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
jsfenfen/django-calaccess-raw-data
example/manage.py
Python
mit
304
from flask import request, Response from functools import wraps from app import app def check_auth(username, password): """ Check submitted auth values. """ return username == app.config['AUTH_USER'] and password == app.config['AUTH_PASS'] def authenticate(): """ Returns a 401 response if auth...
publicscience/hive
app/routes/auth.py
Python
mit
843
# -*- 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 'Redirect' db.create_table('redirects_redirect', ( ('id', self.gf('django.db.mode...
evangeline97/localwiki-backend-server
localwiki/redirects/migrations/0001_initial.py
Python
gpl-2.0
8,611
from sulley import * def run (): groups_and_num_test_cases() dependencies() repeaters() return_current_mutant() exhaustion() # clear out the requests. blocks.REQUESTS = {} blocks.CURRENT = None #########################################################################################...
SteveJM/sulley
unit_tests/blocks.py
Python
gpl-2.0
7,438
# -*- coding: utf-8 -*- from decimal import Decimal, ROUND_UP from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from django.conf import settings from django.shortcuts...
codenginebd/django-paypal-driver
paypal/views.py
Python
gpl-2.0
7,535
import sys from git import * if(len(sys.argv) != 4): print "Usage: python get_history_from_git.py REPO_LOCATION REPO_PATH BRANCH" sys.exit() def printCommit(commitHash, commitDate, printed): if not printed: print "\t{" else: print ",\n\t{" print '\t\tcommitHash: "' + commitHash + '",' print "\t\tcommitDate:...
tosdr/tosback2
code/get_history_from_git.py
Python
gpl-2.0
1,371
#!/usr/bin/env python # # IThugAPI.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; ...
S03D4-164/thug
src/ThugAPI/IThugAPI.py
Python
gpl-2.0
10,957
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
tardyp/buildbot
master/buildbot/steps/shell.py
Python
gpl-2.0
22,571
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software 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, ...
gecos-team/gecosws-agent
gecosfirstlogin_lib/Window.py
Python
gpl-2.0
3,073
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from frappe.model.document import Document class ProductionPlanItem(Document): pass
mhbu50/erpnext
erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py
Python
gpl-3.0
216
"""This file is part of matrix2latex. matrix2latex 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. matrix2latex is distributed in the hope ...
TheChymera/matrix2latex
matrix2latex/__init__.py
Python
gpl-3.0
1,122
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
erh3cq/hyperspy
hyperspy/tests/component/test_exponential.py
Python
gpl-3.0
3,100
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import six import six.moves.cPickle as pickle import os import base64 import re import bisect from collections import defaultdict from mathics.core.expression import Expression, Symbol, Stri...
pqtoan/mathics
mathics/core/definitions.py
Python
gpl-3.0
25,568
# Copyright (C) 2013 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA 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...
nrego/westpa
src/oldtools/aframe/data_reader.py
Python
gpl-3.0
22,795
# -*- encoding: utf-8 -*- """Implements Packages UI""" from robottelo.ui.base import Base, UIError from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class Package(Base): """Manipulates Packages from UI""" is_katello = True def navigat...
ares/robottelo
robottelo/ui/packages.py
Python
gpl-3.0
2,451
import statsmodels.tsa.stattools as st import matplotlib.pylab as plt import numpy as np import pandas as pd df = pd.read_csv('gld_uso.csv') cols = ['GLD','USO'] df['hedgeRatio'] = df['USO'] / df['GLD'] data_mean = pd.rolling_mean(df['hedgeRatio'], window=20) data_std = pd.rolling_std(df['hedgeRatio'], window=20) df...
burakbayramli/quant_at
book/Ratio.py
Python
gpl-3.0
750
r""" Iconic Font =========== A lightweight module handling iconic fonts. It is designed to provide a simple way for creating QIcons from glyphs. From a user's viewpoint, the main entry point is the ``IconicFont`` class which contains methods for loading new iconic fonts with their character map and methods returnin...
bgris/ODL_bgris
lib/python3.5/site-packages/qtawesome/iconic_font.py
Python
gpl-3.0
14,406
# -*- 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 field 'Commitment.stage' db.add_column('valueaccounting_commitment', 'stage', ...
thierrymarianne/valuenetwork
valuenetwork/valueaccounting/migrations/0018_auto__add_field_commitment_stage__add_field_commitment_state__add_fiel.py
Python
agpl-3.0
53,765
# -*- coding: utf-8 -*- import base64 from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.controllers.main import Website from openerp.addons.website_portal.controllers.main import website_account from openerp.addons.website_sale.controllers.main import website_s...
tvtsoft/odoo8
addons/website_sale_digital/controllers/main.py
Python
agpl-3.0
4,318
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2014 Elico Corp. All Rights Reserved. # Augustin Cisterne-Kaas <augustin.cisterne-kaas@elico-corp.com> # # This program is free software: y...
PierreFaniel/openerp-7.0
mail_organizer/message.py
Python
agpl-3.0
1,207
# -*- coding: utf-8 -*- import re import pycurl from ..base.simple_downloader import SimpleDownloader class WrzucTo(SimpleDownloader): __name__ = "WrzucTo" __type__ = "downloader" __version__ = "0.09" __status__ = "testing" __pattern__ = r"http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?link...
vuolter/pyload
src/pyload/plugins/downloaders/WrzucTo.py
Python
agpl-3.0
1,931
# -*- coding: utf-8 -*- """ Copyright (c) FELD Boris <lothiraldan@gmail.com> Multiple part support ===================== Create a navigation menu for multi-part related_posts """ from collections import defaultdict from pelican import signals import logging log = logging.getLogger(__name__) warning_message = """...
mikitex70/pelican-plugins
multi_part/multi_part.py
Python
agpl-3.0
1,016
import http.client import urllib.request import urllib.error import urllib.parse import re from flask import Flask, g from utility.logger import getLogger logger = getLogger(__name__) class InfoPage: def __init__(self, start_vars): self.info = None self.gn_accession_id = None if 'gn_acce...
zsloan/genenetwork2
wqflask/wqflask/db_info.py
Python
agpl-3.0
5,959
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA from odoo.addons.stock.tests.common2 import TestStockCommon from odoo.tests.common import Form class TestVirtualAvailable(TestStockCommon): def setUp(self)...
ygol/odoo
addons/stock/tests/test_product.py
Python
agpl-3.0
4,949
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import openerp from openerp import tools from openerp.osv import osv, fields class product_style(osv.Model): _name = "product.style" _columns = { 'name' : fields.char('Style Name', required=True), ...
syci/OCB
addons/website_sale/models/product.py
Python
agpl-3.0
9,392
# -*- encoding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2017 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
QubesOS/qubes-core-admin
qubes/tests/vm/appvm.py
Python
lgpl-2.1
7,275
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RMsnbase(RPackage): """Base Functions and Classes for Mass Spectrometry and Proteomics. ...
rspavel/spack
var/spack/repos/builtin/packages/r-msnbase/package.py
Python
lgpl-2.1
2,696
#!/usr/bin/env python # # euclid graphics maths module # # Copyright (c) 2006 Alex Holkner # Alex.Holkner@mail.google.com # # 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 ...
RT-Thread/rtthread_fsl
utils/mdp/eMPL-pythonclient/euclid.py
Python
lgpl-2.1
69,409
############################################################################### # volumina: volume slicing and editing library # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # modify it und...
burgerdev/volumina
volumina/colorama/ansitowin32.py
Python
lgpl-3.0
7,363
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
chengduoZH/Paddle
python/paddle/fluid/tests/unittests/mkldnn/test_concat_mkldnn_op.py
Python
apache-2.0
1,692
"""Provide functionality to interact with the vlc telnet interface.""" import logging from python_telnet_vlc import ConnectionError as ConnErr, VLCTelnet import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice from homeassistant.components.media_player.const impor...
leppa/home-assistant
homeassistant/components/vlc_telnet/media_player.py
Python
apache-2.0
7,570
# Задача 1. Вариант 30. ''' Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Али ибн Абу Талиб. Не забудьте о том, что автор должен быть упомянут на отдельной строке. ''' # SHCHUKIN F. O. # 24.02.2016 from sys import stdout as c from time import sle...
Akakiis/pythonintask
IVTa/2014/SHCHUKIN_F_O/task_2_30.py
Python
apache-2.0
1,344
# -*- coding: utf-8 -*- # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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...
nzlosh/st2
contrib/runners/inquirer_runner/setup.py
Python
apache-2.0
1,838
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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/l...
pybuilder/pybuilder
src/unittest/python/graph_utils_tests.py
Python
apache-2.0
2,592
from .._abstract.abstract import BaseOperationalLayer from ..common.general import _date_handler, _unicode_convert import json import uuid ######################################################################## class MapGraphicLayer(BaseOperationalLayer): """ Represents a graphic in the map. There are no...
achapkowski/ArcREST
src/arcrest/webmap/operationallayers.py
Python
apache-2.0
3,681
from .diagrams import GraphMachine from .nesting import HierarchicalMachine from .locking import LockedMachine from .factory import MachineFactory, HierarchicalGraphMachine, LockedHierarchicalGraphMachine from .factory import LockedHierarchicalMachine, LockedGraphMachine
timokoola/timoechobot
transitions/extensions/__init__.py
Python
apache-2.0
273
# Copyright 2017 Cloudbase Solutions Srl # # 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...
ader1990/cloudbase-init
cloudbaseinit/metadata/services/azureservice.py
Python
apache-2.0
18,702
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ver...
sparkslabs/kamaelia
Sketches/MPS/HTTP/demo_http.py
Python
apache-2.0
3,182
# 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...
julianwang/cinder
cinder/db/sqlalchemy/migrate_repo/versions/004_volume_type_to_uuid.py
Python
apache-2.0
5,948
import random from os import environ, urandom from os.path import exists from functools import partial from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner from autobahn.wamp import cryptosign from autobahn....
crossbario/crossbarexamples
exclude_subscribers/carol.py
Python
apache-2.0
2,561
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # 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...
ilveroluca/pydoop
test/mapreduce/test_text_stream.py
Python
apache-2.0
2,212
import uuid def generate_task_key(): return uuid.uuid4().hex
concentricsky/badgecheck
openbadges/verifier/actions/utils.py
Python
apache-2.0
67
""" utilsMDS.py author: Kevin Jamieson (kevin.g.jamieson@gmail.com) edited: 1/18/15 This module has methods that assist with non-metric multidimensional scaling. If you're trying to COMPUTE an embedding, you might simply call: X,emp_loss = computeEmbedding(n,d,S) You may also consider getLoss to check how well...
nextml/NEXT
apps/PoolBasedTripletMDS/algs/ValidationSampling/utilsMDS.py
Python
apache-2.0
14,387
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack LLC. # 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/...
superstack/nova
nova/tests/api/openstack/__init__.py
Python
apache-2.0
3,850
''' Copyright 2015 University of Auckland 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 agre...
OpenCMISS/neon
src/opencmiss/neon/core/serializers/base.py
Python
apache-2.0
832
# 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...
jendap/tensorflow
tensorflow/python/data/experimental/kernel_tests/restructured_dataset_test.py
Python
apache-2.0
3,111
# Copyright 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 in...
Sazzadmasud/Keystone_hash_token
keystone/tests/test_content_types.py
Python
apache-2.0
58,611
# # 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...
sebrandon1/neutron
neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_driver.py
Python
apache-2.0
11,541
#!/usr/bin/env python3 ############################################################################### # Copyright 2018 The Apollo 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...
xiaoxq/apollo
modules/tools/prediction/data_pipelines/cruise_models.py
Python
apache-2.0
5,275
""" Generic framework path manipulation """ __all__ = ['infoForFramework'] # This regexp should find: # \1 - framework location # \2 - framework name # \3 - framework version (optional) # FRAMEWORK_RE_STR = r"""(^.*)(?:^|/)(\w+).framework(?:/(?:Versions/([^/]+)/)?\2)?$""" FRAMEWORK_RE = None def infoForFramewo...
albertz/music-player
mac/pyobjc-core/Lib/objc/_framework.py
Python
bsd-2-clause
632
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
morelab/weblabdeusto
server/src/weblab/core/web/configuration.py
Python
bsd-2-clause
1,788
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from google.protobuf import text_format as _text_format from tensorflow.core.framework import op_def_pb2 as _op_def_pb2 # Needed to trigger the call to _set_call_cpp_shape_fn. from tensorfl...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/python/ops/gen_functional_ops.py
Python
bsd-2-clause
2,756