code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from datetime import datetime, timedelta from django.contrib.contenttypes.models import ContentType from django import forms from django.conf import settings from django.template.loader import render_to_string from django.utils.hashcompat import sha_constructor from django.utils.translation import ugettext_lazy as _, u...
thehub/hubplus
apps/plus_groups/forms.py
Python
gpl-3.0
5,946
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ] ...
hzlf/openbroadcast.ch
app/remoteauth/migrations/0001_initial.py
Python
gpl-3.0
3,171
""" py2app/py2exe build script for Electrum Litecoin Usage (Mac OS X): python setup.py py2app Usage (Windows): python setup.py py2exe """ from setuptools import setup import os import re import shutil import sys from lib.util import print_error from lib.version import ELECTRUM_VERSION as version name = ...
amaivsimau/electrum-ltc
setup-release.py
Python
gpl-3.0
2,894
from PySide6.QtCore import QObject, Signal, QThread, QEventLoop from PySide6.QtWidgets import QWidget, QProgressBar, QPushButton, QHBoxLayout class Calculator(QObject): calculationDone = Signal(object) def __init__(self): QObject.__init__(self) self.progress = Progress() def main(self, a...
MrP01/SymbolWorte
Progress.py
Python
gpl-3.0
2,678
# coding=utf-8 """ Lets the user assign groups to all cards, which have no group yet. """ import data cards = [data.database_manager.get_card(card_id) for card_id, in data.database_manager.get_connection().execute( "SELECT card_id FROM card WHERE card_id NOT IN (SELECT card_id FROM card_group_membership)").fetch...
Julian24816/lHelper
assign_group_name.py
Python
gpl-3.0
786
import numpy as np from ..weight import RankingBasedSelection class NESSelection(RankingBasedSelection): """ This selection scheme is Non-increasing transformation as NES weight. See also, [Wierstra et. al., 2014]<http://jmlr.org/papers/v15/wierstra14a.html> """ def transform(self, rank_based_val...
satuma777/evoltier
evoltier/selection/nes_selection.py
Python
gpl-3.0
510
#/usr/bin/python #!*-* coding:utf-8 *-* # Este script es sofware libre. Puede redistribuirlo y/o modificarlo bajo # los terminos de la licencia pública general de GNU, según es publicada # por la free software fundation bien la versión 3 de la misma licencia # o de cualquier versión posterior. (según su elección )....
Diego-debian/Free-infrarossi
free_infrarossi/bin/Atenuacion.py
Python
gpl-3.0
2,477
# -*- coding: utf-8 -*- # # Copyright 2013 Liftoff Software Corporation # # Meta __license__ = "AGPLv3 or Proprietary (see LICENSE.txt)" __author__ = 'Dan McDougall <daniel.mcdougall@liftoffsoftware.com>' __doc__ = """\ .. _authorization.py: Authorization ============== This module contains Gate One's authoriz...
jimmy201602/django-gateone
applications/auth/authorization.py
Python
gpl-3.0
10,452
import sys #FIXME: useless import time from qgis_etri.pysimplesoap.client import SoapClient from qgis_etri.pysimplesoap.simplexml import SimpleXMLElement, TYPE_MAP ETRI_BM_URL = 'http://webservices.decision-deck.org/soap/ElectreTriBMInference-PyXMCDA.py' def format_alternatives(alts): output = "<alternatives>\n" ...
oso/qgis-etri
qgis_etri/xmcda.py
Python
gpl-3.0
12,747
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class GetCorporationsCorporationIdStructuresService(object): ...
minlexx/pyevemon
esi_client/models/get_corporations_corporation_id_structures_service.py
Python
gpl-3.0
4,135
from django.db import models from djangotoolbox.fields import EmbeddedModelField, ListField from django_mongodb_engine.contrib import MongoDBManager import os # Create your models here. # save the created json file name path # only one file for summary should be kept here class UserJSonFile(models.Model): user_id ...
oguzy/ovizart
ovizart/pcap/models.py
Python
gpl-3.0
5,743
import sys class sharedGpsData(object): def __init__(self): self.pos = (0.0,0.0,None,) # float latitude(from equateur),float longitude(from greenwitch),datetime (Universal Time Coordinated) self.alt = (0.0, "M", None,) # float altitude, string scale unit, datetime (Universal Time Coordinated...
djo938/GPSPythonSharingWithPyro
pysharegps/gpsSharedData.py
Python
gpl-3.0
1,548
from clickFuUtils import cfAction class osmViewMap(cfAction): def __init__(self,iface): cfAction.__init__(self,self.name(),iface) return None def name(self): return "View OSM map" def desc(self): return "Goto Location on OpenStreetMap" def createURL(self,lat,long): ...
spatialhast/clickfu
osm.py
Python
gpl-3.0
1,309
import calendar import datetime import functools import hashlib import logging import uuid import user_agents from bitpack import BitStream, BitField, register_data_type from bitpack.utils import pack, unpack from bottle_utils.common import to_bytes from pytz import utc FIELD_SEPARATOR = '$' DESKTOP = 1 PHONE = 2 ...
Outernet-Project/librarian-analytics
librarian_analytics/data.py
Python
gpl-3.0
4,521
# rndpic - an App Engine app to display random pictures from Picasa Web. # Copyright (C) 2011 Patrick Moor <patrick@moor.ws> # # 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...
pmoor/rndpic
json_handler.py
Python
gpl-3.0
1,508
#!/usr/bin/env python2.7 # -*- encoding: utf-8 -*- """ Home-rest ~~~~~~~~~ :copyright: (c) 2013 by Aurélien Chabot <aurelien@chabot.fr> :license: LGPLv3, see COPYING for more details. """ try: from flask import Flask, request, abort, json from subprocess import call, Popen, PIPE from traceback impor...
trishika/home-monitor
rulesRestServer.py
Python
gpl-3.0
3,020
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
GISPPU/GrenadaLandInformation
geonode/context_processors.py
Python
gpl-3.0
2,437
# coding=utf-8 import os import re import main import json import jinja2 from google.appengine.api import users from models import WikiPage, UserPreferences, get_cur_user class Representation(object): def __init__(self, content, content_type): self._content = content self._content_type = content_t...
0hoo/ecogwiki
representations.py
Python
gpl-3.0
4,336
# -*- coding: utf-8 -*- """ This module contains snippets of Python 3 code (invalid Python 2) and tests for whether they can be passed to ``pasteurize`` and immediately run under both Python 2 and Python 3. """ from __future__ import print_function, absolute_import import pprint from subprocess import Popen, PIPE imp...
hughperkins/kgsgo-dataset-preprocessor
thirdparty/future/tests/test_future/test_pasteurize.py
Python
mpl-2.0
7,644
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import division from __future_...
klahnakoski/TestFailures
pyLibrary/queries/containers/tests/test_container.py
Python
mpl-2.0
5,642
import os import requests import logging import json import redo log = logging.getLogger(__name__) PLATFORM_MAP = json.load(open( os.path.join(os.path.dirname(__file__), 'data', 'platform_map.json'))) def _retry_on_http_errors(url, auth, verify, params, errors): for _ in redo.retrier(sleeptime=5, max_sleept...
petemoore/funsize
funsize/balrog.py
Python
mpl-2.0
2,557
# 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 json from urlparse import parse_qs from django.test import override_settings from django.test.client import Requ...
schalkneethling/bedrock
bedrock/firefox/tests/test_views.py
Python
mpl-2.0
40,623
from django.conf.urls import url from literature import views pgsql_qualifier = r"[\w\d_]+" urlpatterns = [ url(r'^$', views.list_references,), url(r'^entry/upload/$', views.upload,), url(r'^entry/(?P<entries_id>\d+)/$', views.show_entry,), url(r'^entry/add$', views.LiteratureView.as_view(),), ur...
tom-heimbrodt/oeplatform
literature/urls.py
Python
agpl-3.0
396
from django.core.management.base import BaseCommand from timeside.server.models import Item class Command(BaseCommand): help = """ Save all Items to populate external id, sha1, mime type, samplerate and audio duration """ def handle(self, *args, **options): for item in Item.objects.all()...
Parisson/TimeSide
timeside/server/management/commands/timeside-save-items.py
Python
agpl-3.0
346
#!/usr/bin/env python # -*- coding: utf-8 -*- # # sorteddict.py # Sorted dictionary (implementation for Python 2.x) # # Copyright (c) 2010 Jan Kaliszewski (zuo) # # The MIT License: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
ddurieux/alignak
alignak/sorteddict.py
Python
agpl-3.0
6,690
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/osis_louvain
assessments/tests/views/test_scores_responsible.py
Python
agpl-3.0
8,565
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010 Acysos S.L. (http://acysos.com) All Rights Reserved. # Ignacio Ibeas <ignacio@acysos.com> # $Id$ # # This program i...
BorgERP/borg-erp-6of3
verticals/garage61/acy_partner_vehicle/invoice.py
Python
agpl-3.0
1,362
import logging from django.conf import settings from django.contrib.auth.models import User from django.core.management import call_command from django.core.management.base import BaseCommand from tallessa.utils import log_get_or_create # usually you should getLogger(__name__) but we are not under the tallessa name...
tallessa/tallessa-backend
tallessa_backend/management/commands/setup.py
Python
agpl-3.0
1,317
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import easy_thumbnails.fields import multiselectfield.db.fields class Migration(migrations.Migration): dependencies = [ ('main', '0035_auto_20141204_1708'), ] operations = [ migratio...
MaximeBiset/care4care
main/migrations/0036_auto_20141204_1818.py
Python
agpl-3.0
1,581
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-07-27 13:08 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0003_auto_20170726_1348'), ] operations...
goyal-sidd/BLT
comments/migrations/0004_auto_20170727_1308.py
Python
agpl-3.0
598
from .indirect1 import TotoInterface class AbstractToto: __implements__ = TotoInterface def helper(self): return 'help'
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/pylint/test/input/indirect2.py
Python
agpl-3.0
145
ADDRESS_COMPONENT_TYPES = ( 'street_address', # indicates a precise street address. 'route', # indicates a named route (such as "US 101"). 'intersection', # indicates a major intersection, usually of two major roads. 'political', # indicates a political entity. # Usually, this type indicates ...
zapcoop/vertex
vertex_api/places/constants.py
Python
agpl-3.0
3,853
import datetime as dt from io import StringIO from locale import LC_CTYPE, getlocale, setlocale from django.contrib.auth.models import Permission, User from django.contrib.gis.geos import Point from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase, override_settings from model...
kickapoo/enhydris
enhydris/tests/admin/test_station.py
Python
agpl-3.0
16,487
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import res_config_settings
onesteinbv/addons-onestein
account_fiscal_year_config/models/__init__.py
Python
agpl-3.0
100
# -*- coding: utf-8 -*- import logging from osv import fields, osv import decimal_precision as dp import ktv_helper _logger = logging.getLogger(__name__) #包厢结账对象 class room_checkout(osv.osv): _name="ktv.room_checkout" _columns = { "room_operate_id" : fields.many2one("ktv.room_operate","room_opera...
chengdh/openerp-ktv
openerp/addons/ktv_sale/room_checkout.py
Python
agpl-3.0
9,855
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models class ParticularReport(models.AbstractModel): _name = 'report.mrp_segment.report_cut_order_production' @api.multi def render_html(self, data=None...
Gebesa-Dev/Addons-gebesa
mrp_segment/report/cut_order_production.py
Python
agpl-3.0
3,883
from django.views.generic.detail import DetailView from django.views.generic.edit import UpdateView, DeleteView from catalog.views.base import GenericListView, GenericCreateView from catalog.models import Astronaut, CrewedMission from catalog.forms import AstronautForm from catalog.filters import AstronautFilter from d...
Hattivat/hypergolic-django
hypergolic/catalog/views/astronaut_views.py
Python
agpl-3.0
1,773
#!/usr/bin/env python """This Class is an Arbiter module for having a webservice throuhg which we can have `sync` and `live polling` functionalities """ import json import os import select import subprocess import sys import tarfile import time from shinken.basemodule import BaseModule from shinken.external_comman...
peeyush-tm/shinken
modules/ws-nocout/module.py
Python
agpl-3.0
15,057
import json def create_package_meta(package_json, meta_file): with open(package_json, 'r') as fp: pkg = json.load(fp) lines = ( f"__name__ = \"infomap\"\n", f"__version__ = \"{pkg.get('version')}\"\n", f"__description__ = \"{pkg.get('description')}\"\n", f"__author...
mapequation/infomap
utils/create-python-package-meta.py
Python
agpl-3.0
1,125
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 BarraDev Consulting (<http://www.barradev.com>). # # This program is free software: you can redistribute it and/or modify # it ...
shingonoide/odoo_ezdoo
addons/http_session_redis/__init__.py
Python
agpl-3.0
1,038
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2018: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) 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 Sof...
Alignak-monitoring-contrib/alignak-app
test/test_all_items.py
Python
agpl-3.0
12,482
#version1 4/14/2014 for data lemma import codecs import sys sys.path.append("D:/uw course/capstone/nltk-3.0a3/")#necessary?? from nltk.stem.lancaster import LancasterStemmer st=LancasterStemmer() from nltk import word_tokenize #file = codecs.open('D:/uw course/capstone/mypersonality/status_b.csv',errors='ignore') file...
evazyin/Capstoneproject
stemcorpus.py
Python
agpl-3.0
1,104
""" Classes for querying the information in a test coverage report. """ from __future__ import unicode_literals from abc import ABCMeta, abstractmethod from collections import namedtuple, defaultdict import re import subprocess import sys import six from diff_cover.git_path import GitPathTool Violation = namedtuple('...
hugovk/diff-cover
diff_cover/violations_reporter.py
Python
agpl-3.0
15,153
# Copyright 2021 ForgeFlow (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class AccountExceptionConfirm(models.TransientModel): _name = "account.exception.confirm" _description = "Account exception wizard" _inherit = ["exce...
OCA/account-invoicing
account_move_exception/wizard/account_exception_confirm.py
Python
agpl-3.0
724
""" Setup file for led-controller author: Luis Garcia Rodriguez 2017 Licence: GPLv3 """ from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) setup( name='led-controller', version='2.0.0', description='A simple interface for con...
PolygonalTree/Led-control
led-control/setup.py
Python
agpl-3.0
909
############################################################################## # # ______ Releasing children from poverty _ # / ____/___ ____ ___ ____ ____ ___________(_)___ ____ # / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ # / /___/ /_/ / / / / / / /_/ / /_/ (__ |__ ) / /_/...
CompassionCH/compassion-modules
res_country_statistics/__manifest__.py
Python
agpl-3.0
2,310
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 So...
ddurieux/alignak
alignak/eventhandler.py
Python
agpl-3.0
6,318
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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...
geotagx/geotagx-pybossa-archive
test/test_authentication.py
Python
agpl-3.0
1,229
import ckan.plugins.toolkit as toolkit import loopback import chat import workspace import pylons DEV = pylons.config.get('nasa_ace_actions.actions_dev') ## setup for original and extra actions original_user_create = toolkit.get_action('user_create') extra_user_create = [workspace] if DEV == "True" else [loopback, c...
gina-alaska/ckanext-nasa_ace
ckanext/nasa_ace_actions/nasa_ace_actions.py
Python
agpl-3.0
5,890
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import dateutil.parser from models import F1ImportError, \ LectPool, \ codigoOrigen_to_O, \ O_to_codigoOrigen IMP_ERRORS = {} def register(cls_error): name = cls_error.__name__ if name in IMP_ERRORS.keys(): return True else: ...
Som-Energia/invoice-janitor
invoicing/f1fixing/import_error/errors.py
Python
agpl-3.0
15,081
# -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and...
baloo/shinken
shinken/modules/livestatus_broker/livestatus_constraints.py
Python
agpl-3.0
1,143
# -*- encoding: utf-8 -*- ############################################################################## # # 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 Licens...
odoo-arg/odoo_l10n_ar
l10n_ar_account_payment/tests/test_account_payment.py
Python
agpl-3.0
15,283
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of CampOS Event, # an Odoo module. # # Copyright (c) 2015 Stein & Gabelgaard ApS # http://www.steingabelgaard.dk # Hans Henrik Gaelgaard ...
sl2017/campos
campos_event/__openerp__.py
Python
agpl-3.0
3,874
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
tiexinliu/odoo_addons
smile_base/models/__init__.py
Python
agpl-3.0
1,166
from datetime import datetime, timedelta from optparse import make_option from django.core.management.base import LabelCommand from localtv.management import site_too_old from localtv.models import Video class Command(LabelCommand): option_list = ( make_option('--since', action='store', dest='since', de...
pculture/mirocommunity
localtv/management/commands/update_popularity.py
Python
agpl-3.0
921
import datetime from django.contrib.gis.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.core import exceptions from django.db.models import Q from django.conf import settings from django_date_extensions.fields import ApproximateDa...
mysociety/polipop
polipop/popit/models/positions.py
Python
agpl-3.0
7,783
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django.utils.datetime_safe import date from django.db.models import Q from open_municipio.people.models import * from open_municipio.votations.admin import VotationsInline from open_municipio.acts.models import Speech from op...
openpolis/open_municipio
open_municipio/people/admin.py
Python
agpl-3.0
10,689
# -*- coding: 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 under...
acsone/knowledge
document_page_approval/__openerp__.py
Python
agpl-3.0
1,742
import random from hashlib import sha256 from django import template register = template.Library() @register.simple_tag def random_identifier(length=None): try: length = int(length) except Exception: length = None if length is None or length <= 0: length = random.randint(16, 48) ...
interDist/pasportaservo
core/templatetags/utils.py
Python
agpl-3.0
1,270
"""Tests for crowdsource views""" # pylint: disable=invalid-name # Django from django.contrib.auth.models import AnonymousUser from django.test import RequestFactory, TestCase from django.urls import reverse # Third Party from nose.tools import assert_false, assert_true, eq_ # MuckRock from muckrock.core.factories ...
MuckRock/muckrock
muckrock/crowdsource/tests/test_views.py
Python
agpl-3.0
9,147
import unittest class JoystickTypeTest(unittest.TestCase): def todo_test_Joystick(self): # __doc__ (as of 2008-08-02) for pygame.joystick.Joystick: # pygame.joystick.Joystick(id): return Joystick # create a new Joystick object # # Create a new joystick to access a ...
mark-me/Pi-Jukebox
venv/Lib/site-packages/pygame/tests/joystick_test.py
Python
agpl-3.0
3,254
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from djang...
akx/shoop
shoop/discount_pricing/admin_form_part.py
Python
agpl-3.0
2,820
# -*- coding: utf-8 -*- # Copyright 2017 PESOL (http://pesol.es) # Luis Adan Jimenez Hernandez (luis.jimenez@pesol.es) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Sale Order Margin Percent", "summary": "Show Percent in sale order", "version": "10.0.1.0.0", "...
kittiu/sale-workflow
sale_order_margin_percent/__manifest__.py
Python
agpl-3.0
647
# Copyright (c) 2015 "Hugo Herter http://hugoherter.com" # # This file is part of Billabong. # # Intercom 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 o...
hoh/Billabong
billabong/storage/folder.py
Python
agpl-3.0
2,678
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-05-04 09:42 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("services", "0054_rename_last_modified_time"), ] operations = [ migrations.RenameFi...
City-of-Helsinki/smbackend
services/migrations/0055_rename_unit_description_fields.py
Python
agpl-3.0
1,495
from django.utils.translation import ugettext_lazy as _ CURRENCIES = ( ('EUR', _('Euro')), ('GBP', _('British pound')), ('USD', _('United States dollar')), ('ZAR', _('South African rand')), ('NOR', _('Norwegian krone')), ('DKK', _('Danish krone')), ('SEK', _('Swedish krone')), ('CHF', _...
HelloLily/hellolily
lily/utils/currencies.py
Python
agpl-3.0
340
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015-2019 OpenCraft <contact@opencraft.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 # published by the Fre...
open-craft/opencraft
instance/serializers/openedx_appserver.py
Python
agpl-3.0
3,375
# # OpenUpgrade documentation build configuration file, created by # sphinx-quickstart on Wed Nov 30 10:38:00 2011. # # This file is execfile()d with the current directory set to its containing # dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module import...
OCA/OpenUpgrade
docsource/conf.py
Python
agpl-3.0
5,996
# -*- coding: utf-8 -*- """ flaskbb.utils.decorators ~~~~~~~~~~~~~~~~~~~~~~~~ A place for our decorators. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from functools import wraps from flask import abort from flask_login import current_user from opens...
USStateDept/FPA_Core
openspending/forum/utils/decorators.py
Python
agpl-3.0
1,481
from django.conf import settings from datetime import timedelta # Endpoint settings OAI_BASE_URL="http" if settings.HTTPS == "on": OAI_BASE_URL="https" OAI_BASE_URL=OAI_BASE_URL+"://"+settings.SITE_NAME REPOSITORY_NAME = settings.PLATFORM_NAME ADMIN_EMAIL = settings.TECH_SUPPORT_EMAIL OAI_ENDPOINT_NAME = 'oai' R...
dcosentino/edx-platform
lms/djangoapps/oai/settings.py
Python
agpl-3.0
1,073
from odoo import models, fields, api, _ from odoo.exceptions import ValidationError from datetime import datetime class StockScheduleWizard(models.TransientModel): _name = "stock.schedule.wizard" scheduled_date = fields.Datetime('Scheduled shipping date') @api.multi def action_button_schedule(self)...
Comunitea/CMNT_004_15
project-addons/scheduled_shipment/wizard/schedule_wizard.py
Python
agpl-3.0
1,376
#!/usr/bin/python import smtpd import asyncore import email import re from pymongo import MongoClient from bson.dbref import DBRef from datetime import datetime from pytz import timezone import pytz from sendfail import sendfail #this is the daemon part of exceptional emails #it recieves emails and if they are to a va...
AlanBell/ExceptionalEmails
mongoreceiver.py
Python
agpl-3.0
7,066
# Copyright 2018 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import tools from odoo import api, fields, models class ProjectTaskPlan(models.Model): _name = 'project.task.plan' _description = 'Project Task Plan' _auto = False _rec_name = 'pr...
avanzosc/project-addons
project_task_milestone/report/project_task_plan.py
Python
agpl-3.0
1,073
# -*- coding: utf-8 -*- from __future__ import absolute_import from ast import NodeTransformer from itertools import chain from six import iteritems from warnings import warn from cobra.core import Gene, Metabolite, Reaction from cobra.core.gene import ast2str from cobra.manipulation.delete import get_compiled_gene...
zakandrewking/cobrapy
cobra/manipulation/modify.py
Python
lgpl-2.1
9,924
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ from __future__ import with_statement import log...
olavurmortensen/gensim
gensim/test/test_doc2vec.py
Python
lgpl-2.1
20,905
#!/usr/bin/python # clang has an awkward tree configuration so we have to implement # a custom builder to override the default downloader import pkgbuild class CustomBuilder( pkgbuild.Builder ): def __init__( self, buildmgr, pkgname, version ): pkgbuild.Builder.__init__( self, buildmgr, pkgname, version ...
HFTrader/BleedingEdge
config/clang-svn.py
Python
lgpl-2.1
1,115
#!/usr/bin/python # # Project Kimchi # # Copyright IBM, Corp. 2013 # # 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 ver...
ssdxiao/kimchi
src/kimchi/vnc.py
Python
lgpl-2.1
1,961
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/vecgeom/package.py
Python
lgpl-2.1
1,985
from django import forms from django.contrib.auth.models import User from .models import Video CHOICES = [('defaultKey', 'default')] class VideosForm(forms.ModelForm): """ The form used to create a video """ class Meta(object): """ The fields used when creating the video form ...
ProtonHackers/Incredible-Filter
web/website/forms.py
Python
lgpl-2.1
695
import openpathsampling.pathmover_inout import svgwrite as svg from svgwrite.container import Group import openpathsampling as paths import os import ujson from collections import namedtuple, OrderedDict, Counter # TODO: Move TreeRenderer and Builder to a different file ??? class TreeRenderer(svg.Drawing): """ ...
jhprinz/openpathsampling
openpathsampling/visualize.py
Python
lgpl-2.1
92,760
# # (C) Copyright 2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful...
Jajcus/pyxmpp2
pyxmpp2/transport.py
Python
lgpl-2.1
33,073
from __future__ import print_function import unittest import sys import os import re import tempfile import shutil import glob import warnings warnings.simplefilter("default") # Only use coverage if it's new enough and is requested try: import coverage if not hasattr(coverage.coverage, 'combine'): cov...
salilab/saliweb
test/backend/run-all-tests.py
Python
lgpl-2.1
3,023
from django import template from django.forms.forms import BoundField register = template.Library() @register.filter(name="divide") def divide(v1, v2): try: return float(v1) / float(v2) except (ValueError, ZeroDivisionError): return None
xenu256/QProb
aggregator/templatetags/aggregator_filters.py
Python
lgpl-3.0
265
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly 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...
tylercal/dragonfly
dragonfly/actions/action_pause.py
Python
lgpl-3.0
1,839
#*************************************************************************** #* * #* Copyright (c) 2015 microelly <microelly2@freecadbuch.de> * #* * #* Th...
adam-urbanczyk/freecad-pluginloader
InitGui.py
Python
lgpl-3.0
13,949
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "phone.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
pinballwizard/phone
manage.py
Python
lgpl-3.0
248
""" Module that delete file of system. """ import os import dbm import os.path def rm(filename): """ Function for deleting a file :param filename: path of file :return: none """ x = 6 if os.path.isfile(filename): os.remove(filename) elif x < 5: print("hola") def print...
jneilaglez/hello-world
mymodule.py
Python
lgpl-3.0
373
from RMPY.creators import curve as CurveCreator from RMPY.creators import spaceLocator from RMPY.creators.skinCluster import SkinCluster from RMPY.creators import group as groupCreator from RMPY.creators import joint as jointCreator from RMPY.creators import connect as connectCreator from RMPY.creators import controls ...
rendermotion/RMPY
creators/creators.py
Python
lgpl-3.0
1,110
# -*- encoding: utf-8 -*- # pilas engine - a video game framework. # # copyright 2010 - hugo ruscitti # license: lgplv3 (see http://www.gnu.org/licenses/lgpl.html) # # website - http://www.pilas-engine.com.ar ''' pilas.pilasverion ================= Definición de la version actual de pilas y funciones para compararla...
irvingprog/pilas
pilas/pilasversion.py
Python
lgpl-3.0
1,208
# encoding:utf-8 import redis from quantbube.conf import settings class RedisConnectionFactory(object): """ store connection pool redis connection factory REDIS_ENGINE = { "default": { "url": "redis://127.0.0.1:6379?db=1", "options": { "pool_options":{}...
nooperpudd/quantbube
quantbube/timeseries/storage/redis_connection.py
Python
lgpl-3.0
1,742
# this example uses a csv file with the datas for the classification # we retreive the sample from the file sample.csv path = os.path.abspath(os.path.dirname(__file__)) dataInOut = Sample().ImportFromCSVFile(path + "/sample.csv") # we create dataIn and dataOut dataIn = Sample(861, 2) dataOut = Sample(861, 1) # we bui...
openturns/otsvm
python/test/t_example2.py
Python
lgpl-3.0
1,095
# Game Jolt Trophy for Python # by viniciusepiplon - vncastanheira@gmail.com # version 1.1 # Python 3.x stable # Python 2.7 unstable # This is a general Python module for manipulating user data and # trophies (achievments) on GameJolt. # Website: www.gamejolt.com # This program is free software: you can redistribute ...
yaelatletl/gj_e3d_api
py_gjapi.py
Python
lgpl-3.0
13,032
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "waiter.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
dianamor8/waiter
manage.py
Python
lgpl-3.0
249
# -*- coding: utf-8 -*- __author__ = 'itmard' # flask imports from flask import Blueprint main = Blueprint('main', __name__) from . import views
itmard/Simple-blog-with-flask
project/apps/main/__init__.py
Python
lgpl-3.0
149
# -*- coding: utf-8 -*- # from openerp import api, fields, models, _ from openerp.osv import osv, fields from openerp.addons.website.models.website import slug from openerp import SUPERUSER_ID import requests class FbBlogPost(osv.Model): _inherit = 'blog.post' _columns = { 'fb_content': fields.html...
lem8r/website-themes
facebook_instant_article/models/website_blog.py
Python
lgpl-3.0
659
import pytest from .addons import using_networkx from .utils import * import math import numpy as np import qcelemental as qcel import psi4 from psi4.driver import qcdb pytestmark = pytest.mark.quick def hide_test_xtpl_fn_fn_error(): psi4.geometry('He') with pytest.raises(psi4.UpgradeHelper) as e: ...
CDSherrill/psi4
tests/pytests/test_misc.py
Python
lgpl-3.0
3,413
# 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 KeyLogger(Signature): name = "infostealer_keylog" description = "Sniffs k...
lixiangning888/whole_project
modules/signatures_orginal_20151110/infostealer_keylog.py
Python
lgpl-3.0
1,168
import datetime from PyQt5.QtWidgets import QTreeWidgetItem from TriblerGUI.utilities import prec_div class OrderWidgetItem(QTreeWidgetItem): """ This class represents a widget that displays an order. """ def __init__(self, parent, order, asset1_prec, asset2_prec): QTreeWidgetItem.__init__(se...
Captain-Coder/tribler
TriblerGUI/widgets/orderwidgetitem.py
Python
lgpl-3.0
1,786
#!/usr/bin/env python import random '''\ The computer will pick a number between 1 and 100. (You can choose any high number you want.) The purpose of the game is to guess the number the computer picked in as few guesses as possible. source:http://openbookproject.net/pybiblio/practice/\ ''' high_or_low = {True: "Too ...
CompSoc-NUIG/python_tutorials_2013
guess.py
Python
unlicense
774
" seen.py: written by sklnd in about two beers July 2009" import time from util import hook, timesince def db_init(db): "check to see that our db has the the seen table and return a connection." db.execute("create table if not exists seen(name, time, quote, chan, " "primary key(name, chan))")...
andyeff/skybot
plugins/seen.py
Python
unlicense
1,718