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 -*-
###############################################################################
#
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol
#
# 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
#... | MostlyOpen/odoo_addons | myo_address/models/address_category.py | Python | agpl-3.0 | 4,394 |
from . import website
from . import res_config_settings
| Vauxoo/e-commerce | website_sale_product_sort/models/__init__.py | Python | agpl-3.0 | 56 |
from rest_framework.metadata import SimpleMetadata
from adesao.models import LISTA_ESTADOS_PROCESSO
from planotrabalho.models import SituacoesArquivoPlano
from planotrabalho.forms import SETORIAIS
from planotrabalho.models import SITUACAO_CONSELHEIRO
class MunicipioMetadata(SimpleMetadata):
def get_situacao_ade... | JadsonReis/sistema-nacional-cultura | api/metadata.py | Python | agpl-3.0 | 2,364 |
# encoding: 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 'Source'
db.create_table('main_source', (
('description', self.gf('editorsn... | CENDARI/editorsnotes | editorsnotes/main/migrations/0005_auto__add_source__add_citation.py | Python | agpl-3.0 | 10,924 |
# -*- coding: utf-8 -*-
# © 2016 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "MRP - Routing costs in manufacturing order",
"version": "8.0.1.0.0",
"category": "Manufacturing",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "htt... | esthermm/odoo-addons | mrp_routing_cost/__openerp__.py | Python | agpl-3.0 | 725 |
# -*- encoding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it un... | bwrsandman/openerp-hr | hr_skill/__openerp__.py | Python | agpl-3.0 | 1,596 |
# -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | odoousers2014/odoo_addons-2 | clv_insurance/history/clv_insurance_history.py | Python | agpl-3.0 | 3,939 |
from ckanext.ddi.importer.ddiimporter import DdiImporter
from ckanext.ddi.importer.metadata import DdiCkanMetadata
| liip/ckanext-ddi | ckanext/ddi/importer/__init__.py | Python | agpl-3.0 | 115 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms... | foosel/OctoPrint | src/octoprint/plugins/softwareupdate/util.py | Python | agpl-3.0 | 1,212 |
from django.conf.urls.defaults import *
from models import confirmation_resource
urlpatterns = patterns(
'confirmation.views',
url(r'^$', 'main', name='confirmation-app-index'),
url(r'^edit/$', 'main',
{ 'is_edit_registration': True },
name='confirmation-app-edit'),
url(r'^pref/$', '... | jittat/adm2 | confirmation/urls.py | Python | agpl-3.0 | 2,252 |
#!/usr/bin/env python
"""
Looks inside outputed model.
Prints out topics and other variables.
Useful for inspecting a model's fit.
Copyright (C) 2011 Joseph Perla
GNU Affero General Public License. See <http://www.gnu.org/licenses/>.
"""
import sys
import jsondata
if __name__=='__main__':
be... | jperla/happynews | model/inspect_model.py | Python | agpl-3.0 | 1,154 |
import base64
import fileinput
import os
import re
import subprocess
import json
from lib.DockerComposeExecutor import DockerComposeExecutor
from lib.Settings import Settings
from lib.Subcommands.CreateDomain import CreateDomain
from lib.Subcommands.InstallApps import InstallApps
from lib.Subcommands.UserCreate import... | Open365/Open365 | lib/Subcommands/Install.py | Python | agpl-3.0 | 11,015 |
#!/usr/bin/python
# Copyright 2013,2014 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Dunya
#
# Dunya 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 (FSF), either version ... | MTG/pycompmusic | tools/sertanscores.py | Python | agpl-3.0 | 9,170 |
from django.conf.urls.defaults import *
from account.forms import *
urlpatterns = patterns('',
url(r'^email/$', 'account.views.email', name="acct_email"),
url(r'^signup/$', 'account.views.signup', name="acct_signup"),
url(r'^login/$', 'account.views.login', name="acct_login"),
url(r'^login/openid/$', '... | ryepdx/bitcoin-pouch | apps/account/urls.py | Python | agpl-3.0 | 1,841 |
"""
Tools for interacting with the DOM inside a browser.
"""
from copy import copy
from collections import Sequence
from itertools import islice
from selenium.common.exceptions import WebDriverException
from bok_choy.promise import Promise
# Mapping of query type to Selenium webdriver query method names
QUERY_TYPES... | devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/bok_choy/query.py | Python | agpl-3.0 | 15,003 |
# -*- coding: utf-8 -*-
# Copyright (C) 2014-present Taiga Agile LLC
#
# 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 ver... | taigaio/taiga-back | taiga/projects/milestones/api.py | Python | agpl-3.0 | 8,847 |
#-----------------------------------------------------------
# Threaded, Gevent and Prefork Servers
#-----------------------------------------------------------
import datetime
import errno
import logging
import os
import os.path
import platform
import random
import select
import signal
import socket
import subprocess
... | numerigraphe/odoo | openerp/service/server.py | Python | agpl-3.0 | 37,103 |
from strictyaml import Regex, ScalarValidator
from re import compile
from path import Path
import prettystack
from jinja2.environment import Environment
from jinja2 import DictLoader
from slugify import slugify
SRC_DIR = Path(__file__).realpath().dirname()
TEMPLATE_DIR = SRC_DIR.joinpath("templates")
DEFAULT_STACK... | hitchtest/hitchstory | hitchstory/utils.py | Python | agpl-3.0 | 1,677 |
""" Utility functions used within unit tests """
# -*- coding: utf-8 -*-
#
# Imports ###########################################################
from __future__ import absolute_import
from webob import Request
from xblock.fields import ScopeIds
# Methods ###########################################################
de... | edx-solutions/xblock-google-drive | google_drive/tests/unit/test_utils.py | Python | agpl-3.0 | 823 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Pexego Sistemas Informáticos. All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | nareshppts/account_chart_update | account_admin_tools_importer/account_importer.py | Python | agpl-3.0 | 11,132 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-04-10 21:01
from __future__ import unicode_literals
from django.db import migrations
def move_studio_to_work(apps, schema_editor):
Anime = apps.get_model("mangaki", "Anime")
# The studio field is now in the Work base class, while the deprecated_stud... | mangaki/mangaki | mangaki/mangaki/migrations/0052_populate_work_studio.py | Python | agpl-3.0 | 930 |
""" Login related views """
import json
import logging
import urlparse
from django.conf import settings
from django.contrib import messages
from django.shortcuts import redirect
from django.utils.translation import ugettext as _
from django.views.decorators.csrf import ensure_csrf_cookie
from django.views.decorators.... | philanthropy-u/edx-platform | openedx/core/djangoapps/user_authn/views/login_form.py | Python | agpl-3.0 | 11,821 |
from django.db import models
# Create your models here.
class Proxy(models.Model):
name = models.CharField(max_length=200)
def __unicode__(self):
return self.name
class PConfig(models.Model):
proxy = models.ForeignKey(Proxy)
name = models.CharField(max_length=200)
fqdn = models.CharField(... | exarch/massive-sansa | jmp/portal/models.py | Python | agpl-3.0 | 1,701 |
import os
from flindt.settings.base import boolean
from flindt.settings.base import * # noqa
DEBUG = boolean(os.environ.get('DEBUG', 0))
TEMPLATE_DEBUG = boolean(os.environ.get('DEBUG', DEBUG))
# Use the cached template loader so template is compiled once and read from
# memory instead of reading from disk on each... | wearespindle/flindt | backend/flindt/settings/prod.py | Python | agpl-3.0 | 908 |
from newspipe.web.views import home, session_mgmt, views
from newspipe.web.views.admin import admin_bp
from newspipe.web.views.api import v2
from newspipe.web.views.article import article_bp, articles_bp
from newspipe.web.views.bookmark import bookmark_bp, bookmarks_bp
from newspipe.web.views.category import categories... | JARR-aggregator/JARR | newspipe/web/views/__init__.py | Python | agpl-3.0 | 479 |
'''
Get the current target values for diagnosis, treatment, viral suppression,
and vaccination from the overall target goals.
'''
import numpy
from . import control_rates
from . import proportions
from . import simulation
class OneTargetZero:
'''
Fixed at 0.
'''
def __call__(self, initial_proportion... | janmedlock/HIV-95-vaccine | model/target.py | Python | agpl-3.0 | 9,272 |
import os
from django.core.management.base import BaseCommand, CommandError
from pombola.ghana.management.hansard_parser import parse
from pombola.ghana import data
class Command(BaseCommand):
"""Import Hansard"""
help = 'Import Hansard'
args = '<file1> <file2> ...'
def handle(self, *args, **optio... | geoffkilpin/pombola | pombola/ghana/management/commands/add_hansard.py | Python | agpl-3.0 | 952 |
# Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Discount on batch payments",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"category": "Accounting & Finance"... | OCA/account-payment | account_payment_batch_process_discount/__manifest__.py | Python | agpl-3.0 | 664 |
# Generated by Django 2.2.20 on 2021-06-10 08:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0133_auto_20210608_1931'),
]
operations = [
migrations.AddField(
model_name='enterprisecustomerreportingconfigura... | edx/edx-enterprise | enterprise/migrations/0134_enterprisecustomerreportingconfiguration_enable_compression.py | Python | agpl-3.0 | 567 |
import datetime
import copy
from flask import Blueprint, jsonify, request
from sqlalchemy import func, text
from sqlalchemy import or_
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
from werkzeug.exceptions import abort
from app import db
from app.decorators import requires_authentication
from app.... | rleh/ocyco-server-python | app/tracks/views.py | Python | agpl-3.0 | 6,453 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
LibreDTE
Copyright (C) SASCO SpA (https://sasco.cl)
Este programa es software libre: usted puede redistribuirlo y/o modificarlo
bajo los términos de la GNU Lesser General Public License (LGPL) publicada
por la Fundación para el Software Libre, ya sea la versión 3 de la Li... | LibreDTE/libredte-sdk-python | ejemplos/003-dte_emitido_timbre.py | Python | agpl-3.0 | 1,616 |
"""homepage for the whole system"""
from django.http import HttpResponse
from edxmako.shortcuts import render_to_response
def index(request):
#name='321' #to_student_system()
context = {}
return render_to_response("homepage/index.html", context)
#return render_to_response("homepage/test.html", context)
| ZLLab-Mooc/edx-platform | lms/djangoapps/homepage/views.py | Python | agpl-3.0 | 313 |
#!/usr/bin/env python3
"""
Copyright (c) 2016 The Hyve B.V.
This code is licensed under the GNU Affero General Public License (AGPL),
version 3, or (at your option) any later version.
"""
import unittest
from unittest.mock import Mock
import sys
import logging.handlers
import textwrap
from pathlib import Path
from co... | n1zea144/cbioportal | core/src/test/scripts/unit_tests_validate_data.py | Python | agpl-3.0 | 147,203 |
import mock
from io import BytesIO
from django.core.files import File
from django.test import TestCase
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from publications.models import Licence, Publication, EstimatedImpactFactor, Reviewer, Comment, CommentReview
class L... | Astyan-42/skepticalscience | skepticalsciencewebsite/publications/tests/test_models.py | Python | agpl-3.0 | 2,415 |
# -*- coding: utf-8 -*-
# Odoo, Open Source Management Solution
# Copyright (C) 2015-2016 Rooms For (Hong Kong) Limited T/A OSCG
# <https://www.odoo-asia.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | yostashiro/rfhk-addons | stock_transfer_lot_filter/stock_transfer_detail.py | Python | agpl-3.0 | 2,314 |
# builtin
import os
import collections
# external
import bs4
import yaml
############################################################
# setup
############################################################
base_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
#####################################... | CollectQT/qapc | lib/file_load.py | Python | agpl-3.0 | 2,389 |
# -*- coding: utf-8 -*-
from collections import OrderedDict
from sqlalchemy import Column, Date, ForeignKey, Index, Numeric, String
from sqlalchemy import Integer
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.common import MetaModelMixin, patient_id_column, patient_relations... | renalreg/radar | radar/models/medications.py | Python | agpl-3.0 | 3,565 |
# -*- coding: utf-8 -*-
from setuptools import setup
project = "gastosabertos"
setup(
name=project,
version='0.0.1',
url='https://github.com/okfn-brasil/gastos_abertos',
description='Visualization of public spending in Sao Paulo city for Gastos Abertos project',
author='Edgar Zanella Alvarenga',
... | nucleo-digital/gastos_abertos | setup.py | Python | agpl-3.0 | 1,030 |
""" Projects and related models. """
from django.db import models
from django.contrib.auth.models import Group
from simple_history.models import HistoricalRecords
from jsonfield import JSONField
from autoslug.fields import AutoSlugField
from taggit.managers import TaggableManager
from scout.models import Place
from ac... | CommonsDev/dataserver | projects/models.py | Python | agpl-3.0 | 2,996 |
import django.test
from commoner.works import models
class TestLookup(django.test.TestCase):
fixtures = ['test_users.json', 'test_profiles.json', ]
def setUp(self):
"""Set up the test database for the lookup tests."""
self.client.login(username='normal', password='testing')
response... | cc-archive/commoner | src/commoner/works/tests/test_lookup.py | Python | agpl-3.0 | 1,799 |
# -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | CLVsol/odoo_addons | clv_medicament_catalog_member/clv_medicament_catalog_member.py | Python | agpl-3.0 | 2,526 |
"""
NOTE: This is a reimplementation of the code: https://github.com/mongodb/mongo-python-driver/blob/master/bson/json_util.py
Unfortunately the code isn't OO, so it has to be done like this. *sigh*
"""
import base64
import calendar
import datetime
import re
json_lib = True
try:
import json
except ImportError:
... | XereoNet/SpaceGDN | gdn/v2/serializer.py | Python | agpl-3.0 | 3,788 |
# -*- coding: utf-8 -*-
# list of language codes
# this file is generated automatically by utils/update_search_languages.py
language_codes = (
(u"ar-SA", u"العربية", u"", u"Arabic"),
(u"bg-BG", u"Български", u"", u"Bulgarian"),
(u"ca", u"Català", u"", u"Catalan"),
(u"ca-CT", u"Català", u"", u"Catalan")... | matejc/searx | searx/languages.py | Python | agpl-3.0 | 3,768 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import re
imp... | hlmnrmr/liveblog | server/liveblog/themes/themes.py | Python | agpl-3.0 | 28,833 |
# -*- coding: UTF-8 -*-
"""Module for defining Report.
"""
import logging
from markdown2 import markdown
from os import listdir
from os.path import abspath, dirname, isfile, join, splitext
from weasyprint import CSS, HTML
from .base import *
from .objects import *
__all__ = __features__ = ["Report"]
PAGE_CSS = "@p... | dhondta/tinyscript | tinyscript/report/report.py | Python | agpl-3.0 | 3,695 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qt\wdg_sel_attributes.ui'
#
# Created: Tue Jul 02 16:29:51 2013
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QStri... | gem/sidd | ui/qt/wdg_sel_attributes_ui.py | Python | agpl-3.0 | 1,532 |
from setuptools import setup, find_packages
TEST_REQUIRES = ["ConfigObj>=4.5.3", "nose>=0.10"]
setup(
name = "SoundCloud API",
version = "0.1",
packages = find_packages(),
author = "Hans Kuder",
author_email = "hanskuder@gmail.com",
description = "SoundCloud REST API with support for OAuth2. A... | hiidef/soundcloud-python | setup.py | Python | lgpl-2.1 | 594 |
#!/usr/bin/python2.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
# $Id$
#
# Copyright (C) 1999-2006 Keith Dart <keith@kdart.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... | xiangke/pycopia | SNMP/pycopia/SNMP/Poller.py | Python | lgpl-2.1 | 832 |
import sys
sys.path.append("./_lib/")
sys.path.append("./../_lib/")
import utils
import os
# Error Class:
def test_error():
"""
Test Error Class.
"""
assert utils.Error.not_found == 1
# Class ReplaceHelper:
def test_replace_helper():
"""
Test ReplaceHelper Class.
"""
# Test for ReplaceHelper.repla... | ESeNonFossiIo/MaJOrCA | _tests/test_utils.py | Python | lgpl-2.1 | 3,330 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | leeping/mdtraj | tests/test_netcdf.py | Python | lgpl-2.1 | 8,118 |
#!/usr/bin/python
"""Test of HTML list presentation."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather than manuall... | GNOME/orca | test/keystrokes/firefox/line_nav_lists.py | Python | lgpl-2.1 | 9,274 |
## \file
## \ingroup tutorial_pyroot
## \notebook -js
## This program creates :
## - a one dimensional histogram
## - a two dimensional histogram
## - a profile histogram
## - a memory-resident ntuple
##
## These objects are filled with some random numbers and saved on a file.
##
## \macro_image
## \macro... | veprbl/root | tutorials/pyroot/hsimple.py | Python | lgpl-2.1 | 2,699 |
"""This module performs network transformations.
Copyright 2020 Michael Hayes, UCECE
"""
from .oneport import R, Y, Z
def Z_wye_to_delta(Z1, Z2, Z3):
"""Perform wye to delta transformation of three impedances.
This is equivalent to a tee-pi transform or a star-mesh transform."""
N = Z1 * Z2 + Z1 * Z3... | mph-/lcapy | lcapy/nettransform.py | Python | lgpl-2.1 | 2,458 |
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib
import getpass
import emai... | sensorian/sensorian-firmware | Apps_Python/P01-EmailLED/Test/chec.py | Python | lgpl-3.0 | 1,880 |
# Copyright (C) 2015-2022 by the RBniCS authors
#
# This file is part of RBniCS.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from numbers import Number
from scipy.integrate import simps
from rbnics.backends.abstract import TimeQuadrature as AbstractTimeQuadrature
from rbnics.backends.common.time_series import TimeS... | mathLab/RBniCS | rbnics/backends/common/time_quadrature.py | Python | lgpl-3.0 | 1,384 |
"""
Test models used in django-klingon tests
"""
from django.db import models
from klingon.models import Translatable, AutomaticTranslation
from autoslug import AutoSlugField
class Book(models.Model, Translatable):
title = models.CharField(max_length=100)
description = models.TextField()
publication_date... | angvp/django-klingon | tests/testapp/models.py | Python | lgpl-3.0 | 825 |
import wid_popup
import wid_focus
import mm
import game
global mywid
def wid_help_on_key_down(w, sym, mod):
hide()
return True
def wid_help_on_m_down(w, x, y, button):
hide()
return True
def wid_help_create():
global mywid
w = wid_popup.WidPopup(name="help window",
... | goblinhack/MundusMeus | python/wid_help.py | Python | lgpl-3.0 | 1,766 |
#!/usr/bin/env python
# coding: utf-8
"""
This module tests :meth:`can.interface.virtual`.
"""
import unittest
from can import Bus, Message
EXAMPLE_MSG1 = Message(timestamp=1639739471.5565314, arbitration_id=0x481, data=b"\x01")
class TestMessageFiltering(unittest.TestCase):
def setUp(self):
self.node... | hardbyte/python-can | test/test_interface_virtual.py | Python | lgpl-3.0 | 1,104 |
# -*-coding: utf-8 -*-
from tfstate.provider.other.null_resource import NullResource
from tfstate.provider.other.archive_file import ArchiveFileResource
from tfstate.provider.other.null_data_source import NullDataSource
| rodynnz/python-tfstate | src/tfstate/provider/other/__init__.py | Python | lgpl-3.0 | 221 |
import os
from twisted.internet.defer import fail
from Tribler.Core.Modules.channel.channel_manager import ChannelManager
from Tribler.Core.Modules.restapi.channels.base_channels_endpoint import UNKNOWN_CHANNEL_RESPONSE_MSG, \
UNAUTHORIZED_RESPONSE_MSG
from Tribler.Test.Core.Modules.RestApi.Channels.test_channels_... | Captain-Coder/tribler | Tribler/Test/Core/Modules/RestApi/Channels/test_channels_rss_endpoint.py | Python | lgpl-3.0 | 9,092 |
import socket
import sys
import struct
import time
"""
Version: RcvSendSinvertDaten_V3.py
Programm zum Empfangen von Daten von Refusol/Sinvert/AdvancedEnergy Wechselrichter
Getestet mit einem Sinvert PVM20 und einem RaspberryPi B
Einstellungen im Wechselrichter:
IP: Freie IP-Adresse im lokalen Netzwerk
Ne... | cmolitor/SmartFarm | aelog/sniffSinvert.py | Python | lgpl-3.0 | 18,237 |
import logging
import asyncio
import os
from functools import partial
from collections import OrderedDict
from PyQt5 import QtCore, QtGui, QtWidgets
import h5py
from artiq.gui.tools import LayoutWidget, log_level_to_name, get_open_file_name
from artiq.gui.entries import procdesc_to_entry, ScanEntry
from artiq.protoco... | JQIamo/artiq | artiq/dashboard/experiments.py | Python | lgpl-3.0 | 26,579 |
"""
Rouselakis - Waters Efficient Statically-Secure Large-Universe Multi-Authority Attribute-Based Encryption
| From: Efficient Statically-Secure Large-Universe Multi-Authority Attribute-Based Encryption
| Published in: Financial Crypto 2015
| Available from: http://eprint.iacr.org/2015/016.pdf
| Not... | denniss17/charm | charm/schemes/abenc/abenc_maabe_rw15.py | Python | lgpl-3.0 | 8,870 |
"""Parse arguments from command line and configuration files."""
import fnmatch
import logging
import os
import re
import sys
from argparse import ArgumentParser, Namespace
from pathlib import Path
from typing import Any, Collection, Dict, List, Optional, Set, Union
from pylama import LOGGER, __version__
from pylama.l... | klen/pylama | pylama/config.py | Python | lgpl-3.0 | 8,401 |
#coding: utf-8
import logging
from urlparse import urljoin
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.pdfpage import PDFPage
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from cStringIO import StringIO
from markupsafe import escape
from .exc... | polyrabbit/hacker-news-digest | page_content_extractor/pdf.py | Python | lgpl-3.0 | 2,663 |
from functools import partial
import logging
logger = logging.getLogger(__name__)
import numpy
from lazyflow.graph import Operator, InputSlot, OutputSlot
from lazyflow.request import RequestLock, Request, RequestPool
from lazyflow.utility import OrderedSignal
from lazyflow.roi import getBlockBounds, getIntersectingBl... | jakirkham/lazyflow | lazyflow/operators/opFeatureMatrixCache.py | Python | lgpl-3.0 | 12,534 |
from pycp2k.inputsection import InputSection
from ._colvar2 import _colvar2
from ._frame3 import _frame3
from ._map1 import _map1
class _reaction_path1(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Distances_rmsd = None
self.Rmsd = None
self.Subset_type = None... | SINGROUP/pycp2k | pycp2k/classes/_reaction_path1.py | Python | lgpl-3.0 | 1,777 |
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='OTRXMPPChannel',
author='Mike Gogulski',
author_email='mike@gogulski.com',
maintainer='Mike Gogulski',
maintainer_email='mike@gogulski.com',
url='https://github.com/mikegogulski/python-otrxmppchannel',
version='1.0.4',
pa... | mikegogulski/python-otrxmppchannel | setup.py | Python | unlicense | 893 |
#!/usr/bin/env python
# encoding: utf-8
import os
from efl.evas import EVAS_HINT_FILL, EVAS_HINT_EXPAND, \
EVAS_ASPECT_CONTROL_VERTICAL
from efl import elementary
from efl.elementary.window import StandardWindow
from efl.elementary.box import Box
from efl.elementary.button import Button
from efl.elementary.genlis... | maikodaraine/EnlightenmentUbuntu | bindings/python/python-efl/examples/elementary/test_access.py | Python | unlicense | 11,542 |
#-*- coding: utf-8 -*-
""" tracksource model """
import logging
import os
import re
import sys
from youtube_dl import YoutubeDL
from voiceplay.logger import logger
from voiceplay.utils.cache import MixedCache
from voiceplay.utils.models import BaseCfgModel
class TrackSource(BaseCfgModel):
"""
TrackSource mod... | tb0hdan/voiceplay | voiceplay/datasources/track/basesource.py | Python | unlicense | 2,183 |
# -*- coding: utf-8 -*-
"""Provides events triggered when users signup, login and logout."""
from zope.interface import implementer, Attribute, Interface
class IUserSignedUp(Interface):
"""An event type that is emitted after a new user signs up."""
request = Attribute('The request object.')
user = Attr... | thruflo/pyramid_simpleauth | src/pyramid_simpleauth/events.py | Python | unlicense | 4,129 |
# simpler import as described in the readme
from restcountries.base import RestCountryApiV2
__version__ = "1.0.0"
| SteinRobert/python-restcountries | restcountries/__init__.py | Python | unlicense | 115 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from auxiliary_functions import *
# Applies De Castlejau's algorithm to calculate a blossom
def blossom (control_points, parameters): #parameters = {t0, k, t1}
# Gets control_points of an auxiliary curve
auxiliary_control_points = [[0,0]]*(len(control_points)-para... | Jsevillamol/B-zierN | blossom.py | Python | unlicense | 1,115 |
#!/usr/bin/env python
# encoding: utf-8
import os
from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL
from efl import elementary
from efl.elementary.window import StandardWindow
from efl.elementary.box import Box
from efl.elementary.photo import Photo
from efl.elementary.table import Table
from efl.elementary.toolb... | maikodaraine/EnlightenmentUbuntu | bindings/python/python-efl/examples/elementary/test_toolbar.py | Python | unlicense | 6,713 |
#
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Test dev null."""
from .. import BaseHostTest
class DevNullTest(BaseHostTest):
"""DevNullTest."""
__result = None
def _callback_result(self, key, value, timestamp):
# We should no... | ARMmbed/greentea | src/htrun/host_tests/dev_null_auto.py | Python | apache-2.0 | 842 |
"""
This module manages the interaction with the remote service. Just ask, we will
do our best to satisfy your request
"""
from __future__ import absolute_import
import copy
import json
import requests
from lib.adhoc import AdHocError
from lib.configuration import ConfigError
class APIError(Exception):
"""
Er... | gerva/tower-companion | lib/api.py | Python | apache-2.0 | 13,129 |
# PyAlgoTrade
#
# Copyright 2011-2015 Gabriel Martin Becedillas Ruiz
#
# 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... | cgqyh/pyalgotrade-mod | testcases/test_strategy.py | Python | apache-2.0 | 1,870 |
# Copyright 2014 NEC Corporation. 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 l... | dimtruck/magnum | magnum/conductor/handlers/bay_conductor.py | Python | apache-2.0 | 11,871 |
# -*- coding: utf-8 -*-
#
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | tswast/google-cloud-python | iam/google/cloud/iam_credentials_v1/__init__.py | Python | apache-2.0 | 1,322 |
'''
Run Python profiler to analyze Pelican performance
All commandline arguments (sys.argv) are passed on to Pelican
'''
import cProfile
import pelican
import sys
PROFILE_RESULTS = 'profile_output.txt'
SORT_BY = 'tottime' # https://docs.python.org/3/library/profile.html#pstats.Stats.sort_stats
def main():
std... | sio/potyarkin.ml | profiler.py | Python | apache-2.0 | 567 |
from __future__ import unicode_literals
import sure # noqa
import json
from moto.swf.exceptions import (
SWFClientError,
SWFUnknownResourceFault,
SWFDomainAlreadyExistsFault,
SWFDomainDeprecatedFault,
SWFSerializationException,
SWFTypeAlreadyExistsFault,
SWFTypeDeprecatedFault,
SWFWor... | william-richard/moto | tests/test_swf/test_exceptions.py | Python | apache-2.0 | 5,198 |
"""
Given the vectors and word counts resulting from the experiments, build
graphics for the cooccurrence noise variation experiment section of the
article.
"""
import numpy as np
import pandas as pd
import matplotlib; matplotlib.use('Agg') # must be set before importing pyplot
import matplotlib.pyplot as plt
import ra... | benjaminwilson/word2vec-norm-experiments | build_images_coocc_noise.py | Python | apache-2.0 | 3,502 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from solution import Solution
n = 4
sol = Solution()
res = sol.totalNQueens(n)
print(res)
| zhlinh/leetcode | 0052.N-Queens II/test.py | Python | apache-2.0 | 138 |
# Generated by Django 3.0.3 on 2020-06-04 15:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ligand', '0003_analyzedassay_analyzedexperiment_biasedexperiment_biasedexperimentvendors_biasedpathways_biasedpathw'),
]
operations = [
migr... | protwis/protwis | ligand/migrations/0004_auto_20200604_1735.py | Python | apache-2.0 | 1,007 |
import time
class DisplayObject:
MAX_CHARS_IN_ROW = 16
TIME_TO_UPDATE = 0.05
def __init__(self):
self.line1 = ""
self.line2 = ""
self.last_update = time.clock()
self.scroll_pos1 = 0
self.scroll_pos2 = 0
self.update_indicator1 = False
self.update_i... | 9and3r/mopidy-frontend-for-adafruit-charlcdplate | mopidy_frontend_for_adafruit_charlcdplate/DisplayObject.py | Python | apache-2.0 | 2,628 |
#encoding: utf-8
import json
from datetime import datetime
class DateTimeJSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, datetime):
return o.strftime('%Y-%m-%d %H:%M:%S')
return super(DateTimeJSONEncoder, self).default(o)
if __name__ == '__main__':
... | imsilence/shadow | codes/server/shadow/base/translate.py | Python | apache-2.0 | 501 |
class config(object):
basic = {
'SECRET_KEY': '',
'APP_BASE_DIR': '',
'CLUSTERED': False,
'CLUSTER_NAME': '',
'JOB_MASTER': True,
'EMAIL_DOMAIN': '',
'CSRF_ENABLED': True,
'API_ACCESS_DOMAINS': False,
'TIMEZONE': 'US/Pacific'
}
database... | discogestalt/OnCalendar | oncalendar/oc_config.py | Python | apache-2.0 | 3,596 |
# -*- coding: utf-8 -*-
import sys
import pytest
aerospike = pytest.importorskip("aerospike")
try:
import aerospike
except:
print("Please install aerospike python client.")
sys.exit(1)
from aerospike_helpers.expressions import *
from aerospike_helpers.operations import expression_operations as expressio... | aerospike/aerospike-client-python | test/new_tests/test_batch_get_ops.py | Python | apache-2.0 | 4,582 |
#
# 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
# ... | gonzolino/heat | heat/engine/clients/os/nova.py | Python | apache-2.0 | 27,246 |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... | google-research/google-research | talk_about_random_splits/probing/split_by_random_length_main.py | Python | apache-2.0 | 5,542 |
# Copyright 2020 The TensorFlow Runtime Authors
#
# 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... | tensorflow/runtime | mlir_tests/lit.site.cfg.py | Python | apache-2.0 | 942 |
import zipimport
importer = zipimport.zipimporter('zipimport_example.zip')
code = importer.get_code('zipimport_get_code')
print(code)
| jasonwee/asus-rt-n14uhp-mrtg | src/lesson_modules_and_packages/zipimport_get_code.py | Python | apache-2.0 | 137 |
#
# 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
# ... | openstack/senlin | senlin/api/middleware/version_negotiation.py | Python | apache-2.0 | 5,741 |
# Copyright 2020 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
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing,... | google-research/korvapuusti | listening_test_summer_2020/analysis/data_processing/visualize_tf_data.py | Python | apache-2.0 | 6,497 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Control servo
"""
import RPi.GPIO as GPIO
import time
import atexit
import sys
atexit.register(GPIO.cleanup)
servopin = 21
GPIO.setmode(GPIO.BCM)
GPIO.setup(servopin, GPIO.OUT, initial=False)
p = GPIO.PWM(servopin,50) #50HZ
p.start(0)
time.sleep(1)
def run(angle):... | Jailman/RaspberryPiRobot | Web-Terminal/Modules/servo.py | Python | apache-2.0 | 495 |
# Copyright (c) 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | openstack/manila-ui | manila_ui/tests/integration/pages/project/share/messagespage.py | Python | apache-2.0 | 870 |
# Copyright 2013 Cloudbase Solutions Srl
# 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 r... | stackforge/compute-hyperv | compute_hyperv/nova/pathutils.py | Python | apache-2.0 | 13,939 |
from uw_sws.dao import SWS_DAO
from userservice.user import UserService
def get_netid_of_current_user():
return UserService().get_user()
def is_using_file_dao():
return SWS_DAO().get_implementation().is_mock()
| uw-it-aca/course-dashboards | coursedashboards/dao/__init__.py | Python | apache-2.0 | 222 |
import unittest
from epicduels.content import game_state as GS
from epicduels.initializers import initializer as init
def suite():
suite = unittest.TestSuite()
suite.addTest(WhenTestingDeckRules())
return suite
class WhenTestingDeckRules(unittest.TestCase):
def setUp(self):
self.squad = in... | aelkikhia/pyduels27 | epicduels/tests/rules/deck_rules_test.py | Python | apache-2.0 | 849 |
from hazelcast.protocol.builtin import FixSizedTypesCodec
from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE
from hazelcast.protocol.builtin import StringCodec
from hazelcast.protocol.builtin import ListMultiFrameCodec
from hazelcast.protocol.... | hazelcast/hazelcast-python-client | hazelcast/protocol/codec/set_compare_and_remove_all_codec.py | Python | apache-2.0 | 958 |