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 |
|---|---|---|---|---|---|
#==============================================================================
#
# Copyright (C) 2016 Fabian Schoenfeld
#
# This file is part of the ratlab software. It 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... | INI-ratlab/ratlab | util/ratbot.py | Python | gpl-3.0 | 8,302 |
import pytest
from apps.public.book.test.factories import BookCollectionFactory, BookFactory
from apps.public.book.views import BookListView
@pytest.mark.django_db
class TestBookListView:
def test_books_order(self):
collection = BookCollectionFactory()
book_1 = BookFactory(collection=collection, ... | erudit/zenon | tests/unit/apps/public/book/test_views.py | Python | gpl-3.0 | 771 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'stopwords.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Stopwords(object):
def setupUi(self, Stopwords):
Stopwords.s... | gkunter/coquery | coquery/gui/ui/stopwordsUi.py | Python | gpl-3.0 | 3,494 |
#!/usr/bin/python3
#-*- coding: latin-1 -*-
"""
Copyright (C) 2014 Technische Universität Berlin,
Fakultät IV - Elektrotechnik und Informatik,
Fachgebiet Regelungssysteme,
Einsteinufer 17, D-10587 Berlin, Germany
This file is part of PaPI.
PaPI is free software: you can redistribute it and/or modify
it under the t... | TUB-Control/PaPI | papi/event/data/DataBase.py | Python | gpl-3.0 | 1,072 |
# from django.shortcuts import render, get_object_or_404
# from .models import Album, Song
# def index(request):
# all_albums = Album.objects.all()
# context = {
# 'all_albums':all_albums,
# }
# return render(request, 'music/index.html', context)
# def detail(request, album_id):
... | TheCoderNextdoor/DjangoSites | django_tut/website/music/views.py | Python | gpl-3.0 | 3,632 |
# -*- test-case-name: twisted.test.test_sip -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Session Initialization Protocol.
Documented in RFC 2543.
[Superceded by 3261]
This module contains a deprecated implementation of HTTP Digest authentication.
See L{twisted.cred.cred... | Donkyhotay/MoonPy | twisted/protocols/sip.py | Python | gpl-3.0 | 41,973 |
#!/usr/bin/env python2
#-*-coding:utf-8-*-
import sys
import os
import subprocess
import numpy
import json
def exec_cmd(cmd):
return subprocess.Popen(cmd,
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
... | flavono123/LKFES | feature-evals/dio_aio/test.py | Python | gpl-3.0 | 3,826 |
__all__ = ('WebSocketResponse', 'MsgType')
import asyncio
import warnings
from . import hdrs
from .errors import HttpProcessingError, ClientDisconnectedError
from .websocket import do_handshake, Message, WebSocketError
from .websocket_client import MsgType, closedMessage
from .web_exceptions import (
HTTPBadReque... | lfblogs/aiopy | aiopy/required/aiohttp/web_ws.py | Python | gpl-3.0 | 8,998 |
#
# setup.py
#
# Copyright (C) 2015 Dario Blanco
#
# Based on work by:
# Copyright (C) 2013-2014 Bro <bro.development@gmail.com>
# Copyright (C) 2009 Camillo Dell'mour <cdellmour@gmail.com>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew R... | sharkerz/deluge-yarss-plugin | setup.py | Python | gpl-3.0 | 2,973 |
# mssql/__init__.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from . import base, pyodbc, adodbapi, pymssql, zxjdbc, mxodbc # noqa
from .base ... | fernandog/Medusa | ext/sqlalchemy/dialects/mssql/__init__.py | Python | gpl-3.0 | 1,074 |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Dan Eicher.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# thi... | jemandez/creaturas-magicas | Configuraciones básicas/scripts/addons/piemenus/pie_viewMenu.py | Python | gpl-3.0 | 7,255 |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impl... | CalthorpeAnalytics/urbanfootprint | footprint/client/configuration/scag_dm/base/jurisdiction_boundary.py | Python | gpl-3.0 | 1,720 |
#!/usr/bin/env python
# imp general
import IMP
import IMP.core
# our project
from IMP.isd import Weight
from IMP.isd import WeightMover
# unit testing framework
import IMP.test
class TestWeightMover(IMP.test.TestCase):
"""tests weight setup"""
def setUp(self):
IMP.test.TestCase.setUp(self)
... | shanot/imp | modules/isd/test/test_mc_WeightMover.py | Python | gpl-3.0 | 1,309 |
import sys
sys.path.append('../..')
from cgl.kdtree import *
from cgl.point import Point
data1 = [ (2,2), (0,5), (8,0), (9,8), (7,14), (13,12), (14,13) ]
points = [Point(d[0], d[1]) for d in data1]
t1 = kdtree(points, 'unbalanced')
t2 = kdtree(points)
print([t1.query_kdtree(p)[0] for p in points])
print([t2.query_kdt... | compgeog/cgl | cgl/tests/test_kdtrees.py | Python | gpl-3.0 | 1,003 |
"""
convolution_wrapper.py
ctypes wrapper for rvic_convolution.c
gcc -shared -o rvic_convolution.so rvic_convolution.c
"""
import os
import numpy as np
import ctypes
SHAREDOBJECT = 'rvic_convolution.so'
LIBPATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))
try:
_convolution = np.ctypesli... | bartnijssen/RVIC | rvic/core/convolution_wrapper.py | Python | gpl-3.0 | 1,407 |
"""Retrieve As information out of GeoIP (MaxMind) binding.
Beware: database location is hardcoded!"""
import GeoIP
import re
import numpy as np
import INDEX_VALUES
#WARNING: hard coded
GAS=GeoIP.open('/home/louis/streaming/flows/AS/GeoIPASNum.dat',
GeoIP.GEOIP_STANDARD)
#ugly but more efficient: compile only... | LouisPlisso/analysis_tools | add_ASN_geoip.py | Python | gpl-3.0 | 2,116 |
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 7 14:53:55 2016
@author: nu
"""
import numpy as np
import timeit, os, sys
from astropy.coordinates import SkyCoord
from astropy.table import Column
from astroquery.vizier import Vizier
from astropy import units as u
from TAROT_PL import TarotPIP
from Filter_data import ... | Noysena/TAROT | SFile.py | Python | gpl-3.0 | 8,161 |
'''
Created on Jan 11, 2012
@author: jjm20
'''
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='RT_Events_q')
print ' [*] Waiting for messages. To exit press CTRL+C'
def callback(ch, method, properti... | ctrlspc/PyPrinterMonitor | pyPrinterMonitor/test.py | Python | gpl-3.0 | 507 |
from contextlib import contextmanager
from pathlib import Path
from unittest.mock import patch, mock_open
import unittest
import tempfile
import os
import yaml
import pytest
from ddt import ddt, data
from . import EnosTest
from enoslib.task import Environment, _symlink_to, get_or_create_env, enostask
from enoslib.con... | BeyondTheClouds/enoslib | enoslib/tests/unit/test_task.py | Python | gpl-3.0 | 6,431 |
# setup.py
# only if building in place: ``python setup.py build_ext --inplace``
import os
import sys
import platform
import glob
from setuptools import setup, find_packages
from numpy.distutils.core import setup, Extension
os.environ['NPY_DISTUTILS_APPEND_FLAGS'] = '1'
#if os.name == 'nt': # Windows.
# extra_com... | WISDEM/pyFrame3DD | setup.py | Python | gpl-3.0 | 1,499 |
# coding: utf-8
#
# Virtual Machine Consolidation Agent (VMCA)
# Copyright (C) 2015 - GRyCAP - Universitat Politecnica de Valencia
#
# 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 versi... | grycap/vmca | one.py | Python | gpl-3.0 | 6,637 |
#!/usr/bin/env python
# encoding: utf-8
# -------------------------------------------------------------------------------
# version: ??
# author: fernando
# license: MIT License
# contact: iw518@163.com
# purpose: views
# date: 2016-12-14
# copyright: copyright 2016 Xu, Aiwu
# ----... | iw518/fernando | app/main/hr/views.py | Python | gpl-3.0 | 859 |
"""
Global views -- i.e., don't tied to any app/model.
"""
from core.shortcuts import render_to
@render_to ('index.html')
def index (request):
return {}
## /newsletter/
from utils.mailchimp import MailChimp
from django.conf import settings
#mailchimp = None
#if settings.MAILCHIMP_API_KEY:
# mailchimp = M... | normalnorway/normal.no | django/core/views.py | Python | gpl-3.0 | 733 |
import xlrd
from datetime import date, datetime
from openpyxl import load_workbook, worksheet
from openpyxl.workbook import Workbook
from openpyxl.reader.excel import load_workbook, InvalidFileException
from statFMB.views import db, current_user, app
from statFMB.models import *
from statFMB.utils import clear_str, r... | maia-dev/statFMB | statFMB/upload.py | Python | gpl-3.0 | 20,623 |
# Topydo - A todo.txt client written in Python.
# Copyright (C) 2014 - 2015 Bram Schoenmakers <bram@topydo.org>
#
# 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,... | bram85/topydo | test/test_add_command.py | Python | gpl-3.0 | 16,738 |
################################################################################
## ##
## This file is a part of TADEK. ##
## ... | tadek-project/tadek-common | tadek/engine/contexts.py | Python | gpl-3.0 | 11,158 |
import collections
#Define types for Inference
nt = collections.namedtuple
fullinfo_t = nt('fullinfo_t', ['tag','dim','extra'])
#Differences from Hotspot with our tags:
#BOGUS changed to None. Array omitted as it is unused. Void omitted as unecessary. Boolean added
valid_tags = ['.'+_x for _x in 'int float double dou... | alexkasko/krakatau-java | krakatau-lib/src/main/resources/Lib/Krakatau/verifier/verifier_types.py | Python | gpl-3.0 | 4,399 |
# This file is part of Sigviewr.
# This project is licensed under the GNU GPL (version 3 or higher).
# Copyright 2014 by Clemens Brunner and Thomas Brunner.
from qt import QtCore
from signalscene import SignalScene
from signalitem import SignalItem
from signalview import SignalView
class SignalBrowser(... | cle1109/sigviewr | signalbrowser.py | Python | gpl-3.0 | 1,710 |
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
# set this to run as a cronjob at 00:00 UTC to create th... | gdestuynder/MozDef | cron/rotateIndexes.py | Python | mpl-2.0 | 8,822 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.welcome.page2 import FirefoxWelcomePage2
@pytest.mark.nondestructive
def test_pocket... | sgarrity/bedrock | tests/functional/firefox/test_welcome_page2.py | Python | mpl-2.0 | 521 |
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
#... | amarant/servo | python/servo/testing_commands.py | Python | mpl-2.0 | 31,871 |
# Generated by Django 2.2.12 on 2020-06-03 03:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bot', '0004_auto_20191013_2322'),
]
operations = [
migrations.AddField(
model_name='account',
name='email',
... | jeromecc/doctoctocbot | src/bot/migrations/0005_auto_20200603_0508.py | Python | mpl-2.0 | 633 |
"""
MIT License
Copyright (c) 2018 Claude SIMON (https://q37.info/s/rmnmqd49)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... | epeios-q37/epeios | tools/xdhq/wrappers/PYH/XDHqXML.py | Python | agpl-3.0 | 1,921 |
# -*- coding: utf-8 -*-
# Copyright 2019 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import (
purchase_order_line,
)
| open-synergy/opnsynid-purchase-workflow | purchase_order_line_product_uom/models/__init__.py | Python | agpl-3.0 | 176 |
# -*- coding:Utf-8 -*-
from mongoengine import Document, fields
from django_gravatar.helpers import get_gravatar_url
from core.mixins import ZombieMixin, AsyncTTLUploadsMixin
from notification.mixins import NotificationAwareDocumentMixin
from core.tasks import es_document_index, es_document_deindex
__all__ = (
... | Naeka/vosae-app | www/contacts/models/entity.py | Python | agpl-3.0 | 3,242 |
"""
Django rules for student roles
"""
from __future__ import absolute_import
import rules
from lms.djangoapps.courseware.access import has_access
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlag, WaffleFlagNamespace
from .roles import CourseDataResearcherRole
# Waffle flag to enable th... | cpennington/edx-platform | common/djangoapps/student/rules.py | Python | agpl-3.0 | 894 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# ThinkOpen Solutions Brasil
# Copyright (C) Thinkopen Solutions <http://www.tkobr.com>.
#
# This... | thinkopensolutions/tkobr-addons | tko_partner_multiple_phones/__manifest__.py | Python | agpl-3.0 | 2,154 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# FreeSWITCH Click2dial module for OpenERP
# Copyright (C) 2014 Trever L. Adams
# Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
#
# This program is free software: you can redistribute it... | treveradams/openerp-freeswitch-connector | freeswitch_click2dial/freeswitch_click2dial.py | Python | agpl-3.0 | 21,454 |
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class VerticalLiftShuttleManualBarcode(models.TransientModel):
_name = "vertical.lift.shuttle.manual.barcode"
_description = "Action to input a barcode"
barcode = fields.Char(st... | OCA/stock-logistics-warehouse | stock_vertical_lift/wizards/vertical_lift_shuttle_manual_barcode.py | Python | agpl-3.0 | 671 |
import json
import logging
from django.contrib.auth.models import User
from django.contrib.auth import login, authenticate, logout
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse
from django.core.mail import... | macarthur-lab/xbrowse | xbrowse_server/base/views/account_views.py | Python | agpl-3.0 | 4,556 |
#!/usr/bin/env python
# List EC2 Instance Types
# see: https://aws.amazon.com/blogs/aws/new-aws-price-list-api/
import requests
from awslimitchecker.services.ec2 import _Ec2Service
print('GETing AWS Pricing Offers index JSON')
offers = requests.get(
'https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.j... | jantman/awslimitchecker | dev/missing_instance_types.py | Python | agpl-3.0 | 1,475 |
# coding=utf-8
from __future__ import absolute_import
__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 RaionPi Project - Released under terms of the AGPLv3 License"
class NoUpdateAvailable(Excep... | leductan-nguyen/RaionPi | src/octoprint/plugins/softwareupdate/exceptions.py | Python | agpl-3.0 | 823 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-04 09:25
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
... | erasche/galactic-radio-telescope | api/migrations/0001_initial.py | Python | agpl-3.0 | 3,931 |
# -*- coding: utf8 -*-
#
# Copyright (C) 2015 NDP Systèmes (<http://www.ndp-systemes.fr>).
#
# 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
# Licen... | ndp-systemes/odoo-addons | base_delivery_tracking_colissimo/__openerp__.py | Python | agpl-3.0 | 1,395 |
#!C:\Users\Mark.Zwart\PycharmProjects\Pi-Jukebox\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sy... | mark-me/Pi-Jukebox | venv/Scripts/pip-script.py | Python | agpl-3.0 | 419 |
# vim:ai:et:ff=unix:fileencoding=utf-8:sw=4:ts=4:
# conveyor/src/test/python/client.py
#
# conveyor - Printing dispatch engine for 3D objects and their friends.
# Copyright © 2012 Matthew W. Samsonoff <matthew.samsonoff@makerbot.com>
#
# This program is free software: you can redistribute it and/or modify it under
# th... | makerbot/conveyor | src/test/python/client.py | Python | agpl-3.0 | 1,877 |
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from . import measuring_device
| OCA/stock-logistics-warehouse | stock_measuring_device_zippcube/models/__init__.py | Python | agpl-3.0 | 131 |
# -*- coding: utf-8 -*-
# © <2016> <ToproERP liujing>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from json import *
import logging
import string
import hashlib
import urllib2
from openerp import http
from openerp.http import request
import Cookie
import base64
import pytz
import datetime
from... | xhair/TopOdoo_Addons | ToproERP_WeChat_GLD/controllers/wechat_gld.py | Python | agpl-3.0 | 43,140 |
# -*- coding: utf-8 -*-
# @author: vuolter
from __future__ import absolute_import, unicode_literals
import os
import re
import sys
from future import standard_library
standard_library.install_aliases()
def char(text, chars, repl=''):
return re.sub(r'[{0}]+'.format(chars), repl, text)
_UNIXBADCHARS = ('\0', ... | pyblub/pyload | pyload/utils/purge.py | Python | agpl-3.0 | 1,743 |
# -*- 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.
default_app_config = __name__ + ".apps.AppConfig"
| suutari/shoop | shuup/importer/__init__.py | Python | agpl-3.0 | 304 |
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
# 'brooks',
'aiohttp',
'pandas',
'pytes... | sixty-north/bark-spider | setup.py | Python | agpl-3.0 | 1,191 |
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 15 16:32:17 2016
@author: elliott
"""
import re
def convert_columbia_html(text):
conversions = [('italic', 'em'),
('block_quote', 'blockquote'),
('bold', 'strong'),
('underline', 'u'),
('s... | voutilad/courtlistener | cl/corpus_importer/import_columbia/convert_columbia_html.py | Python | agpl-3.0 | 2,132 |
# coding=utf-8
# Copyright (c) 2001, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and ope... | CanalTP/kirin | kirin/__init__.py | Python | agpl-3.0 | 3,892 |
# -*- coding: utf-8 -*-
"""
a24tim.tests.test_models
************************
The model tests for the a24tim app.
:copyright: (c) 2012 by Carl Modén
:licence: AGPL3, see LICENSE for more details.
"""
from datetime import date
import math
import urllib2
from django.test import TestCase
import a24... | carlmod/Analys24h | a24tim/tests/test_models.py | Python | agpl-3.0 | 7,591 |
# Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
from optparse import OptionParser
from opus_core.misc import get_config_from_opus_path
from opus_core.logger import logger
from opus_core.configurations.x... | apdjustino/DRCOG_Urbansim | src/opus_core/tools/explore_model.py | Python | agpl-3.0 | 3,937 |
# Copyright 2016 Nicolas Bessi, Camptocamp SA
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ResPartner(models.Model):
_inherit = "res.par... | OCA/partner-contact | base_location/models/res_partner.py | Python | agpl-3.0 | 5,851 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import babel
import copy
import datetime
import dateutil.relativedelta as relativedelta
import functools
import logging
import re
from werkzeug import urls
from odoo import _, api, fields, models, tools
from odoo.excep... | ygol/odoo | addons/mail/models/mail_render_mixin.py | Python | agpl-3.0 | 19,293 |
# -*- coding: utf-8 -*-
# (c) 2016 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
class SaleOrder(models.Model):
_inherit = 'sale.order'
@api.multi
def action_button_confirm(self):
procurement_obj = self.env... | esthermm/odoo-addons | procurement_service_project/models/sale_order.py | Python | agpl-3.0 | 1,663 |
# -*- coding: utf-8 -*-
from django.conf import settings
def static_hash(request):
"""
Context processor to set archiprod to True
for the main ressource menu
"""
return {"static_hash": settings.STATIC_HASH}
| Ircam-Web/mezzanine-organization | organization/utils/context_processors.py | Python | agpl-3.0 | 237 |
import uuid
from django.test import TestCase
import data.models
from makam import models
class ArtistTest(TestCase):
fixtures = ["makam_instrument"]
def test_collaborating_artists(self):
a1 = models.Artist.objects.create(name="a1")
a2 = models.Artist.objects.create(name="a2")
a3 = m... | MTG/dunya | makam/test/test_artist.py | Python | agpl-3.0 | 5,233 |
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Model tests for metadata server."""
from __future__ import (
absolute_import,
print_function,
unicode_literals,
)
str = None
__metaclass__ = type
__all_... | cloudbase/maas | src/metadataserver/tests/test_nodeinituser.py | Python | agpl-3.0 | 1,151 |
# Copyright 2010-2015 RethinkDB, all rights reserved.
__all__ = ['expr', 'RqlQuery']
import datetime
import collections
import base64
import binascii
import json as py_json
import threading
from .errors import RqlDriverError, QueryPrinter, T
from . import ql2_pb2 as p
pTerm = p.Term.TermType
try:
unicode
excep... | sebadiaz/rethinkdb | drivers/python/rethinkdb/ast.py | Python | agpl-3.0 | 43,683 |
# Generated by Django 3.1.7 on 2021-04-19 12:59
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("projects", "0010_project... | adfinis-sygroup/timed-backend | timed/projects/migrations/0011_auto_20210419_1459.py | Python | agpl-3.0 | 4,955 |
from datetime import timedelta
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
from openerp.osv import orm
import openerp.tests.common as test_common
from .common import BaseAgreementTestMixin
class TestAgreementPriceList(test_common.TransactionCase,
BaseAgreementTestMixin):
"""... | rschnapka/purchase-workflow | framework_agreement/tests/test_framework_agreement_price_list.py | Python | agpl-3.0 | 4,066 |
# Copyright (C) 2014-2021 The Debsources developers
# <qa-debsources@lists.alioth.debian.org>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://salsa.debian.org/qa/debsources/blob/master/AUTHORS
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | Debian/debsources | lib/debsources/tests/test_archiver.py | Python | agpl-3.0 | 6,666 |
# Generated by Django 3.2.4 on 2021-07-05 13:56
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bibliography", "0002_move_json_data"),
]
operations = [
migrations.AlterModelOptions(
name="entry",
options={"verbose_name_p... | fiduswriter/fiduswriter | fiduswriter/bibliography/migrations/0003_alter_entry_options.py | Python | agpl-3.0 | 357 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Zikzakmedia S.L. (http://www.zikzakmedia.com)
# Copyright (c) 2010 Pexego Sistemas Informáticos S.L. (http://www.pexego.es)
# @authors: Jordi Esteve (Zikzakmedia), Borja López Soilán (P... | savoirfairelinux/account-financial-tools | account_chart_update/wizard/wizard_chart_update.py | Python | agpl-3.0 | 67,528 |
import logging
import os
import re
import uuid
from io import BytesIO
import six
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import AssetKey, CourseKey
from opaque_keys.edx.locator import AssetLocator
from PIL import Image
from six.moves.urllib.parse import parse_qsl, quote_plus, urlencode, url... | cpennington/edx-platform | common/lib/xmodule/xmodule/contentstore/content.py | Python | agpl-3.0 | 19,503 |
"""Analyse the tests log file given as argument.
Print a report and return status code 1 if failures are detected
"""
import sys
import re
FAILURE_REGEXPS = {
'Failure in Python block': re.compile(r'WARNING:tests[.].*AssertionError'),
'Errors during x/yml tests': re.compile(r'ERROR:tests[.]'),
'Errors or... | anybox/anybox.buildbot.odoo | anybox/buildbot/openerp/build_utils/analyze_oerp_tests.py | Python | agpl-3.0 | 1,459 |
from odoo import api, fields, models
class IrAttachment(models.Model):
_inherit = "ir.attachment"
tag_id = fields.Many2one(comodel_name='attach.category.tag',
string='Tag')
@api.onchange('res_id')
def _onchange_res_id(self):
# TODO Corrigir uso do domain quando ... | multidadosti-erp/multidadosti-addons | project_attachment_tags/models/ir_attachment.py | Python | agpl-3.0 | 676 |
# Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
import deform
from pyramid.view import view_config
from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS
from pontus.default_behavior import Cancel
from p... | ecreall/nova-ideo | novaideo/views/smart_folder_management/remove_smart_folder.py | Python | agpl-3.0 | 2,248 |
#-*- 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... | deKupini/erp | addons/project_issue/project_issue.py | Python | agpl-3.0 | 30,662 |
# coding=utf-8
# Copyright (c) 2001-2015, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of fabric_navitia, the provisioning and deployment tool
# of Navitia, the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by C... | francois-vincent/fabric_navitia | fabfile/component/tyr.py | Python | agpl-3.0 | 25,070 |
#!/usr/bin/python3
import requests
# url = "http://192.168.1.254"
landing_url = "https://www.austintexas.gov/devreview/a_queryfolder_permits.jsp?myWhere="
res_url = "https://www.austintexas.gov/devreview/d_showpropertyfolderlist.jsp?clicked=searchByOther"
parms = {'Lid': 'ReadOnlyaustin',
'zip': '78722',
... | nathanlynch/atx-permit-scraper | src/session.py | Python | agpl-3.0 | 582 |
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | uclouvain/OSIS-Louvain | base/forms/entity.py | Python | agpl-3.0 | 1,833 |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'SourceRegion.is_high_risk'
db.execute('''
ALTER... | SeedScientific/polio | source_data/migrations/0113_auto__del_field_sourceregion_is_high_risk.py | Python | agpl-3.0 | 20,716 |
from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "White Ninja"
language = "en"
url = "http://www.whiteninjacomics.com/"
start_date = "2002-01-01"
end_date = "2012-08-04"
active = False
rights = "Scott ... | jodal/comics | comics/comics/whiteninja.py | Python | agpl-3.0 | 443 |
#!/usr/bin/python3
# Copyright 2016 Nathan Sommer and Ben Coleman
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#... | git-keeper/git-keeper | tests/acceptance/gkserver_base/mysmtpd.py | Python | agpl-3.0 | 3,257 |
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for BranchSet."""
__metaclass__ = type
from testtools.matchers import LessThan
from zope.security.proxy import removeSecurityProxy
from lp.app.enums import Informa... | abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/code/model/tests/test_branchset.py | Python | agpl-3.0 | 5,920 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feedservice.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| gpodder/mygpo-feedservice | manage.py | Python | agpl-3.0 | 254 |
""" Controller for tsl2561 devices. """
import mauzr
from mauzr.serializer import Struct as SS
__author__ = "Alexander Sowitzki"
FMAP = ((0, 0, 0), (0x40, 0x01f2, 0x01be), (0x80, 0x214, 0x2d1),
(0xc0, 0x23f, 0x37b), (0x0100, 0x270, 0x3fe),
(0x0138, 0x16f, 0x1fc), (0x019a, 0xd2, 0xfb), (0x29a, 0x18, 0... | eqrx/mauzr | mauzr/hardware/tsl2561/controller.py | Python | agpl-3.0 | 1,735 |
# -*- coding: utf-8 -*-
# Copyright 2018 Coop IT Easy SCRLfs.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import _, api, fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.multi
def _resource_activity_count(self):
for pa... | houssine78/addons | resource_activity/models/partner.py | Python | agpl-3.0 | 949 |
# -*- 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
from abc imp... | mugurrus/superdesk-core | superdesk/io/feed_parsers/__init__.py | Python | agpl-3.0 | 14,119 |
from django.conf.urls.defaults import *
from simple_locations.views import *
urlpatterns = patterns('',
(r'^simple_locations/edit/(?P<area_id>[0-9]+)/$', edit_location),
(r'^simple_locations/add/((?P<parent_id>[0-9]+)/){0,1}$', add_location),
(r'^simple_locations/delete/(?P<area_id>[0-9]+)/$', delete_location... | tracfm/tracfm | tracfm/simple_locations/urls.py | Python | agpl-3.0 | 429 |
# -*- coding: utf-8 -*-
# Part of Open Architechts Consulting sprl. See LICENSE file for full copyright and licensing details. # noqa
# Copyright 2019 Coop IT Easy SCRLfs
from openerp import api, fields, models, _, SUPERUSER_ID
class StockMove(models.Model):
_inherit = "stock.move"
@api.model
... | houssine78/addons | mrp_brewing/models/stock.py | Python | agpl-3.0 | 3,749 |
# Copyright (C) 2010-2011 Mathijs de Bruin <mathijs@mathijsfietst.nl>
#
# This file is part of django-shopkit.
#
# django-shopkit 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 2, or (at... | dokterbob/django-shopkit | shopkit/currency/__init__.py | Python | agpl-3.0 | 1,300 |
# -*- coding: utf-8 -*-
# © <YEAR(S)> <AUTHOR(S)>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import account_payment
| Gebesa-Dev/Addons-gebesa | account_prepayment_return/models/__init__.py | Python | agpl-3.0 | 151 |
# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
from openerp.tools.translate import _
import logging
from datetime import datetime
from openerp.osv.fields import datetime as datetime_field
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT
from unidecode import unidecode
i... | henrytao-me/openerp.positionq | addons/positionq/pq_salary/pq_thang_luong.py | Python | agpl-3.0 | 1,548 |
# Copyright 2019 Canonical, Ltd.
#
# 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 distribute... | CanonicalLtd/subiquity | subiquitycore/async_helpers.py | Python | agpl-3.0 | 2,411 |
"""
Helpers for the CourseGraph app
"""
from django.core.cache import cache
from django.utils import timezone
class TimeRecordingCacheBase(object):
"""
A base class for caching the current time for some key.
"""
# cache_prefix should be defined in children classes
cache_prefix = None
_cache = ... | itsjeyd/edx-platform | openedx/core/djangoapps/coursegraph/utils.py | Python | agpl-3.0 | 1,464 |
# -*- coding: utf-8 -*-
"""
Video xmodule tests in mongo.
"""
import json
from collections import OrderedDict
from uuid import uuid4
from tempfile import mkdtemp
import shutil
import ddt
from django.conf import settings
from django.core.files import File
from django.core.files.base import ContentFile
from django.test... | gymnasium/edx-platform | lms/djangoapps/courseware/tests/test_video_mongo.py | Python | agpl-3.0 | 91,091 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0025_auto_20160129_1422'),
]
operations = [
migrations.AddField(
model_name='pollquestion',
... | xkmato/ureport | ureport/polls/migrations/0026_auto_20160202_0950.py | Python | agpl-3.0 | 579 |
# Copyright (c) 2011-2013, ImageCat Inc.
#
# 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... | gem/sidd | ui/helper/ms_attr_delegate.py | Python | agpl-3.0 | 3,434 |
import random
import datetime
import pytest
from irc import schedule
def test_delayed_command_order():
"""
delayed commands should be sorted by delay time
"""
null = lambda: None
delays = [random.randint(0, 99) for x in range(5)]
cmds = sorted([
schedule.DelayedCommand.after(delay, null)
for delay in dela... | sim0629/irc | irc/tests/test_schedule.py | Python | lgpl-2.1 | 1,442 |
#***************************************************************************
#* *
#* Copyright (c) 2015 - Victor Titov (DeepSOIC) *
#* <vv.titov@gmail.com> *
#* ... | DeepSOIC/Lattice | latticeShapeString.py | Python | lgpl-2.1 | 12,398 |
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 (a... | jaraco/paramiko | paramiko/common.py | Python | lgpl-2.1 | 8,105 |
import os
import re
import crypt
import random
import readline
from datetime import datetime
from pyparsing import oneOf
import openpix
from openpix import art
from openpix import meta
dividerSegment = "_" * 34
bannerDivider = "\n %s .:|:. %s\n" % (dividerSegment, dividerSegment)
starterHelp = "Type help or '?' fo... | oubiwann/openpix | openpix/util.py | Python | lgpl-2.1 | 6,891 |
# -*- coding: utf-8 -*-
"""
From http://www.wellho.net/mouth/3002_a-list-of-special-method-and-attribute-names-in-python.html
and also http://www.rafekettler.com/magicmethods.html
__new__ True constructor - usually wraps __init__
__init__ Object constructor
__call__
__getattr__ Handling object attributes [example] an... | thebjorn/pymagic | magicmethods.py | Python | lgpl-2.1 | 4,227 |
#!/usr/bin/env python
################################################################################
## PipeCheck: Specifying and Verifying Microarchitectural ##
## Enforcement of Memory Consistency Models ##
## ... | daniellustig/pipecheck | parse_litmus_test_results.py | Python | lgpl-2.1 | 3,270 |
###################################################################################
# Copyright (c) 2005 John Judd
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, inclu... | Ripsnorta/pyui2 | docs/demos/widgetdemo/widgetdemo.py | Python | lgpl-2.1 | 7,972 |