code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- # # openssh-ldap-pubkey documentation build configuration file, created by # sphinx-quickstart on Tue Oct 13 12:47:40 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
mkouhei/openssh-ldap-pubkey
docs/source/conf.py
Python
gpl-3.0
9,288
# created based on C. Warrick's page here: # https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scrip ts/ import sys import os MODEL_NAME = 0 MODEL_RUN = 1 def entry_point(args, models): print("In this module, the models available to run are: ") for num, model in models.i...
gcallah/Indra
indraV1/indra/entry_point.py
Python
gpl-3.0
469
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2012 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
parinporecha/backend_gtgonline
GTG/gtk/browser/modifytags_dialog.py
Python
gpl-3.0
3,656
import os import argparse import datetime import yaml import api.src.common.initial_environment_config from ..models.inception import create_model from ..data_processing.data_generator import DataGenerator from ..common.config import TrainingConfig, DataConfig, Config from ..common.utils import print_info, ensure_dir ...
kacper1095/asl-translator
api/src/scripts/train_inception.py
Python
gpl-3.0
3,051
from gh.base import Command class UserFollowCommand(Command): name = 'user.follow' usage = '%prog [options] user.follow <login>' summary = 'Follow a user' subcommands = {} def run(self, options, args): opts, args = self.parser.parse_args(args) status = self.SUCCESS self.lo...
sigmavirus24/github-cli
gh/commands/user/follow.py
Python
gpl-3.0
615
# -*- coding: utf-8 -*- # -*- Channel Xdede -*- # -*- Created for Alfa-addon -*- # -*- By the Alfa Develop Group -*- from builtins import range import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int import re from channelselector import get_thumb from core import httpt...
alfa-addon/addon
plugin.video.alfa/channels/movidy.py
Python
gpl-3.0
17,665
# -*- coding: utf-8 -*- from django.db import models from tasks.models import Link from tasks.constants import LINK_STATUSES class CrawlerRecord(models.Model): """ Crawler visit record for Link """ link = models.ForeignKey(Link) visited_at = models.DateTimeField() http_status = models.PositiveSmallInte...
alexanderad/Super-Cow-Task-Force
crawler/models.py
Python
gpl-3.0
499
#!/usr/bin/python3 from abc import ABCMeta, abstractmethod class Generator: #Abstract class to be parent to all uml parsers __metaclass__ = ABCMeta @abstractmethod def generate(self): pass
Rihorama/dia2code
src/dia2code/parents/generator.py
Python
gpl-3.0
227
# NOTE: DO NOT UPDATE THIS FILE - Create a new views_common.py and place any views there if you need it. then reference # your new one in the urls.py file (which should be edited by you) import os # import imp import logging import mimetypes import importlib.util from django.conf import settings from django.templa...
sstacha/uweb-vagrant
files/docroot/docroot_views.py
Python
gpl-3.0
5,398
from __future__ import absolute_import import re from collections import namedtuple from ..exceptions import LocationParseError from ..packages import six url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"] # We only want to normalize urls with an HTTP(S) scheme. # urllib3 infers URLs withou...
KnoxMakers/KM-Laser
extensions/km_deps/urllib3/util/url.py
Python
gpl-3.0
14,192
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Autor: Flores Facundo # Año: 2016 # Licencia: GNU/GPL V3 http://www.gnu.org/copyleft/gpl.html # Estado: Produccion from traitsui.api import Handler class MaskHandler(Handler): """ Controlador para el ModelView: Mask """ def object_use_masking_changed(self...
FacundoGFlores/golsoftv2
src/controllers/mask.py
Python
gpl-3.0
792
## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2012 Raik Gruenberg & Johan Leckner ## ## 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 v...
ostrokach/biskit
Biskit/QualMaster.py
Python
gpl-3.0
2,978
#!/usr/bin/env python # # Copyright 2009 Claudio Pisa (claudio dot pisa at uniroma2 dot it) # # This file is part of SVEF (SVC Streaming Evaluation Framework). # # SVEF 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 Softwar...
netgroup/svef
computedelay.py
Python
gpl-3.0
2,220
import handler import server import service
alxark/scmt
server/scmt/api/__init__.py
Python
gpl-3.0
43
""" This module implements the selection sort algorithim """ def selection_sort(arr, key=lambda x:x): """ Perform a selection sort on a given list. Return the sorted list. Example: >>> selection_sort([1, 5, 7, 2, 3, 4, 1]) [1, 1, 2, 3, 4, 5, 7] >>> selection_sort(['a', 'd', 'b',...
jcotton42/libuseful
sorts/selectionsort.py
Python
gpl-3.0
1,042
from os import path, listdir from git import Repo, Git from lense_devtools.common import DevToolsCommon class DevToolsGitRepo(DevToolsCommon): """ Helper class for retrieving a lense project repository. """ def __init__(self, project, attrs, automode=False): """ :param project: The proj...
djtaylor/lense-devtools
usr/lib/python2.7/dist-packages/lense_devtools/gitrepo.py
Python
gpl-3.0
4,898
import datetime from django.utils.timezone import utc from django.db import models from django.db.models import Q #from django.contrib.gis.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from cms.models import CMSPlugin, Page from django_extensions.db.fie...
hzlf/openbroadcast
website/apps/shortcutter/models.py
Python
gpl-3.0
2,869
""" Roleme stuff. """ from curious import Role from curious.commands import Context, Plugin, command, condition from jokusoramame.plugins.roles.roleme_shared import RolemeResult, RolemeShared class Roleme(Plugin): """ Commands for the roleme portion of the bot. """ def __init__(self, client): ...
SunDwarf/Jokusoramame
jokusoramame/plugins/roles/roleme.py
Python
gpl-3.0
2,924
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-20 16:05 from __future__ import unicode_literals from django.conf import settings from django.db import migrations from django.contrib.auth.hashers import make_password def add_anonymous_profile(apps, schema_editor): """Ensure anonymous user has prof...
lem9/weblate
weblate/accounts/migrations/0017_anonymous_profile.py
Python
gpl-3.0
1,121
# -*- coding: utf-8 -*- """ Define the form for django's admin """ from django.contrib import admin from baobab.utils.admin import ModelAdmin from baobab.translate.models import Lang, Event, EventLog from baobab.translate.admininline import EventDataInline, EventLogDataInline from baobab.translate.adminfilter import...
Gandi/baobab
baobab/translate/admin.py
Python
gpl-3.0
3,302
#!/usr/bin/env python # -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # ...
RipCazza/pyformula
docs/conf.py
Python
gpl-3.0
8,417
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2019 Daniel Estevez <daniel@destevez.net> # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # import argparse import functools import itertools import os import shlex import yaml from gnuradio import gr, zeromq import pmt ...
daniestevez/gr-satellites
python/core/gr_satellites_flowgraph.py
Python
gpl-3.0
19,752
''' * Created by Zhenia Syryanyy (Yevgen Syryanyy) * e-mail: yuginboy@gmail.com * License: this code is under GPL license * Last modified: 2017-09-19 ''' import numpy as np import re import periodictable as pd from libs.dir_and_file_operations import createUniqFile, createUniqFile_from_idx from libs.inputheader import ...
yuginboy/from_GULP_to_FEFF
feff/libs/cell_generator.py
Python
gpl-3.0
1,453
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, os, json from frappe import _ from frappe.utils import get_timestamp from frappe.utils import cint, today, formatdate import frappe.defa...
Zlash65/erpnext
erpnext/setup/doctype/company/company.py
Python
gpl-3.0
19,798
# -*- coding: UTF-8 -*- # Copyright (C) 2005-2011 J. David Ibáñez <jdavid.ibp@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 option) ...
bepatient-fr/itools
test/test_web.py
Python
gpl-3.0
7,427
#!/usr/bin/env python3 # # This file is part of the Malboxes project. # # Malboxes - Vagrant box builder and config generator for malware analysis # https://github.com/gosecure/malboxes # # Olivier Bilodeau <obilodeau@gosecure.ca> # Copyright (C) 2016 GoSecure Inc. # All rights reserved. # # This program is free softwa...
GoSecure/malboxes
tests/test_packer_templates.py
Python
gpl-3.0
2,226
#!/usr/bin/env python # -*- coding:utf8 -*- # Copyright (C) 2011 Maxim Kovalev # # 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 ...
maxikov/sputnik
newsputnik.py
Python
gpl-3.0
20,195
# coding: utf-8 import os import numpy as np import pandas as pd from bokeh.plotting import figure, output_notebook, output_file, show # to plot inline in Jupyter Notebook # output_notebook() def h_theta(theta, X): # X: features with the first column set as 1 (x0=1) theta = theta.reshape(-1, 1) # column vec...
graffaner/machine_learning
ex1/ex1.py
Python
gpl-3.0
5,814
import copy import pytest from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from crashstats.base.tests.testbase import DjangoTestCase class LeftoverPipelineFinder(DjangoTestCase): """Test our custom staticfiles finder class....
Tayamarn/socorro
webapp-django/crashstats/base/tests/test_finders.py
Python
mpl-2.0
1,010
r"""XML-RPC Servers. This module can be used to create simple XML-RPC servers by creating a server and either installing functions, a class instance, or by extending the SimpleXMLRPCServer class. It can also be used to handle XML-RPC requests in a CGI environment using CGIXMLRPCRequestHandler. The Doc* classes can b...
Reflexe/doc_to_pdf
Windows/program/python-core-3.5.0/lib/xmlrpc/server.py
Python
mpl-2.0
36,701
# 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) 2015 Digi International Inc. All Rights Reserved. from io import BytesIO import sys from suitc...
rtzoeller/python-suitcase
suitcase/structure.py
Python
mpl-2.0
11,887
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2016-11-08 13:32 from django.db import migrations from atmo.models import PermissionMigrator def assign_spark_job_view_permission(apps, schema_editor): SparkJob = apps.get_model("jobs", "SparkJob") PermissionMigrator(apps, SparkJob, "view", user_field="...
mozilla/telemetry-analysis-service
atmo/jobs/migrations/0007_assign_view_perms.py
Python
mpl-2.0
935
x = input() if x: y = x else: y = True print(y)
gitsimon/spadup-lyra
unittests/traces/if3N.py
Python
mpl-2.0
56
import csv import datetime import json import mock import os import re import shutil import tempfile import urllib from cStringIO import StringIO from nose.tools import eq_, ok_ from nose.plugins.skip import SkipTest from django.test import TestCase from django.test.client import RequestFactory from django.test.utils ...
AdrianGaudebert/socorro-crashstats
crashstats/crashstats/tests/test_views.py
Python
mpl-2.0
120,644
# This is a template config file for marionette production on Windows. import os config = { # marionette options "test_type": "browser", "marionette_address": "localhost:2828", "test_manifest": "unit-tests.ini", "virtualenv_python_dll": 'c:/mozilla-build/python27/python27.dll', "virtualenv_pat...
lundjordan/mozharness
configs/marionette/windows_config.py
Python
mpl-2.0
1,094
# 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 https://mozilla.org/MPL/2.0/. from io import StringIO from django.conf import settings from django.core.management.base import BaseCommand from bedr...
flodolo/bedrock
bedrock/sitemaps/management/commands/update_sitemaps_data.py
Python
mpl-2.0
1,330
def singBottles(): for i in range(99,0,-1): #Sets range and increment to decrese by print(str(i)+" bottles of beer on the wall, "+str(i) +" bottles of beer.") #prints verse with current number of bottles print("Take one down pass it around," +str(i-1) +" bottles of beer on the wall.") #prints ver...
Riotpunchbeats/VanierCompSci
DONE AND WORKING/19.py
Python
mpl-2.0
380
from .token_route import add_token from .users_route import send_sms, add_user __all__ = [add_token, send_sms, add_user]
mrcodehang/cqut-chat-server
routes/__init__.py
Python
mpl-2.0
121
# 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 __future__ import absolute_import, print_function, unicode_literals import re def split_symbol(treeherder_symbol)...
Yukarumya/Yukarum-Redfoxes
taskcluster/taskgraph/util/treeherder.py
Python
mpl-2.0
877
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2013, 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
eLBati/purchase-workflow
framework_agreement/model/purchase.py
Python
agpl-3.0
9,354
import sys, os sys.path.append("./EduTK.zip") sys.path.append("../EduTK.zip") if ('Q37_XPP' in os.environ): sys.path.append(os.path.join(os.environ["HOME"],"epeios/other/libs/edutk/PYH/edutk")) import edutk as _ from edutk import Core F_HELLO = "Hello" _.defineUserItem(globals(), "uf", F_HELLO) _.setEnums(globa...
epeios-q37/epeios
other/exercises/base/workshop/core.py
Python
agpl-3.0
1,349
from django.conf import settings from tempfile import mkdtemp, mkstemp import os import subprocess import shutil import badges.models class BadgeCreatorError(Exception): def __init__(self, value, latex_output=None): self.value = value self.latex_output = latex_output Exception.__init__(...
helfertool/helfertool
src/badges/creator.py
Python
agpl-3.0
8,562
from coaster.utils import classmethodproperty from coaster.views import ClassView class AdminView(ClassView): """Base class for all tabbed admin views""" @classmethodproperty def tabs(cls): # noqa: N805 views = ((name, getattr(cls, name)) for name in cls.__views__) tabviews = sorted( ...
hasgeek/hasjob
hasjob/views/admin.py
Python
agpl-3.0
619
# -*- coding: utf-8 -*- { 'name': "Zoo Animals Management", 'summary': "Manage animals in a ZOO.", 'author': "Ludwik Trammer", 'website': "https://github.com/ludwiktrammer/odoo-zoo", 'category': "Specific Industry Applications", 'version': "1.0", 'application': True, 'post_load': 'print_...
ludwiktrammer/odoo-zoo
addons/zoo_animals/__openerp__.py
Python
agpl-3.0
441
import infomap im = infomap.Infomap("--two-level --verbose") # Set the start id for bipartite nodes im.bipartite_start_id = 5 # Add weight as an optional third argument im.add_link(5, 0) im.add_link(5, 1) im.add_link(5, 2) im.add_link(6, 2) im.add_link(6, 3) im.add_link(6, 4) im.run() print(f"Found {im.num_top_mod...
mapequation/infomap
examples/python/bipartite.py
Python
agpl-3.0
450
from openerp.osv import fields, osv from dateutil import parser import re import calendar import openerp.tools import openerp.addons.decimal_precision as dp import amount_to_text_softapps import time from datetime import date from datetime import datetime from datetime import timedelta from openerp.addons.hr_payroll i...
trabacus-softapps/docker-edumedia
additional_addons/Edumedia_India/ed_payroll.py
Python
agpl-3.0
18,412
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # spamc - Python spamassassin spamc client library # Copyright (C) 2015 Andrew Colin Kissa <andrew@topdog.za.net> # # 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...
akissa/spamc
tests/__init__.py
Python
agpl-3.0
940
# # SilverBot is a Python application to interact with IB's TWS API. # Copyright (C) 2013 Christopher Jastram <cjastram@gmail.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 Free Software Foundati...
cjastram/silverbot
lib/trader.py
Python
agpl-3.0
9,464
""" Run demo with python3 -m interpolation.interpolate interpolate.py """ import datetime import random import logging import itertools import os import numpy import pandas from filter_weather_data.filters import StationRepository from filter_weather_data import get_repository_parameters from filter_weather_data im...
1kastner/analyse_weather_data
interpolation/interpolate_experimental.py
Python
agpl-3.0
7,078
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from test_fa...
fritzSF/superdesk
server/apps/content_filters/content_filter_tests.py
Python
agpl-3.0
23,348
# -*- coding: utf-8 -*- """ The Degreed2 Integrated Channel package. """ __version__ = "0.0.1" default_app_config = ("integrated_channels.degreed2.apps." "Degreed2Config")
edx/edx-enterprise
integrated_channels/degreed2/__init__.py
Python
agpl-3.0
196
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
CLVsol/odoo_cl_addons
cl_address/category/__init__.py
Python
agpl-3.0
1,431
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
imarin/Odoo-Mexico-localization
l10n_mx_company_cif/wizard/__init__.py
Python
agpl-3.0
1,271
# -*- 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...
ubic135/odoo-design
addons/project_timesheet/project_timesheet.py
Python
agpl-3.0
15,312
#!/usr/bin/env python import os import re import sys import h5py import logging import numpy as np from openquake.baselib import sap from openquake.hazardlib.const import TRT from openquake.hazardlib.geo.point import Point from openquake.hazardlib.geo.surface.gridded import GriddedSurface from openquake.hazardlib.sour...
GEMScienceTools/oq-subduction
bin/create_inslab_nrml.py
Python
agpl-3.0
4,493
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from functools import wraps from django import template from catalogue.models import Book register = template.Library() class StatsNode(template.Node): def ...
fnp/wolnelektury
src/reporting/templatetags/reporting_stats.py
Python
agpl-3.0
1,435
# -*- coding: utf-8 -*- """Setup the tg2app application""" import logging from tg2app.config.environment import load_environment __all__ = ['setup_app'] log = logging.getLogger(__name__) from schema import setup_schema import bootstrap def setup_app(command, conf, vars): """Place any commands to setup tg2app ...
ralphbean/monroe
wsgi/tg2app/tg2app/websetup/__init__.py
Python
agpl-3.0
467
from setuptools import setup, find_packages setup( name = "routez", version = "1.0", url = 'http://github.com/wlach/routez', description = "Routez", author = 'William Lachance', packages = find_packages('.'), package_dir = {'': '.'}, install_requires = ['setuptools'], )
wlach/routez
src/setup.py
Python
agpl-3.0
304
from rest_framework import serializers from student.models import UserEvent class UserEventSerializer(serializers.ModelSerializer): class Meta: model = UserEvent fields = ('id', 'user', 'title', 'start', 'end', 'color')
mjirayu/sit_academy
openedx/core/djangoapps/user_api/user_events/serializers.py
Python
agpl-3.0
243
MATLAB_PARAMETER_FILENAME = 'p.mat' MATLAB_F_FILENAME = 'f.mat' MATLAB_DF_FILENAME = 'df.mat' NODES_MAX_FILENAME = 'max_nodes.txt'
jor-/simulation
simulation/optimization/matlab/constants.py
Python
agpl-3.0
131
# -*- coding: utf-8 -*- # Copyright 2016-2018 Flensburg University of Applied Sciences, # Europa-Universität Flensburg, # Centre for Sustainable Energy Systems, # DLR-Institute for Networked Energy Systems # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero Ge...
openego/eTraGo
etrago/appl.py
Python
agpl-3.0
18,854
#! /usr/bin/env python # -*- coding: utf-8 -*- # Etalab-CKAN-Harvesters -- Harvesters for Etalab's CKAN # By: Emmanuel Raviart <emmanuel@raviart.com> # # Copyright (C) 2013 Etalab # http://github.com/etalab/etalab-ckan-harvesters # # This file is part of Etalab-CKAN-Harvesters. # # Etalab-CKAN-Harvesters is free soft...
etalab/etalab-ckan-harvesters
etalabckanharvesters/grandlyon.py
Python
agpl-3.0
13,313
#!/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
contrib/install.d/tools/checkmodule.py
Python
agpl-3.0
2,195
# -*- coding: utf-8 -*- # # Copyright 2016 Taŭga Tecnologia # Aristides Caldeira <aristides.caldeira@tauga.com.br> # License AGPL-3 or later (http://www.gnu.org/licenses/agpl) # from __future__ import division, print_function, unicode_literals import logging from dateutil.relativedelta import relativedelta from od...
odoo-brazil/l10n-brazil-wip
l10n_br_base/models/inherited_account_payment_term.py
Python
agpl-3.0
14,637
# -*- coding: utf-8 -*- ################################################################################ # header_operations expanded v.1.0.1 # ################################################################################ # TABLE OF CONTENTS ############################...
berth64/modded_modded_1257ad
source/header_operations.py
Python
agpl-3.0
319,871
""" Python API for various enterprise functionality. """ from enterprise import roles_api from enterprise.models import PendingEnterpriseCustomerAdminUser from enterprise.utils import create_tableau_user, delete_tableau_user def activate_admin_permissions(enterprise_customer_user): """ Activates admin permiss...
edx/edx-enterprise
enterprise/api/__init__.py
Python
agpl-3.0
2,176
#--------------------------------------------------------------------------- # Testing infrastructure #--------------------------------------------------------------------------- import unittest from os import path from pyramid import testing from pyramid.paster import get_appsettings from webob.multidict import MultiD...
linuxsoftware/dominoes
tests/test_gamecoordinator/helpers.py
Python
agpl-3.0
1,653
"""Generates common contexts""" from __future__ import absolute_import import logging from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey, LearningContextKey from six import text_type from openedx.core.lib.request_utils import COURSE_REGEX log = logging.getLogger(__name__) def cours...
ESOedX/edx-platform
common/djangoapps/track/contexts.py
Python
agpl-3.0
2,667
# © 2016 Camptocamp SA, Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from odoo import fields, models class AccountPaymentMode(models.Model): _inherit = "account.payment.mode" workflow_process_id = fields.Many2one( comodel_name="sale.workflow.process", string="Automatic...
OCA/sale-workflow
sale_automatic_workflow_payment_mode/models/account_payment_mode.py
Python
agpl-3.0
338
# -*- coding: utf-8 -*- import sys from django.db import models from django.core.urlresolvers import reverse from datetime import datetime from django.db.models.signals import post_syncdb from django.contrib.sites.models import Site from allauth.socialaccount.providers import registry from allauth.socialaccount.mod...
soplerproject/sopler
core/models.py
Python
agpl-3.0
4,574
""" Extended Textbooks page """ from edxapp_acceptance.pages.studio.textbook_upload import TextbookUploadPage from selenium.webdriver.common.action_chains import ActionChains from regression.pages import UPLOAD_FILE_DIR from regression.tests.helpers import get_url class TextbookPageExtended(TextbookUploadPage): ...
raeeschachar/edx-e2e-mirror
regression/pages/studio/studio_textbooks.py
Python
agpl-3.0
2,492
# This file is part of Tech Tip of the Day. # # Tech Tip of the Day 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. # # Tech Tip of t...
kaapstorm/techtips
techtips/tips/views.py
Python
agpl-3.0
4,838
# -*- coding: utf-8 -*- # # Copyright (c) 2014-2015 Université Catholique de Louvain. # # This file is part of INGInious. # # INGInious 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 o...
layus/INGInious
frontend/pages/course_admin/task_edit_file.py
Python
agpl-3.0
12,962
handler_list = ['dsl','dialup']
Exa-Networks/scavengerexa
config/handlers/__init__.py
Python
agpl-3.0
32
# - coding: utf-8 -*- ############################################################################## # # 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 # ...
odoo-arg/odoo_l10n_ar
l10n_ar_bank_reconcile/models/account_bank_reconcile_line.py
Python
agpl-3.0
3,102
from autopwn2.api import get_or_model from autopwn2.database import db, with_session from autopwn2.database.models import Setting, Tool, Job from autopwn2.schedule import scheduler, scheduled_task @with_session def create_setting(data): name = data.get('name') value = data.get('value') example = data.get(...
nccgroup/autopwn
autopwn2/api/business.py
Python
agpl-3.0
2,443
import os import platform class Constants: THIS_IS_A_BUG = ("This is a bug. We are sorry for the inconvenience. " "Please contact the developers for assistance.") CRASH_MESSAGE = ("An unknown error occurred. This is a bug. We are " "sorry for the inconvenience. Pleas...
Tanmay28/coala
coalib/misc/Constants.py
Python
agpl-3.0
2,678
""" Django models for videos for Video Abstraction Layer (VAL) When calling a serializers' .errors field, there is a priority in which the errors are returned. This may cause a partial return of errors, starting with the highest priority. Missing a field, having an incorrect input type (expected an int, not a str), n...
edx/edx-val
edxval/models.py
Python
agpl-3.0
22,828
"""Test that we're meeting delicious API specifications""" # Need to create a new renderer that wraps the jsonp renderer and adds these # heads to all responses. Then the api needs to be adjusted to use this new # renderer type vs jsonp. import logging import json import transaction import unittest from pyramid import ...
ojengwa/Bookie
bookie/tests/test_api/test_base_api.py
Python
agpl-3.0
27,660
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
NinjaMSP/crossbar
crossbar/adapter/rest/webhook.py
Python
agpl-3.0
2,998
############################################################################## # 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/cairo/package.py
Python
lgpl-2.1
2,432
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * def cross_detect(): if spack.architecture.platform().name == 'cray': if which('srun'): ...
iulian787/spack
var/spack/repos/builtin/packages/upcxx/package.py
Python
lgpl-2.1
7,459
############################################################################ # # Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). # Contact: http://www.qt-project.org/legal # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # ...
omniacreator/qtcreator
share/qtcreator/debugger/qttypes.py
Python
lgpl-2.1
85,573
import os from random import randrange from math import ceil # Déclaration des variables de départ argent = 1000 # On a 1000 $ au début du jeu continuer_partie = True # Booléen qui est vrai tant qu'on doit # continuer la partie print("Vous vous installez à la table de roulette avec", argent, "$.") while continuer_...
david-co/veamos
test.py
Python
lgpl-2.1
2,875
#!/usr/bin/env python import gtk from kiwi.controllers import BaseController from kiwi.ui.views import BaseView class FarenControl(BaseController): def convert_temperature(self, temp): celsius = (temp - 32) * 5/9.0 farenheit = (temp * 9/5.0) + 32 return farenheit, celsius def on_quit...
Schevo/kiwi
examples/framework/faren/faren2.py
Python
lgpl-2.1
1,435
# -*- coding: utf-8 -*- # Focus # Copyright (C) 2010-2012 Grid Dynamics Consulting Services, Inc # All Rights Reserved # # This program 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 ...
altai/focus
focus/flask_memcache_session.py
Python
lgpl-2.1
2,177
# -*- coding: utf-8 -*- # # gensim documentation build configuration file, created by # sphinx-quickstart on Wed Mar 17 13:42:21 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
robotcator/gensim
docs/src/conf.py
Python
lgpl-2.1
7,200
try: import cccanvas except: import sys sys.path.insert(0,"./../.libs/") import cccanvas import page import gtk import fifteen_grid class Fifteen(page.Page): def scramble(self, button): self.canvas.scramble() def __init__(self): self.title = 'Fifteen' # main...
herzi/ccc
python/demo/fifteen.py
Python
lgpl-2.1
903
# Copyright (C) 2013 Red Hat, Inc. 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 Foundation; either # version 2.1 of the License, or (at your option) any later version. # # ...
jsafrane/openlmi-storage
src/openlmi/storage/LMI_PVFormatProvider.py
Python
lgpl-2.1
1,946
import sys import os import argparse import docker import json import subprocess import getpass import requests import pipes import pwd import time import math import Atomic.mount as mount import Atomic.util as util import Atomic.satellite as satellite import Atomic.pulp as pulp try: from subprocess import DEVNUL...
praiskup/atomic
Atomic/atomic.py
Python
lgpl-2.1
28,477
#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : # Create a collection of test-cases and the associated references numberOfTests = 3 testCases = list() references = DistributionCollection(numberOfTests) testCases.append(DistributionCollect...
dbarbier/privot
python/test/t_RandomMixture_std.py
Python
lgpl-3.0
5,911
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2011-2015 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
lupien/pyHegel
pyHegel/instruments/data_translation.py
Python
lgpl-3.0
21,757
from PyQt5.QtCore import pyqtSignal, QPoint, Qt, QEvent, QObject from PyQt5.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QLabel, QStyleOption, QStyle, QPushButton, QTextEdit, QPlainTextEdit, QMainWindow from PyQt5.QtGui import QIcon, QPixmap, QPainter, QMouseEvent, QColor, QKeyEvent import qtawesome as qta # htt...
Neutree/COMTool
COMTool/widgets.py
Python
lgpl-3.0
17,999
import unittest from risky import units class UnitsTests(unittest.TestCase): def setUp(self): units.DOLLARS_PER_HOUR = 1.0 def test_mustDefine_DOLLARS_PER_HOUR(self): reload(units) with self.assertRaises(TypeError): units.hours(10.0) def test_hours_UsesDOLLARS_PER_HOUR...
SimplyKnownAsG/risky
risky_tests/test_units.py
Python
lgpl-3.0
768
# SPDX-License-Identifier: LGPL-3.0-or-later # dlb - a Pythonic build tool # Copyright (C) 2020 Daniel Lutz <dlu-ch@users.noreply.github.com> import testenv # also sets up module search paths import sys import dlb.ex import dlb_contrib.msbatch import unittest class PathTest(unittest.TestCase): def test_fails_wi...
dlu-ch/dlb
test/dlb_contrib/0/test_msbatch.py
Python
lgpl-3.0
1,806
#-*-coding:utf-8-*- """ @package bapp.tests.test_settings @brief tests for bapp.settings @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ from __future__ import unicode_literals from __future__ import division from butility.future import str __all__ =...
Byron/bcore
src/python/bapp/tests/test_settings.py
Python
lgpl-3.0
5,753
#Fixtures.py import pytest from hydra_client.connection import RemoteJSONConnection @pytest.fixture() def client(): client=RemoteJSONConnection("http://localhost:8080/json") client.login("root","") return client
hydraplatform/hydra-server
tests/fixtures.py
Python
lgpl-3.0
225
from tulip import * from py2neo import * import configparser import os from graphtulip.createPostCommentTagTlp import CreatePostCommentTagTlp config = configparser.ConfigParser() config.read("config.ini") # todo create a unique Createtlp to avoid code duplication class CreateTagFullTlp(object): def __init__(self...
jason-vallet/graph-ryder-api
graphtulip/createtagfulltlp.py
Python
lgpl-3.0
8,794
# # Project Kimchi # # Copyright IBM, Corp. 2013-2014 # # 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 version. # # Thi...
gouzongmei/t1
src/kimchi/auth.py
Python
lgpl-3.0
11,868
# -*- coding: iso-8859-1 -*- # Copyright (C) 2014 Daniele Simonetti # # 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 2 of the License, or # (at your option) any later version. # ...
OpenNingia/l5rcm-data-access
l5rdal/spell.py
Python
lgpl-3.0
2,752