repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
BorgERP/borg-erp-6of3
server/openerp/tools/func.py
15
2124
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can red...
agpl-3.0
Vagab0nd/SiCKRAGE
sickchill/views/movies.py
1
2964
import logging from sickchill import settings from sickchill.oldbeard import config from .common import PageTemplate from .index import WebRoot logger = logging.getLogger('sickchill.movie') class MoviesHandler(WebRoot): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _ge...
gpl-3.0
sthirugn/robottelo
robottelo/performance/pulp.py
8
4941
"""Test utilities for writing Pulp tests Part of functionalities of Pulp are defined in this module and have utilities of single repository synchronization, single sequential repository sync, sequential repository re-sync. """ import logging from robottelo import ssh from robottelo.cli.base import CLIReturnCodeError...
gpl-3.0
piohhmy/euler
p011.py
1
2514
import textwrap from functools import reduce gridstr = textwrap.dedent("""\ 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68...
mit
vmax-feihu/hue
desktop/core/ext-py/Django-1.6.10/django/conf/locale/nb/formats.py
118
1763
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATET...
apache-2.0
emilhetty/home-assistant
homeassistant/components/notify/pushetta.py
11
1938
""" Pushetta platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushetta/ """ import logging from homeassistant.components.notify import ( ATTR_TITLE, DOMAIN, BaseNotificationService) from homeassistant.const import...
mit
miing/mci_migo
identityprovider/teams.py
1
13038
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Team membership support for Launchpad. The primary form of communication between the RP and Launchpad is an OpenID authentication request. Our solution is to piggyback a team m...
agpl-3.0
kcpawan/django
django/contrib/gis/db/backends/oracle/introspection.py
539
1977
import sys import cx_Oracle from django.db.backends.oracle.introspection import DatabaseIntrospection from django.utils import six class OracleIntrospection(DatabaseIntrospection): # Associating any OBJECTVAR instances with GeometryField. Of course, # this won't work right on Oracle objects that aren't MDS...
bsd-3-clause
clouddocx/boto
boto/dynamodb/exceptions.py
185
1687
""" Exceptions that are specific to the dynamodb module. """ from boto.exception import BotoServerError, BotoClientError from boto.exception import DynamoDBResponseError class DynamoDBExpiredTokenError(BotoServerError): """ Raised when a DynamoDB security token expires. This is generally boto's (or the us...
mit
Appono/hey-eurydices
vendor/pip-1.3.1/pip/log.py
143
6371
"""Logging """ import sys import logging from pip import backwardcompat class Logger(object): """ Logging object for use in command-line script. Allows ranges of levels, to avoid some redundancy of displayed information. """ VERBOSE_DEBUG = logging.DEBUG - 1 DEBUG = logging.DEBUG INFO =...
mit
atvcaptain/enigma2
lib/python/Screens/ScreenSaver.py
1
1677
from Screens.Screen import Screen from Components.MovieList import AUDIO_EXTENSIONS from Components.ServiceEventTracker import ServiceEventTracker from Components.Pixmap import Pixmap from enigma import ePoint, eTimer, iPlayableService import os, random class Screensaver(Screen): def __init__(self, session): Screen...
gpl-2.0
mverwe/JetRecoValidation
PuThresholdTuning/python/crabConfigDijet40Run2.py
1
1469
from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() #from WMCore.Configuration import Configuration #config = Configuration() #config.section_("General") config.General.requestName = 'HiForestDijet40Run2Fullv2' config.General.workArea = 'crab_projects' config.General.transferOutputs ...
cc0-1.0
kalev/anaconda
pyanaconda/iw/GroupSelector.py
2
22606
# Copyright 2005-2007 Red Hat, Inc. # # Jeremy Katz <katzj@redhat.com> # # 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; version 2 only # # This program is distributed in the hope that it will b...
gpl-2.0
Dunkas12/BeepBoopBot
lib/pip/_vendor/lockfile/linklockfile.py
536
2652
from __future__ import absolute_import import time import os from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class LinkLockFile(LockBase): """Lock access to a file using atomic property of link(2). >>> lock = LinkLockFile('somefile') >>> lock = Link...
gpl-3.0
alexforencich/verilog-wishbone
tb/test_wb_ram.py
2
4270
#!/usr/bin/env python """ Copyright (c) 2015-2016 Alex Forencich 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,...
mit
b0204888100/chen3
lib/werkzeug/test.py
308
33874
# -*- coding: utf-8 -*- """ werkzeug.test ~~~~~~~~~~~~~ This module implements a client to WSGI applications for testing. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import sys import mimetypes from time import time from...
apache-2.0
ryuunosukeyoshi/PartnerPoi-Bot
lib/youtube_dl/extractor/hypem.py
72
1887
from __future__ import unicode_literals import json import time from .common import InfoExtractor from ..compat import compat_urllib_parse_urlencode from ..utils import ( ExtractorError, sanitized_Request, ) class HypemIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hypem\.com/track/(?P<id>[^/]+)/'...
gpl-3.0
shiminasai/ciat_plataforma
analisis/analisis/admin.py
3
12085
# -*- coding: utf-8 -*- from django.contrib import admin from .models import * from django.forms import CheckboxSelectMultiple from .forms import * from comunicacion.lugar.models import * from nested_inline.admin import NestedStackedInline, NestedModelAdmin, NestedTabularInline from django.utils.translation import uget...
mit
thawatchai/mrkimontour
appengine-django/lib/django/core/management/templates.py
274
13263
import cgi import errno import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from os import path import django from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import handle_extensions from django.template import C...
gpl-2.0
bcgrendel/Speechcoder
speechcoder_ext/mod_env_var.py
1
1259
# Original source code found here: http://code.activestate.com/recipes/416087/history/4/ # Modified to change/add a specific env var instead of being specified via a command line argument. try: from _winreg import * import os, sys, win32gui, win32con except: print "[ERROR] You need to install python win32 libraries...
mit
pilou-/ansible
lib/ansible/modules/network/fortios/fortios_authentication_scheme.py
24
11368
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
afterlastangel/simple-logistics
src/processor.py
1
5614
__author__ = 'afterlastangel@gmail.com' from math import hypot import googlemaps import os from math import radians, cos, sin, asin, sqrt class Journey: """An object to store the journey""" length = 0 data = [] def __init__(self): self.length = 0 self.data = [] class Point: def _...
gpl-3.0
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/ext/db/__init__.py
3
124053
#!/usr/bin/env python # # Copyright 2007 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 o...
bsd-3-clause
visionegg/visionegg
demo/demo_keyboardtrigger.py
1
1764
#!/usr/bin/env python """Use the keyboard to trigger the Vision Egg.""" # Author(s): Hubertus Becker <hubertus.becker@uni-tuebingen.de> # Copyright: (C) 2005 by Hertie Institute for Clinical Brain Research, # Department of Cognitive Neurology, University of Tuebingen # URL: http://www.hubertus-becker....
lgpl-2.1
keceli/RMG-Java
source/cclib/method/cspa.py
11
3680
""" cclib (http://cclib.sf.net) is (c) 2006, the cclib development team and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html). """ __revision__ = "$Revision: 733 $" import random # For sometimes running the progress updater import numpy from population import Population class CSPA(Popu...
mit
bodi000/odoo
addons/knowledge/__init__.py
436
1064
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
orbitfp7/nova
nova/tests/unit/virt/hyperv/test_hostutils.py
13
5657
# Copyright 2014 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 requi...
apache-2.0
rspavel/spack
lib/spack/spack/util/naming.py
5
8560
# 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) # Need this because of spack.util.string from __future__ import absolute_import import string import itertools import re f...
lgpl-2.1
raspibo/Livello1
var/www/cgi-bin/viewpagegrapharray.py
1
2724
#!/usr/bin/env python3 # Questo file visualizza un grafico da file "csv" # Serve per la parte di gestione html in python import cgi import cgitb # Abilita gli errori al server web/http cgitb.enable() """ Stavolta e` tutta un'altra cosa Modificato perche` accetti un file in input Esempio: viewpagegraph....
mit
leilihh/novaha
nova/tests/api/openstack/compute/plugins/v3/test_flavor_rxtx.py
19
3365
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
PourroyJean/performance_modelisation
script/data visualisation/venv/lib/python3.6/site-packages/pip/utils/appdirs.py
340
8811
""" This code was taken from https://github.com/ActiveState/appdirs and modified to suit our purposes. """ from __future__ import absolute_import import os import sys from pip.compat import WINDOWS, expanduser from pip._vendor.six import PY2, text_type def user_cache_dir(appname): r""" Return full path to t...
gpl-3.0
salguarnieri/intellij-community
python/helpers/pydev/third_party/wrapped_for_pydev/ctypes/macholib/dylib.py
320
1828
""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) """) def dylib_info(filename): """ A dylib name can take one of the ...
apache-2.0
hreeder/ignition
manager/core/views.py
1
7096
from flask import render_template, redirect, url_for, flash, request, current_app from flask.ext.login import login_required, login_user, logout_user, current_user from manager import app, db from manager.utils import send_email, flash_errors from manager.core import core from manager.core.forms import Login...
mit
EndyKaufman/django-postgres-angularjs-blog
app/manager/migrations/0009_htmlcache.py
1
1154
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-16 09:42 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependen...
mit
BillBillBillBill/Tickeys-linux
tickeys/kivy_32/kivy/core/text/text_sdl2.py
37
1288
''' SDL2 text provider ================== Based on SDL2 + SDL2_ttf ''' __all__ = ('LabelSDL2', ) from kivy.compat import PY2 from kivy.core.text import LabelBase from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents, _get_fontdescent, _get_fontascent) class L...
mit
anhiga/poliastro
src/poliastro/tests/tests_twobody/test_states.py
1
4110
from numpy.testing import assert_allclose from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from poliastro.bodies import Sun, Earth from poliastro.twobody.rv import RVState from poliastro.twobody.classical import ClassicalState def test_state_has_attractor_given_in_constructo...
mit
malramsay64/MD-Molecules-Hoomd
statdyn/analysis/relaxation.py
1
4191
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Malcolm Ramsay <malramsay64@gmail.com> # # Distributed under terms of the MIT license. """These are a series of summary values of the dynamics quantities. This provides methods of easily comparing values across variables. """ import...
mit
gsi-upm/soba
projects/oldProyects/workStress/model/time.py
1
1570
from mesa import Agent, Model import configuration.settings class Time(Agent): def __init__(self): self.timeByStep = configuration.settings.time_by_step self.day = 0 self.hour = 8 self.minute = 0 self.seg = 0 self.clock = 00.00 def step(self): self.seg...
mit
travisfcollins/gnuradio
gr-filter/python/filter/pfb.py
27
19928
#!/usr/bin/env python # # Copyright 2009,2010,2012 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 ...
gpl-3.0
imrehg/arduino-navspark
app/src/processing/app/i18n/python/requests/compat.py
289
2433
# -*- coding: utf-8 -*- """ pythoncompat """ from .packages import charade as chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) #: Python 3.0.x is_py30 = (is_py3 and _ver[1] == 0) #: Python 3.1....
lgpl-2.1
SujaySKumar/django
django/contrib/gis/gdal/field.py
355
6739
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils.encoding import force_text # For more information, see the OG...
bsd-3-clause
oliver-sanders/cylc
cylc/flow/scripts/cylc_register.py
1
3234
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors. # # 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...
gpl-3.0
TeamTwisted/external_chromium_org
third_party/closure_linter/closure_linter/statetracker.py
74
37897
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
bsd-3-clause
seoulcoin/seoulcoin
qa/rpc-tests/txn_doublespend.py
152
4968
#!/usr/bin/env python2 # Copyright (c) 2014 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 proper accounting with malleable transactions # from test_framework import BitcoinTestFramework from...
mit
PeterPetrik/QGIS
python/plugins/processing/algs/gdal/gdalinfo.py
19
5661
# -*- coding: utf-8 -*- """ *************************************************************************** gdalinfo.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************************...
gpl-2.0
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/organization_v20.py
1
5232
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
mit
RueLaLaTech/savory-pie
savory_pie/django/validators.py
2
27662
import collections import datetime import re import savory_pie class ValidationError(Exception): def __init__(self, resource, errors): self.resource = resource self.errors = errors def validate(ctx, key, resource, source_dict): """ Descend through a resource, including its fields and any...
mit
Beyond-Imagination/BlubBlub
RaspberryPI/django-env/lib/python3.4/site-packages/django/db/migrations/topological_sort.py
69
1138
def topological_sort_as_sets(dependency_graph): """Variation of Kahn's algorithm (1962) that returns sets. Takes a dependency graph as a dictionary of node => dependencies. Yields sets of items in topological order, where the first set contains all nodes without dependencies, and each following set co...
gpl-3.0
sql-machine-learning/sqlflow
python/runtime/tensorflow/keras_example_reg.py
1
4694
# Copyright 2020 The SQLFlow 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 applicable law o...
apache-2.0
ahmed-mahran/hue
desktop/core/ext-py/Babel-0.9.6/babel/tests/__init__.py
61
1033
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software cons...
apache-2.0
Addepar/buck
third-party/py/unittest2/unittest2/compatibility.py
176
2100
import os import sys try: from functools import wraps except ImportError: # only needed for Python 2.4 def wraps(_): def _wraps(func): return func return _wraps __unittest = True def _relpath_nt(path, start=os.path.curdir): """Return a relative version of a path""" if...
apache-2.0
AsiganTheSunk/python-torcurl
torcurl/listeners/ExitRelayListener.py
1
1750
#!/usr/bin/env python import functools import os from stem import StreamStatus from stem.control import EventType, Controller from time import sleep from ExitRelay import ExitRelay class ExitRelayListener(): def __init__(self): print("TorPyCurl Status: Tracking Tor Exit...") self.controller = Co...
mit
happy5214/pywikibot-core
pywikibot/data/mysql.py
5
2289
# -*- coding: utf-8 -*- """Miscellaneous helper functions for mysql queries.""" # # (C) Pywikibot team, 2016-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' # Requires oursql <https://pythonhosted.org/oursql/> or # MySQLdb <https...
mit
dougluce/ansible-modules-core
cloud/amazon/rds_param_group.py
19
11052
#!/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 distributed...
gpl-3.0
Adel-Magebinary/odoo
addons/share/wizard/__init__.py
448
1067
# -*- 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
rgommers/scipy
scipy/_lib/tests/test_warnings.py
22
3761
""" Tests which scan for certain occurrences in the code, they may not find all of these occurrences but should catch almost all. This file was adapted from NumPy. """ import os from pathlib import Path import ast import tokenize import scipy import pytest class ParseCall(ast.NodeVisitor): def __init__(self):...
bsd-3-clause
cakeboss893/volatility
volatility/plugins/getsids.py
44
6517
# Volatility # Copyright (C) 2008-2013 Volatility Foundation # # Additional Authors: # Mike Auty <mike.auty@gmail.com> # # This file is part of Volatility. # # Volatility 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 Fo...
gpl-2.0
jameskeaveney/ElecSus
elecsus/libs/RRFittingRoutine.py
1
6567
# Copyright 2014-2019 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting, # C. S. Adams and I. G. Hughes. # 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/L...
apache-2.0
vmax-feihu/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/prototypes/predicates.py
623
1777
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis...
apache-2.0
vijaylbais/boto
boto/dynamodb/layer2.py
135
33814
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
mrknow/filmkodi
plugin.video.mrknow/mylib/xbmcplugin.py
4
7203
# coding: utf-8 """ Functions for Kodi plugins """ SORT_METHOD_ALBUM = 13 SORT_METHOD_ALBUM_IGNORE_THE = 14 SORT_METHOD_ARTIST = 11 SORT_METHOD_ARTIST_IGNORE_THE = 12 SORT_METHOD_BITRATE = 40 SORT_METHOD_CHANNEL = 38 SORT_METHOD_COUNTRY = 16 SORT_METHOD_DATE = 3 SORT_METHOD_DATEADDED = 19 SORT_METHOD_DATE_TAKEN = 41 S...
apache-2.0
NicovincX2/Python-3.5
Analyse (mathématiques)/Analyse fonctionnelle/Équation différentielle/Orbite/eccentric_orbits_compare.py
1
1065
# -*- coding: utf-8 -*- import os # compare Euler's method and the Euler-Cromer method for eccentric orbits # # M. Zingale (2013-02-19) import numpy import pylab import math from orbit import * # circular orbit o = orbit(1.0, 0.6) # eccentricity = 0.6 # period P = o.keplerPeriod() histEuler = o.intEuler(0.0125, ...
gpl-3.0
eLBati/odoo
addons/account_asset/wizard/__init__.py
445
1122
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
camptocamp/c2c-rd-addons
c2c_product_price_unit/__openerp__.py
4
3386
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
agpl-3.0
daenamkim/ansible
lib/ansible/modules/network/vyos/vyos_linkagg.py
7
7773
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
gpl-3.0
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_express_route_ports_operations.py
1
30168
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
yonglehou/scikit-learn
sklearn/decomposition/base.py
313
5647
"""Principal Component Analysis Base Classes""" # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <d.engemann@fz-juelich.de> # Kyle Kastner <kastnerkyle@gmail.com> # # Licen...
bsd-3-clause
ArchiFleKs/magnum
magnum/objects/magnum_service.py
2
6026
# 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
laszlocsomor/tensorflow
tensorflow/python/keras/applications/vgg19/__init__.py
74
1127
# 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
Matt-Deacalion/django
django/contrib/contenttypes/migrations/0002_remove_content_type_name.py
582
1168
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_legacy_name(apps, schema_editor): ContentType = apps.get_model('contenttypes', 'ContentType') for ct in ContentType.objects.all(): try: ct.name = apps.get_model(ct.app_label, c...
bsd-3-clause
nanditav/15712-TensorFlow
tensorflow/contrib/learn/python/learn/tests/dataframe/batch_test.py
33
2344
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/tests/unit/gapic/googleads.v6/services/test_customer_manager_link_service.py
1
40962
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
joshwatson/binaryninja-api
python/examples/kaitai/shapefile_main.py
1
43907
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version from .kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO from enum import Enum import collections if parse_version(ks_version) < parse_version('0....
mit
bzero/statsmodels
statsmodels/regression/tests/test_regression.py
18
38246
""" Test functions for models.regression """ # TODO: Test for LM from statsmodels.compat.python import long, lrange import warnings import pandas import numpy as np from numpy.testing import (assert_almost_equal, assert_approx_equal, assert_, assert_raises, assert_equal, assert_allclose) fro...
bsd-3-clause
bayesimpact/bob-emploi
frontend/server/modules/test/create_your_company_test.py
1
9054
"""Unit tests for the module create-your-company.""" import datetime import unittest from unittest import mock from bob_emploi.common.python import now from bob_emploi.frontend.api import user_pb2 from bob_emploi.frontend.server.test import base_test from bob_emploi.frontend.server.test import scoring_test class Ad...
gpl-3.0
MoRgUiJu/morguiju.repo
plugin.video.pelisalacarta/core/downloadtools.py
2
51361
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # --...
gpl-2.0
st135yle/django-site
dbenv/lib/python3.4/site-packages/django/shortcuts.py
117
5429
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ from django.http import ( Http404, HttpResponse, HttpResponsePermanentRedirect, HttpResponseRedirect, ) from django.template imp...
mit
13xforever/webserver
qa/164-RuleOr1.py
8
1057
from base import * MAGIC = "Rule OR: matches" DIR = "DirOr1" FILE = "test.cgi" CONF = """ vserver!1!rule!1640!match = directory vserver!1!rule!1640!match!directory = /%s vserver!1!rule!1640!handler = file vserver!1!rule!1641!match = or vserver!1!rule!1641!match!left = directory vserver!1!rule!1641!match!lef...
gpl-2.0
abaldwin1/thumbor
thumbor/error_handlers/file.py
11
3024
#!/usr/bin/python # -*- coding: utf-8 -*- import logging import logging.handlers import json import re import time from thumbor import __version__ class ErrorHandler(object): def __init__(self, config): if not config.ERROR_FILE_LOGGER: raise RuntimeError( "If you set USE_CUST...
mit
alex8866/cinder
cinder/tests/api/contrib/test_volume_transfer.py
6
26454
# Copyright (C) 2012 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 # # http://www.apache.org/licenses/LICEN...
apache-2.0
mlperf/training_results_v0.7
Fujitsu/benchmarks/maskrcnn/implementations/implementation_closed/maskrcnn_benchmark/data/datasets/voc.py
4
4121
import os import torch import torch.utils.data from PIL import Image import sys if sys.version_info[0] == 2: import xml.etree.cElementTree as ET else: import xml.etree.ElementTree as ET from maskrcnn_benchmark.structures.bounding_box import BoxList class PascalVOCDataset(torch.utils.data.Dataset): CL...
apache-2.0
wangpanjun/django-rest-framework
rest_framework/utils/field_mapping.py
39
9402
""" Helper functions for mapping model fields to a dictionary of default keyword arguments that should be used for their equivelent serializer fields. """ import inspect from django.core import validators from django.db import models from django.utils.text import capfirst from rest_framework.compat import clean_manyt...
bsd-2-clause
HiroIshikawa/21playground
thumblelog/myproject/lib/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py
469
4196
import functools from pip._vendor.requests.adapters import HTTPAdapter from .controller import CacheController from .cache import DictCache from .filewrapper import CallbackFileWrapper class CacheControlAdapter(HTTPAdapter): invalidating_methods = set(['PUT', 'DELETE']) def __init__(self, cache=None, ...
mit
odicraig/kodi2odi
addons/plugin.video.cartoons8/requests/packages/chardet/euckrprober.py
2931
1675
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
gpl-3.0
RobertoMalatesta/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py
124
3148
# Copyright (C) 2010 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 conditions and the f...
bsd-3-clause
CS-SI/QGIS
python/plugins/processing/algs/grass7/ext/i_pca.py
21
1257
# -*- coding: utf-8 -*- """ *************************************************************************** i_pca.py -------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *********************************************...
gpl-2.0
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/trial/reporter.py
3
40087
# -*- test-case-name: twisted.trial.test.test_reporter -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange """ Defines classes that handle the results of tests. """ from __future__ import division, absolute_import import sys import os import time import warnings...
gpl-3.0
openilabs/falconlab
env/lib/python2.7/site-packages/Cython/Build/Tests/TestStripLiterals.py
130
1552
from Cython.Build.Dependencies import strip_string_literals from Cython.TestUtils import CythonTest class TestStripLiterals(CythonTest): def t(self, before, expected): actual, literals = strip_string_literals(before, prefix="_L") self.assertEquals(expected, actual) for key, value in liter...
mit
LaoZhongGu/kbengine
kbe/src/lib/python/Lib/multiprocessing/__init__.py
5
7740
# # Package analogous to 'threading.py' but using processes # # multiprocessing/__init__.py # # This package is intended to duplicate the functionality (and much of # the API) of threading.py but uses processes instead of threads. A # subpackage 'multiprocessing.dummy' has the same API but is a simple # wrapper for 't...
lgpl-3.0
Griffon26/scrumboardtracker
scrumboardtracker/processioprotocol.py
2
1682
# Copyright 2016 Maurice van der Pot <griffon26@kfk4ever.com> # # 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...
gpl-3.0
adzanette/scf-extractor
scf-extractor/reader/NILCLexiconIterator.py
1
1264
from modules.Configuration import config from models.scf import Sentence from CorpusIterator import * from FileCorpusIterator import FileCorpusIterator import re ## Reads a NILC lexicon file # @author Adriano Zanette # @version 0.1 class Iterator(CorpusIterator): ## Class constructor # @author A...
mit
vkosuri/pyang
pyang/types.py
1
29954
"""YANG built-in types""" from .error import err_add from . import util from . import syntax import base64 from xml.sax.saxutils import quoteattr from xml.sax.saxutils import escape try: # python 2 from StringIO import StringIO except ImportError: # python 3 from io import StringIO class Abort(Except...
isc
fiji-flo/servo
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_pytester.py
12
4256
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import pytest import os from _pytest.pytester import HookRecorder from _pytest.config import PytestPluginManager from _pytest.main import EXIT_OK, EXIT_TESTSFAILED def test_make_hook_recorder(testdir): item = testdir.getitem(...
mpl-2.0
yohanko88/gem5-DC
src/python/m5/util/smartdict.py
88
5995
# Copyright (c) 2005 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 list ...
bsd-3-clause
medallia/aurora
src/main/python/apache/aurora/executor/common/health_checker.py
5
16309
# # 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 ...
apache-2.0
umkay/zulip
zerver/tests/test_report.py
5
4616
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from typing import Any, Callable, Iterable, Tuple from zerver.lib.test_helpers import ( ZulipTestCase, ) from zerver.lib.utils import statsd import mock import ujson def fix_params(raw_params): # type: (Dict...
apache-2.0
willingc/oh-mainline
vendor/packages/celery/celery/tests/test_events/test_events_state.py
18
10779
from __future__ import absolute_import from time import time from itertools import count from celery import states from celery.events import Event from celery.events.state import State, Worker, Task, HEARTBEAT_EXPIRE from celery.utils import uuid from celery.tests.utils import unittest class replay(object): d...
agpl-3.0
andmos/ansible
lib/ansible/modules/cloud/cloudstack/cs_host.py
13
18375
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, 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...
gpl-3.0
loftytopping/UManSysProp_public
umansysprop/examples/Pure_component_properties_example_petroc.py
1
11211
########################################################################################## # # # Example file that loads in SMILES strings and then calculates pure component # # properties for a given temperature # # ...
gpl-3.0
cheral/orange3
Orange/tests/test_manifold.py
4
5219
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring import unittest import numpy as np from Orange.projection import (MDS, Isomap, LocallyLinearEmbedding, SpectralEmbedding, TSNE) from Orange.distance import Euclidean from Orange.data impor...
bsd-2-clause