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
# This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import decimal from ._price import TaxfulPrice, TaxlessPrice from ._priceful_properties import Taxf...
akx/shoop
shoop/core/pricing/_priceful.py
Python
agpl-3.0
5,549
# -*- coding: utf-8 -*- import os import sys import cPickle import numpy as np from sklearn.cluster import KMeans from sklearn.cluster.k_means_ import _init_centroids from sklearn.metrics.pairwise import chi2_kernel from sklearn.metrics.pairwise import pairwise_distances from antispoofing.spectralcubes.utils import ...
allansp84/spectralcubes
antispoofing/spectralcubes/midlevelfeatures/midlevelfeatures.py
Python
agpl-3.0
14,264
#!/usr/bin/env python from distutils.core import setup setup( name='smon', version='0.8', description='Scrapy monitorization tools', author='Jordi Burguet-Castell', author_email='jordi@mp2p.net', py_modules=['smon_utils'], license='GNU General Public License, version 3', scripts=['smon...
torrents-com/content
scrapy/tools/setup.py
Python
agpl-3.0
358
############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #####################...
CompassionCH/compassion-modules
thankyou_letters/wizards/__init__.py
Python
agpl-3.0
423
import os activate_this = os.path.join('/home/ckan/.virtualenvs/ckan/bin/activate_this.py') execfile(activate_this, dict(__file__=activate_this)) from paste.deploy import loadapp config_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'prod.ini') from paste.script.util.logging_config import fileCo...
DanePubliczneGovPl/ckanext-danepubliczne
config/ckan.py
Python
agpl-3.0
474
""" Password reset logic and views . """ import logging from django import forms from django.conf import settings from django.contrib import messages from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX from django.contrib.auth.model...
edx-solutions/edx-platform
openedx/core/djangoapps/user_authn/views/password_reset.py
Python
agpl-3.0
24,770
# Copyright (C) 2011 Alexey Agapitov # # 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 License, or # (at your option) any later version. # # This p...
marwinxxii/ktope
ktope/cli/hw5.py
Python
agpl-3.0
1,242
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
amcat/amcat
amcat/scripts/actions/tests/test_export_codebook.py
Python
agpl-3.0
5,182
from django.db import migrations from auth_helpers.migrations import ( get_migration_group_create, get_migration_group_delete, ) try: from uk_results.models import ( TRUSTED_TO_CONFIRM_CONTROL_RESULTS_GROUP_NAME, TRUSTED_TO_CONFIRM_VOTE_RESULTS_GROUP_NAME, ) except: TRUSTED_TO_CONF...
DemocracyClub/yournextrepresentative
ynr/apps/uk_results/migrations/0006_add_admin_persmissions.py
Python
agpl-3.0
1,141
#!/usr/bin/python import os import sys import re url_cgi = {} url_23andme = {} phen_23andme_map = {} phen_cgi_map = {} fp = open("data/data_locations.csv") for line in fp: line = line.strip() a = line.split(",") if a[1] == "cgi": url_cgi[a[0]] = a[2] elif a[1] == "23andme": url_23andme[a[0]] = a[2]...
abeconnelly/hupgp-dbgap-submission
src/mk_data_url_location_csv.py
Python
agpl-3.0
837
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
staute/shinken_package
shinken/scheduler.py
Python
agpl-3.0
76,404
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Copyright 2012-2015 OpenBroadcaster, Inc. This file is part of OpenBroadcaster Player. OpenBroadcaster Player 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...
openbroadcaster/obplayer
obplayer/offair_audiolog/audiolog.py
Python
agpl-3.0
4,073
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, os from frappe import _ from frappe.utils import cint import frappe.defaults from frappe.model.document import Document class Comp...
suyashphadtare/test
erpnext/setup/doctype/company/company.py
Python
agpl-3.0
15,327
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError # YTI PLEASE SPLIT ME class Project(models.Model): _inherit = 'project.project' @api.model def default_get(self, fields):...
ddico/odoo
addons/sale_timesheet/models/project.py
Python
agpl-3.0
15,166
# -*- coding: utf-8 -*- # Copyright 2017 Joaquin Gutierrez Pedrosa <joaquin@gutierrezweb.es> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Hr Payroll Advance Account', 'version': '11.0.0.1.0', 'category': 'Human Resources', 'sequence': 36, 'summary': 'Payroll advances ...
percevaq/odoo_addons
hr_payroll_advance_account/__manifest__.py
Python
agpl-3.0
718
from pylm.servers import Master class MyMaster(Master): def __init__(self, *args, **kwargs): self.counter = 0 super(MyMaster, self).__init__(*args, **kwargs) def scatter(self, message): for i in range(3): yield message def gather(self, message): self.count...
nfqsolutions/pylm
examples/gather/master.py
Python
agpl-3.0
832
from datetime import datetime from sqlalchemy import Column, DateTime from inbox.sqlalchemy_ext.util import Base36UID, generate_public_id class HasPublicID(object): public_id = Column(Base36UID, nullable=False, index=True, default=generate_public_id) class AutoTimestampMixin(object): ...
abhishekgahlot/inbox
inbox/models/mixins.py
Python
agpl-3.0
1,091
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/osis_louvain
base/tests/factories/user.py
Python
agpl-3.0
2,440
# Copyright (C) 2017-2021 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information """ Django common settings for swh-web. """ import os impor...
SoftwareHeritage/swh-web-ui
swh/web/settings/common.py
Python
agpl-3.0
9,546
# from lino_xl.lib.contacts.fixtures.demo import site_company_objects as objects from lino_xl.lib.contacts.fixtures.demo import objects
lsaffre/noi
lino_noi/lib/contacts/fixtures/demo.py
Python
agpl-3.0
136
""" Custom settings for the text rendering app. """ from django.conf import settings # Emoticons images directory path with trailing slash EMOTICONS_IMG_DIR = getattr(settings, 'EMOTICONS_IMG_DIR', 'images/smileys/') # Base URL for relative-to-absolute conversion RELATIVE_URL_BASE = getattr(settings, 'RELATIVE_URL_...
TamiaLab/carnetdumaker
apps/txtrender/settings.py
Python
agpl-3.0
361
# This file was translated from the original Java test from the Apache # Cassandra source repository, as of commit 6ca34f81386dc8f6020cdf2ea4246bca2a0896c5 # # The original Apache Cassandra license: # # SPDX-License-Identifier: Apache-2.0 from cassandra_tests.porting import * import time from cassandra.query import U...
scylladb/scylla
test/cql-pytest/cassandra_tests/validation/entities/timestamp_test.py
Python
agpl-3.0
8,212
#!/usr/bin/env python # rebuild.py # # Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io # # This file (rebuild.py) is part of BitDust Software. # # BitDust 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 F...
vesellov/bitdust.devel
raid/rebuild.py
Python
agpl-3.0
6,927
# -*- coding: utf-8 -*- # # SPDX-License-Identifier: AGPL-3.0-or-later # # snippy - software development and maintenance notes manager. # Copyright 2017-2020 Heikki J. Laaksonen <laaksonen.heikki.j@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
heilaaks/snippy
tests/lib/reference.py
Python
agpl-3.0
6,929
import logging from base64 import b64decode import pem from OpenSSL.crypto import FILETYPE_PEM, load_certificate, verify, X509, \ X509Store, X509StoreContext, load_crl, X509StoreFlags from django.conf import settings # type: ignore from rest_framework.exceptions import ValidationError logger = logging.getLogger(...
clone1612/appstore
nextcloudappstore/core/certificate/validator.py
Python
agpl-3.0
4,284
import pytest from selenium.common.exceptions import NoSuchElementException from ..base_test import SeleniumTestCase @pytest.mark.batch3 class TestLocationUpdating(SeleniumTestCase): @pytest.fixture def records_org_prj(self, basic_org, records_prj): self.org = basic_org self.prj = records_p...
Cadasta/cadasta-test
cadasta/test/record_tests/test_tenure_relationship_updating.py
Python
agpl-3.0
2,424
import ddt from mock import patch from xblock.core import XBlock from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from ..xblock_service import OptionalService class PureBlock(XBlock): pass class BadBlock(object)...
nttks/edx-platform
openedx/core/djangoapps/ga_optional/tests/test_xblock_service.py
Python
agpl-3.0
1,959
#!/usr/bin/python import sys, math from borgy.graph.bulge_graph import BulgeGraph def print_neato(bg): stems = bg.get_bulged_stem_names() # The different nodes for different types of bulges node_defs = dict() node_lines = dict() # loops node_defs[1] = '\t{node [style=filled,shape=circle,fil...
pkerpedjiev/ernwin
fess/scripts/graph_to_neato.py
Python
agpl-3.0
3,764
# coding=utf-8 from django.core.mail import send_mail from django.db.models.signals import pre_delete from django.dispatch import receiver from . import models @receiver(pre_delete, sender=models.Need) def send_email_notifications(sender, instance, **kwargs): """ HACK ALERT This needed to be done quickl...
mei-li/volunteer_planner
scheduler/signals.py
Python
agpl-3.0
1,033
import numpy as np from scipy.stats import norm, expon from tikon.datos.datos import máximo, f_numpy from tikon.ecs.aprioris import APrioriDist from tikon.ecs.árb_mód import Parám from ._plntll_ec import EcuaciónEdad class PrTDevMínBNLT(Parám): nombre = 't_dev_mín' líms = (None, None) unids = 'C' apr...
julienmalard/Tikon
tikon/móds/rae/orgs/ecs/edad/brr_no_lín_temp.py
Python
agpl-3.0
2,223
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This pro...
Micronaet/micronaet-migration
product_extra_packaging/__openerp__.py
Python
agpl-3.0
1,621
################################################################################ # # Copyright 2015-2020 Félix Brezo and Yaiza Rubio # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwa...
i3visio/osrframework
osrframework/utils/browser.py
Python
agpl-3.0
6,104
# -*- coding: utf-8 -*- # © 2011 Guewen Baconnier,Camptocamp,Elico-Corp # © 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api class ProductLink(models.Model): _name = 'product.link' _rec_name = 'linked_product_id' @api.model def...
JayVora-SerpentCS/e-commerce
product_multi_link/models/product.py
Python
agpl-3.0
1,248
# -*- coding: utf-8 -*- import numpy as np import pylab as pl # https://math.stackexchange.com/questions/920351/selecting-at-least-one-ball-of-each-color # https://en.wikipedia.org/wiki/Hypergeometric_distribution # Example. From the example given on the web Wikipedia: The Free # Encyclopedia [http://en.wikipedi...
erramuzpe/LAB_TOOLS
source/EXP_SAVER/saver.py
Python
agpl-3.0
2,401
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 - KMEE INFORMATICA LTDA (<http://kmee.com.br>). # Luis Felipe Miléo - mileo@kmee.com.br # # All other contributions are (C) by their respective contributors # # All Rights ...
kmee/odoo-brazil-banking
l10n_br_account_banking_payment/wizard/payment_order_create.py
Python
agpl-3.0
8,012
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2010-2013, GEM Foundation, G. Weatherill, M. Pagani, # D. Monelli. # # The Hazard Modeller's Toolkit is free software: you can redistribute # it and/or modify it under the terms of the GNU Affero General Public # License ...
g-weatherill/hmtk
tests/seismicity/test_seismicity_utils.py
Python
agpl-3.0
18,848
################################################################################ # # Copyright 2015-2020 Félix Brezo and Yaiza Rubio # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwa...
i3visio/osrframework
osrframework/wrappers/pending/v7n.py
Python
agpl-3.0
3,955
# Copyright 2020 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase class TestMrpMtoWithStock(TransactionCase): def setUp(self, *args, **kwargs): super(TestMrpMtoWithStock, self).setUp(*args, **kwargs) self.repair_obj...
OCA/manufacture
repair_refurbish/tests/test_repair_refurbish.py
Python
agpl-3.0
6,809
#!/usr/bin/env python """ Iterates over file in blocks, for FFT processing and/or cross-correlation example data: https://zenodo.org/record/848275 ./PlotLoop.py ~/data/eclipse/wwv_rp0_2017-08-22T13-14-52_15.0MHz.bin 192e3 """ from pathlib import Path import numpy as np from matplotlib.pyplot import figure,draw,pause,...
scienceopen/piradar
Looper.py
Python
agpl-3.0
1,922
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # 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; version 2 dated June...
rwl/openpowersystem
dynamics/dynamics/excitation_systems/exc_cz.py
Python
agpl-3.0
1,436
# -*- coding: utf-8 -*- # Django import django.db.models.deletion from django.conf import settings from django.db import migrations, models # Third Party import easy_thumbnails.fields # MuckRock import muckrock.core.fields import muckrock.jurisdiction.models class Migration(migrations.Migration): dependencies...
MuckRock/muckrock
muckrock/agency/migrations/0001_initial.py
Python
agpl-3.0
6,043
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('dashboard_app', '0012_auto_20150126_1644'), ] operations = [ migrations.RemoveField( model_name='imagereportchar...
Linaro/lava-server
dashboard_app/migrations/0013_auto_20150127_1341.py
Python
agpl-3.0
601
# -*- coding: utَf-8 -*- { 'name': "duplicate sale lines color", 'summary': """coloring duplicate sale order lines""", 'description': """ coloring duplicate sale order lines """, 'author': "DVIT.me", 'website': "http://dvit.me", 'category': 'Sale Order', 'version': '10.0.2.0', ...
mohamedhagag/dvit-odoo
dvit_sale_duplicate_lines/__manifest__.py
Python
agpl-3.0
394
# 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { 'name': 'AEAT modelo 123', 'version': '11.0.1.1.0', 'category': "Localisation/Accounting", 'author': "Tecnativa, " "Spanish Localization Team, " "Odoo Communi...
factorlibre/l10n-spain
l10n_es_aeat_mod123/__manifest__.py
Python
agpl-3.0
692
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), migrations.swappable_dependency(settings.AUTH_USER_...
asm-products/banyan-web
access_groups/migrations/0002_auto_20150721_0419.py
Python
agpl-3.0
1,349
# -*- 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 ...
petervanderdoes/wger
wger/gym/managers.py
Python
agpl-3.0
2,083
#!/usr/bin/python import os import sys import cgi import time import random import string import Cookie import locale import urlparse import datetime import traceback try: import simplejson as json except: import json sys.path.append((os.path.dirname(__file__) or ".") + "/../db") sys.path.append((os.path.dirna...
vincebusam/pyWebCash
web/api.py
Python
agpl-3.0
10,118
import ddt from mock import patch, Mock from cms.djangoapps.contentstore.signals.handlers import ( GRADING_POLICY_COUNTDOWN_SECONDS, handle_grading_policy_changed ) from student.models import CourseEnrollment from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import Mod...
jolyonb/edx-platform
cms/djangoapps/contentstore/tests/test_signals.py
Python
agpl-3.0
1,547
# coding: utf-8 """ Django settings for a boilerplate project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ import os from django.utils.translation import uget...
alper/volunteer_planner
volunteer_planner/settings/base.py
Python
agpl-3.0
4,145
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test BuildQueue features.""" from datetime import timedelta from simplejson import dumps from zope.component import getUtility from zope.security.proxy import removeSecur...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/soyuz/tests/test_buildpackagejob.py
Python
agpl-3.0
22,248
# -*- coding: utf-8 -*- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import nuts_import
linkitspa/l10n-italy
l10n_it_location_nuts/wizard/__init__.py
Python
agpl-3.0
116
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2017 Ircam # Copyright (c) 2016-2017 Guillaume Pellerin # Copyright (c) 2016-2017 Emilie Zawadzki # This file is part of mezzanine-organization. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
Ircam-Web/mezzanine-organization
organization/network/management/commands/create-default-organization.py
Python
agpl-3.0
1,370
from glob import glob import logging import os.path from askomics.libaskomics.ParamManager import ParamManager from askomics.libaskomics.source_file.SourceFileGff import SourceFileGff from askomics.libaskomics.source_file.SourceFileTsv import SourceFileTsv from askomics.libaskomics.source_file.SourceFileTtl import Sou...
ofilangi/askomics
askomics/libaskomics/SourceFileConvertor.py
Python
agpl-3.0
3,882
""" WSGI config for conceptserver project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICAT...
pmitros/concept-tag-server
conceptserver/conceptserver/wsgi.py
Python
agpl-3.0
1,148
""" Install Python and Node prerequisites. """ import hashlib import io import os import re import subprocess import sys from distutils import sysconfig import six from paver.easy import BuildFailure, sh, task from six.moves import range from .utils.envs import Env from .utils.timer import timed PREREQS_STATE_DIR ...
cpennington/edx-platform
pavelib/prereqs.py
Python
agpl-3.0
12,376
""" Serialize data to/from JSON """ # Avoid shadowing the standard library json module from __future__ import absolute_import import datetime import decimal import json import sys from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer f...
mrmuxl/keops
keops/core/serializers/json.py
Python
agpl-3.0
3,575
print "Start." import requests from xml.dom import minidom url="https://services.techhouse.dk/webTourManager/0.6/Service.svc/basHttps" #headers = {'content-type': 'application/soap+xml'} headers = {'content-type': 'text/xml', 'SOAPAction' : 'https://services.techhouse.dk/webTourManager/IPlanning/Login'} body = """<s...
sl2017/campos
campos_transportation/misc/webtour_test3.py
Python
agpl-3.0
2,071
from sys import path import sys import pdb import collections import types import re path.insert(0, '.') from test_util import shard_table path.insert(0, "../../drivers/python") from os import environ import rethinkdb as r # JSPORT = int(sys.argv[1]) CPPPORT = int(sys.argv[2]) CLUSTER_PORT = int(sys.argv[3]) BUILD = ...
rocio/rethinkdb
test/rql_test/drivers/driver.py
Python
agpl-3.0
8,141
# pylmm is a python-based linear mixed-model solver with applications to GWAS # Copyright (C) 2013 Nicholas A. Furlotte (nick.furlotte@gmail.com) # Copyright (C) 2015 Pjotr Prins (pjotr.prins@thebird.nl) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero G...
genenetwork/pylmm_gn2
pylmm_gn2/input.py
Python
agpl-3.0
8,358
## # Copyright (C) 2013 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen 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, o...
Inboxen/website
views/blog/add.py
Python
agpl-3.0
2,013
from django.conf.urls import url from django.contrib import admin from django.core.urlresolvers import reverse from django.forms import ModelForm from django.http import HttpResponseRedirect from livinglots import get_owner_contact_model from .admin_views import MakeAliasesView from .models import Alias class Owner...
596acres/django-livinglots-owners
livinglots_owners/admin.py
Python
agpl-3.0
2,155
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from rest_framework_swagger.views import get_swagger_view from django.urls import re_path from django.views.generic import RedirectView from ureport.api.views import ( DashBlockDetails, DashBlockList, ...
rapidpro/ureport
ureport/api/urls.py
Python
agpl-3.0
2,209
# encoding: utf-8 from Errors import AssertionFail from Dweb import Dweb class Transportable(object): """ Encapsulate any kind of object that can be transported Any subclass needs to implement: _data getter and setter to return the data and to load from opaque bytes returned by transport. (Note Smart...
mitra42/dweb
dweb/Transportable.py
Python
agpl-3.0
3,238
# coding: utf-8 # In[158]: import nest import numpy as np import sys import os nest.ResetKernel() # In[159]: unique_ID = sys.argv[1] params_file = 'params' + unique_ID + '.param' params = np.genfromtxt(params_file) gL_Bas = params[0]*1000 #5.0e-3 #7.14293e-3 tauMem_Bas = params[1] #14.0 Cm_Bas = ...
KaliLab/optimizer
optimizer/new_test_files/adexpif_external_ca3_pc/teststeps_optim5.py
Python
lgpl-2.1
3,387
# -*- coding: iso-8859-1 -*- import sys import salome salome.salome_init() theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook import os from blocFissure import gmu ### ### GEOM component ### import GEOM from salome.geom import geomBuilder import math import SALOMEDS geompy = ge...
FedoraScientific/salome-smesh
src/Tools/blocFissure/materielCasTests/fissureGauche.py
Python
lgpl-2.1
5,391
''' Platform-specific installation scripts. LICENSING ------------------------------------------------- hwiopy: A common API for hardware input/output access. Copyright (C) 2014-2015 Nicholas Badger badg@nickbadger.com nickbadger.com This library is free software; you can redistribute it and/or m...
Badg/hwiopy
platform_setup.py
Python
lgpl-2.1
7,848
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2013 Jolla Ltd. # Contact: Denis Zalevskiy <denis.zalevskiy@jollamobile.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; ei...
android-808/statefs
tests/UT.py
Python
lgpl-2.1
12,498
# -*- coding:utf-8 -*- # # Copyright (C) 2012, Maximilian Köhl <linuxmaxi@googlemail.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 2.1 of the License, or (at you...
koehlma/lightasync
src/lightasync/event.py
Python
lgpl-2.1
2,710
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (C) 2016 Michel Müller, Tokyo Institute of Technology # This file is part of Hybrid Fortran. # Hybrid Fortran 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...
muellermichel/Hybrid-Fortran
hf/tools/filesystem.py
Python
lgpl-3.0
2,088
import hashlib import django.db.models import django.forms from . import widgets def sha1(s): """Get a SHA1 hash of string `s`.""" algo = hashlib.new('sha1') algo.update(s.encode('ascii')) return algo.hexdigest() REGISTRY = {} def get_qualname(cls): """Get the fully qualified name of a class...
leo-the-manic/django-simple-select
simpleselect/fields.py
Python
lgpl-3.0
1,292
def combos(ls,n): if n == 0: return [[]] rtn = [] for it in ls: for ls2 in combos(ls, n-1): ls2.append(it) rtn.append(ls2) return rtn def histogram(perm): rtn = {} for p in perm: sp = sum(p) rtn[sp] = 1 + rtn.get(sp, 0) return rtn pet...
jdavidberger/project-euler
prob205.py
Python
lgpl-3.0
590
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of Androwarn. # # Copyright (C) 2012, 2019, Thomas Debize <tdebize at mail.com> # All rights reserved. # # Androwarn is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by #...
maaaaz/androwarn
warn/util/util.py
Python
lgpl-3.0
5,774
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
pyfa-org/eos
tests/integration/customization/testcase.py
Python
lgpl-3.0
1,352
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
sbesson/PyGithub
github/PullRequestComment.py
Python
lgpl-3.0
11,694
# Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev> # Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) { "name": """Pad support in Lead's Internal notes""", "summary": """This module allows collabor...
yelizariev/addons-yelizariev
pad_crm/__manifest__.py
Python
lgpl-3.0
1,416
# -*- coding: iso-8859-1 -*- # # Copyright (C) 2009 Rene Liebscher # # This program 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 ver...
arruda/pyfuzzy
fuzzy/norm/AlgebraicProduct.py
Python
lgpl-3.0
1,188
# Copyright (c) 2010, PRESENSE Technologies GmbH # 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...
asdf1011/bdec
bdec/encode/test/testsequenceof.py
Python
lgpl-3.0
2,162
import unittest from kona.linalg.memory import KonaMemory from kona.algorithms.util.linesearch import BackTracking from kona.algorithms.util.merit import ObjectiveMerit from kona.examples.simple_2by2 import Simple2x2 class BackTrackingTestCase(unittest.TestCase): def setUp(self): solver = Simple2x2() ...
OptimalDesignLab/Kona
src/kona/test/test_back_tracking.py
Python
lgpl-3.0
6,025
import uuid from django.core.management.base import BaseCommand from jobs.models import Job from core.utils import PersistentStorage class Command(BaseCommand): """ Management script to sync all previous jobs stored on persistent storage """ def handle(self, *args, **kwargs): storage = Persiste...
SeiryuZ/HemeWeb
src/jobs/management/commands/download_previous_jobs.py
Python
lgpl-3.0
534
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os import sys from unittest.mock import patch, MagicMock from UM.PluginRegistry import PluginRegistry from UM.Resources import Resources from UM.Trust import Trust from ..PostProcessingPlugin import PostProcessingPl...
Ultimaker/Cura
plugins/PostProcessingPlugin/tests/TestPostProcessingPlugin.py
Python
lgpl-3.0
2,361
import json import spycfg.errors from spycfg import SpyCfg, INI_CFG from tests.helpers import BaseTestCase class CreateTestCase(BaseTestCase): def test_no_file(self): with self.assertRaises(spycfg.errors.IOError) as cf: file_name = 'any' SpyCfg(file_name) self.assertIsIn...
zadoev/spycfg
src/tests/test_basics.py
Python
lgpl-3.0
885
# -*- coding: utf-8 -*- from django.conf.urls import include, url from financeiro import views # urls do Cadastro urlpatterns = [ url(r'^$', views.home, name='home'), # Contratos url(r'^contratos-a-lancar/$', views.contratos_a_lancar, name='contratos_a_lancar'), url(r'^contrato/(?P<contrato_id>[0-9]+)...
dudanogueira/microerp
microerp/financeiro/urls.py
Python
lgpl-3.0
1,996
#!/usr/bin/env python3 """ This module provides testing code for the auxi.modelling.financial.des module. """ import unittest from datetime import datetime from auxi.modelling.financial.des import AccountType from auxi.modelling.financial.des import GeneralLedgerAccount from auxi.modelling.financial.des import Transa...
christoffkok/auxi.0
src/modelling/financial/des_test.py
Python
lgpl-3.0
15,040
from .basic import ProcFile class MemInfo(ProcFile): filename = '/proc/meminfo' def names(self): return [line.split(':')[0].lower() for line in self._readfile()] def get(self, name, default=None): for line in self._readfile(): mem_info = line.split() if name + ':'...
thuck/proc
proc/meminfo.py
Python
lgpl-3.0
684
# MIT License # # Copyright (c) 2010 Gaetan Guidet # # This file is part of gcore. # # 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 righ...
gatgui/gcore
src/py/gcore.py
Python
lgpl-3.0
1,178
import sys from direct.showbase.ShowBase import ShowBase from panda3d.core import AmbientLight from panda3d.core import DirectionalLight from panda3d.core import Vec3 from panda3d.core import Vec4 from panda3d.core import MeshDrawer from world import World from car import Car from server import Server cla...
leotada/dontcrash
sim.py
Python
lgpl-3.0
2,923
import unittest from collections import OrderedDict from models.yum_repositories import YumRepository, YumRepositories from libs.model import ModelCollection, Model class YumRepositoryTest(unittest.TestCase): def testInit(self): e = YumRepository(environment="test", data='lol') for a in ['environme...
masom/Puck
server/tests/test_models/test_yum_repositories.py
Python
lgpl-3.0
2,700
import sys import json import unittest import packet class PacketManagerTest(unittest.TestCase): def setUp(self): self.manager = PacketMockManager(auth_token="foo") def test_get_user(self): user = self.manager.get_user() self.assertEqual(user.get('full_name'), 'Aaron Welch') def ...
disha94/packet-python
test/test_packet.py
Python
lgpl-3.0
7,104
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright (C) 2013-2019 British Crown (Met Office) & Contributors. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published ...
matthewrmshin/isodatetime
metomi/isodatetime/tests/test_time_point.py
Python
lgpl-3.0
6,468
import re from collections import defaultdict import pdb class Computer(object): DIGIT = re.compile(r"\d+") def __init__(self): self.registers = defaultdict(lambda: 0) def run(self, instructions): self.cached = [] for instruction in instructions: split = re.split('\s+', instruction.strip()) command_n...
chrisb87/advent_of_code_2016
day12/day12.py
Python
unlicense
1,422
#!/usr/bin/env pyhton import sqlite3 def main(): with sqlite3.connect("new.db") as connection: c = connection.cursor() sql = { 'average': "select avg(population) from population;", 'maximum': "select max(population) from population;", 'minimum': "select min(pop...
alekscl/tripping-dangerzone
sql/sqlj.py
Python
unlicense
674
import os import json __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) with open(os.path.join(__location__, 'para_whitelist.json')) as data_file: whitelist = json.load(data_file)
lukaasp/libs
aws_xray_sdk/ext/botocore/resources.py
Python
unlicense
228
# coding: u8 import datetime from hashlib import md5 as m5 import traceback now = datetime.datetime.now now_str = lambda: dt2str(now()) yesterday = lambda: datetime.date.today() - datetime.timedelta(days=1) yesterday_str = lambda: yesterday().strftime('%Y-%m-%d') tomorrow = lambda: datetime.date.today() + datetime.ti...
Shu-Ji/multi-supervisord-web-admin
src/utils/__init__.py
Python
unlicense
1,611
from itertools import takewhile codontable = { 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M', 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T', 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K', 'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R', 'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L', 'CCA':'P', 'CCC':'P', 'CCG':...
kinow/rosalind-exercises
src/orf.py
Python
unlicense
4,182
# coding: utf-8 """ Grafeas API An API to insert and retrieve annotations on cloud artifacts. # noqa: E501 OpenAPI spec version: v1alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import grafeas from grafeas.m...
grafeas/client-python
test/test_api_source.py
Python
apache-2.0
828
#!/usr/bin/env python # Copyright 2017 The LibYuv Project Authors. All rights reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contri...
helloworldgnu/MultiMedia
libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
Python
apache-2.0
5,304
# Copyright (c) 2016 Canonical Ltd # # 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 ...
lxc/pylxd
pylxd/tests/test_client.py
Python
apache-2.0
22,609
# Object Model from datetime import date from google.appengine.ext import ndb import logging #model class para el Login. Debo probar la persistencia #version 0.9 alfa class Usuario(ndb.Model): usuario = ndb.StringProperty() clave = ndb.StringProperty() date = ndb.DateTimeProperty(auto_now_add=True) ...
jrevatta/mro-pyme
opmodel.py
Python
apache-2.0
4,888
""" This module provides classes and functions to visualise a KGML Pathway Map The KGML definition is as of release KGML v0.7.1 (http://www.kegg.jp/kegg/xml/docs/) Classes: """ from __future__ import print_function import os import tempfile from itertools import chain from io import BytesIO from reportlab.lib impo...
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/Graphics/KGML_vis.py
Python
apache-2.0
17,163
# Copyright (c) 2012 Intel # Copyright (c) 2012 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/licenses/LI...
DPaaS-Raksha/raksha
raksha/scheduler/filters/capacity_filter.py
Python
apache-2.0
2,187