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
from twisted.trial.unittest import TestCase from mock import Mock from twisted.web.test.test_web import DummyRequest from twisted.web.http import OK, NOT_FOUND from cryptosync.resources import make_site def make_request(uri='', method='GET', args={}): site = make_site(authenticator=Mock()) request = DummyReq...
shyba/cryptosync
cryptosync/tests/test_webserver.py
Python
agpl-3.0
1,579
# Copyright 2017 ForgeFlow S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Purchase Order Approved", "summary": "Add a new state 'Approved' in purchase orders.", "version": "14.0.1.1.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", ...
OCA/purchase-workflow
purchase_order_approved/__manifest__.py
Python
agpl-3.0
569
""" Copyright (C) 2008 by Steven Wallace snwallace@gmail.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later vers...
joshbohde/megaminer-framework
server/networking/Filter.py
Python
agpl-3.0
5,766
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError from odoo.tools.safe_eval import safe_eval _logger = logging.getLogger(__name__) class DeliveryCarrier(mod...
hip-odoo/odoo
addons/delivery/models/delivery_carrier.py
Python
agpl-3.0
13,010
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce 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 __future__ import unicode_literals import json from rest_fra...
suutari/shoop
shuup_tests/core/test_payments_api.py
Python
agpl-3.0
3,959
''' @since: 2015-01-07 @author: moschlar ''' import sqlalchemy.types as sqlat import tw2.core as twc import tw2.bootstrap.forms as twb import tw2.jqplugins.chosen.widgets as twjc import sprox.widgets.tw2widgets.widgets as sw from sprox.sa.widgetselector import SAWidgetSelector from sprox.sa.validatorselector import ...
moschlar/SAUCE
sauce/controllers/crc/selectors.py
Python
agpl-3.0
3,164
""" Code to allow module store to interface with courseware index """ from __future__ import absolute_import from abc import ABCMeta, abstractmethod from datetime import timedelta import logging import re from six import add_metaclass from django.conf import settings from django.utils.translation import ugettext_lazy,...
naresh21/synergetics-edx-platform
cms/djangoapps/contentstore/courseware_index.py
Python
agpl-3.0
27,600
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2011 - 2013 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
avanzosc/avanzosc6.1
avanzosc_net_weight_in_lots/__init__.py
Python
agpl-3.0
1,119
# coding: utf-8 # The Hazard Library # Copyright (C) 2012 GEM 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 # License, or (at your option) any later...
ROB-Seismology/oq-hazardlib
openquake/hazardlib/gsim/atkinson_wald_2007.py
Python
agpl-3.0
2,419
#!/usr/bin/env python3 """ A simple bot to gather some census data in IRC channels. It is intended to sit in a channel and collect the data for statistics. :author: tpltnt :license: AGPLv3 """ import irc.bot import irc.strings from irc.client import ip_numstr_to_quad, ip_quad_to_numstr class CensusBot(irc.bot.Singl...
tpltnt/ircensus
ircensus_channel_bot.py
Python
agpl-3.0
2,132
# Amara, universalsubtitles.org # # Copyright (C) 2017 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 # License, or (at your op...
pculture/unisubs
utils/one_time_data.py
Python
agpl-3.0
1,410
# -*- coding: utf-8 -*- # Copyright 2018 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import hr_certification from . import hr_training_participant
open-synergy/opnsynid-hr
hr_employee_training_experience/models/__init__.py
Python
agpl-3.0
197
"""Make session:proposal 1:1. Revision ID: 3a6b2ab00e3e Revises: 4dbf686f4380 Create Date: 2013-11-09 13:51:58.343243 """ # revision identifiers, used by Alembic. revision = '3a6b2ab00e3e' down_revision = '4dbf686f4380' from alembic import op def upgrade(): op.create_unique_constraint('session_proposal_id_key...
hasgeek/funnel
migrations/versions/3a6b2ab00e3e_session_proposal_one.py
Python
agpl-3.0
441
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Noé Rubinstein # # This file is part of weboob. # # weboob 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 you...
franek/weboob
weboob/tools/capabilities/gallery/genericcomicreader.py
Python
agpl-3.0
3,614
import os test_dir = os.path.dirname(__file__) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(test_dir, 'db.sqlite3'), } } INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.auth', 'django.contr...
dsanders11/django-newsletter
test_project/test_project/settings.py
Python
agpl-3.0
2,081
class FieldRegistry(object): _registry = {} def add_field(self, model, field): reg = self.__class__._registry.setdefault(model, []) reg.append(field) def get_fields(self, model): return self.__class__._registry.get(model, []) def __contains__(self, model): return model...
feroda/django-pro-history
current_user/registration.py
Python
agpl-3.0
349
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type from zope.component import ( ComponentLookupError, getMultiAdapter, ) from zope.configuration import xmlconfig from zope.interface import ( im...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/services/webapp/tests/test_navigation.py
Python
agpl-3.0
3,377
import os import sys import glob import json import subprocess from collections import defaultdict from utils import UnicodeReader, slugify, count_pages, combine_pdfs, parser import addresscleaner from click2mail import Click2MailBatch parser.add_argument("directory", help="Path to downloaded mail batch") parser.add_...
yourcelf/btb
printing/print_mail.py
Python
agpl-3.0
4,703
# -*- coding: utf-8 -*- # Copyright 2017 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_employee_display_own_info
VitalPet/addons-onestein
hr_employee_display_own_info/tests/__init__.py
Python
agpl-3.0
192
from django.conf.urls import patterns, url from application import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^(?P<application_id>\d+)/$', views.detail, name='detail'), url(r'^klogin/(?P<username>\w+)/(?P<password>\w+)/$', views.klogin, name='klogin'), )
davidegalletti/koa-proof-of-concept
kag/application/urls.py
Python
agpl-3.0
305
from disco.core import Disco, result_iterator from disco.settings import DiscoSettings from disco.func import chain_reader from discodex.objects import DataSet from freequery.document import docparse from freequery.document.docset import Docset from freequery.index.tf_idf import TfIdf class IndexJob(object): def...
sqs/freequery
freequery/index/job.py
Python
agpl-3.0
1,947
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from intelmq.lib import utils from intelmq.lib.bot import Bot from intelmq.lib.message import Event class MalwareGroupIPsParserBot(Bot): def process(self): report = self.receive_message() if not report: self....
sch3m4/intelmq
intelmq/bots/parsers/malwaregroup/parser_ips.py
Python
agpl-3.0
1,460
# Simple script to run required operations to # 1. Download FASTAs from database # 2. Copy FASTAs to nextflu directory # 3. Download titer tables from database # 4. Copy titer tables to nextflu directory # Run from base fauna directory with python flu/download_all.py # Assumes that nextflu/, nextflu-cdc/ and nextflu-cd...
blab/nextstrain-db
download_all.py
Python
agpl-3.0
7,407
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Product Code Unique", "summary": "Add the unique property to default_code field", "version": "9.0.1.0.0", "category": "Product", "website": "https://odoo-community.org/",...
Gebesa-Dev/Addons-gebesa
product_code_unique/__openerp__.py
Python
agpl-3.0
701
import ddt from django.contrib.auth import login, authenticate from importlib import import_module from django_lti_tool_provider import AbstractApplicationHookManager from mock import patch, Mock from oauth2 import Request, Consumer, SignatureMethod_HMAC_SHA1 from django.contrib.auth.models import User from django.te...
open-craft/django-lti-tool-provider
django_lti_tool_provider/tests/test_views.py
Python
agpl-3.0
12,681
import pytest from django.urls import reverse from adhocracy4.dashboard import components from adhocracy4.test.helpers import assert_template_response from adhocracy4.test.helpers import redirect_target from adhocracy4.test.helpers import setup_phase from meinberlin.apps.topicprio.models import Topic from meinberlin.a...
liqd/a4-meinberlin
tests/topicprio/dashboard_components/test_views_module_topics.py
Python
agpl-3.0
3,141
# -*- coding: utf-8 -*- from flask import Blueprint, render_template from flask.ext.security import current_user mod = Blueprint('documentation', __name__) @mod.route('/documentation') @mod.route('/documentation/index') def doc_index(): return render_template('documentation/index.html', apikey='t...
odtvince/APITaxi
APITaxi/documentation/index.py
Python
agpl-3.0
381
# Copyright (C) 2020 OpenMotics BV # # 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 program is distribu...
openmotics/gateway
testing/unittests/api_tests/serializers/sensor_test.py
Python
agpl-3.0
4,097
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Associazione OpenERP Italia # (<http://www.openerp-italia.org>). # Copyright (C) 2014 Didotech srl # (<http://www.didotech.com>). # # This program is free software: you can r...
iw3hxn/LibrERP
stock_picking_extended/models/inherit_stock_location.py
Python
agpl-3.0
5,169
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. from coriolis import utils from coriolis.conductor.rpc import client as rpc_conductor_client from coriolis.minion_manager.rpc import client as rpc_minion_manager_client class API(object): def __init__(self): self._rpc_conductor_client = rpc_...
cloudbase/coriolis
coriolis/endpoints/api.py
Python
agpl-3.0
2,592
""" Global settings file. Everything in here is imported *before* everything in settings.py. This means that this file is used for default, fixed and global varibles, and then settings.py is used to overwrite anything here as well as adding settings particular to the install. Note that there are no tuples h...
lkundrak/scraperwiki
web/global_settings.py
Python
agpl-3.0
8,733
import logging, logging.handlers import sys logging.handlers.HTTPHandler('','',method='GET') logger = logging.getLogger('simple_example') # http_handler = logging.handlers.HTTPHandler('127.0.0.1:9022', '/event', method='GET') http_handler = logging.handlers.HTTPHandler('127.0.0.1:9999', '/httpevent', method='GET') ...
edx/edxanalytics
src/util/playback.py
Python
agpl-3.0
1,385
# ############################################################################## # # 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 cor...
uclouvain/osis
infrastructure/shared_kernel/entite/dtos.py
Python
agpl-3.0
1,467
# Flask modules from flask import ( Blueprint, render_template, redirect, url_for, request, flash, current_app, g, ) # FLask Login from flask_login import ( current_user, ) # WTForms from flask_wtf import Form from wtforms import ( SubmitField, BooleanField, DecimalFiel...
ser/topitup
siema.py
Python
agpl-3.0
8,241
############################################################################## # # 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
assessments/signals/subscribers.py
Python
agpl-3.0
2,029
from django.contrib import auth from django.contrib.auth.models import User from django.test import TestCase from django.urls.base import reverse class TestAccountRegistration(TestCase): def setUp(self): # create one user for convenience response = self.client.post( reverse('account:re...
jardiacaj/finem_imperii
account/tests.py
Python
agpl-3.0
8,495
import analytics import anyjson from channels import Group from django.conf import settings from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from lily.accounts.api.serializers import RelatedAccountSerializer from lily.api.fields import SanitizedHtmlCharField from lily.api....
HelloLily/hellolily
lily/cases/api/serializers.py
Python
agpl-3.0
9,977
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2008-2013 AvanzOSC S.L. All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Daniel-CA/odoo-addons
__unported__/avanzosc_module_doc/wizard/create_module_documentation.py
Python
agpl-3.0
3,050
# -*- coding: utf-8 -*- import traceback from ckan.lib.helpers import json from ckanext.harvest.model import HarvestObject, HarvestObjectExtra from ckanext.harvest.harvesters import HarvesterBase from ckanext.geocat.utils import search_utils, csw_processor, ogdch_map_utils, csw_mapping # noqa from ckanext.geocat.uti...
opendata-swiss/ckanext-geocat
ckanext/geocat/harvester.py
Python
agpl-3.0
13,479
# -*- coding: utf-8 -*- ############################################################################## # # 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 L...
odoo-arg/odoo_l10n_ar
l10n_ar_account_check_sale/__manifest__.py
Python
agpl-3.0
1,674
############################################################################## # # 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
ddd/logic/learning_unit/use_case/read/get_effective_class_service.py
Python
agpl-3.0
2,220
import logging from lxml import etree from pkg_resources import resource_string from xmodule.raw_module import RawDescriptor from .x_module import XModule from xblock.core import Integer, Scope, String, List, Float, Boolean from xmodule.open_ended_grading_classes.combined_open_ended_modulev1 import CombinedOpenEndedV...
pdehaye/theming-edx-platform
common/lib/xmodule/xmodule/combined_open_ended_module.py
Python
agpl-3.0
21,389
# Copyright 2020 Tecnativa - Alexandre Díaz # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from copy import deepcopy from xml.sax.saxutils import escape from lxml import etree as ElementTree from odoo import SUPERUSER_ID, api def _merge_views(env, xmlids): old_view_ids = env["ir.ui.view"].searc...
OCA/website
website_legal_page/hooks.py
Python
agpl-3.0
4,340
############################################################################# ## ## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
qtproject/pyside-pyside
tests/QtMultimediaWidgets/qmultimediawidgets.py
Python
lgpl-2.1
2,146
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part of libgpiod. # # Copyright (C) 2017-2018 Bartosz Golaszewski <bartekgola@gmail.com> # '''Simplified reimplementation of the gpioset tool in Python.''' import gpiod import sys if __name__ == '__main__': if len(sys.argv) < 3...
brgl/libgpiod
bindings/python/examples/gpioset.py
Python
lgpl-2.1
793
"""LDAP protocol proxy server""" from twisted.internet import reactor, defer from ldaptor.protocols.ldap import ldapserver, ldapconnector, ldapclient from ldaptor.protocols import pureldap class Proxy(ldapserver.BaseLDAPServer): protocol = ldapclient.LDAPClient client = None waitingConnect = [] unbou...
antong/ldaptor
ldaptor/protocols/ldap/proxy.py
Python
lgpl-2.1
3,381
import sys import os import subprocess as ssubprocess _p = None def start_syslog(): global _p with open(os.devnull, 'w') as devnull: _p = ssubprocess.Popen( ['logger', '-p', 'daemon.notice', '-t', 'sshuttle'], stdin=ssubprocess.PIPE, stdout=devnull, st...
sshuttle/sshuttle
sshuttle/ssyslog.py
Python
lgpl-2.1
588
import urllib2 import re JIRA_URL='https://bugreports.qt-project.org/browse' class JIRA: __instance__ = None # Helper class class Bug: CREATOR = 'QTCREATORBUG' SIMULATOR = 'QTSIM' SDK = 'QTSDK' QT = 'QTBUG' QT_QUICKCOMPONENTS = 'QTCOMPONENTS' # constructor of ...
hdweiss/qt-creator-visualizer
tests/system/shared/workarounds.py
Python
lgpl-2.1
9,260
#!/bin/env python # This is the building script for Python maxent extension module. # Simply type "python setup.py build" at command line to build the extension. # After that you can type "python setup.py install" to install the extension # module. # # The script assume you use gcc on unix and msvc on win32 platform. ...
lzhang10/maxent
python/setup.py
Python
lgpl-2.1
2,832
#!/usr/bin/env python # -*- coding: utf-8 -*- # # pyliblo - Python bindings for the liblo OSC library # # Copyright (C) 2007-2011 Dominic Sacré <dominic.sacre@gmx.de> # # 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 F...
gesellkammer/pyliblo
test/unit.py
Python
lgpl-2.1
8,818
''' Often used utility functions Copyright 2020 by Massimo Del Fedele ''' import sys import uno from com.sun.star.beans import PropertyValue from datetime import date import calendar import PyPDF2 ''' ALCUNE COSE UTILI La finestra che contiene il documento (o componente) corrente: desktop.CurrentFrame.Container...
giuserpe/leeno
src/Ultimus.oxt/python/pythonpath/LeenoUtils.py
Python
lgpl-2.1
7,316
# Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. import os, sys def open_in_browser(link): browser = os.environ.get('BROWSER', 'firefox') child = os.fork() if child == 0: # We are the child try: os.spawnlp(os.P_NOWAIT, browser, browser, link) os._exit(...
pombredanne/zero-install
zeroinstall/0launch-gui/browser.py
Python
lgpl-2.1
419
# cell definition # name = 'Epos_AD' # libname = 'can' inp = 0 outp = 1 parameters = dict() #parametriseerbare cell properties = {'Device ID': ' 0x01', 'Channel [0/1]': ' 0', 'name': 'epos_areadBlk'} #voor netlisten #view variables: iconSource = 'AD' views = {'icon':iconSource}
imec-myhdl/pycontrol-gui
BlockEditor/libraries/library_can/Epos_AD.py
Python
lgpl-2.1
283
import json import maps import traceback from requests import get from requests import post from requests import put from tendrl.commons.utils import log_utils as logger from tendrl.monitoring_integration.grafana import constants from tendrl.monitoring_integration.grafana import exceptions from tendrl.monitoring_int...
Tendrl/monitoring-integration
tendrl/monitoring_integration/grafana/datasource_utils.py
Python
lgpl-2.1
3,062
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import glob import os.path class Xbraid(MakefilePackage): """XBraid: Parallel time integration w...
rspavel/spack
var/spack/repos/builtin/packages/xbraid/package.py
Python
lgpl-2.1
1,879
# devices/md.py # # Copyright (C) 2009-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the...
dwlehman/blivet
blivet/devices/md.py
Python
lgpl-2.1
22,939
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Data filter converting CSTBox v2 event logs to v3 format. Usage: ./cbx-2to3.py < /path/to/input/file > /path/to/output/file """ __author__ = 'Eric Pascual - CSTB (eric.pascual@cstb.fr)' import fileinput import json for line in fileinput.input(): ts, var_type, v...
cstbox/devel
bin/cbx-2to3.py
Python
lgpl-3.0
821
from typing import Callable, Any from ..model import MetaEvent, Event from ..exceptions import PropertyStatechartError __all__ = ['InternalEventListener', 'PropertyStatechartListener'] class InternalEventListener: """ Listener that filters and propagates internal events as external events. """ de...
AlexandreDecan/sismic
sismic/interpreter/listener.py
Python
lgpl-3.0
1,061
#!/usr/bin/env python ''' Created on Jan 6, 2018 @author: consultit ''' from panda3d.core import Filename import sys, os from subprocess import call ### NOTE: currently this script works only on GNU/Linux currdir = os.path.abspath(sys.path[0]) builddir = Filename.from_os_specific(os.path.join(currdir, '/ely/')).get...
consultit/Ely
setup.py
Python
lgpl-3.0
1,423
""" Barcode Creation (PDF417) """ import os basedir = os.path.split(__file__)[0] bcdelib = os.path.join(basedir, 'psbcdelib.ps') class Barcode(object): __lib__ = open(bcdelib, 'r').read() @property def ps(self): raise NotImplementedError @property def eps(self): raise NotImplem...
voipir/python-sii
src/sii/lib/printing/barcode/Barcode.py
Python
lgpl-3.0
331
import pytest from forte.solvers import solver_factory, HF def test_df_rhf(): """Test DF-RHF on HF.""" ref_energy = -100.04775218911111 # define a molecule xyz = """ H 0.0 0.0 0.0 F 0.0 0.0 1.0 """ # create a molecular model input = solver_factory(molecule=xyz, basis='cc-pVTZ',...
evangelistalab/forte
tests/pytest/hf/test_df_hf.py
Python
lgpl-3.0
1,224
import time import sys def sizeof_fmt(num, unit='B'): # source: http://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size for uprexif in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']: if abs(num) < 1024.0: return "{:3.2f} {}{}".format(num, upre...
JuniorJPDJ/pyChomikBox
ChomikBox/utils/FileTransferProgressBar.py
Python
lgpl-3.0
3,099
from ctypes import* import math lib = cdll.LoadLibrary("Z:\\Documents\Projects\\SWMMOpenMIComponent\\Source\\SWMMOpenMIComponent\\bin\\Debug\\SWMMComponent.dll") print(lib) print("\n") finp = b"Z:\\Documents\\Projects\\SWMMOpenMIComponent\\Source\\SWMMOpenMINoGlobalsPythonTest\\test.inp" frpt = b"Z:\\Documents\\Pr...
cbuahin/SWMMOpenMIComponent
Source/SWMMOpenMINoGlobalsPythonTest/SWMMOpenMINoGlobalsPythonTest.py
Python
lgpl-3.0
1,641
import pytest import importlib from mpi4py import MPI from spectralDNS import config, get_solver, solve from TGMHD import initialize, regression_test, pi comm = MPI.COMM_WORLD if comm.Get_size() >= 4: params = ('uniform_slab', 'nonuniform_slab', 'uniform_pencil', 'nonuniform_pencil') else: param...
spectralDNS/spectralDNS
tests/test_MHD.py
Python
lgpl-3.0
1,847
""" Sample a specific geometry or set of geometries. """ import numpy as np import nomad.core.glbl as glbl import nomad.core.trajectory as trajectory import nomad.core.log as log def set_initial_coords(wfn): """Takes initial position and momentum from geometry specified in input""" coords = glbl.properties['i...
mschuurman/FMSpy
nomad/initconds/explicit.py
Python
lgpl-3.0
1,004
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: Wenjie Lei (lei@princeton.edu), 2016 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ from __future__ import (absolute_import, division, print_function) # NOQA from .adjoint_source import calculate_adj...
wjlei1990/pytomo3d
pytomo3d/adjoint/__init__.py
Python
lgpl-3.0
573
# -*- coding: utf-8 -*- from common.db_sum import _metric_meta_db '''get the data from table by name''' def get_data_by_name(name, status=[1], other=0): result = [] where = '' if status: status = ",".join([str(x) for x in status]) where += ' and status in ({}) '.format(status) if othe...
popoyz/charts
base/chart_b.py
Python
lgpl-3.0
5,726
from rapidsms.tests.scripted import TestScript from apps.form.models import * from apps.reporters.models import * import apps.reporters.app as reporter_app import apps.supply.app as supply_app import apps.form.app as form_app import apps.default.app as default_app from app import App from django.core.management.command...
takinbo/rapidsms-borno
apps/bednets/tests.py
Python
lgpl-3.0
18,579
''' This file is part of GEAR_mc. GEAR_mc is a fork of Jeremie Passerin's GEAR project. GEAR 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...
miquelcampos/GEAR_mc
gear/xsi/curve.py
Python
lgpl-3.0
14,878
from test_methods import TestBaseFeedlyClass
pedroma/python-feedly
tests/__init__.py
Python
lgpl-3.0
44
""" Created on 2013-12-16 @author: readon @copyright: reserved @note: CustomWidget example for mvp """ from gi.repository import Gtk from gi.repository import GObject class CustomEntry(Gtk.Entry): """ custom widget inherit from gtkentry. """ def __init__(self): Gtk.Entry.__init__(self) ...
Readon/mvpsample
src/gtkcustom.py
Python
lgpl-3.0
414
# -*- coding: utf-8 -*- import hashlib import io import struct # default from KeePass2 source BLOCK_LENGTH = 1024 * 1024 try: file_types = (file, io.IOBase) except NameError: file_types = (io.IOBase,) # HEADER_LENGTH = 4+32+4 def read_int(stream, length): try: return struct.unpack('<I', stream.r...
AlessandroZ/LaZagne
Windows/lazagne/softwares/memory/libkeepass/hbio.py
Python
lgpl-3.0
4,214
################################################################################### # # Copyright (c) 2017-2019 MuK IT GmbH. # # This file is part of MuK Documents Access # (see https://mukit.at). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Le...
muk-it/muk_dms
muk_dms_access/models/access_groups.py
Python
lgpl-3.0
1,927
 """ ----------------------------------------------------------------------------- This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) For the latest info, see http://www.ostis.net Copyright (c) 2010 OSTIS OSTIS is free software: you can redistribute it and/or modify it under the ter...
laz2/sc-core
bindings/python/sc_core/pm_test.py
Python
lgpl-3.0
3,358
# Copyright 2019 Rafis Bikbov <https://it-projects.info/team/RafiZz> # Copyright 2019 Alexandr Kolushov <https://it-projects.info/team/KolushovAlexandr> # Copyright 2019 Eugene Molotov <https://it-projects.info/team/em230418> # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). import logging from odo...
yelizariev/addons-yelizariev
ir_attachment_url/tests/test_product_tmpl_image.py
Python
lgpl-3.0
3,397
# coding: utf-8 # <pycompressor - compress and merge static files (css,js) in html files> # Copyright (C) <2012> Marcel Nicolay <marcel.nicolay@gmail.com> # # 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 So...
marcelnicolay/pycompressor
compressor/cli.py
Python
lgpl-3.0
2,967
from django.db import models class Channel(models.Model): channel_id = models.CharField(max_length=50, unique=True) channel_name = models.CharField(max_length=50, null=True, blank=True) rtmp_url = models.CharField(max_length=100, null=True, blank=True) active = models.IntegerField(null=True, blank=Tru...
xahhy/Django-vod
epg/models.py
Python
lgpl-3.0
1,604
from __future__ import annotations from decimal import Decimal from typing import ( Any, Mapping, Sequence, ) import uuid from pprint import pprint import pytest from ai.backend.common.docker import ImageRef from ai.backend.common.types import ( AccessKey, AgentId, KernelId, ResourceSlot, Session...
lablup/sorna-manager
tests/manager/test_scheduler.py
Python
lgpl-3.0
16,173
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: stats.py """Statistics analyzer for HotShot.""" import profile import pstats import hotshot.log from hotshot.log import ENTER, EXIT def load(filenam...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/hotshot/stats.py
Python
unlicense
2,053
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: charset.py __all__ = [ 'Charset', 'add_alias', 'add_charset', 'add_codec'] import codecs import email.base64mime import email.quoprimime from ema...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/email/charset.py
Python
unlicense
14,131
# ------------------------------------------------------------------------------ # This extension adds support for Jinja templates. # ------------------------------------------------------------------------------ import sys from ivy import hooks, site, templates try: import jinja2 except ImportError: jinja2 =...
dmulholland/ivy
ivy/ext/ivy_jinja.py
Python
unlicense
1,779
import random # CoRe def turn(board, symbol): while 1: x = random.choice(range(8)) y = random.choice(range(8)) if getboard(board,x,y) == '#': return (x,y)
ac1235/core
ai_templates/crazy.py
Python
unlicense
164
# encoding: utf-8 import re import json import xml.etree.ElementTree from .common import InfoExtractor from ..utils import ( ExtractorError, find_xpath_attr, unified_strdate, determine_ext, get_element_by_id, compat_str, ) # There are different sources of video in arte.tv, the extraction proce...
ashutosh-mishra/youtube-dl
youtube_dl/extractor/arte.py
Python
unlicense
10,732
#!/usr/bin/env python import sys line = sys.stdin.readline() # skip the header line = sys.stdin.readline() all = {} while line: v = line.split() if v[0] not in all: all[v[0]] = set() all[v[0]].add(v[1]) line = sys.stdin.readline() s = [k for (_, k) in sorted([(len(v), k) for (k,v) in all.item...
razvanm/fs-expedition
heatmap.py
Python
unlicense
464
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: suite.py """TestSuite""" import sys from . import case from . import util __unittest = True def _call_if_exists(parent, attr): func = getattr(pa...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/unittest/suite.py
Python
unlicense
10,084
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-analytics-data
samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_async.py
Python
apache-2.0
1,518
#!/usr/bin/env python3 # coding=utf-8 """ This module, debugging.py, will contain code related to debugging (such as printing error messages). """ #import sys #sys.path.insert(0, '/home/dev_usr/urbtek') #from universal_code import system_operations as so class MyException(Exception): """ Just something useful to ...
utarsuno/urbtek
universal_code/debugging.py
Python
apache-2.0
2,265
"""Tests for the kraken sensor platform.""" from datetime import timedelta from unittest.mock import patch from pykrakenapi.pykrakenapi import KrakenAPIError from homeassistant.components.kraken.const import ( CONF_TRACKED_ASSET_PAIRS, DEFAULT_SCAN_INTERVAL, DEFAULT_TRACKED_ASSET_PAIR, DOMAIN, ) from ...
lukas-hetzenecker/home-assistant
tests/components/kraken/test_sensor.py
Python
apache-2.0
9,736
""" pluginconf.d configuration file - Files ======================================= Shared mappers for parsing and extracting data from ``/etc/yum/pluginconf.d/*.conf`` files. Parsers contained in this module are: PluginConfD - files ``/etc/yum/pluginconf.d/*.conf`` ---------------------------------------------------...
RedHatInsights/insights-core
insights/parsers/pluginconf_d.py
Python
apache-2.0
3,141
from cobra.core.loading import get_model from cobra.core import json class UserConfig(object): default_config = { 'guide.task.participant': '1', 'guide.document.share': '1', 'guide.customer.share': '1', 'guide.workflow.operation': '1', 'guide.workflow.createform': '1', ...
lyoniionly/django-cobra
src/cobra/core/configure/user_config.py
Python
apache-2.0
1,284
# Copyright 2017 The Vispek Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
hl475/vispek
examples/run_raw_file_io.py
Python
apache-2.0
1,604
# -*- coding: utf-8 -*- import datetime from sqlalchemy import UniqueConstraint from sqlalchemy.dialects.postgresql import JSONB from pns.app import app, db class SerializationMixin(): """serialization mixin for sqlalchemy model object """ def to_dict(self, *exceptions, **extra_payload): """get d...
Turksat/pns
pns/models.py
Python
apache-2.0
5,438
# -*- coding: UTF-8; indent-tabs-mode:nil; tab-width:4 -*- # This file is part of DITA DTD Generator. # # Copyright 2009 Jarno Elovirta <http://www.elovirta.com/> # # 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 cop...
jelovirt/dita-generator
src/ditagen/dita/v1_2.py
Python
apache-2.0
32,591
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-30 12:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('webcore', '0016_profile_emails'), ] operations = [ migrations.RemoveField( ...
Nikita1710/ANUFifty50-Online-Mentoring-Platform
project/fifty_fifty/webcore/migrations/0017_remove_profile_emails.py
Python
apache-2.0
388
from distutils.core import setup PKGLIST = ['gearman_geodis'] setup(name='gearman-geodis', version='1.0.0', description='Geolocation Gearman worker powered by Geodis', author_email='engineering@shazamteam.com', license='Apache License, Version 2.0', packages=PKGLIST, scripts=...
shazamengineering/gearman-geodis
setup.py
Python
apache-2.0
570
from distutils.core import setup from src import __version__ setup( name="irma.common", version=__version__, author="Quarkslab", author_email="irma@quarkslab.com", description="The common component of the IRMA software", packages=["irma.common", "irma.common.base", "...
quarkslab/irma
common/setup.py
Python
apache-2.0
683
# -*- coding: utf-8 -*- import hashlib import random from rest_framework import serializers from sita.users.models import User from sita.subscriptions.models import Subscription from sita.utils.refresh_token import create_token from hashlib import md5 from datetime import datetime, timedelta import pytz class LoginSe...
Fabfm4/Sita-BackEnd
src/sita/authentication/serializers.py
Python
apache-2.0
6,676
# Copyright 2016-2018 Michael Peters # # 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 ag...
opiethehokie/march-madness-predictions
ml/util.py
Python
apache-2.0
1,932
import sys import numpy as np from normalization import tokenize from helpers import ahash class KerasVectorizer(): ''' Convert list of documents to numpy array for input into Keras model ''' def __init__(self, n_features=100000, maxlen=None, maxper=100, hash_function=ahash): self.maxlen = ...
gophronesis/smlib
smlib/keras_vectorizer.py
Python
apache-2.0
2,229
#!/usr/bin/python # -*- coding: utf-8 -*- from ansible.module_utils.basic import AnsibleModule import git import itertools import multiprocessing import os import signal import time DOCUMENTATION = """ --- module: git_requirements short_description: Module to run a multithreaded git clone options: repo_info: d...
stackforge/os-ansible-deployment
playbooks/library/git_requirements.py
Python
apache-2.0
10,270