code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# # Copyright (C) 2015 FreeIPA Contributors see COPYING for license # from __future__ import print_function import errno import logging import os import pickle import shutil import sys import tempfile import textwrap import six from ipalib.install import certmonger, sysrestore from ipapython import ipautil from ip...
apophys/freeipa
ipaserver/install/server/install.py
Python
gpl-3.0
44,536
""" Copyright (C) 2017-2021 Vanessa Sochat. 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/. """ from django.conf.urls import url from rest_framework_swagger.views import ...
singularityhub/sregistry
shub/apps/api/urls/swagger.py
Python
mpl-2.0
454
from __future__ import unicode_literals from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.http import HttpResponse from django.shortcuts import render from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_exempt from django.v...
SphinxKnight/kuma
kuma/core/views.py
Python
mpl-2.0
1,861
# 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/. from __future__ import division, absolute_import, with_statement, print_function, unicode_literals import os import sys i...
jmlong1027/multiscanner
modules/Metadata/ExifToolsScan.py
Python
mpl-2.0
3,516
import contextlib import functools import logging import psycopg2.extras from psycopg2 import Error as Psycopg2Error _logger = logging.getLogger(__name__) def retry_on_psycopg2_error(func): """ Decorator that retries 3 times after Postgres error, in particular if the connection was not valid anymore be...
DatapuntAmsterdam/datapunt_geosearch
web/geosearch/datapunt_geosearch/db.py
Python
mpl-2.0
3,665
import ujson as json from pprint import pprint import msgpack import logging from cifsdk.constants import PYVERSION import os TRACE = os.environ.get('CIFSDK_CLIENT_MSG_TRACE') logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) if TRACE: logger.setLevel(logging.DEBUG) MAP = { 1: 'ping', 2...
csirtgadgets/bearded-avenger-sdk-py
cifsdk/msg.py
Python
mpl-2.0
3,924
# -*- 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 'Document' db.create_table('witness_document', ( ('id', self.gf('django.db.models...
khchen428/witness
witness/migrations/0001_initial.py
Python
mpl-2.0
9,590
import io import os import sys from atomicwrites import atomic_write from copy import deepcopy from multiprocessing import Pool, cpu_count from six import ensure_text from . import jsonlib from . import vcs from .item import (ConformanceCheckerTest, CrashTest, ManifestItem, ...
KiChjang/servo
tests/wpt/web-platform-tests/tools/manifest/manifest.py
Python
mpl-2.0
18,236
#!/usr/bin/env python3 # 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/. # # Copyright 2017-2019 - Edoardo Morassutto <edoardo.morassutto@gmail.com> # Copyright 2017 - Luc...
algorithm-ninja/territoriali-backend
terry/handlers/base_handler.py
Python
mpl-2.0
9,492
import logging from datetime import datetime import os from flask import request, g, Response, jsonify from openspending.views.api_v4.common import blueprint from openspending.lib.apihelper import DataBrowser_v4, GEO_MAPPING,FORMATOPTS from openspending.lib.jsonexport import to_json from openspending.lib.helpers...
USStateDept/FPA_Core
openspending/views/api_v4/aggregate.py
Python
agpl-3.0
1,586
# pylint: disable=import-error,protected-access,too-few-public-methods # Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>) # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests.common import SavepointCase class TestStockQuantityChangeReason(SavepointCase)...
OCA/stock-logistics-warehouse
stock_change_qty_reason/tests/test_stock_change_qty_reason.py
Python
agpl-3.0
3,032
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Silvina Faner (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
pronexo-odoo/odoo-argentina
l10n_ar_receipt/report/receipt_print.py
Python
agpl-3.0
1,664
# -*- coding: utf-8 -*- """Calculate controller""" from __future__ import division import collections import copy import itertools import os import time from openfisca_core.legislations import ParameterNotFound from .. import conf, contexts, conv, environment, model, wsgihelpers def N_(message): return mes...
sgmap/openfisca-web-api
openfisca_web_api/controllers/calculate.py
Python
agpl-3.0
19,065
from ..extensions import celery, redis_store from ..models.taxis import Taxi import time from flask import current_app @celery.task def clean_geoindex(): keys_to_clean = [] cursor = 0 taxi_id = set() cursor = None while cursor != 0: if cursor == None: cursor = 0 cursor, ...
odtvince/APITaxi
APITaxi/tasks/clean_geoindex.py
Python
agpl-3.0
1,030
""" WSGI config for credentials. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_...
edx/credentials
credentials/wsgi.py
Python
agpl-3.0
559
""" column 'instances' will be deleted later. Has to be nullable for transition Revision ID: 266658781c00 Revises: 204aae05372a Create Date: 2019-04-15 16:27:22.362244 """ # revision identifiers, used by Alembic. revision = '266658781c00' down_revision = '204aae05372a' from alembic import op import sqlalchemy as sa...
pbougue/navitia
source/tyr/migrations/versions/266658781c00_instances_nullable_in_equipments_provider.py
Python
agpl-3.0
643
#!/usr/bin/env python #-*- coding: utf-8 -*- import sys, urllib2 def main(): if len(sys.argv) < 2: print("Error, usage: {0} <your url>".format(sys.argv[0])) return 1 url = sys.argv[1] print(urllib2.urlopen('http://t34.me/api/?u=' + url).read()) return 0 if __name__ == '__main__': ...
z0rr0/t34.me
configs/api_python.py
Python
agpl-3.0
328
# -*- coding: utf-8 -*- # Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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, either version 3 of the #...
ujdhesa/unisubs
utils/testeditor.py
Python
agpl-3.0
5,102
from zou.app.models.search_filter import SearchFilter from .base import BaseModelResource, BaseModelsResource class SearchFiltersResource(BaseModelsResource): def __init__(self): BaseModelsResource.__init__(self, SearchFilter) class SearchFilterResource(BaseModelResource): def __init__(self): ...
cgwire/zou
zou/app/blueprints/crud/search_filter.py
Python
agpl-3.0
370
index_power=lambda a,n:a[n]**n if n<len(a)else-1
aureooms/checkio
elementary/02-index-power.py
Python
agpl-3.0
49
# -*- coding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com # All Rights Reserved. # info@vauxoo.com #####################################################...
cgstudiomap/cgstudiomap
main/parts/product-attribute/product_customer_code/product.py
Python
agpl-3.0
3,314
from flask_wtf import Form from wtforms import HiddenField, StringField from wtforms.validators import InputRequired, EqualTo from flask_login import current_user, abort, login_required from flask import request, flash, redirect, render_template import random import bcrypt from models.user_model import User from .. im...
JunctionAt/JunctionWWW
blueprints/player_profiles/views/admin_reset.py
Python
agpl-3.0
1,619
from django.shortcuts import render from rest_framework import generics, serializers from beacon.models import Inquiry, Reply class InquirySerializer(serializers.ModelSerializer): class Meta: model = Inquiry class ReplySerializer(serializers.ModelSerializer): class Meta: model = Reply cl...
SorenOlegnowicz/tracker
tracker/api/views.py
Python
agpl-3.0
739
# -*- coding: utf-8 -*- # Copyright (C) 2018 Compassion CH # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging import pytz from odoo import models, fields, api _logger = logging.getLogger(__name__) class HrAttendanceDay(models.Model): """ The instances of hr.attendance.day is crea...
eicher31/compassion-modules
hr_attendance_management/models/hr_attendance_day.py
Python
agpl-3.0
22,442
# Generated by Django 2.0.4 on 2019-07-16 21:18 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('scheduler', '0009_auto_20190607_1518'), ] operations = [ migrations.RenameField( model_name='smpost', old_name='post_instagr...
daily-bruin/meow
meow/scheduler/migrations/0010_auto_20190716_1418.py
Python
agpl-3.0
382
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import res_company # WARNING: Order of imports matters on this module, so don't put res_company # below the other modules since it will lead to a missing column error when # the module is initialized for the first time since there are fields with #...
OCA/event
event_mail/models/__init__.py
Python
agpl-3.0
482
#!/usr/bin/env python3 # -*-coding:UTF-8 -* import os import re import sys import time import redis import datetime sys.path.append(os.path.join(os.environ['AIL_BIN'], 'packages')) import Item import Term sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/')) import ConfigLoader def rreplace(s, old, new, occ...
CIRCL/AIL-framework
update/v2.2/Update.py
Python
agpl-3.0
4,172
#Constants PROD = 'prod' LOCAL = 'local' NOPI = 'nopi' #Set configs here ENV = PROD loggingEnabled = True
tonitran/dvc-embedded
runConfigs.py
Python
agpl-3.0
107
#!/usr/bin/env python """ $push is similar to $addToSet. The difference is that rather than accumulating only unique values it aggregates all values into an array. Using an aggregation query, count the number of tweets for each user. In the same $group stage, use $push to accumulate all the tweet texts for each user...
dvu4/Data-Wrangling-with-MongoDB
Lesson_5_Analyzing_Data/14-Using_push/push.py
Python
agpl-3.0
2,726
# -*- coding: utf-8 *-* # This file is part of wger Workout Manager. # # wger Workout Manager 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, either version 3 of the License, or # (at your option) any ...
DeveloperMal/wger
wger/exercises/management/commands/download-exercise-images.py
Python
agpl-3.0
5,449
from django.utils.translation import ugettext_lazy as _ from keops.db import models STATUS = ( ('draft', _('Draft')), ('open', _('In Progress')), ('pending', _('Pending')), ('done', _('Done')), ('cancelled', _('Cancelled')) ) class Category(models.Model): name = models.CharField(null=False, u...
mrmuxl/keops
keops/modules/project/models.py
Python
agpl-3.0
832
# -*- encoding: utf-8 -*- from openerp.osv import fields from openerp.osv import osv import lasso import simplejson class auth_saml_provider(osv.osv): """Class defining the configuration values of an Saml2 provider""" _name = 'auth.saml.provider' _description = 'SAML2 provider' _order = 'name' d...
xcgd/auth_saml
model/auth_saml.py
Python
agpl-3.0
2,907
""" Forms for the bug tracker app. """ from django import forms from django.utils.translation import ugettext_lazy as _ from apps.txtrender.forms import MarkupCharField from apps.contentreport.forms import ContentReportCreationForm from apps.tools.http_utils import get_client_ip_address from .models import (IssueTic...
TamiaLab/carnetdumaker
apps/bugtracker/forms.py
Python
agpl-3.0
4,597
# -*- coding: utf-8 -*- # © 2017 Comunitea # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api from datetime import timedelta from pytz import timezone from odoo.addons import decimal_precision as dp class StockPicking(models.Model): _inherit = 'stock.picking' ...
Comunitea/CMNT_00098_2017_JIM_addons
custom_documents/models/stock_picking.py
Python
agpl-3.0
11,479
#encoding=utf-8 from django.utils.safestring import mark_safe from django.db import models from django.utils.six import python_2_unicode_compatible from mptt.models import MPTTModel from mptt.fields import TreeForeignKey, TreeManyToManyField from datetime import date, timedelta from datetime import datetime from dja...
FreedomCoop/valuenetwork
general/models.py
Python
agpl-3.0
55,292
# -*- coding: utf-8 -*- ############################################################################## # # Authors: Stéphane Bidoul & Olivier Laurent # Copyright (c) 2012 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who ...
acsone/acsone-addons
hr_utilization/wizard/__init__.py
Python
agpl-3.0
1,429
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
gam-phon/taiga-back
taiga/auth/tokens.py
Python
agpl-3.0
2,045
import json import tempfile import os from werkzeug import secure_filename from webant.util import send_attachment_file, routes_collector from flask import request, current_app, url_for, jsonify from archivant import Archivant from archivant.exceptions import NotFoundException from util import ApiError, make_success_re...
ael-code/libreant
webant/api/archivant_api.py
Python
agpl-3.0
6,972
""" MIT License Copyright (c) 2017 Hajime Nakagami<nakagami@gmail.com> Copyright (c) 2019 Claude SIMON (https://q37.info/s/rmnmqd49) 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 withou...
epeios-q37/epeios
tools/xdhq/examples/PYH/ReversiIMG/main.py
Python
agpl-3.0
7,631
# -*- 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 'Resource' db.create_table('inventory_resource', ( ('id', self.gf('django.db.mode...
SYNHAK/spiff
spiff/inventory/migrations/0001_initial.py
Python
agpl-3.0
9,068
# -*- coding: utf-8 -*- ''' Created on 21 janv. 2016 @author: christian ''' import falcon import os import config import db class Stat(object): ''' Get global statistics ''' def on_get(self, req, resp): '''Return global statistics ''' dbc = db.conne...
openevacmap/openevac-back
src/routes/stat.py
Python
agpl-3.0
1,126
############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #########################################################################...
CompassionCH/compassion-switzerland
muskathlon/forms/order_material_form.py
Python
agpl-3.0
6,229
#!/usr/bin/env python3 from math import pi, atan class ScanSetting(object): """docstring for ScanSetting""" def __init__(self): super(ScanSetting, self).__init__() # for scan self.scan_step = 400 # steps self.theta_a = pi / 6 # radius between center and laser self.im...
blesscat/flux_line_bot
fluxclient/scanner/scan_settings.py
Python
agpl-3.0
1,386
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2006-2008 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/li...
Seldaiendil/meyeOS
devtools/qooxdoo-1.5-sdk/tool/pylib/ecmascript/transform/optimizer/basecalloptimizer.py
Python
agpl-3.0
4,225
# -*- encoding: utf-8 -*- __name__ = "Remove useless IDENTIFIER column in table MEMBERSHIP_REQUEST" def migrate(cr, version): if not version: return cr.execute('SELECT 1 ' 'FROM pg_class c,pg_attribute a ' 'WHERE c.relname=%s ' 'AND c.oid=a.attrelid ' ...
acsone/mozaik
mozaik_membership/migrations/1.0.1/post-migration.py
Python
agpl-3.0
511
from django.conf import settings from django.db import models as django_models from django.utils.translation import ugettext_lazy as _ from cms import models as cms_models from djangocms_utils import fields as cms_fields from shop import models as shop_models from shop.util import fields as shop_fields from simple_tra...
matevzmihalic/wlansi-store
wlansi_store/models.py
Python
agpl-3.0
1,854
from django.conf.urls.defaults import * urlpatterns = patterns('contrib.karma.views', (r'^$', 'index'), (r'index', 'index'), )
danigm/sweetter
sweetter/contrib/karma/urls.py
Python
agpl-3.0
136
from rest_framework import status from rest_framework.decorators import detail_route, list_route from sigma_core.views.sigma_viewset import SigmaViewSet from sigma_core.importer import Sigma, load_ressource User = load_ressource("User") from django.core.mail import send_mail from rest_framework.permissions import All...
SRLKilling/sigma-backend
data-server/django_app/sigma_core/views/user.py
Python
agpl-3.0
5,766
import sys sys.path.append("./m1") import div sum=div.div(1,200000) print(sum)
40423118/2017springcd_hw
w10/appdiv.py
Python
agpl-3.0
78
from __future__ import unicode_literals from django.db import migrations, models import multiselectfield.db.fields class Migration(migrations.Migration): dependencies = [ ('user', '0018_auto_20160922_1258'), ] operations = [ migrations.AddField( model_name='userprofile', ...
defivelo/db
apps/user/migrations/0019_auto_20160922_1342.py
Python
agpl-3.0
1,161
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Pexego Sistemas Informáticos All Rights Reserved # $Jesús Ventosinos Mayor <jesus@pexego.es>$ # # This program is free software: you can redistribute it and/or modify # it under the ...
jgmanzanas/CMNT_004_15
project-addons/product_outlet/product.py
Python
agpl-3.0
4,831
''' cloudminingstatus.py @summary: Show selected API data from cloudhasher and miningpool. @author: Andreas Krueger @since: 12 Feb 2017 @contact: https://github.com/drandreaskrueger @copyright: @author @since @license @license: Donationware, see README.md. Plus see LICENSE. @version: v0.1....
drandreaskrueger/cloudminingstatus
cloudminingstatus.py
Python
agpl-3.0
5,999
from .messages import I18nMessages
astrobin/astrobin
astrobin_apps_json_api/i18n/views/__init__.py
Python
agpl-3.0
35
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP module # Copyright (C) 2010 Micronaet srl (<http://www.micronaet.it>) and the # Italian OpenERP Community (<http://www.openerp-italia.com>) # # ###############################################...
Micronaet/micronaet-contract
contract_manage_report/wizard/wizard_report.py
Python
agpl-3.0
9,417
# -*- coding: utf-8 -*- # # Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of fiware-cygnus (FI-WARE project). # # fiware-cygnus 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 Foun...
jmcanterafonseca/fiware-cygnus
test/acceptance/tools/cygnus.py
Python
agpl-3.0
54,276
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import event_mass_edit
CLVsol/clvsol_odoo_addons
clv_event_history/wizard/__init__.py
Python
agpl-3.0
205
#!/usr/bin/env python """ Copyright (c) 2015-2017 Alan Yorinks 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 Version 3 as published by the Free Software Foundation; either or (at your option) any later version....
MrYsLab/PyMata
examples/digital_analog_io/callback_buttonLed_toggle.py
Python
agpl-3.0
2,453
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 ...
arseneyr/essentia
test/src/unittest/standard/test_scale.py
Python
agpl-3.0
2,054
""" Each store has slightly different semantics wrt draft v published. XML doesn't officially recognize draft but does hold it in a subdir. Old mongo has a virtual but not physical draft for every unit in published state. Split mongo has a physical for every unit in every state. Given that, here's a table of semantics...
UQ-UQx/edx-platform_lti
common/lib/xmodule/xmodule/modulestore/xml_importer.py
Python
agpl-3.0
40,861
# coding: utf-8 ############################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ##########################################...
mohamedhagag/community-addons
product_unique_serial/tests/test_for_unicity.py
Python
agpl-3.0
22,996
from . import test_stock_location_empty
OCA/stock-logistics-warehouse
stock_location_empty/tests/__init__.py
Python
agpl-3.0
40
from .item_status import * # noqa
vyos-legacy/vyconfd
vyconf/utils/__init__.py
Python
lgpl-2.1
35
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
skosukhin/spack
lib/spack/spack/cmd/flake8.py
Python
lgpl-2.1
10,620
#!/usr/bin/python """ Resources: http://code.google.com/p/pybluez/ http://lightblue.sourceforge.net/ http://code.google.com/p/python-bluetooth-scanner """ from __future__ import with_statement import select import logging import bluetooth import gobject import util.misc as misc_utils _moduleLogger = logging.getL...
epage/telepathy-bluewire
src/protocol/backend.py
Python
lgpl-2.1
13,051
#!/bin/sh """": # -*-python-*- bup_python="$(dirname "$0")/bup-python" || exit $? exec "$bup_python" "$0" ${1+"$@"} """ # end of bup preamble import glob, os, sys, tempfile from bup import options, git, bloom from bup.helpers import (add_error, debug1, handle_ctrl_c, log, progress, qprogress, ...
gevaerts/bup
cmd/bloom-cmd.py
Python
lgpl-2.1
5,247
class Foo(object): def set(self, value): self.field = value def get(self): return self.field a = Foo() a.set("hello world") z = a.get() print z z a
retoo/pystructure
s101g/examples/simple/simple.py
Python
lgpl-2.1
195
# Higgins - A multi-media server # Copyright (c) 2007-2009 Michael Frank <msfrank@syntaxjockey.com> # # This program is free software; for license information see # the COPYING file. from higgins.logger import Loggable class UPnPLogger(Loggable): log_domain = "upnp" logger = UPnPLogger()
msfrank/Higgins
higgins/upnp/logger.py
Python
lgpl-2.1
296
# Copyright © 2017 Collabora Ltd. # # This file is part of pfg. # # pfg is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) # any later version. # # pf...
afrantzis/pixel-format-guide
tests/__init__.py
Python
lgpl-2.1
768
#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : distribution = LogUniform(1.0, 2.5) size = 10000 sample = distribution.getSample(size) factory = LogUniformFactory covariance = CovarianceMatrix estimatedDistribution = factory.build(sample) p...
dbarbier/privot
python/test/t_LogUniformFactory_std.py
Python
lgpl-3.0
1,188
''' /******************************************************************************* * * Copyright (c) 2015 Fraunhofer FOKUS, All rights reserved. * * 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 Sof...
fraunhoferfokus/fixmycity
dummy/templatetags/value_from_settings.py
Python
lgpl-3.0
2,196
#!/usr/bin/env python3 # cbus/protocol/application/sal.py - SAL interface # Copyright 2012-2019 Michael Farrell <micolous+git@gmail.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, ...
micolous/cbus
cbus/protocol/application/sal.py
Python
lgpl-3.0
1,939
"""This demo program uses the interface to SNES solver for variational inequalities to solve a contact mechanics problems in FEniCS. The example considers a heavy hyperelastic circle in a box of the same size""" # Copyright (C) 2012 Corrado Maurini # # This file is part of DOLFIN. # # DOLFIN is free software: you ...
akshmakov/Dolfin-Fijee-Fork
demo/undocumented/contact-vi-snes/python/demo_contact-vi-snes.py
Python
lgpl-3.0
4,001
# -*- coding: utf-8 -*- # Copyright(C) 2009-2016 Romain Bignon # # This file is part of a weboob module. # # This weboob module 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 3 of the ...
laurentb/weboob
modules/bnporc/pp/browser.py
Python
lgpl-3.0
27,890
"""Funções de conversão usada pelo scraper do Itaú.""" import datetime from dateutil.parser import parse from dateutil.relativedelta import relativedelta from decimal import Decimal def date(s): """Converte strings 'DD/MM' em datetime.date. Leva em consideração ano anterior para meses maiores que o mês corren...
henriquebastos/itauscraper
itauscraper/converter.py
Python
lgpl-3.0
2,425
from pycp2k.inputsection import InputSection from ._each421 import _each421 class _cartesian_eigs1(InputSection): def __init__(self): InputSection.__init__(self) self.Section_parameters = None self.Add_last = None self.Common_iteration_levels = None self.Filename = None ...
SINGROUP/pycp2k
pycp2k/classes/_cartesian_eigs1.py
Python
lgpl-3.0
746
from distutils.core import setup setup( name='curie', version='0.1.1', author='Eric Viara', author_email='eric.viara@curie.fr', packages=['curie'], url='http://pypi.python.org/pypi/TowelStuff/', license='LICENSE.txt', description='NaviCell Python Binding', long_description=open('REA...
sysbio-curie/NaviCell
bindings/python/setup.py
Python
lgpl-3.0
340
import random from gevent.pool import Group from base import TestCase, declares_queues from nucleon.amqp import Connection from nucleon.amqp.spec import FrameQueueDeclareOk qname = 'test%s' % (random.random(),) queues = [qname + '.%s' % (i,) for i in xrange(100)] class TestLimits(TestCase): @declares_queues(*...
seatme/nucleon.amqp
tests/test_limits.py
Python
lgpl-3.0
726
from functools import wraps import logging import time try: from collections import OrderedDict except ImportError: try: # ordereddict available on pypi for Python < 2.7 from ordereddict import OrderedDict except ImportError: # Otherwise fall back on normal dict OrderedDict ...
adamreeve/npTDMS
nptdms/utils.py
Python
lgpl-3.0
1,733
import RPi.GPIO as GPIO import datetime import time import pandas as pd import logging import logging.handlers import sys logger = logging.getLogger('fridge') handler = logging.StreamHandler() fHandler = logging.FileHandler('fridge.log') formatter = logging.Formatter("%(asctime)s %(levelname)s %(message)s", "%Y-...
iainr/fridgid
Fridge.py
Python
lgpl-3.0
9,372
# -*- coding: utf-8 -*- # Copyright(C) 2012-2014 Romain Bignon # # This file is part of a weboob module. # # This weboob module 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 3 of the L...
laurentb/weboob
modules/bred/module.py
Python
lgpl-3.0
3,023
from pycp2k.inputsection import InputSection from ._dielectric_cube1 import _dielectric_cube1 from ._dirichlet_bc_cube1 import _dirichlet_bc_cube1 from ._dirichlet_cstr_charge_cube1 import _dirichlet_cstr_charge_cube1 class _implicit_psolver1(InputSection): def __init__(self): InputSection.__init__(self) ...
SINGROUP/pycp2k
pycp2k/classes/_implicit_psolver1.py
Python
lgpl-3.0
709
from distutils.core import setup setup( name='jerboa', packages=['jerboa'], # this must be the same as the name above version='0.2.1-alpha', description='', author='Matt Badger', author_email='foss@lighthouseuk.net', url='https://github.com/LighthouseUK/jerboa', # use the URL to the githu...
LighthouseUK/jerboa
setup.py
Python
lgpl-3.0
659
# This file is part of saddle-bags. # # saddle-bags 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 3 of the License, or # (at your option) any later version. # # saddle-bags is distribut...
transplantation-immunology/EMBL-HLA-Submission
saddlebags/AlleleSubmission.py
Python
lgpl-3.0
3,176
# -*- coding: utf-8 -*- import webapp2 from boilerplate import models from boilerplate import forms from boilerplate.handlers import BaseHandler from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb from google.appengine.api import users as googleusers from collections impor...
nortd/bomfu
admin/users.py
Python
lgpl-3.0
4,033
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
ahmad88me/PyGithub
github/GithubException.py
Python
lgpl-3.0
5,277
# -*- coding: utf-8 -*- """ To be used in conjunction with: NR099910-004-10006 - Repeated lowering, OrcaFlex Gumbel Script NR099910-004-10001 - Lifting Analysis Methodology - Probabilistic Approach =============================================================================================== Version 13 Correct...
haphaeu/yoshimi
PandasDataFrame/GumbelFit_opt3.py
Python
lgpl-3.0
31,937
#!/usr/bin/env python3 import re import os import os.path import sys def main(): already_found = [] url_matcher = re.compile(r'(https?://(www.)?)?((youtu.be|youtube.(com|de|ch|at))/watch\?v=[-_0-9A-Za-z]{11}|youtu.be/[-_0-9A-Za-z]{11})') backup_matcher = re.compile(r'youtu') argc = len(sys.argv) ...
sseering/ytdlWrapper
urlfind.py
Python
unlicense
1,923
from django.apps import AppConfig class CompetencesConfig(AppConfig): name = 'competences' verbose_name = "Компетенции"
ITOO-UrFU/open-programs
open_programs/apps/competences/apps.py
Python
unlicense
141
#import some things we need import httplib2 from oauth2client.client import SignedJwtAssertionCredentials #included with the Google Apps Directory API from apiclient.discovery import build import csv def downloadUsers(domain, account, customerId): superAdmin = 'is@' + domain serviceAccount = account + '@develo...
misterhay/GoogleAppsProvisioning
oauth2_getAllUsers.py
Python
unlicense
3,688
#!/usr/bin/env python # -*- coding: utf-8 -*- from jinja2 import Template as Jinja2Template from atlas.providers import providers class Template(Jinja2Template): def __init__(self, *args, **kwargs): super(Template, self).__init__(*args, **kwargs) for provider in providers: self.glob...
citruspi/Atlas
atlas/templating/template.py
Python
unlicense
356
__author__ = 'canderson' import os import webapp2 import jinja2 from google.appengine.ext import db template_dir = os.path.join(os.path.dirname(__file__), 'templates') env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir), autoescape=True) class Handler(webapp2.RequestHandle...
W0mpRat/WebDev03
UdacityFrameWork.py
Python
unlicense
781
# # common.py # # Copyright (C) 2009 Justin Noah <justinnoah@gmail.com> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # Copyright (C) 2009 Damien Churchill <damoxc@gmail.com> # # Deluge is free software. # #...
justinnoah/autobot
autobot/common.py
Python
apache-2.0
1,761
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
sailthru/mongo-connector
tests/test_oplog_manager.py
Python
apache-2.0
17,080
import uuid from motey.models.image import Image from motey.models.service_state import ServiceState class Service(object): """ Model object. Represent a service. A service can have multiple states, action types and service types. """ def __init__(self, service_name, images, id=uuid.uuid4().hex,...
Neoklosch/Motey
motey/models/service.py
Python
apache-2.0
2,107
#!/usr/bin/python # -*- coding: utf-8 -*- """ PyCOMPSs Testbench ======================== """ # Imports import unittest from modules.testOpenclDecorator import testOpenclDecorator def main(): suite = unittest.TestLoader().loadTestsFromTestCase(testOpenclDecorator) unittest.TextTestRunner(verbosity=2).run(...
mF2C/COMPSs
tests/sources/python/1_decorator_opencl/src/decorator_opencl.py
Python
apache-2.0
367
# Copyright 2017 NeuStar, 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 a...
sbarbett/ip_intelligence
src/check_json.py
Python
apache-2.0
945
__author__ = 'admin' class ContactHelper: def __init__(self, app): self.app = app def create(self, contact): self.fill_contact_fields(contact) def modify(self, contact): # modify contact self.click_edit_button() self.fill_contact_fields(contact) def set_field_...
dimchenkoAlexey/python_training
fixture/contact.py
Python
apache-2.0
3,347
import logging from abc import abstractmethod from string import Template from parsl.providers.error import SchedulerMissingArgs, ScriptPathError from parsl.launchers.error import BadLauncher from parsl.providers.provider_base import ExecutionProvider logger = logging.getLogger(__name__) class ClusterProvider(Execu...
Parsl/parsl
parsl/providers/cluster_provider.py
Python
apache-2.0
4,955
# 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...
gooddata/openstack-nova
api-guide/source/conf.py
Python
apache-2.0
9,312
# Copyright 2012 Colin Scott # Copyright 2012 Andreas Wundsam # Copyright 2012 James McCauley # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
damomeen/pox-datapath
pox/lib/ioworker/__init__.py
Python
apache-2.0
12,928