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
#!/usr/bin/python # -*- coding: utf-8 -*- # provides mappings property key-> English label # for properties typically associated with # a variety of entity types import copy from collections import OrderedDict, namedtuple local_attributes = OrderedDict([ ("P17", u"country"), ("P131", u"located in the administ...
weblyzard/ewrt
src/eWRT/ws/wikidata/definitions/property_definitions.py
Python
gpl-3.0
13,203
"""Process Capsule: The PExpect Wrapper.""" from errno import ESRCH as NoSuchProcess from os import kill, environ from os.path import join from signal import SIGTERM as CTRL_C from chardet import detect as Chardet from pexpect import ( spawn, TIMEOUT, EOF, ) __author__ = "Minho Ryang (minhoryang@gmail.co...
juice-ryang/online-judge
OnlineJudgeServer/process_capsule.py
Python
gpl-3.0
5,696
#!/usr/bin/env python3 import unittest import tempfile from lofar.common.dbcredentials import * def setUpModule(): pass def tearDownModule(): pass class TestCredentials(unittest.TestCase): def test_default_values(self): c = Credentials() self.assertEqual(c.type, "postgres") self.assertEqual(c.hos...
kernsuite-debian/lofar
LCS/PyCommon/test/t_dbcredentials.py
Python
gpl-3.0
2,789
# -*- coding: utf-8 -*- def VtkLoadKPts(setName, nmbContndr): nmbContndr= vtk.vtkPoints() eSet= preprocessor.getSets.getSet(setName) eSet.numerate() print("nombre set: ",eSet.nombre,"\n") print("num. points: ",len(eSet.getPoints),"\n") points= eSet.getPoints for p in points: nmbContndr.insert_point(p....
lcpt/xc
python_modules/postprocess/xcVtk/CAD_model/vtk_load_kpoints.py
Python
gpl-3.0
377
#!/usr/bin/env python """ A feature extractor for named eneity recognition (NER). Copyright 2010,2011 Naoaki Okazaki. """ # Separator of field values. separator = ' ' # Field names of the input data. fields = 'y w pos chk' import crfutils def get_shape(token): r = '' for c in token: if c.isupper()...
arne-cl/alt-mulig
crf-python/ner.py
Python
gpl-3.0
6,841
# -*- coding: utf-8 -*- # # @file hocr.py # # @remark Copyright 2014 Philippe Elie # @remark Read the file COPYING # # @author Philippe Elie import os import sys import json sys.path.append(os.path.expanduser('~/phe/common')) import serialize sys.path.append(os.path.expanduser('~/phe/jobs')) import sge_jobs import co...
WeftWiki/phetools
hocr/hocr_cgi.py
Python
gpl-3.0
10,682
#! /usr/bin/env python import os import Tkinter as Tk import tkFileDialog, tkMessageBox import shelve import time from scipy.odr.odrpack import * from scipy.ndimage import minimum_position from pylab import * import pylab from PIL import Image from PIL import ImageTk from GRCFcommonFunctions import fig2img, fig2da...
latrop/GRCF
GRCFlibs/GRCFifaceFunctions.py
Python
gpl-3.0
80,548
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2012 Deepin, Inc. # 2011 ~ 2012 Wang Yong # # Author: Wang Yong <lazycat.manatee@gmail.com> # Maintainer: Wang Yong <lazycat.manatee@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under t...
linuxdeepin/deepin-storm
deepin_storm_with_gevent/plot.py
Python
gpl-3.0
5,877
class Breakpoint(): def __init__(self, breakpointNumber): self.breakpointNumber = breakpointNumber class BreakpointPPUByTime(Breakpoint): def __init__(self, breakpointNumber, scanline, tick): Breakpoint.__init__(self, breakpointNumber) self._scanline = scanline self._t...
aLaix2/O-Nes-Sama
DebuggerClient/Breakpoint.py
Python
gpl-3.0
1,060
#!/usr/bin/env python # # Copyright (C) 2016 GNS3 Technologies Inc. # # 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. # ...
GNS3/gns3-server
gns3server/controller/__init__.py
Python
gpl-3.0
21,528
def main(): import argparse cli = argparse.ArgumentParser() cli.add_argument('--thatnumber', type=int, default=17) args = cli.parse_args() from .if_main import main main(args) if __name__ == "__main__": main()
mic-e/cythondemo
__main__.py
Python
gpl-3.0
241
''' Data Management Window ------------------ Class for providing a graphical user interface for Data Management Window Copyright (C) 2017-2019 Nicola Ferralis <ferralis@mit.edu> 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 ...
feranick/GES_AT
GridEdgeAT/gridedgeat/configDMWindow.py
Python
gpl-3.0
9,495
#!/usr/bin/env python # Written by Filippo Bonazzi <f.bonazzi@davide.it> 2016 # # Convert an integer from its decimal representation into its hexadecimal # representation. # TODO: add argparse import sys import math s = "".join(sys.argv[1].split()) for c in s: if c not in "1234567890": print("Bad string \"...
Fbonazzi/Scripts
binary/int_to_byte.py
Python
gpl-3.0
471
# -*- coding: utf-8 -*- ''' Mepinta Copyright (c) 2011-2012, Joaquin G. Duo This file is part of Mepinta. Mepinta 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 opti...
joaduo/mepinta
core/python_core/common/type_checking/isiterable.py
Python
gpl-3.0
972
# Generated by Django 2.2.10 on 2020-03-22 23:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('moderation', '0044_categorymetadata'), ] operations = [ migrations.AddField( model_name='categorymetadata', name='d...
jeromecc/doctoctocbot
src/moderation/migrations/0045_auto_20200323_0056.py
Python
mpl-2.0
965
from SassyMQ.CommonClasses.BaseClasses import * from SassyMQ.CommonClasses.SMQActorBase import * from json import JSONEncoder class SMQOwnerBase(SMQActorBase): def __init__(self, isAutoConnect = True): super(SMQOwnerBase, self).__init__("owner.all", isAutoConnect) self.IsDebugMode = True; ...
CODEiverse/SassyMQ-OpenSourceTools
PySassyMQ/SassyMQ/SMQActors/SMQOwnerBase.py
Python
mpl-2.0
5,219
# 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/. '''Django template filters to be used to display builds. ''' from __future__ import absolute_import, division from __fut...
mozilla/elmo
apps/tinder/templatetags/build_extras.py
Python
mpl-2.0
4,246
import os.path import shutil import zipfile import click from pros.config import ConfigNotFoundException from .depot import Depot from ..templates import BaseTemplate, Template, ExternalTemplate from pros.common.utils import logger class LocalDepot(Depot): def fetch_template(self, template: BaseTemplate, destin...
purduesigbots/pros-cli
pros/conductor/depots/local_depot.py
Python
mpl-2.0
2,366
import pprint from crashsimilarity.downloader import SocorroDownloader import argparse import sys from crashsimilarity.models.gensim_model_wrapper import Doc2vecModelWrapper from crashsimilarity.models.similarity.doc2vec_similarity import Doc2VecSimilarity from crashsimilarity.models.wmd_calculator import WMDCalculat...
KirillTim/crashsimilarity
crashsimilarity/cli/signatures_similarity.py
Python
mpl-2.0
1,820
# # CDR-Stats License # http://www.cdr-stats.org # # 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) 2011-2015 Star2Billing S.L. # # The Initial Develope...
Star2Billing/cdr-stats
cdr_stats/user_profile/views.py
Python
mpl-2.0
3,380
from nose.plugins.attrib import attr from nose.tools import eq_, ok_ from pyquery import PyQuery as pq import constance.config from django.conf import settings from kuma.users.tests import UserTestCase from kuma.wiki.tests import revision, WikiTestCase from kuma.core.urlresolvers import reverse from ..models import ...
mastizada/kuma
kuma/attachments/tests/test_templates.py
Python
mpl-2.0
2,137
# 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 configman import ConfigurationManager, Namespace from configman.converters import list_converter, class_converter ...
Tayamarn/socorro
socorro/unittest/external/postgresql/unittestbase.py
Python
mpl-2.0
3,175
from parselib import * def parse_rra(gc, sheet, name, version, rrajson, data_levels, risk_levels): ''' called by parse_rra virtual function wrapper @gc google gspread connection @sheet spreadsheet @name spreadsheet name @version RRA version detected @rrajson writable template for the JSON fo...
gdestuynder/rra2json
rra_parsers/parse_253.py
Python
mpl-2.0
6,540
from __future__ import print_function import datetime import sys import re import os import json import urlparse import fnmatch import functools import mock import lxml.html import requests from requests.adapters import HTTPAdapter from configman import Namespace from configman.converters import class_converter, str...
Tayamarn/socorro
socorro/cron/jobs/ftpscraper.py
Python
mpl-2.0
19,943
from .xml import XML class RNG(XML): NS = { 'a': "http://relaxng.org/ns/compatibility/annotations/1.0", 'epub': "http://www.idpf.org/2007/ops", 'sch': "http://purl.oclc.org/dsdl/schematron", 'html': "http://www.w3.org/1999/xhtml", 'r': "http://relaxng.org/ns/structure/1...
BlackEarth/bxml
bxml/rng.py
Python
mpl-2.0
408
# -*- coding: utf-8 -*- import newrelic.agent from tower import ugettext_lazy as _lazy, ugettext as _ from django.contrib import messages from django.db.models import Q from django.http import HttpResponseBadRequest, JsonResponse from django.shortcuts import get_object_or_404, redirect, render from django.views.decora...
surajssd/kuma
kuma/wiki/views/misc.py
Python
mpl-2.0
6,940
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of agora-tools. # Copyright (C) 2014-2016 Agora Voting SL <agora@agoravoting.com> # agora-tools 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...
agoravoting/agora-tools
import_election_csv.py
Python
agpl-3.0
18,685
# -*- coding: utf8 -*- # # Copyright (C) 2019 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
bus_integration/models/mapping_configuration_helper.py
Python
agpl-3.0
6,420
#!/usr/bin/env python # # Creates .wxs files to be used to generate multiple MSI targets # # by default the script will check for dist and enterprise-dist, and parse # the version as needed options are provided to give a build version that will # download the zip, drop in to dist/enterprise-dist and do the same thing #...
grafana/grafana
scripts/build/ci-msi-build/msigenerator/generator/build.py
Python
agpl-3.0
14,202
###################################### # Example: ftDigiCam.py # Digital Camera with live # video stream to TXT display # and autofocus functionality # (c) 2016 by Torsten Stuehn # version 0.8 from 2016-02-12 ###################################### # Python2/3 'print' compat...
rkunze/ft-robo-snap
ftrobopy/examples/ftDigiCam.py
Python
agpl-3.0
6,070
from django.conf.urls import url from livinglots import get_organizer_model, get_watcher_model from .views import (AddToGroupView, CheckLotWithParcelExistsView, CountParticipantsView, CreateLotByGeomView, EmailParticipantsView, HideLotView, HideLotSuccessView, ...
596acres/django-livinglots-lots
livinglots_lots/urls.py
Python
agpl-3.0
3,373
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE # Utility classes that can be used to generate parse tree patterns. These # utilities take a sample expression or statement, and return a parse tree that...
apdjustino/DRCOG_Urbansim
src/opus_core/variables/utils/parse_tree_pattern_generator.py
Python
agpl-3.0
1,882
from django.core.management.base import BaseCommand from django.conf import settings from utils.amazon import default_s3_store from videos.models import Video, VIDEO_TYPE_FLV, VIDEO_TYPE_HTML5 import urllib import os import commands import sys from django.core.exceptions import ImproperlyConfigured from django.core.fil...
wevoice/wesub
apps/videos/management/commands/load_thumbnails.py
Python
agpl-3.0
4,320
from django.conf import settings cached_data = { 'URL_PREFIX': settings.URL_PREFIX, 'APP_VERSION': settings.GRT_VERSION, 'GIT_REVISION': settings.RAVEN_CONFIG.get('release', None), } def url_prefix(request): return cached_data
erasche/galactic-radio-telescope
web/context_processors.py
Python
agpl-3.0
246
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import logg...
petrjasek/superdesk-core
superdesk/vocabularies/vocabularies.py
Python
agpl-3.0
18,873
''' -- imports from python libraries -- ''' # import os -- Keep such imports here import json ''' -- imports from installed packages -- ''' from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import HttpResponseRedirect from django.http import HttpRespo...
makfire/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/views/topics.py
Python
agpl-3.0
38,687
#! /usr/bin/env python # -*- coding: utf-8 -*- # CowBots -- Error detection bots for CKAN-of-Worms # By: Emmanuel Raviart <emmanuel@raviart.com> # # Copyright (C) 2013 Etalab # http://github.com/etalab/cowbots # # This file is part of CowBots. # # CowBots is free software; you can redistribute it and/or modify # it u...
etalab/cowbots
email_changes.py
Python
agpl-3.0
16,025
from .Lifeform import Lifeform from erukar.system.engine import Indexer from erukar.ext.math.Distance import Distance class Player(Lifeform, Indexer): def __init__(self, world=None): Indexer.__init__(self) super().__init__(world) self.faction = 'iurian' self.uid = '' # Player UID ...
etkirsch/legends-of-erukar
erukar/system/engine/lifeforms/Player.py
Python
agpl-3.0
1,072
# matplotlib without any blocking GUI import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np N = 500 k = 3 plt.figure(1) s = np.exp(1j * 2 * np.pi * k / N * np.arange(-N / 2, N / 2)) plt.subplot(1, 2, 1) plt.plot(np.arange(-N / 2, N / 2), np.real(s), lw=2) plt.axvline(0, color='g'...
bzamecnik/sms-tools
lectures/01-Introduction/plots-code/even-odd.py
Python
agpl-3.0
599
from django.contrib import admin from jad.models import * class PConfigInline(admin.TabularInline): model = PConfig class ContentSwitchInline(admin.TabularInline): model = ContentSwitch class TargetInline(admin.TabularInline): model = Target class EndpointInline(admin.TabularInline): model = Endpoin...
exarch/massive-sansa
oldjmf/jad/admin.py
Python
agpl-3.0
877
# Copyright(C) 2011,2012,2013,2014 by Abe developers. # DataStore.py: back end database access for Abe. # 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...
ApexCoin/bitnote-abe
Abe/DataStore.py
Python
agpl-3.0
122,795
from rest_framework.exceptions import ValidationError from astrobin_apps_equipment.api.serializers.equipment_item_edit_proposal_serializer import \ EquipmentItemEditProposalSerializer from astrobin_apps_equipment.models import CameraEditProposal, Camera class CameraEditProposalSerializer(EquipmentItemEditProposa...
astrobin/astrobin
astrobin_apps_equipment/api/serializers/camera_edit_proposal_serializer.py
Python
agpl-3.0
1,081
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
CLVsol/oehealth
oehealth_professional/__init__.py
Python
agpl-3.0
1,597
import socket import types from enum import Enum from typing import Optional, List, Dict import binascii import math from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey, RSAPublicNumbers from cryptography.x509 import load_pem_x509_certificate ...
nabla-c0d3/sslyze
sslyze/plugins/robot/_robot_tester.py
Python
agpl-3.0
19,827
# ------------------------------------------------------------------------------ # Security Central # ------------------------------------------------------------------------------ from .models import User from pyramid.security import Allow, Everyone, Authenticated, ALL_PERMISSIONS from pyramid.authentication import Se...
linuxsoftware/dominoes
davezdominoes/gamecoordinator/security.py
Python
agpl-3.0
5,040
from functools import wraps from urllib.parse import urlparse from django.conf import settings from django.contrib import messages from django.contrib.auth import REDIRECT_FIELD_NAME from django.shortcuts import resolve_url def custom_user_passes_test(test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAM...
Maronato/SpottedBot
main/decorators.py
Python
agpl-3.0
1,825
""" This should not warn about `prop` being abstract in Child """ # pylint: disable=too-few-public-methods,abstract-class-little-used,no-absolute-import,metaclass-assignment import abc class Parent(object, metaclass=abc.ABCMeta): """Abstract Base Class """ @property @abc.abstractmethod def ...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/pylint/test/functional/abstract_abc_methods.py
Python
agpl-3.0
463
#!/usr/bin/python # -*- 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 redis...
kaji-project/shinken-mod-logstore-sqlite
module/module.py
Python
agpl-3.0
28,080
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = 'Girls With Slingshots' language = 'en' url = 'http://www.girlswithslingshots.com/' start_date = '2004-09-30' rights = 'Danielle Corsetto' class...
datagutten/comics
comics/comics/gws.py
Python
agpl-3.0
839
# -*- 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. from django.http.response import HttpResponse, HttpResponseRedirec...
suutari/shoop
shuup/admin/modules/system/views/telemetry.py
Python
agpl-3.0
1,503
from gh_frespo_integration.utils import github_adapter from gh_frespo_integration.models import * from django.conf import settings import logging from datetime import timedelta __author__ = 'tony' logger = logging.getLogger(__name__) def get_repos_and_configs(user): repos = [] github_username = user.github_u...
eahneahn/free
djangoproject/gh_frespo_integration/services/github_services.py
Python
agpl-3.0
5,113
# Copyright (c) 2001-2014, 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 open public tr...
lrocheWB/navitia
source/jormungandr/tests/authentication_tests.py
Python
agpl-3.0
17,792
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund 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 Founda...
cvast/arches
arches/app/utils/context_processors.py
Python
agpl-3.0
2,351
"""Main label index. Revision ID: e679554261b2 Revises: e2be4ab896d3 Create Date: 2019-05-09 18:55:24.472216 """ # revision identifiers, used by Alembic. revision = 'e679554261b2' down_revision = 'e2be4ab896d3' from alembic import op def upgrade(): op.create_index( op.f('ix_label_main_label_id'), 'lab...
hasgeek/funnel
migrations/versions/e679554261b2_main_label_index.py
Python
agpl-3.0
452
"""Initial migrations. Revision ID: 159b60132535 Revises: Create Date: 2015-12-04 21:53:17.278656 """ # revision identifiers, used by Alembic. revision = '159b60132535' down_revision = None branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto ...
kushaldas/autocloud
alembic/versions/159b60132535_initial_migrations.py
Python
agpl-3.0
1,031
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Puzzlebox - Brainstorms - Configuration # # Copyright Puzzlebox Productions, LLC (2010-2012) # # This code is released under the GNU Pulic License (GPL) version 2 # For more information please refer to http://www.gnu.org/copyleft/gpl.html __changelog__ = """\ Last Upda...
PuzzleboxIO/brainstorms-python
Puzzlebox/Brainstorms/Configuration.py
Python
agpl-3.0
9,943
#!/usr/bin/env python # encoding: utf-8 """ bw.py Created by David Farrar on 2008-02-28. Copyright (c) 2008 Exa Networks Ltd. All rights reserved. See LICENSE for details. """ from __future__ import with_statement try: from vdomain.client import Client as vmailClient, VmailError except ImportError: pass from scav...
Exa-Networks/scavengerexa
lib/scavenger/policy/plugins/postfix/bw.py
Python
agpl-3.0
2,836
# coding: utf-8 """ Only use this if you want to update a bootstrapV.M.py file to a newer virtualenv! Usage: /path/to/specific/version/of/python gen.py """ import sys import virtualenv EXTENSION = """ # coding: utf-8 import os from os.path import abspath, basename, dirname, join, pardir import subprocess # get cu...
eahneahn/free
bootstrap/gen.py
Python
agpl-3.0
1,091
#-*- coding:utf-8 -*- """ pimpy.image Image class object .. module:: image :synopsis: Tools for image description :platform: Unix, Mac, Windows .. moduleauthor:: Sebastien Campion <sebastien.campion@inria.fr> """ # pimpy # Copyright (C) 2010 Sebastien Campion <sebastien.campion@inria.fr> # # pimpy is free s...
scampion/pimpy
pimpy/image/__init__.py
Python
agpl-3.0
4,245
# coding: utf-8 from django.shortcuts import get_object_or_404 from kpi.models import Asset, Collection class AssetNestedObjectViewsetMixin: @property def asset(self): if not hasattr(self, '_asset'): asset = get_object_or_404(Asset, uid=self.asset_uid) setattr(self, '_asset',...
onaio/kpi
kpi/utils/viewset_mixins.py
Python
agpl-3.0
1,151
# -*- coding: utf-8 -*- # Copyright 2020 Juca Crispim <juca@poraodojuca.net> # This file is part of toxicbuild. # toxicbuild 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 Lic...
jucacrispim/toxicbuild
tests/unit/master/test_waterfall.py
Python
agpl-3.0
2,528
#-*- encoding: utf-8 -*- """ Copyright (c) 2010 Camille "nephthys" Bouiller <aftercem@gmail.com> InsideTags 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 opti...
nephthys/insidetags
functions.py
Python
agpl-3.0
5,173
"""Views for items (modules).""" from __future__ import absolute_import import hashlib import logging from collections import OrderedDict from datetime import datetime from functools import partial from uuid import uuid4 import dogstats_wrapper as dog_stats_api from django.conf import settings from django.contrib.aut...
prarthitm/edxplatform
cms/djangoapps/contentstore/views/item.py
Python
agpl-3.0
56,620
# Promise.ly -- social commitment platform # # Copyright (C) 2012 Promise.ly authors # # 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 opti...
triple-threat/django-dash
apps/emailer/engines.py
Python
agpl-3.0
2,728
from django.apps import AppConfig class BlogConfig(AppConfig): name = 'rvpsite.blog' verbose_name = 'GERENCIAMENTO DO BLOG'
rpadilha/rvpsite
rvpsite/blog/apps.py
Python
agpl-3.0
133
# -*- coding: utf-8 -*- """ This is the default template for our main set of AWS servers. This does NOT cover the content machines, which use content.py Common traits: * Use memcached, and cache-backed sessions * Use a MySQL 5.1 database """ # We intentionally define lots of variables that aren't used, and # want to ...
Edraak/edx-platform
lms/envs/aws.py
Python
agpl-3.0
36,831
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Document Page", "version": "13.0.1.1.0", "category": "Knowledge Management", "author": "OpenERP SA, Odoo Community Association (OCA)", "images": [ "images/cate...
OCA/knowledge
document_page/__manifest__.py
Python
agpl-3.0
1,086
# -*- coding: utf-8 -*- """ This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We ...
ahmedaljazzar/edx-platform
cms/envs/test.py
Python
agpl-3.0
11,745
from imposm.parser import OSMParser from osmwriter import OSMWriter def rm_tags(tags, tags_to_keep): new_tags = {} for ok_tag in tags_to_keep: if ok_tag in tags: new_tags[ok_tag] = tags[ok_tag] return new_tags class TagRemover(object): def __init__(self, output_writer, tags_to_kee...
rory/openstreetmap-remove-tags
osmrmtags/__init__.py
Python
agpl-3.0
1,564
import os import pytest import requests import requests_mock import glob import shutil from moulinette import m18n from moulinette.utils.filesystem import read_json, write_to_json, write_to_yaml from yunohost.utils.error import YunohostError from yunohost.app import ( _initialize_apps_catalog_system, _read_ap...
YunoHost/moulinette-yunohost
src/yunohost/tests/test_appscatalog.py
Python
agpl-3.0
9,247
from ogn.parser.pattern import PATTERN_TRACKER_POSITION_COMMENT, PATTERN_TRACKER_STATUS_COMMENT from ogn.parser.utils import FPM_TO_MS, HPM_TO_DEGS from .base import BaseParser class TrackerParser(BaseParser): def __init__(self): self.beacon_type = 'tracker' self.position_pattern = PATTERN_TRACKE...
glidernet/python-ogn-client
ogn/parser/aprs_comment/tracker_parser.py
Python
agpl-3.0
3,367
""" This module contains celery task functions for handling the sending of bulk email to a course. """ import math import re import time from smtplib import SMTPServerDisconnected, SMTPDataError, SMTPConnectError from django.conf import settings from django.contrib.auth.models import User, Group from django.core.mail...
pdehaye/theming-edx-platform
lms/djangoapps/bulk_email/tasks.py
Python
agpl-3.0
10,209
# 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
utils/xml.py
Python
agpl-3.0
862
# Copyright (C) 2019 Chris Lalancette <clalancette@gmail.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; # version 2.1 of the License. # This library is distributed in the hope th...
clalancette/pycdlib
pycdlib/facade.py
Python
lgpl-2.1
36,359
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon # # Mapnik 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 Li...
mojodna/debian-mapnik
plugins/input/geos/build.py
Python
lgpl-2.1
1,730
############################################################################## # 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/packages/liblbxutil/package.py
Python
lgpl-2.1
2,028
import kivy kivy.require('1.0.9') from kivy.lang import Builder from kivy.uix.gridlayout import GridLayout from kivy.properties import NumericProperty from kivy.app import App Builder.load_string(''' <HelloWorldScreen>: cols: 1 Label: text: 'Welcome to the Hello world' Button: text: 'Click ...
chozabu/p4a-ctypes
mgdesign/testhello/main.py
Python
lgpl-2.1
689
############################################################################## # 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/packages/fastphase/package.py
Python
lgpl-2.1
1,682
############################################################################## # 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/packages/r-ncbit/package.py
Python
lgpl-2.1
1,646
#!/usr/bin/python ################################################################################ # # Module: cmtest.py # # Author: Paul Tindle ( mailto:Paul@Tindle.org ) # # Descr: Main Test executive # # Version: 0.1 $Id$ # # Changes: 05/18/17 Conversion from perl - JSW # # Still ToDo: # # Licens...
white111/CMtestpy
bin/cmtest.py
Python
lgpl-2.1
7,516
"""This is mostly a copy of methods and internal classes from loadable""" from django.db.models.loading import get_models from fixture.loadable.loadable import DeferredStoredObject def assert_empty(mod): for model in get_models(mod): assert model.objects.count() == 0 def resolve_stored_object(column_val)...
patrickod/fixture
fixture/test/test_loadable/test_django/util.py
Python
lgpl-2.1
579
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import re import sys import setuptools import setuptools.command.test if sys.version_info < (2, 7): raise Exception('amqp requires Python 2.7 or higher.') NAME = 'amqp' # -*- Classifiers -*- classes = """ Development Status :: 5 - Productio...
smurfix/aio-py-amqp
setup.py
Python
lgpl-2.1
3,165
# # This file is part of python-rhev. python-rhev is free software that is # made available under the MIT license. Consult the file "LICENSE" that # is distributed together with this file for the exact licensing terms. # # python-rhev is copyright (c) 2010-2011 by the python-rhev authors. See # the file "AUTHORS" for a...
markmc/rhevm-api
python/lib/rhev/test/test_users.py
Python
lgpl-2.1
1,358
# This file is part of OMG-tools. # # OMG-tools -- Optimal Motion Generation-tools # Copyright (C) 2016 Ruben Van Parys & Tim Mercy, KU Leuven. # All rights reserved. # # OMG-tools 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...
meco-group/omg-tools
examples/p2p_3dquadrotor.py
Python
lgpl-3.0
2,057
""" Hecho ~~~~~ """ # %% # These two lines are necessary only if gempy is not installed import sys, os import urllib os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,device=cpu" # Importing gempy import gempy as gp # Aux imports import numpy as np import pandas as pn import matplotlib.pyplot as plt # %% # Loading sur...
cgre-aachen/gempy
examples/examples/real/Hecho.py
Python
lgpl-3.0
5,979
#!/usr/bin/env python3 ''' @file: bin_pack.py @auth: Sprax Lines @date: 2018-02-07 00:19:39 Wed 07 Feb Can the space requirements specified by bits be packed into the specified bins? ''' from __future__ import print_function from itertools import islice # import pdb # from pdb import set_trace from datetime import dat...
sprax/python
bin_pack.py
Python
lgpl-3.0
10,413
from abc import ABCMeta from copy import deepcopy from enum import Enum from itertools import product from typing import List, Dict, Tuple, Optional from rxncon.core.reaction import Reaction, OutputReaction from rxncon.core.rxncon_system import RxnConSystem from rxncon.core.spec import Spec from rxncon.core.state impo...
rxncon/rxncon
rxncon/simulation/boolean/boolean_model.py
Python
lgpl-3.0
35,991
#!/bin/env python import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../libs/") from var_dump import var_dump def func(a): return 1, 2, 3 print func(10) var_dump(func(10)) x = func(10) var_dump(x) a, b, _ = func(10) var_dump(a, b)
fengbohello/practice
python/func/multi-return.py
Python
lgpl-3.0
277
import unittest import sys from spam.spamhaus import * class MockSpamHausChecker(SpamHausChecker): def set_spam(self, is_spam): """docstring for setSpam""" self.is_spam = is_spam def _resolve(self, domain): """docstring for __resolve""" if self.is_spam: return "2.3...
fmarani/spam
tests/spamhaus_tests.py
Python
lgpl-3.0
1,040
# Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Math.Polygon import Polygon from UM.Math.Float import Float import numpy import math import pytest pytestmark = pytest.mark.skip(reason = "Incomplete tests") class TestPolygon: def setup_method(self, metho...
thopiekar/Uranium
tests/Math/TestPolygon.py
Python
lgpl-3.0
9,024
# vim: set fileencoding=utf-8 from decorator import decorator @decorator def check_open(f, self, *args, **kwargs): if self.closed: raise ValueError("%s operation on closed Consumer" % f.__name__) return f(self, *args, **kwargs)
jruere/concurrent-iterator
concurrent_iterator/utils.py
Python
lgpl-3.0
246
# IfcOpenShell - IFC toolkit and geometry engine # Copyright (C) 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of IfcOpenShell. # # IfcOpenShell 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 Foundat...
IfcOpenShell/IfcOpenShell
src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py
Python
lgpl-3.0
4,290
sWordInfo = ReadValue('WordInfo') if not sWordInfo: sWordInfo = ReadValue('DictionaryLookup') sWordInfo = IniFormDialogInput('Input', 'Word', sWordInfo) if not sWordInfo: Exit() WriteValue('WordInfo', sWordInfo) SayLine('Please wait') # sAddress = 'http://api.wordnik.com/api/word.json/' + sWordInfo + '/definition...
jamalmazrui/InPy
WebClient_XtraWordInfo.py
Python
lgpl-3.0
3,600
#!/usr/bin/env python # Copyright (C) 2013-2014 SignalFuse, Inc. # # Docker container orchestration utility. from __future__ import print_function import argparse import jinja2 import logging import os import sys import traceback import yaml from . import exceptions, maestro from . import name, version DEFAULT_MAE...
Wiredcraft/maestro-ng
maestro/__main__.py
Python
lgpl-3.0
7,128
#!/usr/bin/python3 # coding=utf-8 # ------------------------------------------------------------------------------- # This file is part of Phobos, a Blender Add-On to edit robot models. # Copyright (C) 2020 University of Bremen & DFKI GmbH Robotics Innovation Center # # You should have received a copy of the 3-Clause ...
rock-simulation/phobos
phobos/io/entities/submechanisms.py
Python
lgpl-3.0
2,046
from .basic import ProcFile from collections import namedtuple class Consoles(ProcFile): filename = '/proc/consoles' Console = namedtuple('Console', ['operations', 'flags', 'major', 'minor']) def names(self): return [line.split()[0] for line in self._readfile()] def get(self, name, default=N...
thuck/proc
proc/consoles.py
Python
lgpl-3.0
1,126
{ 'name': "Sale only available products on Website", 'summary': """Sale only available products on Website""", 'version': '1.0.0', 'author': 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category': 'Custom', 'website': 'https://yelizariev.github.io', 'images': ['images/availab...
ufaks/website-addons
website_sale_available/__openerp__.py
Python
lgpl-3.0
501
# -*- coding: utf-8 -*- from greek_stemmer.closets.word_exceptions import exceptions def test_word_exceptions(): assert isinstance(exceptions, dict)
kpech21/Greek-Stemmer
tests/closets/test_word_exceptions.py
Python
lgpl-3.0
157
# Copyright 2015-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Information available about Tor from `its manual <https://www.torproject.org/docs/tor-manual.html.en>`_. This provides three methods of getting this information... * :func:`~stem.manual.Manual.from_cache` provides ma...
tparks5/tor-stem
stem/manual.py
Python
lgpl-3.0
20,582
#!/usr/bin/python # -*- coding: utf-8 -*- # coding=utf-8 import csv import logging import os from anta.util import config from anta.annotators import pattern_annotator from anta.annotators import tika_annotator from anta.storage.solr_client import SOLRInterface def read(): data_dir = config.config["data_dir"] ...
medialab/ANTA2
anta/readers/unfccc_reader.py
Python
lgpl-3.0
4,367