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
class ColorGenerator: def __init__(self): self.lUsedColors = [] def __equalColors(self, c1, c2): return c1[0] == c2[0] and c1[1] == c2[1] and c1[2] == c2[2] def __equalColorInList(self, c1, cl2): return any(self.__equalColors(c1, c2) for c2 in cl2) def __toHex(self, n): ...
DIRACGrid/DIRAC
src/DIRAC/FrameworkSystem/private/monitoring/ColorGenerator.py
Python
gpl-3.0
2,117
# wikirandom.py: Functions for downloading random articles from Wikipedia # # Copyright (C) 2010 Matthew D. Hoffman # # 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 Lic...
ygenc/onlineLDA
wikirandom.py
Python
gpl-3.0
5,021
# coding: utf-8 from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from django.conf import settings from zds.utils.templatetags.emarkdown import emarkdown from .models import Post, Topic class LastPostsFeedRSS(Feed): title = u'Derniers messages sur {}'.format(se...
Florianboux/zds-site
zds/forum/feeds.py
Python
gpl-3.0
4,497
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Description of the CEA FPA Campaign. :History: Created on Wed Oct 02 17:26:00 2019 :author: Ruyman Azzollini """ # IMPORT STUFF from collections import OrderedDict from pdb import set_trace as stop import numpy as np import copy #from vison.pipe import lib as pil...
ruymanengithub/vison
vison/campaign/CEAFPAcampaign.py
Python
gpl-3.0
4,667
def pull(self, command): import subprocess output = subprocess.Popen(["git", "pull"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) for line in output.stdout: self.conman.gen_send("***Git output: %s" % line) for line in output.stderr: self.conman.gen_send("***Git error: %s" % line) se...
vsquare95/JiyuuBot
modules/pull.py
Python
gpl-3.0
353
# -*- coding: utf-8 -*- # Part of bubble. See LICENSE file for full copyright and licensing details. import click from ..cli import STAGES from ..commands.cmd_pull import cli as pull from ..commands.cmd_transform import cli as transform from ..commands.cmd_push import cli as push @click.command('pipe', short_help=...
realopenit/bubble
bubble/commands/cmd_pipe.py
Python
gpl-3.0
1,350
# USAGE # python ball_tracking.py --video ball_tracking_example.mp4 # python ball_tracking.py # import the necessary packages from collections import deque import numpy as np import argparse import imutils import cv2 # construct the argument parse and parse the arguments ap = argparse.ArgumentParser() ap.add_argument...
GaugeAnomaly/Robotex-Grupp-9
src/ROSPackage/src/tester.py
Python
gpl-3.0
3,204
from bs4 import BeautifulSoup from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode from couchpotato.core.helpers.variable import tryInt, cleanHost from couchpotato.core.logger import CPLog from couchpotato.core.providers.torrent.base import TorrentMagnetProvider from couchpotato.environment import Env ...
cloakedcode/CouchPotatoServer
couchpotato/core/providers/torrent/thepiratebay/main.py
Python
gpl-3.0
5,523
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import difflib import logging from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db.models import Q from django.http import Http404 from ...
jandebleser/django-wiki
src/wiki/views/article.py
Python
gpl-3.0
34,566
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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 ...
rosudrag/eve-wspace
evewspace/account/models.py
Python
gpl-3.0
4,390
# Not bloop. # There are plenty of numbers greater than N, I can even think of # three off-the-cuff; N+7, N+37, N+101! # Don't know how long we might have to wait until we get a good one. . . # Tortoise property: # An even number, 2N, has the Tortoise property if it is the # difference of two odd primes. # Check i...
thegaps/GEB
floop/bloop/tortoise.py
Python
gpl-3.0
544
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
pyfa-org/Pyfa
gui/auxWindow.py
Python
gpl-3.0
2,871
class Const(object): MAX_UNSUCCESSFUL_READS = 20; # maximum reads before zone is going to suspend state MAX_UNSUCCESSFUL_WRITES = 20; # maximum writes before zone is going to suspend state BIND_ZONE_FILE_PATHS = "/var/named" BIND_USER = "named" BIND_GROUP = "named"
bastiak/dnssyncd
dnssyncdlib/constants.py
Python
gpl-3.0
289
# # Code per http://blog.powerupcloud.com/2016/03/26/automating-rds-snapshots-with-aws-lambda/ # import boto3 import botocore import datetime import re SOURCE_REGION = 'us-east-1' TARGET_REGION = 'us-west-1' iam = boto3.client('iam') instances = ['<instance name>'] # convert to command line argument print('Loading f...
jdasinger/random
copy_rds.py
Python
gpl-3.0
1,743
import logging import anyjson as json from django.conf import settings as django_settings from django.http import HttpResponse, HttpResponseBadRequest from redis_utils import redis_client, RedisError log = logging.getLogger(__name__) def get_builds(request): ''' url handler that returns all known build uids...
peterbe/bramble
bramble/base/api.py
Python
mpl-2.0
5,364
# 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/. """This is the base of the crashstorage system - a unified interfaces for saving, fetching and iterating over raw crashe...
willkg/socorro-collector
collector/external/crashstorage_base.py
Python
mpl-2.0
51,948
from django.core.urlresolvers import reverse from mappings.tests import MappingBaseTest from mappings.validation_messages import OPENMRS_SINGLE_MAPPING_BETWEEN_TWO_CONCEPTS from oclapi.models import CUSTOM_VALIDATION_SCHEMA_OPENMRS from test_helper.base import create_user, create_source, create_concept class OpenMRS...
ayseyo/oclapi
django-nonrel/ocl/integration_tests/tests/openmrs_mapping_validation.py
Python
mpl-2.0
1,429
# -*- coding: 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/. import os from django.core.cache import caches from django.http import HttpResponse from django....
jgmize/bedrock
bedrock/firefox/tests/test_base.py
Python
mpl-2.0
19,618
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-13 12:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.contrib.taggit import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ...
akatsoulas/coss
coss/opensource_clubs/migrations/0014_auto_20170913_1253.py
Python
mpl-2.0
1,874
# 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/. from socorro.external import MissingArgumentError from socorro.external.postgresql.base import PostgreSQLBase from socor...
bsmedberg/socorro
socorro/external/postgresql/error.py
Python
mpl-2.0
1,846
from marshmallow import fields from ._resource_io import ResourceSchema class ImmutableTypeResourceSchema(ResourceSchema): label = fields.String() doc = fields.String()
artPlusPlus/elemental-backend
elemental_backend/serialization/_immutable_type_resource_io.py
Python
mpl-2.0
180
#!/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
test/test_service_description_inheritance.py
Python
agpl-3.0
2,454
# -*- 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...
CubicERP/odoo
addons/stock_landed_costs/stock_landed_costs.py
Python
agpl-3.0
20,934
#!/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
test/test_bad_timeperiods.py
Python
agpl-3.0
2,376
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright SHS-AV s.r.l. (http://www.shs-av.com/) # # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # # All Rights Reserved # """@mainpage Massive operations on Zeroincombenze(R) / Odoo databases ========================================================...
antoniov/tools
clodoo/clodoo.py
Python
agpl-3.0
250,953
# tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
AttorneyOnlineVidya/tsuserver3
server/ban_manager.py
Python
agpl-3.0
2,392
""" streamswitch.wsgiapp.models ~~~~~~~~~~~~~~~~~~~~~~~ This module implements the domain models for the WSGI application, based on the SQLAlchemy's ORM :copyright: (c) 2015 by OpenSight (www.opensight.cn). :license: AGPLv3, see LICENSE for more details. """ from __future__ import unicode_literals, division from sql...
OpenSight/StreamSwitch
controller/python/streamswitch/wsgiapp/models.py
Python
agpl-3.0
6,163
# Copyright 2017-2020 Akretion France (http://www.akretion.com/) # @author: Alexis de Lattre <alexis.delattre@akretion.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Agreement Account", "summary": "Agreement on invoices", "version": "14.0.1.0.0", "category": "Contract",...
OCA/contract
agreement_account/__manifest__.py
Python
agpl-3.0
776
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-09 14:11 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
hrpt-se/hrpt
apps/accounts/migrations/0002_usedactivationkeys.py
Python
agpl-3.0
922
import json from functools import reduce from typing import Optional from asyncpg import Connection from qllr.common import DATETIME_FORMAT, clean_name, convert_timestamp_to_tuple from qllr.db import cache from qllr.exceptions import MatchNotFound, PlayerNotFound from qllr.settings import MOVING_AVG_COUNT async def...
em92/quakelive-local-ratings
qllr/blueprints/player/methods.py
Python
agpl-3.0
6,371
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
MTG/essentia
test/src/unittests/stats/test_minmax.py
Python
agpl-3.0
2,805
# -*- coding: utf-8 -*- """Tests for course home page date summary blocks.""" from datetime import datetime, timedelta import crum import ddt import waffle from django.contrib.messages.middleware import MessageMiddleware from django.test import RequestFactory from django.urls import reverse from freezegun import fre...
msegado/edx-platform
lms/djangoapps/courseware/tests/test_date_summary.py
Python
agpl-3.0
54,445
""" Tests for Blocks api.py """ from itertools import product from mock import patch import ddt from django.test.client import RequestFactory from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache from openedx.core.djangoapps.content.block_structure.config import STORAGE_BACKING_FOR_...
jolyonb/edx-platform
lms/djangoapps/course_api/blocks/tests/test_api.py
Python
agpl-3.0
9,363
from kivy.uix.boxlayout import BoxLayout from kivy.uix.floatlayout import FloatLayout from kivy.uix.button import Button from kivy.uix.togglebutton import ToggleButton from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.logger import Logger from kivy.properties import ObjectProperty, S...
mcecchi/SuperOcto
RoboLCD/RoboLCD/lcd/z_offset_wizard.py
Python
agpl-3.0
12,560
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-11-09 23:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('astrobin_apps_platesolving', '0001_initial'), ] operations = [ migrations.AlterField( model_name='solu...
astrobin/astrobin
astrobin_apps_platesolving/migrations/0002_auto_20171109_2307.py
Python
agpl-3.0
468
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-11-12 21:23 # Django import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('foia', '0062_auto_20181112_1623'), ('task', '0032_auto_20180713_1455'), ] ...
MuckRock/muckrock
muckrock/task/migrations/0033_auto_20181112_1623.py
Python
agpl-3.0
3,427
#!/usr/bin/env python2 from __future__ import division import itertools import math import sys import numpy import scipy.stats import cligraph import utils """ TODO: - Auto-detect number of bins - Fixed width or variable width bins - Stacked bins, overlapped bins or bins next to each other - Change which side of bi...
bsmithers/CLIgraphs
histogram.py
Python
agpl-3.0
8,515
# -*- coding: utf-8 -*- # This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2011 Krzysztof Tarnowski (krzysztof.tarnowski@ymail.com) # Copyright (C) 2009, 2010, 2011 OpenHatch, Inc. # Copyright (C) 2011 Jairo E. Lopez # # This program is free software: you can redistribute it and/or ...
jledbetter/openhatch
mysite/base/views.py
Python
agpl-3.0
12,545
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License GPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo.tests.common import TransactionCase class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestMedicalPrescriptionOrderLine, self).setUp() self.pat...
laslabs/vertical-medical
medical_prescription_disease_state/tests/test_medical_prescription_order_line.py
Python
agpl-3.0
2,956
"""Queue item for deep analysis by irwin""" from default_imports import * from modules.queue.Origin import Origin from modules.game.Game import PlayerID from datetime import datetime import pymongo from pymongo.collection import Collection IrwinQueue = NamedTuple('IrwinQueue', [ ('id', PlayerID), ('o...
clarkerubber/irwin
modules/queue/IrwinQueue.py
Python
agpl-3.0
1,421
""" """ import os import pandas from matplotlib import pyplot from matplotlib import dates as mdates import matplotlib.ticker as mticker PROCESSED_DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), os.pardir, "processed_data" ) def insert_nans(station_df): """ Only when NaNs...
1kastner/analyse_weather_data
plot_weather_data/__init__.py
Python
agpl-3.0
1,869
#!/usr/bin/env python #coding:utf-8 # Author: Beining --<i@cnbeining.com> # Purpose: Session helper for onedrivecmd # Created: 09/24/2016 import onedrivesdk import logging import json from time import time try: from static import * from helper_file import * except ImportError: from .static import * f...
cnbeining/onedrivecmd
onedrivecmd/utils/session.py
Python
agpl-3.0
8,409
from django.conf.urls import patterns, url from manoseimas.lobbyists import views urlpatterns = patterns( '', url(r'^lobbyists/?$', views.lobbyists_json, name='lobbyists_json'), url(r'^law_projects/(?P<lobbyist_slug>[^/]+)/?$', views.law_projects_json, name='law_projects_json'), )
ManoSeimas/manoseimas.lt
manoseimas/lobbyists/json_urls.py
Python
agpl-3.0
304
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('letter_to_editor', '0004_company_newspaper_webcache_wikipediapage'), ] operations = [ migrations.AddField( model_name='newspaper', name='sister_news...
h4ck3rm1k3/letter-to-editor
newspaper/letter_to_editor/migrations/0005_newspaper_sister_newspapers.py
Python
agpl-3.0
478
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-07-03 08:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('organization_projects', '0087_auto_20190619_2052'), ] operations = [ migrations.Alt...
Ircam-Web/mezzanine-organization
organization/projects/migrations/0088_auto_20190703_1035.py
Python
agpl-3.0
1,401
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2014 Pexego Sistemas Informáticos All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lice...
Pexego/PXGO_00049_2013_PCG
project-addons/maintenance/maintenance_type.py
Python
agpl-3.0
6,303
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
tic-ull/defensatfc-proto
tfc_webapps/packages/suds-timestamp/tests/saxenc.py
Python
agpl-3.0
1,564
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { "name": "Switzerland Account Tags", "category": "Localisation", "summary": "", "version": "14.0.1.0.0", "author": "Camptocamp SA, Odoo Community Association (OCA)", "website": "https://github.com/OCA...
OCA/l10n-switzerland
l10n_ch_account_tags/__manifest__.py
Python
agpl-3.0
561
#!/usr/bin/python import os import re import sys import time import boto import hashlib # md5 function def md5_for_file(filepath, block_size=2**20): f = open(filepath, 'rb') md5 = hashlib.md5() while True: data = f.read(block_size) if not data: break md5.update(data)...
jjshoe/s3-cloudfront-upload-and-invalidate
s3-cloudfront-upload-and-invalidate.py
Python
agpl-3.0
4,503
import subprocess import zookeeper from twisted.internet.defer import inlineCallbacks, succeed, returnValue from twisted.web import client from juju.errors import JujuError from juju.lib.testing import TestCase from juju.unit.address import ( EC2UnitAddress, LocalUnitAddress, OrchestraUnitAddress, DummyUnitAddres...
mcclurmc/juju
juju/unit/tests/test_address.py
Python
agpl-3.0
3,698
from django.conf.urls.defaults import patterns, include, url from retweeter import views from retweeter import login from retweeter import tweetmanager from retweeter import users from django.contrib.auth.views import logout # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin...
vaidik/ReTweeter
retweeter/urls.py
Python
agpl-3.0
1,538
from multiprocessing.dummy import Pool import sys from threading import Thread import time from PyQt5.QtCore import QObject, pyqtSignal import serial from serial.tools import list_ports from .Port import Port from .PrinterConnection import PrinterConnection class PrinterConnectionManager(QObject, Thread): INTER...
Kiddo3D/SmartControl
smartcontrol/printer/PrinterConnectionManager.py
Python
agpl-3.0
2,779
# -*- coding: utf-8 -*- # Copyright 2013-2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl from openerp import fields, models class L10nEsAeatMapTaxLine(models.Model): _name = 'l10n.es.aeat.map.tax.line' _order = "field_number asc, id asc" fiel...
RamonGuiuGou/l10n-spain
l10n_es_aeat/models/l10n_es_aeat_map_tax_line.py
Python
agpl-3.0
1,386
# Generated by Django 2.2.3 on 2019-07-26 13:03 from django.db import migrations class Migration(migrations.Migration): dependencies = [("payments", "0013_auto_20190724_1628")] operations = [ migrations.AlterModelOptions( name="payment", options={"get_latest_by": "created", ...
lafranceinsoumise/api-django
agir/payments/migrations/0014_auto_20190726_1503.py
Python
agpl-3.0
364
#! /usr/bin/env python # -*- encoding: utf-8 -*- # Standard Lib import io # Extra Libs from flask import request, render_template, flash, session, abort, send_file from flask.ext.babel import gettext as _ # Custom Tools from ..application import app from ..tools.web import redirect_url_for from ..tools.erp import...
grap/odoo-eshop
odoo_eshop/eshop_app/controllers/controller_account.py
Python
agpl-3.0
11,619
# Copyright 2011-2012 Nicolas Bessi (Camptocamp) # Copyright 2012-2015 Yannick Vaucher (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api class AccountInvoice(models.Model): _inherit = 'account.invoice' transaction_id = fields.Char(string='Transa...
OCA/bank-statement-reconcile
base_transaction_id/models/invoice.py
Python
agpl-3.0
1,321
# -*- coding: utf-8 -*- ############################################################################## # # Compute taxes on sale order line # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
OpusVL/odoo-sale-extras
sale_order_line_compute_taxes/models/sale.py
Python
agpl-3.0
2,022
# -*- coding: utf-8 -*- # © 2015 Yannick Vaucher (Camptocamp SA) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests import common from openerp import exceptions class TestCreateInvoice(common.TransactionCase): def test_emit_invoice_with_bvr_reference(self): self.inv_v...
BT-aestebanez/l10n-switzerland
l10n_ch_base_bank/tests/test_create_invoice.py
Python
agpl-3.0
4,816
""" Contains methods for accessing weekly course highlights. Weekly highlights is a schedule experience built on the Schedules app. """ from __future__ import absolute_import import logging from courseware.model_data import FieldDataCache from courseware.module_render import get_module_for_descriptor from openedx.cor...
jolyonb/edx-platform
openedx/core/djangoapps/schedules/content_highlights.py
Python
agpl-3.0
4,066
#!/usr/bin/env python3 # -*- coding : utf-8 -*- from collections import Iterable from collections import Iterator isinstance([], Iterable) isinstance({}, Iterable) isinstance((), Iterable) isinstance('abc', Iterable) isinstance((x for x in range(10)), Iterable) isinstance(100, Iterable) # Iterable but not Iterator i...
kmahyyg/learn_py3
adv_feature/adv_feature_iterable.py
Python
agpl-3.0
894
# Generated by Django 1.11.15 on 2018-08-08 18:28 import django.db.models.deletion import django_extensions.db.fields import stdimage.models from course_discovery.apps.course_metadata.utils import UploadToFieldNamePath from django.db import migrations, models class Migration(migrations.Migration): dependencies...
edx/course-discovery
course_discovery/apps/course_metadata/migrations/0097_degree_lead_capture_image.py
Python
agpl-3.0
772
from django.core.urlresolvers import reverse from django.test import Client from amcat.models import ArticleSet, Sentence, Article, Role from amcat.tools import amcattest, sbd import navigator.forms from navigator.views.article_views import ArticleSplitView, handle_split, get_articles, ArticleDetailsView class TestSp...
amcat/amcat
navigator/views/tests/test_article_views.py
Python
agpl-3.0
10,397
# -*- 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 """Superdesk...
petrjasek/superdesk-server
superdesk/__init__.py
Python
agpl-3.0
3,012
from haystack import indexes from pybb.models import Post class PostIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) def get_model(self): return Post
fnp/edumed
forum/search_indexes.py
Python
agpl-3.0
226
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-17 09:46 from __future__ import unicode_literals from django.db import migrations, models import documents.models class Migration(migrations.Migration): dependencies = [ ('documents', '0002_auto_20160417_0749'), ] operations = [ ...
C4ptainCrunch/info-f-309
webview/documents/migrations/0003_auto_20160417_0946.py
Python
agpl-3.0
541
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
SKIRT/PTS
do/modeling/plot_with_reference_sed.py
Python
agpl-3.0
2,365
import datetime import click from flask import Blueprint from prettytable import PrettyTable from sqlalchemy.orm import joinedload from APITaxi_models2 import ADS, Departement, Driver, Hail, Taxi, User, VehicleDescription blueprint = Blueprint('commands_report', __name__, cli_group=None) TODAY = datetime.datetime...
openmaraude/APITaxi
APITaxi2/commands/report.py
Python
agpl-3.0
4,872
from comics.comics import get_comic_module SCHEDULE_DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] def get_comic_schedule(comic): module = get_comic_module(comic.slug) schedule = module.Crawler(comic).schedule if not schedule: return [] return [SCHEDULE_DAYS.index(day) for day in schedule...
jodal/comics
comics/aggregator/utils.py
Python
agpl-3.0
333
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
dayatz/taiga-back
taiga/projects/attachments/__init__.py
Python
agpl-3.0
1,012
# -*- 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...
OSSESAC/odoopubarquiluz
addons/document_page/wizard/document_page_create_menu.py
Python
agpl-3.0
3,491
# Yith Library Server is a password storage server. # Copyright (C) 2013 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publ...
Yaco-Sistemas/yith-library-server
yithlibraryserver/scripts/backups.py
Python
agpl-3.0
3,033
from flask_script import Manager, prompt_bool from legitag import app, models import feedparser from mongoengine import connect, DoesNotExist from time import sleep import re manager = Manager(app) @manager.command def resetdatabase(): "Delete all data, reset everything" if prompt_bool("Are you absolutely cer...
Doteveryone/LegislationTagger
manage.py
Python
agpl-3.0
3,236
# # Copyright (c) 2013-2014, Scott J Maddox # # This file is part of SimplePL. # # SimplePL 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 opt...
scott-maddox/simplepl
src/simplepl/instruments/drivers/thorlabs_fw102c_sim.py
Python
agpl-3.0
3,169
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('users', '0001_initial'), ) def forwards(self, orm): # Adding field 'RawDocument.user' db.add_column...
FinalsClub/karmaworld
karmaworld/apps/document_upload/migrations/0002_auto__add_field_rawdocument_user.py
Python
agpl-3.0
6,785
from __future__ import unicode_literals from django.apps import AppConfig class FbbootConfig(AppConfig): name = 'fbBoot'
BrasilLivre/bot
fbBot/apps.py
Python
agpl-3.0
128
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cstr, flt, cint from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webnotes import msgpr...
gangadhar-kadam/sapphire_app
stock/doctype/purchase_receipt/purchase_receipt.py
Python
agpl-3.0
13,048
from distutils.core import setup setup( name = 'daymetpy', packages = ['daymetpy'], version = '1.0.0', license = 'AGPL-3', description = 'A library for accessing Daymet surface weather data', author = 'Koen Hufkens', author_email = 'koen.hufkens@gmail.com', url = 'https://github.com/khufkens/daymetpy', ...
khufkens/daymetpy
setup.py
Python
agpl-3.0
955
# -*- coding: utf-8 -*- from numpy import logical_not as not_, logical_or as or_ from numpy.core.defchararray import startswith from openfisca_france.model.base import * # noqa analysis:ignore class coloc(Variable): column = BoolCol entity_class = Individus label = u"Vie en colocation" class lo...
benjello/openfisca-france
openfisca_france/model/caracteristiques_socio_demographiques/logement.py
Python
agpl-3.0
4,749
#!/usr/bin/env python # HelloFS Copyright (C) 2006 Andrew Straw <strawman@astraw.com> # # DFXMLFS Copyright (C) 2015 Prometheus Computing, LLC. # Implemented by Alex Nelson <a.nelson@prometheuscomputing.com> # # This program can be distributed under the terms of the GNU LGPL v2.1. # See the file CO...
ajnelson/dfxmlfs
dfxmlfs.py
Python
lgpl-2.1
10,784
#!/usr/bin/env python # Copyright (C) 2016 g10 Code GmbH # # This file is part of GPGME. # # GPGME 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 2 of the License, or # (at your option) any la...
gpg/gpgme
lang/python/tests/initial.py
Python
lgpl-2.1
1,513
##################################################################### # s12f18.py # # (c) Copyright 2021, Benjamin Parzella. All rights reserved. # # 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 Fou...
bparzella/secsgem
secsgem/secs/functions/s12f18.py
Python
lgpl-2.1
2,601
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
kuba1/qtcreator
tests/system/suite_general/tst_build_speedcrunch/test.py
Python
lgpl-2.1
3,768
# -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE # # 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 ...
FedoraScientific/salome-geom
src/GEOM_SWIG/GEOM_example6.py
Python
lgpl-2.1
1,993
# damm.py - functions for performing the Damm checksum algorithm # # Copyright (C) 2016-2021 Arthur de Jong # # 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 L...
arthurdejong/python-stdnum
stdnum/damm.py
Python
lgpl-2.1
3,297
#!/usr/bin/env python # # A very simple program that sets a single key value when you type # it in an entry and press return # import gtk import gconf def entry_activated_callback(entry, client): s = entry.get_chars (0, -1) client.set_string ("/testing/directory/key", s) window = gtk.Window() entry = gtk....
GNOME/gnome-python
examples/gconf/simple-controller.py
Python
lgpl-2.1
683
############################################################################## # Copyright (c) 2013-2017, 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...
skosukhin/spack
var/spack/repos/builtin.mock/packages/indirect-mpich/package.py
Python
lgpl-2.1
1,664
#!/usr/bin/env python """Perspective-distorted sinusoidal grating in gaussian window""" from VisionEgg import * start_default_logging(); watch_exceptions() from VisionEgg.Core import * from VisionEgg.Gratings import * from VisionEgg.SphereMap import * from VisionEgg.Text import * from VisionEgg.Textures import * impo...
visionegg/visionegg
demo/mouse_gabor_perspective.py
Python
lgpl-2.1
11,119
############################################################################## # Copyright (c) 2013-2017, 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...
lgarren/spack
lib/spack/spack/test/spec_semantics.py
Python
lgpl-2.1
27,062
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) # This module should be kept compatible with P...
Csega/pyTsai
windows_binary_2.4/windows_compiling/msvccompiler.py
Python
lgpl-2.1
22,127
""" Default values for configurable parameters of the Core. Author(s): Arno Bakker, Bram Cohen, Egbert Bouman """ # WARNING: # As we have release Tribler 4.5.0 you must now take into account that # people have stored versions of these params on their disk. Make sure # you change the version number of the str...
Captain-Coder/tribler
Tribler/Core/defaults.py
Python
lgpl-3.0
2,390
# This file is part of thermotools. # # Copyright 2015, 2016 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # thermotools 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...
markovmodel/thermotools
test/test_callback.py
Python
lgpl-3.0
2,723
# -*- coding: utf-8 -*- from . import website_sales_team_models from . import controllers
ilmir-k/website-addons
website_sales_team/__init__.py
Python
lgpl-3.0
90
"""These functions can be called to manage and generate various objects that are associated with network interfaces. """ """ Copyright (c) 2014, Are Hansen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
ZombieNinjaPirate/kvmbuild
KVM/generate/ifobj.py
Python
lgpl-3.0
7,981
''' A package of utilities for exporting NEURON models to NeuroML 2 & for analysing/comparing NEURON models to NeuroML versions Will use some some utilities from https://github.com/OpenSourceBrain/NEURONShowcase ''' from pyneuroml.pynml import validate_neuroml1 from pyneuroml.pynml import validate_neuroml2 from py...
rgerkin/pyNeuroML
pyneuroml/neuron/__init__.py
Python
lgpl-3.0
2,783
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. import sys import time import string import threading from ExporterClient import * SERVER_ADDRESS = "localhost" SERVER_PORT=9001 ...
tiagocoutinho/bliss
bliss/comm/embl/MDEvents.py
Python
lgpl-3.0
9,538
#!/usr/bin/env python # -*- coding: utf-8 -*- from .yadisk_test import *
ivknv/yadisk
tests/__init__.py
Python
lgpl-3.0
74
class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ temp = {} for i, n in enumerate(nums): if (target - n) in temp: return [temp[target - n], i] else...
archangd/leetcode
1.two_sum.py
Python
lgpl-3.0
350
#coding=utf-8 class Quantity: __counter = 0 def __init__(self): cls = self.__class__ prefix = cls.__name__ index = cls.__counter self.storage_name = '_{}#{}'.format(prefix, index) cls.__counter += 1 def __set__(self, isinstance, value): if value > 0: ...
wuqize/FluentPython
chapter20/bulkfood/bulkfood_v3.py
Python
lgpl-3.0
720
from kona.linalg.matrices.hessian.basic import BaseHessian class ReducedSchurPreconditioner(BaseHessian): """ An IDF-Schur preconditioner designed to precondition the KKT system for multidisciplinary design optimization problems formulated using the IDF architecture. The preconditioner solves a sy...
OptimalDesignLab/Kona
src/kona/linalg/matrices/preconds/idf_schur.py
Python
lgpl-3.0
5,770
# -*- coding: utf-8 -*- """ .. module: field :platform: Unix, Windows :synopsis: Separates field_type-dependent functionality into Field classes. .. moduleauthor:: Christian Boelsen <christian.boelsen@hds.com> """ __all__ = ('create_field', ) from datetime import datetime from .exceptions import ( In...
cboelsen/tastytopping
tastytopping/field.py
Python
lgpl-3.0
6,454