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
# -*- coding: utf-8 -*- import io import os from dlstats.fetchers.bea import BEA as Fetcher import httpretty from dlstats.tests.base import RESOURCES_DIR as BASE_RESOURCES_DIR from dlstats.tests.fetchers.base import BaseFetcherTestCase import unittest from unittest import mock RESOURCES_DIR = os.path.abspath(os.p...
Widukind/dlstats
dlstats/tests/fetchers/test_bea.py
Python
agpl-3.0
6,159
# -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relative to tasks.py) 'deploy_path': '..', # Githu...
webcamoid/webcamoid.github.io
internal/tasks.py
Python
agpl-3.0
2,105
#!/usr/bin/env python from __future__ import print_function, division import multiprocessing import os import csv import datetime import logging from datetime import datetime import argparse import shutil import math from glob import glob import gzip from shi7 import __version__ from shi7.shi7 import TRUE_FALSE_DICT, ...
knights-lab/shi7
shi7/shi7_learning.py
Python
agpl-3.0
15,977
# -*- coding: utf-8 -*- ############################################################################## # # Author: OpenDrive Ltda # Copyright (c) 2013 Opendrive Ltda # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # cons...
kailIII/emaresa
rent.resp/partner.py
Python
agpl-3.0
1,548
# -*- coding: utf-8 -*- import time from datetime import timedelta class CookieJar: def __init__(self, pluginname, account=None): self.cookies = {} self.plugin = pluginname self.account = account def add_cookies(self, clist): for c in clist: name = c.split("\t")[5...
vuolter/pyload
src/pyload/core/network/cookie_jar.py
Python
agpl-3.0
1,007
""" Test scenarios for the review xblock. """ import ddt import unittest from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from nose.plugins.attrib import attr from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory from lms.djan...
lduarte1991/edx-platform
openedx/tests/xblock_integration/test_review_xblock.py
Python
agpl-3.0
21,237
# -*- coding: utf-8 -*- # © 2014 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) import time from datetime import datetime import openerp.addons.decimal_precision as dp from openerp.osv import fields, osv from openerp.tools import DEFAULT_SERVER_DATETIME_FOR...
Elico-Corp/openerp-7.0
mrp_mo_nopicking/mrp.py
Python
agpl-3.0
4,435
# ETConf -- web-based user-friendly computer hardware configurator # Copyright (C) 2010-2011 ETegro Technologies, PLC <http://etegro.com/> # Sergey Matveev <sergey.matveev@etegro.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
ETegro/ETConf
giver/urls.py
Python
agpl-3.0
1,178
# -*- coding: utf-8 -*- ############################################################################## # # Infrastructure # Copyright (C) 2014 Ingenieria ADHOC # No email # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
zhaohuaw/odoo-infrastructure
addons/infrastructure/database_type.py
Python
agpl-3.0
2,270
# SPDX-License-Identifier: AGPL-3.0-or-later """ SepiaSearch (Videos) """ from json import loads from dateutil import parser, relativedelta from urllib.parse import urlencode from datetime import datetime # about about = { "website": 'https://sepiasearch.org', "wikidata_id": None, "official_api_documenta...
dalf/searx
searx/engines/sepiasearch.py
Python
agpl-3.0
2,928
# -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: 2013-2021 Agora Voting SL <contact@nvotes.com> # # SPDX-License-Identifier: AGPL-3.0-only # import pickle import base64 import json import re from datetime import datetime from flask import Blueprint, request, make_response, abort from frestq.utils import loads, du...
agoravoting/election-orchestra
public_api.py
Python
agpl-3.0
8,209
# -*- 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 field 'UserProject.drive_auth' db.add_column(u'user_project', 'drive_auth', s...
taikoa/wevolver-server
wevolve/projects/migrations/0006_auto__add_field_userproject_drive_auth.py
Python
agpl-3.0
8,173
# Copyright (C) 2021 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
src/gateway/apartment_controller.py
Python
agpl-3.0
9,287
from odoo import fields, models class Job(models.Model): _inherit = "crm.team" survey_id = fields.Many2one( 'survey.survey', "Interview Form", help="Choose an interview form") def action_print_survey(self): return self.survey_id.action_print_survey()
ingadhoc/sale
crm_survey/models/crm_job.py
Python
agpl-3.0
291
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from . import account_move from . import account_move_line from . import ...
ingadhoc/multi-company
account_multic_fix/models/__init__.py
Python
agpl-3.0
340
from ctypes import * import ctypes.util import threading import os import sys from warnings import warn from functools import partial import collections import re import traceback # vim: ts=4 sw=4 et if os.name == 'nt': backend = CDLL('mpv-1.dll') fs_enc = 'utf-8' else: import locale lc, enc = locale...
Frechdachs/python-mpv
mpv.py
Python
agpl-3.0
42,232
# -*- coding: utf-8 -*- """ 2020-09-07 Cornelius Kölbel <cornelius.koelbel@netknights.it> Add exception 2017-04-26 Friedrich Weber <friedrich.weber@netknights.it> Make it possible to check for correct LDAPS/STARTTLS settings 2017-01-08 Cornelius Kölbel <cornelius.koelbel@netknights.it> ...
privacyidea/privacyidea
tests/ldap3mock.py
Python
agpl-3.0
28,972
# -*- coding: utf-8 -*- """ Models for Student Identity Verification This is where we put any models relating to establishing the real-life identity of a student over a period of time. Right now, the only models are the abstract `PhotoVerification`, and its one concrete implementation `SoftwareSecurePhotoVerification`...
jolyonb/edx-platform
lms/djangoapps/verify_student/models.py
Python
agpl-3.0
40,982
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
alanjw/GreenOpenERP-Win-X86
openerp/addons/stock/stock.py
Python
agpl-3.0
163,768
from django import forms # future use
DemocracyFoundation/Epitome
Agora/forms.py
Python
agpl-3.0
40
""" Block Depth Transformer """ from __future__ import absolute_import from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer class BlockDepthTransformer(BlockStructureTransformer): """ Keep track of the depth of each block within the block structure. In case o...
ESOedX/edx-platform
lms/djangoapps/course_api/blocks/transformers/block_depth.py
Python
agpl-3.0
2,059
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import ast from odoo import api, exceptions, models, _ class MailComposeMessage(models.TransientModel): _inherit = 'mail.compose.message' @api.model def _get_priorities(self): """ Load priorities...
mozaik-association/mozaik
mail_job_priority/wizards/mail_compose_message.py
Python
agpl-3.0
1,920
# -*- encoding: utf-8 -*- ############################################################################## # # res_partner # Copyright (c) 2013 Codeback Software S.L. (http://codeback.es) # @author: Miguel García <miguel@codeback.es> # @author: Javier Fuentes <javier@codeback.es> # # This program is fr...
codeback/openerp-cbk_company_web_discount
res_company.py
Python
agpl-3.0
1,385
# Copyright (c) 2016 Sebastian Kanis # This file is part of pi-led-control. # pi-led-control 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 ve...
s0riak/pi-led-control
src/server/programs/scheduledprogram.py
Python
agpl-3.0
1,953
from pathlib import Path from inxs.cli import main as _main from tests import equal_documents def main(*args): _args = () for arg in args: if isinstance(arg, Path): _args += (str(arg),) else: _args += (arg,) _main(_args) # TODO case-study with this use-case def ...
funkyfuture/inxs
tests/test_cli.py
Python
agpl-3.0
515
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django_pgjson.fields import django.utils.timezone import django.db.models.deletion import djorm_pgarray.fields import taiga.projects.history.models class Migration(migratio...
19kestier/taiga-back
taiga/projects/migrations/0001_initial.py
Python
agpl-3.0
6,634
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation ...
arseneyr/essentia
test/src/unittest/spectral/test_hpcp.py
Python
agpl-3.0
7,101
# -*- coding: utf-8 -*- # Copyright 2016 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'OAuth2 Disable Login with Odoo.com', 'version': '10.0.1.0.0', 'category': 'Tools', 'author': 'Onestein', 'license': 'AGPL-3', 'depends': [...
VitalPet/addons-onestein
auth_oauth_disable_login_with_odoo/__manifest__.py
Python
agpl-3.0
394
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-11-22 07:11 from __future__ import unicode_literals from django.core.management.sql import emit_post_migrate_signal from django.db import migrations def add_executive_group(apps, schema_editor): # create group db_alias = schema_editor.connection.al...
uclouvain/OSIS-Louvain
base/migrations/0208_create_role_executive.py
Python
agpl-3.0
951
# -*- coding: utf-8 -*- from openerp import models, fields class AccountBankStatementLine(models.Model): _inherit = "account.bank.statement.line" name = fields.Char( string='Memo', required=False, default="", )
houssine78/addons
account_bank_statement_line_memo/models/models.py
Python
agpl-3.0
251
# -*- coding: utf-8 -*- # Etalage -- Open Data POIs portal # By: Emmanuel Raviart <eraviart@easter-eggs.com> # # Copyright (C) 2011, 2012 Easter-eggs # http://gitorious.org/infos-pratiques/etalage # # This file is part of Etalage. # # Etalage is free software; you can redistribute it and/or modify # it under the term...
Gentux/etalage
etalage/contexts.py
Python
agpl-3.0
7,875
from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django.db.models import Q from django.contrib import messages from cc.general.util import render import cc.ripple.api as ripple from cc.profile.models impo...
rfugger/villagescc
cc/relate/views.py
Python
agpl-3.0
5,122
# -*- coding: utf-8 -*- ############################################################################## # # Ingenieria ADHOC - ADHOC SA # https://launchpad.net/~ingenieria-adhoc # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lice...
adhoc-dev/odoo-logistic
addons/logistic_x/__init__.py
Python
agpl-3.0
1,161
# Copyright 2015-2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from . import mass_reconcile from . import advanced_reconciliation
OCA/bank-statement-reconcile
account_mass_reconcile_ref_deep_search/models/__init__.py
Python
agpl-3.0
171
# -*- coding: utf-8 -*- # © 2014 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) import invoice
Elico-Corp/openerp-7.0
sale_bom_split_anglo_saxon/__init__.py
Python
agpl-3.0
158
import factory from .models import User USER_PASSWORD = "2fast2furious" class UserFactory(factory.DjangoModelFactory): name = "John Doe" email = factory.Sequence(lambda n: "john{}@example.com".format(n)) password = factory.PostGenerationMethodCall('set_password', USER_PASSWORD) gender = "male" ...
ballotify/django-backend
ballotify/apps/accounts/factories.py
Python
agpl-3.0
353
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*- # # NetProfile: Authentication routines # © Copyright 2013-2014 Alex 'Unik' Unigovsky # # This file is part of NetProfile. # NetProfile is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General ...
annndrey/npui-unik
netprofile/netprofile/common/auth.py
Python
agpl-3.0
6,265
from . import models from . import lroe
factorlibre/l10n-spain
l10n_es_ticketbai_api_batuz/__init__.py
Python
agpl-3.0
40
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation ...
arseneyr/essentia
test/src/unittest/sfx/test_tctototal_streaming.py
Python
agpl-3.0
2,098
# Copyright 2015 ACSONE SA/NV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class PosConfig(models.Model): _inherit = "pos.config" account_analytic_id = fields.Many2one( comodel_name="account.analytic.account", string="Analytic Account" )
OCA/account-analytic
pos_analytic_by_config/models/pos_config.py
Python
agpl-3.0
318
#!/usr/bin/python #-*- coding: utf-8 -*- ########################################################### # © 2011 Daniel 'grindhold' Brendle and Team # # This file is part of Skarphed. # # Skarphed is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as ...
skarphed/skarphed
core/lib/operation.py
Python
agpl-3.0
16,724
""" Application file for the code snippets app. """ from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SnippetsConfig(AppConfig): """ Application configuration class for the code snippets app. """ name = 'apps.snippets' verbose_name = _('Code snippets...
TamiaLab/carnetdumaker
apps/snippets/apps.py
Python
agpl-3.0
323
# -*- encoding: utf-8 -*- from . import res_partner_bank from . import account_bank_statement_import
StefanRijnhart/bank-statement-import
account_bank_statement_import/__init__.py
Python
agpl-3.0
102
""" Tests course_creators.admin.py. """ from django.test import TestCase from django.contrib.auth.models import User from django.contrib.admin.sites import AdminSite from django.http import HttpRequest import mock from course_creators.admin import CourseCreatorAdmin from course_creators.models import CourseCreator fr...
nttks/edx-platform
cms/djangoapps/course_creators/tests/test_admin.py
Python
agpl-3.0
7,332
import unittest from app import read_config class ConfigFileReaderTest(unittest.TestCase): def test_read(self): config = read_config('config') self.assertEqual(config['cmus_host'], 'raspberry') self.assertEqual(config['cmus_passwd'], 'PaSsWd') self.assertEqual(config['app_host'], '...
jboynyc/cmus_app
tests.py
Python
agpl-3.0
433
from django.conf.urls.defaults import * import frontend.views as frontend_views import codewiki.views import codewiki.viewsuml from django.contrib.syndication.views import feed as feed_view from django.views.generic import date_based, list_detail from django.views.generic.simple import direct_to_template f...
rossjones/ScraperWikiX
web/urls.py
Python
agpl-3.0
3,556
#!/usr/bin/env python import sys import gobject import dbus.mainloop.glib dbus.mainloop.glib.DBusGMainLoop(set_as_default = True) import telepathy DBUS_PROPERTIES = 'org.freedesktop.DBus.Properties' def get_registry(): reg = telepathy.client.ManagerRegistry() reg.LoadManagers() return reg def get_connection...
epage/telepathy-bluewire
hand_tests/generic.py
Python
lgpl-2.1
17,072
import json import etcd from tendrl.gluster_bridge.atoms.volume.set import Set class SetVolumeOption(object): def __init__(self, api_job): super(SetVolumeOption, self).__init__() self.api_job = api_job self.atom = SetVolumeOption def start(self): attributes = json.loads(self....
shtripat/gluster_bridge
tendrl/gluster_bridge/flows/set_volume_option.py
Python
lgpl-2.1
705
import sys import time sleep = time.sleep if sys.platform == 'win32': time = time.clock else: time = time.time
egbertbouman/tribler-g
Tribler/Core/DecentralizedTracking/pymdht/core/ptime.py
Python
lgpl-2.1
124
# Authors: David Goodger; Gunnar Schwant # Contact: goodger@users.sourceforge.net # Revision: $Revision: 21817 $ # Date: $Date: 2005-07-21 13:39:57 -0700 (Thu, 21 Jul 2005) $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, p...
garinh/cs
docs/support/docutils/languages/de.py
Python
lgpl-2.1
1,814
# Orca # # Copyright 2005-2009 Sun Microsystems Inc. # # 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...
GNOME/orca
src/orca/orca_gui_prefs.py
Python
lgpl-2.1
142,434
# -*- coding: utf-8 -*- # Copyright (C) 2010, 2011, 2012, 2013 Sebastian Wiesner <lunaryorn@gmail.com> # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, ...
mulkieran/pyudev
pyudev/pyqt4.py
Python
lgpl-2.1
3,930
#!/usr/bin/python """Test of tree output using Firefox.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(KeyComboAction("<Alt>b")) sequence.append(KeyComboAction("Return")) sequence.append(KeyComboAction("Tab")) sequence.append(KeyComboAct...
GNOME/orca
test/keystrokes/firefox/ui_role_tree.py
Python
lgpl-2.1
5,957
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import pkg_resources from gosa.common.components import PluginRegistry from gosa.common.utils impor...
gonicus/gosa
backend/src/gosa/backend/objects/backend/registry.py
Python
lgpl-2.1
2,337
# -*- coding: utf-8 -*- """Additional helper functions for the optlang solvers. All functions integrate well with the context manager, meaning that all operations defined here are automatically reverted when used in a `with model:` block. The functions defined here together with the existing model functions should a...
zakandrewking/cobrapy
cobra/util/solver.py
Python
lgpl-2.1
15,435
from __future__ import absolute_import import json class JSONRenderer: """ Renders a mystery as JSON """ def render(self, mystery): return json.dumps(mystery.encode(), indent=4)
chjacobsen/mystery-murder-generator
mmgen/renderers/json.py
Python
lgpl-3.0
204
"""General-use classes to interact with the ApplicationAutoScaling service through CloudFormation. See Also: `AWS developer guide for ApplicationAutoScaling <https://docs.aws.amazon.com/autoscaling/application/APIReference/Welcome.html>`_ """ # noinspection PyUnresolvedReferences from .._raw import applicatio...
garyd203/flying-circus
src/flyingcircus/service/applicationautoscaling.py
Python
lgpl-3.0
424
#!/usr/bin/env python import sys, argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', type=str, action='store', dest='input', default=None, help="Input file") args = parser.parse_args() stats = dict() if args.input is None: print "Error: No input fi...
merlin-lang/kulfi
experiments/testbed/results/plot/sort.py
Python
lgpl-3.0
989
# -*- coding: utf-8 -*- """digitalocean API to manage droplets""" __version__ = "1.16.0" __author__ = "Lorenzo Setale ( http://who.is.lorenzo.setale.me/? )" __author_email__ = "lorenzo@setale.me" __license__ = "LGPL v3" __copyright__ = "Copyright (c) 2012-2020 Lorenzo Setale" from .Manager import Manager from .Drople...
koalalorenzo/python-digitalocean
digitalocean/__init__.py
Python
lgpl-3.0
1,128
# Copyright (c) 2010 by Yaco Sistemas <pmartin@yaco.es> # # 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 version. ...
Yaco-Sistemas/django-autoreports
autoreports/urls.py
Python
lgpl-3.0
1,686
# encoding: utf-8 from __future__ import absolute_import, unicode_literals from apiview.model import AbstractUserMixin, BaseModel from django.contrib.auth.base_user import AbstractBaseUser from django.db import models class User(AbstractUserMixin, BaseModel, AbstractBaseUser): is_staff = False def get_short...
007gzs/django_restframework_apiview
example/example_app/models.py
Python
lgpl-3.0
925
# -*- coding: utf-8 -*- # Copyright(C) 2014 smurail # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License...
laurentb/weboob
modules/cmso/pro/pages.py
Python
lgpl-3.0
10,804
# Copyright (C) 2014 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class InjectionRWX(Signature): name = "injection_rwx" description = "Creates R...
lixiangning888/whole_project
modules/signatures_orginal_20151110/injection_rwx.py
Python
lgpl-3.0
1,229
# Copyright (c) 2013 - The pycangjie authors # # This file is part of pycangjie, the Python bindings to libcangjie. # # pycangjie 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 ...
Cangjians/pycangjie
tests/__init__.py
Python
lgpl-3.0
6,379
# -*- coding: utf-8 -*- """ This module put my utility functions """ __author__ = "Jiang Yu-Kuan <yukuan.jiang@gmail.com>" __date__ = "2016/02/08 (initial version) ~ 2019/04/17 (last revision)" import re import os import sys #------------------------------------------------------------------------------ ...
YorkJong/pyResourceLink
reslnk/myutil.py
Python
lgpl-3.0
4,850
" Settings for tests. " from settings.project import * # Databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', 'USER': '', 'PASSWORD': '', 'TEST_CHARSET': 'utf8', }} # Caches CACHES['default']['BACKEND'] = 'django.core.cache.ba...
klen/makesite
makesite/modules/django/settings/test.py
Python
lgpl-3.0
440
#!/usr/bin/python # -*- coding: utf-8 -*- "Visual Property Editor (using wx PropertyGrid) of gui2py's components" __author__ = "Mariano Reingart (reingart@gmail.com)" __copyright__ = "Copyright (C) 2013- Mariano Reingart" __license__ = "LGPL 3.0" # some parts where inspired or borrowed from wxFormBuilders & wxPython...
reingart/gui2py
gui/tools/propeditor.py
Python
lgpl-3.0
12,658
#!/usr/bin/python3 import sys from pathlib import Path list_scope_path = Path("./list_scope_tokens.txt") keyword_bit = 13 list_scope_bit = 14 def main(): if len(sys.argv) < 2: print("Error: Must specify an argument of either 'tokens' or 'emitters'!", file=sys.stderr) return 1 list_scopes = set() with list_s...
zijistark/zckTools
src/zck/token_codegen.py
Python
lgpl-3.0
1,078
""" Copyright (C) 2013 Matthew Woodruff This script is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This script is distributed in th...
matthewjwoodruff/moeasensitivity
statistics/statistics.py
Python
lgpl-3.0
6,225
# (C) British Crown Copyright 2014 - 2015, 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 l...
jkettleb/iris
lib/iris/tests/unit/fileformats/pyke_rules/compiled_krb/fc_rules_cf_fc/test_build_auxiliary_coordinate.py
Python
lgpl-3.0
7,441
import os import platform from setuptools import setup, Extension from distutils.util import convert_path from Cython.Build import cythonize system = platform.system() ## paths settings # Linux if 'Linux' in system: CLFFT_DIR = r'/home/gregor/devel/clFFT' CLFFT_LIB_DIRS = [r'/usr/local/lib64'] CLFFT_INCL_...
geggo/gpyfft
setup.py
Python
lgpl-3.0
3,106
# BlenderBIM Add-on - OpenBIM Blender Add-on # Copyright (C) 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of BlenderBIM Add-on. # # BlenderBIM Add-on 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 Foundati...
IfcOpenShell/IfcOpenShell
src/blenderbim/test/bim/bootstrap.py
Python
lgpl-3.0
15,500
import os import sys import string import random import math ################################################# # State balance = 0 def deposit(amount): global balance balance += amount return balance def withdraw(amount): global balance balance -= amount return balance ##################...
SPbAU-ProgrammingParadigms/materials
python_2/common_objects.py
Python
unlicense
4,690
class PermissionRequired(Exception): """ Exception to be thrown by views which check permissions internally. Takes a single C{perm} argument which defines the permission that caused the exception. """ def __init__(self, perm): self.perm = perm def require_permissions(user, *permissio...
AnimeDB/adb-browser-frontend
adb/frontend/auth/decorators.py
Python
unlicense
2,476
# -*- coding: utf-8 -*- """ Created on Fri Nov 15 15:55:28 2013 @author: dyanna """ import numpy as np from sklearn.svm import SVC def getSample(pointA, pointB, numberOfPoints): pointList = list(zip(np.random.uniform(-1,1.00,numberOfPoints),np.random.uniform(-1,1.00,numberOfPoints))) sample = np.array([(i[0]...
pramodh-bn/learn-data-edx
Week 7/qp.py
Python
unlicense
6,393
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, Table from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship # demo many to many relationship # http://docs.sqlalchemy.org/en/rel_0_9/orm/basic_relationships.html#many-to-many engine = cre...
amitsaha/learning
python/sqla_learning/many_many_relation.py
Python
unlicense
3,275
import os # Application constants APP_NAME = 'job_offers' INSTALL_DIR = os.path.dirname(os.path.abspath(__file__)) LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' LOG_NAME = os.path.join(INSTALL_DIR, 'job_offers.log') # Testing fixtures JOB_OFFER_FIXTURES = os.path.join(INSTALL_DIR, "fixtures/job_...
jvazquez/organization
organization/job_offers/constants.py
Python
unlicense
334
#!/usr/bin/python # uart-eg01.py # # to run on the other end of the UART # screen /dev/ttyUSB1 115200 import serial def readlineCR(uart): line = b'' while True: byte = uart.read() line += byte if byte == b'\r': return line uart = serial.Serial('/dev/ttyUSB0', baudrate=115200, timeout=1) while True: uart...
CurtisLeeBolin/Examples_Python
UART01.py
Python
unlicense
567
from rec import CourseRecord from score import RoomScore from evaluation import ScheduleEvaluation FULL_HOURS = 8 # 8:00AM - 4:00PM utilization PARTIAL_HOURS = FULL_HOURS * 0.75 #75% HALF_HOURS = FULL_HOURS * 0.50 #50% SPARSE_HOURS = FULL_HOURS * 0.25 #25% class LocationScore: def __init__(self, evals=No...
jbrackins/scheduling-research
src/location.py
Python
unlicense
3,581
"""redblue_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') C...
thinkAmi-sandbox/Django_iis_global_static_sample
redblue_project/urls.py
Python
unlicense
991
from djangosanetesting.cases import HttpTestCase from django.conf import settings from django.core.urlresolvers import reverse from django.core import mail from accounts.tests import testdata class TestResetPassword(HttpTestCase): def __init__(self, *args, **kwargs): super(self.__class__, self).__init__(*a...
sramana/pysis
apps/passwords/tests/test_reset_password.py
Python
unlicense
1,236
energies = dict() energies[81] = -3.17 # Ammoniadimer.xyz energies[82] = -5.02 # Waterdimer.xyz energies[83] = -1.50 # BenzeneMethanecomplex.xyz energies[84] = -18.61 # Formicaciddimer.xyz energies[85] = -15.96 # Formamidedimer.xyz energies[86] = -20.65 # Uracildimerhbonded.xyz energies[87] ...
andersx/s22-charmm
structures/ref.py
Python
unlicense
2,038
from bitmovin.utils import Serializable class AutoRestartConfiguration(Serializable): def __init__(self, segments_written_timeout: float = None, bytes_written_timeout: float = None, frames_written_timeout: float = None, hls_manifests_update_timeout: float = None, dash_manifests_u...
bitmovin/bitmovin-python
bitmovin/resources/models/encodings/live/auto_restart_configuration.py
Python
unlicense
785
from google.appengine.ext import db class Stuff (db.Model): owner = db.UserProperty(required=True, auto_current_user=True) pulp = db.BlobProperty() class Greeting(db.Model): author = db.UserProperty() content = db.StringProperty(multiline=True) avatar = db.BlobProperty() date = db.DateTimeProp...
0--key/lib
portfolio/2009_GoogleAppEngine/apps/0--key/models.py
Python
apache-2.0
651
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
MehdiSfr/tensor-flow
tensorflow/python/kernel_tests/matmul_op_test.py
Python
apache-2.0
8,392
# Copyright 2011 WebDriver committers # Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
hali4ka/robotframework-selenium2library
src/Selenium2Library/lib/selenium-2.8.1/py/selenium/webdriver/common/action_chains.py
Python
apache-2.0
7,157
# Copyright 2016 The Meson development team # 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 ...
becm/meson
mesonbuild/scripts/yelphelper.py
Python
apache-2.0
5,816
# #Programa Lista 4, questão 1; #Felipe Henrique Bastos Costa - 1615310032; # # # # lista = []#lista vazia; cont1 = 0#contador do indice; cont2 = 1#contador da posição do numero, se é o primeiro, segundo etc; v = 5#representaria o len da lista; while(cont1 < v): x = int(input("Informe o %dº numero inteiro para c...
any1m1c/ipc20161
lista4/ipc_lista4.01.py
Python
apache-2.0
675
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2016 Eugene Frolov <eugene@frolov.net.ru> # # 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 # # ...
phantomii/restalchemy
restalchemy/tests/functional/restapi/ra_based/test_resources.py
Python
apache-2.0
13,940
# Copyright 2021 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 agreed to in writing, ...
GoogleCloudPlatform/gcpdiag
gcpdiag/lint/gke/err_2021_001_logging_perm.py
Python
apache-2.0
1,986
""" Launcher functionality for the Google Compute Engine (GCE) """ import json import logging import os from dcos_launch import onprem, util from dcos_launch.platforms import gcp from dcos_test_utils.helpers import Host from googleapiclient.errors import HttpError log = logging.getLogger(__name__) def get_credentia...
dcos/dcos-launch
dcos_launch/gcp.py
Python
apache-2.0
4,208
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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 Li...
telefonicaid/fiware-sdc
automatization_scripts/get_software_catalogue.py
Python
apache-2.0
4,111
# Copyright 2014-2015 Isotoma Limited # # 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 wr...
yaybu/touchdown
touchdown/aws/ec2/instance.py
Python
apache-2.0
4,911
"""Support for monitoring OctoPrint sensors.""" from __future__ import annotations from datetime import datetime, timedelta import logging from pyoctoprintapi import OctoprintJobInfo, OctoprintPrinterInfo from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, SensorStateClass, ) f...
home-assistant/home-assistant
homeassistant/components/octoprint/sensor.py
Python
apache-2.0
7,576
import jps import json import time class MessageHolder(object): def __init__(self): self._saved_msg = [] def __call__(self, msg): self._saved_msg.append(msg) def get_msg(self): return self._saved_msg def test_multi_pubsub_once(): holder1 = MessageHolder() holder2 = Mes...
OTL/jps
test/test_utils.py
Python
apache-2.0
2,258
# -*- coding:utf-8 -*- """ Verion: 1.0 Author: zhangjian Site: http://iliangqunru.com File: __init__.py.py Time: 2017/7/22 2:19 """
Xarrow/pySimulatedDNS
dnsCat/__init__.py
Python
apache-2.0
139
import codecs import mock import os import tempfile import unittest from time import strftime import six from kinto import config from kinto import __version__ class ConfigTest(unittest.TestCase): def test_transpose_parameters_into_template(self): self.maxDiff = None template = "kinto.tpl" ...
monikagrabowska/osf.io
kinto/tests/test_config.py
Python
apache-2.0
6,371
class Solution(object): def containsNearbyAlmostDuplicate(self, nums, k, t): """ :type nums: List[int] :type k: int :type t: int :rtype: bool """ if k < 1 or t < 0: return False dic = {} t += 1 for i in range(len(nums)): ...
rx2130/Leetcode
python/220 Contains Duplicate III.py
Python
apache-2.0
777
import boto3 import pytest import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError from moto import mock_dynamodb2 @mock_dynamodb2 def test_error_on_wrong_value_for_consumed_capacity(): resource = boto3.resource("dynamodb", region_name="ap-northeast-3") client = boto3....
spulec/moto
tests/test_dynamodb2/test_dynamodb_consumedcapacity.py
Python
apache-2.0
5,333
from django_filters.rest_framework import DjangoFilterBackend from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from rdmo.core.exports import XMLResponse from rdmo.core.permis...
rdmorganiser/rdmo
rdmo/conditions/viewsets.py
Python
apache-2.0
2,141