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
""" tempdir.py: a contextual wrapper around tempfile. 'tempdir' on PyPI; inlined here for packaging reasons. https://bitbucket.org/another_thomas/tempdir/src/ Author: Thomas Fenzl License: MIT """ from __future__ import with_statement import gc import os import tempfile import shutil from fu...
EsriOceans/btm
Install/toolbox/scripts/tempdir.py
Python
mpl-2.0
2,433
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """Abstract mathematical operators.""" fro...
aringh/odl
odl/operator/operator.py
Python
mpl-2.0
73,558
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import gcmclient from twisted.internet import reactor from twisted.internet.threads import deferToThread from twisted.p...
jrconlin/bridgeworker
bridgeworker/gcm/gcm.py
Python
mpl-2.0
3,934
#!/usr/bin/env python # -*- coding: utf-8 -*- """Imports values from task 13 to test equality. .. hint:: You can access task_12 data in the following example type: .. code:: python print task_12.FLOATVAL """ import task_12 FRAC_DEC_EQUAL = (task_12.DECVAL == task_12.FRACVAL) DEC_FLOAT_INEQUAL = (task_12.D...
mjmeyer2013/is210-week-03-warmup
task_13.py
Python
mpl-2.0
370
## # Copyright 2016 DECaF Project Group, University of Paderborn # This file is part of the decaf orchestration framework # All Rights Reserved. # # 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 htt...
CN-UPB/OpenBarista
components/decaf-storage/decaf_storage/model/datacenter_images.py
Python
mpl-2.0
962
# 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 mock import Mock, MagicMock, patch from nose.tools import eq_, ok_, assert_raises from collector.external.rabbitmq...
willkg/socorro-collector
collector/unittest/external/rabbitmq/test_priorityjobs.py
Python
mpl-2.0
3,283
"""empty message Revision ID: 15c488d628b Revises: 1d461753b2e Create Date: 2015-09-17 18:22:53.615421 """ # revision identifiers, used by Alembic. revision = '15c488d628b' down_revision = None depends_on = '1d461753b2e' # add this here in order to use revision with branch_label branch_labels = ('beavy.private_mess...
beavyHQ/beavy
beavy_modules/private_messaging/migrations/15c488d628b_.py
Python
mpl-2.0
1,067
# coding: utf-8 """ *amazonmws* is an implementation of the Amazon Marketplace Web Service (MWS) API. """ __authors__ = ["Caleb P. Burns", "Wes Hansen"] __copyright__ = u"Copyright © 2012-2021 Caleb P. Burns, Wes Hansen" __created__ = "2012-11-30" __credits__ = ["Joshua D. Burns"] __license__ = "MPL 2.0" __modified__ ...
cpburnz/python-amazon-mws
amazonmws/__init__.py
Python
mpl-2.0
410
# coding: utf-8 import json import re from lxml import etree from kpi.constants import INSTANCE_FORMAT_TYPE_XML from kpi.utils.strings import to_str from .hook_test_case import HookTestCase class ParserTestCase(HookTestCase): def test_json_parser(self): hook = self._create_hook(subset_fields=['_id', 's...
onaio/kpi
kobo/apps/hook/tests/test_parser.py
Python
agpl-3.0
2,974
# Copyright 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for `PersonDeactivateJob`.""" __metaclass__ = type from zope.component import getUtility from zope.interface.verify import verifyObject from lp.registry.interfaces.pers...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/registry/tests/test_person_deactivate_job.py
Python
agpl-3.0
2,016
""" WE'RE USING MIGRATIONS! If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py schemamigration courseware --auto description_of_your_change 3. Add the migration file created...
edx-solutions/edx-platform
lms/djangoapps/courseware/models.py
Python
agpl-3.0
17,455
# Copyright 2019 Roberto Fichera <roberto.fichera@levelprime.com> # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo import _, api, fields, models from odoo.exceptions import ValidationError class ResCompany(models.Model): _inherit = "res.company" max_invoice_in_xml = fields.Integer( ...
OCA/l10n-italy
l10n_it_fatturapa_out/models/company.py
Python
agpl-3.0
1,386
import os APP_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) APP_SPECIFICATION = { 'APP_DESCRIPTION': { 'name': 'Remote Desktop', 'link': '/#/vnc', 'description': 'noVNC remote desktop.' }, 'NG_MODULE_NAME': 'vnc', 'NG_MODULE_STYLESHEETS': ( 'vnc.css', ), ...
ResearchComputing/oide-vnc
oidevnc/settings.py
Python
agpl-3.0
480
import numpy import collections # import pdb # a function that returns the "purpose" of each command, this was made modular # just in case it was decided more information was needed def structure_output(task="", structure="", params=[], paramtype=""): if task == "": return return {"TASK": task, "STRUC...
RyanStonebraker/FreeSpeak_NLP
freespeak/app/freespeak/taskhandle.py
Python
agpl-3.0
10,220
import json import pika from ..config_processor import EnvironmentQueueConfig class EnqueueProcessor(object): def __init__(self, request, response): self._request = request self._response = response config = EnvironmentQueueConfig() self._queue = config.message_qu...
crb02005/WebDevSkeleton
src/serverApp/processors/enqueue_processor.py
Python
agpl-3.0
1,170
from __future__ import absolute_import from django import template from django.urls import reverse register = template.Library() @register.simple_tag(takes_context=True) def logout_link(context): if context.get("logout_link"): return context["logout_link"] else: return reverse("logout")
artefactual/archivematica-storage-service
storage_service/common/templatetags/user.py
Python
agpl-3.0
316
############################################################################## # Copyright (C) 2015 oeHealth (<http://oehealth.in>). All Rights Reserved # oeHealth, Hospital Management Solutions ############################################################################## from openerp.osv import osv, fields # ...
gibil5/openhealth
models/oeh_medical/oeh_medical_insurance.py
Python
agpl-3.0
2,363
# RandTalkBot Bot matching you with a random person on Telegram. # Copyright (C) 2016 quasiyoke # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import logging from telepot.exception import TelegramError from .errors im...
quasiyoke/RandTalkBot
randtalkbot/stranger_setup_wizard.py
Python
agpl-3.0
9,731
""" Run these tests @ Devstack: paver test_system -s lms --fast_test --test_id=lms/djangoapps/courseware/management/tests/test_delete_course_references.py """ from datetime import datetime import uuid from django.conf import settings from django.contrib.auth.models import Group, User from django.test.utils import ...
edx-solutions/edx-platform
lms/djangoapps/courseware/management/commands/tests/test_delete_course_references.py
Python
agpl-3.0
7,159
from django.conf import settings from django.conf.urls import patterns, include, url from ratelimitbackend import admin from django.conf.urls.static import static import django.contrib.auth.views from microsite_configuration import microsite # Uncomment the next two lines to enable the admin: if settings.DEBUG or set...
dsajkl/reqiop
lms/urls.py
Python
agpl-3.0
27,615
def pick(iterable): return next(iter(iterable)) def iter_by_n(iterable, n): ret = [] it = iter(iterable) while True: while len(ret) < n: try: ret.append(next(it)) except StopIteration: if ret: yield ret ...
bwesterb/sarah
src/_itertools.py
Python
agpl-3.0
389
#!/usr/bin/env python from weasyprint import HTML import pika import json import requests import sys import time from urllib.parse import urlencode from environment import * import sentry_sdk if SENTRY_WORKER_PRINT_WEASY_DSN: sentry_sdk.init(SENTRY_WORKER_PRINT_WEASY_DSN) # create custom URL fetcher to include ...
pmattmann/ecamp3
workers/print-weasy/print.py
Python
agpl-3.0
2,373
# Copyright 2021 Camptocamp SA # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) from . import stock_location
OCA/stock-logistics-warehouse
stock_location_last_inventory_date/models/__init__.py
Python
agpl-3.0
124
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import oauth2client.contrib.django_orm class Migration(migrations.Migration): dependencies = [ ('users', '__first__'), ] operations = [ migrations.Cr...
HelloLily/hellolily
lily/google/migrations/0001_initial.py
Python
agpl-3.0
673
#!/usr/bin/env python # Copyright 2013, Gabriele Facciolo <facciolo@cmla.ens-cachan.fr> # # This file is part of pvflip. # # Pvflip 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 t...
gfacciol/pvflip
setup.py
Python
agpl-3.0
4,018
# -*- coding: utf-8 -*- ################################################################################ # # SFA for Odoo # Copyright (C) 2015 Ait-Mlouk Addi - (<aitmlouk@gmail.com>) # (<http://www.odoo-services.esy.es/>) # ...
tech2info/sifa
__init__.py
Python
agpl-3.0
1,524
from odoo import SUPERUSER_ID from odoo.api import Environment def post_init_hook(cr, _): # This SQL statement is necessary to call _install_employee_lastnames() and # set name fields correctly. # # After the installation, previously the dependency hr_employee_firstname # splitting the name into t...
OCA/hr
hr_employee_lastnames/hook.py
Python
agpl-3.0
1,226
#!/usr/bin/env python from nupic.swarming import permutations_runner import os import json import logging logging.basicConfig() if __name__ == "__main__": with open('swarm_config.json', 'r') as conf: swarm_config = json.load(conf) model_params = permutations_runner.runWithConfig(swarm_config, {'maxWor...
JonnoFTW/htm-models-adelaide
engine/sm_model/swarm.py
Python
agpl-3.0
876
# -*- coding: utf-8 -*- # Copyright 2016 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ProjectIssueStage(models.Model): _name = 'project.issue.stage' _description = 'Issue Stage' _order = 'sequence' def ...
VitalPet/addons-onestein
project_issue_stage/models/project_issue_stage.py
Python
agpl-3.0
2,292
# -*- coding: utf-8 -*- # 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. from django import forms from django.conf import settings from shoop.admin...
akx/shoop
shoop/admin/modules/categories/views/edit.py
Python
agpl-3.0
2,717
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals from rest_framework import viewsets from . import models, serializers class ProductViewSet(viewsets.ReadOnlyModelViewSet): model = models.Product queryset = model.objects.all() serializer_class = s...
strongswan/strongTNC
apps/devices/api_views.py
Python
agpl-3.0
637
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('menjobe', '0005_auto_20140829_0841'), ] operations = [ migrations.AlterField( model_name='retailpoint', ...
vokimon/menjobe
menjobe/migrations/0006_auto_20140829_0938.py
Python
agpl-3.0
433
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import models, fields class FdbNdc(models.Model): _name = 'fdb.ndc' _description = 'Fdb Ndc' _inherits = {'medical.medicament.ndc': 'ndc_id'} ndc_id = fields.Many2one( ...
laslabs/odoo-connector-carepoint
first_databank/models/fdb_ndc.py
Python
agpl-3.0
3,107
from django.conf.urls.defaults import patterns from uwcs_website.memberinfo.models import Society urlpatterns = patterns('', (r'^$', 'django.views.generic.list_detail.object_list', { 'queryset':Society.objects.all(), 'paginate_by':10, }), (r'^details/(?P<object_id>[^/]+)/$', 'django.views....
UWCS/uwcs-website
uwcs_website/societies/urls.py
Python
agpl-3.0
410
from django.conf.urls import include, url from django.conf import settings from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_urls from wagtail.wagtaildocs import urls as wagtaildocs_urls from wagtail.wagtailsearch.urls import frontend as wagtailsearch_frontend_u...
python-dirbtuves/akl.lt
akllt/urls.py
Python
agpl-3.0
1,202
# Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models class ReportAllChannelsSales(models.Model): _inherit = "report.all.channels.sales" state_id = fields.Many2one( comodel_name="res.country.state", string="Pa...
OCA/sale-reporting
sale_report_country_state/reports/report_all_channels_sales.py
Python
agpl-3.0
870
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
odoousers2014/odoo_addons-2
clv_place/__openerp__.py
Python
agpl-3.0
2,321
{ 'name' : 'FairMarket tunning module', 'version': '1.0', 'author' : 'santi FairCoop', 'summary': 'Modifications for FairMarket', 'category': 'Tools', 'description': """ FairMarket tunning module ================= Modifications of Odoo for FairMarket. - webpages - some debrand - new shop...
Punto0/addons-fm
fairmarket_tunes/__openerp__.py
Python
agpl-3.0
863
import requests from django.core.management.base import BaseCommand, CommandError from candidates.views.version_data import get_change_metadata class Command(BaseCommand): args = "<person.js URL>" help = "Find any new parlparse IDs from parlparse and add them" def handle(self, *args, **options): ...
datamade/yournextmp-popit
candidates/management/commands/candidates_add_new_parlparse_ids.py
Python
agpl-3.0
2,382
def parse(f): l = f.readline() # Ignoring the header while l!="": if l.startswith("[Term]"): #Start of record l = f.readline() rec = {} while l!="": attr = l[:l.find(":")] val = l[l.find(":")+1:].strip().rstrip() if attr...
tiagoantao/mega-analysis
support/python/MEGA/GO.py
Python
agpl-3.0
1,218
"""Adds requested_hotel_info to attendee table Revision ID: 71991162a59c Revises: fc4b8eb3a35f Create Date: 2017-07-10 14:35:20.810300 """ # revision identifiers, used by Alembic. revision = '71991162a59c' down_revision = 'fc4b8eb3a35f' branch_labels = None depends_on = None from alembic import op import sqlalchem...
RAMSProject/rams
alembic/versions/71991162a59c_adds_requested_hotel_info_to_attendee_.py
Python
agpl-3.0
1,433
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import product_product_mu
Gebesa-Dev/Addons-gebesa
product_product_mu/models/__init__.py
Python
agpl-3.0
153
# ######## KADEMLIA CONSTANTS ########### #: Small number Representing the degree of parallelism in network calls alpha = 3 #: Maximum number of contacts stored in a bucket; this should be an even number k = 8 #: Timeout for network operations (in seconds) rpcTimeout = 0.1 # Delay between iterations of iterative no...
zenhacklab/OpenBazaar
node/constants.py
Python
agpl-3.0
1,259
# -*- coding: utf-8 -*- # © 2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_document_wopi
acsone/knowledge
document_wopi/tests/__init__.py
Python
agpl-3.0
163
# -*- coding: UTF-8 -*- ''' magento API :copyright: (c) 2010 by Sharoon Thomas. :copyright: (c) 2010-2012 by Openlabs Technologies & Consulting (P) LTD :license: AGPLv3, see LICENSE for more details ''' __version__ = '0.1.5dev' __all__ = [ 'API', 'Customer', 'CustomerGroup', 'C...
goodscloud/python-magento
magento/__init__.py
Python
agpl-3.0
1,074
import sys import socket import urllib2 import httplib from BeautifulSoup import BeautifulSoup, SoupStrainer import re import MySQLdb import _mysql_exceptions import dbconf import feedparser import time from urlparse import urlparse import datetime import syslog re_link = re.compile(r'<link ([^>]+(?:text\/xml|applica...
brainsqueezer/fffff
branches/version4/scripts/utils.py
Python
agpl-3.0
9,259
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import fields, models class ResConfigSettings(models.Transien...
ingadhoc/odoo-argentina
l10n_ar_ux/wizards/res_config_settings.py
Python
agpl-3.0
792
from django import forms from openedx.core.djangoapps.ga_operation.ga_operation_base_form import GaOperationCertsBaseForm, GaOperationEmailField, FIELD_NOT_INPUT, INVALID_EMAIL class CreateCertsMeetingForm(GaOperationCertsBaseForm): # student_ids is required when creating the meeting certificate student_ids ...
nttks/edx-platform
lms/djangoapps/ga_operation/forms/create_certs_meeting_form.py
Python
agpl-3.0
520
# View for semi-static templatized content. # # List of valid templates is explicitly managed for (short-term) # security reasons. from edxmako.shortcuts import render_to_response, render_to_string from mako.exceptions import TopLevelLookupException from django.shortcuts import redirect from django.conf import setting...
XiaodunServerGroup/medicalmooc
lms/djangoapps/static_template_view/views.py
Python
agpl-3.0
2,168
# -*- 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/test_api_hello.py
Python
agpl-3.0
19,159
# Copyright 2018-19 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from datetime import datetime, timedelta from odoo import fields, models class StockWarehouse(models.Model): _inherit = 'stock.warehouse' calendar_id = fields.Many2one...
Vauxoo/stock-logistics-warehouse
stock_warehouse_calendar/models/stock_warehouse.py
Python
agpl-3.0
1,540
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '0001_initial'), (...
taigaio/taiga-back
taiga/projects/notifications/migrations/0004_watched.py
Python
agpl-3.0
1,515
# -*- coding: utf-8 -*- import base import workflow
suvitorg/suvit-odoo
suvit_web_diagram/models/__init__.py
Python
agpl-3.0
52
from txpostgres import txpostgres from spiralgalaxygame.log import bind_log @bind_log def connect(log, dbname, dbuser, dbpw): log.info('Connecting to database %r as %r.', dbname, dbuser) conn = txpostgres.Connection() return conn.connect(dbname=dbname, user=dbuser, password=dbpw)
nejucomo/sgg
spiralgalaxygame/sql/__init__.py
Python
agpl-3.0
296
# -*- coding: utf-8 -*- # (C) 2022 Smile (<https://www.smile.eu>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import secrets from odoo import api, fields, models class ResUsers(models.Model): _inherit = 'res.users' api_rest_key = fields.Char() def generate_api_rest_key(self): ...
Smile-SA/odoo_addons
smile_api_rest/models/res_users.py
Python
agpl-3.0
798
############################################################################## # # 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/offer_enrollment.py
Python
agpl-3.0
2,224
# -*- coding: utf-8 -*- # Copyright 2018-2021 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Checking project date in timesheet", "version": "10.0.1.1.0", "category": "HR", "website": "https://www.quartile.co/", "author": "Quartile Limited", "license"...
rfhk/rqn-custom
hr_timesheet_project_date_range_check/__manifest__.py
Python
agpl-3.0
440
# # File: courseware/capa/inputtypes.py # """ Module containing the problem elements which render into input objects - textline - textbox (aka codeinput) - schematic - choicegroup (aka radiogroup, checkboxgroup) - imageinput (for clickable image) - optioninput (for option list) - filesubmission (upload a file) - c...
cpennington/edx-platform
common/lib/capa/capa/inputtypes.py
Python
agpl-3.0
66,491
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. #!/usr/bin/env python # -*- coding: utf-8 -*- """ Eltra CS - 2000 """ from datetime import datetime from bika.lims.exportimport.instruments.resultsimport import \ AnalysisResultsImporter...
rockfruit/bika.lims
bika/lims/exportimport/instruments/eltra/cs/__init__.py
Python
agpl-3.0
2,531
from django.core.management import BaseCommand from spiff.payment.models import Invoice class Command(BaseCommand): help = 'Closes invoices that are paid but still open' def handle(self, *args, **options): invoices = Invoice.objects.all() for i in invoices: if i.unpaidBalance == 0 ...
SYNHAK/spiff
spiff/payment/management/commands/fix_invoices.py
Python
agpl-3.0
426
#!/usr/bin/env python from github_traffic_base import * # Construct an instance of the PlotData class for plotting clones. class PlotClones(PlotData): """ Plot the weekly git clones and unique cloners. """ def __init__(self): super(PlotData, self).__init__() self.left_axis_label = 'Clones per Week' ...
dmcdougall/libmesh
doc/statistics/github_traffic_plotclones.py
Python
lgpl-2.1
14,943
############################################################################## # adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD) # Simulations on HPC Resources # Copyright 2017 FU Berlin and the Authors # # Authors: Jan-Hendrik Prinz # Contributors: # # `adaptiveMD` is free software: ...
thempel/adaptivemd
adaptivemd/engine/engine.py
Python
lgpl-2.1
14,873
#!/usr/bin/env python3 #encoding: UTF-8 import numpy as np from postqe.pp import get_from_xml from postqe.readutils import read_charge_file_hdf5, write_charge, create_header from postqe.compute_vs import compute_v_bare, compute_v_h, compute_v_xc from postqe.pyqe import pyqe_getcelldms from postqe.xmldata import PWData...
QEF/postqe
tests/test_Ni_pz_nc.py
Python
lgpl-2.1
2,576
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N...
xiangke/pycopia
mibs/pycopia/mibs/UDP_MIB.py
Python
lgpl-2.1
6,593
#*************************************************************************** #* * #* Copyright (c) 2016 Yorik van Havre <yorik@uncreated.net> * #* * #* This pr...
wood-galaxy/FreeCAD
src/Mod/Arch/importSH3D.py
Python
lgpl-2.1
9,011
# # rpclib - Copyright (C) Rpclib contributors. # # 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 your option) any later version. # # This lib...
martijnvermaat/rpclib
src/rpclib/protocol/xml/model/binary.py
Python
lgpl-2.1
1,686
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, mapnik from timeit import Timer, time from utilities import execution_path, run_all def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir() os.chdir(execution_path('.')) combinations = ['pn...
sebastic/python-mapnik
test/python_tests/image_encoding_speed_test.py
Python
lgpl-2.1
3,609
''' test_thinfilm.py - Test module for thinfilm.py. License: Copyright (C) 2008 Mark Kness Author - Mark Kness - mkness@alumni.utexas.net This file is part of ColorPy. ColorPy 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 Fre...
markkness/ColorPy
colorpy/test_thinfilm.py
Python
lgpl-2.1
1,734
############################################################################ # # (C) Copyright 2011 The OpenSAF Foundation # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. This file...
helioloureiro/opensaf-fork
python/pyosaf/saImmOm.py
Python
lgpl-2.1
18,628
""" RING test. Messages per second. Number of nodes. @author: Daniel Barcelona Pons """ from time import time from pyactor.context import set_context, create_host, sleep, shutdown NUM_NODES = 10000 NUM_MSGS = 100 class Node(object): _tell = {'set_next', 'init_token', 'take_token'} _ask = {'get_cnt', 'is_fin...
pedrotgn/pyactor
tests/other/ringtest.py
Python
lgpl-3.0
1,340
''' Puck: FreeBSD virtualization guest configuration server Copyright (C) 2012 The Hotel Communication Network inc. 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 Lic...
masom/Puck
server/models/jail_types.py
Python
lgpl-3.0
1,505
""" Test TAR packaging. """ from __future__ import unicode_literals import os import time import subprocess import siptools.scripts.compress def test_compress(testpath, run_cli): """ Test TAR packaging script. """ dir_to_tar = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', 'da...
Digital-Preservation-Finland/dpres-siptools
tests/scripts/test_compress.py
Python
lgpl-3.0
665
# python day 22 # author zach.wang # -*- coding:utf-8 -*- import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText sender = '641651925@qq.com' receiver = 'wzq1397@live.cn' subject = 'python email test' smtpserver = 'smtp.qq.com' port = '465' username = '641651925' password = '...
WZQ1397/automatic-repo
project/mailsystem/ZachMaillib/smtplib_attachment.py
Python
lgpl-3.0
759
from ajenti.api import * from ajenti.ui import * from ajenti.utils import * from ajenti import apis import backend class SambaPlugin(apis.services.ServiceControlPlugin): text = 'Samba' icon = '/dl/samba/icon.png' folder = 'servers' service_name = 'smbd' def on_session_start(self): se...
DmZ/ajenti
plugins/samba/main.py
Python
lgpl-3.0
11,716
from concurrent.futures import Future, TimeoutError import time from datetime import datetime, timedelta from copy import copy import unittest import opcua from opcua import Client from opcua import Server from opcua import ua from opcua.server.internal_server import InternalServer, InternalSession try: from unit...
FreeOpcUa/python-opcua
tests/tests_subscriptions.py
Python
lgpl-3.0
24,212
# -*- coding: utf-8 -*- from time import sleep from .baseapi import BaseAPI class Action(BaseAPI): def __init__(self, *args, **kwargs): self.id = None self.status = None self.type = None self.started_at = None self.completed_at = None self.resource_id = None ...
koalalorenzo/python-digitalocean
digitalocean/Action.py
Python
lgpl-3.0
2,271
# Copyright (C) 2012-2015 KillerInstinct # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distribut...
lixiangning888/whole_project
modules/signatures_orignal/office_macro.py
Python
lgpl-3.0
3,368
#!/usr/bin/env python # pmx Copyright Notice # ============================ # # The pmx source code is copyrighted, but you can freely use and # copy it as long as you don't change or remove any of the copyright # notices. # # ---------------------------------------------------------------------- # pmx is Copyright (C...
dseeliger/pmx
scripts/mutate.py
Python
lgpl-3.0
18,272
import os import pandas as pd import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import random import warnings warnings.filterwarnings('ignore') # inspiration for improvements can be found here: # http://www.djmannion.net/psych_programming/data/inferential/inferential.html # https://blog.modeanal...
rjwvandenberg/PlebNet
tools/tracker/tracker_plotter.py
Python
lgpl-3.0
3,967
# -*- 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 'User' db.create_table(u'theatre_users_user', ( (u'id', self.gf('django.db.models...
sandlbn/django-theatre
theatre_users/migrations/0001_initial.py
Python
lgpl-3.0
5,929
#!/usr/bin/env python from __future__ import print_function import sys from pprint import pprint from warnings import warn from xml.etree import ElementTree as ET from pynetdot.api import NetdotAPI from pynetdot.fields import * api = NetdotAPI(url=sys.argv[1], username=sys.argv[2], password=sys.argv[3]) # TODO get t...
ArnesSI/pynetdot
meta2model.py
Python
lgpl-3.0
5,052
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'disconnectator.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^annotator/', include('annota...
shaform/disconnectator
disconnectator/urls.py
Python
lgpl-3.0
335
""" Utilities for Indivo Ben Adida ben.adida@childrens.harvard.edu """ from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.template import Context, loader from django.conf import settings from django import http from xml.dom import minidom from xml.etree import ElementTree try: from...
newmediamedicine/indivo_ui_server_1_0
ui/utils.py
Python
lgpl-3.0
4,219
from untwisted.utils.common import shrug, append from untwisted.network import * from untwisted.event import * import re RFC_STR = "^(:(?P<prefix>[^ ]+) +)?(?P<command>[^ ]+)( *(?P<argument> .+))?" RFC_REG = re.compile(RFC_STR) PREFIX_STR = "(?P<nick>.+)!(?P<user>.+)@(?P<host>.+)" PREFIX_REG = re.compile(PREFIX_STR)...
joodicator/PageBot
lib/xirclib.py
Python
lgpl-3.0
1,701
#!/usr/bin/python # -*- coding: UTF-8 -*- def forvo(language, word, key): ''' Returns a list of suitable audiosamples for a given word from Forvo.com. ''' from requests import get url = 'http://apifree.forvo.com/action/word-pronunciations/format/json/word/%s/language/%s/key/%s/' % (word, language, key) urls = []...
lltk/lltk
lltk/audiosamples/forvo.py
Python
lgpl-3.0
960
""" Handle en-listing and de-listing of controls, gradients, etc. We want to support lists of controls [m1, m2, ...] to be optimised simultaneously. But we also want the user to be able to say dJ = compute_gradient(J, m) rather than dJ = compute_gradient(J, [m])[0] . Hence, we store everything internally in lists...
live-clones/dolfin-adjoint
dolfin_adjoint/enlisting.py
Python
lgpl-3.0
830
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from django.http import HttpResponse from datetime import datetime def decompress(raw): "Takes a bytes object with the compressed sensor data, returns list" # TODO finish me print("decompress got dat...
ValleyCommunityWorkspace/weather-station-server
weatherstation/datareceiver/views.py
Python
lgpl-3.0
625
from pycp2k.inputsection import InputSection class _williams1(InputSection): def __init__(self): InputSection.__init__(self) self.Atoms = None self.A = None self.B = None self.C = None self.Rcut = None self.Rmin = None self.Rmax = None self._...
SINGROUP/pycp2k
pycp2k/classes/_williams1.py
Python
lgpl-3.0
461
''' Created on May 6, 2021 @author: Navid Dianati Implements the Marginal Likelihood Filter which computes a significance score for each edge of an integer-weighted graph based on a maximum likelihood null model derived from the configuration model ''' import igraph as ig import pandas as pd import numpy as np from ...
naviddianati/GraphPruning
pruning/unimodal.py
Python
lgpl-3.0
10,937
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2015 Dana Christen # # This file is part of talking-sockets, a tool for connection routing. # # talking-sockets 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 Soft...
danac/talking-sockets
tests/test_connection_manager.py
Python
lgpl-3.0
4,559
# (C) British Crown Copyright 2014, Met Office # # This file is part of Iris. # # Iris 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 ve...
Jozhogg/iris
lib/iris/tests/unit/fileformats/grib/load_convert/test__hindcast_fix.py
Python
lgpl-3.0
2,577
import sys sys.path.insert(0, "..") import time from opcua import ua, Server if __name__ == "__main__": # setup our server server = Server() server.set_endpoint("opc.tcp://0.0.0.0:4841/freeopcua/server/") # load server certificate and private key. This enables endpoints # with signing and encr...
alkor/python-opcua
examples/minimal-server-with-encryption.py
Python
lgpl-3.0
1,176
#!/usr/bin/env python """ Author: Sotiris Papadopoulos <ytubedlg@gmail.com> Last-Revision: 2017-01-30 Script to add support for a new language Usage : ./new-locale.py <language_code> Example : ./new-locale.py en_US """ import os import sys import shutil PACKAGE = "youtube_dl_gui" LOCALE_PATH_TMPL = os.path.jo...
Sofronio/youtube-dl-gui
locale_build/new-locale.py
Python
unlicense
1,526
#!/usr/bin/env python from __future__ import unicode_literals import sys # Allow direct execution import os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import unittest import json from youtube_dl.utils import compat_urllib_parse from youtube_dl_server.app import app from youtube_dl_s...
bdovaz/media-server
test/test_api.py
Python
unlicense
3,377
class c1(object): def m1(self): self.m2() # dynamic dispatch def m2(self): print "c1:m2" class c2(c1): def m1(self): print "c2:m1" def m2(self): print "c2:m2" def m3(self): super(c2, self).m1() # static dispatch class c3(c2): def m1(self): pri...
seckcoder/pl_research
racket/oo/puzzle/super_dispatch.py
Python
unlicense
392
from subprocess import call import sys projects_file = sys.argv[1] svn_path = sys.argv[2] oldest_rev = sys.argv[3] with open(projects_file) as f: repo_paths = f.readlines() print [svn_path + line[:-1] for line in repo_paths] paths = [svn_path + line[:-1] for line in repo_paths] for path in paths: call(['svn'...
jonathancone/svn-utils
svn-multilog.py
Python
apache-2.0
387
# 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 ...
Intel-bigdata/TensorFlowOnYARN
examples/between-graph/mnist_reader.py
Python
apache-2.0
7,571
import logging from xml.dom.minidom import Document import xml.sax.saxutils from edge.opensearch.response import Response class RssResponse(Response): def __init__(self): super(RssResponse, self).__init__() self.namespaces = { 'opensearch': 'http://a9.com/-/spec/opensearch/1.1/', ...
dataplumber/edge
src/main/python/libraries/edge/opensearch/rssresponse.py
Python
apache-2.0
5,461
# Copyright 2015 PerfKitBenchmarker 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 appli...
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Python
apache-2.0
15,604
# stdlib from typing import Any from typing import Optional # third party from google.protobuf.reflection import GeneratedProtocolMessageType # syft absolute import syft as sy # relative from ...core.common import UID from ...core.common.serde.serializable import serializable from ...logger import traceback_and_rais...
OpenMined/PySyft
packages/syft/src/syft/lib/python/complex.py
Python
apache-2.0
5,153